From gerrit-no-reply at lists.osmocom.org Wed May 1 05:46:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 May 2019 05:46:09 +0000 Subject: Change in osmo-gsm-tester[master]: ms_driver: Catch up with the new MS baseclass In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13822 ) Change subject: ms_driver: Catch up with the new MS baseclass ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13822 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id8de8b3ee76b515c49e5ea52acaa326a2283b0e1 Gerrit-Change-Number: 13822 Gerrit-PatchSet: 1 Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 01 May 2019 05:46:09 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 05:46:49 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 May 2019 05:46:49 +0000 Subject: Change in osmo-gsm-tester[master]: virtual: Separate starting virtphy/mobile from the test In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13823 ) Change subject: virtual: Separate starting virtphy/mobile from the test ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13823 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie15f5123775d11dd44243b2741d047ed93f318f9 Gerrit-Change-Number: 13823 Gerrit-PatchSet: 1 Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Wed, 01 May 2019 05:46:49 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 05:47:22 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 May 2019 05:47:22 +0000 Subject: Change in osmo-gsm-tester[master]: virtual: Move the starter code into the starter module In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13824 ) Change subject: virtual: Move the starter code into the starter module ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13824 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0cd5705eaf53a14523feacece9446331a53b3e59 Gerrit-Change-Number: 13824 Gerrit-PatchSet: 1 Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Wed, 01 May 2019 05:47:22 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 05:48:13 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 May 2019 05:48:13 +0000 Subject: Change in osmo-trx[master]: uhd: smpl_buf: Drop UHD specifics out back to UHDDevice In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13810 ) Change subject: uhd: smpl_buf: Drop UHD specifics out back to UHDDevice ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13810 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I94061328d46a550d4147121d85baffa29c700c45 Gerrit-Change-Number: 13810 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: tnt Gerrit-Comment-Date: Wed, 01 May 2019 05:48:13 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 05:48:15 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 May 2019 05:48:15 +0000 Subject: Change in osmo-trx[master]: cosmetic: uhd: Move smpl_buf out of UHDDevice, move UHDDevice class d... In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13809 ) Change subject: cosmetic: uhd: Move smpl_buf out of UHDDevice, move UHDDevice class definition to .h ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13809 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib4594320da9bb7f6e9f52e7d70d11ecd11106aae Gerrit-Change-Number: 13809 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: tnt Gerrit-Comment-Date: Wed, 01 May 2019 05:48:15 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 05:49:30 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 May 2019 05:49:30 +0000 Subject: Change in osmo-trx[master]: uhd: smpl_buf: Use TIMESTAMP type in str_status In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13828 ) Change subject: uhd: smpl_buf: Use TIMESTAMP type in str_status ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13828 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I016b1a7f8db379caebc1409ca11e5ae8b759d2d4 Gerrit-Change-Number: 13828 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: tnt Gerrit-Comment-Date: Wed, 01 May 2019 05:49:30 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 05:49:39 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 May 2019 05:49:39 +0000 Subject: Change in osmo-trx[master]: cosmetic: uhd: Use loglevel ERROR instead of ERR In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13829 ) Change subject: cosmetic: uhd: Use loglevel ERROR instead of ERR ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13829 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I82f6f89a725bea7f7acfa455c20cf922cc3f8a00 Gerrit-Change-Number: 13829 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: tnt Gerrit-Comment-Date: Wed, 01 May 2019 05:49:39 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 05:50:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 May 2019 05:50:19 +0000 Subject: Change in osmo-trx[master]: uhd: Avoid reallocation of buffers every read In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13830 ) Change subject: uhd: Avoid reallocation of buffers every read ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13830 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8c881c9c303c80f323825d85a924d74b76d2ce47 Gerrit-Change-Number: 13830 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: tnt Gerrit-Comment-Date: Wed, 01 May 2019 05:50:19 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 05:50:30 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 May 2019 05:50:30 +0000 Subject: Change in osmo-trx[master]: Move smpl_buf out of uhd dir to re-use it in other devices In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13831 ) Change subject: Move smpl_buf out of uhd dir to re-use it in other devices ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13831 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I39ac8435072cff8d4dac786b31ff4af9b61a77fe Gerrit-Change-Number: 13831 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: tnt Gerrit-Comment-Date: Wed, 01 May 2019 05:50:30 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 05:50:55 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 May 2019 05:50:55 +0000 Subject: Change in osmo-trx[master]: device: Drop unused numberRead/numberWritten APIs In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13832 ) Change subject: device: Drop unused numberRead/numberWritten APIs ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13832 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0d18f9c2584771e2f7b3d5c6b016e764e02855ff Gerrit-Change-Number: 13832 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: tnt Gerrit-Comment-Date: Wed, 01 May 2019 05:50:55 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 05:51:32 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 May 2019 05:51:32 +0000 Subject: Change in osmo-trx[master]: uhd: No need to use dynamic mem for rx_buffers In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13833 ) Change subject: uhd: No need to use dynamic mem for rx_buffers ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13833 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I39b293c24053298256626fa78344102032fc2104 Gerrit-Change-Number: 13833 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: tnt Gerrit-Comment-Date: Wed, 01 May 2019 05:51:32 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 05:51:58 2019 From: gerrit-no-reply at lists.osmocom.org (tnt) Date: Wed, 1 May 2019 05:51:58 +0000 Subject: Change in osmo-trx[master]: uhd: smpl_buf: Drop UHD specifics out back to UHDDevice In-Reply-To: References: Message-ID: tnt has posted comments on this change. ( https://gerrit.osmocom.org/13810 ) Change subject: uhd: smpl_buf: Drop UHD specifics out back to UHDDevice ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13810 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I94061328d46a550d4147121d85baffa29c700c45 Gerrit-Change-Number: 13810 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: tnt Gerrit-Comment-Date: Wed, 01 May 2019 05:51:58 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 05:54:57 2019 From: gerrit-no-reply at lists.osmocom.org (tnt) Date: Wed, 1 May 2019 05:54:57 +0000 Subject: Change in osmo-trx[master]: uhd: smpl_buf: Use TIMESTAMP type in str_status In-Reply-To: References: Message-ID: tnt has posted comments on this change. ( https://gerrit.osmocom.org/13828 ) Change subject: uhd: smpl_buf: Use TIMESTAMP type in str_status ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13828 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I016b1a7f8db379caebc1409ca11e5ae8b759d2d4 Gerrit-Change-Number: 13828 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: tnt Gerrit-Comment-Date: Wed, 01 May 2019 05:54:57 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 05:56:01 2019 From: gerrit-no-reply at lists.osmocom.org (tnt) Date: Wed, 1 May 2019 05:56:01 +0000 Subject: Change in osmo-trx[master]: cosmetic: uhd: Use loglevel ERROR instead of ERR In-Reply-To: References: Message-ID: tnt has posted comments on this change. ( https://gerrit.osmocom.org/13829 ) Change subject: cosmetic: uhd: Use loglevel ERROR instead of ERR ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13829 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I82f6f89a725bea7f7acfa455c20cf922cc3f8a00 Gerrit-Change-Number: 13829 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: tnt Gerrit-Comment-Date: Wed, 01 May 2019 05:56:01 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 06:19:28 2019 From: gerrit-no-reply at lists.osmocom.org (tnt) Date: Wed, 1 May 2019 06:19:28 +0000 Subject: Change in osmo-trx[master]: device: Drop unused numberRead/numberWritten APIs In-Reply-To: References: Message-ID: tnt has posted comments on this change. ( https://gerrit.osmocom.org/13832 ) Change subject: device: Drop unused numberRead/numberWritten APIs ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13832 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0d18f9c2584771e2f7b3d5c6b016e764e02855ff Gerrit-Change-Number: 13832 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: tnt Gerrit-Comment-Date: Wed, 01 May 2019 06:19:28 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 06:26:51 2019 From: gerrit-no-reply at lists.osmocom.org (tnt) Date: Wed, 1 May 2019 06:26:51 +0000 Subject: Change in osmo-trx[master]: uhd: No need to use dynamic mem for rx_buffers In-Reply-To: References: Message-ID: tnt has posted comments on this change. ( https://gerrit.osmocom.org/13833 ) Change subject: uhd: No need to use dynamic mem for rx_buffers ...................................................................... Patch Set 1: Code-Review-1 (1 comment) I'd like to make sure you tried running the multi-channel case with this patch first, because I suspect that might break it. https://gerrit.osmocom.org/#/c/13833/1/Transceiver52M/device/uhd/UHDDevice.cpp File Transceiver52M/device/uhd/UHDDevice.cpp: https://gerrit.osmocom.org/#/c/13833/1/Transceiver52M/device/uhd/UHDDevice.cpp at 512 PS1, Line 512: rx_buffers = std::vector(chans, smpl_buf(buf_len, rx_rate)); My C++ is rusty but are you sure this works ? Won't that just use the default copy constructore for smpl_buf and so you'll end up with several buffer pointing to the same data array ? -- To view, visit https://gerrit.osmocom.org/13833 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I39b293c24053298256626fa78344102032fc2104 Gerrit-Change-Number: 13833 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: tnt Gerrit-Comment-Date: Wed, 01 May 2019 06:26:51 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 06:27:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 May 2019 06:27:19 +0000 Subject: Change in docker-playground[master]: ttcn3-msc-tests: Add IuCS for one simulated RNC Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13834 Change subject: ttcn3-msc-tests: Add IuCS for one simulated RNC ...................................................................... ttcn3-msc-tests: Add IuCS for one simulated RNC We need to update the MSC_Tests.cfg as well as the osmo-stp.cfg to provsion a virtual RNC link. As the new RNC uses routing key 2, we shift the MSC routing key to 3. Change-Id: I10a249b1a851436fd3c20face6ccc94b304bd3e4 --- M ttcn3-msc-test/MSC_Tests.cfg M ttcn3-msc-test/osmo-msc.cfg M ttcn3-msc-test/osmo-stp.cfg 3 files changed, 19 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/34/13834/1 diff --git a/ttcn3-msc-test/MSC_Tests.cfg b/ttcn3-msc-test/MSC_Tests.cfg index e40a0e5..cf912de 100644 --- a/ttcn3-msc-test/MSC_Tests.cfg +++ b/ttcn3-msc-test/MSC_Tests.cfg @@ -31,6 +31,17 @@ peer_ssn := 254, sio := '83'O, rctx := 1 + }, + { + transport := RANAP_TRANSPORT_IuCS, + sccp_service_type := "mtp3_itu", + sctp_addr := { 23908, "172.18.1.103", 2905, "172.18.1.200" }, + own_pc := 195, /* 0.24.3 */ + own_ssn := 142, + peer_pc := 185, /* 0.23.1 */ + peer_ssn := 142, + sio := '83'O, + rctx := 2 } }; diff --git a/ttcn3-msc-test/osmo-msc.cfg b/ttcn3-msc-test/osmo-msc.cfg index 4c3555b..d19f039 100644 --- a/ttcn3-msc-test/osmo-msc.cfg +++ b/ttcn3-msc-test/osmo-msc.cfg @@ -56,7 +56,7 @@ remote-ip 172.18.1.200 as as-clnt-OsmoMSC-A m3ua asp asp-clnt-OsmoMSC-A - routing-key 2 0.23.1 + routing-key 3 0.23.1 network network country code 262 mobile network code 42 diff --git a/ttcn3-msc-test/osmo-stp.cfg b/ttcn3-msc-test/osmo-stp.cfg index 50a1878..a2a6210 100644 --- a/ttcn3-msc-test/osmo-stp.cfg +++ b/ttcn3-msc-test/osmo-stp.cfg @@ -43,9 +43,16 @@ as virt-bsc1 m3ua asp virt-bsc1-0 routing-key 1 0.24.2 + asp virt-rnc0-0 23908 2905 m3ua + local-ip 172.18.1.200 + remote-ip 172.18.1.103 + as virt-rnc0 m3ua + asp virt-rnc0-0 + routing-key 2 0.24.3 route-table system update route 0.24.1 7.255.7 linkset virt-bsc0 update route 0.24.2 7.255.7 linkset virt-bsc1 + update route 0.24.3 7.255.7 linkset virt-rnc0 listen m3ua 2905 accept-asp-connections dynamic-permitted listen ipa 5000 -- To view, visit https://gerrit.osmocom.org/13834 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I10a249b1a851436fd3c20face6ccc94b304bd3e4 Gerrit-Change-Number: 13834 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 06:27:20 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 May 2019 06:27:20 +0000 Subject: Change in docker-playground[master]: ttcn3-msc-test: Execute MSC_Tests_Iu.control Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13835 Change subject: ttcn3-msc-test: Execute MSC_Tests_Iu.control ...................................................................... ttcn3-msc-test: Execute MSC_Tests_Iu.control The new IuCS related tests have been added as 'MSC_Tests_Iu' module to take advantage of the hierarchical display format in the Jenkins tests results analyzer. Let's execute them. Change-Id: I80ccfce4874d14039bbcb273c3b450db2a7780dd --- M ttcn3-msc-test/MSC_Tests.cfg 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/35/13835/1 diff --git a/ttcn3-msc-test/MSC_Tests.cfg b/ttcn3-msc-test/MSC_Tests.cfg index cf912de..c36e08b 100644 --- a/ttcn3-msc-test/MSC_Tests.cfg +++ b/ttcn3-msc-test/MSC_Tests.cfg @@ -56,3 +56,4 @@ [EXECUTE] MSC_Tests.control +MSC_Tests_Iu.control -- To view, visit https://gerrit.osmocom.org/13835 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I80ccfce4874d14039bbcb273c3b450db2a7780dd Gerrit-Change-Number: 13835 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 06:27:40 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 May 2019 06:27:40 +0000 Subject: Change in docker-playground[master]: ttcn3-msc-tests: Add IuCS for one simulated RNC In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13834 ) Change subject: ttcn3-msc-tests: Add IuCS for one simulated RNC ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13834 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I10a249b1a851436fd3c20face6ccc94b304bd3e4 Gerrit-Change-Number: 13834 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Wed, 01 May 2019 06:27:40 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 06:27:44 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 May 2019 06:27:44 +0000 Subject: Change in docker-playground[master]: ttcn3-msc-test: Execute MSC_Tests_Iu.control In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13835 ) Change subject: ttcn3-msc-test: Execute MSC_Tests_Iu.control ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13835 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I80ccfce4874d14039bbcb273c3b450db2a7780dd Gerrit-Change-Number: 13835 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Wed, 01 May 2019 06:27:44 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 06:27:45 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 May 2019 06:27:45 +0000 Subject: Change in docker-playground[master]: ttcn3-msc-tests: Add IuCS for one simulated RNC In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13834 ) Change subject: ttcn3-msc-tests: Add IuCS for one simulated RNC ...................................................................... ttcn3-msc-tests: Add IuCS for one simulated RNC We need to update the MSC_Tests.cfg as well as the osmo-stp.cfg to provsion a virtual RNC link. As the new RNC uses routing key 2, we shift the MSC routing key to 3. Change-Id: I10a249b1a851436fd3c20face6ccc94b304bd3e4 --- M ttcn3-msc-test/MSC_Tests.cfg M ttcn3-msc-test/osmo-msc.cfg M ttcn3-msc-test/osmo-stp.cfg 3 files changed, 19 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/ttcn3-msc-test/MSC_Tests.cfg b/ttcn3-msc-test/MSC_Tests.cfg index e40a0e5..cf912de 100644 --- a/ttcn3-msc-test/MSC_Tests.cfg +++ b/ttcn3-msc-test/MSC_Tests.cfg @@ -31,6 +31,17 @@ peer_ssn := 254, sio := '83'O, rctx := 1 + }, + { + transport := RANAP_TRANSPORT_IuCS, + sccp_service_type := "mtp3_itu", + sctp_addr := { 23908, "172.18.1.103", 2905, "172.18.1.200" }, + own_pc := 195, /* 0.24.3 */ + own_ssn := 142, + peer_pc := 185, /* 0.23.1 */ + peer_ssn := 142, + sio := '83'O, + rctx := 2 } }; diff --git a/ttcn3-msc-test/osmo-msc.cfg b/ttcn3-msc-test/osmo-msc.cfg index 4c3555b..d19f039 100644 --- a/ttcn3-msc-test/osmo-msc.cfg +++ b/ttcn3-msc-test/osmo-msc.cfg @@ -56,7 +56,7 @@ remote-ip 172.18.1.200 as as-clnt-OsmoMSC-A m3ua asp asp-clnt-OsmoMSC-A - routing-key 2 0.23.1 + routing-key 3 0.23.1 network network country code 262 mobile network code 42 diff --git a/ttcn3-msc-test/osmo-stp.cfg b/ttcn3-msc-test/osmo-stp.cfg index 50a1878..a2a6210 100644 --- a/ttcn3-msc-test/osmo-stp.cfg +++ b/ttcn3-msc-test/osmo-stp.cfg @@ -43,9 +43,16 @@ as virt-bsc1 m3ua asp virt-bsc1-0 routing-key 1 0.24.2 + asp virt-rnc0-0 23908 2905 m3ua + local-ip 172.18.1.200 + remote-ip 172.18.1.103 + as virt-rnc0 m3ua + asp virt-rnc0-0 + routing-key 2 0.24.3 route-table system update route 0.24.1 7.255.7 linkset virt-bsc0 update route 0.24.2 7.255.7 linkset virt-bsc1 + update route 0.24.3 7.255.7 linkset virt-rnc0 listen m3ua 2905 accept-asp-connections dynamic-permitted listen ipa 5000 -- To view, visit https://gerrit.osmocom.org/13834 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I10a249b1a851436fd3c20face6ccc94b304bd3e4 Gerrit-Change-Number: 13834 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 06:27:45 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 1 May 2019 06:27:45 +0000 Subject: Change in docker-playground[master]: ttcn3-msc-test: Execute MSC_Tests_Iu.control In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13835 ) Change subject: ttcn3-msc-test: Execute MSC_Tests_Iu.control ...................................................................... ttcn3-msc-test: Execute MSC_Tests_Iu.control The new IuCS related tests have been added as 'MSC_Tests_Iu' module to take advantage of the hierarchical display format in the Jenkins tests results analyzer. Let's execute them. Change-Id: I80ccfce4874d14039bbcb273c3b450db2a7780dd --- M ttcn3-msc-test/MSC_Tests.cfg 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/ttcn3-msc-test/MSC_Tests.cfg b/ttcn3-msc-test/MSC_Tests.cfg index cf912de..c36e08b 100644 --- a/ttcn3-msc-test/MSC_Tests.cfg +++ b/ttcn3-msc-test/MSC_Tests.cfg @@ -56,3 +56,4 @@ [EXECUTE] MSC_Tests.control +MSC_Tests_Iu.control -- To view, visit https://gerrit.osmocom.org/13835 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I80ccfce4874d14039bbcb273c3b450db2a7780dd Gerrit-Change-Number: 13835 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 06:29:07 2019 From: gerrit-no-reply at lists.osmocom.org (tnt) Date: Wed, 1 May 2019 06:29:07 +0000 Subject: Change in osmo-trx[master]: Move smpl_buf out of uhd dir to re-use it in other devices In-Reply-To: References: Message-ID: tnt has posted comments on this change. ( https://gerrit.osmocom.org/13831 ) Change subject: Move smpl_buf out of uhd dir to re-use it in other devices ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13831 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I39ac8435072cff8d4dac786b31ff4af9b61a77fe Gerrit-Change-Number: 13831 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: tnt Gerrit-Comment-Date: Wed, 01 May 2019 06:29:07 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 11:04:34 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 1 May 2019 11:04:34 +0000 Subject: Change in osmo-trx[master]: cosmetic: uhd: Move smpl_buf out of UHDDevice, move UHDDevice class d... In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13809 ) Change subject: cosmetic: uhd: Move smpl_buf out of UHDDevice, move UHDDevice class definition to .h ...................................................................... Patch Set 1: Marking as WIP until I test all of these patches (I couldn't do it in the plane). -- To view, visit https://gerrit.osmocom.org/13809 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib4594320da9bb7f6e9f52e7d70d11ecd11106aae Gerrit-Change-Number: 13809 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: tnt Gerrit-Comment-Date: Wed, 01 May 2019 11:04:34 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 11:05:36 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 1 May 2019 11:05:36 +0000 Subject: Change in osmo-trx[master]: uhd: No need to use dynamic mem for rx_buffers In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13833 ) Change subject: uhd: No need to use dynamic mem for rx_buffers ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/13833/1/Transceiver52M/device/uhd/UHDDevice.cpp File Transceiver52M/device/uhd/UHDDevice.cpp: https://gerrit.osmocom.org/#/c/13833/1/Transceiver52M/device/uhd/UHDDevice.cpp at 512 PS1, Line 512: rx_buffers = std::vector(chans, smpl_buf(buf_len, rx_rate)); > My C++ is rusty but are you sure this works ? [?] Good point, I'll have a closer look at this one before merging. -- To view, visit https://gerrit.osmocom.org/13833 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I39b293c24053298256626fa78344102032fc2104 Gerrit-Change-Number: 13833 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: tnt Gerrit-Comment-Date: Wed, 01 May 2019 11:05:36 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 11:13:46 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 1 May 2019 11:13:46 +0000 Subject: Change in osmo-sgsn[master]: Echo XID-Field of Type L3_PAR even when zero length In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13811 ) Change subject: Echo XID-Field of Type L3_PAR even when zero length ...................................................................... Patch Set 4: (2 comments) https://gerrit.osmocom.org/#/c/13811/4/src/gprs/gprs_sndcp.c File src/gprs/gprs_sndcp.c: https://gerrit.osmocom.org/#/c/13811/4/src/gprs/gprs_sndcp.c at 1123 PS4, Line 1123: /* Some phones send zero byte length SNDCP frames */ Please append to this comment that we actually need to answer it in order to have them registered or whatever. https://gerrit.osmocom.org/#/c/13811/4/src/gprs/gprs_sndcp.c at 1128 PS4, Line 1128: // xid_field_response = gprs_llc_dup_xid_field(lle->llme, xid_field_indication); These comments can be dropped. -- To view, visit https://gerrit.osmocom.org/13811 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibd75f7b943c84ed7264481fa2e4bc3cb2f6745d4 Gerrit-Change-Number: 13811 Gerrit-PatchSet: 4 Gerrit-Owner: Keith Whyte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Keith Whyte Gerrit-Reviewer: lynxis lazus Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 01 May 2019 11:13:46 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 11:15:01 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 1 May 2019 11:15:01 +0000 Subject: Change in osmo-ci[master]: update-osmo-ci: disable admin2-deb{8, 9}build In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13820 ) Change subject: update-osmo-ci: disable admin2-deb{8,9}build ...................................................................... Patch Set 1: So then I guess we don't need to merge this patch and it can be abandoned? -- To view, visit https://gerrit.osmocom.org/13820 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic062cafd58f77d40042c9b467814257576c23027 Gerrit-Change-Number: 13820 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 01 May 2019 11:15:01 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 11:24:44 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 1 May 2019 11:24:44 +0000 Subject: Change in osmo-gsm-tester[master]: virtual: Make it possible to add tests to the ms driver In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13826 ) Change subject: virtual: Make it possible to add tests to the ms driver ...................................................................... Patch Set 1: (2 comments) https://gerrit.osmocom.org/#/c/13826/1/src/osmo_gsm_tester/ms_driver.py File src/osmo_gsm_tester/ms_driver.py: https://gerrit.osmocom.org/#/c/13826/1/src/osmo_gsm_tester/ms_driver.py at 105 PS1, Line 105: raise Exception("Unknown test_name: " + test_name) raise log.Error("Unknown test_name: " + test_name) https://gerrit.osmocom.org/#/c/13826/1/suites/nitb_netreg_mass/register_default_mass.py File suites/nitb_netreg_mass/register_default_mass.py: https://gerrit.osmocom.org/#/c/13826/1/suites/nitb_netreg_mass/register_default_mass.py at 13 PS1, Line 13: ul = ms_driver.add_test('update_location') Probably more clear to call it "ul_test". -- To view, visit https://gerrit.osmocom.org/13826 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia65ee53987e92b24e6b8c40e1376bc74dc260180 Gerrit-Change-Number: 13826 Gerrit-PatchSet: 1 Gerrit-Owner: Holger Freyther Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 01 May 2019 11:24:44 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 11:30:41 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 1 May 2019 11:30:41 +0000 Subject: Change in osmo-gsm-tester[master]: ms_driver: Catch up with the new MS baseclass In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13822 ) Change subject: ms_driver: Catch up with the new MS baseclass ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13822 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id8de8b3ee76b515c49e5ea52acaa326a2283b0e1 Gerrit-Change-Number: 13822 Gerrit-PatchSet: 1 Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 01 May 2019 11:30:41 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 11:38:41 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 1 May 2019 11:38:41 +0000 Subject: Change in osmo-gsm-tester[master]: virtual: Separate starting virtphy/mobile from the test In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13823 ) Change subject: virtual: Separate starting virtphy/mobile from the test ...................................................................... Patch Set 1: With this bunch of patches submitted I have the general impression: * Too many suff in every patch, it's difficult to follow and I'd welcome more fine-grained ones in the future. * You are trying to add steps into every test but under the "osmo-gsm-tester test" level, so internal to your tests. I wonder that it'd be better having this kind of stuff generic (at suite and test level) rather than inside it. But since you are mostly the only one playing with osmo_ms_driver subdir and related stuff I guess it's fine to leave it be and eveolve as you want there for now. It's going to be easier to try adding that to osmo-gsm-tester generic part and we can always do that later. -- To view, visit https://gerrit.osmocom.org/13823 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie15f5123775d11dd44243b2741d047ed93f318f9 Gerrit-Change-Number: 13823 Gerrit-PatchSet: 1 Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 01 May 2019 11:38:41 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 11:39:59 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 1 May 2019 11:39:59 +0000 Subject: Change in osmo-gsm-tester[master]: virtual: Separate starting virtphy/mobile from the test In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13823 ) Change subject: virtual: Separate starting virtphy/mobile from the test ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13823 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie15f5123775d11dd44243b2741d047ed93f318f9 Gerrit-Change-Number: 13823 Gerrit-PatchSet: 1 Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 01 May 2019 11:39:59 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 11:41:52 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 1 May 2019 11:41:52 +0000 Subject: Change in osmo-gsm-tester[master]: virtual: Move the starter code into the starter module In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13824 ) Change subject: virtual: Move the starter code into the starter module ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13824 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0cd5705eaf53a14523feacece9446331a53b3e59 Gerrit-Change-Number: 13824 Gerrit-PatchSet: 1 Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 01 May 2019 11:41:52 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 11:43:18 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 1 May 2019 11:43:18 +0000 Subject: Change in osmo-gsm-tester[master]: virtual: Introduce a base class for test cases In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13825 ) Change subject: virtual: Introduce a base class for test cases ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13825 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I97968fb02436d5ac8248fc8020539e1af547b030 Gerrit-Change-Number: 13825 Gerrit-PatchSet: 1 Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 01 May 2019 11:43:18 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 11:44:11 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 1 May 2019 11:44:11 +0000 Subject: Change in osmo-gsm-tester[master]: virtual: Make mass tests be able to activate themselves In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13827 ) Change subject: virtual: Make mass tests be able to activate themselves ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13827 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ide4d788543d910356efe9f61e789b3975f7bc558 Gerrit-Change-Number: 13827 Gerrit-PatchSet: 5 Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 01 May 2019 11:44:11 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 12:48:01 2019 From: gerrit-no-reply at lists.osmocom.org (Keith Whyte) Date: Wed, 1 May 2019 12:48:01 +0000 Subject: Change in osmo-sgsn[master]: Echo zero byte XID-Field of Type L3_PAR In-Reply-To: References: Message-ID: Hello lynxis lazus, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13811 to look at the new patch set (#5). Change subject: Echo zero byte XID-Field of Type L3_PAR ...................................................................... Echo zero byte XID-Field of Type L3_PAR After Activate PDP Context request, Motorola KRZR sends a zero length XID-Field of Type L3 Parameters If this is not echoed back, the phone will send Deactivate PDP Context request with SM Cause: LLC or SNDCP failure(A/Gb only) (25) Change-Id: Ibd75f7b943c84ed7264481fa2e4bc3cb2f6745d4 --- M src/gprs/gprs_sndcp.c 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/11/13811/5 -- To view, visit https://gerrit.osmocom.org/13811 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibd75f7b943c84ed7264481fa2e4bc3cb2f6745d4 Gerrit-Change-Number: 13811 Gerrit-PatchSet: 5 Gerrit-Owner: Keith Whyte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Keith Whyte Gerrit-Reviewer: lynxis lazus Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 12:49:29 2019 From: gerrit-no-reply at lists.osmocom.org (Keith Whyte) Date: Wed, 1 May 2019 12:49:29 +0000 Subject: Change in osmo-sgsn[master]: Echo zero byte XID-Field of Type L3_PAR In-Reply-To: References: Message-ID: Keith Whyte has posted comments on this change. ( https://gerrit.osmocom.org/13811 ) Change subject: Echo zero byte XID-Field of Type L3_PAR ...................................................................... Patch Set 4: (1 comment) https://gerrit.osmocom.org/#/c/13811/4/src/gprs/gprs_sndcp.c File src/gprs/gprs_sndcp.c: https://gerrit.osmocom.org/#/c/13811/4/src/gprs/gprs_sndcp.c at 1128 PS4, Line 1128: // xid_field_response = gprs_llc_dup_xid_field(lle->llme, xid_field_indication); > These comments can be dropped. yep.. was not intended for merge like this, just for my questions... -- To view, visit https://gerrit.osmocom.org/13811 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibd75f7b943c84ed7264481fa2e4bc3cb2f6745d4 Gerrit-Change-Number: 13811 Gerrit-PatchSet: 4 Gerrit-Owner: Keith Whyte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Keith Whyte Gerrit-Reviewer: lynxis lazus Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 01 May 2019 12:49:29 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 12:51:10 2019 From: gerrit-no-reply at lists.osmocom.org (Keith Whyte) Date: Wed, 1 May 2019 12:51:10 +0000 Subject: Change in osmo-sgsn[master]: Echo zero byte XID-Field of Type L3_PAR In-Reply-To: References: Message-ID: Hello lynxis lazus, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13811 to look at the new patch set (#6). Change subject: Echo zero byte XID-Field of Type L3_PAR ...................................................................... Echo zero byte XID-Field of Type L3_PAR After Activate PDP Context request, Motorola KRZR sends a zero length XID-Field of Type L3 Parameters If this is not echoed back, the phone will send Deactivate PDP Context request with SM Cause: LLC or SNDCP failure(A/Gb only) (25) Change-Id: Ibd75f7b943c84ed7264481fa2e4bc3cb2f6745d4 --- M src/gprs/gprs_sndcp.c 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/11/13811/6 -- To view, visit https://gerrit.osmocom.org/13811 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibd75f7b943c84ed7264481fa2e4bc3cb2f6745d4 Gerrit-Change-Number: 13811 Gerrit-PatchSet: 6 Gerrit-Owner: Keith Whyte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Keith Whyte Gerrit-Reviewer: lynxis lazus Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 12:52:10 2019 From: gerrit-no-reply at lists.osmocom.org (Keith Whyte) Date: Wed, 1 May 2019 12:52:10 +0000 Subject: Change in osmo-sgsn[master]: Echo zero byte XID-Field of Type L3_PAR In-Reply-To: References: Message-ID: Keith Whyte has posted comments on this change. ( https://gerrit.osmocom.org/13811 ) Change subject: Echo zero byte XID-Field of Type L3_PAR ...................................................................... Patch Set 6: Code-Review+1 I'm now proposing this for merge. -- To view, visit https://gerrit.osmocom.org/13811 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibd75f7b943c84ed7264481fa2e4bc3cb2f6745d4 Gerrit-Change-Number: 13811 Gerrit-PatchSet: 6 Gerrit-Owner: Keith Whyte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Keith Whyte Gerrit-Reviewer: lynxis lazus Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 01 May 2019 12:52:10 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 12:55:44 2019 From: gerrit-no-reply at lists.osmocom.org (Keith Whyte) Date: Wed, 1 May 2019 12:55:44 +0000 Subject: Change in osmo-sgsn[master]: Echo zero byte XID-Field of Type L3_PAR In-Reply-To: References: Message-ID: Hello lynxis lazus, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13811 to look at the new patch set (#7). Change subject: Echo zero byte XID-Field of Type L3_PAR ...................................................................... Echo zero byte XID-Field of Type L3_PAR After Activate PDP Context request, Motorola KRZR sends a zero length XID-Field of Type L3 Parameters If this is not echoed back, the phone will send Deactivate PDP Context request with SM Cause: LLC or SNDCP failure(A/Gb only) (25) Closes: OS#3426 Change-Id: Ibd75f7b943c84ed7264481fa2e4bc3cb2f6745d4 --- M src/gprs/gprs_sndcp.c 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/11/13811/7 -- To view, visit https://gerrit.osmocom.org/13811 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibd75f7b943c84ed7264481fa2e4bc3cb2f6745d4 Gerrit-Change-Number: 13811 Gerrit-PatchSet: 7 Gerrit-Owner: Keith Whyte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Keith Whyte Gerrit-Reviewer: lynxis lazus Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 12:57:23 2019 From: gerrit-no-reply at lists.osmocom.org (Keith Whyte) Date: Wed, 1 May 2019 12:57:23 +0000 Subject: Change in osmo-sgsn[master]: Echo zero byte XID-Field of Type L3_PAR In-Reply-To: References: Message-ID: Keith Whyte has posted comments on this change. ( https://gerrit.osmocom.org/13811 ) Change subject: Echo zero byte XID-Field of Type L3_PAR ...................................................................... Patch Set 7: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13811 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibd75f7b943c84ed7264481fa2e4bc3cb2f6745d4 Gerrit-Change-Number: 13811 Gerrit-PatchSet: 7 Gerrit-Owner: Keith Whyte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Keith Whyte Gerrit-Reviewer: lynxis lazus Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 01 May 2019 12:57:23 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 20:30:48 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 1 May 2019 20:30:48 +0000 Subject: Change in openbsc[master]: bsc_filter.c: Return NULL instead of zero in bsc_nat_parse Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13836 Change subject: bsc_filter.c: Return NULL instead of zero in bsc_nat_parse ...................................................................... bsc_filter.c: Return NULL instead of zero in bsc_nat_parse Change-Id: I7a0ca6067bb1708d4aec28f9de166ac7874f8e91 --- M openbsc/src/osmo-bsc_nat/bsc_filter.c 1 file changed, 7 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/36/13836/1 diff --git a/openbsc/src/osmo-bsc_nat/bsc_filter.c b/openbsc/src/osmo-bsc_nat/bsc_filter.c index 432529e..174ec2e 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_filter.c +++ b/openbsc/src/osmo-bsc_nat/bsc_filter.c @@ -99,22 +99,19 @@ /* do a size check on the input */ if (ntohs(hh->len) != msgb_l2len(msg)) { LOGP(DLINP, LOGL_ERROR, "Wrong input length?\n"); - talloc_free(parsed); - return NULL; + goto err_free; } /* analyze sccp down here */ if (parsed->ipa_proto == IPAC_PROTO_SCCP) { memset(&result, 0, sizeof(result)); if (sccp_parse_header(msg, &result) != 0) { - talloc_free(parsed); - return 0; + goto err_free; } if (msg->l3h && msgb_l3len(msg) < 3) { LOGP(DNAT, LOGL_ERROR, "Not enough space or GSM payload\n"); - talloc_free(parsed); - return 0; + goto err_free; } parsed->sccp_type = sccp_determine_msg_type(msg); @@ -133,6 +130,10 @@ } return parsed; + +err_free: + talloc_free(parsed); + return NULL; } /* Returns 0 if message is whitelisted (has to beforwarded by bsc-nat), 1 if -- To view, visit https://gerrit.osmocom.org/13836 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I7a0ca6067bb1708d4aec28f9de166ac7874f8e91 Gerrit-Change-Number: 13836 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 20:38:10 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 1 May 2019 20:38:10 +0000 Subject: Change in osmo-trx[master]: uhd: smpl_buf: Drop UHD specifics out back to UHDDevice In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13810 ) Change subject: uhd: smpl_buf: Drop UHD specifics out back to UHDDevice ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13810 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I94061328d46a550d4147121d85baffa29c700c45 Gerrit-Change-Number: 13810 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-Comment-Date: Wed, 01 May 2019 20:38:10 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 20:38:54 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 1 May 2019 20:38:54 +0000 Subject: Change in osmo-trx[master]: uhd: smpl_buf: Use TIMESTAMP type in str_status In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13828 ) Change subject: uhd: smpl_buf: Use TIMESTAMP type in str_status ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13828 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I016b1a7f8db379caebc1409ca11e5ae8b759d2d4 Gerrit-Change-Number: 13828 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-Comment-Date: Wed, 01 May 2019 20:38:54 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 20:39:39 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 1 May 2019 20:39:39 +0000 Subject: Change in osmo-trx[master]: cosmetic: uhd: Use loglevel ERROR instead of ERR In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13829 ) Change subject: cosmetic: uhd: Use loglevel ERROR instead of ERR ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13829 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I82f6f89a725bea7f7acfa455c20cf922cc3f8a00 Gerrit-Change-Number: 13829 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-Comment-Date: Wed, 01 May 2019 20:39:39 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 21:18:52 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 1 May 2019 21:18:52 +0000 Subject: Change in openbsc[master]: bsc_nat: Fix crash (double-free) in forward_sccp_to_msc Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13837 Change subject: bsc_nat: Fix crash (double-free) in forward_sccp_to_msc ...................................................................... bsc_nat: Fix crash (double-free) in forward_sccp_to_msc In bsc_nat_parse(), parsed is allocated this way: """parsed = talloc_zero(msg, struct bsc_nat_parsed);""" So parsed is a child of msg, and so it's freed when msg is freed. Since libosmocore c7f52c4c84d6a8898048738c4db9266289c40b45, osmo_wqueue_enqueue() correctly detects queue full and returns an error, and then queue_for_msc() calls msgb_free(). Code in osmo-bsc-nat was probably written before that change in behavior, so that's why probably the bug was not hit before. Related: SYS#4548 Change-Id: I209d3e2d809a67915ec43c874e68f7f746a565f0 --- M openbsc/src/osmo-bsc_nat/bsc_nat.c 1 file changed, 11 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/37/13837/1 diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c index 670b0be..fb34aa7 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c @@ -108,19 +108,23 @@ return NULL; } -static void queue_for_msc(struct bsc_msc_connection *con, struct msgb *msg) +static int queue_for_msc(struct bsc_msc_connection *con, struct msgb *msg) { + int rc; if (!con) { LOGP(DLINP, LOGL_ERROR, "No MSC Connection assigned. Check your code.\n"); msgb_free(msg); - return; + return -EINVAL; } - - if (osmo_wqueue_enqueue(&con->write_queue, msg) != 0) { + rc = osmo_wqueue_enqueue(&con->write_queue, msg); + if (rc != 0) { LOGP(DLINP, LOGL_ERROR, "Failed to enqueue the write.\n"); msgb_free(msg); + return rc; } + + return 0; } static void send_reset_ack(struct bsc_connection *bsc) @@ -1277,9 +1281,10 @@ } /* send the non-filtered but maybe modified msg */ - queue_for_msc(con_msc, msg); - if (parsed) + if (queue_for_msc(con_msc, msg) == 0 && parsed) talloc_free(parsed); + /* else: enqueue error, msg has been freed, and so child parsed is freed too */ + return 0; exit: -- To view, visit https://gerrit.osmocom.org/13837 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I209d3e2d809a67915ec43c874e68f7f746a565f0 Gerrit-Change-Number: 13837 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 23:14:49 2019 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 1 May 2019 23:14:49 +0000 Subject: Change in libosmo-sccp[master]: xudt: Implement address and data extraction Message-ID: Holger Freyther has uploaded this change for review. ( https://gerrit.osmocom.org/13838 Change subject: xudt: Implement address and data extraction ...................................................................... xudt: Implement address and data extraction The cellmgr-ng unfortunately looks at the data being sent and can't handle the presence of XUDT at all. Add the structure definition and refactor extraction code to work on offsets. Add a unit test. Change-Id: I45a7447cc1be432fff34849e0e35abc0410cf153 --- M include/osmocom/sccp/sccp_types.h M src/sccp.c M tests/sccp/sccp_test.c 3 files changed, 142 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/38/13838/1 diff --git a/include/osmocom/sccp/sccp_types.h b/include/osmocom/sccp/sccp_types.h index ab7f74f..18b54f4 100644 --- a/include/osmocom/sccp/sccp_types.h +++ b/include/osmocom/sccp/sccp_types.h @@ -422,6 +422,60 @@ uint8_t data[0]; } __attribute__((packed)); +/* Extended unitdata (XUDT) */ +struct sccp_data_ext_unitdata { + /* mandatory */ + uint8_t type; + uint8_t proto_class; + uint8_t hop_counter; + + /* variable */ + uint8_t variable_called; + uint8_t variable_calling; + uint8_t variable_data; + +#if VARIABLE + called party address + calling party address + data +#endif + +#if OPTIONAL + segmentation + importance +#endif + + uint8_t data[0]; + +} __attribute__((packed)); + + +/* Extended unitdata service (XUDTS) */ +struct sccp_data_ext_unitdata_service { + /* mandantory */ + uint8_t type; + uint8_t return_cause; + uint8_t hop_counter; + + + /* variable */ + uint8_t variable_called; + uint8_t variable_calling; + uint8_t variable_data; + +#if VARIABLE + called party address + calling party address + data +#endif + +#if OPTIONAL + segmentation + importancd +#endif + + uint8_t data[0]; +} __attribute__((packed)); struct sccp_data_it { /* mandatory */ diff --git a/src/sccp.c b/src/sccp.c index ec0f3b7..c14e850 100644 --- a/src/sccp.c +++ b/src/sccp.c @@ -406,37 +406,46 @@ return 0; } -int _sccp_parse_udt(struct msgb *msgb, struct sccp_parse_result *result) +struct udt_offsets { + uint32_t header_size; + uint32_t called_offset; + uint32_t calling_offset; + uint32_t data_offset; +}; + +static int _sccp_parse_unitdata(struct msgb *msgb, struct sccp_parse_result *result, + const struct udt_offsets *offs) { - static const uint32_t header_size = sizeof(struct sccp_data_unitdata); - static const uint32_t called_offset = offsetof(struct sccp_data_unitdata, variable_called); - static const uint32_t calling_offset = offsetof(struct sccp_data_unitdata, variable_calling); - static const uint32_t data_offset = offsetof(struct sccp_data_unitdata, variable_data); + uint8_t variable_called; + uint8_t variable_calling; + uint8_t variable_data; - struct sccp_data_unitdata *udt = (struct sccp_data_unitdata *)msgb->l2h; - - if (msgb_l2len(msgb) < header_size) { + if (msgb_l2len(msgb) < offs->header_size) { LOGP(DSCCP, LOGL_ERROR, "msgb < header_size %u %u\n", - msgb_l2len(msgb), header_size); + msgb_l2len(msgb), offs->header_size); return -1; } + variable_called = msgb->l2h[offs->called_offset]; + variable_calling = msgb->l2h[offs->calling_offset]; + variable_data = msgb->l2h[offs->data_offset]; + /* copy out the calling and called address. Add the off */ - if (copy_address(&result->called, called_offset + udt->variable_called, msgb) != 0) + if (copy_address(&result->called, offs->called_offset + variable_called, msgb) != 0) return -1; - if (copy_address(&result->calling, calling_offset + udt->variable_calling, msgb) != 0) + if (copy_address(&result->calling, offs->calling_offset + variable_calling, msgb) != 0) return -1; /* we don't have enough size for the data */ - if (msgb_l2len(msgb) < data_offset + udt->variable_data + 1) { + if (msgb_l2len(msgb) < offs->data_offset + variable_data + 1) { LOGP(DSCCP, LOGL_ERROR, "msgb < header + offset %u %u %u\n", - msgb_l2len(msgb), header_size, udt->variable_data); + msgb_l2len(msgb), offs->header_size, variable_data); return -1; } - msgb->l3h = &udt->data[udt->variable_data]; + msgb->l3h = &msgb->l2h[offs->data_offset + variable_data + 1]; result->data_len = msgb_l3len(msgb); if (msgb_l3len(msgb) < msgb->l3h[-1]) { @@ -448,6 +457,30 @@ return 0; } +int _sccp_parse_udt(struct msgb *msgb, struct sccp_parse_result *result) +{ + static const struct udt_offsets offsets = { + .header_size = sizeof(struct sccp_data_unitdata), + .called_offset = offsetof(struct sccp_data_unitdata, variable_called), + .calling_offset = offsetof(struct sccp_data_unitdata, variable_calling), + .data_offset = offsetof(struct sccp_data_unitdata, variable_data), + }; + + return _sccp_parse_unitdata(msgb, result, &offsets); +} + +static int _sccp_parse_xudt(struct msgb *msgb, struct sccp_parse_result *result) +{ + static const struct udt_offsets offsets = { + .header_size = sizeof(struct sccp_data_ext_unitdata), + .called_offset = offsetof(struct sccp_data_ext_unitdata, variable_called), + .calling_offset = offsetof(struct sccp_data_ext_unitdata, variable_calling), + .data_offset = offsetof(struct sccp_data_ext_unitdata, variable_data), + }; + + return _sccp_parse_unitdata(msgb, result, &offsets); +} + static int _sccp_parse_it(struct msgb *msgb, struct sccp_parse_result *result) { static const uint32_t header_size = sizeof(struct sccp_data_it); @@ -1457,6 +1490,9 @@ case SCCP_MSG_TYPE_UDT: return _sccp_parse_udt(msg, result); break; + case SCCP_MSG_TYPE_XUDT: + return _sccp_parse_xudt(msg, result); + break; case SCCP_MSG_TYPE_IT: return _sccp_parse_it(msg, result); break; diff --git a/tests/sccp/sccp_test.c b/tests/sccp/sccp_test.c index ba9ff7a..29f343f 100644 --- a/tests/sccp/sccp_test.c +++ b/tests/sccp/sccp_test.c @@ -312,6 +312,32 @@ 0x0f, 0x0c, 0x04, 0x00, 0x00, }; +static const uint8_t xudt_test_src_gt[] = { +0x00, 0x11, 0x04, 0x26, 0x18, 0x01, 0x30, 0x08, +0x01 +}; + +static const uint8_t xudt_test_dst_gt[] = { +0x00, 0x61, 0x04, 0x15, 0x10, 0x80, 0x21, 0x35, +0x98, 0x55, 0x08 +}; + +static const uint8_t xudt_test[] = { +0x11, 0x81, 0x02, 0x04, 0x11, 0x1C, 0x00, 0x0D, +0x52, 0x06, 0x00, 0x61, 0x04, 0x15, 0x10, 0x80, +0x21, 0x35, 0x98, 0x55, 0x08, 0x0B, 0x12, 0x95, +0x00, 0x11, 0x04, 0x26, 0x18, 0x01, 0x30, 0x08, +0x01, 0x44, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, +0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, +0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, +0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, +0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, +0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, +0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, +0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, +0x3F, 0x40, 0x41, 0x42, 0x43, 0x44 +}; + static const struct sccp_parse_header_result parse_result[] = { { .msg_type = SCCP_MSG_TYPE_IT, @@ -362,6 +388,18 @@ .src_gti_data = tcap_global_src_gti, .src_gti_len = 9, }, + { + .msg_type = SCCP_MSG_TYPE_XUDT, + .input = xudt_test, + .input_len = sizeof(xudt_test), + .wanted_len = 68, + .dst_ssn = 6, + .dst_gti_data = xudt_test_dst_gt, + .dst_gti_len = 11, + .src_ssn = 149, + .src_gti_data = xudt_test_src_gt, + .src_gti_len = 9, + }, }; -- To view, visit https://gerrit.osmocom.org/13838 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I45a7447cc1be432fff34849e0e35abc0410cf153 Gerrit-Change-Number: 13838 Gerrit-PatchSet: 1 Gerrit-Owner: Holger Freyther -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 23:14:49 2019 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 1 May 2019 23:14:49 +0000 Subject: Change in libosmo-sccp[master]: udts/xudts: Attempt to implement unitdata service parsing Message-ID: Holger Freyther has uploaded this change for review. ( https://gerrit.osmocom.org/13839 Change subject: udts/xudts: Attempt to implement unitdata service parsing ...................................................................... udts/xudts: Attempt to implement unitdata service parsing Use the new offset based parsing to extract GT and data from the UDTS/XUDTS message as well. Test vectors are missing right now. Change-Id: Id0a3a291d8bad3f8c9621e6c97d4ea0b8bbe6035 --- M src/sccp.c 1 file changed, 30 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/39/13839/1 diff --git a/src/sccp.c b/src/sccp.c index c14e850..cbc63b1 100644 --- a/src/sccp.c +++ b/src/sccp.c @@ -469,6 +469,18 @@ return _sccp_parse_unitdata(msgb, result, &offsets); } +int _sccp_parse_udts(struct msgb *msgb, struct sccp_parse_result *result) +{ + static const struct udt_offsets offsets = { + .header_size = sizeof(struct sccp_data_unitdata_service), + .called_offset = offsetof(struct sccp_data_unitdata_service, variable_called), + .calling_offset = offsetof(struct sccp_data_unitdata_service, variable_calling), + .data_offset = offsetof(struct sccp_data_unitdata_service, variable_data), + }; + + return _sccp_parse_unitdata(msgb, result, &offsets); +} + static int _sccp_parse_xudt(struct msgb *msgb, struct sccp_parse_result *result) { static const struct udt_offsets offsets = { @@ -481,6 +493,18 @@ return _sccp_parse_unitdata(msgb, result, &offsets); } +static int _sccp_parse_xudts(struct msgb *msgb, struct sccp_parse_result *result) +{ + static const struct udt_offsets offsets = { + .header_size = sizeof(struct sccp_data_ext_unitdata_service), + .called_offset = offsetof(struct sccp_data_ext_unitdata_service, variable_called), + .calling_offset = offsetof(struct sccp_data_ext_unitdata_service, variable_calling), + .data_offset = offsetof(struct sccp_data_ext_unitdata_service, variable_data), + }; + + return _sccp_parse_unitdata(msgb, result, &offsets); +} + static int _sccp_parse_it(struct msgb *msgb, struct sccp_parse_result *result) { static const uint32_t header_size = sizeof(struct sccp_data_it); @@ -1490,9 +1514,15 @@ case SCCP_MSG_TYPE_UDT: return _sccp_parse_udt(msg, result); break; + case SCCP_MSG_TYPE_UDTS: + return _sccp_parse_udts(msg, result); + break; case SCCP_MSG_TYPE_XUDT: return _sccp_parse_xudt(msg, result); break; + case SCCP_MSG_TYPE_XUDTS: + return _sccp_parse_xudts(msg, result); + break; case SCCP_MSG_TYPE_IT: return _sccp_parse_it(msg, result); break; -- To view, visit https://gerrit.osmocom.org/13839 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id0a3a291d8bad3f8c9621e6c97d4ea0b8bbe6035 Gerrit-Change-Number: 13839 Gerrit-PatchSet: 1 Gerrit-Owner: Holger Freyther -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 23:23:02 2019 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 1 May 2019 23:23:02 +0000 Subject: Change in openbsc[master]: bsc_nat: Fix crash (double-free) in forward_sccp_to_msc In-Reply-To: References: Message-ID: Holger Freyther has posted comments on this change. ( https://gerrit.osmocom.org/13837 ) Change subject: bsc_nat: Fix crash (double-free) in forward_sccp_to_msc ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/13837/1/openbsc/src/osmo-bsc_nat/bsc_nat.c File openbsc/src/osmo-bsc_nat/bsc_nat.c: https://gerrit.osmocom.org/#/c/13837/1/openbsc/src/osmo-bsc_nat/bsc_nat.c at 1284 PS1, Line 1284: What happens if we change the order of the two calls? Also maybe attaching the parsed state to the msgb context wasn't a good idea? I was worried about accidental leaks. -- To view, visit https://gerrit.osmocom.org/13837 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I209d3e2d809a67915ec43c874e68f7f746a565f0 Gerrit-Change-Number: 13837 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Holger Freyther Gerrit-Comment-Date: Wed, 01 May 2019 23:23:02 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 23:23:22 2019 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 1 May 2019 23:23:22 +0000 Subject: Change in osmo-gsm-tester[master]: ms_driver: Catch up with the new MS baseclass In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. ( https://gerrit.osmocom.org/13822 ) Change subject: ms_driver: Catch up with the new MS baseclass ...................................................................... ms_driver: Catch up with the new MS baseclass Change-Id: Id8de8b3ee76b515c49e5ea52acaa326a2283b0e1 --- M src/osmo_ms_driver/__main__.py 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, but someone else must approve Pau Espin Pedrol: Looks good to me, approved diff --git a/src/osmo_ms_driver/__main__.py b/src/osmo_ms_driver/__main__.py index 24acd61..d753897 100644 --- a/src/osmo_ms_driver/__main__.py +++ b/src/osmo_ms_driver/__main__.py @@ -23,7 +23,7 @@ from .starter import BinaryOptions from .test_support import imsi_ki_gen from osmo_gsm_tester import log, util -from osmo_gsm_tester import ms +from osmo_gsm_tester import ms_osmo_mobile # System modules from datetime import timedelta @@ -97,7 +97,7 @@ 'ki': ki, 'auth_algo': 'comp128v1', } - test.subscriber_add(ms.MS("ms_%d" % i, conf)) + test.subscriber_add(ms_osmo_mobile.MSOsmoMobile("ms_%d" % i, conf)) atexit.register(test.stop_all) -- To view, visit https://gerrit.osmocom.org/13822 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id8de8b3ee76b515c49e5ea52acaa326a2283b0e1 Gerrit-Change-Number: 13822 Gerrit-PatchSet: 1 Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 1 23:23:37 2019 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 1 May 2019 23:23:37 +0000 Subject: Change in osmo-gsm-tester[master]: virtual: Separate starting virtphy/mobile from the test In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. ( https://gerrit.osmocom.org/13823 ) Change subject: virtual: Separate starting virtphy/mobile from the test ...................................................................... virtual: Separate starting virtphy/mobile from the test Move the starting code out of the Update Location "test". In the mid term we can have a SMS test run in addition to waiting the Update Location tests. A mass-test testcase will have a life-cycle of: * Creation * Configure (number of subscribers, probably all subs) * Pre-Start trigger (same as configure so it can be omitted) * Post-Start (all processes run) * Query if the test has completed The next step is an actual implementation to send SMS. Change-Id: Ie15f5123775d11dd44243b2741d047ed93f318f9 --- M src/osmo_gsm_tester/ms_driver.py M src/osmo_ms_driver/__main__.py M src/osmo_ms_driver/location_update_test.py 3 files changed, 114 insertions(+), 79 deletions(-) Approvals: Harald Welte: Looks good to me, but someone else must approve Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/ms_driver.py b/src/osmo_gsm_tester/ms_driver.py index 3cfcad6..329662a 100644 --- a/src/osmo_gsm_tester/ms_driver.py +++ b/src/osmo_gsm_tester/ms_driver.py @@ -20,7 +20,7 @@ from osmo_ms_driver.cdf import cdfs from osmo_ms_driver.event_server import EventServer from osmo_ms_driver.simple_loop import SimpleLoop -from osmo_ms_driver.location_update_test import MassUpdateLocationTest +from osmo_ms_driver.location_update_test import MassUpdateLocationTest, MobileTestStarter from osmo_ms_driver.starter import BinaryOptions import os.path @@ -92,14 +92,18 @@ self._ev_server = EventServer("ev_server", event_server_path) self._ev_server.listen(self._loop) + self._results = {} options = self.build_binary_options() - self._test_case = MassUpdateLocationTest("mass", options, self._cdf, - self._ev_server, - util.Dir(self.event_server_sk_tmp_dir), - suite_run=self._suite_run) + self._starter = MobileTestStarter("mass", options, self._cdf, + self._ev_server, + util.Dir(self.event_server_sk_tmp_dir), + self._results, suite_run=self._suite_run) + self._test_case = MassUpdateLocationTest("mass", self._ev_server, self._results) for sub in self._subscribers: - self._test_case.subscriber_add(sub) + self._starter.subscriber_add(sub) + + self._test_case.configure(len(self._subscribers)) self._configured = True def run_test(self): @@ -110,7 +114,8 @@ """ if not self._configured: self.configure() - self._test_case.run_test(self._loop, self._test_duration) + deadline = self._starter.start_all(self._loop, self._test_duration) + self._test_case.wait_for_test(self._loop, deadline) def print_stats(self): """ diff --git a/src/osmo_ms_driver/__main__.py b/src/osmo_ms_driver/__main__.py index d753897..642002f 100644 --- a/src/osmo_ms_driver/__main__.py +++ b/src/osmo_ms_driver/__main__.py @@ -18,7 +18,7 @@ # Local modules from .event_server import EventServer from .simple_loop import SimpleLoop -from .location_update_test import MassUpdateLocationTest +from .location_update_test import MassUpdateLocationTest, MobileTestStarter from .cdf import cdfs from .starter import BinaryOptions from .test_support import imsi_ki_gen @@ -86,7 +86,9 @@ # Just a single test for now. options = BinaryOptions("virtphy", "mobile", os.environ) - test = MassUpdateLocationTest("lu_test", options, cdf, ev_server, tmp_dir) + result = {} + starter = MobileTestStarter("lu_test", options, cdf, ev_server, tmp_dir, result) + test = MassUpdateLocationTest("lu_test", ev_server, result) # Add subscribers to the test. imsi_gen = imsi_ki_gen() @@ -97,12 +99,14 @@ 'ki': ki, 'auth_algo': 'comp128v1', } - test.subscriber_add(ms_osmo_mobile.MSOsmoMobile("ms_%d" % i, conf)) + starter.subscriber_add(ms_osmo_mobile.MSOsmoMobile("ms_%d" % i, conf)) + test.configure(args.num_ms) - atexit.register(test.stop_all) + atexit.register(starter.stop_all) # Run until everything has been launched - test.run_test(loop, timedelta(seconds=args.test_duration)) + deadline = starter.start_all(loop, timedelta(seconds=args.test_duration)) + test.wait_for_test(loop, deadline) # Print stats test.print_stats() diff --git a/src/osmo_ms_driver/location_update_test.py b/src/osmo_ms_driver/location_update_test.py index 29abf73..efb161e 100644 --- a/src/osmo_ms_driver/location_update_test.py +++ b/src/osmo_ms_driver/location_update_test.py @@ -24,6 +24,7 @@ from datetime import timedelta import collections +import json import time # Key used for the result dictionary @@ -58,6 +59,85 @@ "min_latency", "max_latency"]) class MassUpdateLocationTest(log.Origin): + def __init__(self, name, event_server, results): + super().__init__(log.C_RUN, name) + self._event_server = event_server + self._event_server.register(self.handle_msg) + self._results = results + + def configure(self, num_subscribers): + self._num_subscribers = num_subscribers + self._outstanding = num_subscribers + + def handle_msg(self, _data, addr, time): + data = json.loads(_data.decode()) + + if data['type'] == 'event': + if data['data']['lu_done'] == 1: + ms = self._results[data['ms']] + if not has_lu_time(ms): + self._outstanding = self._outstanding - 1 + set_lu_time(ms, time) + self.log("MS performed LU ", ms=ms, at=time, lu_delay=lu_delay(ms)) + + def all_completed(self): + return self._outstanding == 0 + + def wait_for_test(self, loop, deadline): + """Waits up to the absolute deadline for the test to complete.""" + while not self.all_completed(): + now_time = time.clock_gettime(time.CLOCK_MONOTONIC) + sleep_time = deadline - now_time + if sleep_time < 0: + break + loop.schedule_timeout(sleep_time) + loop.select() + + def find_min_max(self, results): + min_value = max_value = None + for result in results: + if min_value is None or lu_delay(result) < min_value: + min_value = lu_delay(result) + if max_value is None or lu_delay(result) > max_value: + max_value = lu_delay(result) + return min_value, max_value + + def get_result_values(self): + """ + Returns the raw result values of the test run in any order. + """ + return self._results.values() + + def get_stats(self): + """ + Returns a statistical summary of the test. + """ + attempted = self._num_subscribers + completed = attempted - self._outstanding + min_latency, max_latency = self.find_min_max(filter(lambda x: has_lu_time(x), self._results.values())) + return LUStats(attempted, completed, min_latency, max_latency) + + def print_stats(self): + stats = self.get_stats() + all_completed = stats.num_attempted == stats.num_completed + + self.log("Tests done", all_completed=all_completed, + min=stats.min_latency, max=stats.max_latency) + + def lus_less_than(self, acceptable_delay): + """ + Returns LUs that completed within the acceptable delay. + """ + res = [] + for result in self._results.values(): + if not has_lu_time(result): + continue + if timedelta(seconds=lu_delay(result)) >= acceptable_delay: + continue + res.append(result) + return res + +class MobileTestStarter(log.Origin): """ A test to launch a configurable amount of MS and make them execute a Location Updating Procedure. @@ -70,22 +150,23 @@ TEMPLATE_CFG = "osmo-mobile.cfg" def __init__(self, name, options, cdf_function, - event_server, tmp_dir, suite_run=None): + event_server, tmp_dir, results, suite_run=None): super().__init__(log.C_RUN, name) self._binary_options = options self._cdf = cdf_function self._suite_run = suite_run self._tmp_dir = tmp_dir + self._event_server = event_server + self._results = results self._unstarted = [] self._mobiles = [] self._phys = [] - self._results = {} - self._event_server = event_server - self._event_server.register(self.handle_msg) self._started = [] self._subscribers = [] + self._event_server.register(self.handle_msg) + def subscriber_add(self, subscriber): """ Adds a subscriber to the list of subscribers. @@ -179,28 +260,31 @@ return current_time + step_size, sleep_time - def run_test(self, loop, test_duration): + def start_all(self, loop, test_duration): + """ + Starts all processes according to the schedule set by the CDF. + """ self.prepare(loop) - to_complete_time = self._start_time + test_duration.total_seconds() + self._to_complete_time = self._start_time + test_duration.total_seconds() tick_time = self._start_time - while not self.all_completed(): + while len(self._unstarted) > 0: tick_time, sleep_time = self.step_once(loop, tick_time) now_time = time.clock_gettime(time.CLOCK_MONOTONIC) if sleep_time is None: - sleep_time = to_complete_time - now_time + sleep_time = self._to_complete_time - now_time if sleep_time < 0: break loop.schedule_timeout(sleep_time) loop.select() + return self._to_complete_time def stop_all(self): for launcher in self._started: launcher.terminate() def handle_msg(self, _data, addr, time): - import json data = json.loads(_data.decode()) if data['type'] == 'register': @@ -208,61 +292,3 @@ ms.set_start_time(time) launch_delay = ms.start_time() - ms.launch_time() self.log("MS start registered ", ms=ms, at=time, delay=launch_delay) - elif data['type'] == 'event': - if data['data']['lu_done'] == 1: - ms = self._results[data['ms']] - if not has_lu_time(ms): - self._outstanding = self._outstanding - 1 - set_lu_time(ms, time) - self.log("MS performed LU ", ms=ms, at=time, lu_delay=lu_delay(ms)) - else: - print(time, data) - raise Exception("Unknown event type..:" + _data.decode()) - - - def all_completed(self): - return self._outstanding == 0 - - def find_min_max(self, results): - min_value = max_value = None - for result in results: - if min_value is None or lu_delay(result) < min_value: - min_value = lu_delay(result) - if max_value is None or lu_delay(result) > max_value: - max_value = lu_delay(result) - return min_value, max_value - - def get_result_values(self): - """ - Returns the raw result values of the test run in any order. - """ - return self._results.values() - - def get_stats(self): - """ - Returns a statistical summary of the test. - """ - attempted = len(self._subscribers) - completed = attempted - self._outstanding - min_latency, max_latency = self.find_min_max(filter(lambda x: has_lu_time(x), self._results.values())) - return LUStats(attempted, completed, min_latency, max_latency) - - def print_stats(self): - stats = self.get_stats() - all_completed = stats.num_attempted == stats.num_completed - - self.log("Tests done", all_completed=all_completed, - min=stats.min_latency, max=stats.max_latency) - - def lus_less_than(self, acceptable_delay): - """ - Returns LUs that completed within the acceptable delay. - """ - res = [] - for result in self._results.values(): - if not has_lu_time(result): - continue - if timedelta(seconds=lu_delay(result)) >= acceptable_delay: - continue - res.append(result) - return res -- To view, visit https://gerrit.osmocom.org/13823 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie15f5123775d11dd44243b2741d047ed93f318f9 Gerrit-Change-Number: 13823 Gerrit-PatchSet: 1 Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 08:07:04 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 2 May 2019 08:07:04 +0000 Subject: Change in osmo-ci[master]: update-osmo-ci: disable admin2-deb{8, 9}build In-Reply-To: References: Message-ID: osmith has abandoned this change. ( https://gerrit.osmocom.org/13820 ) Change subject: update-osmo-ci: disable admin2-deb{8,9}build ...................................................................... Abandoned Not needed anymore, hosts are back online. -- To view, visit https://gerrit.osmocom.org/13820 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: Ic062cafd58f77d40042c9b467814257576c23027 Gerrit-Change-Number: 13820 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 09:01:34 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 May 2019 09:01:34 +0000 Subject: Change in openbsc[master]: bsc_nat: Fix crash (double-free) in forward_sccp_to_msc In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13837 ) Change subject: bsc_nat: Fix crash (double-free) in forward_sccp_to_msc ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/13837/1/openbsc/src/osmo-bsc_nat/bsc_nat.c File openbsc/src/osmo-bsc_nat/bsc_nat.c: https://gerrit.osmocom.org/#/c/13837/1/openbsc/src/osmo-bsc_nat/bsc_nat.c at 1284 PS1, Line 1284: > What happens if we change the order of the two calls? [?] Which two calls do you mean? talloc_free(parsed) and queue_for_msc()? Good point, that would work too and it'd be more simple, I'll change the commit. I'll still leave the return type in queue_for_msc since it can be helpful for later. Regarding parsed allocation, I think the best would actually be simplifying the code by having parsed allocated in the stack and have """int bsc_nat_parse(struct msgb *msg, struct bsc_nat_parsed *parsed)""" instead of """struct bsc_nat_parsed *bsc_nat_parse(struct msgb *msg)""" I can submit a commit as a follow-up to this one doing so. -- To view, visit https://gerrit.osmocom.org/13837 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I209d3e2d809a67915ec43c874e68f7f746a565f0 Gerrit-Change-Number: 13837 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Holger Freyther Gerrit-Comment-Date: Thu, 02 May 2019 09:01:34 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 09:15:48 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 May 2019 09:15:48 +0000 Subject: Change in openbsc[master]: bsc_nat: Fix crash (double-free) in forward_sccp_to_msc In-Reply-To: References: Message-ID: Hello Daniel Willmann, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13837 to look at the new patch set (#2). Change subject: bsc_nat: Fix crash (double-free) in forward_sccp_to_msc ...................................................................... bsc_nat: Fix crash (double-free) in forward_sccp_to_msc In bsc_nat_parse(), parsed is allocated this way: """parsed = talloc_zero(msg, struct bsc_nat_parsed);""" So parsed is a child of msg, and so it's freed when msg is freed. Since libosmocore c7f52c4c84d6a8898048738c4db9266289c40b45, osmo_wqueue_enqueue() correctly detects queue full and returns an error, and then queue_for_msc() calls msgb_free(). Code in osmo-bsc-nat was probably written before that change in behavior, so that's why probably the bug was not hit before. The "if (parsed)" condition is removed since it's actually fine to talloc_free(NULL). Related: SYS#4548 Change-Id: I209d3e2d809a67915ec43c874e68f7f746a565f0 --- M openbsc/src/osmo-bsc_nat/bsc_nat.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/37/13837/2 -- To view, visit https://gerrit.osmocom.org/13837 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I209d3e2d809a67915ec43c874e68f7f746a565f0 Gerrit-Change-Number: 13837 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Holger Freyther -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 09:15:49 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 May 2019 09:15:49 +0000 Subject: Change in openbsc[master]: nat: Return error code in queue_for_msc Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13840 Change subject: nat: Return error code in queue_for_msc ...................................................................... nat: Return error code in queue_for_msc Might be useful in the future for its callers, since sometimes actions need to be taken place based on whether enqueuing failed (and msg was freed). Change-Id: I9f172f9c9ca9db18f6adcf9267db23c73e9d5bc6 --- M openbsc/src/osmo-bsc_nat/bsc_nat.c 1 file changed, 8 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/40/13840/1 diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c index 670b0be..c97483a 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c @@ -108,19 +108,23 @@ return NULL; } -static void queue_for_msc(struct bsc_msc_connection *con, struct msgb *msg) +static int queue_for_msc(struct bsc_msc_connection *con, struct msgb *msg) { + int rc; if (!con) { LOGP(DLINP, LOGL_ERROR, "No MSC Connection assigned. Check your code.\n"); msgb_free(msg); - return; + return -EINVAL; } - - if (osmo_wqueue_enqueue(&con->write_queue, msg) != 0) { + rc = osmo_wqueue_enqueue(&con->write_queue, msg); + if (rc != 0) { LOGP(DLINP, LOGL_ERROR, "Failed to enqueue the write.\n"); msgb_free(msg); + return rc; } + + return 0; } static void send_reset_ack(struct bsc_connection *bsc) -- To view, visit https://gerrit.osmocom.org/13840 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I9f172f9c9ca9db18f6adcf9267db23c73e9d5bc6 Gerrit-Change-Number: 13840 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 09:36:17 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 09:36:17 +0000 Subject: Change in osmo-ttcn3-hacks[master]: LLC_Templates: Add XID related templates Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13841 Change subject: LLC_Templates: Add XID related templates ...................................................................... LLC_Templates: Add XID related templates Change-Id: I383e8761f91fac18625a442088e865ad6a9b472b --- M library/LLC_Templates.ttcn 1 file changed, 96 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/41/13841/1 diff --git a/library/LLC_Templates.ttcn b/library/LLC_Templates.ttcn index b1cdb75..b71bce1 100644 --- a/library/LLC_Templates.ttcn +++ b/library/LLC_Templates.ttcn @@ -84,6 +84,37 @@ fCS := '000000'O /* provided by decoder if FCS OK */ } } +template PDU_LLC tr_LLC_XID_MO_CMD(template XID_Information xid, template BIT4 sapi) := + tr_LLC_XID(xid, sapi, LLC_CR_UL_CMD, '1'B); +template PDU_LLC tr_LLC_XID_MO_RSP(template XID_Information xid, template BIT4 sapi) := + tr_LLC_XID(xid, sapi, LLC_CR_UL_RSP, '1'B); +template PDU_LLC tr_LLC_XID_MT_CMD(template XID_Information xid, template BIT4 sapi) := + tr_LLC_XID(xid, sapi, LLC_CR_DL_CMD, '1'B); +template PDU_LLC tr_LLC_XID_MT_RSP(template XID_Information xid, template BIT4 sapi) := + tr_LLC_XID(xid, sapi, LLC_CR_DL_RSP, '1'B); +template (value) PDU_LLC ts_LLC_XID(template (value) XID_Information xid, + template (value) BIT4 sapi, + template (value) BIT1 cr, + template (value) BIT1 p_f) := { + pDU_LLC_U := { + address_field := ts_LLC_Addr(sapi, cr), + control_field := ts_LLC_CtrlU('1011'B, p_f), + information_field_U := { + xID := xid + }, + fCS := omit /* causes encoder to generate FCS */ + } +} + +template (value) PDU_LLC ts_LLC_XID_MO_CMD(template (value) XID_Information xid, template (value) BIT4 sapi) := + ts_LLC_XID(xid, sapi, LLC_CR_UL_CMD, '1'B); +template (value) PDU_LLC ts_LLC_XID_MO_RSP(template (value) XID_Information xid, template (value) BIT4 sapi) := + ts_LLC_XID(xid, sapi, LLC_CR_UL_RSP, '1'B); +template (value) PDU_LLC ts_LLC_XID_MT_CMD(template (value) XID_Information xid, template (value) BIT4 sapi) := + ts_LLC_XID(xid, sapi, LLC_CR_DL_CMD, '1'B); +template (value) PDU_LLC ts_LLC_XID_MT_RSP(template (value) XID_Information xid, template (value) BIT4 sapi) := + ts_LLC_XID(xid, sapi, LLC_CR_DL_RSP, '1'B); + template PDU_LLC tr_LLC_U(template BIT4 m_bits, template BIT1 p_f, template Information_field_U u, template BIT4 sapi, template BIT1 cr) := { @@ -173,4 +204,69 @@ ); +template XID tr_XID(template XID_Data xd := ?) := { + xl := ?, + typefield := ?, + xID_length := ?, + xID_Data := xd +}; +template (value) XID ts_XID(template (value) BIT5 tf, template (value) XID_Data xd) := { + xl := '0'B, + typefield := tf, + xID_length := { + short_len := 0 + }, + xID_Data := xd +}; + +template XID tr_XID_kU(template uint8_t ku) := tr_XID({kU := ku}); +template (value) XID ts_XID_kU(template (value) uint8_t ku) := ts_XID('01010'B, {kU := ku}); + +template XID tr_XID_kD(template uint8_t kd) := tr_XID({kD := kd}); +template (value) XID ts_XID_kD(template (value) uint8_t kd) := ts_XID('01001'B, {kD := kd}); + +template XID tr_XID_mD(template uint15_t md) := tr_XID({mD := {spare := '0'B, mDValue := md}}); +template (value) XID ts_XID_mD(template (value) uint15_t md) := ts_XID('00111'B, {mD := { spare := '0'B, mDValue := md}}); + +template XID tr_XID_mU(template uint15_t mu) := tr_XID({mU := {spare := '0'B, mUValue := mu}}); +template (value) XID ts_XID_mU(template (value) uint15_t mu) := ts_XID('01000'B, {mU := { spare := '0'B, mUValue := mu}}); + +template XID tr_XID_N201I(template uint11_t n201i) := + tr_XID({n201_I := {spare := '00000'B, n201IValue := n201i}}); +template (value) XID ts_XID_N201I(template (value) uint11_t n201i) := + ts_XID('00110'B, {n201_I := { spare := '00000'B, n201IValue := n201i}}); + +template XID tr_XID_N201U(template uint11_t n201u) := + tr_XID({n201_U := {spare := '00000'B, n201UValue := n201u}}); +template (value) XID ts_XID_N201U(template (value) uint11_t n201u) := + ts_XID('00101'B, {n201_U := { spare := '00000'B, n201UValue := n201u}}); + +template XID tr_XID_N200(template uint4_t n200) := + tr_XID({n200 := { retransmissions := n200, spare := '0000'B}}); +template (value) XID ts_XID_N200(template (value) uint4_t n200) := + ts_XID('00100'B, {n200 := { retransmissions := n200, spare := '0000'B}}); + +template XID tr_XID_T200(template uint12_t t200) := + tr_XID({t200 := { spare := '0000'B, t200Value := t200}}); +template (value) XID ts_XID_T200(template (value) uint12_t t200) := + ts_XID('00011'B, {t200 := { spare := '0000'B, t200Value := t200}}); + +template XID tr_XID_version(template uint4_t v) := + tr_XID({version := {version_value := v, spare := '0000'B}}); +template (value) XID ts_XID_version(template (value) uint4_t v) := + ts_XID('00000'B, {version := {version_value := v, spare := '0000'B}}); + +template XID tr_XID_IOV_UI(template OCT4 iov) := tr_XID({iOV_UI := iov}); +template (value) XID ts_XID_IOV_UI(template (value) OCT4 iov) := ts_XID('00001'B, {iOV_UI := iov}); + +template XID tr_XID_IOV_I(template OCT4 iov) := tr_XID({iOV_I := iov}); +template (value) XID ts_XID_IOV_I(template (value) OCT4 iov) := ts_XID('00010'B, {iOV_I := iov}); + +template XID tr_XID_L3(template octetstring l3) := tr_XID({l3param := l3}); +template (value) XID ts_XID_L3(template (value) octetstring l3) := ts_XID('01011'B, {l3param := l3}); + +template XID tr_XID_RESET := tr_XID({reset := ''O}); +template (value) XID ts_XID_RESET := ts_XID('01100'B, {reset := ''O}); + + } -- To view, visit https://gerrit.osmocom.org/13841 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I383e8761f91fac18625a442088e865ad6a9b472b Gerrit-Change-Number: 13841 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 09:36:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 09:36:19 +0000 Subject: Change in osmo-ttcn3-hacks[master]: sgsn: Add initial XID handshake related tests Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13842 Change subject: sgsn: Add initial XID handshake related tests ...................................................................... sgsn: Add initial XID handshake related tests Change-Id: I5d4b3cba2fe05dffe10c843f16cfec343bc67b5f --- M sgsn/SGSN_Tests.ttcn 1 file changed, 61 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/42/13842/1 diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index 889a16f..9399e66 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -1180,7 +1180,7 @@ } private altstep as_xid(PdpActPars apars) runs on BSSGP_ConnHdlr { - [] BSSGP[0].receive(tr_BD_LLC(tr_LLC_XID(?, apars.sapi))) { + [] BSSGP[0].receive(tr_BD_LLC(tr_LLC_XID_MT_CMD(?, apars.sapi))) { repeat; } } @@ -2206,6 +2206,63 @@ vc_conn.done; } +/* test XID handshake with empty L3 info: expect empty return (some phones require that, OS#3426 */ +private function f_TC_xid_empty_l3(charstring id) runs on BSSGP_ConnHdlr { + var PdpActPars apars := valueof(t_PdpActPars(mp_ggsn_ip)); + var template (value) XID_Information xid; + var template XID_Information xid_rx; + + /* first perform regular attach */ + f_TC_attach(id); + /* then activate PDP context */ + f_pdp_ctx_act(apars); + + /* start MO XID */ + xid := { ts_XID_L3(''O) }; + xid_rx := { tr_XID_L3(''O) }; + f_send_llc(ts_LLC_XID_MO_CMD(xid, apars.sapi)); + alt { + [] BSSGP[0].receive(tr_BD_LLC(tr_LLC_XID(xid_rx, apars.sapi))); + [] as_xid(apars); + } + setverdict(pass); +} +testcase TC_xid_empty_l3() runs on test_CT { + var BSSGP_ConnHdlr vc_conn; + f_init(); + f_sleep(1.0); + vc_conn := f_start_handler(refers(f_TC_xid_empty_l3), testcasename(), g_gb, 44); + vc_conn.done; +} + +private function f_TC_xid_n201u(charstring id) runs on BSSGP_ConnHdlr { + var PdpActPars apars := valueof(t_PdpActPars(mp_ggsn_ip)); + var template (value) XID_Information xid; + var template XID_Information xid_rx; + + /* first perform regular attach */ + f_TC_attach(id); + /* then activate PDP context */ + f_pdp_ctx_act(apars); + + /* start MO XID */ + xid := { ts_XID_N201U(1234) }; + xid_rx := { tr_XID_N201U(1234) }; + f_send_llc(ts_LLC_XID_MO_CMD(xid, apars.sapi)); + alt { + [] BSSGP[0].receive(tr_BD_LLC(tr_LLC_XID_MT_RSP(xid_rx, apars.sapi))); + [] as_xid(apars); + } + setverdict(pass); +} +testcase TC_xid_n201u() runs on test_CT { + var BSSGP_ConnHdlr vc_conn; + f_init(); + f_sleep(1.0); + vc_conn := f_start_handler(refers(f_TC_xid_n201u), testcasename(), g_gb, 45); + vc_conn.done; +} + control { @@ -2253,6 +2310,9 @@ execute( TC_attach_pdp_act_user_error_ind_ggsn() ); execute( TC_attach_gmm_attach_req_while_gmm_attach() ); + execute( TC_xid_empty_l3() ); + execute( TC_xid_n201u() ); + execute( TC_llc_null() ); execute( TC_llc_sabm_dm_llgmm() ); execute( TC_llc_sabm_dm_ll5() ); -- To view, visit https://gerrit.osmocom.org/13842 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I5d4b3cba2fe05dffe10c843f16cfec343bc67b5f Gerrit-Change-Number: 13842 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 09:36:42 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 09:36:42 +0000 Subject: Change in osmo-sgsn[master]: Echo zero byte XID-Field of Type L3_PAR In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13811 ) Change subject: Echo zero byte XID-Field of Type L3_PAR ...................................................................... Patch Set 7: Verified+1 Code-Review+2 I just verified this patch using the newly-created test in https://gerrit.osmocom.org/#/c/osmo-ttcn3-hacks/+/13842 -- To view, visit https://gerrit.osmocom.org/13811 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibd75f7b943c84ed7264481fa2e4bc3cb2f6745d4 Gerrit-Change-Number: 13811 Gerrit-PatchSet: 7 Gerrit-Owner: Keith Whyte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Keith Whyte Gerrit-Reviewer: lynxis lazus Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Thu, 02 May 2019 09:36:42 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 09:38:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 09:38:05 +0000 Subject: Change in osmo-ttcn3-hacks[master]: LLC_Templates: Add XID related templates In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13841 ) Change subject: LLC_Templates: Add XID related templates ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13841 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I383e8761f91fac18625a442088e865ad6a9b472b Gerrit-Change-Number: 13841 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 02 May 2019 09:38:05 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 09:38:21 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 09:38:21 +0000 Subject: Change in osmo-ttcn3-hacks[master]: sgsn: Add initial XID handshake related tests In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13842 ) Change subject: sgsn: Add initial XID handshake related tests ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13842 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5d4b3cba2fe05dffe10c843f16cfec343bc67b5f Gerrit-Change-Number: 13842 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 02 May 2019 09:38:21 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 09:38:23 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 09:38:23 +0000 Subject: Change in osmo-ttcn3-hacks[master]: LLC_Templates: Add XID related templates In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13841 ) Change subject: LLC_Templates: Add XID related templates ...................................................................... LLC_Templates: Add XID related templates Change-Id: I383e8761f91fac18625a442088e865ad6a9b472b --- M library/LLC_Templates.ttcn 1 file changed, 96 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/library/LLC_Templates.ttcn b/library/LLC_Templates.ttcn index b1cdb75..b71bce1 100644 --- a/library/LLC_Templates.ttcn +++ b/library/LLC_Templates.ttcn @@ -84,6 +84,37 @@ fCS := '000000'O /* provided by decoder if FCS OK */ } } +template PDU_LLC tr_LLC_XID_MO_CMD(template XID_Information xid, template BIT4 sapi) := + tr_LLC_XID(xid, sapi, LLC_CR_UL_CMD, '1'B); +template PDU_LLC tr_LLC_XID_MO_RSP(template XID_Information xid, template BIT4 sapi) := + tr_LLC_XID(xid, sapi, LLC_CR_UL_RSP, '1'B); +template PDU_LLC tr_LLC_XID_MT_CMD(template XID_Information xid, template BIT4 sapi) := + tr_LLC_XID(xid, sapi, LLC_CR_DL_CMD, '1'B); +template PDU_LLC tr_LLC_XID_MT_RSP(template XID_Information xid, template BIT4 sapi) := + tr_LLC_XID(xid, sapi, LLC_CR_DL_RSP, '1'B); +template (value) PDU_LLC ts_LLC_XID(template (value) XID_Information xid, + template (value) BIT4 sapi, + template (value) BIT1 cr, + template (value) BIT1 p_f) := { + pDU_LLC_U := { + address_field := ts_LLC_Addr(sapi, cr), + control_field := ts_LLC_CtrlU('1011'B, p_f), + information_field_U := { + xID := xid + }, + fCS := omit /* causes encoder to generate FCS */ + } +} + +template (value) PDU_LLC ts_LLC_XID_MO_CMD(template (value) XID_Information xid, template (value) BIT4 sapi) := + ts_LLC_XID(xid, sapi, LLC_CR_UL_CMD, '1'B); +template (value) PDU_LLC ts_LLC_XID_MO_RSP(template (value) XID_Information xid, template (value) BIT4 sapi) := + ts_LLC_XID(xid, sapi, LLC_CR_UL_RSP, '1'B); +template (value) PDU_LLC ts_LLC_XID_MT_CMD(template (value) XID_Information xid, template (value) BIT4 sapi) := + ts_LLC_XID(xid, sapi, LLC_CR_DL_CMD, '1'B); +template (value) PDU_LLC ts_LLC_XID_MT_RSP(template (value) XID_Information xid, template (value) BIT4 sapi) := + ts_LLC_XID(xid, sapi, LLC_CR_DL_RSP, '1'B); + template PDU_LLC tr_LLC_U(template BIT4 m_bits, template BIT1 p_f, template Information_field_U u, template BIT4 sapi, template BIT1 cr) := { @@ -173,4 +204,69 @@ ); +template XID tr_XID(template XID_Data xd := ?) := { + xl := ?, + typefield := ?, + xID_length := ?, + xID_Data := xd +}; +template (value) XID ts_XID(template (value) BIT5 tf, template (value) XID_Data xd) := { + xl := '0'B, + typefield := tf, + xID_length := { + short_len := 0 + }, + xID_Data := xd +}; + +template XID tr_XID_kU(template uint8_t ku) := tr_XID({kU := ku}); +template (value) XID ts_XID_kU(template (value) uint8_t ku) := ts_XID('01010'B, {kU := ku}); + +template XID tr_XID_kD(template uint8_t kd) := tr_XID({kD := kd}); +template (value) XID ts_XID_kD(template (value) uint8_t kd) := ts_XID('01001'B, {kD := kd}); + +template XID tr_XID_mD(template uint15_t md) := tr_XID({mD := {spare := '0'B, mDValue := md}}); +template (value) XID ts_XID_mD(template (value) uint15_t md) := ts_XID('00111'B, {mD := { spare := '0'B, mDValue := md}}); + +template XID tr_XID_mU(template uint15_t mu) := tr_XID({mU := {spare := '0'B, mUValue := mu}}); +template (value) XID ts_XID_mU(template (value) uint15_t mu) := ts_XID('01000'B, {mU := { spare := '0'B, mUValue := mu}}); + +template XID tr_XID_N201I(template uint11_t n201i) := + tr_XID({n201_I := {spare := '00000'B, n201IValue := n201i}}); +template (value) XID ts_XID_N201I(template (value) uint11_t n201i) := + ts_XID('00110'B, {n201_I := { spare := '00000'B, n201IValue := n201i}}); + +template XID tr_XID_N201U(template uint11_t n201u) := + tr_XID({n201_U := {spare := '00000'B, n201UValue := n201u}}); +template (value) XID ts_XID_N201U(template (value) uint11_t n201u) := + ts_XID('00101'B, {n201_U := { spare := '00000'B, n201UValue := n201u}}); + +template XID tr_XID_N200(template uint4_t n200) := + tr_XID({n200 := { retransmissions := n200, spare := '0000'B}}); +template (value) XID ts_XID_N200(template (value) uint4_t n200) := + ts_XID('00100'B, {n200 := { retransmissions := n200, spare := '0000'B}}); + +template XID tr_XID_T200(template uint12_t t200) := + tr_XID({t200 := { spare := '0000'B, t200Value := t200}}); +template (value) XID ts_XID_T200(template (value) uint12_t t200) := + ts_XID('00011'B, {t200 := { spare := '0000'B, t200Value := t200}}); + +template XID tr_XID_version(template uint4_t v) := + tr_XID({version := {version_value := v, spare := '0000'B}}); +template (value) XID ts_XID_version(template (value) uint4_t v) := + ts_XID('00000'B, {version := {version_value := v, spare := '0000'B}}); + +template XID tr_XID_IOV_UI(template OCT4 iov) := tr_XID({iOV_UI := iov}); +template (value) XID ts_XID_IOV_UI(template (value) OCT4 iov) := ts_XID('00001'B, {iOV_UI := iov}); + +template XID tr_XID_IOV_I(template OCT4 iov) := tr_XID({iOV_I := iov}); +template (value) XID ts_XID_IOV_I(template (value) OCT4 iov) := ts_XID('00010'B, {iOV_I := iov}); + +template XID tr_XID_L3(template octetstring l3) := tr_XID({l3param := l3}); +template (value) XID ts_XID_L3(template (value) octetstring l3) := ts_XID('01011'B, {l3param := l3}); + +template XID tr_XID_RESET := tr_XID({reset := ''O}); +template (value) XID ts_XID_RESET := ts_XID('01100'B, {reset := ''O}); + + } -- To view, visit https://gerrit.osmocom.org/13841 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I383e8761f91fac18625a442088e865ad6a9b472b Gerrit-Change-Number: 13841 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 09:38:23 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 09:38:23 +0000 Subject: Change in osmo-ttcn3-hacks[master]: sgsn: Add initial XID handshake related tests In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13842 ) Change subject: sgsn: Add initial XID handshake related tests ...................................................................... sgsn: Add initial XID handshake related tests Change-Id: I5d4b3cba2fe05dffe10c843f16cfec343bc67b5f --- M sgsn/SGSN_Tests.ttcn 1 file changed, 61 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index 889a16f..9399e66 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -1180,7 +1180,7 @@ } private altstep as_xid(PdpActPars apars) runs on BSSGP_ConnHdlr { - [] BSSGP[0].receive(tr_BD_LLC(tr_LLC_XID(?, apars.sapi))) { + [] BSSGP[0].receive(tr_BD_LLC(tr_LLC_XID_MT_CMD(?, apars.sapi))) { repeat; } } @@ -2206,6 +2206,63 @@ vc_conn.done; } +/* test XID handshake with empty L3 info: expect empty return (some phones require that, OS#3426 */ +private function f_TC_xid_empty_l3(charstring id) runs on BSSGP_ConnHdlr { + var PdpActPars apars := valueof(t_PdpActPars(mp_ggsn_ip)); + var template (value) XID_Information xid; + var template XID_Information xid_rx; + + /* first perform regular attach */ + f_TC_attach(id); + /* then activate PDP context */ + f_pdp_ctx_act(apars); + + /* start MO XID */ + xid := { ts_XID_L3(''O) }; + xid_rx := { tr_XID_L3(''O) }; + f_send_llc(ts_LLC_XID_MO_CMD(xid, apars.sapi)); + alt { + [] BSSGP[0].receive(tr_BD_LLC(tr_LLC_XID(xid_rx, apars.sapi))); + [] as_xid(apars); + } + setverdict(pass); +} +testcase TC_xid_empty_l3() runs on test_CT { + var BSSGP_ConnHdlr vc_conn; + f_init(); + f_sleep(1.0); + vc_conn := f_start_handler(refers(f_TC_xid_empty_l3), testcasename(), g_gb, 44); + vc_conn.done; +} + +private function f_TC_xid_n201u(charstring id) runs on BSSGP_ConnHdlr { + var PdpActPars apars := valueof(t_PdpActPars(mp_ggsn_ip)); + var template (value) XID_Information xid; + var template XID_Information xid_rx; + + /* first perform regular attach */ + f_TC_attach(id); + /* then activate PDP context */ + f_pdp_ctx_act(apars); + + /* start MO XID */ + xid := { ts_XID_N201U(1234) }; + xid_rx := { tr_XID_N201U(1234) }; + f_send_llc(ts_LLC_XID_MO_CMD(xid, apars.sapi)); + alt { + [] BSSGP[0].receive(tr_BD_LLC(tr_LLC_XID_MT_RSP(xid_rx, apars.sapi))); + [] as_xid(apars); + } + setverdict(pass); +} +testcase TC_xid_n201u() runs on test_CT { + var BSSGP_ConnHdlr vc_conn; + f_init(); + f_sleep(1.0); + vc_conn := f_start_handler(refers(f_TC_xid_n201u), testcasename(), g_gb, 45); + vc_conn.done; +} + control { @@ -2253,6 +2310,9 @@ execute( TC_attach_pdp_act_user_error_ind_ggsn() ); execute( TC_attach_gmm_attach_req_while_gmm_attach() ); + execute( TC_xid_empty_l3() ); + execute( TC_xid_n201u() ); + execute( TC_llc_null() ); execute( TC_llc_sabm_dm_llgmm() ); execute( TC_llc_sabm_dm_ll5() ); -- To view, visit https://gerrit.osmocom.org/13842 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I5d4b3cba2fe05dffe10c843f16cfec343bc67b5f Gerrit-Change-Number: 13842 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 09:38:29 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 09:38:29 +0000 Subject: Change in osmo-sgsn[master]: Echo zero byte XID-Field of Type L3_PAR In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13811 ) Change subject: Echo zero byte XID-Field of Type L3_PAR ...................................................................... Echo zero byte XID-Field of Type L3_PAR After Activate PDP Context request, Motorola KRZR sends a zero length XID-Field of Type L3 Parameters If this is not echoed back, the phone will send Deactivate PDP Context request with SM Cause: LLC or SNDCP failure(A/Gb only) (25) Closes: OS#3426 Change-Id: Ibd75f7b943c84ed7264481fa2e4bc3cb2f6745d4 --- M src/gprs/gprs_sndcp.c 1 file changed, 8 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified Keith Whyte: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/gprs/gprs_sndcp.c b/src/gprs/gprs_sndcp.c index 23d1e9a..d9aa1e5 100644 --- a/src/gprs/gprs_sndcp.c +++ b/src/gprs/gprs_sndcp.c @@ -1120,6 +1120,14 @@ OSMO_ASSERT(xid_field_response); OSMO_ASSERT(lle); + /* Some phones send zero byte length SNDCP frames + * and do require a confirmation response. */ + if (xid_field_indication->data_len == 0) { + xid_field_response->type = GPRS_LLC_XID_T_L3_PAR; + xid_field_response->data_len = 0; + return 0; + } + /* Parse SNDCP-CID XID-Field */ comp_fields = gprs_sndcp_parse_xid(&version, lle->llme, xid_field_indication->data, -- To view, visit https://gerrit.osmocom.org/13811 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ibd75f7b943c84ed7264481fa2e4bc3cb2f6745d4 Gerrit-Change-Number: 13811 Gerrit-PatchSet: 8 Gerrit-Owner: Keith Whyte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Keith Whyte Gerrit-Reviewer: lynxis lazus Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 09:38:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 09:38:53 +0000 Subject: Change in openbsc[master]: bsc_filter.c: Return NULL instead of zero in bsc_nat_parse In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13836 ) Change subject: bsc_filter.c: Return NULL instead of zero in bsc_nat_parse ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13836 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I7a0ca6067bb1708d4aec28f9de166ac7874f8e91 Gerrit-Change-Number: 13836 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 02 May 2019 09:38:53 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 09:39:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 09:39:08 +0000 Subject: Change in openbsc[master]: nat: Return error code in queue_for_msc In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13840 ) Change subject: nat: Return error code in queue_for_msc ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13840 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9f172f9c9ca9db18f6adcf9267db23c73e9d5bc6 Gerrit-Change-Number: 13840 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 02 May 2019 09:39:08 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 09:40:58 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 09:40:58 +0000 Subject: Change in libosmo-sccp[master]: xudt: Implement address and data extraction In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13838 ) Change subject: xudt: Implement address and data extraction ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13838 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I45a7447cc1be432fff34849e0e35abc0410cf153 Gerrit-Change-Number: 13838 Gerrit-PatchSet: 1 Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 02 May 2019 09:40:58 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 09:41:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 09:41:18 +0000 Subject: Change in libosmo-sccp[master]: udts/xudts: Attempt to implement unitdata service parsing In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13839 ) Change subject: udts/xudts: Attempt to implement unitdata service parsing ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13839 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id0a3a291d8bad3f8c9621e6c97d4ea0b8bbe6035 Gerrit-Change-Number: 13839 Gerrit-PatchSet: 1 Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 02 May 2019 09:41:18 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 09:41:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 09:41:33 +0000 Subject: Change in openbsc[master]: bsc_nat: Fix crash (double-free) in forward_sccp_to_msc In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13837 ) Change subject: bsc_nat: Fix crash (double-free) in forward_sccp_to_msc ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13837 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I209d3e2d809a67915ec43c874e68f7f746a565f0 Gerrit-Change-Number: 13837 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Holger Freyther Gerrit-Comment-Date: Thu, 02 May 2019 09:41:33 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 10:01:07 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 May 2019 10:01:07 +0000 Subject: Change in openbsc[master]: nat: Fix crash (double-free) in forward_sccp_to_msc In-Reply-To: References: Message-ID: Hello Daniel Willmann, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13837 to look at the new patch set (#3). Change subject: nat: Fix crash (double-free) in forward_sccp_to_msc ...................................................................... nat: Fix crash (double-free) in forward_sccp_to_msc In bsc_nat_parse(), parsed is allocated this way: """parsed = talloc_zero(msg, struct bsc_nat_parsed);""" So parsed is a child of msg, and so it's freed when msg is freed. Since libosmocore c7f52c4c84d6a8898048738c4db9266289c40b45, osmo_wqueue_enqueue() correctly detects queue full and returns an error, and then queue_for_msc() calls msgb_free(). Code in osmo-bsc-nat was probably written before that change in behavior, so that's why probably the bug was not hit before. The "if (parsed)" condition is removed since it's actually fine to talloc_free(NULL). Related: SYS#4548 Change-Id: I209d3e2d809a67915ec43c874e68f7f746a565f0 --- M openbsc/src/osmo-bsc_nat/bsc_nat.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/37/13837/3 -- To view, visit https://gerrit.osmocom.org/13837 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I209d3e2d809a67915ec43c874e68f7f746a565f0 Gerrit-Change-Number: 13837 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Holger Freyther -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 10:01:08 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 May 2019 10:01:08 +0000 Subject: Change in openbsc[master]: nat: Allocate bsc_nat_parsed on the stack instead of heap Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13843 Change subject: nat: Allocate bsc_nat_parsed on the stack instead of heap ...................................................................... nat: Allocate bsc_nat_parsed on the stack instead of heap There's no real need to allocate it using talloc. Allocating it on the stack simplifies the code, avoids mem leaks and makes it faster. Change-Id: I66c44890952339f15131081e2f629a2824b6d3ba --- M openbsc/include/openbsc/bsc_nat.h M openbsc/src/osmo-bsc_nat/bsc_filter.c M openbsc/src/osmo-bsc_nat/bsc_nat.c M openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c M openbsc/src/osmo-bsc_nat/bsc_ussd.c M openbsc/tests/bsc-nat/bsc_nat_test.c 6 files changed, 129 insertions(+), 169 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/43/13843/1 diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h index 3eba70d..7d0e969 100644 --- a/openbsc/include/openbsc/bsc_nat.h +++ b/openbsc/include/openbsc/bsc_nat.h @@ -359,7 +359,7 @@ /** * parse the given message into the above structure */ -struct bsc_nat_parsed *bsc_nat_parse(struct msgb *msg); +int bsc_nat_parse(struct msgb *msg, struct bsc_nat_parsed *parsed); /** * filter based on IP Access header in both directions diff --git a/openbsc/src/osmo-bsc_nat/bsc_filter.c b/openbsc/src/osmo-bsc_nat/bsc_filter.c index 432529e..852156b 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_filter.c +++ b/openbsc/src/osmo-bsc_nat/bsc_filter.c @@ -72,19 +72,19 @@ { IPAC_PROTO_MGCP_OLD, ALLOW_ANY, ALLOW_ANY, ALLOW_ANY, FILTER_TO_BOTH }, }; -struct bsc_nat_parsed *bsc_nat_parse(struct msgb *msg) +int bsc_nat_parse(struct msgb *msg, struct bsc_nat_parsed *parsed) { struct sccp_parse_result result; - struct bsc_nat_parsed *parsed; struct ipaccess_head *hh; /* quick fail */ if (msg->len < 4) - return NULL; + return -1; - parsed = talloc_zero(msg, struct bsc_nat_parsed); if (!parsed) - return NULL; + return -1; + + memset(parsed, 0, sizeof(*parsed)); /* more init */ parsed->ipa_proto = parsed->called_ssn = parsed->calling_ssn = -1; @@ -99,22 +99,19 @@ /* do a size check on the input */ if (ntohs(hh->len) != msgb_l2len(msg)) { LOGP(DLINP, LOGL_ERROR, "Wrong input length?\n"); - talloc_free(parsed); - return NULL; + return -1; } /* analyze sccp down here */ if (parsed->ipa_proto == IPAC_PROTO_SCCP) { memset(&result, 0, sizeof(result)); if (sccp_parse_header(msg, &result) != 0) { - talloc_free(parsed); - return 0; + return -1; } if (msg->l3h && msgb_l3len(msg) < 3) { LOGP(DNAT, LOGL_ERROR, "Not enough space or GSM payload\n"); - talloc_free(parsed); - return 0; + return -1; } parsed->sccp_type = sccp_determine_msg_type(msg); @@ -132,7 +129,7 @@ } } - return parsed; + return 0; } /* Returns 0 if message is whitelisted (has to beforwarded by bsc-nat), 1 if diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c index 30e4b34..02496f6 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c @@ -696,24 +696,23 @@ { struct nat_sccp_connection *con = NULL; struct bsc_connection *bsc; - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; int proto; /* filter, drop, patch the message? */ - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { LOGP(DNAT, LOGL_ERROR, "Can not parse msg from BSC.\n"); return -1; } - if (bsc_nat_filter_ipa(DIR_BSC, msg, parsed)) + if (bsc_nat_filter_ipa(DIR_BSC, msg, &parsed)) goto exit; - proto = parsed->ipa_proto; + proto = parsed.ipa_proto; /* Route and modify the SCCP packet */ if (proto == IPAC_PROTO_SCCP) { - switch (parsed->sccp_type) { + switch (parsed.sccp_type) { case SCCP_MSG_TYPE_UDT: /* forward UDT messages to every BSC */ goto send_to_all; @@ -722,8 +721,8 @@ case SCCP_MSG_TYPE_CREF: case SCCP_MSG_TYPE_DT1: case SCCP_MSG_TYPE_IT: - con = patch_sccp_src_ref_to_bsc(msg, parsed, nat); - if (parsed->gsm_type == BSS_MAP_MSG_ASSIGMENT_RQST) { + con = patch_sccp_src_ref_to_bsc(msg, &parsed, nat); + if (parsed.gsm_type == BSS_MAP_MSG_ASSIGMENT_RQST) { osmo_counter_inc(nat->stats.sccp.calls); if (con) { @@ -735,14 +734,14 @@ } else LOGP(DNAT, LOGL_ERROR, "Assignment command but no BSC.\n"); } else if (con && con->con_local == NAT_CON_END_USSD && - parsed->gsm_type == BSS_MAP_MSG_CLEAR_CMD) { + parsed.gsm_type == BSS_MAP_MSG_CLEAR_CMD) { LOGP(DNAT, LOGL_NOTICE, "Clear Command for USSD Connection. Ignoring.\n"); con = NULL; } break; case SCCP_MSG_TYPE_CC: - con = patch_sccp_src_ref_to_bsc(msg, parsed, nat); - if (!con || update_sccp_src_ref(con, parsed) != 0) + con = patch_sccp_src_ref_to_bsc(msg, &parsed, nat); + if (!con || update_sccp_src_ref(con, &parsed) != 0) goto exit; break; case SCCP_MSG_TYPE_RLC: @@ -755,27 +754,24 @@ goto exit; } - if (!con && parsed->sccp_type == SCCP_MSG_TYPE_RLSD) { + if (!con && parsed.sccp_type == SCCP_MSG_TYPE_RLSD) { LOGP(DNAT, LOGL_NOTICE, "Sending fake RLC on RLSD message to network.\n"); /* Exchange src/dest for the reply */ - nat_send_rlc(msc_con, &parsed->original_dest_ref, - parsed->src_local_ref); + nat_send_rlc(msc_con, &parsed.original_dest_ref, + parsed.src_local_ref); } else if (!con) - LOGP(DNAT, LOGL_ERROR, "Unknown connection for msg type: 0x%x from the MSC.\n", parsed->sccp_type); + LOGP(DNAT, LOGL_ERROR, "Unknown connection for msg type: 0x%x from the MSC.\n", parsed.sccp_type); } - if (!con) { - talloc_free(parsed); + if (!con) return -1; - } + if (!con->bsc->authenticated) { - talloc_free(parsed); LOGP(DNAT, LOGL_ERROR, "Selected BSC not authenticated.\n"); return -1; } - update_con_authorize(con, parsed, msg); - talloc_free(parsed); + update_con_authorize(con, &parsed, msg); bsc_send_data(con->bsc, msg->l2h, msgb_l2len(msg), proto); return 0; @@ -786,7 +782,7 @@ * Command to every BSC in our network. We will analys the PAGING * message and then send it to the authenticated messages... */ - if (parsed->ipa_proto == IPAC_PROTO_SCCP && parsed->gsm_type == BSS_MAP_MSG_PAGING) { + if (parsed.ipa_proto == IPAC_PROTO_SCCP && parsed.gsm_type == BSS_MAP_MSG_PAGING) { bsc_nat_handle_paging(nat, msg); goto exit; } @@ -795,11 +791,10 @@ if (!bsc->authenticated) continue; - bsc_send_data(bsc, msg->l2h, msgb_l2len(msg), parsed->ipa_proto); + bsc_send_data(bsc, msg->l2h, msgb_l2len(msg), parsed.ipa_proto); } exit: - talloc_free(parsed); return 0; } @@ -1130,19 +1125,19 @@ struct bsc_msc_connection *con_msc = NULL; struct bsc_connection *con_bsc = NULL; int con_type; - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; struct bsc_filter_reject_cause cause; *bsc_conn_closed = false; /* Parse and filter messages */ - parsed = bsc_nat_parse(msg); - if (!parsed) { + bool parsed_ok = !!bsc_nat_parse(msg, &parsed); + if (!parsed_ok) { LOGP(DNAT, LOGL_ERROR, "Can not parse msg from BSC.\n"); msgb_free(msg); return -1; } - if (bsc_nat_filter_ipa(DIR_MSC, msg, parsed)) + if (bsc_nat_filter_ipa(DIR_MSC, msg, &parsed)) goto exit; /* @@ -1157,32 +1152,32 @@ /* modify the SCCP entries */ - if (parsed->ipa_proto == IPAC_PROTO_SCCP) { + if (parsed.ipa_proto == IPAC_PROTO_SCCP) { int filter; struct nat_sccp_connection *con; - switch (parsed->sccp_type) { + switch (parsed.sccp_type) { case SCCP_MSG_TYPE_CR: memset(&cause, 0, sizeof(cause)); - filter = bsc_nat_filter_sccp_cr(bsc, msg, parsed, + filter = bsc_nat_filter_sccp_cr(bsc, msg, &parsed, &con_type, &imsi, &cause); if (filter < 0) { if (imsi) bsc_nat_inform_reject(bsc, imsi); bsc_stat_reject(filter, bsc, 0); /* send a SCCP Connection Refused */ - bsc_send_con_refuse(bsc, parsed, con_type, &cause); + bsc_send_con_refuse(bsc, &parsed, con_type, &cause); goto exit2; } - if (!create_sccp_src_ref(bsc, parsed)) + if (!create_sccp_src_ref(bsc, &parsed)) goto exit2; - con = patch_sccp_src_ref_to_msc(msg, parsed, bsc); + con = patch_sccp_src_ref_to_msc(msg, &parsed, bsc); OSMO_ASSERT(con); con->msc_con = bsc->nat->msc_con; con_msc = con->msc_con; con->filter_state.con_type = con_type; con->filter_state.imsi_checked = filter; - bsc_nat_extract_lac(bsc, con, parsed, msg); + bsc_nat_extract_lac(bsc, con, &parsed, msg); if (imsi) con->filter_state.imsi = talloc_steal(con, imsi); imsi = NULL; @@ -1194,13 +1189,13 @@ case SCCP_MSG_TYPE_DT1: case SCCP_MSG_TYPE_CC: case SCCP_MSG_TYPE_IT: - con = patch_sccp_src_ref_to_msc(msg, parsed, bsc); + con = patch_sccp_src_ref_to_msc(msg, &parsed, bsc); if (con) { /* only filter non local connections */ if (!con->con_local) { memset(&cause, 0, sizeof(cause)); filter = bsc_nat_filter_dt(bsc, msg, - con, parsed, &cause); + con, &parsed, &cause); if (filter < 0) { if (con->filter_state.imsi) bsc_nat_inform_reject(bsc, @@ -1212,7 +1207,7 @@ } /* hand data to a side channel */ - if (bsc_ussd_check(con, parsed, msg) == 1) + if (bsc_ussd_check(con, &parsed, msg) == 1) con->con_local = NAT_CON_END_USSD; /* @@ -1220,12 +1215,11 @@ * replace the msg and the parsed structure becomes * invalid. */ - msg = bsc_nat_rewrite_msg(bsc->nat, msg, parsed, + msg = bsc_nat_rewrite_msg(bsc->nat, msg, &parsed, con->filter_state.imsi); - talloc_free(parsed); - parsed = NULL; + parsed_ok = false; } else if (con->con_local == NAT_CON_END_USSD) { - bsc_ussd_check(con, parsed, msg); + bsc_ussd_check(con, &parsed, msg); } con_bsc = con->bsc; @@ -1235,13 +1229,13 @@ break; case SCCP_MSG_TYPE_RLC: - con = patch_sccp_src_ref_to_msc(msg, parsed, bsc); + con = patch_sccp_src_ref_to_msc(msg, &parsed, bsc); if (con) { con_bsc = con->bsc; con_msc = con->msc_con; con_filter = con->con_local; } - remove_sccp_src_ref(bsc, msg, parsed); + remove_sccp_src_ref(bsc, msg, &parsed); *bsc_conn_closed = bsc_maybe_close(bsc); break; case SCCP_MSG_TYPE_UDT: @@ -1249,16 +1243,16 @@ con = NULL; break; default: - LOGP(DNAT, LOGL_ERROR, "Not forwarding to msc sccp type: 0x%x\n", parsed->sccp_type); + LOGP(DNAT, LOGL_ERROR, "Not forwarding to msc sccp type: 0x%x\n", parsed.sccp_type); con = NULL; goto exit2; break; } - } else if (parsed->ipa_proto == IPAC_PROTO_MGCP_OLD) { + } else if (parsed.ipa_proto == IPAC_PROTO_MGCP_OLD) { bsc_mgcp_forward(bsc, msg); goto exit2; } else { - LOGP(DNAT, LOGL_ERROR, "Not forwarding unknown stream id: 0x%x\n", parsed->ipa_proto); + LOGP(DNAT, LOGL_ERROR, "Not forwarding unknown stream id: 0x%x\n", parsed.ipa_proto); goto exit2; } @@ -1275,22 +1269,21 @@ if (!con_msc) { LOGP(DNAT, LOGL_ERROR, "Not forwarding data bsc_nr: %d ipa: %d type: 0x%x\n", bsc->cfg->nr, - parsed ? parsed->ipa_proto : -1, - parsed ? parsed->sccp_type : -1); + parsed_ok ? parsed.ipa_proto : -1, + parsed_ok ? parsed.sccp_type : -1); goto exit2; } /* send the non-filtered but maybe modified msg */ - talloc_free(parsed); queue_for_msc(con_msc, msg); return 0; exit: /* if we filter out the reset send an ack to the BSC */ - if (parsed->bssap == 0 && parsed->gsm_type == BSS_MAP_MSG_RESET) { + if (parsed.bssap == 0 && parsed.gsm_type == BSS_MAP_MSG_RESET) { send_reset_ack(bsc); - } else if (parsed->ipa_proto == IPAC_PROTO_IPACCESS) { + } else if (parsed.ipa_proto == IPAC_PROTO_IPACCESS) { /* do we know who is handling this? */ if (msg->l2h[0] == IPAC_MSGT_ID_RESP && msgb_l2len(msg) > 2) { struct tlv_parsed tvp; @@ -1315,7 +1308,6 @@ exit2: if (imsi) talloc_free(imsi); - talloc_free(parsed); msgb_free(msg); return -1; } diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c b/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c index e7c387c..1dd2ada 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c @@ -618,8 +618,6 @@ ipa_prepend_header(sccp, IPAC_PROTO_SCCP); - /* the parsed hangs off from msg but it needs to survive */ - talloc_steal(sccp, parsed); msgb_free(msg); return sccp; } diff --git a/openbsc/src/osmo-bsc_nat/bsc_ussd.c b/openbsc/src/osmo-bsc_nat/bsc_ussd.c index dea1807..d44b1b2 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_ussd.c +++ b/openbsc/src/osmo-bsc_nat/bsc_ussd.c @@ -90,30 +90,27 @@ static int forward_sccp(struct bsc_nat *nat, struct msgb *msg) { struct nat_sccp_connection *con; - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; - - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { LOGP(DNAT, LOGL_ERROR, "Can not parse msg from USSD.\n"); msgb_free(msg); return -1; } - if (!parsed->dest_local_ref) { + if (!parsed.dest_local_ref) { LOGP(DNAT, LOGL_ERROR, "No destination local reference.\n"); msgb_free(msg); return -1; } - con = bsc_nat_find_con_by_bsc(nat, parsed->dest_local_ref); + con = bsc_nat_find_con_by_bsc(nat, parsed.dest_local_ref); if (!con || !con->bsc) { LOGP(DNAT, LOGL_ERROR, "No active connection found.\n"); msgb_free(msg); return -1; } - talloc_free(parsed); bsc_write_msg(&con->bsc->write_queue, msg); return 0; } diff --git a/openbsc/tests/bsc-nat/bsc_nat_test.c b/openbsc/tests/bsc-nat/bsc_nat_test.c index e0d0051..4bee60d 100644 --- a/openbsc/tests/bsc-nat/bsc_nat_test.c +++ b/openbsc/tests/bsc-nat/bsc_nat_test.c @@ -235,20 +235,19 @@ printf("Testing BSS Filtering.\n"); for (i = 0; i < ARRAY_SIZE(results); ++i) { int result; - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; struct msgb *msg = msgb_alloc(4096, "test-message"); printf("Going to test item: %d\n", i); memcpy(msg->data, results[i].data, results[i].length); msg->l2h = msgb_put(msg, results[i].length); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Failed to parse the message\n"); continue; } - result = bsc_nat_filter_ipa(results[i].dir, msg, parsed); + result = bsc_nat_filter_ipa(results[i].dir, msg, &parsed); if (result != results[i].result) { printf("FAIL: Not the expected result got: %d wanted: %d\n", result, results[i].result); @@ -310,7 +309,7 @@ struct bsc_connection *con; struct nat_sccp_connection *con_found; struct nat_sccp_connection *rc_con; - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; struct msgb *msg; printf("Testing connection tracking.\n"); @@ -326,19 +325,19 @@ /* 1.) create a connection */ copy_to_msg(msg, bsc_cr, sizeof(bsc_cr)); - parsed = bsc_nat_parse(msg); - con_found = patch_sccp_src_ref_to_msc(msg, parsed, con); + OSMO_ASSERT(bsc_nat_parse(msg, &parsed) == 0); + con_found = patch_sccp_src_ref_to_msc(msg, &parsed, con); if (con_found != NULL) { printf("Con should not exist realref(%u)\n", sccp_src_ref_to_int(&con_found->real_ref)); abort(); } - rc_con = create_sccp_src_ref(con, parsed); + rc_con = create_sccp_src_ref(con, &parsed); if (!rc_con) { printf("Failed to create a ref\n"); abort(); } - con_found = patch_sccp_src_ref_to_msc(msg, parsed, con); + con_found = patch_sccp_src_ref_to_msc(msg, &parsed, con); if (!con_found) { printf("Failed to find connection.\n"); abort(); @@ -356,40 +355,39 @@ printf("Failed to patch the BSC CR msg.\n"); abort(); } - talloc_free(parsed); /* 2.) get the cc */ copy_to_msg(msg, msc_cc, sizeof(msc_cc)); - parsed = bsc_nat_parse(msg); - con_found = patch_sccp_src_ref_to_bsc(msg, parsed, nat); + OSMO_ASSERT(bsc_nat_parse(msg, &parsed) == 0); + con_found = patch_sccp_src_ref_to_bsc(msg, &parsed, nat); VERIFY(con_found, con, msg, msc_cc_patched, "MSC CC"); - if (update_sccp_src_ref(con_found, parsed) != 0) { + if (update_sccp_src_ref(con_found, &parsed) != 0) { printf("Failed to update the SCCP con.\n"); abort(); } /* 3.) send some data */ copy_to_msg(msg, bsc_dtap, sizeof(bsc_dtap)); - parsed = bsc_nat_parse(msg); - con_found = patch_sccp_src_ref_to_msc(msg, parsed, con); + OSMO_ASSERT(bsc_nat_parse(msg, &parsed) == 0); + con_found = patch_sccp_src_ref_to_msc(msg, &parsed, con); VERIFY(con_found, con, msg, bsc_dtap_patched, "BSC DTAP"); /* 4.) receive some data */ copy_to_msg(msg, msc_dtap, sizeof(msc_dtap)); - parsed = bsc_nat_parse(msg); - con_found = patch_sccp_src_ref_to_bsc(msg, parsed, nat); + OSMO_ASSERT(bsc_nat_parse(msg, &parsed) == 0); + con_found = patch_sccp_src_ref_to_bsc(msg, &parsed, nat); VERIFY(con_found, con, msg, msc_dtap_patched, "MSC DTAP"); /* 5.) close the connection */ copy_to_msg(msg, msc_rlsd, sizeof(msc_rlsd)); - parsed = bsc_nat_parse(msg); - con_found = patch_sccp_src_ref_to_bsc(msg, parsed, nat); + OSMO_ASSERT(bsc_nat_parse(msg, &parsed) == 0); + con_found = patch_sccp_src_ref_to_bsc(msg, &parsed, nat); VERIFY(con_found, con, msg, msc_rlsd_patched, "MSC RLSD"); /* 6.) confirm the connection close */ copy_to_msg(msg, bsc_rlc, sizeof(bsc_rlc)); - parsed = bsc_nat_parse(msg); - con_found = patch_sccp_src_ref_to_msc(msg, parsed, con); + OSMO_ASSERT(bsc_nat_parse(msg, &parsed) == 0); + con_found = patch_sccp_src_ref_to_msc(msg, &parsed, con); if (!con_found) { printf("Failed to find connection.\n"); abort(); @@ -403,12 +401,11 @@ printf("Failed to patch the BSC CR msg.\n"); abort(); } - remove_sccp_src_ref(con, msg, parsed); - talloc_free(parsed); + remove_sccp_src_ref(con, msg, &parsed); copy_to_msg(msg, bsc_rlc, sizeof(bsc_rlc)); - parsed = bsc_nat_parse(msg); - con_found = patch_sccp_src_ref_to_msc(msg, parsed, con); + OSMO_ASSERT(bsc_nat_parse(msg, &parsed) == 0); + con_found = patch_sccp_src_ref_to_msc(msg, &parsed, con); /* verify that it is gone */ if (con_found != NULL) { @@ -416,8 +413,6 @@ sccp_src_ref_to_int(&con_found->real_ref)); abort(); } - talloc_free(parsed); - bsc_config_free(con->cfg); bsc_nat_free(nat); @@ -507,7 +502,7 @@ struct bsc_connection *bsc; struct bsc_nat *nat; struct nat_sccp_connection con; - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; struct msgb *msg; printf("Testing MGCP.\n"); @@ -529,7 +524,7 @@ msg = msgb_alloc(4096, "foo"); copy_to_msg(msg, ass_cmd, sizeof(ass_cmd)); - parsed = bsc_nat_parse(msg); + OSMO_ASSERT(bsc_nat_parse(msg, &parsed) == 0); if (msg->l2h[16] != 0 || msg->l2h[17] != 0x1) { @@ -568,8 +563,6 @@ abort(); } - talloc_free(parsed); - bsc_mgcp_dlcx(&con); if (con.bsc_endp != -1 || con.msc_endp != -1 || con.bsc->_endpoint_status[1] != 0 || con.bsc->last_endpoint != 0x1) { @@ -867,7 +860,7 @@ { int i, res, contype; struct msgb *msg = msgb_alloc(4096, "test_cr_filter"); - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; struct bsc_msg_acc_lst *nat_lst, *bsc_lst; struct bsc_msg_acc_lst_entry *nat_entry, *bsc_entry; struct bsc_filter_reject_cause cause; @@ -912,14 +905,13 @@ &cr_filter[i].bsc_imsi_deny) != 0) abort(); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Failed to parse the message\n"); abort(); } memset(&cause, 0, sizeof(cause)); - res = bsc_nat_filter_sccp_cr(bsc, msg, parsed, &contype, &imsi, &cause); + res = bsc_nat_filter_sccp_cr(bsc, msg, &parsed, &contype, &imsi, &cause); if (res != cr_filter[i].result) { printf("FAIL: Wrong result %d for test %d.\n", res, i); abort(); @@ -934,8 +926,7 @@ abort(); } - talloc_steal(parsed, imsi); - talloc_free(parsed); + talloc_free(imsi); } msgb_free(msg); @@ -946,7 +937,7 @@ { int i; struct msgb *msg = msgb_alloc(4096, "test_dt_filter"); - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; struct bsc_filter_reject_cause cause; struct bsc_nat *nat = bsc_nat_alloc(); @@ -960,26 +951,25 @@ msgb_reset(msg); copy_to_msg(msg, id_resp, ARRAY_SIZE(id_resp)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse ID resp\n"); abort(); } - if (parsed->bssap != BSSAP_MSG_DTAP) { + if (parsed.bssap != BSSAP_MSG_DTAP) { printf("FAIL: It should be dtap\n"); abort(); } /* gsm_type is actually the size of the dtap */ - if (parsed->gsm_type < msgb_l3len(msg) - 3) { + if (parsed.gsm_type < msgb_l3len(msg) - 3) { printf("FAIL: Not enough space for the content\n"); abort(); } memset(&cause, 0, sizeof(cause)); OSMO_ASSERT(!con->filter_state.imsi); - if (bsc_nat_filter_dt(bsc, msg, con, parsed, &cause) != 1) { + if (bsc_nat_filter_dt(bsc, msg, con, &parsed, &cause) != 1) { printf("FAIL: Should have passed..\n"); abort(); } @@ -991,13 +981,13 @@ msgb_reset(msg); copy_to_msg(msg, id_resp, ARRAY_SIZE(id_resp)); - parsed = bsc_nat_parse(msg); - if (!parsed) + if (bsc_nat_parse(msg, &parsed) < 0) continue; + con->filter_state.imsi_checked = 0; memset(&cause, 0, sizeof(cause)); - bsc_nat_filter_dt(bsc, msg, con, parsed, &cause); + bsc_nat_filter_dt(bsc, msg, con, &parsed, &cause); } msgb_free(msg); @@ -1008,7 +998,7 @@ { struct msgb *msg = msgb_alloc(4096, "test_dt_filter"); struct msgb *out; - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; const char *imsi = "27408000001234"; struct bsc_nat *nat = bsc_nat_alloc(); @@ -1028,31 +1018,28 @@ /* verify that nothing changed */ msgb_reset(msg); copy_to_msg(msg, cc_setup_international, ARRAY_SIZE(cc_setup_international)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse ID resp\n"); abort(); } - out = bsc_nat_rewrite_msg(nat, msg, parsed, imsi); + out = bsc_nat_rewrite_msg(nat, msg, &parsed, imsi); if (msg != out) { printf("FAIL: The message should not have been changed\n"); abort(); } verify_msg(out, cc_setup_international, ARRAY_SIZE(cc_setup_international)); - talloc_free(parsed); /* verify that something in the message changes */ msgb_reset(msg); copy_to_msg(msg, cc_setup_national, ARRAY_SIZE(cc_setup_national)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse ID resp\n"); abort(); } - out = bsc_nat_rewrite_msg(nat, msg, parsed, imsi); + out = bsc_nat_rewrite_msg(nat, msg, &parsed, imsi); if (!out) { printf("FAIL: A new message should be created.\n"); abort(); @@ -1071,13 +1058,12 @@ bsc_nat_num_rewr_entry_adapt(nat, &nat->num_rewr, &entries); msg = msgb_alloc(4096, "test_dt_filter"); copy_to_msg(msg, cc_setup_national, ARRAY_SIZE(cc_setup_national)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse ID resp\n"); abort(); } - out = bsc_nat_rewrite_msg(nat, msg, parsed, imsi); + out = bsc_nat_rewrite_msg(nat, msg, &parsed, imsi); if (!out) { printf("FAIL: A new message should be created.\n"); abort(); @@ -1096,13 +1082,12 @@ bsc_nat_num_rewr_entry_adapt(nat, &nat->num_rewr, &entries); msg = msgb_alloc(4096, "test_dt_filter"); copy_to_msg(msg, cc_setup_national, ARRAY_SIZE(cc_setup_national)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse ID resp\n"); abort(); } - out = bsc_nat_rewrite_msg(nat, msg, parsed, imsi); + out = bsc_nat_rewrite_msg(nat, msg, &parsed, imsi); if (out != msg) { printf("FAIL: The message should be unchanged.\n"); abort(); @@ -1118,13 +1103,12 @@ bsc_nat_num_rewr_entry_adapt(nat, &nat->num_rewr, &entries); msg = msgb_alloc(4096, "test_dt_filter"); copy_to_msg(msg, cc_setup_national_patched, ARRAY_SIZE(cc_setup_national_patched)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse ID resp %d\n", __LINE__); abort(); } - out = bsc_nat_rewrite_msg(nat, msg, parsed, imsi); + out = bsc_nat_rewrite_msg(nat, msg, &parsed, imsi); if (!out) { printf("FAIL: A new message should be created %d.\n", __LINE__); abort(); @@ -1146,13 +1130,12 @@ bsc_nat_num_rewr_entry_adapt(nat, &nat->num_rewr, &entries); msg = msgb_alloc(4096, "test_dt_filter"); copy_to_msg(msg, cc_setup_national_patched, ARRAY_SIZE(cc_setup_national_patched)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse ID resp %d\n", __LINE__); abort(); } - out = bsc_nat_rewrite_msg(nat, msg, parsed, imsi); + out = bsc_nat_rewrite_msg(nat, msg, &parsed, imsi); if (!out) { printf("FAIL: A new message should be created %d.\n", __LINE__); abort(); @@ -1174,7 +1157,7 @@ { struct msgb *msg = msgb_alloc(4096, "test_dt_filter"); struct msgb *out; - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; const char *imsi = "27408000001234"; struct bsc_nat *nat = bsc_nat_alloc(); @@ -1195,13 +1178,12 @@ msgb_reset(msg); copy_to_msg(msg, cc_setup_national, ARRAY_SIZE(cc_setup_national)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse ID resp\n"); abort(); } - out = bsc_nat_rewrite_msg(nat, msg, parsed, imsi); + out = bsc_nat_rewrite_msg(nat, msg, &parsed, imsi); if (!out) { printf("FAIL: A new message should be created.\n"); abort(); @@ -1223,7 +1205,7 @@ { struct msgb *msg = msgb_alloc(4096, "test_dt_filter"); struct msgb *out; - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; const char *imsi = "27408000001234"; struct bsc_nat *nat = bsc_nat_alloc(); @@ -1255,13 +1237,12 @@ msgb_reset(msg); copy_to_msg(msg, cc_setup_national, ARRAY_SIZE(cc_setup_national)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse ID resp\n"); abort(); } - out = bsc_nat_rewrite_msg(nat, msg, parsed, imsi); + out = bsc_nat_rewrite_msg(nat, msg, &parsed, imsi); if (!out) { printf("FAIL: A new message should be created.\n"); abort(); @@ -1281,7 +1262,7 @@ static void test_sms_smsc_rewrite() { struct msgb *msg = msgb_alloc(4096, "SMSC rewrite"), *out; - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; const char *imsi = "515039900406700"; struct bsc_nat *nat = bsc_nat_alloc(); @@ -1317,13 +1298,12 @@ * Check if the SMSC address is changed */ copy_to_msg(msg, smsc_rewrite, ARRAY_SIZE(smsc_rewrite)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse SMS\n"); abort(); } - out = bsc_nat_rewrite_msg(nat, msg, parsed, imsi); + out = bsc_nat_rewrite_msg(nat, msg, &parsed, imsi); if (out == msg) { printf("FAIL: This should have changed.\n"); abort(); @@ -1337,13 +1317,12 @@ bsc_nat_num_rewr_entry_adapt(nat, &nat->smsc_rewr, NULL); msg = msgb_alloc(4096, "SMSC rewrite"); copy_to_msg(msg, smsc_rewrite, ARRAY_SIZE(smsc_rewrite)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse SMS\n"); abort(); } - out = bsc_nat_rewrite_msg(nat, msg, parsed, imsi); + out = bsc_nat_rewrite_msg(nat, msg, &parsed, imsi); if (out == msg) { printf("FAIL: This should have changed.\n"); abort(); @@ -1357,13 +1336,12 @@ bsc_nat_num_rewr_entry_adapt(nat, &nat->sms_clear_tp_srr, NULL); msg = msgb_alloc(4096, "SMSC rewrite"); copy_to_msg(msg, smsc_rewrite, ARRAY_SIZE(smsc_rewrite)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse SMS\n"); abort(); } - out = bsc_nat_rewrite_msg(nat, msg, parsed, imsi); + out = bsc_nat_rewrite_msg(nat, msg, &parsed, imsi); if (out != msg) { printf("FAIL: This should not have changed.\n"); abort(); @@ -1377,7 +1355,7 @@ static void test_sms_number_rewrite(void) { struct msgb *msg, *out; - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; const char *imsi = "515039900406700"; struct bsc_nat *nat = bsc_nat_alloc(); @@ -1401,13 +1379,12 @@ */ msg = msgb_alloc(4096, "SMSC rewrite"); copy_to_msg(msg, smsc_rewrite, ARRAY_SIZE(smsc_rewrite)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse SMS\n"); abort(); } - out = bsc_nat_rewrite_msg(nat, msg, parsed, imsi); + out = bsc_nat_rewrite_msg(nat, msg, &parsed, imsi); if (out == msg) { printf("FAIL: This should have changed.\n"); abort(); @@ -1429,13 +1406,12 @@ msg = msgb_alloc(4096, "SMSC rewrite"); copy_to_msg(msg, smsc_rewrite, ARRAY_SIZE(smsc_rewrite)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse SMS\n"); abort(); } - out = bsc_nat_rewrite_msg(nat, msg, parsed, imsi); + out = bsc_nat_rewrite_msg(nat, msg, &parsed, imsi); if (out == msg) { printf("FAIL: This should have changed.\n"); abort(); @@ -1520,7 +1496,7 @@ struct bsc_connection *bsc; struct bsc_nat *nat; struct nat_sccp_connection con; - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; struct msgb *msg = msgb_alloc(4096, "test-message"); printf("Testing LAC extraction from SCCP CR\n"); @@ -1538,8 +1514,8 @@ memcpy(msg->l2h, bssmap_cr, ARRAY_SIZE(bssmap_cr)); /* parse it and pass it on */ - parsed = bsc_nat_parse(msg); - res = bsc_nat_extract_lac(bsc, &con, parsed, msg); + OSMO_ASSERT(bsc_nat_parse(msg, &parsed) == 0); + res = bsc_nat_extract_lac(bsc, &con, &parsed, msg); OSMO_ASSERT(res == 0); /* verify the LAC */ -- To view, visit https://gerrit.osmocom.org/13843 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I66c44890952339f15131081e2f629a2824b6d3ba Gerrit-Change-Number: 13843 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 10:57:43 2019 From: gerrit-no-reply at lists.osmocom.org (Piotr Krysik) Date: Thu, 2 May 2019 10:57:43 +0000 Subject: Change in gr-gsm[master]: Improve the TCH/H decoder logs In-Reply-To: References: Message-ID: Piotr Krysik has uploaded a new patch set (#2) to the change originally created by Vasil Velichkov. ( https://gerrit.osmocom.org/13671 ) Change subject: Improve the TCH/H decoder logs ...................................................................... Improve the TCH/H decoder logs - Change "6,90 kbit/s" to "5.9 kbit/s" A typo reported in github ptrkrysik/gr-gsm#456 - Comment out the "Error! frame_nr:" message as it turns out to confuse users more then it actually helps debugging. - When voice-boundary detection is enabled write the name of decoded control channel messages Change-Id: I697ef944f30c4cabb62c888317dd3a7f8dcd5611 --- M lib/decoding/tch_h_decoder_impl.cc 1 file changed, 10 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/gr-gsm refs/changes/71/13671/2 -- To view, visit https://gerrit.osmocom.org/13671 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: gr-gsm Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I697ef944f30c4cabb62c888317dd3a7f8dcd5611 Gerrit-Change-Number: 13671 Gerrit-PatchSet: 2 Gerrit-Owner: Vasil Velichkov Gerrit-Reviewer: Piotr Krysik Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 10:59:28 2019 From: gerrit-no-reply at lists.osmocom.org (Piotr Krysik) Date: Thu, 2 May 2019 10:59:28 +0000 Subject: Change in gr-gsm[master]: Improve the TCH/H decoder logs In-Reply-To: References: Message-ID: Piotr Krysik has uploaded a new patch set (#3) to the change originally created by Vasil Velichkov. ( https://gerrit.osmocom.org/13671 ) Change subject: Improve the TCH/H decoder logs ...................................................................... Improve the TCH/H decoder logs - Change "6,90 kbit/s" to "5.9 kbit/s" A typo reported in github ptrkrysik/gr-gsm#456 - Comment out the "Error! frame_nr:" message as it turns out to confuse users more then it actually helps debugging. - When voice-boundary detection is enabled write the name of decoded control channel messages Change-Id: I697ef944f30c4cabb62c888317dd3a7f8dcd5611 --- M lib/decoding/tch_h_decoder_impl.cc 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/gr-gsm refs/changes/71/13671/3 -- To view, visit https://gerrit.osmocom.org/13671 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: gr-gsm Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I697ef944f30c4cabb62c888317dd3a7f8dcd5611 Gerrit-Change-Number: 13671 Gerrit-PatchSet: 3 Gerrit-Owner: Vasil Velichkov Gerrit-Reviewer: Piotr Krysik Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 11:00:11 2019 From: gerrit-no-reply at lists.osmocom.org (Piotr Krysik) Date: Thu, 2 May 2019 11:00:11 +0000 Subject: Change in gr-gsm[master]: Improve the TCH/H decoder logs In-Reply-To: References: Message-ID: Piotr Krysik has posted comments on this change. ( https://gerrit.osmocom.org/13671 ) Change subject: Improve the TCH/H decoder logs ...................................................................... Patch Set 3: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13671 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: gr-gsm Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I697ef944f30c4cabb62c888317dd3a7f8dcd5611 Gerrit-Change-Number: 13671 Gerrit-PatchSet: 3 Gerrit-Owner: Vasil Velichkov Gerrit-Reviewer: Piotr Krysik Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 02 May 2019 11:00:11 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 11:01:03 2019 From: gerrit-no-reply at lists.osmocom.org (Piotr Krysik) Date: Thu, 2 May 2019 11:01:03 +0000 Subject: Change in gr-gsm[master]: grgsm_capture: Fix device arguments In-Reply-To: References: Message-ID: Piotr Krysik has posted comments on this change. ( https://gerrit.osmocom.org/13672 ) Change subject: grgsm_capture: Fix device arguments ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13672 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: gr-gsm Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2d1bcee835b695c91a5c44ec78a40b2d969f611c Gerrit-Change-Number: 13672 Gerrit-PatchSet: 1 Gerrit-Owner: Vasil Velichkov Gerrit-Reviewer: Piotr Krysik Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 02 May 2019 11:01:03 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 11:16:09 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 May 2019 11:16:09 +0000 Subject: Change in openbsc[master]: bsc_filter.c: Return NULL instead of zero in bsc_nat_parse In-Reply-To: References: Message-ID: Pau Espin Pedrol has abandoned this change. ( https://gerrit.osmocom.org/13836 ) Change subject: bsc_filter.c: Return NULL instead of zero in bsc_nat_parse ...................................................................... Abandoned Superseeded by https://gerrit.osmocom.org/#/c/openbsc/+/13843/ -- To view, visit https://gerrit.osmocom.org/13836 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: I7a0ca6067bb1708d4aec28f9de166ac7874f8e91 Gerrit-Change-Number: 13836 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 11:19:55 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 May 2019 11:19:55 +0000 Subject: Change in openbsc[master]: nat: Return error code in queue_for_msc In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/13840 ) Change subject: nat: Return error code in queue_for_msc ...................................................................... nat: Return error code in queue_for_msc Might be useful in the future for its callers, since sometimes actions need to be taken place based on whether enqueuing failed (and msg was freed). Change-Id: I9f172f9c9ca9db18f6adcf9267db23c73e9d5bc6 --- M openbsc/src/osmo-bsc_nat/bsc_nat.c 1 file changed, 8 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c index 670b0be..c97483a 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c @@ -108,19 +108,23 @@ return NULL; } -static void queue_for_msc(struct bsc_msc_connection *con, struct msgb *msg) +static int queue_for_msc(struct bsc_msc_connection *con, struct msgb *msg) { + int rc; if (!con) { LOGP(DLINP, LOGL_ERROR, "No MSC Connection assigned. Check your code.\n"); msgb_free(msg); - return; + return -EINVAL; } - - if (osmo_wqueue_enqueue(&con->write_queue, msg) != 0) { + rc = osmo_wqueue_enqueue(&con->write_queue, msg); + if (rc != 0) { LOGP(DLINP, LOGL_ERROR, "Failed to enqueue the write.\n"); msgb_free(msg); + return rc; } + + return 0; } static void send_reset_ack(struct bsc_connection *bsc) -- To view, visit https://gerrit.osmocom.org/13840 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I9f172f9c9ca9db18f6adcf9267db23c73e9d5bc6 Gerrit-Change-Number: 13840 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 11:52:13 2019 From: gerrit-no-reply at lists.osmocom.org (Piotr Krysik) Date: Thu, 2 May 2019 11:52:13 +0000 Subject: Change in gr-gsm[master]: Filter out SoapyAudio devices In-Reply-To: References: Message-ID: Piotr Krysik has posted comments on this change. ( https://gerrit.osmocom.org/13812 ) Change subject: Filter out SoapyAudio devices ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13812 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: gr-gsm Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib84081041ca6c2bc18b9da0c32bac9d3ecef65ca Gerrit-Change-Number: 13812 Gerrit-PatchSet: 1 Gerrit-Owner: Vasil Velichkov Gerrit-Reviewer: Piotr Krysik Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 02 May 2019 11:52:13 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 11:53:29 2019 From: gerrit-no-reply at lists.osmocom.org (Piotr Krysik) Date: Thu, 2 May 2019 11:53:29 +0000 Subject: Change in gr-gsm[master]: Improve the TCH/H decoder logs In-Reply-To: References: Message-ID: Piotr Krysik has submitted this change and it was merged. ( https://gerrit.osmocom.org/13671 ) Change subject: Improve the TCH/H decoder logs ...................................................................... Improve the TCH/H decoder logs - Change "6,90 kbit/s" to "5.9 kbit/s" A typo reported in github ptrkrysik/gr-gsm#456 - Comment out the "Error! frame_nr:" message as it turns out to confuse users more then it actually helps debugging. - When voice-boundary detection is enabled write the name of decoded control channel messages Change-Id: I697ef944f30c4cabb62c888317dd3a7f8dcd5611 --- M lib/decoding/tch_h_decoder_impl.cc 1 file changed, 8 insertions(+), 1 deletion(-) Approvals: Piotr Krysik: Looks good to me, approved; Verified diff --git a/lib/decoding/tch_h_decoder_impl.cc b/lib/decoding/tch_h_decoder_impl.cc index 11da907..b6827f7 100644 --- a/lib/decoding/tch_h_decoder_impl.cc +++ b/lib/decoding/tch_h_decoder_impl.cc @@ -178,7 +178,7 @@ std::cout<<"5,15 kbit/s codec rate: is part of the subset"< Gerrit-Reviewer: Piotr Krysik Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 11:56:55 2019 From: gerrit-no-reply at lists.osmocom.org (Piotr Krysik) Date: Thu, 2 May 2019 11:56:55 +0000 Subject: Change in gr-gsm[master]: grgsm_capture: Fix device arguments In-Reply-To: References: Message-ID: Piotr Krysik has posted comments on this change. ( https://gerrit.osmocom.org/13672 ) Change subject: grgsm_capture: Fix device arguments ...................................................................... Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/13672 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: gr-gsm Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2d1bcee835b695c91a5c44ec78a40b2d969f611c Gerrit-Change-Number: 13672 Gerrit-PatchSet: 2 Gerrit-Owner: Vasil Velichkov Gerrit-Reviewer: Piotr Krysik Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 02 May 2019 11:56:55 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 11:57:07 2019 From: gerrit-no-reply at lists.osmocom.org (Piotr Krysik) Date: Thu, 2 May 2019 11:57:07 +0000 Subject: Change in gr-gsm[master]: Filter out SoapyAudio devices In-Reply-To: References: Message-ID: Piotr Krysik has posted comments on this change. ( https://gerrit.osmocom.org/13812 ) Change subject: Filter out SoapyAudio devices ...................................................................... Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/13812 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: gr-gsm Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib84081041ca6c2bc18b9da0c32bac9d3ecef65ca Gerrit-Change-Number: 13812 Gerrit-PatchSet: 2 Gerrit-Owner: Vasil Velichkov Gerrit-Reviewer: Piotr Krysik Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 02 May 2019 11:57:07 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 12:46:14 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 2 May 2019 12:46:14 +0000 Subject: Change in libosmocore[master]: gsm/gsm_utils.h: fix argument type of gsm_chan_t_name() Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13844 Change subject: gsm/gsm_utils.h: fix argument type of gsm_chan_t_name() ...................................................................... gsm/gsm_utils.h: fix argument type of gsm_chan_t_name() The actual value-string array 'gsm_chan_t_names' describes the enum values of 'gsm_chan_t', not 'gsm48_chan_mode'. Change-Id: Ifc2121b23fb8d07589cc5b7aa8fbf4e27eb6b72b Fixes: CID#188831, CID#188825 --- M include/osmocom/gsm/gsm_utils.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/44/13844/1 diff --git a/include/osmocom/gsm/gsm_utils.h b/include/osmocom/gsm/gsm_utils.h index 37df665..7a5da9a 100644 --- a/include/osmocom/gsm/gsm_utils.h +++ b/include/osmocom/gsm/gsm_utils.h @@ -230,7 +230,7 @@ }; extern const struct value_string gsm_chan_t_names[]; -static inline const char *gsm_chan_t_name(enum gsm48_chan_mode val) +static inline const char *gsm_chan_t_name(enum gsm_chan_t val) { return get_value_string(gsm_chan_t_names, val); } /* Deprectated functions */ -- To view, visit https://gerrit.osmocom.org/13844 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ifc2121b23fb8d07589cc5b7aa8fbf4e27eb6b72b Gerrit-Change-Number: 13844 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 13:56:21 2019 From: gerrit-no-reply at lists.osmocom.org (=?UTF-8?Q?K=C3=A9vin_Redon?=) Date: Thu, 2 May 2019 13:56:21 +0000 Subject: Change in osmo-ccid-firmware[master]: add function to set baudrate Message-ID: K?vin Redon has uploaded this change for review. ( https://gerrit.osmocom.org/13845 Change subject: add function to set baudrate ...................................................................... add function to set baudrate it will set the GCLK as SERCOM core clock with the lowest baud rate error and set the closest baud rate in the SERCOM peripheral. Change-Id: I01db273f4c8170a4942049653c575010b93296ce --- M sysmoOCTSIM/main.c 1 file changed, 78 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/45/13845/1 diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 47d1cd1..70099e1 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -18,12 +18,14 @@ #include #include +#include #include #include #include #include "atmel_start.h" #include "atmel_start_pins.h" +#include "config/hpl_gclk_config.h" #include "i2c_bitbang.h" #include "octsim_i2c.h" @@ -39,6 +41,21 @@ { } +/** possible clock sources for the SERCOM peripheral + * warning: the definition must match the GCLK configuration + */ +static const uint8_t sercom_glck_sources[] = {GCLK_PCHCTRL_GEN_GCLK2_Val, GCLK_PCHCTRL_GEN_GCLK4_Val, GCLK_PCHCTRL_GEN_GCLK6_Val}; + +/** possible clock frequencies in MHz for the SERCOM peripheral + * warning: the definition must match the GCLK configuration + */ +static const double sercom_glck_freqs[] = {100E6 / CONF_GCLK_GEN_2_DIV, 100E6 / CONF_GCLK_GEN_4_DIV, 120E6 / CONF_GCLK_GEN_6_DIV}; + +/** the GCLK ID for the SERCOM SIM peripherals + * @note: used as index for PCHCTRL + */ +static const uint8_t SIM_peripheral_GCLK_ID[] = {SERCOM0_GCLK_ID_CORE, SERCOM1_GCLK_ID_CORE, SERCOM2_GCLK_ID_CORE, SERCOM3_GCLK_ID_CORE, SERCOM4_GCLK_ID_CORE, SERCOM5_GCLK_ID_CORE, SERCOM6_GCLK_ID_CORE, SERCOM7_GCLK_ID_CORE}; + static void board_init() { int i; @@ -81,6 +98,66 @@ return slotnr; } +/** change baud rate of card slot + * @param[in] slotnr slot number for which the baud rate should be set + * @param[in] baudrate baud rate in bps to set + * @return if the baud rate has been set, else a parameter is out of range + */ +static bool slot_set_baudrate(uint8_t slotnr, uint32_t baudrate) +{ + ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); + + // calculate the error corresponding to the clock sources + uint16_t bauds[ARRAY_SIZE(sercom_glck_freqs)]; + double errors[ARRAY_SIZE(sercom_glck_freqs)]; + for (uint8_t i = 0; i < ARRAY_SIZE(sercom_glck_freqs); i++) { + double freq = sercom_glck_freqs[i]; // remember possible SERCOM frequency + uint32_t min = freq / (2 * (255 + 1)); // calculate the minimum baud rate for this frequency + uint32_t max = freq / (2 * (0 + 1)); // calculate the maximum baud rate for this frequency + if (baudrate < min || baudrate > max) { // baud rate it out of supported range + errors[i] = NAN; + } else { + uint16_t baud = round(freq / (2 * baudrate) - 1); + bauds[i] = baud; + double actual = freq / (2 * (baud + 1)); + errors[i] = fabs(1.0 - (actual / baudrate)); + } + } + + // find the smallest error + uint8_t best = ARRAY_SIZE(sercom_glck_freqs); + for (uint8_t i = 0; i < ARRAY_SIZE(sercom_glck_freqs); i++) { + if (isnan(errors[i])) { + continue; + } + if (best >= ARRAY_SIZE(sercom_glck_freqs)) { + best = i; + } else if (errors[i] < errors[best]) { + best = i; + } + } + if (best >= ARRAY_SIZE(sercom_glck_freqs)) { // found no clock supporting this baud rate + return false; + } + + // set clock and baud rate + struct usart_async_descriptor* slot = SIM_peripheral_descriptors[slotnr]; // get slot + if (NULL == slot) { + return false; + } + printf("(%u) switching SERCOM clock to GCLK%u (freq = %lu kHz) and baud rate to %lu bps (baud = %u)\r\n", slotnr, (best + 1) * 2, (uint32_t)(round(sercom_glck_freqs[best] / 1000)), baudrate, bauds[best]); + while (!usart_async_is_tx_empty(slot)); // wait for transmission to complete (WARNING no timeout) + usart_async_disable(slot); // disable SERCOM peripheral + hri_gclk_clear_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], (1 << GCLK_PCHCTRL_CHEN_Pos)); // disable clock for this peripheral + while (hri_gclk_get_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], (1 << GCLK_PCHCTRL_CHEN_Pos))); // wait until clock is really disabled + // it does not seem we need to completely disable the peripheral using hri_mclk_clear_APBDMASK_SERCOMn_bit + hri_gclk_write_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], sercom_glck_sources[best] | (1 << GCLK_PCHCTRL_CHEN_Pos)); // set peripheral core clock and re-enable it + usart_async_set_baud_rate(slot, bauds[best]); // set the new baud rate + usart_async_enable(slot); // re-enable SERCOM peripheral + + return true; +} + DEFUN(sim_status, cmd_sim_status, "sim-status", "Get state of specified NCN8025") { struct ncn8025_settings settings; @@ -245,7 +322,7 @@ // TODO wait some time for card to be completely deactivated usart_async_flush_rx_buffer(SIM_peripheral_descriptors[slotnr]); // flush RX buffer to start from scratch - //usart_async_set_baud_rate(SIM_peripheral_descriptors[slotnr], 2500000 / (372 / 1)); // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) + slot_set_baudrate(slotnr, 2500000 / (372 / 1)); // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) // set clock to lowest frequency (20 MHz / 8 = 2.5 MHz) // note: according to ISO/IEC 7816-3:2006 section 5.2.3 the minimum value is 1 MHz, and maximum is 5 MHz during activation settings.clkdiv = SIM_CLKDIV_8; -- To view, visit https://gerrit.osmocom.org/13845 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I01db273f4c8170a4942049653c575010b93296ce Gerrit-Change-Number: 13845 Gerrit-PatchSet: 1 Gerrit-Owner: K?vin Redon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 13:56:22 2019 From: gerrit-no-reply at lists.osmocom.org (=?UTF-8?Q?K=C3=A9vin_Redon?=) Date: Thu, 2 May 2019 13:56:22 +0000 Subject: Change in osmo-ccid-firmware[master]: add ISO 7816-3 definitions and utilities Message-ID: K?vin Redon has uploaded this change for review. ( https://gerrit.osmocom.org/13846 Change subject: add ISO 7816-3 definitions and utilities ...................................................................... add ISO 7816-3 definitions and utilities Change-Id: Ice4eba380126ff92089b71d0ea328b0110f7ffec --- M sysmoOCTSIM/gcc/Makefile A sysmoOCTSIM/iso7816_3.c A sysmoOCTSIM/iso7816_3.h 3 files changed, 225 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/46/13846/1 diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index 5d21cb0..cf0484c 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -83,6 +83,7 @@ octsim_i2c.o \ ncn8025.o \ command.o \ +iso7816_3.o \ hpl/osc32kctrl/hpl_osc32kctrl.o \ driver_init.o \ hal/src/hal_usart_async.o \ @@ -132,6 +133,7 @@ "octsim_i2c.o" \ "ncn8025.o" \ "command.o" \ +"iso7816_3.o" \ "hpl/osc32kctrl/hpl_osc32kctrl.o" \ "driver_init.o" \ "hal/src/hal_usart_async.o" \ @@ -188,7 +190,8 @@ "octsim_i2c.d" \ "ncn8025.d" \ "command.d" \ -"hal/src/hal_cache.d" \ +"iso7816_3.d" \ +"hal/src/halcache.d" \ "hal/src/hal_sleep.d" \ "hal/utils/src/utils_ringbuffer.d" \ "hpl/sercom/hpl_sercom.d" \ diff --git a/sysmoOCTSIM/iso7816_3.c b/sysmoOCTSIM/iso7816_3.c new file mode 100644 index 0000000..f7262fb --- /dev/null +++ b/sysmoOCTSIM/iso7816_3.c @@ -0,0 +1,123 @@ +/* + * Copyright (C) 2019 sysmocom -s.f.m.c. GmbH, Author: Kevin Redon + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ +#include +#include + +#include "utils.h" +#include "iso7816_3.h" + +const uint16_t iso7816_3_fi_table[16] = { + 372, 372, 558, 744, 1116, 1488, 1860, 0, + 0, 512, 768, 1024, 1536, 2048, 0, 0 +}; + +const uint32_t iso7816_3_fmax_table[16] = { + 4000000, 5000000, 6000000, 8000000, 12000000, 16000000, 20000000, 0, + 0, 5000000, 7500000, 10000000, 15000000, 20000000, 0, 0 +}; + +const uint8_t iso7816_3_di_table[16] = { + 0, 1, 2, 4, 8, 16, 32, 64, + 12, 20, 0, 0, 0, 0, 0, 0, +}; + +/* all values are based on the Elementary Time Unit (ETU), defined in ISO/IEC 7816-3 section 7.1 + * this is the time required to transmit a bit, and is calculated as follows: 1 ETU = (F / D) x (1 / f) where: + * - F is the clock rate conversion integer + * - D is the baud rate adjustment factor + * - f is the clock frequency + * the possible F, f(max), and D values are defined in ISO/IEC 7816-3 table 7 and 8 + * - the initial value for F (after reset) is Fd = 372 + * - the initial value for D (after reset) is Dd = 1 + * - the initial maximum frequency f(max) is 5 MHz + * the card must measure the ETU based on the clock signal provided by the reader + * one ETU (e.g. 1 bit) takes F/D clock cycles, which the card must count + * + * the card can indicate an alternative set of supported values Fi (with corresponding f(max)) and Di for higher baud rate in TA1 in the ATR (see ISO/IEC 7816-3 section 8.3) + * these values are selected according to ISO/IEC 7816-3 section 6.3.1: + * - card in specific mode: they are enforced if TA2 is present (the reader can deactivate the card if it does not support these values) + * - card in negotiable mode: + * -- they can be selected by the reader using the Protocol and Parameters Selection (PPS) procedure + * -- the first offered protocol and default values are used when no PPS is started + * + * PPS is done with Fd and Dd (see ISO/IEC 7816-3 section 9) + * the reader can propose any F and D values between from Fd to Fi, and from Dd to Di (Fi and Di are indicated in TA1) + * the in PPS agreed values F and D are called Fn and Dn and are applied after a successful exchange, corresponding to PPS1_Response bit 5 + * + * the F and D values must be provided to the SAM3S USART peripheral (after reset and PPS) + */ + +bool iso7816_3_valid_f(uint16_t f) +{ + if (0 == f) { + return false; + } + uint8_t i = 0; + for (i = 0; i < ARRAY_SIZE(iso7816_3_fi_table) && iso7816_3_fi_table[i] != f; i++); + return (i < ARRAY_SIZE(iso7816_3_fi_table) && iso7816_3_fi_table[i] == f); +} + +bool iso7816_3_valid_d(uint8_t d) +{ + if (0 == d) { + return false; + } + uint8_t i = 0; + for (i = 0; i < ARRAY_SIZE(iso7816_3_di_table) && iso7816_3_di_table[i] != d; i++); + return (i < ARRAY_SIZE(iso7816_3_di_table) && iso7816_3_di_table[i] == d); +} + +/* + * the ETU is not only used to define the baud rate, but also the Waiting Time (WT) (see ISO/IEC 7816-3 section 8.1) + * when exceeding WT without card response, the reader flags the card as unresponsive, and resets it + * this can be used by the card to indicate errors or unsupported operations + * if the card requires more time to respond, it shall send a procedure byte to restart WT + * WT is calculated as follows (for T=0, see ISO/IEC 7816-3 section 10.2): WT = WI x 960 x (Fi / f(max)) where + * - WI is encoded in TC2 in the ATR (10 if absent) + * - WI does not depend on D/Di (used for the ETU) + * - after reset WT is 9600 ETU + * - WI (e.g. the new WT) is applied when T=0 is used (after 6.3.1), even if Fi is not Fn (this WT extension is important to know for the reader so to have the right timeout) + */ + +int32_t iso7816_3_calculate_wt(uint8_t wi, uint16_t fi, uint8_t di, uint16_t f, uint8_t d) +{ + // sanity checks + if (0 == wi) { + return -1; + } + if (!iso7816_3_valid_f(fi)) { + return -2; + } + if (!iso7816_3_valid_d(di)) { + return -3; + } + if (!iso7816_3_valid_f(f)) { + return -4; + } + if (!iso7816_3_valid_d(d)) { + return -5; + } + if (f > fi) { + return -6; + } + if (d > di) { + return -7; + } + + return wi * 960UL * (fi/f) * (di/d); // calculate timeout value in ETU +} diff --git a/sysmoOCTSIM/iso7816_3.h b/sysmoOCTSIM/iso7816_3.h new file mode 100644 index 0000000..738d2a2 --- /dev/null +++ b/sysmoOCTSIM/iso7816_3.h @@ -0,0 +1,98 @@ +/* + * Copyright (C) 2019 sysmocom -s.f.m.c. GmbH, Author: Kevin Redon + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ +/* this library provides utilities to handle the ISO-7816 part 3 communication aspects (e.g. related to F and D) */ +#pragma once + +#include +#include + +/** default clock rate conversion integer Fd + * @implements ISO/IEC 7816-3:2006(E) section 8.1 + */ +#define ISO7816_3_DEFAULT_FD 372 +/** default baud rate adjustment factor Dd + * @implements ISO/IEC 7816-3:2006(E) section 8.1 + */ +#define ISO7816_3_DEFAULT_DD 1 +/** default clock rate conversion integer Fi + * @implements ISO/IEC 7816-3:2006(E) section 8.3 + * @note non-default value is optionally specified in TA1 + */ +#define ISO7816_3_DEFAULT_FI 372 +/** default baud rate adjustment factor Di + * @implements ISO/IEC 7816-3:2006(E) section 8.3 + * @note non-default value is optionally specified in TA1 + */ +#define ISO7816_3_DEFAULT_DI 1 +/** default maximum clock frequency, in Hz + * @implements ISO/IEC 7816-3:2006(E) section 8.3 + * @note non-default value is optionally specified in TA1 + */ +#define ISO7816_3_DEFAULT_FMAX 5000000UL +/** default Waiting Integer (WI) value for T=0 + * @implements ISO/IEC 7816-3:2006(E) section 10.2 + * @note non-default value is optionally specified in TC2 + */ +#define ISO7816_3_DEFAULT_WI 10 +/** default Waiting Time (WT) value, in ETU + * @implements ISO/IEC 7816-3:2006(E) section 8.1 + * @note depends on Fi, Di, and WI if protocol T=0 is selected + */ +#define ISO7816_3_DEFAULT_WT 9600 + +/** Table encoding the clock rate conversion integer Fi + * @note Fi is indicated in TA1, but the same table is used for F and Fn during PPS + * @implements ISO/IEC 7816-3:2006(E) table 7 + */ +extern const uint16_t iso7816_3_fi_table[]; + +/** Table encoding the maximum clock frequency f_max in Hz + * @implements ISO/IEC 7816-3:2006(E) table 7 + * @note f_max is indicated in TA1, but the same table is used for F and Fn during PPS + */ +extern const uint32_t iso7816_3_fmax_table[]; + +/** Table encoding the baud rate adjust integer Di + * @implements ISO/IEC 7816-3:2006(E) table 8 + * @note Di is indicated in TA1, but the same table is used for D and Dn during PPS + */ +extern const uint8_t iso7816_3_di_table[]; + +/* verify if the clock rate conversion integer F value is valid + * @param[in] f F value to be validated + * @return if F value is valid + * @note only values in ISO/IEC 7816-3:2006(E) table 7 are valid + */ +bool iso7816_3_valid_f(uint16_t f); +/* verify if the baud rate adjustment factor D value is valid + * @param[in] d D value to be validated + * @return if D value is valid + * @note only values in ISO/IEC 7816-3:2006(E) table 8 are valid + */ +bool iso7816_3_valid_d(uint8_t d); +/** calculate Waiting Time (WT) + * @param[in] wi Waiting Integer + * @param[in] fi clock rate conversion integer Fi value + * @param[in] di baud rate adjustment factor Di value + * @param[in] f clock rate conversion integer F value + * @param[in] d baud rate adjustment factor D value + * @return Waiting Time WT, in ETU, or < 0 on error (see code for return codes) + * @note this should happen after reset and T=0 protocol select (through PPS or implicit) + * @implements ISO/IEC 7816-3:2006(E) section 8.1 and 10.2 + */ +int32_t iso7816_3_calculate_wt(uint8_t wi, uint16_t fi, uint8_t di, uint16_t f, uint8_t d); -- To view, visit https://gerrit.osmocom.org/13846 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ice4eba380126ff92089b71d0ea328b0110f7ffec Gerrit-Change-Number: 13846 Gerrit-PatchSet: 1 Gerrit-Owner: K?vin Redon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 13:56:22 2019 From: gerrit-no-reply at lists.osmocom.org (=?UTF-8?Q?K=C3=A9vin_Redon?=) Date: Thu, 2 May 2019 13:56:22 +0000 Subject: Change in osmo-ccid-firmware[master]: add slot_set_isorate to the baud rate using ISO 7816 values Message-ID: K?vin Redon has uploaded this change for review. ( https://gerrit.osmocom.org/13847 Change subject: add slot_set_isorate to the baud rate using ISO 7816 values ...................................................................... add slot_set_isorate to the baud rate using ISO 7816 values Change-Id: I604f72bb28944962aee055e6d88a435827f79bec --- M sysmoOCTSIM/main.c 1 file changed, 38 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/47/13847/1 diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 70099e1..55e3bd9 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -30,6 +30,7 @@ #include "i2c_bitbang.h" #include "octsim_i2c.h" #include "ncn8025.h" +#include "iso7816_3.h" #include "command.h" @@ -158,6 +159,40 @@ return true; } +/** change ISO baud rate of card slot + * @param[in] slotnr slot number for which the baud rate should be set + * @param[in] clkdiv can clock divider + * @param[in] f clock rate conversion integer F + * @param[in] d baud rate adjustment factor D + * @return if the baud rate has been set, else a parameter is out of range + */ +static bool slot_set_isorate(uint8_t slotnr, enum ncn8025_sim_clkdiv clkdiv, uint16_t f, uint8_t d) +{ + // input checks + ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); + if (clkdiv != 1 && clkdiv != 2 && clkdiv != 4 && clkdiv != 8) { + return false; + } + if (!iso7816_3_valid_f(f)) { + return false; + } + if (!iso7816_3_valid_d(d)) { + return false; + } + + // set clockdiv + struct ncn8025_settings settings; + ncn8025_get(slotnr, &settings); + if (settings.clkdiv != clkdiv) { + settings.clkdiv = clkdiv; + ncn8025_set(slotnr, &settings); + } + + // set baud rate + uint32_t baudrate = ((20000000UL / (1 << clkdiv)) * d) / f; // calculate actual baud rate + return slot_set_baudrate(slotnr, baudrate); // // set baud rate +} + DEFUN(sim_status, cmd_sim_status, "sim-status", "Get state of specified NCN8025") { struct ncn8025_settings settings; @@ -322,10 +357,12 @@ // TODO wait some time for card to be completely deactivated usart_async_flush_rx_buffer(SIM_peripheral_descriptors[slotnr]); // flush RX buffer to start from scratch - slot_set_baudrate(slotnr, 2500000 / (372 / 1)); // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) + // set clock to lowest frequency (20 MHz / 8 = 2.5 MHz) // note: according to ISO/IEC 7816-3:2006 section 5.2.3 the minimum value is 1 MHz, and maximum is 5 MHz during activation settings.clkdiv = SIM_CLKDIV_8; + // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) + slot_set_isorate(slotnr, settings.clkdiv, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); // set card voltage to 3.0 V (the most supported) // note: according to ISO/IEC 7816-3:2006 no voltage should damage the card, and you should cycle from low to high settings.vsel = SIM_VOLT_3V0; -- To view, visit https://gerrit.osmocom.org/13847 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I604f72bb28944962aee055e6d88a435827f79bec Gerrit-Change-Number: 13847 Gerrit-PatchSet: 1 Gerrit-Owner: K?vin Redon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 14:02:25 2019 From: gerrit-no-reply at lists.osmocom.org (=?UTF-8?Q?K=C3=A9vin_Redon?=) Date: Thu, 2 May 2019 14:02:25 +0000 Subject: Change in osmo-ccid-firmware[master]: add slot_set_isorate to the baud rate using ISO 7816 values In-Reply-To: References: Message-ID: K?vin Redon has posted comments on this change. ( https://gerrit.osmocom.org/13847 ) Change subject: add slot_set_isorate to the baud rate using ISO 7816 values ...................................................................... Patch Set 1: Code-Review-1 bug found -- To view, visit https://gerrit.osmocom.org/13847 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I604f72bb28944962aee055e6d88a435827f79bec Gerrit-Change-Number: 13847 Gerrit-PatchSet: 1 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: K?vin Redon Gerrit-Comment-Date: Thu, 02 May 2019 14:02:25 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 14:06:53 2019 From: gerrit-no-reply at lists.osmocom.org (=?UTF-8?Q?K=C3=A9vin_Redon?=) Date: Thu, 2 May 2019 14:06:53 +0000 Subject: Change in osmo-ccid-firmware[master]: add slot_set_isorate to the baud rate using ISO 7816 values In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13847 to look at the new patch set (#2). Change subject: add slot_set_isorate to the baud rate using ISO 7816 values ...................................................................... add slot_set_isorate to the baud rate using ISO 7816 values Change-Id: I604f72bb28944962aee055e6d88a435827f79bec --- M sysmoOCTSIM/main.c 1 file changed, 55 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/47/13847/2 -- To view, visit https://gerrit.osmocom.org/13847 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I604f72bb28944962aee055e6d88a435827f79bec Gerrit-Change-Number: 13847 Gerrit-PatchSet: 2 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: K?vin Redon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 14:45:01 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 2 May 2019 14:45:01 +0000 Subject: Change in docker-playground[master]: Add retries for downloading debian "Release" file Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/13848 Change subject: Add retries for downloading debian "Release" file ...................................................................... Add retries for downloading debian "Release" file Use wget to download the "Release" file outside of the Dockerfile, then add the local file to the docker image, to make docker use its cache if the file did not change. Change-Id: Ib7c0ffd1e938349f2e1478d833abd351bc886bed --- M .gitignore M debian-jessie-build/Dockerfile M debian-stretch-build/Dockerfile M jenkins-common.sh 4 files changed, 31 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/48/13848/1 diff --git a/.gitignore b/.gitignore index a16a1a0..ea885c8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ .release + +# See download_debian_repo_release_with_retries() in jenkins-common.sh +Release diff --git a/debian-jessie-build/Dockerfile b/debian-jessie-build/Dockerfile index 29daff6..9d85ec9 100644 --- a/debian-jessie-build/Dockerfile +++ b/debian-jessie-build/Dockerfile @@ -2,7 +2,9 @@ MAINTAINER Harald Welte -ADD http://ftp.debian.org/debian/dists/jessie/Release /tmp/Release +# See download_debian_repo_release_with_retries() in jenkins-common.sh +ADD Release /tmp/Release + RUN apt-get update && \ apt-get upgrade -y && \ apt-get install -y --no-install-recommends \ diff --git a/debian-stretch-build/Dockerfile b/debian-stretch-build/Dockerfile index e262d86..1fc43a9 100644 --- a/debian-stretch-build/Dockerfile +++ b/debian-stretch-build/Dockerfile @@ -2,7 +2,9 @@ MAINTAINER Harald Welte -ADD http://ftp.debian.org/debian/dists/stretch/Release /tmp/Release +# See download_debian_repo_release_with_retries() in jenkins-common.sh +ADD Release /tmp/Release + RUN apt-get update && \ apt-get upgrade -y && \ apt-get install -y --no-install-recommends \ diff --git a/jenkins-common.sh b/jenkins-common.sh index a703a05..37b574a 100644 --- a/jenkins-common.sh +++ b/jenkins-common.sh @@ -2,6 +2,26 @@ test -n "$(docker images -q "$REPO_USER/$1")" } +# Have multiple attempts at downloading the "Release" file for the base debian images (debian-*-build), upon which all +# practically used images in docker-playground.git are based on. We copy that file into the docker image, to let it +# invalidate the cache after each release. Due to frequent download errors, we need to have the retry functionallity. +# $1: docker image name (e.g. "debian-stretch-build") +download_debian_repo_release_with_retries() { + local url="" + case "$1" in + debian-stretch-build) + url="http://ftp.debian.org/debian/dists/stretch/Release" + ;; + debian-jessie-build) + url="http://ftp.debian.org/debian/dists/jessie/Release" + ;; + *) + return + ;; + esac + wget --tries=10 "$url" -O "../$1/Release" +} + docker_images_require() { local from_line local pull_arg @@ -16,6 +36,8 @@ pull_arg="" fi + download_debian_repo_release_with_retries "$i" + echo "Building image: $i (export NO_DOCKER_IMAGE_BUILD=1 to prevent this)" PULL="$pull_arg" make -C "../$i" || exit 1 fi -- To view, visit https://gerrit.osmocom.org/13848 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ib7c0ffd1e938349f2e1478d833abd351bc886bed Gerrit-Change-Number: 13848 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 14:57:03 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 14:57:03 +0000 Subject: Change in docker-playground[master]: Add retries for downloading debian "Release" file In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13848 ) Change subject: Add retries for downloading debian "Release" file ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13848 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib7c0ffd1e938349f2e1478d833abd351bc886bed Gerrit-Change-Number: 13848 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: roh Gerrit-Comment-Date: Thu, 02 May 2019 14:57:03 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 15:00:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 15:00:16 +0000 Subject: Change in osmo-ccid-firmware[master]: add function to set baudrate In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13845 ) Change subject: add function to set baudrate ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13845 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I01db273f4c8170a4942049653c575010b93296ce Gerrit-Change-Number: 13845 Gerrit-PatchSet: 1 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 02 May 2019 15:00:16 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 15:00:38 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 15:00:38 +0000 Subject: Change in osmo-ccid-firmware[master]: add ISO 7816-3 definitions and utilities In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13846 ) Change subject: add ISO 7816-3 definitions and utilities ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13846 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ice4eba380126ff92089b71d0ea328b0110f7ffec Gerrit-Change-Number: 13846 Gerrit-PatchSet: 1 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 02 May 2019 15:00:38 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 15:00:59 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 15:00:59 +0000 Subject: Change in osmo-ccid-firmware[master]: add slot_set_isorate to the baud rate using ISO 7816 values In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13847 ) Change subject: add slot_set_isorate to the baud rate using ISO 7816 values ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13847 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I604f72bb28944962aee055e6d88a435827f79bec Gerrit-Change-Number: 13847 Gerrit-PatchSet: 2 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: K?vin Redon Gerrit-Comment-Date: Thu, 02 May 2019 15:00:59 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 15:02:46 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 15:02:46 +0000 Subject: Change in osmo-ccid-firmware[master]: switch UART_debug to ASYNC In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13673 ) Change subject: switch UART_debug to ASYNC ...................................................................... Patch Set 9: Code-Review-1 I still don't like the fact that this looses serial output pretty much all the time (e.g. if you type 'help' at the command line). I would prefer if the mechanism would use buffered writes, but end up blocking in case the write buffer is full - rather than simply dropping log output We can introduce a global counter of how often this blocking occurs and possibly use that counter (manually) to increase the #define for the buffer size if needed. -- To view, visit https://gerrit.osmocom.org/13673 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If18883e96f336aa9f6b11607859260da5e1503c7 Gerrit-Change-Number: 13673 Gerrit-PatchSet: 9 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 02 May 2019 15:02:46 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 15:03:04 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 15:03:04 +0000 Subject: Change in libosmocore[master]: gsm/gsm_utils.h: fix argument type of gsm_chan_t_name() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13844 ) Change subject: gsm/gsm_utils.h: fix argument type of gsm_chan_t_name() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13844 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ifc2121b23fb8d07589cc5b7aa8fbf4e27eb6b72b Gerrit-Change-Number: 13844 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Thu, 02 May 2019 15:03:04 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 15:03:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 15:03:05 +0000 Subject: Change in libosmocore[master]: gsm/gsm_utils.h: fix argument type of gsm_chan_t_name() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13844 ) Change subject: gsm/gsm_utils.h: fix argument type of gsm_chan_t_name() ...................................................................... gsm/gsm_utils.h: fix argument type of gsm_chan_t_name() The actual value-string array 'gsm_chan_t_names' describes the enum values of 'gsm_chan_t', not 'gsm48_chan_mode'. Change-Id: Ifc2121b23fb8d07589cc5b7aa8fbf4e27eb6b72b Fixes: CID#188831, CID#188825 --- M include/osmocom/gsm/gsm_utils.h 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/include/osmocom/gsm/gsm_utils.h b/include/osmocom/gsm/gsm_utils.h index 37df665..7a5da9a 100644 --- a/include/osmocom/gsm/gsm_utils.h +++ b/include/osmocom/gsm/gsm_utils.h @@ -230,7 +230,7 @@ }; extern const struct value_string gsm_chan_t_names[]; -static inline const char *gsm_chan_t_name(enum gsm48_chan_mode val) +static inline const char *gsm_chan_t_name(enum gsm_chan_t val) { return get_value_string(gsm_chan_t_names, val); } /* Deprectated functions */ -- To view, visit https://gerrit.osmocom.org/13844 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ifc2121b23fb8d07589cc5b7aa8fbf4e27eb6b72b Gerrit-Change-Number: 13844 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 15:03:43 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 15:03:43 +0000 Subject: Change in gr-gsm[master]: grgsm_capture: Fix device arguments In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13672 ) Change subject: grgsm_capture: Fix device arguments ...................................................................... grgsm_capture: Fix device arguments We need a space between numchan=1 and the rest of the device arguments otherwise when --args is specified it fails with RuntimeError: bad lexical cast $ grgsm_capture --args=soapy Traceback (most recent call last): File "/usr/local/bin/grgsm_capture", line 179, in device_args=options.device_args) File "/usr/local/bin/grgsm_capture", line 57, in __init__ osmosdr.source(args="numchan=1" + device_args ) File "/usr/local/lib64/python2.7/site-packages/osmosdr/osmosdr_swig.py", line 1170, in make return _osmosdr_swig.source_make(*args, **kwargs) RuntimeError: bad lexical cast: source type value could not be interpreted as target Change-Id: I2d1bcee835b695c91a5c44ec78a40b2d969f611c --- M apps/helpers/grgsm_capture 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Piotr Krysik: Looks good to me, approved; Verified Vadim Yanitskiy: Looks good to me, but someone else must approve diff --git a/apps/helpers/grgsm_capture b/apps/helpers/grgsm_capture index f698205..081544a 100755 --- a/apps/helpers/grgsm_capture +++ b/apps/helpers/grgsm_capture @@ -54,7 +54,8 @@ ################################################## self.sdr_source = \ - osmosdr.source(args="numchan=1" + device_args ) + osmosdr.source(args="numchan=" + str(1) + " " + device_args) + self.sdr_source.set_sample_rate(samp_rate) self.sdr_source.set_center_freq(freq, 0) self.sdr_source.set_freq_corr(freq_corr, 0) -- To view, visit https://gerrit.osmocom.org/13672 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: gr-gsm Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I2d1bcee835b695c91a5c44ec78a40b2d969f611c Gerrit-Change-Number: 13672 Gerrit-PatchSet: 2 Gerrit-Owner: Vasil Velichkov Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Piotr Krysik Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 15:11:38 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 2 May 2019 15:11:38 +0000 Subject: Change in docker-playground[master]: Add retries for downloading debian "Release" file In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/13848 ) Change subject: Add retries for downloading debian "Release" file ...................................................................... Patch Set 1: After looking at osmo-ci.git/docker/Dockerfile, I'm realizing that we don't download the Release file there. And I'm wondering now, if we need it at all. We are already basing off the related debian docker images, and we pull them before building our own docker image on top: https://git.osmocom.org/docker-playground/commit/?id=a8be3ff52fb209b7ea319632908bb27373482ceb Shouldn't this have the same effect, as downloading the Releasefile and using that to invalidate the cache? The latter was added here (before the "docker pull" thing was implemented): https://git.osmocom.org/docker-playground/commit/?id=2ae3487e01e86abda801de200a6b5011f704607e -- To view, visit https://gerrit.osmocom.org/13848 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib7c0ffd1e938349f2e1478d833abd351bc886bed Gerrit-Change-Number: 13848 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: osmith Gerrit-Reviewer: roh Gerrit-Comment-Date: Thu, 02 May 2019 15:11:38 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 16:00:20 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Thu, 2 May 2019 16:00:20 +0000 Subject: Change in osmo-mgw[master]: mgcp_internal: LOGPENDP: ensure *endp is not NULL Message-ID: lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/13849 Change subject: mgcp_internal: LOGPENDP: ensure *endp is not NULL ...................................................................... mgcp_internal: LOGPENDP: ensure *endp is not NULL In certain cases the endp can be NULL. LOGPENDP will dereference the pointer to retreive the endpoint number. Fixes: 8a893442a1e9 ("mgcp_internal: LOGPENDP: ensure *endp is not NULL") Change-Id: Ie9b5ecf08f69533ccb2fbd7fbbb529105e0c922f --- M include/osmocom/mgcp/mgcp_internal.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/49/13849/1 diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index 24e28b4..82ff6c8 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -338,7 +338,7 @@ #define LOGPENDP(endp, cat, level, fmt, args...) \ LOGP(cat, level, "endpoint:0x%x " fmt, \ - ENDPOINT_NUMBER(endp), \ + endp ? ENDPOINT_NUMBER(endp) : -1, \ ## args) #define LOGPCONN(conn, cat, level, fmt, args...) \ -- To view, visit https://gerrit.osmocom.org/13849 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ie9b5ecf08f69533ccb2fbd7fbbb529105e0c922f Gerrit-Change-Number: 13849 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 16:01:30 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Thu, 2 May 2019 16:01:30 +0000 Subject: Change in osmo-mgw[master]: mgcp_internal: LOGPENDP: ensure *endp is not NULL In-Reply-To: References: Message-ID: lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/13849 ) Change subject: mgcp_internal: LOGPENDP: ensure *endp is not NULL ...................................................................... Patch Set 1: will fix the TTCN3 issues. -- To view, visit https://gerrit.osmocom.org/13849 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie9b5ecf08f69533ccb2fbd7fbbb529105e0c922f Gerrit-Change-Number: 13849 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-CC: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 02 May 2019 16:01:30 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 16:04:22 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Thu, 2 May 2019 16:04:22 +0000 Subject: Change in docker-playground[master]: debian-stretch-titan: install procps Message-ID: lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/13850 Change subject: debian-stretch-titan: install procps ...................................................................... debian-stretch-titan: install procps The ttcn3-tcpdump-stop.sh uses `ps` to find out if tcpdump is still running. Change-Id: I8db4ad2262a3a734201e39bc065c1c383738992c --- M debian-stretch-titan/Dockerfile 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/50/13850/1 diff --git a/debian-stretch-titan/Dockerfile b/debian-stretch-titan/Dockerfile index 18aad4b..426eb91 100644 --- a/debian-stretch-titan/Dockerfile +++ b/debian-stretch-titan/Dockerfile @@ -22,6 +22,7 @@ apt-get -y install \ build-essential \ git \ + procps \ tcpdump \ vim \ && \ -- To view, visit https://gerrit.osmocom.org/13850 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I8db4ad2262a3a734201e39bc065c1c383738992c Gerrit-Change-Number: 13850 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 16:44:34 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 2 May 2019 16:44:34 +0000 Subject: Change in osmo-mgw[master]: mgcp_internal: LOGPENDP: ensure *endp is not NULL In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13849 ) Change subject: mgcp_internal: LOGPENDP: ensure *endp is not NULL ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13849 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie9b5ecf08f69533ccb2fbd7fbbb529105e0c922f Gerrit-Change-Number: 13849 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Thu, 02 May 2019 16:44:34 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 17:12:14 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 17:12:14 +0000 Subject: Change in osmo-ttcn3-hacks[master]: move imsi_hex2oct to Osmocom_Types.ttcn Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13851 Change subject: move imsi_hex2oct to Osmocom_Types.ttcn ...................................................................... move imsi_hex2oct to Osmocom_Types.ttcn This function is required not only for the MSC_Tests, but also for the upcoming Iu related SGSN tests Change-Id: Ic23669671ce79151046f2330726bb68542faeb0e --- M library/Osmocom_Types.ttcn M msc/BSC_ConnectionHandler.ttcn 2 files changed, 19 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/51/13851/1 diff --git a/library/Osmocom_Types.ttcn b/library/Osmocom_Types.ttcn index 90b2758..2a4f68c 100644 --- a/library/Osmocom_Types.ttcn +++ b/library/Osmocom_Types.ttcn @@ -133,5 +133,24 @@ return x; } +function imsi_hex2oct(hexstring imsi) return octetstring { + var hexstring tmp := ''H; + var octetstring ret; + var integer i; + + /* swap nibbles and pad with F if insufficient input nibbles */ + for (i := 0; i < lengthof(imsi); i := i+1) { + if (i+1 < lengthof(imsi)) { + tmp := tmp & imsi[i+1]; + } else { + tmp := tmp & 'F'H; + } + tmp := tmp & imsi[i]; + i := i+1; + } + ret := hex2oct(tmp); + return ret; +} + } with { encode "RAW"; variant "FIELDORDER(msb)" } diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index b1a0491..595f402 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -86,25 +86,6 @@ boolean ran_is_geran }; -function imsi_hex2oct(hexstring imsi) return octetstring { - var hexstring tmp := ''H; - var octetstring ret; - var integer i; - - /* swap nibbles and pad with F if insufficient input nibbles */ - for (i := 0; i < lengthof(imsi); i := i+1) { - if (i+1 < lengthof(imsi)) { - tmp := tmp & imsi[i+1]; - } else { - tmp := tmp & 'F'H; - } - tmp := tmp & imsi[i]; - i := i+1; - } - ret := hex2oct(tmp); - return ret; -} - /* get a one-octet bitmaks of supported algorithms based on Classmark information */ function f_alg_mask_from_cm(BSSMAP_IE_ClassmarkInformationType2 cm2) return OCT1 { var BIT8 res := '00000001'B; /* A5/0 always supported */ -- To view, visit https://gerrit.osmocom.org/13851 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ic23669671ce79151046f2330726bb68542faeb0e Gerrit-Change-Number: 13851 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 17:12:15 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 17:12:15 +0000 Subject: Change in osmo-ttcn3-hacks[master]: RAN_Adapter: More verbose logging Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13852 Change subject: RAN_Adapter: More verbose logging ...................................................................... RAN_Adapter: More verbose logging Change-Id: I16a2c4858d8cac65f39e37d23051fa77c15d4c6f --- M library/RAN_Adapter.ttcnpp 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/52/13852/1 diff --git a/library/RAN_Adapter.ttcnpp b/library/RAN_Adapter.ttcnpp index 53c8bac..27d22ca 100644 --- a/library/RAN_Adapter.ttcnpp +++ b/library/RAN_Adapter.ttcnpp @@ -143,15 +143,16 @@ timer T := 5.0; T.start; //T.timeout; - log("Connecting BSSMAP Emulation to SCCP_SP_PORT and starting emulation"); /* connect BSSNAP component to upper side of SCCP */ if (cfg.transport == RANAP_TRANSPORT_IuCS) { #ifdef RAN_EMULATION_RANAP + log("Connecting RANAP RAN_Emulation to SCCP_SP_PORT"); ops.protocol := RAN_PROTOCOL_RANAP connect(ba.vc_RAN:RANAP, ba.vc_SCCP:SCCP_SP_PORT); #endif } else { #ifdef RAN_EMULATION_BSSAP + log("Connecting BSSAP RAN_Emulation to SCCP_SP_PORT"); connect(ba.vc_RAN:BSSAP, ba.vc_SCCP:SCCP_SP_PORT); #endif } @@ -159,9 +160,11 @@ cfg.transport == BSSAP_TRANSPORT_SCCPlite_CLIENT) { #ifdef IPA_EMULATION_MGCP /* connect IPA MGCP port with BSSMAP MGCP port */ + log("Connecting MGCP RAN Emulation to IPA MGCP PORT"); connect(ba.vc_IPA:IPA_MGCP_PORT, ba.vc_RAN:MGCP); #endif } + log("Starting RAN_Emulation"); ba.vc_RAN.start(RAN_Emulation.main(valueof(ops), "")); } -- To view, visit https://gerrit.osmocom.org/13852 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I16a2c4858d8cac65f39e37d23051fa77c15d4c6f Gerrit-Change-Number: 13852 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 17:12:15 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 17:12:15 +0000 Subject: Change in osmo-ttcn3-hacks[master]: move as_iu_release_compl_disc from BSC_ConnHdlr to RAN_Emulation Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13853 Change subject: move as_iu_release_compl_disc from BSC_ConnHdlr to RAN_Emulation ...................................................................... move as_iu_release_compl_disc from BSC_ConnHdlr to RAN_Emulation ... this way other tests beyond MSC_Tests.ttcn can use it. Change-Id: If6d4bbbd09c6261bd665aa66e0d4d027aeaa4d16 --- M library/RAN_Emulation.ttcnpp M msc/BSC_ConnectionHandler.ttcn 2 files changed, 23 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/53/13853/1 diff --git a/library/RAN_Emulation.ttcnpp b/library/RAN_Emulation.ttcnpp index a74b6de..d6d74e2 100644 --- a/library/RAN_Emulation.ttcnpp +++ b/library/RAN_Emulation.ttcnpp @@ -1229,5 +1229,28 @@ } } +#ifdef RAN_EMULATION_RANAP +/* expect a IuReleaseCommand; Confirm that; expect SCCP-level N-DISCONNET.ind */ +altstep as_iu_release_compl_disc(float t := 5.0) runs on RAN_ConnHdlr { + var RANAP_PDU ranap; + [] BSSAP.receive(tr_RANAP_IuReleaseCommand(?)) { + BSSAP.send(ts_RANAP_IuReleaseComplete); + alt { + [] BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND) { + setverdict(pass); + } + [] BSSAP.receive { + setverdict(fail, "Unexpected RANAP while waiting for SCCP Release "); + mtc.stop; + } + } + } + [] BSSAP.receive(RANAP_PDU:?) -> value ranap{ + setverdict(fail, "Unexpected RANAP while waiting for IuReleaseCommand", ranap); + mtc.stop; + } +} +#endif + } diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 595f402..1750bf5 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -1015,27 +1015,6 @@ } } -/* expect a IuReleaseCommand; Confirm that; expect SCCP-level N-DISCONNET.ind */ -altstep as_iu_release_compl_disc(float t := 5.0) runs on BSC_ConnHdlr { - var RANAP_PDU ranap; - [] BSSAP.receive(tr_RANAP_IuReleaseCommand(?)) { - BSSAP.send(ts_RANAP_IuReleaseComplete); - alt { - [] BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND) { - setverdict(pass); - } - [] BSSAP.receive { - setverdict(fail, "Unexpected RANAP while waiting for SCCP Release "); - mtc.stop; - } - } - } - [] BSSAP.receive(RANAP_PDU:?) -> value ranap{ - setverdict(fail, "Unexpected RANAP while waiting for IuReleaseCommand", ranap); - mtc.stop; - } -} - function f_expect_clear(float t := 5.0) runs on BSC_ConnHdlr { timer T := t; -- To view, visit https://gerrit.osmocom.org/13853 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If6d4bbbd09c6261bd665aa66e0d4d027aeaa4d16 Gerrit-Change-Number: 13853 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 17:12:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 17:12:16 +0000 Subject: Change in osmo-ttcn3-hacks[master]: RAN_Emulation: Support for PS domain Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13854 Change subject: RAN_Emulation: Support for PS domain ...................................................................... RAN_Emulation: Support for PS domain So far, the RAN_Emulation only supported the CS domain, and not PS. Let's change that so we can start having IuPS related tests. Change-Id: I7ba4662e5a7ba31a2582b0c133b3140c8057678f --- M library/RAN_Emulation.ttcnpp 1 file changed, 92 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/54/13854/1 diff --git a/library/RAN_Emulation.ttcnpp b/library/RAN_Emulation.ttcnpp index d6d74e2..7c5a18d 100644 --- a/library/RAN_Emulation.ttcnpp +++ b/library/RAN_Emulation.ttcnpp @@ -88,6 +88,17 @@ PDU_ML3_NW_MS dtap } +type record PDU_DTAP_PS_MO { + OCT1 dlci optional, + boolean skip_seq_patching optional, + PDU_L3_MS_SGSN dtap +} + +type record PDU_DTAP_PS_MT { + OCT1 dlci optional, + PDU_L3_SGSN_MS dtap +} + template PDU_DTAP_MT ts_PDU_DTAP_MT(template PDU_ML3_NW_MS dtap, template OCT1 dlci := omit) := { dlci := dlci, dtap := dtap @@ -110,6 +121,29 @@ dtap := dtap } +template (value) PDU_DTAP_PS_MT ts_PDU_DTAP_PS_MT(template (value) PDU_L3_SGSN_MS dtap, template (omit) OCT1 dlci := omit) := { + dlci := dlci, + dtap := dtap +} + +template (value) PDU_DTAP_PS_MO ts_PDU_DTAP_PS_MO(template (value) PDU_L3_MS_SGSN dtap, template (value) OCT1 dlci := '00'O, + boolean skip_seq_patching := false) := { + dlci := dlci, + skip_seq_patching := skip_seq_patching, + dtap := dtap +} + +template PDU_DTAP_PS_MT tr_PDU_DTAP_PS_MT(template PDU_L3_SGSN_MS dtap, template OCT1 dlci := *) := { + dlci := dlci, + dtap := dtap +} + +template PDU_DTAP_PS_MO tr_PDU_DTAP_PS_MO(template PDU_L3_MS_SGSN dtap, template OCT1 dlci := *) := { + dlci := dlci, + skip_seq_patching := ?, + dtap := dtap +} + /* port between individual per-connection components and this dispatcher */ type port RAN_Conn_PT message { inout @@ -129,6 +163,7 @@ #endif /* direct DTAP messages from/to clients */ PDU_DTAP_MO, PDU_DTAP_MT, + PDU_DTAP_PS_MO, PDU_DTAP_PS_MT, /* misc indications / requests between SCCP and client */ RAN_Conn_Prim; } with { extension "internal" }; @@ -536,24 +571,46 @@ var template (omit) OCT1 dlci := fake_dlci_from_sapi(sapi); if (g_ran_ops.role_ms) { /* we are the MS, so any message to us must be MT */ - var PDU_DTAP_MT mt := { - dlci := omit, - dtap := dec_PDU_ML3_NW_MS(valueof(l3)) - }; - if (isvalue(dlci)) { - mt.dlci := valueof(dlci) + if (g_ran_ops.ps_domain) { + var PDU_DTAP_PS_MT mt := { + dlci := omit, + dtap := dec_PDU_L3_SGSN_MS(valueof(l3)) + }; + if (isvalue(dlci)) { + mt.dlci := valueof(dlci); + } + CLIENT.send(mt) to client; + } else { + var PDU_DTAP_MT mt := { + dlci := omit, + dtap := dec_PDU_ML3_NW_MS(valueof(l3)) + }; + if (isvalue(dlci)) { + mt.dlci := valueof(dlci) + } + CLIENT.send(mt) to client; } - CLIENT.send(mt) to client; } else { /* we are the Network, so any message to us must be MO */ - var PDU_DTAP_MO mo := { - dlci := omit, - dtap := dec_PDU_ML3_MS_NW(valueof(l3)) - }; - if (isvalue(dlci)) { - mo.dlci := valueof(dlci) + if (g_ran_ops.ps_domain) { + var PDU_DTAP_PS_MO mo := { + dlci := omit, + dtap := dec_PDU_L3_MS_SGSN(valueof(l3)) + }; + if (isvalue(dlci)) { + mo.dlci := valueof(dlci); + } + CLIENT.send(mo) to client; + } else { + var PDU_DTAP_MO mo := { + dlci := omit, + dtap := dec_PDU_ML3_MS_NW(valueof(l3)) + }; + if (isvalue(dlci)) { + mo.dlci := valueof(dlci) + } + CLIENT.send(mo) to client; } - CLIENT.send(mo) to client; } } } @@ -840,6 +897,8 @@ var RANAP_Conn_Req creq; var RANAP_PDU ranap; var RAN_ConnHdlr vc_conn; + var PDU_DTAP_PS_MO ps_mo; + var PDU_DTAP_PS_MT ps_mt; /* SCCP -> Client: UNIT-DATA (connectionless SCCP) from a BSC */ [] RANAP.receive(RANAP_N_UNITDATA_ind:?) -> value rud_ind { @@ -934,6 +993,25 @@ } } + [g_ran_ops.role_ms] CLIENT.receive(PDU_DTAP_PS_MO:?) -> value ps_mo sender vc_conn { + var integer idx := f_idx_by_comp(vc_conn); + /* convert from decoded DTAP to encoded DTAP */ + var octetstring l3_enc := enc_PDU_L3_MS_SGSN(ps_mo.dtap); + /* patch correct L3 send sequence number N(SD) into l3_enc */ + if (ps_mo.skip_seq_patching == false) { + //f_ML3_patch_seq(ConnectionTable[idx], ps_mo.dtap, l3_enc); + } + f_xmit_raw_l3(ConnectionTable[idx].sccp_conn_id, ps_mo.dlci, l3_enc); + } + + [not g_ran_ops.role_ms] CLIENT.receive(PDU_DTAP_PS_MT:?) -> value ps_mt sender vc_conn { + var integer idx := f_idx_by_comp(vc_conn); + /* convert from decoded DTAP to encoded DTAP */ + var octetstring l3_enc := enc_PDU_L3_SGSN_MS(ps_mt.dtap); + f_xmit_raw_l3(ConnectionTable[idx].sccp_conn_id, ps_mt.dlci, l3_enc); + } + + #else [false] CLIENT.receive {} #endif -- To view, visit https://gerrit.osmocom.org/13854 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I7ba4662e5a7ba31a2582b0c133b3140c8057678f Gerrit-Change-Number: 13854 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 17:16:02 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 17:16:02 +0000 Subject: Change in osmo-ttcn3-hacks[master]: move imsi_hex2oct to Osmocom_Types.ttcn In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13851 ) Change subject: move imsi_hex2oct to Osmocom_Types.ttcn ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13851 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic23669671ce79151046f2330726bb68542faeb0e Gerrit-Change-Number: 13851 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 02 May 2019 17:16:02 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 17:16:14 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 17:16:14 +0000 Subject: Change in osmo-ttcn3-hacks[master]: RAN_Adapter: More verbose logging In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13852 ) Change subject: RAN_Adapter: More verbose logging ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13852 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I16a2c4858d8cac65f39e37d23051fa77c15d4c6f Gerrit-Change-Number: 13852 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 02 May 2019 17:16:14 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 17:16:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 17:16:47 +0000 Subject: Change in osmo-ttcn3-hacks[master]: move as_iu_release_compl_disc from BSC_ConnHdlr to RAN_Emulation In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13853 ) Change subject: move as_iu_release_compl_disc from BSC_ConnHdlr to RAN_Emulation ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13853 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If6d4bbbd09c6261bd665aa66e0d4d027aeaa4d16 Gerrit-Change-Number: 13853 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 02 May 2019 17:16:47 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 17:17:01 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 17:17:01 +0000 Subject: Change in osmo-ttcn3-hacks[master]: move imsi_hex2oct to Osmocom_Types.ttcn In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13851 ) Change subject: move imsi_hex2oct to Osmocom_Types.ttcn ...................................................................... move imsi_hex2oct to Osmocom_Types.ttcn This function is required not only for the MSC_Tests, but also for the upcoming Iu related SGSN tests Change-Id: Ic23669671ce79151046f2330726bb68542faeb0e --- M library/Osmocom_Types.ttcn M msc/BSC_ConnectionHandler.ttcn 2 files changed, 19 insertions(+), 19 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/library/Osmocom_Types.ttcn b/library/Osmocom_Types.ttcn index 90b2758..2a4f68c 100644 --- a/library/Osmocom_Types.ttcn +++ b/library/Osmocom_Types.ttcn @@ -133,5 +133,24 @@ return x; } +function imsi_hex2oct(hexstring imsi) return octetstring { + var hexstring tmp := ''H; + var octetstring ret; + var integer i; + + /* swap nibbles and pad with F if insufficient input nibbles */ + for (i := 0; i < lengthof(imsi); i := i+1) { + if (i+1 < lengthof(imsi)) { + tmp := tmp & imsi[i+1]; + } else { + tmp := tmp & 'F'H; + } + tmp := tmp & imsi[i]; + i := i+1; + } + ret := hex2oct(tmp); + return ret; +} + } with { encode "RAW"; variant "FIELDORDER(msb)" } diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index b1a0491..595f402 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -86,25 +86,6 @@ boolean ran_is_geran }; -function imsi_hex2oct(hexstring imsi) return octetstring { - var hexstring tmp := ''H; - var octetstring ret; - var integer i; - - /* swap nibbles and pad with F if insufficient input nibbles */ - for (i := 0; i < lengthof(imsi); i := i+1) { - if (i+1 < lengthof(imsi)) { - tmp := tmp & imsi[i+1]; - } else { - tmp := tmp & 'F'H; - } - tmp := tmp & imsi[i]; - i := i+1; - } - ret := hex2oct(tmp); - return ret; -} - /* get a one-octet bitmaks of supported algorithms based on Classmark information */ function f_alg_mask_from_cm(BSSMAP_IE_ClassmarkInformationType2 cm2) return OCT1 { var BIT8 res := '00000001'B; /* A5/0 always supported */ -- To view, visit https://gerrit.osmocom.org/13851 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ic23669671ce79151046f2330726bb68542faeb0e Gerrit-Change-Number: 13851 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 17:17:01 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 17:17:01 +0000 Subject: Change in osmo-ttcn3-hacks[master]: RAN_Adapter: More verbose logging In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13852 ) Change subject: RAN_Adapter: More verbose logging ...................................................................... RAN_Adapter: More verbose logging Change-Id: I16a2c4858d8cac65f39e37d23051fa77c15d4c6f --- M library/RAN_Adapter.ttcnpp 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/library/RAN_Adapter.ttcnpp b/library/RAN_Adapter.ttcnpp index 53c8bac..27d22ca 100644 --- a/library/RAN_Adapter.ttcnpp +++ b/library/RAN_Adapter.ttcnpp @@ -143,15 +143,16 @@ timer T := 5.0; T.start; //T.timeout; - log("Connecting BSSMAP Emulation to SCCP_SP_PORT and starting emulation"); /* connect BSSNAP component to upper side of SCCP */ if (cfg.transport == RANAP_TRANSPORT_IuCS) { #ifdef RAN_EMULATION_RANAP + log("Connecting RANAP RAN_Emulation to SCCP_SP_PORT"); ops.protocol := RAN_PROTOCOL_RANAP connect(ba.vc_RAN:RANAP, ba.vc_SCCP:SCCP_SP_PORT); #endif } else { #ifdef RAN_EMULATION_BSSAP + log("Connecting BSSAP RAN_Emulation to SCCP_SP_PORT"); connect(ba.vc_RAN:BSSAP, ba.vc_SCCP:SCCP_SP_PORT); #endif } @@ -159,9 +160,11 @@ cfg.transport == BSSAP_TRANSPORT_SCCPlite_CLIENT) { #ifdef IPA_EMULATION_MGCP /* connect IPA MGCP port with BSSMAP MGCP port */ + log("Connecting MGCP RAN Emulation to IPA MGCP PORT"); connect(ba.vc_IPA:IPA_MGCP_PORT, ba.vc_RAN:MGCP); #endif } + log("Starting RAN_Emulation"); ba.vc_RAN.start(RAN_Emulation.main(valueof(ops), "")); } -- To view, visit https://gerrit.osmocom.org/13852 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I16a2c4858d8cac65f39e37d23051fa77c15d4c6f Gerrit-Change-Number: 13852 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 17:17:02 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 17:17:02 +0000 Subject: Change in osmo-ttcn3-hacks[master]: move as_iu_release_compl_disc from BSC_ConnHdlr to RAN_Emulation In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13853 ) Change subject: move as_iu_release_compl_disc from BSC_ConnHdlr to RAN_Emulation ...................................................................... move as_iu_release_compl_disc from BSC_ConnHdlr to RAN_Emulation ... this way other tests beyond MSC_Tests.ttcn can use it. Change-Id: If6d4bbbd09c6261bd665aa66e0d4d027aeaa4d16 --- M library/RAN_Emulation.ttcnpp M msc/BSC_ConnectionHandler.ttcn 2 files changed, 23 insertions(+), 21 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/library/RAN_Emulation.ttcnpp b/library/RAN_Emulation.ttcnpp index a74b6de..d6d74e2 100644 --- a/library/RAN_Emulation.ttcnpp +++ b/library/RAN_Emulation.ttcnpp @@ -1229,5 +1229,28 @@ } } +#ifdef RAN_EMULATION_RANAP +/* expect a IuReleaseCommand; Confirm that; expect SCCP-level N-DISCONNET.ind */ +altstep as_iu_release_compl_disc(float t := 5.0) runs on RAN_ConnHdlr { + var RANAP_PDU ranap; + [] BSSAP.receive(tr_RANAP_IuReleaseCommand(?)) { + BSSAP.send(ts_RANAP_IuReleaseComplete); + alt { + [] BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND) { + setverdict(pass); + } + [] BSSAP.receive { + setverdict(fail, "Unexpected RANAP while waiting for SCCP Release "); + mtc.stop; + } + } + } + [] BSSAP.receive(RANAP_PDU:?) -> value ranap{ + setverdict(fail, "Unexpected RANAP while waiting for IuReleaseCommand", ranap); + mtc.stop; + } +} +#endif + } diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 595f402..1750bf5 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -1015,27 +1015,6 @@ } } -/* expect a IuReleaseCommand; Confirm that; expect SCCP-level N-DISCONNET.ind */ -altstep as_iu_release_compl_disc(float t := 5.0) runs on BSC_ConnHdlr { - var RANAP_PDU ranap; - [] BSSAP.receive(tr_RANAP_IuReleaseCommand(?)) { - BSSAP.send(ts_RANAP_IuReleaseComplete); - alt { - [] BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND) { - setverdict(pass); - } - [] BSSAP.receive { - setverdict(fail, "Unexpected RANAP while waiting for SCCP Release "); - mtc.stop; - } - } - } - [] BSSAP.receive(RANAP_PDU:?) -> value ranap{ - setverdict(fail, "Unexpected RANAP while waiting for IuReleaseCommand", ranap); - mtc.stop; - } -} - function f_expect_clear(float t := 5.0) runs on BSC_ConnHdlr { timer T := t; -- To view, visit https://gerrit.osmocom.org/13853 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If6d4bbbd09c6261bd665aa66e0d4d027aeaa4d16 Gerrit-Change-Number: 13853 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 17:17:15 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 17:17:15 +0000 Subject: Change in docker-playground[master]: debian-stretch-titan: install procps In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13850 ) Change subject: debian-stretch-titan: install procps ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13850 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8db4ad2262a3a734201e39bc065c1c383738992c Gerrit-Change-Number: 13850 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Thu, 02 May 2019 17:17:15 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 17:17:29 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 17:17:29 +0000 Subject: Change in osmo-mgw[master]: mgcp_internal: LOGPENDP: ensure *endp is not NULL In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13849 ) Change subject: mgcp_internal: LOGPENDP: ensure *endp is not NULL ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13849 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie9b5ecf08f69533ccb2fbd7fbbb529105e0c922f Gerrit-Change-Number: 13849 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Thu, 02 May 2019 17:17:29 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 17:17:30 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 17:17:30 +0000 Subject: Change in osmo-mgw[master]: mgcp_internal: LOGPENDP: ensure *endp is not NULL In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13849 ) Change subject: mgcp_internal: LOGPENDP: ensure *endp is not NULL ...................................................................... mgcp_internal: LOGPENDP: ensure *endp is not NULL In certain cases the endp can be NULL. LOGPENDP will dereference the pointer to retreive the endpoint number. Fixes: 8a893442a1e9 ("mgcp_internal: LOGPENDP: ensure *endp is not NULL") Change-Id: Ie9b5ecf08f69533ccb2fbd7fbbb529105e0c922f --- M include/osmocom/mgcp/mgcp_internal.h 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Pau Espin Pedrol: Looks good to me, approved Harald Welte: Looks good to me, approved diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index 24e28b4..82ff6c8 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -338,7 +338,7 @@ #define LOGPENDP(endp, cat, level, fmt, args...) \ LOGP(cat, level, "endpoint:0x%x " fmt, \ - ENDPOINT_NUMBER(endp), \ + endp ? ENDPOINT_NUMBER(endp) : -1, \ ## args) #define LOGPCONN(conn, cat, level, fmt, args...) \ -- To view, visit https://gerrit.osmocom.org/13849 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie9b5ecf08f69533ccb2fbd7fbbb529105e0c922f Gerrit-Change-Number: 13849 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 21:07:25 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 2 May 2019 21:07:25 +0000 Subject: Change in gr-gsm[master]: Filter out SoapyAudio devices In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13812 ) Change subject: Filter out SoapyAudio devices ...................................................................... Patch Set 2: Code-Review+1 (2 comments) https://gerrit.osmocom.org/#/c/13812/2/apps/grgsm_scanner File apps/grgsm_scanner: https://gerrit.osmocom.org/#/c/13812/2/apps/grgsm_scanner at 391 PS2, Line 391: ." Looks like a space is missing here. https://gerrit.osmocom.org/#/c/13812/2/python/misc_utils/device.py File python/misc_utils/device.py: https://gerrit.osmocom.org/#/c/13812/2/python/misc_utils/device.py at 1 PS2, Line 1: import osmosdr Please add the license header. -- To view, visit https://gerrit.osmocom.org/13812 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: gr-gsm Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib84081041ca6c2bc18b9da0c32bac9d3ecef65ca Gerrit-Change-Number: 13812 Gerrit-PatchSet: 2 Gerrit-Owner: Vasil Velichkov Gerrit-Reviewer: Piotr Krysik Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 02 May 2019 21:07:25 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 21:22:45 2019 From: gerrit-no-reply at lists.osmocom.org (Vasil Velichkov) Date: Thu, 2 May 2019 21:22:45 +0000 Subject: Change in gr-gsm[master]: Filter out SoapyAudio devices In-Reply-To: References: Message-ID: Hello Piotr Krysik, Vadim Yanitskiy, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13812 to look at the new patch set (#3). Change subject: Filter out SoapyAudio devices ...................................................................... Filter out SoapyAudio devices When gr-osmosdr is compiled with SoapySDR support and SoapyAudio is installed the audio device is picked as a first choice when detecting devices but grgsm tools are not able to work with audio devices. So in such cases the user has to always specify the correct SDR device in the args parameter which is a bit inconvenient. When args is not specified call osmosdr.device_find to get all devices and filter out unspported ones like SoapyAudio devices. When args is specifed just try to create osmosdr.source with whatever value has been specified. Add -l and --list-devices command line option that prints information about all detected devices. Example commands: grgsm_capture --list-devices grgsm_capture --list-devices --args=nofake grgsm_capture --args=uhd,type=b210 -a 111 capture.cfile grgsm_livemon --args=rtl grgsm_livemon --args=uhd,type=b210 Change-Id: Ib84081041ca6c2bc18b9da0c32bac9d3ecef65ca --- M apps/grgsm_livemon.grc M apps/grgsm_livemon_headless.grc M apps/grgsm_scanner M apps/helpers/grgsm_capture M python/__init__.py M python/misc_utils/CMakeLists.txt A python/misc_utils/device.py 7 files changed, 89 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/gr-gsm refs/changes/12/13812/3 -- To view, visit https://gerrit.osmocom.org/13812 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: gr-gsm Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib84081041ca6c2bc18b9da0c32bac9d3ecef65ca Gerrit-Change-Number: 13812 Gerrit-PatchSet: 3 Gerrit-Owner: Vasil Velichkov Gerrit-Reviewer: Piotr Krysik Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 21:25:35 2019 From: gerrit-no-reply at lists.osmocom.org (Vasil Velichkov) Date: Thu, 2 May 2019 21:25:35 +0000 Subject: Change in gr-gsm[master]: Filter out SoapyAudio devices In-Reply-To: References: Message-ID: Vasil Velichkov has posted comments on this change. ( https://gerrit.osmocom.org/13812 ) Change subject: Filter out SoapyAudio devices ...................................................................... Patch Set 3: (2 comments) https://gerrit.osmocom.org/#/c/13812/2/apps/grgsm_scanner File apps/grgsm_scanner: https://gerrit.osmocom.org/#/c/13812/2/apps/grgsm_scanner at 391 PS2, Line 391: ." > Looks like a space is missing here. Done https://gerrit.osmocom.org/#/c/13812/2/python/misc_utils/device.py File python/misc_utils/device.py: https://gerrit.osmocom.org/#/c/13812/2/python/misc_utils/device.py at 1 PS2, Line 1: #!/usr/bin/env python > Please add the license header. Done -- To view, visit https://gerrit.osmocom.org/13812 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: gr-gsm Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib84081041ca6c2bc18b9da0c32bac9d3ecef65ca Gerrit-Change-Number: 13812 Gerrit-PatchSet: 3 Gerrit-Owner: Vasil Velichkov Gerrit-Reviewer: Piotr Krysik Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: Vasil Velichkov Gerrit-Comment-Date: Thu, 02 May 2019 21:25:35 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 22:58:02 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 2 May 2019 22:58:02 +0000 Subject: Change in osmocom-bb[master]: mobile/gsm322.c: fix heap-use-after-free in gsm322_unselect_cell() Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13855 Change subject: mobile/gsm322.c: fix heap-use-after-free in gsm322_unselect_cell() ...................................................................... mobile/gsm322.c: fix heap-use-after-free in gsm322_unselect_cell() In gsm322_l1_signal(), if S_L1CTL_FBSB_ERR is received, we free stored System Information of the current cell, but cs->si may still point to it. Let's set it to NULL. Found with AddressSanitizer: DL1C ERROR l1ctl.c:96 FBSB RESP: result=255 DCS INFO gsm322.c:2995 Channel sync error, try again DCS INFO gsm322.c:467 Sync to ARFCN=860(DCS) rxlev=-106 DRR INFO gsm48_rr.c:665 MON: no cell info DRR INFO gsm48_rr.c:665 MON: no cell info DRR INFO gsm48_rr.c:665 MON: no cell info DRR INFO gsm48_rr.c:665 MON: no cell info DL1C ERROR l1ctl.c:96 FBSB RESP: result=255 DCS INFO gsm322.c:3008 Channel sync error. DCS DEBUG gsm322.c:3013 free sysinfo ARFCN=860(DCS) DCS INFO gsm322.c:3020 Unselect cell due to sync error! DCS INFO gsm322.c:509 Unselecting serving cell. ================================================================= ==6014==ERROR: AddressSanitizer: heap-use-after-free on address 0x61b0000000e6 at pc 0x00000050d6dd bp 0x7fff7f84aa60 sp 0x7fff7f84aa58 Change-Id: I9cc526c18d69695d810de98703579818408de011 --- M src/host/layer23/src/mobile/gsm322.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/55/13855/1 diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index 7da63e3..bfe6329 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -3011,6 +3011,8 @@ cs->list[cs->arfci].flags &= ~GSM322_CS_FLAG_SYSINFO; LOGP(DCS, LOGL_DEBUG, "free sysinfo ARFCN=%s\n", gsm_print_arfcn(index2arfcn(cs->arfci))); + if (cs->si == cs->list[cs->arfci].sysinfo) + cs->si = NULL; talloc_free(cs->list[cs->arfci].sysinfo); cs->list[cs->arfci].sysinfo = NULL; -- To view, visit https://gerrit.osmocom.org/13855 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I9cc526c18d69695d810de98703579818408de011 Gerrit-Change-Number: 13855 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 22:58:03 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 2 May 2019 22:58:03 +0000 Subject: Change in osmocom-bb[master]: mobile/gsm48_rr.h: mark gsm48_rr_hdr struct as packed Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13856 Change subject: mobile/gsm48_rr.h: mark gsm48_rr_hdr struct as packed ...................................................................... mobile/gsm48_rr.h: mark gsm48_rr_hdr struct as packed In both gsm48_mm.c and gsm48_rr.c we put / push 'gsm48_rr_hdr' structure into the message buffers, so then it's retrieved by the message receivers. The AddressSanitizer complains about unaligned pointer access and potentially unexpected behaviour. Change-Id: I8aa2c0074b405afd0e76044ef076b6819fe1083b --- M src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/56/13856/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h b/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h index 6235bfd..6996ff3 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h +++ b/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h @@ -61,7 +61,7 @@ uint32_t msg_type; /* RR-* primitive */ uint8_t sapi; uint8_t cause; -}; +} __attribute__((packed)); /* GSM 04.07 9.1.1 */ #define GSM48_RR_ST_IDLE 0 -- To view, visit https://gerrit.osmocom.org/13856 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I8aa2c0074b405afd0e76044ef076b6819fe1083b Gerrit-Change-Number: 13856 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 22:58:03 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 2 May 2019 22:58:03 +0000 Subject: Change in osmocom-bb[master]: mobile/gsm48_mm.c: use proper types for gsm48_rr_hdr Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13857 Change subject: mobile/gsm48_mm.c: use proper types for gsm48_rr_hdr ...................................................................... mobile/gsm48_mm.c: use proper types for gsm48_rr_hdr Change-Id: I29ed122b8956260b9f847cc0e3e81a28d6762632 --- M src/host/layer23/src/mobile/gsm48_mm.c 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/57/13857/1 diff --git a/src/host/layer23/src/mobile/gsm48_mm.c b/src/host/layer23/src/mobile/gsm48_mm.c index 02d861e..872dce5 100644 --- a/src/host/layer23/src/mobile/gsm48_mm.c +++ b/src/host/layer23/src/mobile/gsm48_mm.c @@ -3583,7 +3583,7 @@ */ static int gsm48_rcv_rr_sapi3(struct osmocom_ms *ms, struct msgb *msg, - int msg_type, uint8_t sapi) + uint32_t msg_type, uint8_t sapi) { struct gsm48_mmlayer *mm = &ms->mmlayer; struct gsm48_mm_conn *conn; @@ -3895,12 +3895,12 @@ { struct gsm48_mmlayer *mm = &ms->mmlayer; struct gsm48_rr_hdr *rrh = (struct gsm48_rr_hdr *)msg->data; - int msg_type = rrh->msg_type; - int sapi = rrh->sapi; + uint32_t msg_type = rrh->msg_type; + uint8_t sapi = rrh->sapi; int i, rc; LOGP(DMM, LOGL_INFO, "(ms %s) Received '%s' from RR in state %s " - "(sapi %d)\n", ms->name, get_rr_name(msg_type), + "(sapi %u)\n", ms->name, get_rr_name(msg_type), gsm48_mm_state_names[mm->state], sapi); if (sapi) @@ -3969,7 +3969,7 @@ { struct gsm48_mmlayer *mm = &ms->mmlayer; struct gsm48_rr_hdr *rrh = (struct gsm48_rr_hdr *)msg->data; - int sapi = rrh->sapi; + uint8_t sapi = rrh->sapi; struct gsm48_hdr *gh = msgb_l3(msg); uint8_t pdisc = gh->proto_discr & 0x0f; uint8_t msg_type = gh->msg_type & 0xbf; -- To view, visit https://gerrit.osmocom.org/13857 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I29ed122b8956260b9f847cc0e3e81a28d6762632 Gerrit-Change-Number: 13857 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 23:44:49 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 23:44:49 +0000 Subject: Change in osmo-ttcn3-hacks[master]: sgsn: Integrate RANAP In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13754 to look at the new patch set (#4). Change subject: sgsn: Integrate RANAP ...................................................................... sgsn: Integrate RANAP Integrate RANAP support to SGSN_Tests.ttcn. Related: OS#2857 Change-Id: Ib62fc4c6007f6f4c47db7ca096a8d629bc72bb22 --- M sgsn/SGSN_Tests.ttcn M sgsn/gen_links.sh M sgsn/regen_makefile.sh 3 files changed, 104 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/54/13754/4 -- To view, visit https://gerrit.osmocom.org/13754 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib62fc4c6007f6f4c47db7ca096a8d629bc72bb22 Gerrit-Change-Number: 13754 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 23:44:50 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 23:44:50 +0000 Subject: Change in osmo-ttcn3-hacks[master]: SGSN_Tests: Make f_gmm_attach() and f_gmm_auth() work on gb_idx != 0 Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13858 Change subject: SGSN_Tests: Make f_gmm_attach() and f_gmm_auth() work on gb_idx != 0 ...................................................................... SGSN_Tests: Make f_gmm_attach() and f_gmm_auth() work on gb_idx != 0 Let's make sure the related functions can be used on other gb_idx, i.e. via another Gb interface (and hence simulated RAN/PCU) than the first one. Change-Id: Ie88cbf0c70269cc3e2c2fd2a0c65c8f2130ec2b1 --- M sgsn/SGSN_Tests.ttcn 1 file changed, 32 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/58/13858/1 diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index c096905..a4934ae 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -454,28 +454,41 @@ f_send_llc(ts_LLC_UI(l3_enc, sapi, '0'B, n_u)); } -altstep as_mm_identity() runs on BSSGP_ConnHdlr { +altstep as_mm_identity(integer gb_idx := 0) runs on BSSGP_ConnHdlr { var MobileL3_CommonIE_Types.MobileIdentityLV mi; - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('001'B))) { + [] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('001'B))) { mi := valueof(ts_MI_IMSI_LV(g_pars.imsi)); - f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi)); + f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi), gb_idx); repeat; } - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('010'B))) { + [] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('010'B))) { mi := valueof(ts_MI_IMEI_LV(g_pars.imei)); - f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi)); + f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi), gb_idx); repeat; } } +/* receive a L3 (GMM/SM) message over whatever is the appropriate lower-layer bearer */ +function f_receive_l3(template PDU_L3_SGSN_MS rx_tpl := ?, integer gb_idx := 0) +runs on BSSGP_ConnHdlr return PDU_L3_SGSN_MS { + var BssgpDecoded bd; + var PDU_DTAP_PS_MT mt; + var PDU_L3_SGSN_MS l3_mt; + alt { + [] BSSGP[gb_idx].receive(tr_BD_L3_MT(rx_tpl)) -> value bd { + l3_mt := bd.l3_mt; + } + } + return l3_mt; +} + /* perform GMM authentication (if expected). * Note, for umts_aka_challenge to work, the revisionLevelIndicatior needs to * be 1 to mark R99 capability, in the GMM Attach Request, see f_gmm_attach(). */ -function f_gmm_auth (boolean umts_aka_challenge := false, boolean force_gsm_sres := false) runs on BSSGP_ConnHdlr { - var BssgpDecoded bd; +function f_gmm_auth (boolean umts_aka_challenge := false, boolean force_gsm_sres := false, integer gb_idx := 0) runs on BSSGP_ConnHdlr { var PDU_L3_MS_SGSN l3_mo; var PDU_L3_SGSN_MS l3_mt; - var default di := activate(as_mm_identity()); + var default di := activate(as_mm_identity(gb_idx)); if (g_pars.net.expect_auth) { var GSUP_IE auth_tuple; var template AuthenticationParameterAUTNTLV autn; @@ -504,13 +517,13 @@ g_pars.vec.kc)); log("GSUP sends only 2G auth tuple", auth_tuple); } + GSUP.receive(tr_GSUP_SAI_REQ(g_pars.imsi)); GSUP.send(ts_GSUP_SAI_RES(g_pars.imsi, auth_tuple)); var template PDU_L3_SGSN_MS auth_ciph_req := tr_GMM_AUTH_REQ(g_pars.vec.rand); auth_ciph_req.msgs.gprs_mm.authenticationAndCipheringRequest.authenticationParameterAUTN := autn; - BSSGP[0].receive(tr_BD_L3_MT(auth_ciph_req)) -> value bd; - l3_mt := bd.l3_mt; + l3_mt := f_receive_l3(auth_ciph_req, gb_idx); var BIT4 ac_ref := l3_mt.msgs.gprs_mm.authenticationAndCipheringRequest.acReferenceNumber.valueField; var template PDU_L3_MS_SGSN auth_ciph_resp := ts_GMM_AUTH_RESP_2G(ac_ref, g_pars.vec.sres); @@ -532,7 +545,7 @@ l3_mo.msgs.gprs_mm.authenticationAndCipheringResponse.imeisv := valueof(ts_MI_IMEISV_TLV(g_pars.imei & '0'H)); } - f_send_l3_gmm_llc(l3_mo); + f_send_l3_gmm_llc(l3_mo, gb_idx); } else { /* wait for identity procedure */ f_sleep(1.0); @@ -626,10 +639,10 @@ GSUP.send(ts_GSUP_UL_RES(g_pars.imsi)); } -private function f_gmm_attach(boolean umts_aka_challenge, boolean force_gsm_sres) runs on BSSGP_ConnHdlr { - var BssgpDecoded bd; +friend function f_gmm_attach(boolean umts_aka_challenge, boolean force_gsm_sres, integer gb_idx := 0) runs on BSSGP_ConnHdlr { var RoutingAreaIdentificationV old_ra := f_random_RAI(); var template PDU_L3_MS_SGSN attach_req := ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit); + var PDU_L3_SGSN_MS l3_mt; /* indicate R99 capability of the MS to enable UMTS AKA in presence of * 3G auth vectors */ @@ -638,16 +651,16 @@ * revisionLevelIndicatior is at the wrong place! */ attach_req.msgs.gprs_mm.attachRequest.msNetworkCapability.msNetworkCapabilityV.solSACapability := '0'B; - f_send_l3_gmm_llc(attach_req); - f_gmm_auth(umts_aka_challenge, force_gsm_sres); + f_send_l3_gmm_llc(attach_req, gb_idx); + f_gmm_auth(umts_aka_challenge, force_gsm_sres, gb_idx); /* Expect SGSN to perform LU with HLR */ f_gmm_gsup_lu_isd(); - BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?))) -> value bd { - f_process_attach_accept(bd.l3_mt.msgs.gprs_mm.attachAccept); - } + l3_mt := f_receive_l3(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?), gb_idx); + f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept); + /* FIXME: Extract P-TMSI, if any. Only send Complete if necessary */ - f_send_l3_gmm_llc(ts_GMM_ATTACH_COMPL); + f_send_l3_gmm_llc(ts_GMM_ATTACH_COMPL, gb_idx); } private function f_TC_attach(charstring id) runs on BSSGP_ConnHdlr { -- To view, visit https://gerrit.osmocom.org/13858 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ie88cbf0c70269cc3e2c2fd2a0c65c8f2130ec2b1 Gerrit-Change-Number: 13858 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 23:44:50 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 23:44:50 +0000 Subject: Change in osmo-ttcn3-hacks[master]: SGSN_Tests: Make more helper functions gb_index aware Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13859 Change subject: SGSN_Tests: Make more helper functions gb_index aware ...................................................................... SGSN_Tests: Make more helper functions gb_index aware The gb_index indicates through which Gb link (simulated RAN/PCU) a given message shall be sent. Change-Id: I3825634f581897f6951d9673984f138e977cc7ac --- M sgsn/SGSN_Tests.ttcn 1 file changed, 32 insertions(+), 23 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/59/13859/1 diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index a4934ae..9f7e49d 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -1081,7 +1081,8 @@ f_gtp_register_teid(apars.ggsn_tei_u); } -function f_pdp_ctx_act(inout PdpActPars apars, boolean send_recovery := false) runs on BSSGP_ConnHdlr { +function f_pdp_ctx_act(inout PdpActPars apars, boolean send_recovery := false, integer gb_idx := 0) +runs on BSSGP_ConnHdlr { var boolean exp_rej := ispresent(apars.exp_rej_cause); var Gtp1cUnitdata g_ud; var template Recovery_gtpc recovery := omit; @@ -1091,7 +1092,7 @@ } f_send_l3_gmm_llc(ts_SM_ACT_PDP_REQ(apars.tid, apars.nsapi, apars.sapi, apars.qos, apars.addr, - apars.apn, apars.pco)); + apars.apn, apars.pco), gb_idx); GTP.receive(tr_GTPC_MsgType(?, createPDPContextRequest, ?)) -> value g_ud { f_process_gtp_ctx_act_req(apars, g_ud.gtpc); var integer seq_nr := oct2int(g_ud.gtpc.opt_part.sequenceNumber); @@ -1103,48 +1104,54 @@ omit, recovery)); } alt { - [exp_rej] BSSGP[0].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_REJ(apars.tid, apars.exp_rej_cause))) { + [exp_rej] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_REJ(apars.tid, apars.exp_rej_cause))) { setverdict(pass); } - [exp_rej] BSSGP[0].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_ACCEPT)) { + [exp_rej] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_ACCEPT)) { setverdict(fail, "Unexpected PDP CTX ACT ACC"); mtc.stop; } - [not exp_rej] BSSGP[0].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_REJ(apars.tid, ?))) { + [not exp_rej] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_REJ(apars.tid, ?))) { setverdict(fail, "Unexpected PDP CTX ACT FAIL"); mtc.stop; } - [not exp_rej] BSSGP[0].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_ACCEPT(apars.tid, apars.sapi))) { + [not exp_rej] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_REJ(apars.tid, ?))) { + setverdict(fail, "Unexpected PDP CTX ACT FAIL"); + mtc.stop; + } + [not exp_rej] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_ACCEPT(apars.tid, apars.sapi))) { setverdict(pass); } - [] as_xid(apars); + [] as_xid(apars, gb_idx); } } -function f_pdp_ctx_deact_mo(inout PdpActPars apars, OCT1 cause) runs on BSSGP_ConnHdlr { +function f_pdp_ctx_deact_mo(inout PdpActPars apars, OCT1 cause, integer gb_idx := 0) +runs on BSSGP_ConnHdlr { var boolean exp_rej := ispresent(apars.exp_rej_cause); var Gtp1cUnitdata g_ud; - f_send_l3_gmm_llc(ts_SM_DEACT_PDP_REQ_MO(apars.tid, cause, false, omit)); + f_send_l3_gmm_llc(ts_SM_DEACT_PDP_REQ_MO(apars.tid, cause, false, omit), gb_idx); GTP.receive(tr_GTPC_MsgType(?, deletePDPContextRequest, apars.ggsn_tei_c)) -> value g_ud { var integer seq_nr := oct2int(g_ud.gtpc.opt_part.sequenceNumber); - BSSGP[0].clear; + BSSGP[gb_idx].clear; GTP.send(ts_GTPC_DeletePdpResp(g_ud.peer, seq_nr, apars.sgsn_tei_c, '7F'O)); } alt { - [] BSSGP[0].receive(tr_BD_L3_MT(tr_SM_DEACT_PDP_ACCEPT_MT(apars.tid))) { + [] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_DEACT_PDP_ACCEPT_MT(apars.tid))) { setverdict(pass); } - [] as_xid(apars); + [] as_xid(apars, gb_idx); } } -function f_pdp_ctx_deact_mt(inout PdpActPars apars, boolean error_ind := false) runs on BSSGP_ConnHdlr { +function f_pdp_ctx_deact_mt(inout PdpActPars apars, boolean error_ind := false, integer gb_idx := 0) +runs on BSSGP_ConnHdlr { var Gtp1cUnitdata g_ud; var integer seq_nr := 23; var GtpPeer peer := valueof(ts_GtpPeerC(apars.sgsn_ip_c)); - BSSGP[0].clear; + BSSGP[gb_idx].clear; if (error_ind) { GTP.send(ts_GTPU_ErrorIndication(peer, 0 /* seq */, apars.ggsn_tei_u, apars.ggsn_ip_u)); } else { @@ -1155,8 +1162,8 @@ T.start; alt { - [] BSSGP[0].receive(tr_BD_L3_MT(tr_SM_DEACT_PDP_REQ_MT(apars.tid, ?, true))) { - f_send_l3_gmm_llc(ts_SM_DEACT_PDP_ACCEPT_MO(apars.tid)); + [] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_DEACT_PDP_REQ_MT(apars.tid, ?, true))) { + f_send_l3_gmm_llc(ts_SM_DEACT_PDP_ACCEPT_MO(apars.tid), gb_idx); } [not error_ind] GTP.receive(tr_GTPC_MsgType(?, deletePDPContextResponse, apars.ggsn_tei_c)) { repeat; @@ -1259,8 +1266,8 @@ GTP.send(ts_GTP1U_GPDU(peer, 0 /*seq*/, apars.sgsn_tei_u, payload)); } -private altstep as_xid(PdpActPars apars) runs on BSSGP_ConnHdlr { - [] BSSGP[0].receive(tr_BD_LLC(tr_LLC_XID_MT_CMD(?, apars.sapi))) { +private altstep as_xid(PdpActPars apars, integer gb_idx := 0) runs on BSSGP_ConnHdlr { + [] BSSGP[gb_idx].receive(tr_BD_LLC(tr_LLC_XID_MT_CMD(?, apars.sapi))) { repeat; } } @@ -1299,22 +1306,24 @@ } /* Transceive given 'payload' as MT message from GTP -> OsmoSGSN -> Gb */ -private function f_gtpu_xceive_mt(inout PdpActPars apars, octetstring payload) runs on BSSGP_ConnHdlr { +private function f_gtpu_xceive_mt(inout PdpActPars apars, octetstring payload, integer gb_idx := 0) +runs on BSSGP_ConnHdlr { /* Send PDU via GTP from our simulated GGSN to the SGSN */ f_gtpu_send(apars, payload); /* Expect PDU via BSSGP/LLC on simulated PCU from SGSN */ alt { - [] as_xid(apars); - [] BSSGP[0].receive(tr_BD_SNDCP(apars.sapi, tr_SN_UD(apars.nsapi, payload))); + [] as_xid(apars, gb_idx); + [] BSSGP[gb_idx].receive(tr_BD_SNDCP(apars.sapi, tr_SN_UD(apars.nsapi, payload))); } } /* Transceive given 'payload' as MT message from Gb -> OsmoSGSN -> GTP */ -private function f_gtpu_xceive_mo(inout PdpActPars apars, octetstring payload) runs on BSSGP_ConnHdlr { +private function f_gtpu_xceive_mo(inout PdpActPars apars, octetstring payload, integer gb_idx := 0) +runs on BSSGP_ConnHdlr { /* Send PDU via SNDCP/LLC/BSSGP/NS via simulated MS/PCU to the SGSN */ var GtpPeer peer := valueof(ts_GtpPeerU(apars.sgsn_ip_u)); var PDU_SN sndcp := valueof(ts_SN_UD(apars.nsapi, payload)); - BSSGP[0].send(ts_LLC_UI(enc_PDU_SN(sndcp), apars.sapi, '0'B, 0)); + BSSGP[gb_idx].send(ts_LLC_UI(enc_PDU_SN(sndcp), apars.sapi, '0'B, 0)); /* Expect PDU via GTP from SGSN on simulated GGSN */ alt { [] GTP.receive(tr_GTPU_GPDU(peer, apars.ggsn_tei_u, payload)); -- To view, visit https://gerrit.osmocom.org/13859 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I3825634f581897f6951d9673984f138e977cc7ac Gerrit-Change-Number: 13859 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 23:44:51 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 23:44:51 +0000 Subject: Change in osmo-ttcn3-hacks[master]: SGSN_Tests: Introduce NUM_GB to avoid '3' as magic value Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13860 Change subject: SGSN_Tests: Introduce NUM_GB to avoid '3' as magic value ...................................................................... SGSN_Tests: Introduce NUM_GB to avoid '3' as magic value Change-Id: I28b7dd26c5c129ec41c6349de9ddc9ef0ffee8ac --- M sgsn/SGSN_Tests.ttcn 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/60/13860/1 diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index 9f7e49d..d25b20b 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -105,9 +105,10 @@ BssgpConfig cfg }; -type record length(3) of GbInstance GbInstances; -type record length(3) of NSConfiguration NSConfigurations; -type record length(3) of BssgpCellId BssgpCellIds; +const integer NUM_GB := 3; +type record length(NUM_GB) of GbInstance GbInstances; +type record length(NUM_GB) of NSConfiguration NSConfigurations; +type record length(NUM_GB) of BssgpCellId BssgpCellIds; const integer NUM_RNC := 1; type record of RAN_Configuration RAN_Configurations; -- To view, visit https://gerrit.osmocom.org/13860 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I28b7dd26c5c129ec41c6349de9ddc9ef0ffee8ac Gerrit-Change-Number: 13860 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 23:44:51 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 23:44:51 +0000 Subject: Change in osmo-ttcn3-hacks[master]: BSSGP_Emulation: Fix transmission of MT L3 in LLC/BSSGP Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13861 Change subject: BSSGP_Emulation: Fix transmission of MT L3 in LLC/BSSGP ...................................................................... BSSGP_Emulation: Fix transmission of MT L3 in LLC/BSSGP it seems that some part of the code was commented out, breaking the path where a ConnHdlr is sending a L3 MT message. Change-Id: Ie652598292f2fbd2e1e0c4aa679ff0d68d78c88c --- M library/BSSGP_Emulation.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/61/13861/1 diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn index 8988926..9021f08 100644 --- a/library/BSSGP_Emulation.ttcn +++ b/library/BSSGP_Emulation.ttcn @@ -586,7 +586,7 @@ var BIT4 sapi := f_llc_sapi_by_l3_mt(l3_mt); var integer n_u := f_llc_get_n_u_tx(ClientTable[idx].llc[bit2int(sapi)]); var octetstring llc_enc := enc_PDU_LLC(valueof(ts_LLC_UI(l3_enc, sapi, '1'B, n_u))); - //BSCP.send(f_BnsUdReq(ts_BSSGP_DL_UD(ClientTable[idx].tlli, ClientTable[idx].cell_id, llc_enc)), g_cfg.bvci); + BSCP.send(f_BnsUdReq(ts_BSSGP_DL_UD(ClientTable[idx].tlli, llc_enc), g_cfg.bvci)); } [] BSSGP_SP.receive(PDU_LLC:?) -> value llc sender vc_conn { -- To view, visit https://gerrit.osmocom.org/13861 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ie652598292f2fbd2e1e0c4aa679ff0d68d78c88c Gerrit-Change-Number: 13861 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 23:44:52 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 23:44:52 +0000 Subject: Change in osmo-ttcn3-hacks[master]: BSSGP_Emulation: Pass uplink L3 to BSSGP Uplink Unitdata Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13862 Change subject: BSSGP_Emulation: Pass uplink L3 to BSSGP Uplink Unitdata ...................................................................... BSSGP_Emulation: Pass uplink L3 to BSSGP Uplink Unitdata Change-Id: I71c19cd0f11927eb70667210a4ba1ee5873fd534 --- M library/BSSGP_Emulation.ttcn 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/62/13862/1 diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn index 9021f08..849e147 100644 --- a/library/BSSGP_Emulation.ttcn +++ b/library/BSSGP_Emulation.ttcn @@ -588,6 +588,14 @@ var octetstring llc_enc := enc_PDU_LLC(valueof(ts_LLC_UI(l3_enc, sapi, '1'B, n_u))); BSCP.send(f_BnsUdReq(ts_BSSGP_DL_UD(ClientTable[idx].tlli, llc_enc), g_cfg.bvci)); } + [not g_cfg.sgsn_role] BSSGP_SP.receive(PDU_L3_MS_SGSN:?) -> value l3_mo sender vc_conn { + var integer idx := f_tbl_idx_by_comp(vc_conn); + var octetstring l3_enc := enc_PDU_L3_MS_SGSN(l3_mo); + var BIT4 sapi := f_llc_sapi_by_l3_mo(l3_mo); + var integer n_u := f_llc_get_n_u_tx(ClientTable[idx].llc[bit2int(sapi)]); + var octetstring llc_enc := enc_PDU_LLC(valueof(ts_LLC_UI(l3_enc, sapi, '1'B, n_u))); + BSCP.send(f_BnsUdReq(ts_BSSGP_UL_UD(ClientTable[idx].tlli, ClientTable[idx].cell_id, llc_enc), g_cfg.bvci)); + } [] BSSGP_SP.receive(PDU_LLC:?) -> value llc sender vc_conn { var integer idx := f_tbl_idx_by_comp(vc_conn); -- To view, visit https://gerrit.osmocom.org/13862 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I71c19cd0f11927eb70667210a4ba1ee5873fd534 Gerrit-Change-Number: 13862 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 23:44:52 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 23:44:52 +0000 Subject: Change in osmo-ttcn3-hacks[master]: BSSGP_Emulation: Implement LLC sending also for SGSN-role Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13863 Change subject: BSSGP_Emulation: Implement LLC sending also for SGSN-role ...................................................................... BSSGP_Emulation: Implement LLC sending also for SGSN-role We used to support sending of LLC messages only for the MS role, where we generated BSSGP UL UNITDATA. Let's also support the SGSN role, where we have to generate BSSGP DL UNITDATA Change-Id: If86f4b7c9e7c3c799c274f37a350dec4a788f124 --- M library/BSSGP_Emulation.ttcn 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/63/13863/1 diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn index 849e147..c60868e 100644 --- a/library/BSSGP_Emulation.ttcn +++ b/library/BSSGP_Emulation.ttcn @@ -597,11 +597,18 @@ BSCP.send(f_BnsUdReq(ts_BSSGP_UL_UD(ClientTable[idx].tlli, ClientTable[idx].cell_id, llc_enc), g_cfg.bvci)); } - [] BSSGP_SP.receive(PDU_LLC:?) -> value llc sender vc_conn { + /* ConnHdlr sends raw LLC: Encode and send as UL_UD / DL_UD */ + [not g_cfg.sgsn_role] BSSGP_SP.receive(PDU_LLC:?) -> value llc sender vc_conn { var integer idx := f_tbl_idx_by_comp(vc_conn); var octetstring llc_enc := enc_PDU_LLC(llc); BSCP.send(f_BnsUdReq(ts_BSSGP_UL_UD(ClientTable[idx].tlli, ClientTable[idx].cell_id, llc_enc), g_cfg.bvci)); } + [g_cfg.sgsn_role] BSSGP_SP.receive(PDU_LLC:?) -> value llc sender vc_conn { + var integer idx := f_tbl_idx_by_comp(vc_conn); + var octetstring llc_enc := enc_PDU_LLC(llc); + BSCP.send(f_BnsUdReq(ts_BSSGP_DL_UD(ClientTable[idx].tlli, llc_enc), g_cfg.bvci)); + } + } function f_llc_get_n_u_tx(inout LLC_Entity llc) return uint9_t { -- To view, visit https://gerrit.osmocom.org/13863 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If86f4b7c9e7c3c799c274f37a350dec4a788f124 Gerrit-Change-Number: 13863 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 23:44:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 23:44:53 +0000 Subject: Change in osmo-ttcn3-hacks[master]: BSSGP_Emulation: More/improved comments Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13864 Change subject: BSSGP_Emulation: More/improved comments ...................................................................... BSSGP_Emulation: More/improved comments Change-Id: I04250667a498f3f00d4fbb4cd22a4f7b71e2bba1 --- M library/BSSGP_Emulation.ttcn 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/64/13864/1 diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn index c60868e..22c2f09 100644 --- a/library/BSSGP_Emulation.ttcn +++ b/library/BSSGP_Emulation.ttcn @@ -571,15 +571,17 @@ } + /* ConnHdlr sends BSSGP on BVCI=0 port: forward it to BSSGP Codec Port */ [] BSSGP_SP_SIG.receive(PDU_BSSGP:?)-> value bs_pdu sender vc_conn { BSCP.send(f_BnsUdReq(bs_pdu, 0)); } - /* pass virtually any PDU from user to NS-UNITDATA PDU on network */ + /* ConnHdlr sends BSSGP on BVCI=PTP port: forward it to BSSGP Codec Port */ [] BSSGP_SP.receive(PDU_BSSGP:?) -> value bs_pdu sender vc_conn { BSCP.send(f_BnsUdReq(bs_pdu, g_cfg.bvci)); } + /* ConnHdlr sends L3: Encode and send as UL_UD / DL_UD */ [g_cfg.sgsn_role] BSSGP_SP.receive(PDU_L3_SGSN_MS:?) -> value l3_mt sender vc_conn { var integer idx := f_tbl_idx_by_comp(vc_conn); var octetstring l3_enc := enc_PDU_L3_SGSN_MS(l3_mt); -- To view, visit https://gerrit.osmocom.org/13864 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I04250667a498f3f00d4fbb4cd22a4f7b71e2bba1 Gerrit-Change-Number: 13864 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 23:44:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 23:44:53 +0000 Subject: Change in osmo-ttcn3-hacks[master]: BSSGP_Emulation: Abandon "BssgpDecoded" intermediate structure Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13865 Change subject: BSSGP_Emulation: Abandon "BssgpDecoded" intermediate structure ...................................................................... BSSGP_Emulation: Abandon "BssgpDecoded" intermediate structure It originally seemed like a great idea to define a custom record which aggregates the decoded BSSGP, LLC, L3 and/or SNDCP and passes it to the individual ConnHdlr. However, particularly with testcase interoperability for IuPS in mind, this seems bogus. Also, we never really took advantage of this. Let's now decode as far as we can decode any PDU, and then send the decoded version of that PDU via the ports between the BSSGP_Emulation and the ConnHdlr component. Change-Id: I8c1082880902dd9a04935945f0293895f4d0c53a --- M library/BSSGP_Emulation.ttcn M pcu/PCU_Tests.ttcn M pcu/PCU_Tests_RAW.ttcn M sgsn/SGSN_Tests.ttcn 4 files changed, 108 insertions(+), 161 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/65/13865/1 diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn index 22c2f09..924c37d 100644 --- a/library/BSSGP_Emulation.ttcn +++ b/library/BSSGP_Emulation.ttcn @@ -43,7 +43,9 @@ PDU_LLC, PDU_L3_MS_SGSN, PDU_L3_SGSN_MS; - out BssgpDecoded, + out PDU_BSSGP, + PDU_LLC, + PDU_SN, NsStatusIndication, BssgpStatusIndication, ASP_Event, @@ -56,7 +58,9 @@ in ASP_Event, NsStatusIndication, BssgpStatusIndication, - BssgpDecoded, + PDU_BSSGP, + PDU_LLC, + PDU_SN, PDU_L3_MS_SGSN, PDU_L3_SGSN_MS; out PDU_BSSGP, @@ -482,6 +486,21 @@ } } +private function f_send_bssgp_dec(BssgpDecoded dec, BSSGP_Client_CT vc_conn, BSSGP_SP_PT pt := BSSGP_SP) runs on BSSGP_CT { + if (ispresent(dec.l3_mt)) { + pt.send(dec.l3_mt) to vc_conn; + } else if (ispresent(dec.l3_mo)) { + pt.send(dec.l3_mo) to vc_conn; + } else if (ispresent(dec.sndcp)) { + pt.send(dec.sndcp) to vc_conn; + } else if (ispresent(dec.llc)) { + pt.send(dec.llc) to vc_conn; + } else { + pt.send(dec.bssgp) to vc_conn; + } +} + + altstep as_unblocked() runs on BSSGP_CT { var BSSGP_Client_CT vc_conn; var NsUnitdataIndication udi; @@ -529,7 +548,7 @@ [] BSCP.receive(f_BnsUdInd(tr_BSSGP_PS_PAGING(g_cfg.bvci), g_cfg.bvci)) -> value udi { var hexstring imsi := udi.bssgp.pDU_BSSGP_PAGING_PS.iMSI.digits vc_conn := f_tbl_comp_by_imsi(imsi); - BSSGP_SP.send(f_dec_bssgp(udi.bssgp)) to vc_conn; + f_send_bssgp_dec(f_dec_bssgp(udi.bssgp), vc_conn); } /* Any other PTP BSSGP message: If it has TLLi, route to component; otherwise broadcast */ @@ -538,14 +557,14 @@ var template OCT4 tlli := f_bssgp_get_tlli(udi.bssgp); if (isvalue(tlli)) { vc_conn := f_tbl_comp_by_tlli(valueof(tlli)); - BSSGP_SP.send(dec) to vc_conn; + f_send_bssgp_dec(dec, vc_conn); } else { log("No TLLI: Broadcasting ", dec); /* broadcast this message to all components */ // TITAN DOESN'T DO THIS, *SIGH*: "BSSGP_SP.send(dec) to all component;" for (var integer i := 0; i < sizeof(ClientTable); i := i+1) { if (isbound(ClientTable[i].comp_ref)) { - BSSGP_SP.send(dec) to ClientTable[i].comp_ref; + f_send_bssgp_dec(dec, ClientTable[i].comp_ref); } } } @@ -557,14 +576,14 @@ var template OCT4 tlli := f_bssgp_get_tlli(udi.bssgp); if (isvalue(tlli)) { vc_conn := f_tbl_comp_by_tlli(valueof(tlli)); - BSSGP_SP_SIG.send(dec) to vc_conn; + f_send_bssgp_dec(dec, vc_conn, BSSGP_SP_SIG); } else { log("No TLLI: Broadcasting ", dec); /* broadcast this message to all components */ // TITAN DOESN'T DO THIS, *SIGH*: "BSSGP_SP.send(dec) to all component;" for (var integer i := 0; i < sizeof(ClientTable); i := i+1) { if (isbound(ClientTable[i].comp_ref)) { - BSSGP_SP_SIG.send(dec) to ClientTable[i].comp_ref; + f_send_bssgp_dec(dec, vc_conn, BSSGP_SP_SIG); } } } @@ -721,47 +740,5 @@ } } -template BssgpDecoded tr_BD_BSSGP(template PDU_BSSGP bg) := { - bssgp := bg, - llc := *, - l3_mo := *, - l3_mt := *, - sndcp := * -} - -template BssgpDecoded tr_BD_LLC(template PDU_LLC llc) := { - bssgp := ?, - llc := llc, - l3_mo := *, - l3_mt := *, - sndcp := * -} - -template BssgpDecoded tr_BD_L3_MT(template PDU_L3_SGSN_MS mt) := { - bssgp := ?, - llc := ?, - l3_mo := omit, - l3_mt := mt, - sndcp := omit -} - -template BssgpDecoded tr_BD_L3_MO(template PDU_L3_MS_SGSN mo) := { - bssgp := ?, - llc := ?, - l3_mo := mo, - l3_mt := omit, - sndcp := omit -} - -template BssgpDecoded tr_BD_SNDCP(template BIT4 sapi, template PDU_SN sn) := { - bssgp := ?, - llc := tr_LLC_UI(?, sapi), - l3_mo := omit, - l3_mt := omit, - sndcp := sn -} - - - } diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn index 4dce7dd..23096b9 100644 --- a/pcu/PCU_Tests.ttcn +++ b/pcu/PCU_Tests.ttcn @@ -314,15 +314,15 @@ } -function f_bssgp_wait_ul_ud(template BssgpDecoded bd_exp) runs on dummy_CT { +function f_bssgp_wait_ul_ud(template PDU_BSSGP exp) runs on dummy_CT { timer T := 5.0; T.start; alt { - [] BSSGP[0].receive(bd_exp) { + [] BSSGP[0].receive(exp) { log("found matching BSSGP UL-UNITDATA PDU"); } [] T.timeout { - setverdict(fail, "Timeout waiting for ", bd_exp); + setverdict(fail, "Timeout waiting for ", exp); mtc.stop; } } @@ -363,7 +363,7 @@ } for (var integer i := 0; i < sizeof(us.tbf.llc_pdus_enc); i := i+1) { - f_bssgp_wait_ul_ud(tr_BD_BSSGP(tr_BSSGP_UL_UD(g_mmctx.tlli, ?, us.tbf.llc_pdus_enc[i]))); + f_bssgp_wait_ul_ud(tr_BSSGP_UL_UD(g_mmctx.tlli, ?, us.tbf.llc_pdus_enc[i])); } setverdict(pass); @@ -383,26 +383,6 @@ } -testcase TC_nsem() runs on dummy_CT { - - f_init(); - f_bssgp_establish(); - - while (true) { - var BssgpDecoded bd; - alt { - [] BSSGP[0].receive(tr_BD_BSSGP(?)) -> value bd { - log("BSSGP Rx: ", bd); - //log("GMM Rx: ", dec_PDU_L3_MS_SGSN(pdu.payload)); - g_mmctx.tlli := bd.bssgp.pDU_BSSGP_UL_UNITDATA.tLLI; - tx_gmm(LLC_CR_DL_CMD, gmm_auth_req); - } - [] BSSGP[0].receive(t_BssgpStsInd(?, ?, BVC_S_UNBLOCKED)) { repeat; } - [] BSSGP[0].receive { repeat; } - } - } -} - function f_llc_dec_and_log(in octetstring inp) { log("LLC Input: ", inp); diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn index 96a3f86..8ff59c0 100644 --- a/pcu/PCU_Tests_RAW.ttcn +++ b/pcu/PCU_Tests_RAW.ttcn @@ -424,7 +424,7 @@ f_sleep(1.0); f_pcuif_tx(ts_PCUIF_SUSP_REQ(0, tlli, ra_id, 0)); - BSSGP_SIG[0].receive(tr_BD_BSSGP(tr_BSSGP_SUSPEND(tlli, mp_gb_cfg.cell_id.ra_id))); + BSSGP_SIG[0].receive(tr_BSSGP_SUSPEND(tlli, mp_gb_cfg.cell_id.ra_id)); setverdict(pass); } diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index d25b20b..5dae397 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -457,12 +457,12 @@ altstep as_mm_identity(integer gb_idx := 0) runs on BSSGP_ConnHdlr { var MobileL3_CommonIE_Types.MobileIdentityLV mi; - [] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('001'B))) { + [] BSSGP[gb_idx].receive(tr_GMM_ID_REQ('001'B)) { mi := valueof(ts_MI_IMSI_LV(g_pars.imsi)); f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi), gb_idx); repeat; } - [] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('010'B))) { + [] BSSGP[gb_idx].receive(tr_GMM_ID_REQ('010'B)) { mi := valueof(ts_MI_IMEI_LV(g_pars.imei)); f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi), gb_idx); repeat; @@ -472,13 +472,10 @@ /* receive a L3 (GMM/SM) message over whatever is the appropriate lower-layer bearer */ function f_receive_l3(template PDU_L3_SGSN_MS rx_tpl := ?, integer gb_idx := 0) runs on BSSGP_ConnHdlr return PDU_L3_SGSN_MS { - var BssgpDecoded bd; var PDU_DTAP_PS_MT mt; var PDU_L3_SGSN_MS l3_mt; alt { - [] BSSGP[gb_idx].receive(tr_BD_L3_MT(rx_tpl)) -> value bd { - l3_mt := bd.l3_mt; - } + [] BSSGP[gb_idx].receive(rx_tpl) -> value l3_mt { } } return l3_mt; } @@ -715,14 +712,14 @@ f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit)); alt { - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ(?))) { + [] BSSGP[0].receive(tr_GMM_ID_REQ(?)) { /* don't send ID Response */ repeat; } - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT('09'O))) { + [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT('09'O)) { setverdict(pass); } - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))) { + [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) { setverdict(fail, "Wrong Attach Reject Cause"); mtc.stop; } @@ -745,7 +742,7 @@ [] GSUP.receive(tr_GSUP_SAI_REQ(g_pars.imsi)); { } } /* don't send SAI-response from HLR */ - BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))); + BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)); setverdict(pass); } testcase TC_attach_auth_sai_timeout() runs on test_CT { @@ -766,7 +763,7 @@ GSUP.send(ts_GSUP_SAI_ERR(g_pars.imsi, 23)); } } - BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))); + BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)); setverdict(pass); } testcase TC_attach_auth_sai_reject() runs on test_CT { @@ -778,7 +775,7 @@ /* HLR never responds to UL REQ, expect ATTACH REJECT */ private function f_TC_attach_gsup_lu_timeout(charstring id) runs on BSSGP_ConnHdlr { - var BssgpDecoded bd; + var PDU_L3_SGSN_MS l3_mt; var RoutingAreaIdentificationV old_ra := f_random_RAI(); f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit)); @@ -787,11 +784,11 @@ GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi)); /* Never follow-up with ISD_REQ or UL_RES */ alt { - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))) { + [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) { setverdict(pass); } - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?))) -> value bd { - f_process_attach_accept(bd.l3_mt.msgs.gprs_mm.attachAccept); + [] BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?)) -> value l3_mt { + f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept); setverdict(fail); mtc.stop; } @@ -807,7 +804,7 @@ /* HLR rejects UL REQ, expect ATTACH REJECT */ private function f_TC_attach_gsup_lu_reject(charstring id) runs on BSSGP_ConnHdlr { - var BssgpDecoded bd; + var PDU_L3_SGSN_MS l3_mt; var RoutingAreaIdentificationV old_ra := f_random_RAI(); f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit)); @@ -817,11 +814,11 @@ GSUP.send(ts_GSUP_UL_ERR(g_pars.imsi, 0)); } alt { - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))) { + [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) { setverdict(pass); } - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?))) -> value bd { - f_process_attach_accept(bd.l3_mt.msgs.gprs_mm.attachAccept); + [] BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?)) -> value l3_mt { + f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept); setverdict(fail); mtc.stop; } @@ -838,7 +835,7 @@ /* Attempt of combined GPRS + IMSI attach: network should ACK only GPRS attach */ private function f_TC_attach_combined(charstring id) runs on BSSGP_ConnHdlr { - var BssgpDecoded bd; + var PDU_L3_SGSN_MS l3_mt; var RoutingAreaIdentificationV old_ra := f_random_RAI(); f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, true, false, omit, omit)); @@ -846,8 +843,8 @@ /* Expect MSC to perform LU with HLR */ f_gmm_gsup_lu_isd(); - BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?))) -> value bd { - f_process_attach_accept(bd.l3_mt.msgs.gprs_mm.attachAccept); + BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?)) -> value l3_mt { + f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept); } f_send_l3_gmm_llc(ts_GMM_ATTACH_COMPL); setverdict(pass); @@ -862,15 +859,15 @@ /* Attempt of GPRS ATTACH in 'accept all' mode */ private function f_TC_attach_accept_all(charstring id) runs on BSSGP_ConnHdlr { - var BssgpDecoded bd; + var PDU_L3_SGSN_MS l3_mt; var RoutingAreaIdentificationV old_ra := f_random_RAI(); g_pars.net.expect_auth := false; f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit)); f_gmm_auth(); - BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?))) -> value bd { - f_process_attach_accept(bd.l3_mt.msgs.gprs_mm.attachAccept); + BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?)) -> value l3_mt { + f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept); } f_send_l3_gmm_llc(ts_GMM_ATTACH_COMPL); setverdict(pass); @@ -897,13 +894,13 @@ f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit)); alt { [] as_mm_identity(); - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT('07'O))) { + [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT('07'O)) { setverdict(pass); } - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))) { + [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) { setverdict(pass); } - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT(*, *, *))) { + [] BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT(*, *, *)) { setverdict(fail); mtc.stop; } @@ -928,7 +925,7 @@ f_send_l3_gmm_llc(ts_GMM_RAU_REQ(f_mi_get_lv(), GPRS_UPD_T_RA, old_ra, false, omit, omit)); alt { - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_RAU_REJECT('0a'O))) { + [] BSSGP[0].receive(tr_GMM_RAU_REJECT('0a'O)) { setverdict(pass); } /* FIXME: Expect XID RESET? */ @@ -944,8 +941,6 @@ } private function f_TC_attach_rau(charstring id) runs on BSSGP_ConnHdlr { - var BssgpDecoded bd; - /* first perform regular attach */ f_TC_attach(id); @@ -962,7 +957,7 @@ /* general GPRS DETACH helper */ function f_detach_mo(BIT3 detach_type, boolean power_off, boolean expect_purge, integer bssgp_index := 0) runs on BSSGP_ConnHdlr { - var BssgpDecoded bd; + var PDU_L3_SGSN_MS l3_mt; timer T := 5.0; f_send_l3_gmm_llc(ts_GMM_DET_REQ_MO(detach_type, power_off), bssgp_index); if (expect_purge) { @@ -975,7 +970,7 @@ setverdict(fail, "Unexpected GSUP PURGE MS for unregistered TLLI"); mtc.stop; } - [power_off] BSSGP[bssgp_index].receive(tr_BD_L3_MT(tr_GMM_DET_ACCEPT_MT)) -> value bd { + [power_off] BSSGP[bssgp_index].receive(tr_GMM_DET_ACCEPT_MT) -> value l3_mt { g_pars.ra := omit; setverdict(fail, "Unexpected ATTACH ACCEPT in no-power-off DETACH"); mtc.stop; @@ -984,7 +979,7 @@ [power_off] T.timeout { setverdict(pass); } - [not power_off] BSSGP[bssgp_index].receive(tr_BD_L3_MT(tr_GMM_DET_ACCEPT_MT)) -> value bd { + [not power_off] BSSGP[bssgp_index].receive(tr_GMM_DET_ACCEPT_MT) -> value l3_mt { g_pars.ra := omit; setverdict(pass); /* TODO: check if any PDP contexts are deactivated on network side? */ @@ -1105,22 +1100,22 @@ omit, recovery)); } alt { - [exp_rej] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_REJ(apars.tid, apars.exp_rej_cause))) { + [exp_rej] BSSGP[gb_idx].receive(tr_SM_ACT_PDP_REJ(apars.tid, apars.exp_rej_cause)) { setverdict(pass); } - [exp_rej] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_ACCEPT)) { + [exp_rej] BSSGP[gb_idx].receive(tr_SM_ACT_PDP_ACCEPT) { setverdict(fail, "Unexpected PDP CTX ACT ACC"); mtc.stop; } - [not exp_rej] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_REJ(apars.tid, ?))) { + [not exp_rej] BSSGP[gb_idx].receive(tr_SM_ACT_PDP_REJ(apars.tid, ?)) { setverdict(fail, "Unexpected PDP CTX ACT FAIL"); mtc.stop; } - [not exp_rej] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_REJ(apars.tid, ?))) { + [not exp_rej] BSSGP[gb_idx].receive(tr_SM_ACT_PDP_REJ(apars.tid, ?)) { setverdict(fail, "Unexpected PDP CTX ACT FAIL"); mtc.stop; } - [not exp_rej] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_ACCEPT(apars.tid, apars.sapi))) { + [not exp_rej] BSSGP[gb_idx].receive(tr_SM_ACT_PDP_ACCEPT(apars.tid, apars.sapi)) { setverdict(pass); } [] as_xid(apars, gb_idx); @@ -1139,7 +1134,7 @@ GTP.send(ts_GTPC_DeletePdpResp(g_ud.peer, seq_nr, apars.sgsn_tei_c, '7F'O)); } alt { - [] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_DEACT_PDP_ACCEPT_MT(apars.tid))) { + [] BSSGP[gb_idx].receive(tr_SM_DEACT_PDP_ACCEPT_MT(apars.tid)) { setverdict(pass); } [] as_xid(apars, gb_idx); @@ -1163,7 +1158,7 @@ T.start; alt { - [] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_DEACT_PDP_REQ_MT(apars.tid, ?, true))) { + [] BSSGP[gb_idx].receive(tr_SM_DEACT_PDP_REQ_MT(apars.tid, ?, true)) { f_send_l3_gmm_llc(ts_SM_DEACT_PDP_ACCEPT_MO(apars.tid), gb_idx); } [not error_ind] GTP.receive(tr_GTPC_MsgType(?, deletePDPContextResponse, apars.ggsn_tei_c)) { @@ -1268,7 +1263,7 @@ } private altstep as_xid(PdpActPars apars, integer gb_idx := 0) runs on BSSGP_ConnHdlr { - [] BSSGP[gb_idx].receive(tr_BD_LLC(tr_LLC_XID_MT_CMD(?, apars.sapi))) { + [] BSSGP[gb_idx].receive(tr_LLC_XID_MT_CMD(?, apars.sapi)) { repeat; } } @@ -1314,7 +1309,8 @@ /* Expect PDU via BSSGP/LLC on simulated PCU from SGSN */ alt { [] as_xid(apars, gb_idx); - [] BSSGP[gb_idx].receive(tr_BD_SNDCP(apars.sapi, tr_SN_UD(apars.nsapi, payload))); + //[] BSSGP[gb_idx].receive(tr_BD_SNDCP(apars.sapi, tr_SN_UD(apars.nsapi, payload))); + [] BSSGP[gb_idx].receive(tr_SN_UD(apars.nsapi, payload)); } } @@ -1353,14 +1349,14 @@ apars.apn, apars.pco)); alt { /* We might want toalso actually expect a PDPC CTX ACT REJ? */ - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_DET_REQ_MT(?, ?))) { + [] BSSGP[0].receive(tr_GMM_DET_REQ_MT(?, ?)) { setverdict(pass); } [] GTP.receive(tr_GTPC_MsgType(?, createPDPContextRequest, ?)) { setverdict(fail, "Unexpected GTP PDP CTX ACT"); mtc.stop; } - [] BSSGP[0].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_ACCEPT(?, ?))) { + [] BSSGP[0].receive(tr_SM_ACT_PDP_ACCEPT(?, ?)) { setverdict(fail, "Unexpected SM PDP CTX ACT ACK"); mtc.stop; } @@ -1496,7 +1492,7 @@ } var OCT1 cause_network_failure := int2oct(38, 1) alt { - [] BSSGP[0].receive(tr_BD_L3_MT(tr_SM_DEACT_PDP_REQ_MT(apars.tid, cause_network_failure, true))) { + [] BSSGP[0].receive(tr_SM_DEACT_PDP_REQ_MT(apars.tid, cause_network_failure, true)) { f_send_l3_gmm_llc(ts_SM_DEACT_PDP_ACCEPT_MO(apars.tid)); setverdict(pass); } @@ -1571,7 +1567,7 @@ for (i := 0; i < 5; i := i+1) { alt { - [] BSSGP[0].receive(tr_BD_L3_MT(tr_SM_DEACT_PDP_REQ_MT(apars.tid, ?, true))) {} + [] BSSGP[0].receive(tr_SM_DEACT_PDP_REQ_MT(apars.tid, ?, true)) {} [] as_xid(apars); } } @@ -1601,7 +1597,7 @@ timer T := 5.0; T.start; alt { - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_DET_REQ_MT(*, *, *))) { + [] BSSGP[0].receive(tr_GMM_DET_REQ_MT(*, *, *)) { T.stop; setverdict(fail, "Unexpected GMM Detach Request"); mtc.stop; @@ -1660,7 +1656,7 @@ GSUP.send(ts_GSUP_UL_RES(g_pars.imsi)); /* MS: receive a Detach Request */ - BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_DET_REQ_MT(c_GMM_DTT_MT_IMSI_DETACH, ?, ?))); + BSSGP[0].receive(tr_GMM_DET_REQ_MT(c_GMM_DTT_MT_IMSI_DETACH, ?, ?)); f_send_l3_gmm_llc(ts_GMM_DET_ACCEPT_MO); setverdict(pass); @@ -1755,15 +1751,15 @@ f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), f_random_RAI(), true, false, omit, omit)); alt { - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))) { + [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) { /* break */ } - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('001'B))) { + [] BSSGP[0].receive(tr_GMM_ID_REQ('001'B)) { mi := valueof(ts_MI_IMSI_LV(g_pars.imsi)); f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi)); repeat; } - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('010'B))) { + [] BSSGP[0].receive(tr_GMM_ID_REQ('010'B)) { /* ignore ID REQ IMEI */ count_req := count_req + 1; repeat; @@ -1803,15 +1799,15 @@ f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), f_random_RAI(), true, false, omit, omit)); alt { - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))) { + [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) { /* break */ } - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('001'B))) { + [] BSSGP[0].receive(tr_GMM_ID_REQ('001'B)) { /* ignore ID REQ IMSI */ count_req := count_req + 1; repeat; } - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('010'B))) { + [] BSSGP[0].receive(tr_GMM_ID_REQ('010'B)) { mi := valueof(ts_MI_IMEI_LV(g_pars.imei)); f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi)); repeat; @@ -1863,7 +1859,7 @@ private function f_TC_attach_closed_imsi_added(charstring id) runs on BSSGP_ConnHdlr { var RoutingAreaIdentificationV old_ra := f_random_RAI(); - var BssgpDecoded bd; + var PDU_L3_SGSN_MS l3_mt; /* unregister the old IMSI */ f_bssgp_client_unregister(g_pars.imsi); @@ -1877,12 +1873,12 @@ f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit)); f_gmm_auth(); alt { - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))) { + [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) { setverdict(fail, "Received unexpected GMM Attach REJECT"); mtc.stop; } - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT(*, *, *))) -> value bd { - f_process_attach_accept(bd.l3_mt.msgs.gprs_mm.attachAccept); + [] BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT(*, *, *)) -> value l3_mt { + f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept); f_send_l3_gmm_llc(ts_GMM_ATTACH_COMPL); setverdict(pass); } @@ -1936,7 +1932,7 @@ [] T.timeout { /* break */ } - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT(*, *, *))) { + [] BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT(*, *, *)) { /* ignore */ count_req := count_req + 1; T.start; @@ -1964,17 +1960,17 @@ } private function f_routing_area_update(RoutingAreaIdentificationV ra, integer bssgp := 0) runs on BSSGP_ConnHdlr { - var BssgpDecoded bd; + var PDU_L3_SGSN_MS l3_mt; /* then send RAU */ f_send_l3_gmm_llc(ts_GMM_RAU_REQ(f_mi_get_lv(), GPRS_UPD_T_RA, g_pars.ra, false, omit, omit), bssgp); alt { - [] BSSGP[bssgp].receive(tr_BD_L3_MT(tr_GMM_RAU_ACCEPT)) -> value bd { - f_process_rau_accept(bd.l3_mt.msgs.gprs_mm.routingAreaUpdateAccept, bssgp); + [] BSSGP[bssgp].receive(tr_GMM_RAU_ACCEPT) -> value l3_mt { + f_process_rau_accept(l3_mt.msgs.gprs_mm.routingAreaUpdateAccept, bssgp); f_send_l3_gmm_llc(ts_GMM_RAU_COMPL, bssgp); setverdict(pass); } - [] BSSGP[bssgp].receive(tr_BD_L3_MT(tr_GMM_RAU_REJECT)) { + [] BSSGP[bssgp].receive(tr_GMM_RAU_REJECT) { setverdict(fail, "Unexpected RAU Reject"); mtc.stop; } @@ -1983,8 +1979,6 @@ } private function f_TC_attach_rau_a_a(charstring id) runs on BSSGP_ConnHdlr { - var BssgpDecoded bd; - /* first perform regular attach */ f_TC_attach(id); @@ -2013,8 +2007,6 @@ } private function f_TC_attach_rau_a_b(charstring id) runs on BSSGP_ConnHdlr { - var BssgpDecoded bd; - f_TC_attach(id); log("attach complete sending rau"); @@ -2049,21 +2041,21 @@ var integer count_req := 0; var MobileL3_CommonIE_Types.MobileIdentityLV mi; var RoutingAreaIdentificationV rand_rai := f_random_RAI(); - var BssgpDecoded bd; + var PDU_L3_SGSN_MS l3_mt; f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), rand_rai, true, false, omit, omit)); alt { - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))) { + [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) { setverdict(fail, "Unexpected GMM ATTACH REJECT"); mtc.stop; } - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('001'B))) { + [] BSSGP[0].receive(tr_GMM_ID_REQ('001'B)) { mi := valueof(ts_MI_IMSI_LV(g_pars.imsi)); f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi)); repeat; } - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('010'B))) { + [] BSSGP[0].receive(tr_GMM_ID_REQ('010'B)) { /* send out a second GMM_Attach Request. * If the SGSN follows the rules, this 2nd ATTACH REQ should be ignored, because * of the same content */ @@ -2076,21 +2068,21 @@ /* we've sent already a IMEI answer, we should NOT asked again for IMEI */ alt { - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('001'B))) { + [] BSSGP[0].receive(tr_GMM_ID_REQ('001'B)) { mi := valueof(ts_MI_IMSI_LV(g_pars.imsi)); f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi)); repeat; } - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('010'B))) { + [] BSSGP[0].receive(tr_GMM_ID_REQ('010'B)) { setverdict(fail, "Unexpected GMM ID REQ (IMEI)."); mtc.stop; } - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))) { + [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) { setverdict(fail, "Unexpected GMM ATTACH REJECT"); mtc.stop; } - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?))) -> value bd { - f_process_attach_accept(bd.l3_mt.msgs.gprs_mm.attachAccept); + [] BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?)) -> value l3_mt { + f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept); f_send_l3_gmm_llc(ts_GMM_ATTACH_COMPL); setverdict(pass); /* FIXME: Extract P-TMSI, if any. Only send Complete if necessary */ @@ -2118,7 +2110,6 @@ } private function f_TC_attach_usim_resync(charstring id) runs on BSSGP_ConnHdlr { - var BssgpDecoded bd; var RoutingAreaIdentificationV old_ra := f_random_RAI(); var template PDU_L3_MS_SGSN attach_req := ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit); @@ -2159,7 +2150,7 @@ var template PDU_L3_SGSN_MS auth_ciph_req := tr_GMM_AUTH_REQ(g_pars.vec.rand); auth_ciph_req.msgs.gprs_mm.authenticationAndCipheringRequest.authenticationParameterAUTN := autn; - BSSGP[0].receive(tr_BD_L3_MT(auth_ciph_req)) -> value bd; + BSSGP[0].receive(auth_ciph_req) -> value l3_mt; /* send the gmm auth failure with resync IE */ f_send_l3_gmm_llc(ts_GMM_AUTH_FAIL_UMTS_AKA_RESYNC(g_pars.vec.auts)); @@ -2191,8 +2182,7 @@ /* wait for the new Auth Request */ auth_ciph_req := tr_GMM_AUTH_REQ(g_pars.vec.rand); auth_ciph_req.msgs.gprs_mm.authenticationAndCipheringRequest.authenticationParameterAUTN := autn; - BSSGP[0].receive(tr_BD_L3_MT(auth_ciph_req)) -> value bd; - l3_mt := bd.l3_mt; + BSSGP[0].receive(auth_ciph_req) -> value l3_mt; var BIT4 ac_ref := l3_mt.msgs.gprs_mm.authenticationAndCipheringRequest.acReferenceNumber.valueField; var template PDU_L3_MS_SGSN auth_ciph_resp := ts_GMM_AUTH_RESP_2G(ac_ref, g_pars.vec.sres); auth_ciph_resp := ts_GMM_AUTH_RESP_2G(ac_ref, g_pars.vec.sres); @@ -2216,8 +2206,8 @@ /* Expect SGSN to perform LU with HLR */ f_gmm_gsup_lu_isd(); - BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?))) -> value bd { - f_process_attach_accept(bd.l3_mt.msgs.gprs_mm.attachAccept); + BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?)) -> value l3_mt { + f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept); } f_send_l3_gmm_llc(ts_GMM_ATTACH_COMPL); setverdict(pass); @@ -2269,7 +2259,7 @@ f_gmm_attach(false, false); f_sleep(1.0); f_send_llc(ts_LLC_SABM({}, '1'B, c_LLC_SAPI_LLGMM, LLC_CR_UL_CMD)); - BSSGP[0].receive(tr_BD_LLC(tr_LLC_DM(?, c_LLC_SAPI_LLGMM, LLC_CR_DL_RSP))); + BSSGP[0].receive(tr_LLC_DM(?, c_LLC_SAPI_LLGMM, LLC_CR_DL_RSP)); setverdict(pass); } testcase TC_llc_sabm_dm_llgmm() runs on test_CT { @@ -2285,7 +2275,7 @@ f_gmm_attach(false, false); f_sleep(1.0); f_send_llc(ts_LLC_SABM({}, '1'B, c_LLC_SAPI_LL5, LLC_CR_UL_CMD)); - BSSGP[0].receive(tr_BD_LLC(tr_LLC_DM(?, c_LLC_SAPI_LL5, LLC_CR_DL_RSP))); + BSSGP[0].receive(tr_LLC_DM(?, c_LLC_SAPI_LL5, LLC_CR_DL_RSP)); setverdict(pass); } testcase TC_llc_sabm_dm_ll5() runs on test_CT { @@ -2312,7 +2302,7 @@ xid_rx := { tr_XID_L3(''O) }; f_send_llc(ts_LLC_XID_MO_CMD(xid, apars.sapi)); alt { - [] BSSGP[0].receive(tr_BD_LLC(tr_LLC_XID(xid_rx, apars.sapi))); + [] BSSGP[0].receive(tr_LLC_XID(xid_rx, apars.sapi)); [] as_xid(apars); } setverdict(pass); @@ -2340,7 +2330,7 @@ xid_rx := { tr_XID_N201U(1234) }; f_send_llc(ts_LLC_XID_MO_CMD(xid, apars.sapi)); alt { - [] BSSGP[0].receive(tr_BD_LLC(tr_LLC_XID_MT_RSP(xid_rx, apars.sapi))); + [] BSSGP[0].receive(tr_LLC_XID_MT_RSP(xid_rx, apars.sapi)); [] as_xid(apars); } setverdict(pass); -- To view, visit https://gerrit.osmocom.org/13865 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I8c1082880902dd9a04935945f0293895f4d0c53a Gerrit-Change-Number: 13865 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 23:44:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 23:44:53 +0000 Subject: Change in osmo-ttcn3-hacks[master]: sgsn: Actual first Iu test case Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13866 Change subject: sgsn: Actual first Iu test case ...................................................................... sgsn: Actual first Iu test case Change-Id: I66069e31c30d33934ad57cc2b8794f56ffd5c7d6 --- M sgsn/SGSN_Tests.ttcn A sgsn/SGSN_Tests_Iu.ttcn 2 files changed, 120 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/66/13866/1 diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index 5dae397..8bd32b1 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -1,5 +1,7 @@ module SGSN_Tests { +friend module SGSN_Tests_Iu; + import from General_Types all; import from Osmocom_Types all; import from Native_Functions all; @@ -455,16 +457,72 @@ f_send_llc(ts_LLC_UI(l3_enc, sapi, '0'B, n_u)); } +/* trigger sending of a RANAP InitialUE and wait for SCCP connection confirmation */ +function f_send_l3_initial_ue(template PDU_L3_MS_SGSN l3_mo) runs on BSSGP_ConnHdlr { + log("Sending InitialUE: ", l3_mo); + var octetstring l3_enc := enc_PDU_L3_MS_SGSN(valueof(l3_mo)); + var RANAP_PDU ranap; + var LAI lai := { + pLMNidentity := '62F224'O, + lAC := '1234'O, + iE_Extensions := omit + }; + var SAI sai := { + pLMNidentity := lai.pLMNidentity, + lAC := lai.lAC, + sAC := '0000'O, /* FIXME */ + iE_Extensions := omit + }; + var IuSignallingConnectionIdentifier sigc_id := int2bit(23, 24); /* FIXME */ + var GlobalRNC_ID grnc_id := { + pLMNidentity := lai.pLMNidentity, + rNC_ID := 2342 /* FIXME */ + }; + + ranap := valueof(ts_RANAP_initialUE_CS(lai, sai, l3_enc, sigc_id, grnc_id)); + BSSAP.send(ts_RANAP_Conn_Req(g_pars.sccp_addr_peer, g_pars.sccp_addr_local, ranap)); + alt { + [] BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_CONF_IND) {} + [] BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND) { + setverdict(fail, "DISC.ind from SCCP"); + mtc.stop; + } + } +} + +/* send a L3 (GMM/SM) message over whatever is the appropriate lower-layer bearer */ +function f_send_l3(template PDU_L3_MS_SGSN l3_mo, integer gb_index := 0, boolean initial := false) runs on BSSGP_ConnHdlr { + if (gb_index >= NUM_GB) { + if (initial) { + f_send_l3_initial_ue(l3_mo); + } else { + BSSAP.send(ts_PDU_DTAP_PS_MO(l3_mo)); + } + } else { + f_send_l3_gmm_llc(l3_mo, gb_index); + } +} + altstep as_mm_identity(integer gb_idx := 0) runs on BSSGP_ConnHdlr { var MobileL3_CommonIE_Types.MobileIdentityLV mi; - [] BSSGP[gb_idx].receive(tr_GMM_ID_REQ('001'B)) { + [gb_idx < NUM_GB] BSSGP[gb_idx].receive(tr_GMM_ID_REQ('001'B)) { mi := valueof(ts_MI_IMSI_LV(g_pars.imsi)); - f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi), gb_idx); + f_send_l3(ts_GMM_ID_RESP(mi), gb_idx); repeat; } - [] BSSGP[gb_idx].receive(tr_GMM_ID_REQ('010'B)) { + [gb_idx >= NUM_GB] BSSAP.receive(tr_PDU_DTAP_PS_MT(tr_GMM_ID_REQ('001'B))) { + mi := valueof(ts_MI_IMSI_LV(g_pars.imsi)); + f_send_l3(ts_GMM_ID_RESP(mi), gb_idx); + repeat; + } + [gb_idx < NUM_GB] BSSGP[gb_idx].receive(tr_GMM_ID_REQ('010'B)) { mi := valueof(ts_MI_IMEI_LV(g_pars.imei)); - f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi), gb_idx); + f_send_l3(ts_GMM_ID_RESP(mi), gb_idx); + repeat; + } + [gb_idx >= NUM_GB] BSSAP.receive(tr_PDU_DTAP_PS_MT(tr_GMM_ID_REQ('010'B))) { + mi := valueof(ts_MI_IMEI_LV(g_pars.imei)); + f_send_l3(ts_GMM_ID_RESP(mi), gb_idx); repeat; } } @@ -475,7 +533,10 @@ var PDU_DTAP_PS_MT mt; var PDU_L3_SGSN_MS l3_mt; alt { - [] BSSGP[gb_idx].receive(rx_tpl) -> value l3_mt { } + [gb_idx < NUM_GB] BSSGP[gb_idx].receive(rx_tpl) -> value l3_mt { } + [gb_idx >= NUM_GB] BSSAP.receive(tr_PDU_DTAP_PS_MT(rx_tpl)) -> value mt { + l3_mt := mt.dtap; + } } return l3_mt; } @@ -543,7 +604,17 @@ l3_mo.msgs.gprs_mm.authenticationAndCipheringResponse.imeisv := valueof(ts_MI_IMEISV_TLV(g_pars.imei & '0'H)); } - f_send_l3_gmm_llc(l3_mo, gb_idx); + f_send_l3(l3_mo, gb_idx); + + /* Security Mode Command + Complete on Iu case */ + if (gb_idx >= NUM_GB) { + BSSAP.receive(tr_RANAP_SecurityModeCmd(uia_algs := ?, uia_key := oct2bit(g_pars.vec.ik), + key_sts := ?)) { + var IntegrityProtectionAlgorithm uia_chosen := 0; /*standard_UMTS_integrity_algorithm_UIA1;*/ + BSSAP.send(ts_RANAP_SecurityModeComplete(uia_chosen)); + //BSSAP.receive(tr_RANAP_CommonId(imsi_hex2oct(g_pars.imsi))); + } + } } else { /* wait for identity procedure */ f_sleep(1.0); @@ -649,7 +720,7 @@ * revisionLevelIndicatior is at the wrong place! */ attach_req.msgs.gprs_mm.attachRequest.msNetworkCapability.msNetworkCapabilityV.solSACapability := '0'B; - f_send_l3_gmm_llc(attach_req, gb_idx); + f_send_l3(attach_req, gb_idx, initial := true); f_gmm_auth(umts_aka_challenge, force_gsm_sres, gb_idx); /* Expect SGSN to perform LU with HLR */ f_gmm_gsup_lu_isd(); @@ -658,7 +729,12 @@ f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept); /* FIXME: Extract P-TMSI, if any. Only send Complete if necessary */ - f_send_l3_gmm_llc(ts_GMM_ATTACH_COMPL, gb_idx); + f_send_l3(ts_GMM_ATTACH_COMPL, gb_idx); + + /* IuPS case: Expect Iu Release */ + if (gb_idx >= NUM_GB) { + as_iu_release_compl_disc(); + } } private function f_TC_attach(charstring id) runs on BSSGP_ConnHdlr { diff --git a/sgsn/SGSN_Tests_Iu.ttcn b/sgsn/SGSN_Tests_Iu.ttcn new file mode 100644 index 0000000..2c2a8af --- /dev/null +++ b/sgsn/SGSN_Tests_Iu.ttcn @@ -0,0 +1,36 @@ +module SGSN_Tests_Iu { + +import from Osmocom_Types all; + +import from SGSN_Tests all; + +import from RAN_Adapter all; +import from RAN_Emulation all; +import from RANAP_Templates all; +import from RANAP_PDU_Descriptions all; +import from RANAP_IEs all; + + +private function f_TC_iu_attach(charstring id) runs on BSSGP_ConnHdlr { + var PdpActPars apars := valueof(t_PdpActPars(mp_ggsn_ip)); + + /* first perform regular attach */ + f_gmm_attach(umts_aka_challenge := true, force_gsm_sres := false, gb_idx := 3); + setverdict(pass); +} +testcase TC_iu_attach() runs on test_CT { + var BSSGP_ConnHdlr vc_conn; + f_init(); + f_sleep(1.0); + vc_conn := f_start_handler(refers(f_TC_iu_attach), testcasename(), g_gb, 1001); + vc_conn.done; +} + + + +control { + execute( TC_iu_attach() ); +} + + +} -- To view, visit https://gerrit.osmocom.org/13866 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I66069e31c30d33934ad57cc2b8794f56ffd5c7d6 Gerrit-Change-Number: 13866 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 23:47:57 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 23:47:57 +0000 Subject: Change in osmocom-bb[master]: mobile/gsm322.c: fix heap-use-after-free in gsm322_unselect_cell() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13855 ) Change subject: mobile/gsm322.c: fix heap-use-after-free in gsm322_unselect_cell() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13855 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9cc526c18d69695d810de98703579818408de011 Gerrit-Change-Number: 13855 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 02 May 2019 23:47:57 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 23:48:11 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 23:48:11 +0000 Subject: Change in osmocom-bb[master]: mobile/gsm48_rr.h: mark gsm48_rr_hdr struct as packed In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13856 ) Change subject: mobile/gsm48_rr.h: mark gsm48_rr_hdr struct as packed ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13856 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8aa2c0074b405afd0e76044ef076b6819fe1083b Gerrit-Change-Number: 13856 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 02 May 2019 23:48:11 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 23:48:22 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 23:48:22 +0000 Subject: Change in osmocom-bb[master]: mobile/gsm48_mm.c: use proper types for gsm48_rr_hdr In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13857 ) Change subject: mobile/gsm48_mm.c: use proper types for gsm48_rr_hdr ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13857 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I29ed122b8956260b9f847cc0e3e81a28d6762632 Gerrit-Change-Number: 13857 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 02 May 2019 23:48:22 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 23:48:25 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 23:48:25 +0000 Subject: Change in osmocom-bb[master]: mobile/gsm322.c: fix heap-use-after-free in gsm322_unselect_cell() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13855 ) Change subject: mobile/gsm322.c: fix heap-use-after-free in gsm322_unselect_cell() ...................................................................... mobile/gsm322.c: fix heap-use-after-free in gsm322_unselect_cell() In gsm322_l1_signal(), if S_L1CTL_FBSB_ERR is received, we free stored System Information of the current cell, but cs->si may still point to it. Let's set it to NULL. Found with AddressSanitizer: DL1C ERROR l1ctl.c:96 FBSB RESP: result=255 DCS INFO gsm322.c:2995 Channel sync error, try again DCS INFO gsm322.c:467 Sync to ARFCN=860(DCS) rxlev=-106 DRR INFO gsm48_rr.c:665 MON: no cell info DRR INFO gsm48_rr.c:665 MON: no cell info DRR INFO gsm48_rr.c:665 MON: no cell info DRR INFO gsm48_rr.c:665 MON: no cell info DL1C ERROR l1ctl.c:96 FBSB RESP: result=255 DCS INFO gsm322.c:3008 Channel sync error. DCS DEBUG gsm322.c:3013 free sysinfo ARFCN=860(DCS) DCS INFO gsm322.c:3020 Unselect cell due to sync error! DCS INFO gsm322.c:509 Unselecting serving cell. ================================================================= ==6014==ERROR: AddressSanitizer: heap-use-after-free on address 0x61b0000000e6 at pc 0x00000050d6dd bp 0x7fff7f84aa60 sp 0x7fff7f84aa58 Change-Id: I9cc526c18d69695d810de98703579818408de011 --- M src/host/layer23/src/mobile/gsm322.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index 7da63e3..bfe6329 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -3011,6 +3011,8 @@ cs->list[cs->arfci].flags &= ~GSM322_CS_FLAG_SYSINFO; LOGP(DCS, LOGL_DEBUG, "free sysinfo ARFCN=%s\n", gsm_print_arfcn(index2arfcn(cs->arfci))); + if (cs->si == cs->list[cs->arfci].sysinfo) + cs->si = NULL; talloc_free(cs->list[cs->arfci].sysinfo); cs->list[cs->arfci].sysinfo = NULL; -- To view, visit https://gerrit.osmocom.org/13855 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I9cc526c18d69695d810de98703579818408de011 Gerrit-Change-Number: 13855 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 23:48:26 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 23:48:26 +0000 Subject: Change in osmocom-bb[master]: mobile/gsm48_rr.h: mark gsm48_rr_hdr struct as packed In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13856 ) Change subject: mobile/gsm48_rr.h: mark gsm48_rr_hdr struct as packed ...................................................................... mobile/gsm48_rr.h: mark gsm48_rr_hdr struct as packed In both gsm48_mm.c and gsm48_rr.c we put / push 'gsm48_rr_hdr' structure into the message buffers, so then it's retrieved by the message receivers. The AddressSanitizer complains about unaligned pointer access and potentially unexpected behaviour. Change-Id: I8aa2c0074b405afd0e76044ef076b6819fe1083b --- M src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h b/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h index 6235bfd..6996ff3 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h +++ b/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h @@ -61,7 +61,7 @@ uint32_t msg_type; /* RR-* primitive */ uint8_t sapi; uint8_t cause; -}; +} __attribute__((packed)); /* GSM 04.07 9.1.1 */ #define GSM48_RR_ST_IDLE 0 -- To view, visit https://gerrit.osmocom.org/13856 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I8aa2c0074b405afd0e76044ef076b6819fe1083b Gerrit-Change-Number: 13856 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 23:48:26 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 23:48:26 +0000 Subject: Change in osmocom-bb[master]: mobile/gsm48_mm.c: use proper types for gsm48_rr_hdr In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13857 ) Change subject: mobile/gsm48_mm.c: use proper types for gsm48_rr_hdr ...................................................................... mobile/gsm48_mm.c: use proper types for gsm48_rr_hdr Change-Id: I29ed122b8956260b9f847cc0e3e81a28d6762632 --- M src/host/layer23/src/mobile/gsm48_mm.c 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/host/layer23/src/mobile/gsm48_mm.c b/src/host/layer23/src/mobile/gsm48_mm.c index 02d861e..872dce5 100644 --- a/src/host/layer23/src/mobile/gsm48_mm.c +++ b/src/host/layer23/src/mobile/gsm48_mm.c @@ -3583,7 +3583,7 @@ */ static int gsm48_rcv_rr_sapi3(struct osmocom_ms *ms, struct msgb *msg, - int msg_type, uint8_t sapi) + uint32_t msg_type, uint8_t sapi) { struct gsm48_mmlayer *mm = &ms->mmlayer; struct gsm48_mm_conn *conn; @@ -3895,12 +3895,12 @@ { struct gsm48_mmlayer *mm = &ms->mmlayer; struct gsm48_rr_hdr *rrh = (struct gsm48_rr_hdr *)msg->data; - int msg_type = rrh->msg_type; - int sapi = rrh->sapi; + uint32_t msg_type = rrh->msg_type; + uint8_t sapi = rrh->sapi; int i, rc; LOGP(DMM, LOGL_INFO, "(ms %s) Received '%s' from RR in state %s " - "(sapi %d)\n", ms->name, get_rr_name(msg_type), + "(sapi %u)\n", ms->name, get_rr_name(msg_type), gsm48_mm_state_names[mm->state], sapi); if (sapi) @@ -3969,7 +3969,7 @@ { struct gsm48_mmlayer *mm = &ms->mmlayer; struct gsm48_rr_hdr *rrh = (struct gsm48_rr_hdr *)msg->data; - int sapi = rrh->sapi; + uint8_t sapi = rrh->sapi; struct gsm48_hdr *gh = msgb_l3(msg); uint8_t pdisc = gh->proto_discr & 0x0f; uint8_t msg_type = gh->msg_type & 0xbf; -- To view, visit https://gerrit.osmocom.org/13857 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I29ed122b8956260b9f847cc0e3e81a28d6762632 Gerrit-Change-Number: 13857 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 23:48:38 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 23:48:38 +0000 Subject: Change in docker-playground[master]: debian-stretch-titan: install procps In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13850 ) Change subject: debian-stretch-titan: install procps ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/13850 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8db4ad2262a3a734201e39bc065c1c383738992c Gerrit-Change-Number: 13850 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Thu, 02 May 2019 23:48:38 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 2 23:48:39 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 2 May 2019 23:48:39 +0000 Subject: Change in docker-playground[master]: debian-stretch-titan: install procps In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13850 ) Change subject: debian-stretch-titan: install procps ...................................................................... debian-stretch-titan: install procps The ttcn3-tcpdump-stop.sh uses `ps` to find out if tcpdump is still running. Change-Id: I8db4ad2262a3a734201e39bc065c1c383738992c --- M debian-stretch-titan/Dockerfile 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/debian-stretch-titan/Dockerfile b/debian-stretch-titan/Dockerfile index 18aad4b..426eb91 100644 --- a/debian-stretch-titan/Dockerfile +++ b/debian-stretch-titan/Dockerfile @@ -22,6 +22,7 @@ apt-get -y install \ build-essential \ git \ + procps \ tcpdump \ vim \ && \ -- To view, visit https://gerrit.osmocom.org/13850 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I8db4ad2262a3a734201e39bc065c1c383738992c Gerrit-Change-Number: 13850 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 07:29:06 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 3 May 2019 07:29:06 +0000 Subject: Change in docker-playground[master]: debian-*-build: don't download "Release" file Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/13867 Change subject: debian-*-build: don't download "Release" file ...................................................................... debian-*-build: don't download "Release" file Stop jenkins jobs from failing, due to the download errors we are getting from time to time, by simply not downloading these files. They are redundant, because we are already running 'docker pull' before trying to build the debian-*-build images [1], and the docker images are released at least as often, as the "Release" file gets updated [2]. This is in line with how it is done in osmo-ci.git. [1]: Change-Id: I1076bbb7d77bdc99f5d60d641c09ce965fb9dfc6 [2]: https://hub.docker.com/_/debian Change-Id: Ieedb310814412f235e56bdc65517404842eac00f --- M debian-jessie-build/Dockerfile M debian-stretch-build/Dockerfile 2 files changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/67/13867/1 diff --git a/debian-jessie-build/Dockerfile b/debian-jessie-build/Dockerfile index 29daff6..6fe1efa 100644 --- a/debian-jessie-build/Dockerfile +++ b/debian-jessie-build/Dockerfile @@ -2,7 +2,6 @@ MAINTAINER Harald Welte -ADD http://ftp.debian.org/debian/dists/jessie/Release /tmp/Release RUN apt-get update && \ apt-get upgrade -y && \ apt-get install -y --no-install-recommends \ diff --git a/debian-stretch-build/Dockerfile b/debian-stretch-build/Dockerfile index e262d86..a4526f7 100644 --- a/debian-stretch-build/Dockerfile +++ b/debian-stretch-build/Dockerfile @@ -2,7 +2,6 @@ MAINTAINER Harald Welte -ADD http://ftp.debian.org/debian/dists/stretch/Release /tmp/Release RUN apt-get update && \ apt-get upgrade -y && \ apt-get install -y --no-install-recommends \ -- To view, visit https://gerrit.osmocom.org/13867 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ieedb310814412f235e56bdc65517404842eac00f Gerrit-Change-Number: 13867 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 07:30:22 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 3 May 2019 07:30:22 +0000 Subject: Change in docker-playground[master]: Add retries for downloading debian "Release" file In-Reply-To: References: Message-ID: osmith has abandoned this change. ( https://gerrit.osmocom.org/13848 ) Change subject: Add retries for downloading debian "Release" file ...................................................................... Abandoned Abandoning in favor of https://gerrit.osmocom.org/#/c/docker-playground/+/13867/ -- To view, visit https://gerrit.osmocom.org/13848 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: Ib7c0ffd1e938349f2e1478d833abd351bc886bed Gerrit-Change-Number: 13848 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: osmith Gerrit-Reviewer: roh -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 07:33:40 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 3 May 2019 07:33:40 +0000 Subject: Change in docker-playground[master]: debian-*-build: don't download "Release" file In-Reply-To: References: Message-ID: Hello Harald Welte, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13867 to look at the new patch set (#2). Change subject: debian-*-build: don't download "Release" file ...................................................................... debian-*-build: don't download "Release" file Stop jenkins jobs from failing, due to the download errors we are getting from time to time, by simply not downloading these files. They are redundant, because we are already running 'docker build --pull' before trying to build the debian-*-build images [1], and the docker images are released at least as often, as the "Release" file gets updated [2]. This is in line with how it is done in osmo-ci.git. [1]: Change-Id: I1076bbb7d77bdc99f5d60d641c09ce965fb9dfc6 [2]: https://hub.docker.com/_/debian Change-Id: Ieedb310814412f235e56bdc65517404842eac00f --- M debian-jessie-build/Dockerfile M debian-stretch-build/Dockerfile 2 files changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/67/13867/2 -- To view, visit https://gerrit.osmocom.org/13867 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ieedb310814412f235e56bdc65517404842eac00f Gerrit-Change-Number: 13867 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 09:31:21 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 3 May 2019 09:31:21 +0000 Subject: Change in gr-gsm[master]: Filter out SoapyAudio devices In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13812 ) Change subject: Filter out SoapyAudio devices ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13812 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: gr-gsm Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib84081041ca6c2bc18b9da0c32bac9d3ecef65ca Gerrit-Change-Number: 13812 Gerrit-PatchSet: 3 Gerrit-Owner: Vasil Velichkov Gerrit-Reviewer: Piotr Krysik Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: Vasil Velichkov Gerrit-Comment-Date: Fri, 03 May 2019 09:31:21 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 09:45:49 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 3 May 2019 09:45:49 +0000 Subject: Change in openbsc[master]: tests: Fix selection of python version Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13868 Change subject: tests: Fix selection of python version ...................................................................... tests: Fix selection of python version According to documentation (and personal experience), AM_PATH_PYTHON selects the highest version of python, no matter if major version is different, which means if both python2 and 3 are available, 3 will be chosen an PYTHON will point to "/.../python" which is python3. Apparently, the macro cannot be easily used to pick highest python2 version. chosen an PYTHON will point to "/.../python" which is python3. Apparently, the macro cannot be easily used to pick highest python2 version. As {vty,ctrl}_test_runner.py require python2 and are incompatible with python3, let's instead rely on the system having a "python2" binary available, which is the case in most distros. cherry-picked from: osmo-bsc.git 7e78681f0f740bd68ed5255b506a1efa08a231b1. Change-Id: Icc147c8457116ad551d166313f3a79e1c2107a22 --- M openbsc/configure.ac M openbsc/tests/Makefile.am M openbsc/tests/ctrl_test_runner.py M openbsc/tests/vty_test_runner.py 4 files changed, 10 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/68/13868/1 diff --git a/openbsc/configure.ac b/openbsc/configure.ac index 704c7d7..5602313 100644 --- a/openbsc/configure.ac +++ b/openbsc/configure.ac @@ -198,7 +198,10 @@ [Include the VTY/CTRL tests in make check [default=no]]), [enable_ext_tests="$enableval"],[enable_ext_tests="no"]) if test "x$enable_ext_tests" = "xyes" ; then - AM_PATH_PYTHON + AC_CHECK_PROG(PYTHON2_AVAIL,python2,yes) + if test "x$PYTHON2_AVAIL" != "xyes" ; then + AC_MSG_ERROR([Please install python2 to run the VTY/CTRL tests.]) + fi AC_CHECK_PROG(OSMOTESTEXT_CHECK,osmotestvty.py,yes) if test "x$OSMOTESTEXT_CHECK" != "xyes" ; then AC_MSG_ERROR([Please install git://osmocom.org/python/osmo-python-tests to run the VTY/CTRL tests.]) diff --git a/openbsc/tests/Makefile.am b/openbsc/tests/Makefile.am index 7208a2f..8e3f21a 100644 --- a/openbsc/tests/Makefile.am +++ b/openbsc/tests/Makefile.am @@ -64,8 +64,8 @@ python-tests: $(BUILT_SOURCES) osmotestvty.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v osmotestconfig.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v - $(PYTHON) $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v - $(PYTHON) $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v + $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v + $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v if BUILD_SMPP $(PYTHON) $(srcdir)/smpp_test_runner.py -w $(abs_top_builddir) -v endif diff --git a/openbsc/tests/ctrl_test_runner.py b/openbsc/tests/ctrl_test_runner.py old mode 100644 new mode 100755 index d76ed65..ad0a16b --- a/openbsc/tests/ctrl_test_runner.py +++ b/openbsc/tests/ctrl_test_runner.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # (C) 2013 by Jacob Erlbeck # (C) 2014 by Holger Hans Peter Freyther @@ -262,12 +262,12 @@ self.assertEquals(r['mtype'], 'SET_REPLY') self.assertEquals(r['var'], 'bts.0.trx.0.max-power-reduction') self.assertEquals(r['value'], '22') - + r = self.do_get('bts.0.trx.0.max-power-reduction') self.assertEquals(r['mtype'], 'GET_REPLY') self.assertEquals(r['var'], 'bts.0.trx.0.max-power-reduction') self.assertEquals(r['value'], '22') - + r = self.do_set('bts.0.trx.0.max-power-reduction', '1') self.assertEquals(r['mtype'], 'ERROR') self.assertEquals(r['error'], 'Value must be even') diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py old mode 100644 new mode 100755 index 44ccdd8..67adb71 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # (C) 2013 by Katerina Barone-Adesi # (C) 2013 by Holger Hans Peter Freyther -- To view, visit https://gerrit.osmocom.org/13868 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Icc147c8457116ad551d166313f3a79e1c2107a22 Gerrit-Change-Number: 13868 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 10:12:11 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 3 May 2019 10:12:11 +0000 Subject: Change in openbsc[master]: nat: Allocate bsc_nat_parsed on the stack instead of heap In-Reply-To: References: Message-ID: Hello Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13843 to look at the new patch set (#2). Change subject: nat: Allocate bsc_nat_parsed on the stack instead of heap ...................................................................... nat: Allocate bsc_nat_parsed on the stack instead of heap There's no real need to allocate it using talloc. Allocating it on the stack simplifies the code, avoids mem leaks and makes it faster. Change-Id: I66c44890952339f15131081e2f629a2824b6d3ba --- M openbsc/include/openbsc/bsc_nat.h M openbsc/src/osmo-bsc_nat/bsc_filter.c M openbsc/src/osmo-bsc_nat/bsc_nat.c M openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c M openbsc/src/osmo-bsc_nat/bsc_ussd.c M openbsc/tests/bsc-nat/bsc_nat_test.c 6 files changed, 129 insertions(+), 169 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/43/13843/2 -- To view, visit https://gerrit.osmocom.org/13843 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I66c44890952339f15131081e2f629a2824b6d3ba Gerrit-Change-Number: 13843 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 10:12:53 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 3 May 2019 10:12:53 +0000 Subject: Change in openbsc[master]: nat: Allocate bsc_nat_parsed on the stack instead of heap In-Reply-To: References: Message-ID: Hello Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13843 to look at the new patch set (#3). Change subject: nat: Allocate bsc_nat_parsed on the stack instead of heap ...................................................................... nat: Allocate bsc_nat_parsed on the stack instead of heap There's no real need to allocate it using talloc. Allocating it on the stack simplifies the code, avoids mem leaks and makes it faster. Change-Id: I66c44890952339f15131081e2f629a2824b6d3ba --- M openbsc/include/openbsc/bsc_nat.h M openbsc/src/osmo-bsc_nat/bsc_filter.c M openbsc/src/osmo-bsc_nat/bsc_nat.c M openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c M openbsc/src/osmo-bsc_nat/bsc_ussd.c M openbsc/tests/bsc-nat/bsc_nat_test.c 6 files changed, 129 insertions(+), 169 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/43/13843/3 -- To view, visit https://gerrit.osmocom.org/13843 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I66c44890952339f15131081e2f629a2824b6d3ba Gerrit-Change-Number: 13843 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 10:15:50 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 3 May 2019 10:15:50 +0000 Subject: Change in openbsc[master]: tests: Fix selection of python version In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13868 to look at the new patch set (#2). Change subject: tests: Fix selection of python version ...................................................................... tests: Fix selection of python version According to documentation (and personal experience), AM_PATH_PYTHON selects the highest version of python, no matter if major version is different, which means if both python2 and 3 are available, 3 will be chosen an PYTHON will point to "/.../python" which is python3. Apparently, the macro cannot be easily used to pick highest python2 version. chosen an PYTHON will point to "/.../python" which is python3. Apparently, the macro cannot be easily used to pick highest python2 version. As {vty,ctrl}_test_runner.py require python2 and are incompatible with python3, let's instead rely on the system having a "python2" binary available, which is the case in most distros. cherry-picked from: osmo-bsc.git 7e78681f0f740bd68ed5255b506a1efa08a231b1. Change-Id: Icc147c8457116ad551d166313f3a79e1c2107a22 --- M openbsc/configure.ac M openbsc/tests/Makefile.am M openbsc/tests/ctrl_test_runner.py M openbsc/tests/smpp_test_runner.py M openbsc/tests/vty_test_runner.py 5 files changed, 12 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/68/13868/2 -- To view, visit https://gerrit.osmocom.org/13868 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Icc147c8457116ad551d166313f3a79e1c2107a22 Gerrit-Change-Number: 13868 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 11:51:57 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 3 May 2019 11:51:57 +0000 Subject: Change in osmo-trx[master]: Move smpl_buf out of uhd dir to re-use it in other devices In-Reply-To: References: Message-ID: Hello tnt, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13831 to look at the new patch set (#2). Change subject: Move smpl_buf out of uhd dir to re-use it in other devices ...................................................................... Move smpl_buf out of uhd dir to re-use it in other devices Change-Id: I39ac8435072cff8d4dac786b31ff4af9b61a77fe --- M Transceiver52M/device/Makefile.am R Transceiver52M/device/smpl_buf.cpp R Transceiver52M/device/smpl_buf.h M Transceiver52M/device/uhd/Makefile.am 4 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/31/13831/2 -- To view, visit https://gerrit.osmocom.org/13831 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I39ac8435072cff8d4dac786b31ff4af9b61a77fe Gerrit-Change-Number: 13831 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: tnt -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 11:51:57 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 3 May 2019 11:51:57 +0000 Subject: Change in osmo-trx[master]: uhd: No need to use dynamic mem for rx_buffers In-Reply-To: References: Message-ID: Hello tnt, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13833 to look at the new patch set (#2). Change subject: uhd: No need to use dynamic mem for rx_buffers ...................................................................... uhd: No need to use dynamic mem for rx_buffers This way we don't need to free explicitly nor use dynamic allocated memory and we simplify users of its interface. Change-Id: I39b293c24053298256626fa78344102032fc2104 --- M Transceiver52M/device/smpl_buf.cpp M Transceiver52M/device/smpl_buf.h M Transceiver52M/device/uhd/UHDDevice.cpp M Transceiver52M/device/uhd/UHDDevice.h 4 files changed, 24 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/33/13833/2 -- To view, visit https://gerrit.osmocom.org/13833 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I39b293c24053298256626fa78344102032fc2104 Gerrit-Change-Number: 13833 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: tnt -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 12:39:39 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 3 May 2019 12:39:39 +0000 Subject: Change in osmo-trx[master]: smpl_buf: Remove unused clk_rt variable Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13869 Change subject: smpl_buf: Remove unused clk_rt variable ...................................................................... smpl_buf: Remove unused clk_rt variable During 87b7d098e517470fec53ac13a28d1d0fa7b16bb4 we dropped support for UHD specific functionalitites, and so clk_rt is not needed anymore. Change-Id: I37403e085ed6a541bbdecf64f1f9a821ff2753a4 --- M Transceiver52M/device/smpl_buf.cpp M Transceiver52M/device/smpl_buf.h M Transceiver52M/device/uhd/UHDDevice.cpp 3 files changed, 7 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/69/13869/1 diff --git a/Transceiver52M/device/smpl_buf.cpp b/Transceiver52M/device/smpl_buf.cpp index f3fc323..e3c5af5 100644 --- a/Transceiver52M/device/smpl_buf.cpp +++ b/Transceiver52M/device/smpl_buf.cpp @@ -25,9 +25,9 @@ #include "smpl_buf.h" #include -smpl_buf::smpl_buf(size_t len, double rate) - : buf_len(len), clk_rt(rate), - time_start(0), time_end(0), data_start(0), data_end(0) +smpl_buf::smpl_buf(size_t len) + : buf_len(len), time_start(0), time_end(0), + data_start(0), data_end(0) { data = new uint32_t[len]; } @@ -100,12 +100,12 @@ if (timestamp < time_end) { LOGC(DDEV, ERR) << "Overwriting old buffer data: timestamp="<SDR interface (" + LOGCHAN(i, DMAIN, NOTICE) << "dumping STALE burst in TRX->SDR interface (" << burst->getTime() <<" vs " << nowTime << "), retrans=" << state->mRetrans; if (state->mRetrans) updateFillerTable(i, burst); @@ -725,7 +725,7 @@ /* Set command pointer */ command = buffer + 4; - LOGC(DTRXCTRL, INFO) << "chan " << chan << ": command is '" << command << "'"; + LOGCHAN(chan, DTRXCTRL, INFO) << "command is '" << command << "'"; if (match_cmd(command, "POWEROFF", NULL)) { stop(); @@ -856,7 +856,7 @@ sprintf(response,"RSP ERR 1"); } - LOGC(DTRXCTRL, INFO) << "chan " << chan << ": response is '" << response << "'"; + LOGCHAN(chan, DTRXCTRL, INFO) << "response is '" << response << "'"; mCtrlSockets[chan]->write(response, strlen(response) + 1); } diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp index be51a12..035e593 100644 --- a/Transceiver52M/device/lms/LMSDevice.cpp +++ b/Transceiver52M/device/lms/LMSDevice.cpp @@ -337,7 +337,7 @@ /* do rx/tx calibration - depends on gain, freq and bw */ bool LMSDevice::do_calib(size_t chan) { - LOGC(DDEV, INFO) << "Calibrating chan " << chan; + LOGCHAN(chan, DDEV, INFO) << "Calibrating"; if (LMS_Calibrate(m_lms_dev, LMS_CH_RX, chan, LMS_CALIBRATE_BW_HZ, 0) < 0) return false; if (LMS_Calibrate(m_lms_dev, LMS_CH_TX, chan, LMS_CALIBRATE_BW_HZ, 0) < 0) @@ -351,7 +351,7 @@ lms_range_t range_lpfbw_rx, range_lpfbw_tx; float_type lpfbw_rx, lpfbw_tx; - LOGC(DDEV, INFO) << "Setting filters on chan " << chan; + LOGCHAN(chan, DDEV, INFO) << "Setting filters"; if (LMS_GetLPFBWRange(m_lms_dev, LMS_CH_RX, &range_lpfbw_rx)) return false; print_range("LPFBWRange Rx", &range_lpfbw_rx); @@ -362,9 +362,9 @@ lpfbw_rx = OSMO_MIN(OSMO_MAX(1.4001e6, range_lpfbw_rx.min), range_lpfbw_rx.max); lpfbw_tx = OSMO_MIN(OSMO_MAX(5.2e6, range_lpfbw_tx.min), range_lpfbw_tx.max); - LOGC(DDEV, INFO) << "LPFBW: Rx=" << lpfbw_rx << " Tx=" << lpfbw_tx; + LOGCHAN(chan, DDEV, INFO) << "LPFBW: Rx=" << lpfbw_rx << " Tx=" << lpfbw_tx; - LOGC(DDEV, INFO) << "Setting LPFBW chan " << chan; + LOGCHAN(chan, DDEV, INFO) << "Setting LPFBW"; if (LMS_SetLPFBW(m_lms_dev, LMS_CH_RX, chan, lpfbw_rx) < 0) return false; if (LMS_SetLPFBW(m_lms_dev, LMS_CH_TX, chan, lpfbw_tx) < 0) @@ -400,10 +400,10 @@ if (dB < minTxGain()) dB = minTxGain(); - LOGC(DDEV, NOTICE) << "chan " << chan <<": Setting TX gain to " << dB << " dB"; + LOGCHAN(chan, DDEV, NOTICE) << "Setting TX gain to " << dB << " dB"; if (LMS_SetGaindB(m_lms_dev, LMS_CH_TX, chan, dB) < 0) - LOGC(DDEV, ERR) << "chan " << chan <<": Error setting TX gain to " << dB << " dB"; + LOGCHAN(chan, DDEV, ERR) << "Error setting TX gain to " << dB << " dB"; return dB; } @@ -415,10 +415,10 @@ if (dB < minRxGain()) dB = minRxGain(); - LOGC(DDEV, NOTICE) << "chan "<< chan << ": Setting RX gain to " << dB << " dB"; + LOGCHAN(chan, DDEV, NOTICE) << "Setting RX gain to " << dB << " dB"; if (LMS_SetGaindB(m_lms_dev, LMS_CH_RX, chan, dB) < 0) - LOGC(DDEV, ERR) << "chan "<< chan << ": Error setting RX gain to " << dB << " dB"; + LOGCHAN(chan, DDEV, ERR) << "Error setting RX gain to " << dB << " dB"; return dB; } @@ -476,12 +476,12 @@ idx = get_ant_idx(ant, LMS_CH_RX, chan); if (idx < 0) { - LOGC(DDEV, ERROR) << "Invalid Rx Antenna"; + LOGCHAN(chan, DDEV, ERROR) << "Invalid Rx Antenna"; return false; } if (LMS_SetAntenna(m_lms_dev, LMS_CH_RX, chan, idx) < 0) { - LOGC(DDEV, ERROR) << "Unable to set Rx Antenna"; + LOGCHAN(chan, DDEV, ERROR) << "Unable to set Rx Antenna"; } return true; @@ -499,12 +499,12 @@ idx = LMS_GetAntenna(m_lms_dev, LMS_CH_RX, chan); if (idx < 0) { - LOGC(DDEV, ERROR) << "Error getting Rx Antenna"; + LOGCHAN(chan, DDEV, ERROR) << "Error getting Rx Antenna"; return ""; } if (LMS_GetAntennaList(m_lms_dev, LMS_CH_RX, chan, name_list) < idx) { - LOGC(DDEV, ERROR) << "Error getting Rx Antenna List"; + LOGCHAN(chan, DDEV, ERROR) << "Error getting Rx Antenna List"; return ""; } @@ -522,12 +522,12 @@ idx = get_ant_idx(ant, LMS_CH_TX, chan); if (idx < 0) { - LOGC(DDEV, ERROR) << "Invalid Rx Antenna"; + LOGCHAN(chan, DDEV, ERROR) << "Invalid Rx Antenna"; return false; } if (LMS_SetAntenna(m_lms_dev, LMS_CH_TX, chan, idx) < 0) { - LOGC(DDEV, ERROR) << "Unable to set Rx Antenna"; + LOGCHAN(chan, DDEV, ERROR) << "Unable to set Rx Antenna"; } return true; @@ -545,12 +545,12 @@ idx = LMS_GetAntenna(m_lms_dev, LMS_CH_TX, chan); if (idx < 0) { - LOGC(DDEV, ERROR) << "Error getting Tx Antenna"; + LOGCHAN(chan, DDEV, ERROR) << "Error getting Tx Antenna"; return ""; } if (LMS_GetAntennaList(m_lms_dev, LMS_CH_TX, chan, name_list) < idx) { - LOGC(DDEV, ERROR) << "Error getting Tx Antenna List"; + LOGCHAN(chan, DDEV, ERROR) << "Error getting Tx Antenna List"; return ""; } @@ -573,7 +573,7 @@ if (LMS_GetStreamStatus(&m_lms_stream_rx[chan], &status) == 0) { if (status.underrun > m_last_rx_underruns[chan]) { *underrun = true; - LOGC(DDEV, ERROR) << "chan " << chan << ": recv Underrun! (" + LOGCHAN(chan, DDEV, ERROR) << "recv Underrun! (" << m_last_rx_underruns[chan] << " -> " << status.underrun << ")"; } @@ -581,14 +581,14 @@ if (status.overrun > m_last_rx_overruns[chan]) { *overrun = true; - LOGC(DDEV, ERROR) << "chan " << chan << ": recv Overrun! (" + LOGCHAN(chan, DDEV, ERROR) << "recv Overrun! (" << m_last_rx_overruns[chan] << " -> " << status.overrun << ")"; } m_last_rx_overruns[chan] = status.overrun; if (status.droppedPackets > m_last_rx_dropped[chan]) { - LOGC(DDEV, ERROR) << "chan " << chan << ": recv Dropped packets by HW! (" + LOGCHAN(chan, DDEV, ERROR) << "recv Dropped packets by HW! (" << m_last_rx_dropped[chan] << " -> " << status.droppedPackets << ")"; } @@ -619,12 +619,12 @@ rc = LMS_RecvStream(&m_lms_stream_rx[i], bufs[i], len, &rx_metadata, 100); update_stream_stats(i, underrun, overrun); if (rc != len) { - LOGC(DDEV, ERROR) << "LMS: Device receive timed out (" << rc << " vs exp " << len << ")."; + LOGCHAN(i, DDEV, ERROR) << "LMS: Device receive timed out (" << rc << " vs exp " << len << ")."; thread_enable_cancel(true); return -1; } if (timestamp != (TIMESTAMP)rx_metadata.timestamp) - LOGC(DDEV, ERROR) << "chan "<< i << " recv buffer of len " << rc << " expect " << std::hex << timestamp << " got " << std::hex << (TIMESTAMP)rx_metadata.timestamp << " (" << std::hex << rx_metadata.timestamp <<") diff=" << rx_metadata.timestamp - timestamp; + LOGCHAN(i, DDEV, ERROR) << "recv buffer of len " << rc << " expect " << std::hex << timestamp << " got " << std::hex << (TIMESTAMP)rx_metadata.timestamp << " (" << std::hex << rx_metadata.timestamp <<") diff=" << rx_metadata.timestamp - timestamp; thread_enable_cancel(true); } @@ -659,11 +659,11 @@ *underrun = false; for (i = 0; i -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 18:05:35 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 3 May 2019 18:05:35 +0000 Subject: Change in osmo-trx[master]: lms: Use smpl_buf to recover from timestamp jumps Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13872 Change subject: lms: Use smpl_buf to recover from timestamp jumps ...................................................................... lms: Use smpl_buf to recover from timestamp jumps Also take the chance to make sure we handle properly short reads (keep reading again). Both scenarios can be tested by running osmo-trx-lms and then using on a terminal: sudo kill -STOP `pidof osmo-trx-lms`; sleep 0.5; sudo kill -CONT `pidof osmo-trx-lms` Fixes: OS#3339 Change-Id: Idfc4e69acc30afb11440b6b9cbdcfa09ff920265 --- M Transceiver52M/device/lms/LMSDevice.cpp M Transceiver52M/device/lms/LMSDevice.h M Transceiver52M/device/lms/Makefile.am 3 files changed, 70 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/72/13872/1 diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp index 035e593..222ce91 100644 --- a/Transceiver52M/device/lms/LMSDevice.cpp +++ b/Transceiver52M/device/lms/LMSDevice.cpp @@ -40,6 +40,7 @@ #define GSM_CARRIER_BW 270000.0 /* 270kHz */ #define LMS_MIN_BW_SUPPORTED 2.5e6 /* 2.5mHz, minimum supported by LMS */ #define LMS_CALIBRATE_BW_HZ OSMO_MAX(GSM_CARRIER_BW, LMS_MIN_BW_SUPPORTED) +#define SAMPLE_BUF_SZ (1 << 20) /* Size of Rx timestamp based Ring buffer, in bytes */ LMSDevice::LMSDevice(size_t tx_sps, size_t rx_sps, InterfaceType iface, size_t chans, double lo_offset, const std::vector& tx_paths, @@ -56,6 +57,8 @@ m_last_rx_overruns.resize(chans, 0); m_last_rx_dropped.resize(chans, 0); m_last_tx_underruns.resize(chans, 0); + + rx_buffers.resize(chans); } LMSDevice::~LMSDevice() @@ -71,6 +74,9 @@ LMS_Close(m_lms_dev); m_lms_dev = NULL; } + + for (size_t i = 0; i < rx_buffers.size(); i++) + delete rx_buffers[i]; } static void lms_log_callback(int lvl, const char *msg) @@ -238,6 +244,10 @@ goto out_close; } + /* Set up per-channel Rx timestamp based Ring buffers */ + for (size_t i = 0; i < rx_buffers.size(); i++) + rx_buffers[i] = new smpl_buf(SAMPLE_BUF_SZ / sizeof(uint32_t)); + started = false; return NORMAL; @@ -600,7 +610,9 @@ int LMSDevice::readSamples(std::vector < short *>&bufs, int len, bool * overrun, TIMESTAMP timestamp, bool * underrun, unsigned *RSSI) { - int rc = 0; + int rc, num_smpls, expect_smpls; + ssize_t avail_smpls; + TIMESTAMP expect_timestamp; unsigned int i; lms_stream_meta_t rx_metadata = {}; rx_metadata.flushPartialPacket = false; @@ -614,24 +626,62 @@ *overrun = false; *underrun = false; - for (i = 0; i #include @@ -53,6 +54,8 @@ std::vector m_last_rx_dropped; std::vector m_last_tx_underruns; + std::vector rx_buffers; + double actualSampleRate; ///< the actual USRP sampling rate bool started; ///< flag indicates LMS has started diff --git a/Transceiver52M/device/lms/Makefile.am b/Transceiver52M/device/lms/Makefile.am index 8471074..30f105d 100644 --- a/Transceiver52M/device/lms/Makefile.am +++ b/Transceiver52M/device/lms/Makefile.am @@ -7,4 +7,4 @@ noinst_LTLIBRARIES = libdevice.la -libdevice_la_SOURCES = LMSDevice.cpp +libdevice_la_SOURCES = LMSDevice.cpp ../smpl_buf.cpp -- To view, visit https://gerrit.osmocom.org/13872 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Idfc4e69acc30afb11440b6b9cbdcfa09ff920265 Gerrit-Change-Number: 13872 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 18:16:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 3 May 2019 18:16:47 +0000 Subject: Change in osmo-trx[master]: cosmetic: uhd: Move smpl_buf out of UHDDevice, move UHDDevice class d... In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13809 ) Change subject: cosmetic: uhd: Move smpl_buf out of UHDDevice, move UHDDevice class definition to .h ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13809 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib4594320da9bb7f6e9f52e7d70d11ecd11106aae Gerrit-Change-Number: 13809 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: tnt Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 03 May 2019 18:16:47 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 18:17:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 3 May 2019 18:17:53 +0000 Subject: Change in osmo-trx[master]: Move smpl_buf out of uhd dir to re-use it in other devices In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13831 ) Change subject: Move smpl_buf out of uhd dir to re-use it in other devices ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13831 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I39ac8435072cff8d4dac786b31ff4af9b61a77fe Gerrit-Change-Number: 13831 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: tnt Gerrit-Comment-Date: Fri, 03 May 2019 18:17:53 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 18:18:21 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 3 May 2019 18:18:21 +0000 Subject: Change in osmo-trx[master]: smpl_buf: Remove unused clk_rt variable In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13869 ) Change subject: smpl_buf: Remove unused clk_rt variable ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13869 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I37403e085ed6a541bbdecf64f1f9a821ff2753a4 Gerrit-Change-Number: 13869 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 03 May 2019 18:18:21 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 18:18:42 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 3 May 2019 18:18:42 +0000 Subject: Change in osmo-trx[master]: uhd: Avoid reallocation of buffers every read In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13830 ) Change subject: uhd: Avoid reallocation of buffers every read ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13830 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8c881c9c303c80f323825d85a924d74b76d2ce47 Gerrit-Change-Number: 13830 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: tnt Gerrit-Comment-Date: Fri, 03 May 2019 18:18:42 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 18:20:34 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 3 May 2019 18:20:34 +0000 Subject: Change in osmo-bsc[master]: assignment_fsm: Properly support assigning signalling mode TCH/x In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13818 ) Change subject: assignment_fsm: Properly support assigning signalling mode TCH/x ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13818 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I7513d2cbe8b695ba6f031ad11560c63a6535cf2d Gerrit-Change-Number: 13818 Gerrit-PatchSet: 2 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: tnt Gerrit-Comment-Date: Fri, 03 May 2019 18:20:34 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 18:20:36 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 3 May 2019 18:20:36 +0000 Subject: Change in osmo-bsc[master]: assignment_fsm: Properly support assigning signalling mode TCH/x In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13818 ) Change subject: assignment_fsm: Properly support assigning signalling mode TCH/x ...................................................................... assignment_fsm: Properly support assigning signalling mode TCH/x To support the 3 possible preferences, the changes needed were: - Replace 'full_rate' bool with a 3 option enum to represent the channels types for signalling - Switch from _pref/_alt to using an array sorted in preference order Originally merged as Change-Id I4c7499c8c866ea3ff7b1327edb3615d003d927d3, reverted because the change broke voice calls. Re-submitting with the fix: don't forget to set conn->assignment.requires_voice_stream. Signed-off-by: Sylvain Munaut Change-Id: I7513d2cbe8b695ba6f031ad11560c63a6535cf2d --- M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/lchan_select.h M src/osmo-bsc/assignment_fsm.c M src/osmo-bsc/codec_pref.c M src/osmo-bsc/handover_fsm.c M src/osmo-bsc/lchan_select.c M src/osmo-bsc/osmo_bsc_bssap.c M tests/codec_pref/codec_pref_test.c 8 files changed, 169 insertions(+), 133 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved tnt: Looks good to me, but someone else must approve diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index dacc63b..dc686c3 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -98,9 +98,15 @@ SUBSCR_SCCP_ST_CONNECTED }; +enum channel_rate { + CH_RATE_SDCCH, + CH_RATE_HALF, + CH_RATE_FULL, +}; + struct channel_mode_and_rate { enum gsm48_chan_mode chan_mode; - bool full_rate; + enum channel_rate chan_rate; uint16_t s15_s0; }; @@ -115,12 +121,9 @@ char msc_rtp_addr[INET_ADDRSTRLEN]; uint16_t msc_rtp_port; - /* Prefered rate/codec setting (mandatory) */ - struct channel_mode_and_rate ch_mode_rate_pref; - - /* Alternate rate/codec setting (optional) */ - bool ch_mode_rate_alt_present; - struct channel_mode_and_rate ch_mode_rate_alt; + /* Rate/codec setting in preference order (need at least 1 !) */ + int n_ch_mode_rate; + struct channel_mode_and_rate ch_mode_rate[3]; }; /* State of an ongoing Assignment, while the assignment_fsm is still busy. This serves as state separation to keep the diff --git a/include/osmocom/bsc/lchan_select.h b/include/osmocom/bsc/lchan_select.h index 4aecdf6..865181b 100644 --- a/include/osmocom/bsc/lchan_select.h +++ b/include/osmocom/bsc/lchan_select.h @@ -3,4 +3,4 @@ struct gsm_lchan *lchan_select_by_type(struct gsm_bts *bts, enum gsm_chan_t type); struct gsm_lchan *lchan_select_by_chan_mode(struct gsm_bts *bts, - enum gsm48_chan_mode chan_mode, bool full_rate); + enum gsm48_chan_mode chan_mode, enum channel_rate chan_rate); diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c index fdfc080..834b58b 100644 --- a/src/osmo-bsc/assignment_fsm.c +++ b/src/osmo-bsc/assignment_fsm.c @@ -250,17 +250,15 @@ static bool lchan_type_compat_with_mode(enum gsm_chan_t type, const struct channel_mode_and_rate *ch_mode_rate) { enum gsm48_chan_mode chan_mode = ch_mode_rate->chan_mode; - bool full_rate = ch_mode_rate->full_rate; + enum channel_rate chan_rate = ch_mode_rate->chan_rate; switch (chan_mode) { case GSM48_CMODE_SIGN: switch (type) { - case GSM_LCHAN_TCH_F: - case GSM_LCHAN_TCH_H: - case GSM_LCHAN_SDCCH: - return true; - default: - return false; + case GSM_LCHAN_TCH_F: return chan_rate == CH_RATE_FULL; + case GSM_LCHAN_TCH_H: return chan_rate == CH_RATE_HALF; + case GSM_LCHAN_SDCCH: return chan_rate == CH_RATE_SDCCH; + default: return false; } case GSM48_CMODE_SPEECH_V1: @@ -268,12 +266,12 @@ case GSM48_CMODE_DATA_3k6: case GSM48_CMODE_DATA_6k0: /* these services can all run on TCH/H, but we may have - * an explicit override by the 'full_rate' argument */ + * an explicit override by the 'chan_rate' argument */ switch (type) { case GSM_LCHAN_TCH_F: - return full_rate; + return chan_rate == CH_RATE_FULL; case GSM_LCHAN_TCH_H: - return !full_rate; + return chan_rate == CH_RATE_HALF; default: return false; } @@ -319,47 +317,37 @@ * sure that both are consistent. */ static int check_requires_voice_stream(struct gsm_subscriber_connection *conn) { - bool result_requires_voice_alt; - bool result_requires_voice_pref; + bool requires_voice_pref = false, requires_voice_alt; struct assignment_request *req = &conn->assignment.req; struct osmo_fsm_inst *fi = conn->fi; - int rc; + int i, rc; /* When the assignment request indicates that there is an alternate * rate available (e.g. "Full or Half rate channel, Half rate * preferred..."), then both must be either voice or either signalling, * a mismatch is not permitted */ - /* Check the prefered setting */ - rc = check_requires_voice(&result_requires_voice_pref, req->ch_mode_rate_pref.chan_mode); - if (rc < 0) { - assignment_fail(GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_NOT_SUPP, - "Prefered channel mode not supported: %s", - gsm48_chan_mode_name(req->ch_mode_rate_pref.chan_mode)); - return -EINVAL; - } - conn->assignment.requires_voice_stream = result_requires_voice_pref; + for (i = 0; i < req->n_ch_mode_rate; i++) { + rc = check_requires_voice(&requires_voice_alt, req->ch_mode_rate[i].chan_mode); + if (rc < 0) { + assignment_fail(GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_NOT_SUPP, + "Channel mode not supported (prev level %d): %s", i, + gsm48_chan_mode_name(req->ch_mode_rate[i].chan_mode)); + return -EINVAL; + } - /* If there is an alternate setting, check that one as well */ - if (!req->ch_mode_rate_alt_present) - return 0; - rc = check_requires_voice(&result_requires_voice_alt, req->ch_mode_rate_alt.chan_mode); - if (rc < 0) { - assignment_fail(GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_NOT_SUPP, - "Alternate channel mode not supported: %s", - gsm48_chan_mode_name(req->ch_mode_rate_alt.chan_mode)); - return -EINVAL; + if (i==0) + requires_voice_pref = requires_voice_alt; + else if (requires_voice_alt != requires_voice_pref) { + assignment_fail(GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_NOT_SUPP, + "Inconsistent channel modes: %s != %s", + gsm48_chan_mode_name(req->ch_mode_rate[0].chan_mode), + gsm48_chan_mode_name(req->ch_mode_rate[i].chan_mode)); + return -EINVAL; + } } - /* Make sure both settings match */ - if (result_requires_voice_pref != result_requires_voice_alt) { - assignment_fail(GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_NOT_SUPP, - "Inconsistent channel modes: %s != %s", - gsm48_chan_mode_name(req->ch_mode_rate_pref.chan_mode), - gsm48_chan_mode_name(req->ch_mode_rate_alt.chan_mode)); - return -EINVAL; - } - + conn->assignment.requires_voice_stream = requires_voice_pref; return 0; } @@ -369,18 +357,20 @@ static bool reuse_existing_lchan(struct gsm_subscriber_connection *conn) { struct assignment_request *req = &conn->assignment.req; + int i; if (!conn->lchan) return false; /* Check if the currently existing lchan is compatible with the * preferred rate/codec. */ - if (lchan_type_compat_with_mode(conn->lchan->type, &req->ch_mode_rate_pref)) - conn->lchan->ch_mode_rate = req->ch_mode_rate_pref; - else if (req->ch_mode_rate_alt_present - && lchan_type_compat_with_mode(conn->lchan->type, &req->ch_mode_rate_alt)) - conn->lchan->ch_mode_rate = req->ch_mode_rate_alt; - else + for (i = 0; i < req->n_ch_mode_rate; i++) + if (lchan_type_compat_with_mode(conn->lchan->type, &req->ch_mode_rate[i])) { + conn->lchan->ch_mode_rate = req->ch_mode_rate[i]; + break; + } + + if (i == req->n_ch_mode_rate) return false; if (conn->lchan->tch_mode != conn->lchan->ch_mode_rate.chan_mode) { @@ -398,8 +388,14 @@ void assignment_fsm_start(struct gsm_subscriber_connection *conn, struct gsm_bts *bts, struct assignment_request *req) { + static const char *rate_names[] = { + [CH_RATE_SDCCH] = "SDCCH", + [CH_RATE_HALF] = "HR", + [CH_RATE_FULL] = "FR", + }; struct osmo_fsm_inst *fi; struct lchan_activate_info info; + int i; OSMO_ASSERT(conn); OSMO_ASSERT(conn->fi); @@ -442,17 +438,13 @@ return; } - /* Try to allocate a new lchan with the preferred codec/rate choice */ - conn->assignment.new_lchan = - lchan_select_by_chan_mode(bts, req->ch_mode_rate_pref.chan_mode, req->ch_mode_rate_pref.full_rate); - conn->lchan->ch_mode_rate = req->ch_mode_rate_pref; - - /* In case the lchan allocation fails, we try with the alternat codec/ - * rate choice (if possible) */ - if (!conn->assignment.new_lchan && req->ch_mode_rate_alt_present) { - conn->assignment.new_lchan = - lchan_select_by_chan_mode(bts, req->ch_mode_rate_alt.chan_mode, req->ch_mode_rate_alt.full_rate); - conn->lchan->ch_mode_rate = req->ch_mode_rate_alt; + /* Try to allocate a new lchan in order of preference */ + for (i = 0; i < req->n_ch_mode_rate; i++) { + conn->assignment.new_lchan = lchan_select_by_chan_mode(bts, + req->ch_mode_rate[i].chan_mode, req->ch_mode_rate[i].chan_rate); + conn->lchan->ch_mode_rate = req->ch_mode_rate[i]; + if (conn->assignment.new_lchan) + break; } /* Check whether the lchan allocation was successful or not and tear @@ -461,21 +453,22 @@ assignment_count_result(BSC_CTR_ASSIGNMENT_NO_CHANNEL); assignment_fail(GSM0808_CAUSE_NO_RADIO_RESOURCE_AVAILABLE, "BSSMAP Assignment Command:" - " No lchan available for: preferred=%s%s / alternate=%s%s\n", - gsm48_chan_mode_name(req->ch_mode_rate_pref.chan_mode), - req->ch_mode_rate_pref.full_rate ? ",FR" : ",HR", - req->ch_mode_rate_alt_present ? - gsm48_chan_mode_name(req->ch_mode_rate_alt.chan_mode) : "none", - req->ch_mode_rate_alt_present ? - (req->ch_mode_rate_alt.full_rate ? ",FR" : ",HR") : ""); + " No lchan available for: pref=%s:%s / alt1=%s:%s / alt2=%s:%s\n", + gsm48_chan_mode_name(req->ch_mode_rate[0].chan_mode), + rate_names[req->ch_mode_rate[0].chan_rate], + req->n_ch_mode_rate >= 1 ? gsm48_chan_mode_name(req->ch_mode_rate[0].chan_mode) : "", + req->n_ch_mode_rate >= 1 ? rate_names[req->ch_mode_rate[0].chan_rate] : "", + req->n_ch_mode_rate >= 2 ? gsm48_chan_mode_name(req->ch_mode_rate[0].chan_mode) : "", + req->n_ch_mode_rate >= 2 ? rate_names[req->ch_mode_rate[0].chan_rate] : "" + ); return; } assignment_fsm_update_id(conn); - LOG_ASSIGNMENT(conn, LOGL_INFO, "Starting Assignment: chan_mode=%s, full_rate=%d," + LOG_ASSIGNMENT(conn, LOGL_INFO, "Starting Assignment: chan_mode=%s, chan_type=%s," " aoip=%s MSC-rtp=%s:%u\n", gsm48_chan_mode_name(conn->lchan->ch_mode_rate.chan_mode), - conn->lchan->ch_mode_rate.full_rate, + rate_names[conn->lchan->ch_mode_rate.chan_rate], req->aoip ? "yes" : "no", req->msc_rtp_addr, req->msc_rtp_port); assignment_fsm_state_chg(ASSIGNMENT_ST_WAIT_LCHAN_ACTIVE); diff --git a/src/osmo-bsc/codec_pref.c b/src/osmo-bsc/codec_pref.c index 3e06114..b27defc 100644 --- a/src/osmo-bsc/codec_pref.c +++ b/src/osmo-bsc/codec_pref.c @@ -324,6 +324,7 @@ { unsigned int i; uint8_t perm_spch; + bool full_rate; bool match = false; const struct gsm0808_speech_codec *sc_match = NULL; int rc; @@ -337,15 +338,16 @@ perm_spch = audio_support_to_gsm88(msc->audio_support[i]); /* Determine if the result is a half or full rate codec */ - rc = full_rate_from_perm_spch(&ch_mode_rate->full_rate, perm_spch); + rc = full_rate_from_perm_spch(&full_rate, perm_spch); if (rc < 0) return -EINVAL; + ch_mode_rate->chan_rate = full_rate ? CH_RATE_FULL : CH_RATE_HALF; /* If we have a preference for FR or HR in our request, we * discard the potential match */ - if (rate_pref == RATE_PREF_HR && ch_mode_rate->full_rate) + if (rate_pref == RATE_PREF_HR && ch_mode_rate->chan_rate == CH_RATE_FULL) continue; - if (rate_pref == RATE_PREF_FR && !ch_mode_rate->full_rate) + if (rate_pref == RATE_PREF_FR && ch_mode_rate->chan_rate == CH_RATE_HALF) continue; /* Check this permitted speech value against the BTS specific parameters. @@ -375,8 +377,8 @@ /* Exit without result, in case no match can be deteched */ if (!match) { - ch_mode_rate->full_rate = false; ch_mode_rate->chan_mode = GSM48_CMODE_SIGN; + ch_mode_rate->chan_rate = CH_RATE_SDCCH; ch_mode_rate->s15_s0 = 0; return -1; } diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c index 0d1449f..c044407 100644 --- a/src/osmo-bsc/handover_fsm.c +++ b/src/osmo-bsc/handover_fsm.c @@ -582,10 +582,11 @@ } LOG_HO(conn, LOGL_DEBUG, "BTS %u: Found matching audio type: %s %s (for %s)\n", - bts->nr, gsm48_chan_mode_name(ch_mode_rate.chan_mode), ch_mode_rate.full_rate? "full-rate" : "half-rate", + bts->nr, gsm48_chan_mode_name(ch_mode_rate.chan_mode), + ch_mode_rate.chan_rate == CH_RATE_FULL ? "full-rate" : "half-rate", gsm0808_channel_type_name(&req->ct)); - lchan = lchan_select_by_chan_mode(bts, ch_mode_rate.chan_mode, ch_mode_rate.full_rate); + lchan = lchan_select_by_chan_mode(bts, ch_mode_rate.chan_mode, ch_mode_rate.chan_rate); if (!lchan) { LOG_HO(conn, LOGL_DEBUG, "BTS %u has no matching free channels\n", bts->nr); continue; diff --git a/src/osmo-bsc/lchan_select.c b/src/osmo-bsc/lchan_select.c index 0f4dd65..0a9752e 100644 --- a/src/osmo-bsc/lchan_select.c +++ b/src/osmo-bsc/lchan_select.c @@ -128,22 +128,31 @@ } struct gsm_lchan *lchan_select_by_chan_mode(struct gsm_bts *bts, - enum gsm48_chan_mode chan_mode, bool full_rate) + enum gsm48_chan_mode chan_mode, enum channel_rate chan_rate) { enum gsm_chan_t type; switch (chan_mode) { case GSM48_CMODE_SIGN: - type = GSM_LCHAN_SDCCH; + switch (chan_rate) { + case CH_RATE_SDCCH: type = GSM_LCHAN_SDCCH; break; + case CH_RATE_HALF: type = GSM_LCHAN_TCH_H; break; + case CH_RATE_FULL: type = GSM_LCHAN_TCH_F; break; + default: return NULL; + } break; case GSM48_CMODE_SPEECH_EFR: /* EFR works over FR channels only */ - if (!full_rate) + if (chan_rate != CH_RATE_FULL) return NULL; /* fall through */ case GSM48_CMODE_SPEECH_V1: case GSM48_CMODE_SPEECH_AMR: - type = full_rate ? GSM_LCHAN_TCH_F : GSM_LCHAN_TCH_H; + switch (chan_rate) { + case CH_RATE_HALF: type = GSM_LCHAN_TCH_H; break; + case CH_RATE_FULL: type = GSM_LCHAN_TCH_F; break; + default: return NULL; + } break; default: return NULL; diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 2d5d4ae..470ae42 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -627,60 +627,48 @@ static int select_codecs(struct assignment_request *req, struct gsm0808_channel_type *ct, struct gsm_subscriber_connection *conn) { - int rc; + int rc, i, nc = 0; struct bsc_msc_data *msc; msc = conn->sccp.msc; - req->ch_mode_rate_alt_present = false; switch (ct->ch_rate_type) { case GSM0808_SPEECH_FULL_BM: - rc = match_codec_pref(&req->ch_mode_rate_pref, ct, &conn->codec_list, msc, conn_get_bts(conn), + rc = match_codec_pref(&req->ch_mode_rate[nc], ct, &conn->codec_list, msc, conn_get_bts(conn), RATE_PREF_FR); + nc += (rc == 0); break; case GSM0808_SPEECH_HALF_LM: - rc = match_codec_pref(&req->ch_mode_rate_pref, ct, &conn->codec_list, msc, conn_get_bts(conn), + rc = match_codec_pref(&req->ch_mode_rate[nc], ct, &conn->codec_list, msc, conn_get_bts(conn), RATE_PREF_HR); + nc += (rc == 0); break; case GSM0808_SPEECH_PERM: case GSM0808_SPEECH_PERM_NO_CHANGE: case GSM0808_SPEECH_FULL_PREF_NO_CHANGE: case GSM0808_SPEECH_FULL_PREF: - rc = match_codec_pref(&req->ch_mode_rate_pref, ct, &conn->codec_list, msc, conn_get_bts(conn), + rc = match_codec_pref(&req->ch_mode_rate[nc], ct, &conn->codec_list, msc, conn_get_bts(conn), RATE_PREF_FR); - if (rc < 0) { - rc = match_codec_pref(&req->ch_mode_rate_pref, ct, &conn->codec_list, msc, conn_get_bts(conn), - RATE_PREF_HR); - break; - } - rc = match_codec_pref(&req->ch_mode_rate_alt, ct, &conn->codec_list, msc, conn_get_bts(conn), + nc += (rc == 0); + rc = match_codec_pref(&req->ch_mode_rate[nc], ct, &conn->codec_list, msc, conn_get_bts(conn), RATE_PREF_HR); - if (rc == 0) - req->ch_mode_rate_alt_present = true; - rc = 0; + nc += (rc == 0); break; case GSM0808_SPEECH_HALF_PREF_NO_CHANGE: case GSM0808_SPEECH_HALF_PREF: - rc = match_codec_pref(&req->ch_mode_rate_pref, ct, &conn->codec_list, msc, conn_get_bts(conn), + rc = match_codec_pref(&req->ch_mode_rate[nc], ct, &conn->codec_list, msc, conn_get_bts(conn), RATE_PREF_HR); - - if (rc < 0) { - rc = match_codec_pref(&req->ch_mode_rate_pref, ct, &conn->codec_list, msc, conn_get_bts(conn), - RATE_PREF_FR); - break; - } - rc = match_codec_pref(&req->ch_mode_rate_alt, ct, &conn->codec_list, msc, conn_get_bts(conn), + nc += (rc == 0); + rc = match_codec_pref(&req->ch_mode_rate[nc], ct, &conn->codec_list, msc, conn_get_bts(conn), RATE_PREF_FR); - if (rc == 0) - req->ch_mode_rate_alt_present = true; - rc = 0; + nc += (rc == 0); break; default: rc = -EINVAL; break; } - if (rc < 0) { + if (!nc) { LOGP(DMSC, LOGL_ERROR, "No supported audio type found for channel_type =" " { ch_indctr=0x%x, ch_rate_type=0x%x, perm_spch=[%s] }\n", ct->ch_indctr, ct->ch_rate_type, osmo_hexdump(ct->perm_spch, ct->perm_spch_len)); @@ -689,29 +677,69 @@ return -EINVAL; } - if (req->ch_mode_rate_alt_present) { - DEBUGP(DMSC, "Found matching audio type (preferred): %s %s for channel_type =" + for (i = 0; i < nc; i++ ) { + DEBUGP(DMSC, "Found matching audio type (pref=%d): %s %s for channel_type =" " { ch_indctr=0x%x, ch_rate_type=0x%x, perm_spch=[ %s] }\n", - req->ch_mode_rate_pref.full_rate ? "full rate" : "half rate", - get_value_string(gsm48_chan_mode_names, req->ch_mode_rate_pref.chan_mode), + i, + req->ch_mode_rate[i].chan_rate == CH_RATE_FULL ? "full rate" : "half rate", + get_value_string(gsm48_chan_mode_names, req->ch_mode_rate[i].chan_mode), ct->ch_indctr, ct->ch_rate_type, osmo_hexdump(ct->perm_spch, ct->perm_spch_len)); - DEBUGP(DMSC, "Found matching audio type (alternative): %s %s for channel_type =" - " { ch_indctr=0x%x, ch_rate_type=0x%x, perm_spch=[ %s] }\n", - req->ch_mode_rate_alt.full_rate ? "full rate" : "half rate", - get_value_string(gsm48_chan_mode_names, req->ch_mode_rate_alt.chan_mode), - ct->ch_indctr, ct->ch_rate_type, osmo_hexdump(ct->perm_spch, ct->perm_spch_len)); - } else { - DEBUGP(DMSC, "Found matching audio type: %s %s for channel_type =" - " { ch_indctr=0x%x, ch_rate_type=0x%x, perm_spch=[ %s] }\n", - req->ch_mode_rate_pref.full_rate ? "full rate" : "half rate", - get_value_string(gsm48_chan_mode_names, req->ch_mode_rate_pref.chan_mode), - ct->ch_indctr, ct->ch_rate_type, osmo_hexdump(ct->perm_spch, ct->perm_spch_len)); - } + req->n_ch_mode_rate = nc; + return 0; } +static int select_sign_chan(struct assignment_request *req, struct gsm0808_channel_type *ct) +{ + int i, nc = 0; + + switch (ct->ch_rate_type) { + case GSM0808_SIGN_ANY: + req->ch_mode_rate[nc++].chan_rate = CH_RATE_SDCCH; + req->ch_mode_rate[nc++].chan_rate = CH_RATE_HALF; + req->ch_mode_rate[nc++].chan_rate = CH_RATE_FULL; + break; + case GSM0808_SIGN_SDCCH: + req->ch_mode_rate[nc++].chan_rate = CH_RATE_SDCCH; + break; + case GSM0808_SIGN_SDCCH_FULL_BM: + req->ch_mode_rate[nc++].chan_rate = CH_RATE_SDCCH; + req->ch_mode_rate[nc++].chan_rate = CH_RATE_FULL; + break; + case GSM0808_SIGN_SDCCH_HALF_LM: + req->ch_mode_rate[nc++].chan_rate = CH_RATE_SDCCH; + req->ch_mode_rate[nc++].chan_rate = CH_RATE_HALF; + break; + case GSM0808_SIGN_FULL_BM: + req->ch_mode_rate[nc++].chan_rate = CH_RATE_FULL; + break; + case GSM0808_SIGN_HALF_LM: + req->ch_mode_rate[nc++].chan_rate = CH_RATE_HALF; + break; + case GSM0808_SIGN_FULL_PREF: + case GSM0808_SIGN_FULL_PREF_NO_CHANGE: + req->ch_mode_rate[nc++].chan_rate = CH_RATE_FULL; + req->ch_mode_rate[nc++].chan_rate = CH_RATE_HALF; + break; + case GSM0808_SIGN_HALF_PREF: + case GSM0808_SIGN_HALF_PREF_NO_CHANGE: + req->ch_mode_rate[nc++].chan_rate = CH_RATE_HALF; + req->ch_mode_rate[nc++].chan_rate = CH_RATE_FULL; + break; + default: + break; + } + + for (i = 0; i < nc; i++) + req->ch_mode_rate[i].chan_mode = GSM48_CMODE_SIGN; + + req->n_ch_mode_rate = nc; + + return nc > 0 ? 0 : -EINVAL; +} + /* * Handle the assignment request message. * @@ -729,7 +757,6 @@ uint8_t cause; int rc; struct assignment_request req = {}; - struct channel_mode_and_rate ch_mode_rate_pref = {}; if (!conn) { LOGP(DMSC, LOGL_ERROR, @@ -850,14 +877,15 @@ } break; case GSM0808_CHAN_SIGN: - ch_mode_rate_pref = (struct channel_mode_and_rate) { - .chan_mode = GSM48_CMODE_SIGN, - }; - req = (struct assignment_request){ .aoip = aoip, - .ch_mode_rate_pref = ch_mode_rate_pref, }; + + rc = select_sign_chan(&req, &ct); + if (rc < 0) { + cause = GSM0808_CAUSE_INCORRECT_VALUE; + goto reject; + } break; default: cause = GSM0808_CAUSE_INVALID_MESSAGE_CONTENTS; diff --git a/tests/codec_pref/codec_pref_test.c b/tests/codec_pref/codec_pref_test.c index bb5468a..ce82f3d 100644 --- a/tests/codec_pref/codec_pref_test.c +++ b/tests/codec_pref/codec_pref_test.c @@ -407,7 +407,7 @@ rc = match_codec_pref(&ch_mode_rate, ct, scl, msc, bts, RATE_PREF_NONE); printf(" * result: rc=%i, full_rate=%i, s15_s0=%04x, chan_mode=%s\n", - rc, ch_mode_rate.full_rate, ch_mode_rate.s15_s0, gsm48_chan_mode_name(ch_mode_rate.chan_mode)); + rc, ch_mode_rate.chan_rate == CH_RATE_FULL, ch_mode_rate.s15_s0, gsm48_chan_mode_name(ch_mode_rate.chan_mode)); printf("\n"); -- To view, visit https://gerrit.osmocom.org/13818 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I7513d2cbe8b695ba6f031ad11560c63a6535cf2d Gerrit-Change-Number: 13818 Gerrit-PatchSet: 2 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: tnt -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 18:21:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 3 May 2019 18:21:18 +0000 Subject: Change in openbsc[master]: tests: Fix selection of python version In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13868 ) Change subject: tests: Fix selection of python version ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13868 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icc147c8457116ad551d166313f3a79e1c2107a22 Gerrit-Change-Number: 13868 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 03 May 2019 18:21:18 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 18:22:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 3 May 2019 18:22:19 +0000 Subject: Change in openbsc[master]: nat: Allocate bsc_nat_parsed on the stack instead of heap In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13843 ) Change subject: nat: Allocate bsc_nat_parsed on the stack instead of heap ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13843 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I66c44890952339f15131081e2f629a2824b6d3ba Gerrit-Change-Number: 13843 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 03 May 2019 18:22:19 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 18:25:11 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 3 May 2019 18:25:11 +0000 Subject: Change in openbsc[master]: tests: Fix selection of python version In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/13868 ) Change subject: tests: Fix selection of python version ...................................................................... tests: Fix selection of python version According to documentation (and personal experience), AM_PATH_PYTHON selects the highest version of python, no matter if major version is different, which means if both python2 and 3 are available, 3 will be chosen an PYTHON will point to "/.../python" which is python3. Apparently, the macro cannot be easily used to pick highest python2 version. chosen an PYTHON will point to "/.../python" which is python3. Apparently, the macro cannot be easily used to pick highest python2 version. As {vty,ctrl}_test_runner.py require python2 and are incompatible with python3, let's instead rely on the system having a "python2" binary available, which is the case in most distros. cherry-picked from: osmo-bsc.git 7e78681f0f740bd68ed5255b506a1efa08a231b1. Change-Id: Icc147c8457116ad551d166313f3a79e1c2107a22 --- M openbsc/configure.ac M openbsc/tests/Makefile.am M openbsc/tests/ctrl_test_runner.py M openbsc/tests/smpp_test_runner.py M openbsc/tests/vty_test_runner.py 5 files changed, 12 insertions(+), 9 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/openbsc/configure.ac b/openbsc/configure.ac index 704c7d7..5602313 100644 --- a/openbsc/configure.ac +++ b/openbsc/configure.ac @@ -198,7 +198,10 @@ [Include the VTY/CTRL tests in make check [default=no]]), [enable_ext_tests="$enableval"],[enable_ext_tests="no"]) if test "x$enable_ext_tests" = "xyes" ; then - AM_PATH_PYTHON + AC_CHECK_PROG(PYTHON2_AVAIL,python2,yes) + if test "x$PYTHON2_AVAIL" != "xyes" ; then + AC_MSG_ERROR([Please install python2 to run the VTY/CTRL tests.]) + fi AC_CHECK_PROG(OSMOTESTEXT_CHECK,osmotestvty.py,yes) if test "x$OSMOTESTEXT_CHECK" != "xyes" ; then AC_MSG_ERROR([Please install git://osmocom.org/python/osmo-python-tests to run the VTY/CTRL tests.]) diff --git a/openbsc/tests/Makefile.am b/openbsc/tests/Makefile.am index 7208a2f..a62451e 100644 --- a/openbsc/tests/Makefile.am +++ b/openbsc/tests/Makefile.am @@ -64,10 +64,10 @@ python-tests: $(BUILT_SOURCES) osmotestvty.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v osmotestconfig.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v - $(PYTHON) $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v - $(PYTHON) $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v + $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v + $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v if BUILD_SMPP - $(PYTHON) $(srcdir)/smpp_test_runner.py -w $(abs_top_builddir) -v + $(srcdir)/smpp_test_runner.py -w $(abs_top_builddir) -v endif rm -f $(top_builddir)/hlr.sqlite3 else diff --git a/openbsc/tests/ctrl_test_runner.py b/openbsc/tests/ctrl_test_runner.py old mode 100644 new mode 100755 index d76ed65..ad0a16b --- a/openbsc/tests/ctrl_test_runner.py +++ b/openbsc/tests/ctrl_test_runner.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # (C) 2013 by Jacob Erlbeck # (C) 2014 by Holger Hans Peter Freyther @@ -262,12 +262,12 @@ self.assertEquals(r['mtype'], 'SET_REPLY') self.assertEquals(r['var'], 'bts.0.trx.0.max-power-reduction') self.assertEquals(r['value'], '22') - + r = self.do_get('bts.0.trx.0.max-power-reduction') self.assertEquals(r['mtype'], 'GET_REPLY') self.assertEquals(r['var'], 'bts.0.trx.0.max-power-reduction') self.assertEquals(r['value'], '22') - + r = self.do_set('bts.0.trx.0.max-power-reduction', '1') self.assertEquals(r['mtype'], 'ERROR') self.assertEquals(r['error'], 'Value must be even') diff --git a/openbsc/tests/smpp_test_runner.py b/openbsc/tests/smpp_test_runner.py old mode 100644 new mode 100755 index 58645aa..eccfa6b --- a/openbsc/tests/smpp_test_runner.py +++ b/openbsc/tests/smpp_test_runner.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # (C) 2014 by Holger Hans Peter Freyther # based on vty_test_runner.py: diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py old mode 100644 new mode 100755 index 44ccdd8..67adb71 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # (C) 2013 by Katerina Barone-Adesi # (C) 2013 by Holger Hans Peter Freyther -- To view, visit https://gerrit.osmocom.org/13868 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Icc147c8457116ad551d166313f3a79e1c2107a22 Gerrit-Change-Number: 13868 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 18:26:12 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 3 May 2019 18:26:12 +0000 Subject: Change in osmo-trx[master]: cosmetic: uhd: Move smpl_buf out of UHDDevice, move UHDDevice class d... In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/13809 ) Change subject: cosmetic: uhd: Move smpl_buf out of UHDDevice, move UHDDevice class definition to .h ...................................................................... cosmetic: uhd: Move smpl_buf out of UHDDevice, move UHDDevice class definition to .h * move class definition to .h file, like we do for other devices. * move smpl_buf class to a different file inside uhd/. * Preparation work to have smpl_buf being used in a generic way for devices other than UHD (LMS). Change-Id: Ib4594320da9bb7f6e9f52e7d70d11ecd11106aae --- M Transceiver52M/device/uhd/Makefile.am M Transceiver52M/device/uhd/UHDDevice.cpp A Transceiver52M/device/uhd/UHDDevice.h A Transceiver52M/device/uhd/smpl_buf.cpp A Transceiver52M/device/uhd/smpl_buf.h 5 files changed, 455 insertions(+), 362 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/Transceiver52M/device/uhd/Makefile.am b/Transceiver52M/device/uhd/Makefile.am index bb34d2f..4fcc0d7 100644 --- a/Transceiver52M/device/uhd/Makefile.am +++ b/Transceiver52M/device/uhd/Makefile.am @@ -3,6 +3,8 @@ AM_CPPFLAGS = -Wall $(STD_DEFINES_AND_INCLUDES) -I${srcdir}/.. AM_CXXFLAGS = -lpthread $(LIBOSMOCORE_CFLAGS) $(LIBOSMOCTRL_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(UHD_CFLAGS) +noinst_HEADERS = UHDDevice.h smpl_buf.h + noinst_LTLIBRARIES = libdevice.la -libdevice_la_SOURCES = UHDDevice.cpp +libdevice_la_SOURCES = UHDDevice.cpp smpl_buf.cpp diff --git a/Transceiver52M/device/uhd/UHDDevice.cpp b/Transceiver52M/device/uhd/UHDDevice.cpp index 46284e5..67b7416 100644 --- a/Transceiver52M/device/uhd/UHDDevice.cpp +++ b/Transceiver52M/device/uhd/UHDDevice.cpp @@ -23,11 +23,9 @@ #include #include "radioDevice.h" +#include "UHDDevice.h" #include "Threads.h" #include "Logger.h" -#include -#include -#include #ifdef HAVE_CONFIG_H #include "config.h" @@ -58,20 +56,6 @@ */ #define UMTRX_VGA1_DEF -18 -enum uhd_dev_type { - USRP1, - USRP2, - B100, - B200, - B210, - B2XX_MCBTS, - E1XX, - E3XX, - X3XX, - UMTRX, - LIMESDR, -}; - /* * USRP version dependent device timings */ @@ -136,190 +120,6 @@ { std::make_tuple(B2XX_MCBTS, 4, 4), { 1, 51.2e6, MCBTS_SPACING*4, B2XX_TIMING_MCBTS, "B200/B210 4 SPS Multi-ARFCN" } }, }; -/* - Sample Buffer - Allows reading and writing of timed samples using osmo-trx - or UHD style timestamps. Time conversions are handled - internally or accessable through the static convert calls. -*/ -class smpl_buf { -public: - /** Sample buffer constructor - @param len number of 32-bit samples the buffer should hold - @param rate sample clockrate - @param timestamp - */ - smpl_buf(size_t len, double rate); - ~smpl_buf(); - - /** Query number of samples available for reading - @param timestamp time of first sample - @return number of available samples or error - */ - ssize_t avail_smpls(TIMESTAMP timestamp) const; - ssize_t avail_smpls(uhd::time_spec_t timestamp) const; - - /** Read and write - @param buf pointer to buffer - @param len number of samples desired to read or write - @param timestamp time of first stample - @return number of actual samples read or written or error - */ - ssize_t read(void *buf, size_t len, TIMESTAMP timestamp); - ssize_t read(void *buf, size_t len, uhd::time_spec_t timestamp); - ssize_t write(void *buf, size_t len, TIMESTAMP timestamp); - ssize_t write(void *buf, size_t len, uhd::time_spec_t timestamp); - - /** Buffer status string - @return a formatted string describing internal buffer state - */ - std::string str_status(size_t ts) const; - - /** Formatted error string - @param code an error code - @return a formatted error string - */ - static std::string str_code(ssize_t code); - - enum err_code { - ERROR_TIMESTAMP = -1, - ERROR_READ = -2, - ERROR_WRITE = -3, - ERROR_OVERFLOW = -4 - }; - -private: - uint32_t *data; - size_t buf_len; - - double clk_rt; - - TIMESTAMP time_start; - TIMESTAMP time_end; - - size_t data_start; - size_t data_end; -}; - -/* - uhd_device - UHD implementation of the Device interface. Timestamped samples - are sent to and received from the device. An intermediate buffer - on the receive side collects and aligns packets of samples. - Events and errors such as underruns are reported asynchronously - by the device and received in a separate thread. -*/ -class uhd_device : public RadioDevice { -public: - uhd_device(size_t tx_sps, size_t rx_sps, InterfaceType type, - size_t chans, double offset, - const std::vector& tx_paths, - const std::vector& rx_paths); - ~uhd_device(); - - int open(const std::string &args, int ref, bool swap_channels); - bool start(); - bool stop(); - bool restart(); - void setPriority(float prio); - enum TxWindowType getWindowType() { return tx_window; } - - int readSamples(std::vector &bufs, int len, bool *overrun, - TIMESTAMP timestamp, bool *underrun, unsigned *RSSI); - - int writeSamples(std::vector &bufs, int len, bool *underrun, - TIMESTAMP timestamp, bool isControl); - - bool updateAlignment(TIMESTAMP timestamp); - - bool setTxFreq(double wFreq, size_t chan); - bool setRxFreq(double wFreq, size_t chan); - - TIMESTAMP initialWriteTimestamp(); - TIMESTAMP initialReadTimestamp(); - - double fullScaleInputValue(); - double fullScaleOutputValue(); - - double setRxGain(double db, size_t chan); - double getRxGain(size_t chan); - double maxRxGain(void) { return rx_gain_max; } - double minRxGain(void) { return rx_gain_min; } - - double setTxGain(double db, size_t chan); - double maxTxGain(void) { return tx_gain_max; } - double minTxGain(void) { return tx_gain_min; } - - double getTxFreq(size_t chan); - double getRxFreq(size_t chan); - double getRxFreq(); - - bool setRxAntenna(const std::string &ant, size_t chan); - std::string getRxAntenna(size_t chan); - bool setTxAntenna(const std::string &ant, size_t chan); - std::string getTxAntenna(size_t chan); - - bool requiresRadioAlign(); - - GSM::Time minLatency(); - - inline double getSampleRate() { return tx_rate; } - inline double numberRead() { return rx_pkt_cnt; } - inline double numberWritten() { return 0; } - - /** Receive and process asynchronous message - @return true if message received or false on timeout or error - */ - bool recv_async_msg(); - - enum err_code { - ERROR_TIMING = -1, - ERROR_TIMEOUT = -2, - ERROR_UNRECOVERABLE = -3, - ERROR_UNHANDLED = -4, - }; - -private: - uhd::usrp::multi_usrp::sptr usrp_dev; - uhd::tx_streamer::sptr tx_stream; - uhd::rx_streamer::sptr rx_stream; - enum TxWindowType tx_window; - enum uhd_dev_type dev_type; - - double tx_rate, rx_rate; - - double tx_gain_min, tx_gain_max; - double rx_gain_min, rx_gain_max; - - std::vector tx_gains, rx_gains; - std::vector tx_freqs, rx_freqs; - size_t tx_spp, rx_spp; - - bool started; - bool aligned; - - size_t rx_pkt_cnt; - size_t drop_cnt; - uhd::time_spec_t prev_ts; - - TIMESTAMP ts_initial, ts_offset; - std::vector rx_buffers; - - void init_gains(); - void set_channels(bool swap); - void set_rates(); - bool parse_dev_type(); - bool flush_recv(size_t num_pkts); - int check_rx_md_err(uhd::rx_metadata_t &md, ssize_t num_smpls); - - std::string str_code(uhd::rx_metadata_t metadata); - std::string str_code(uhd::async_metadata_t metadata); - - uhd::tune_request_t select_freq(double wFreq, size_t chan, bool tx); - bool set_freq(double freq, size_t chan, bool tx); - - Thread *async_event_thrd; - Mutex tune_lock; -}; - void *async_event_loop(uhd_device *dev) { set_selfthread_name("UHDAsyncEvent"); @@ -1386,166 +1186,6 @@ return ost.str(); } -smpl_buf::smpl_buf(size_t len, double rate) - : buf_len(len), clk_rt(rate), - time_start(0), time_end(0), data_start(0), data_end(0) -{ - data = new uint32_t[len]; -} - -smpl_buf::~smpl_buf() -{ - delete[] data; -} - -ssize_t smpl_buf::avail_smpls(TIMESTAMP timestamp) const -{ - if (timestamp < time_start) - return ERROR_TIMESTAMP; - else if (timestamp >= time_end) - return 0; - else - return time_end - timestamp; -} - -ssize_t smpl_buf::avail_smpls(uhd::time_spec_t timespec) const -{ - return avail_smpls(timespec.to_ticks(clk_rt)); -} - -ssize_t smpl_buf::read(void *buf, size_t len, TIMESTAMP timestamp) -{ - int type_sz = 2 * sizeof(short); - - // Check for valid read - if (timestamp < time_start) - return ERROR_TIMESTAMP; - if (timestamp >= time_end) - return 0; - if (len >= buf_len) - return ERROR_READ; - - // How many samples should be copied - size_t num_smpls = time_end - timestamp; - if (num_smpls > len) - num_smpls = len; - - // Starting index - size_t read_start = (data_start + (timestamp - time_start)) % buf_len; - - // Read it - if (read_start + num_smpls < buf_len) { - size_t numBytes = len * type_sz; - memcpy(buf, data + read_start, numBytes); - } else { - size_t first_cp = (buf_len - read_start) * type_sz; - size_t second_cp = len * type_sz - first_cp; - - memcpy(buf, data + read_start, first_cp); - memcpy((char*) buf + first_cp, data, second_cp); - } - - data_start = (read_start + len) % buf_len; - time_start = timestamp + len; - - if (time_start > time_end) - return ERROR_READ; - else - return num_smpls; -} - -ssize_t smpl_buf::read(void *buf, size_t len, uhd::time_spec_t ts) -{ - return read(buf, len, ts.to_ticks(clk_rt)); -} - -ssize_t smpl_buf::write(void *buf, size_t len, TIMESTAMP timestamp) -{ - int type_sz = 2 * sizeof(short); - - // Check for valid write - if ((len == 0) || (len >= buf_len)) - return ERROR_WRITE; - if ((timestamp + len) <= time_end) - return ERROR_TIMESTAMP; - - if (timestamp < time_end) { - LOGC(DDEV, ERR) << "Overwriting old buffer data: timestamp="<& tx_paths, diff --git a/Transceiver52M/device/uhd/UHDDevice.h b/Transceiver52M/device/uhd/UHDDevice.h new file mode 100644 index 0000000..f5d0b33 --- /dev/null +++ b/Transceiver52M/device/uhd/UHDDevice.h @@ -0,0 +1,171 @@ +/* + * Device support for Ettus Research UHD driver + * + * Copyright 2010,2011 Free Software Foundation, Inc. + * Copyright (C) 2015 Ettus Research LLC + * Copyright 2019 sysmocom - s.f.m.c. GmbH + * + * Author: Tom Tsou + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * See the COPYING file in the main directory for details. + */ + +#pragma once + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "radioDevice.h" +#include "smpl_buf.h" + +#include +#include +#include + + +enum uhd_dev_type { + USRP1, + USRP2, + B100, + B200, + B210, + B2XX_MCBTS, + E1XX, + E3XX, + X3XX, + UMTRX, + LIMESDR, +}; + +/* + uhd_device - UHD implementation of the Device interface. Timestamped samples + are sent to and received from the device. An intermediate buffer + on the receive side collects and aligns packets of samples. + Events and errors such as underruns are reported asynchronously + by the device and received in a separate thread. +*/ +class uhd_device : public RadioDevice { +public: + uhd_device(size_t tx_sps, size_t rx_sps, InterfaceType type, + size_t chans, double offset, + const std::vector& tx_paths, + const std::vector& rx_paths); + ~uhd_device(); + + int open(const std::string &args, int ref, bool swap_channels); + bool start(); + bool stop(); + bool restart(); + void setPriority(float prio); + enum TxWindowType getWindowType() { return tx_window; } + + int readSamples(std::vector &bufs, int len, bool *overrun, + TIMESTAMP timestamp, bool *underrun, unsigned *RSSI); + + int writeSamples(std::vector &bufs, int len, bool *underrun, + TIMESTAMP timestamp, bool isControl); + + bool updateAlignment(TIMESTAMP timestamp); + + bool setTxFreq(double wFreq, size_t chan); + bool setRxFreq(double wFreq, size_t chan); + + TIMESTAMP initialWriteTimestamp(); + TIMESTAMP initialReadTimestamp(); + + double fullScaleInputValue(); + double fullScaleOutputValue(); + + double setRxGain(double db, size_t chan); + double getRxGain(size_t chan); + double maxRxGain(void) { return rx_gain_max; } + double minRxGain(void) { return rx_gain_min; } + + double setTxGain(double db, size_t chan); + double maxTxGain(void) { return tx_gain_max; } + double minTxGain(void) { return tx_gain_min; } + + double getTxFreq(size_t chan); + double getRxFreq(size_t chan); + double getRxFreq(); + + bool setRxAntenna(const std::string &ant, size_t chan); + std::string getRxAntenna(size_t chan); + bool setTxAntenna(const std::string &ant, size_t chan); + std::string getTxAntenna(size_t chan); + + bool requiresRadioAlign(); + + GSM::Time minLatency(); + + inline double getSampleRate() { return tx_rate; } + inline double numberRead() { return rx_pkt_cnt; } + inline double numberWritten() { return 0; } + + /** Receive and process asynchronous message + @return true if message received or false on timeout or error + */ + bool recv_async_msg(); + + enum err_code { + ERROR_TIMING = -1, + ERROR_TIMEOUT = -2, + ERROR_UNRECOVERABLE = -3, + ERROR_UNHANDLED = -4, + }; + +private: + uhd::usrp::multi_usrp::sptr usrp_dev; + uhd::tx_streamer::sptr tx_stream; + uhd::rx_streamer::sptr rx_stream; + enum TxWindowType tx_window; + enum uhd_dev_type dev_type; + + double tx_rate, rx_rate; + + double tx_gain_min, tx_gain_max; + double rx_gain_min, rx_gain_max; + + std::vector tx_gains, rx_gains; + std::vector tx_freqs, rx_freqs; + size_t tx_spp, rx_spp; + + bool started; + bool aligned; + + size_t rx_pkt_cnt; + size_t drop_cnt; + uhd::time_spec_t prev_ts; + + TIMESTAMP ts_initial, ts_offset; + std::vector rx_buffers; + + void init_gains(); + void set_channels(bool swap); + void set_rates(); + bool parse_dev_type(); + bool flush_recv(size_t num_pkts); + int check_rx_md_err(uhd::rx_metadata_t &md, ssize_t num_smpls); + + std::string str_code(uhd::rx_metadata_t metadata); + std::string str_code(uhd::async_metadata_t metadata); + + uhd::tune_request_t select_freq(double wFreq, size_t chan, bool tx); + bool set_freq(double freq, size_t chan, bool tx); + + Thread *async_event_thrd; + Mutex tune_lock; +}; diff --git a/Transceiver52M/device/uhd/smpl_buf.cpp b/Transceiver52M/device/uhd/smpl_buf.cpp new file mode 100644 index 0000000..d8bdbc4 --- /dev/null +++ b/Transceiver52M/device/uhd/smpl_buf.cpp @@ -0,0 +1,186 @@ +/* + * Sample Buffer - Allows reading and writing of timed samples + * + * Copyright 2010,2011 Free Software Foundation, Inc. + * Copyright (C) 2015 Ettus Research LLC + * Copyright 2019 sysmocom - s.f.m.c. GmbH + * + * Author: Tom Tsou + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * See the COPYING file in the main directory for details. + */ + +#include "smpl_buf.h" +#include + +smpl_buf::smpl_buf(size_t len, double rate) + : buf_len(len), clk_rt(rate), + time_start(0), time_end(0), data_start(0), data_end(0) +{ + data = new uint32_t[len]; +} + +smpl_buf::~smpl_buf() +{ + delete[] data; +} + +ssize_t smpl_buf::avail_smpls(TIMESTAMP timestamp) const +{ + if (timestamp < time_start) + return ERROR_TIMESTAMP; + else if (timestamp >= time_end) + return 0; + else + return time_end - timestamp; +} + +ssize_t smpl_buf::avail_smpls(uhd::time_spec_t timespec) const +{ + return avail_smpls(timespec.to_ticks(clk_rt)); +} + +ssize_t smpl_buf::read(void *buf, size_t len, TIMESTAMP timestamp) +{ + int type_sz = 2 * sizeof(short); + + // Check for valid read + if (timestamp < time_start) + return ERROR_TIMESTAMP; + if (timestamp >= time_end) + return 0; + if (len >= buf_len) + return ERROR_READ; + + // How many samples should be copied + size_t num_smpls = time_end - timestamp; + if (num_smpls > len) + num_smpls = len; + + // Starting index + size_t read_start = (data_start + (timestamp - time_start)) % buf_len; + + // Read it + if (read_start + num_smpls < buf_len) { + size_t numBytes = len * type_sz; + memcpy(buf, data + read_start, numBytes); + } else { + size_t first_cp = (buf_len - read_start) * type_sz; + size_t second_cp = len * type_sz - first_cp; + + memcpy(buf, data + read_start, first_cp); + memcpy((char*) buf + first_cp, data, second_cp); + } + + data_start = (read_start + len) % buf_len; + time_start = timestamp + len; + + if (time_start > time_end) + return ERROR_READ; + else + return num_smpls; +} + +ssize_t smpl_buf::read(void *buf, size_t len, uhd::time_spec_t ts) +{ + return read(buf, len, ts.to_ticks(clk_rt)); +} + +ssize_t smpl_buf::write(void *buf, size_t len, TIMESTAMP timestamp) +{ + int type_sz = 2 * sizeof(short); + + // Check for valid write + if ((len == 0) || (len >= buf_len)) + return ERROR_WRITE; + if ((timestamp + len) <= time_end) + return ERROR_TIMESTAMP; + + if (timestamp < time_end) { + LOGC(DDEV, ERR) << "Overwriting old buffer data: timestamp="< + * + * Author: Tom Tsou + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * See the COPYING file in the main directory for details. + */ + +#pragma once + +#include +#include + +#include "radioDevice.h" + +/* + Sample Buffer - Allows reading and writing of timed samples using osmo-trx + or UHD style timestamps. Time conversions are handled + internally or accessable through the static convert calls. +*/ +class smpl_buf { +public: + /** Sample buffer constructor + @param len number of 32-bit samples the buffer should hold + @param rate sample clockrate + @param timestamp + */ + smpl_buf(size_t len, double rate); + ~smpl_buf(); + + /** Query number of samples available for reading + @param timestamp time of first sample + @return number of available samples or error + */ + ssize_t avail_smpls(TIMESTAMP timestamp) const; + ssize_t avail_smpls(uhd::time_spec_t timestamp) const; + + /** Read and write + @param buf pointer to buffer + @param len number of samples desired to read or write + @param timestamp time of first stample + @return number of actual samples read or written or error + */ + ssize_t read(void *buf, size_t len, TIMESTAMP timestamp); + ssize_t read(void *buf, size_t len, uhd::time_spec_t timestamp); + ssize_t write(void *buf, size_t len, TIMESTAMP timestamp); + ssize_t write(void *buf, size_t len, uhd::time_spec_t timestamp); + + /** Buffer status string + @return a formatted string describing internal buffer state + */ + std::string str_status(size_t ts) const; + + /** Formatted error string + @param code an error code + @return a formatted error string + */ + static std::string str_code(ssize_t code); + + enum err_code { + ERROR_TIMESTAMP = -1, + ERROR_READ = -2, + ERROR_WRITE = -3, + ERROR_OVERFLOW = -4 + }; + +private: + uint32_t *data; + size_t buf_len; + + double clk_rt; + + TIMESTAMP time_start; + TIMESTAMP time_end; + + size_t data_start; + size_t data_end; +}; -- To view, visit https://gerrit.osmocom.org/13809 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ib4594320da9bb7f6e9f52e7d70d11ecd11106aae Gerrit-Change-Number: 13809 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: tnt Gerrit-CC: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 18:26:13 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 3 May 2019 18:26:13 +0000 Subject: Change in osmo-trx[master]: uhd: smpl_buf: Drop UHD specifics out back to UHDDevice In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/13810 ) Change subject: uhd: smpl_buf: Drop UHD specifics out back to UHDDevice ...................................................................... uhd: smpl_buf: Drop UHD specifics out back to UHDDevice This way smpl_buf can be re-used later by other non-UHD drivers. Change-Id: I94061328d46a550d4147121d85baffa29c700c45 --- M Transceiver52M/device/uhd/UHDDevice.cpp M Transceiver52M/device/uhd/smpl_buf.cpp M Transceiver52M/device/uhd/smpl_buf.h 3 files changed, 4 insertions(+), 25 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved tnt: Looks good to me, but someone else must approve Vadim Yanitskiy: Looks good to me, but someone else must approve diff --git a/Transceiver52M/device/uhd/UHDDevice.cpp b/Transceiver52M/device/uhd/UHDDevice.cpp index 67b7416..40ef2a0 100644 --- a/Transceiver52M/device/uhd/UHDDevice.cpp +++ b/Transceiver52M/device/uhd/UHDDevice.cpp @@ -759,7 +759,7 @@ for (size_t i = 0; i < rx_buffers.size(); i++) { rc = rx_buffers[i]->write((short *) &pkt_bufs[i].front(), num_smpls, - metadata.time_spec); + metadata.time_spec.to_ticks(rx_rate)); // Continue on local overrun, exit on other errors if ((rc < 0)) { diff --git a/Transceiver52M/device/uhd/smpl_buf.cpp b/Transceiver52M/device/uhd/smpl_buf.cpp index d8bdbc4..ae21369 100644 --- a/Transceiver52M/device/uhd/smpl_buf.cpp +++ b/Transceiver52M/device/uhd/smpl_buf.cpp @@ -47,11 +47,6 @@ return time_end - timestamp; } -ssize_t smpl_buf::avail_smpls(uhd::time_spec_t timespec) const -{ - return avail_smpls(timespec.to_ticks(clk_rt)); -} - ssize_t smpl_buf::read(void *buf, size_t len, TIMESTAMP timestamp) { int type_sz = 2 * sizeof(short); @@ -93,11 +88,6 @@ return num_smpls; } -ssize_t smpl_buf::read(void *buf, size_t len, uhd::time_spec_t ts) -{ - return read(buf, len, ts.to_ticks(clk_rt)); -} - ssize_t smpl_buf::write(void *buf, size_t len, TIMESTAMP timestamp) { int type_sz = 2 * sizeof(short); @@ -110,14 +100,12 @@ if (timestamp < time_end) { LOGC(DDEV, ERR) << "Overwriting old buffer data: timestamp="< -#include #include "radioDevice.h" /* Sample Buffer - Allows reading and writing of timed samples using osmo-trx - or UHD style timestamps. Time conversions are handled + timestamps. Time conversions are handled internally or accessable through the static convert calls. */ class smpl_buf { @@ -49,7 +48,6 @@ @return number of available samples or error */ ssize_t avail_smpls(TIMESTAMP timestamp) const; - ssize_t avail_smpls(uhd::time_spec_t timestamp) const; /** Read and write @param buf pointer to buffer @@ -58,9 +56,7 @@ @return number of actual samples read or written or error */ ssize_t read(void *buf, size_t len, TIMESTAMP timestamp); - ssize_t read(void *buf, size_t len, uhd::time_spec_t timestamp); ssize_t write(void *buf, size_t len, TIMESTAMP timestamp); - ssize_t write(void *buf, size_t len, uhd::time_spec_t timestamp); /** Buffer status string @return a formatted string describing internal buffer state -- To view, visit https://gerrit.osmocom.org/13810 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I94061328d46a550d4147121d85baffa29c700c45 Gerrit-Change-Number: 13810 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 18:26:13 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 3 May 2019 18:26:13 +0000 Subject: Change in osmo-trx[master]: uhd: smpl_buf: Use TIMESTAMP type in str_status In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/13828 ) Change subject: uhd: smpl_buf: Use TIMESTAMP type in str_status ...................................................................... uhd: smpl_buf: Use TIMESTAMP type in str_status Other related functions use "TIMESTAMP timestamp" so let's use same stuff in that function. Change-Id: I016b1a7f8db379caebc1409ca11e5ae8b759d2d4 --- M Transceiver52M/device/uhd/smpl_buf.cpp M Transceiver52M/device/uhd/smpl_buf.h 2 files changed, 3 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved tnt: Looks good to me, but someone else must approve Vadim Yanitskiy: Looks good to me, but someone else must approve diff --git a/Transceiver52M/device/uhd/smpl_buf.cpp b/Transceiver52M/device/uhd/smpl_buf.cpp index ae21369..f3fc323 100644 --- a/Transceiver52M/device/uhd/smpl_buf.cpp +++ b/Transceiver52M/device/uhd/smpl_buf.cpp @@ -138,11 +138,11 @@ return len; } -std::string smpl_buf::str_status(size_t ts) const +std::string smpl_buf::str_status(TIMESTAMP timestamp) const { std::ostringstream ost("Sample buffer: "); - ost << "timestamp = " << ts; + ost << "timestamp = " << timestamp; ost << ", length = " << buf_len; ost << ", time_start = " << time_start; ost << ", time_end = " << time_end; diff --git a/Transceiver52M/device/uhd/smpl_buf.h b/Transceiver52M/device/uhd/smpl_buf.h index cb231d3..e58eb38 100644 --- a/Transceiver52M/device/uhd/smpl_buf.h +++ b/Transceiver52M/device/uhd/smpl_buf.h @@ -61,7 +61,7 @@ /** Buffer status string @return a formatted string describing internal buffer state */ - std::string str_status(size_t ts) const; + std::string str_status(TIMESTAMP timestamp) const; /** Formatted error string @param code an error code -- To view, visit https://gerrit.osmocom.org/13828 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I016b1a7f8db379caebc1409ca11e5ae8b759d2d4 Gerrit-Change-Number: 13828 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 18:26:14 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 3 May 2019 18:26:14 +0000 Subject: Change in osmo-trx[master]: cosmetic: uhd: Use loglevel ERROR instead of ERR In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/13829 ) Change subject: cosmetic: uhd: Use loglevel ERROR instead of ERR ...................................................................... cosmetic: uhd: Use loglevel ERROR instead of ERR ERR is osmo-trx legacy level, which actually converts to osmocom's ERROR, so let's use that one directly. Change-Id: I82f6f89a725bea7f7acfa455c20cf922cc3f8a00 --- M Transceiver52M/device/uhd/UHDDevice.cpp 1 file changed, 11 insertions(+), 11 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved tnt: Looks good to me, but someone else must approve Vadim Yanitskiy: Looks good to me, but someone else must approve diff --git a/Transceiver52M/device/uhd/UHDDevice.cpp b/Transceiver52M/device/uhd/UHDDevice.cpp index 40ef2a0..34ffd57 100644 --- a/Transceiver52M/device/uhd/UHDDevice.cpp +++ b/Transceiver52M/device/uhd/UHDDevice.cpp @@ -149,7 +149,7 @@ LOGC(DDEV, WARNING) << msg; break; case uhd::msg::error: - LOGC(DDEV, ERR) << msg; + LOGC(DDEV, ERROR) << msg; break; case uhd::msg::fastpath: break; @@ -601,7 +601,7 @@ LOGC(DDEV, INFO) << "Starting USRP..."; if (started) { - LOGC(DDEV, ERR) << "Device already started"; + LOGC(DDEV, ERROR) << "Device already started"; return false; } @@ -652,7 +652,7 @@ int uhd_device::check_rx_md_err(uhd::rx_metadata_t &md, ssize_t num_smpls) { if (!num_smpls) { - LOGC(DDEV, ERR) << str_code(md); + LOGC(DDEV, ERROR) << str_code(md); switch (md.error_code) { case uhd::rx_metadata_t::ERROR_CODE_TIMEOUT: @@ -715,8 +715,8 @@ // Check that timestamp is valid rc = rx_buffers[0]->avail_smpls(timestamp); if (rc < 0) { - LOGC(DDEV, ERR) << rx_buffers[0]->str_code(rc); - LOGC(DDEV, ERR) << rx_buffers[0]->str_status(timestamp); + LOGC(DDEV, ERROR) << rx_buffers[0]->str_code(rc); + LOGC(DDEV, ERROR) << rx_buffers[0]->str_status(timestamp); return 0; } @@ -763,8 +763,8 @@ // Continue on local overrun, exit on other errors if ((rc < 0)) { - LOGC(DDEV, ERR) << rx_buffers[i]->str_code(rc); - LOGC(DDEV, ERR) << rx_buffers[i]->str_status(timestamp); + LOGC(DDEV, ERROR) << rx_buffers[i]->str_code(rc); + LOGC(DDEV, ERROR) << rx_buffers[i]->str_status(timestamp); if (rc != smpl_buf::ERROR_OVERFLOW) return 0; } @@ -775,8 +775,8 @@ for (size_t i = 0; i < rx_buffers.size(); i++) { rc = rx_buffers[i]->read(bufs[i], len, timestamp); if ((rc < 0) || (rc != len)) { - LOGC(DDEV, ERR) << rx_buffers[i]->str_code(rc); - LOGC(DDEV, ERR) << rx_buffers[i]->str_status(timestamp); + LOGC(DDEV, ERROR) << rx_buffers[i]->str_code(rc); + LOGC(DDEV, ERROR) << rx_buffers[i]->str_status(timestamp); return 0; } } @@ -797,7 +797,7 @@ // No control packets if (isControl) { - LOGC(DDEV, ERR) << "Control packets not supported"; + LOGC(DDEV, ERROR) << "Control packets not supported"; return 0; } @@ -1110,7 +1110,7 @@ if ((md.event_code != uhd::async_metadata_t::EVENT_CODE_UNDERFLOW) && (md.event_code != uhd::async_metadata_t::EVENT_CODE_TIME_ERROR)) { - LOGC(DDEV, ERR) << str_code(md); + LOGC(DDEV, ERROR) << str_code(md); } } -- To view, visit https://gerrit.osmocom.org/13829 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I82f6f89a725bea7f7acfa455c20cf922cc3f8a00 Gerrit-Change-Number: 13829 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 18:26:14 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 3 May 2019 18:26:14 +0000 Subject: Change in osmo-trx[master]: uhd: Avoid reallocation of buffers every read In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/13830 ) Change subject: uhd: Avoid reallocation of buffers every read ...................................................................... uhd: Avoid reallocation of buffers every read Buffer size is based on num of chans and rxBuffer size is based on num of chans and rx_spp, and both are available and set during open(), so no need to waste time allocating and freeing them everytime we read from the device. Change-Id: I8c881c9c303c80f323825d85a924d74b76d2ce47 --- M Transceiver52M/device/uhd/UHDDevice.cpp M Transceiver52M/device/uhd/UHDDevice.h 2 files changed, 10 insertions(+), 15 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/Transceiver52M/device/uhd/UHDDevice.cpp b/Transceiver52M/device/uhd/UHDDevice.cpp index 34ffd57..6214666 100644 --- a/Transceiver52M/device/uhd/UHDDevice.cpp +++ b/Transceiver52M/device/uhd/UHDDevice.cpp @@ -516,6 +516,11 @@ for (size_t i = 0; i < rx_buffers.size(); i++) rx_buffers[i] = new smpl_buf(buf_len, rx_rate); + // Create vector buffer + pkt_bufs = std::vector >(chans, std::vector(2 * rx_spp)); + for (size_t i = 0; i < pkt_bufs.size(); i++) + pkt_ptrs.push_back(&pkt_bufs[i].front()); + // Initialize and shadow gain values init_gains(); @@ -549,13 +554,6 @@ size_t num_smpls; float timeout = UHD_RESTART_TIMEOUT; - std::vector > - pkt_bufs(chans, std::vector(2 * rx_spp)); - - std::vector pkt_ptrs; - for (size_t i = 0; i < pkt_bufs.size(); i++) - pkt_ptrs.push_back(&pkt_bufs[i].front()); - ts_initial = 0; while (!ts_initial || (num_pkts-- > 0)) { num_smpls = rx_stream->recv(pkt_ptrs, rx_spp, md, @@ -720,14 +718,6 @@ return 0; } - // Create vector buffer - std::vector > - pkt_bufs(chans, std::vector(2 * rx_spp)); - - std::vector pkt_ptrs; - for (size_t i = 0; i < pkt_bufs.size(); i++) - pkt_ptrs.push_back(&pkt_bufs[i].front()); - // Receive samples from the usrp until we have enough while (rx_buffers[0]->avail_smpls(timestamp) < len) { thread_enable_cancel(false); diff --git a/Transceiver52M/device/uhd/UHDDevice.h b/Transceiver52M/device/uhd/UHDDevice.h index f5d0b33..05a5914 100644 --- a/Transceiver52M/device/uhd/UHDDevice.h +++ b/Transceiver52M/device/uhd/UHDDevice.h @@ -152,6 +152,11 @@ TIMESTAMP ts_initial, ts_offset; std::vector rx_buffers; + /* Sample buffers used to receive samples from UHD: */ + std::vector > pkt_bufs; + /* Used to call UHD API: Buffer pointer of each elem in pkt_ptrs will + point to corresponding buffer of vector pkt_bufs. */ + std::vector pkt_ptrs; void init_gains(); void set_channels(bool swap); -- To view, visit https://gerrit.osmocom.org/13830 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I8c881c9c303c80f323825d85a924d74b76d2ce47 Gerrit-Change-Number: 13830 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: tnt -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 18:26:15 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 3 May 2019 18:26:15 +0000 Subject: Change in osmo-trx[master]: Move smpl_buf out of uhd dir to re-use it in other devices In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/13831 ) Change subject: Move smpl_buf out of uhd dir to re-use it in other devices ...................................................................... Move smpl_buf out of uhd dir to re-use it in other devices Change-Id: I39ac8435072cff8d4dac786b31ff4af9b61a77fe --- M Transceiver52M/device/Makefile.am R Transceiver52M/device/smpl_buf.cpp R Transceiver52M/device/smpl_buf.h M Transceiver52M/device/uhd/Makefile.am 4 files changed, 3 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/Transceiver52M/device/Makefile.am b/Transceiver52M/device/Makefile.am index 1a2d077..e653a9e 100644 --- a/Transceiver52M/device/Makefile.am +++ b/Transceiver52M/device/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/Makefile.common -noinst_HEADERS = radioDevice.h +noinst_HEADERS = radioDevice.h smpl_buf.h SUBDIRS = diff --git a/Transceiver52M/device/uhd/smpl_buf.cpp b/Transceiver52M/device/smpl_buf.cpp similarity index 100% rename from Transceiver52M/device/uhd/smpl_buf.cpp rename to Transceiver52M/device/smpl_buf.cpp diff --git a/Transceiver52M/device/uhd/smpl_buf.h b/Transceiver52M/device/smpl_buf.h similarity index 100% rename from Transceiver52M/device/uhd/smpl_buf.h rename to Transceiver52M/device/smpl_buf.h diff --git a/Transceiver52M/device/uhd/Makefile.am b/Transceiver52M/device/uhd/Makefile.am index 4fcc0d7..11b380e 100644 --- a/Transceiver52M/device/uhd/Makefile.am +++ b/Transceiver52M/device/uhd/Makefile.am @@ -3,8 +3,8 @@ AM_CPPFLAGS = -Wall $(STD_DEFINES_AND_INCLUDES) -I${srcdir}/.. AM_CXXFLAGS = -lpthread $(LIBOSMOCORE_CFLAGS) $(LIBOSMOCTRL_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(UHD_CFLAGS) -noinst_HEADERS = UHDDevice.h smpl_buf.h +noinst_HEADERS = UHDDevice.h noinst_LTLIBRARIES = libdevice.la -libdevice_la_SOURCES = UHDDevice.cpp smpl_buf.cpp +libdevice_la_SOURCES = UHDDevice.cpp ../smpl_buf.cpp -- To view, visit https://gerrit.osmocom.org/13831 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I39ac8435072cff8d4dac786b31ff4af9b61a77fe Gerrit-Change-Number: 13831 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: tnt -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 18:26:15 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 3 May 2019 18:26:15 +0000 Subject: Change in osmo-trx[master]: device: Drop unused numberRead/numberWritten APIs In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/13832 ) Change subject: device: Drop unused numberRead/numberWritten APIs ...................................................................... device: Drop unused numberRead/numberWritten APIs It's really not used, so let's drop unused code and simplify work for new to come device drivers implementation. Change-Id: I0d18f9c2584771e2f7b3d5c6b016e764e02855ff --- M Transceiver52M/device/lms/LMSDevice.cpp M Transceiver52M/device/lms/LMSDevice.h M Transceiver52M/device/radioDevice.h M Transceiver52M/device/uhd/UHDDevice.cpp M Transceiver52M/device/uhd/UHDDevice.h M Transceiver52M/device/usrp1/USRPDevice.cpp M Transceiver52M/device/usrp1/USRPDevice.h 7 files changed, 1 insertion(+), 33 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved tnt: Looks good to me, but someone else must approve diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp index 7071589..be51a12 100644 --- a/Transceiver52M/device/lms/LMSDevice.cpp +++ b/Transceiver52M/device/lms/LMSDevice.cpp @@ -238,8 +238,6 @@ goto out_close; } - samplesRead = 0; - samplesWritten = 0; started = false; return NORMAL; @@ -630,8 +628,6 @@ thread_enable_cancel(true); } - samplesRead += rc; - if (((TIMESTAMP) rx_metadata.timestamp) < timestamp) rc = 0; @@ -678,8 +674,6 @@ thread_enable_cancel(true); } - samplesWritten += rc; - return rc; } diff --git a/Transceiver52M/device/lms/LMSDevice.h b/Transceiver52M/device/lms/LMSDevice.h index 225839d..b0ff03b 100644 --- a/Transceiver52M/device/lms/LMSDevice.h +++ b/Transceiver52M/device/lms/LMSDevice.h @@ -55,9 +55,6 @@ double actualSampleRate; ///< the actual USRP sampling rate - unsigned long long samplesRead; ///< number of samples read from LMS - unsigned long long samplesWritten; ///< number of samples sent to LMS - bool started; ///< flag indicates LMS has started bool skipRx; ///< set if LMS is transmit-only. @@ -203,12 +200,6 @@ inline double getSampleRate() { return actualSampleRate; } - inline double numberRead() { - return samplesRead; - } - inline double numberWritten() { - return samplesWritten; - } }; #endif // _LMS_DEVICE_H_ diff --git a/Transceiver52M/device/radioDevice.h b/Transceiver52M/device/radioDevice.h index 5d001fb..30e0f43 100644 --- a/Transceiver52M/device/radioDevice.h +++ b/Transceiver52M/device/radioDevice.h @@ -161,8 +161,6 @@ virtual double getTxFreq(size_t chan = 0) = 0; virtual double getRxFreq(size_t chan = 0) = 0; virtual double getSampleRate()=0; - virtual double numberRead()=0; - virtual double numberWritten()=0; protected: size_t tx_sps, rx_sps; diff --git a/Transceiver52M/device/uhd/UHDDevice.cpp b/Transceiver52M/device/uhd/UHDDevice.cpp index 6214666..79e5855 100644 --- a/Transceiver52M/device/uhd/UHDDevice.cpp +++ b/Transceiver52M/device/uhd/UHDDevice.cpp @@ -165,7 +165,7 @@ tx_gain_min(0.0), tx_gain_max(0.0), rx_gain_min(0.0), rx_gain_max(0.0), tx_spp(0), rx_spp(0), - started(false), aligned(false), rx_pkt_cnt(0), drop_cnt(0), + started(false), aligned(false), drop_cnt(0), prev_ts(0,0), ts_initial(0), ts_offset(0), async_event_thrd(NULL) { } @@ -725,8 +725,6 @@ metadata, 0.1, true); thread_enable_cancel(true); - rx_pkt_cnt++; - // Check for errors rc = check_rx_md_err(metadata, num_smpls); switch (rc) { diff --git a/Transceiver52M/device/uhd/UHDDevice.h b/Transceiver52M/device/uhd/UHDDevice.h index 05a5914..0b57ba4 100644 --- a/Transceiver52M/device/uhd/UHDDevice.h +++ b/Transceiver52M/device/uhd/UHDDevice.h @@ -112,8 +112,6 @@ GSM::Time minLatency(); inline double getSampleRate() { return tx_rate; } - inline double numberRead() { return rx_pkt_cnt; } - inline double numberWritten() { return 0; } /** Receive and process asynchronous message @return true if message received or false on timeout or error @@ -146,7 +144,6 @@ bool started; bool aligned; - size_t rx_pkt_cnt; size_t drop_cnt; uhd::time_spec_t prev_ts; diff --git a/Transceiver52M/device/usrp1/USRPDevice.cpp b/Transceiver52M/device/usrp1/USRPDevice.cpp index 2343fb6..b1d6c56 100644 --- a/Transceiver52M/device/usrp1/USRPDevice.cpp +++ b/Transceiver52M/device/usrp1/USRPDevice.cpp @@ -173,8 +173,6 @@ m_dbTx = m_uTx->selected_subdev(txSubdevSpec); m_dbRx = m_uRx->selected_subdev(rxSubdevSpec); - samplesRead = 0; - samplesWritten = 0; started = false; return NORMAL; @@ -505,7 +503,6 @@ gettimeofday(&lastReadTime,NULL); firstRead = true; } - samplesRead += numSamples; return numSamples; #endif @@ -555,14 +552,12 @@ } m_uTx->write((const void*) outPkt,sizeof(uint32_t)*128*numPkts,NULL); - samplesWritten += len/2/sizeof(short); writeLock.unlock(); return len/2/sizeof(short); #else int retVal = len; memcpy(loopbackBuffer+loopbackBufferSize,buf,sizeof(short)*2*len); - samplesWritten += retVal; loopbackBufferSize += retVal*2; return retVal; diff --git a/Transceiver52M/device/usrp1/USRPDevice.h b/Transceiver52M/device/usrp1/USRPDevice.h index 521d81d..c02e58c 100644 --- a/Transceiver52M/device/usrp1/USRPDevice.h +++ b/Transceiver52M/device/usrp1/USRPDevice.h @@ -51,9 +51,6 @@ double actualSampleRate; ///< the actual USRP sampling rate unsigned int decimRate; ///< the USRP decimation rate - unsigned long long samplesRead; ///< number of samples read from USRP - unsigned long long samplesWritten; ///< number of samples sent to USRP - bool started; ///< flag indicates USRP has started static const unsigned int currDataSize_log2 = 21; @@ -201,8 +198,6 @@ inline double getTxFreq(size_t chan = 0) { return 0; } inline double getRxFreq(size_t chan = 0) { return 0; } inline double getSampleRate() { return actualSampleRate; } - inline double numberRead() { return samplesRead; } - inline double numberWritten() { return samplesWritten; } }; #endif // _USRP_DEVICE_H_ -- To view, visit https://gerrit.osmocom.org/13832 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I0d18f9c2584771e2f7b3d5c6b016e764e02855ff Gerrit-Change-Number: 13832 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: tnt -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 3 18:26:16 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 3 May 2019 18:26:16 +0000 Subject: Change in osmo-trx[master]: smpl_buf: Remove unused clk_rt variable In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/13869 ) Change subject: smpl_buf: Remove unused clk_rt variable ...................................................................... smpl_buf: Remove unused clk_rt variable During 87b7d098e517470fec53ac13a28d1d0fa7b16bb4 we dropped support for UHD specific functionalitites, and so clk_rt is not needed anymore. Change-Id: I37403e085ed6a541bbdecf64f1f9a821ff2753a4 --- M Transceiver52M/device/smpl_buf.cpp M Transceiver52M/device/smpl_buf.h M Transceiver52M/device/uhd/UHDDevice.cpp 3 files changed, 7 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/Transceiver52M/device/smpl_buf.cpp b/Transceiver52M/device/smpl_buf.cpp index f3fc323..e3c5af5 100644 --- a/Transceiver52M/device/smpl_buf.cpp +++ b/Transceiver52M/device/smpl_buf.cpp @@ -25,9 +25,9 @@ #include "smpl_buf.h" #include -smpl_buf::smpl_buf(size_t len, double rate) - : buf_len(len), clk_rt(rate), - time_start(0), time_end(0), data_start(0), data_end(0) +smpl_buf::smpl_buf(size_t len) + : buf_len(len), time_start(0), time_end(0), + data_start(0), data_end(0) { data = new uint32_t[len]; } @@ -100,12 +100,12 @@ if (timestamp < time_end) { LOGC(DDEV, ERR) << "Overwriting old buffer data: timestamp="< -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 4 18:07:33 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Sat, 4 May 2019 18:07:33 +0000 Subject: Change in osmo-trx[master]: smpl_buf: Remove unused clk_rt variable (fixup) Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13876 Change subject: smpl_buf: Remove unused clk_rt variable (fixup) ...................................................................... smpl_buf: Remove unused clk_rt variable (fixup) Last commit removed use of the clkr_rt variable but forgot to remove the variable itself. Fixes: 580c48b7d5ae931b5ceb7ffa2a1ae39f89b31080 Fixes: Coverity CID 198370 Change-Id: Ida1fc5b7b338fbeb2a7c6258f36b02da93ff2186 --- M Transceiver52M/device/smpl_buf.h 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/76/13876/1 diff --git a/Transceiver52M/device/smpl_buf.h b/Transceiver52M/device/smpl_buf.h index e007ae5..24d3ce9 100644 --- a/Transceiver52M/device/smpl_buf.h +++ b/Transceiver52M/device/smpl_buf.h @@ -79,8 +79,6 @@ uint32_t *data; size_t buf_len; - double clk_rt; - TIMESTAMP time_start; TIMESTAMP time_end; -- To view, visit https://gerrit.osmocom.org/13876 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ida1fc5b7b338fbeb2a7c6258f36b02da93ff2186 Gerrit-Change-Number: 13876 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 4 18:35:30 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Sat, 4 May 2019 18:35:30 +0000 Subject: Change in osmo-trx[master]: smpl_buf: Remove unused clk_rt variable (fixup) In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13876 ) Change subject: smpl_buf: Remove unused clk_rt variable (fixup) ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13876 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ida1fc5b7b338fbeb2a7c6258f36b02da93ff2186 Gerrit-Change-Number: 13876 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Sat, 04 May 2019 18:35:30 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 4 18:35:36 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Sat, 4 May 2019 18:35:36 +0000 Subject: Change in osmo-trx[master]: smpl_buf: Remove unused clk_rt variable (fixup) In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/13876 ) Change subject: smpl_buf: Remove unused clk_rt variable (fixup) ...................................................................... smpl_buf: Remove unused clk_rt variable (fixup) Last commit removed use of the clkr_rt variable but forgot to remove the variable itself. Fixes: 580c48b7d5ae931b5ceb7ffa2a1ae39f89b31080 Fixes: Coverity CID 198370 Change-Id: Ida1fc5b7b338fbeb2a7c6258f36b02da93ff2186 --- M Transceiver52M/device/smpl_buf.h 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Pau Espin Pedrol: Looks good to me, approved diff --git a/Transceiver52M/device/smpl_buf.h b/Transceiver52M/device/smpl_buf.h index e007ae5..24d3ce9 100644 --- a/Transceiver52M/device/smpl_buf.h +++ b/Transceiver52M/device/smpl_buf.h @@ -79,8 +79,6 @@ uint32_t *data; size_t buf_len; - double clk_rt; - TIMESTAMP time_start; TIMESTAMP time_end; -- To view, visit https://gerrit.osmocom.org/13876 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ida1fc5b7b338fbeb2a7c6258f36b02da93ff2186 Gerrit-Change-Number: 13876 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 4 18:36:16 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Sat, 4 May 2019 18:36:16 +0000 Subject: Change in osmo-trx[master]: smpl_buf: Move it to device/common and create libdevice_common.la In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13873 to look at the new patch set (#2). Change subject: smpl_buf: Move it to device/common and create libdevice_common.la ...................................................................... smpl_buf: Move it to device/common and create libdevice_common.la Since in next commit osmo-trx-lms starts using smpl_buf.cpp, it seems some automake step doesn't like including a cpp file twice from a different directory, since race conditions can occur building it. Instead we define the dependency by first building a static lib and then using it on each libdevice.la (one per device type). We already do the similar under arch/ subdir, where we have a common/ subdir and then one subdir and lib per architecture. Change-Id: I465ad0f6d5569bb3006d711c8fd0df14391fcf35 --- M Transceiver52M/Makefile.am M Transceiver52M/device/Makefile.am A Transceiver52M/device/common/Makefile.am R Transceiver52M/device/common/radioDevice.h R Transceiver52M/device/common/smpl_buf.cpp R Transceiver52M/device/common/smpl_buf.h M Transceiver52M/device/lms/Makefile.am M Transceiver52M/device/uhd/Makefile.am M Transceiver52M/device/usrp1/Makefile.am M configure.ac 10 files changed, 20 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/73/13873/2 -- To view, visit https://gerrit.osmocom.org/13873 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I465ad0f6d5569bb3006d711c8fd0df14391fcf35 Gerrit-Change-Number: 13873 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 07:14:34 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 5 May 2019 07:14:34 +0000 Subject: Change in osmo-trx[master]: smpl_buf: Remove dbg log line with duplicated info In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13870 ) Change subject: smpl_buf: Remove dbg log line with duplicated info ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13870 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia2423707210a364fa6827b92cca087ced99b088b Gerrit-Change-Number: 13870 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 05 May 2019 07:14:34 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 07:20:22 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 5 May 2019 07:20:22 +0000 Subject: Change in osmo-trx[master]: Introduce LOGCHAN macro to standarize logging channel info In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13871 ) Change subject: Introduce LOGCHAN macro to standarize logging channel info ...................................................................... Patch Set 2: (4 comments) https://gerrit.osmocom.org/#/c/13871/2/CommonLibs/Logger.h File CommonLibs/Logger.h: https://gerrit.osmocom.org/#/c/13871/2/CommonLibs/Logger.h at 59 PS2, Line 59: Cosmetic: let's rather have this \n after the macro, not here. https://gerrit.osmocom.org/#/c/13871/2/Transceiver52M/device/lms/LMSDevice.cpp File Transceiver52M/device/lms/LMSDevice.cpp: https://gerrit.osmocom.org/#/c/13871/2/Transceiver52M/device/lms/LMSDevice.cpp at 577 PS2, Line 577: << m_last_rx_underruns[chan] << " -> " : << status.underrun << ")"; Please realign. https://gerrit.osmocom.org/#/c/13871/2/Transceiver52M/device/lms/LMSDevice.cpp at 585 PS2, Line 585: << m_last_rx_overruns[chan] << " -> " : << status.overrun << ")"; Please realign. https://gerrit.osmocom.org/#/c/13871/2/Transceiver52M/device/lms/LMSDevice.cpp at 592 PS2, Line 592: << m_last_rx_dropped[chan] << " -> " : << status.droppedPackets << ")"; Please realign. -- To view, visit https://gerrit.osmocom.org/13871 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I67d869499aa16af58c863ca7b74c356bcd979936 Gerrit-Change-Number: 13871 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 05 May 2019 07:20:22 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 11:39:52 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 5 May 2019 11:39:52 +0000 Subject: Change in osmo-trx[master]: smpl_buf: Move it to device/common and create libdevice_common.la In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13873 ) Change subject: smpl_buf: Move it to device/common and create libdevice_common.la ...................................................................... Patch Set 2: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/13873/2/Transceiver52M/device/common/Makefile.am File Transceiver52M/device/common/Makefile.am: https://gerrit.osmocom.org/#/c/13873/2/Transceiver52M/device/common/Makefile.am at 12 PS2, Line 12: Cosmetic: tabs vs spaces? We use tabs in general. -- To view, visit https://gerrit.osmocom.org/13873 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I465ad0f6d5569bb3006d711c8fd0df14391fcf35 Gerrit-Change-Number: 13873 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 05 May 2019 11:39:52 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 11:46:30 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 5 May 2019 11:46:30 +0000 Subject: Change in libosmocore[master]: osmo_gsup_decode(): properly check IMSI, avoid deprecation In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13817 ) Change subject: osmo_gsup_decode(): properly check IMSI, avoid deprecation ...................................................................... Patch Set 2: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/13817/2/src/gsm/gsup.c File src/gsm/gsup.c: https://gerrit.osmocom.org/#/c/13817/2/src/gsm/gsup.c at 330 PS2, Line 330: gsm48_decode_bcd_number Should we also correct this? -- To view, visit https://gerrit.osmocom.org/13817 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iaded84d91baad5386c8f353c283b6b9e40a43b05 Gerrit-Change-Number: 13817 Gerrit-PatchSet: 2 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 05 May 2019 11:46:30 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 13:53:23 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 5 May 2019 13:53:23 +0000 Subject: Change in osmo-bts[master]: common/oml.c: introduce and use both LOGPFOH and DEBUGPFOH Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13877 Change subject: common/oml.c: introduce and use both LOGPFOH and DEBUGPFOH ...................................................................... common/oml.c: introduce and use both LOGPFOH and DEBUGPFOH Change-Id: I9e9d6ccb88c9c9d35b2ce5778fa2580382704089 --- M src/common/oml.c 1 file changed, 44 insertions(+), 51 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/77/13877/1 diff --git a/src/common/oml.c b/src/common/oml.c index de7a0e7..f288078 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -49,6 +49,9 @@ #include #include +#define LOGPFOH(ss, lvl, foh, fmt, args ...) LOGP(ss, lvl, "%s: " fmt, abis_nm_dump_foh(foh), ## args) +#define DEBUGPFOH(ss, foh, fmt, args ...) LOGPFOH(ss, LOGL_DEBUG, foh, fmt, ## args) + static int oml_ipa_set_attr(struct gsm_bts *bts, struct msgb *msg); static struct tlv_definition abis_nm_att_tlvdef_ipa_local = {}; @@ -534,14 +537,12 @@ if (!foh || !bts) return -EINVAL; - abis_nm_debugp_foh(DOML, foh); - DEBUGPC(DOML, "Rx GET ATTR\n"); + DEBUGPFOH(DOML, foh, "Rx GET ATTR\n"); /* Determine which OML object is addressed */ mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst); if (!mo) { - LOGP(DOML, LOGL_ERROR, "%s Get Attributes for unknown Object Instance\n", - abis_nm_dump_foh(foh)); + LOGPFOH(DOML, LOGL_ERROR, foh, "Get Attributes for unknown Object Instance\n"); return oml_fom_ack_nack(msg, NM_NACK_OBJINST_UNKN); } @@ -558,7 +559,7 @@ rc = oml_tx_attr_resp(mo, TLVP_VAL(&tp, NM_ATT_LIST_REQ_ATTR), TLVP_LEN(&tp, NM_ATT_LIST_REQ_ATTR)); if (rc < 0) { - LOGP(DOML, LOGL_ERROR, "responding to O&M Get Attributes message with NACK 0%x\n", -rc); + LOGPFOH(DOML, LOGL_ERROR, foh, "Responding to O&M Get Attributes message with NACK 0%x\n", -rc); return oml_fom_ack_nack(msg, -rc); } @@ -573,8 +574,7 @@ int rc, i; const uint8_t *payload; - abis_nm_debugp_foh(DOML, foh); - DEBUGPC(DOML, "Rx SET BTS ATTR\n"); + DEBUGPFOH(DOML, foh, "Rx SET BTS ATTR\n"); rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { @@ -590,7 +590,8 @@ oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_WARN_SW_WARN, "Given ARFCN %u is not supported", arfcn); - LOGP(DOML, LOGL_NOTICE, "Given ARFCN %d is not supported.\n", arfcn); + /* FIXME: use proper format specifier for uint16_t */ + LOGPFOH(DOML, LOGL_ERROR, foh, "Given ARFCN %d is not supported.\n", arfcn); return oml_fom_ack_nack(msg, NM_NACK_FREQ_NOTAVAIL); } } @@ -637,8 +638,8 @@ switch (val[0]) { case 0xFF: /* Osmocom specific Extension of TS 12.21 */ - LOGP(DOML, LOGL_NOTICE, "WARNING: Radio Link Timeout " - "explicitly disabled, only use this for lab testing!\n"); + LOGPFOH(DOML, LOGL_NOTICE, foh, "WARNING: Radio Link Timeout " + "explicitly disabled, only use this for lab testing!\n"); bts->radio_link_timeout = -1; break; case 0x01: /* Based on uplink SACCH (radio link timeout) */ @@ -650,7 +651,7 @@ /* fall-through */ case 0x02: /* Based on RXLEV/RXQUAL measurements */ default: - LOGP(DOML, LOGL_NOTICE, "Given Conn. Failure Criterion " + LOGPFOH(DOML, LOGL_NOTICE, foh, "Given Conn. Failure Criterion " "not supported. Please use criterion 0x01 with " "RADIO_LINK_TIMEOUT value of 4..64\n"); return oml_fom_ack_nack(msg, NM_NACK_PARAM_RANGE); @@ -664,15 +665,15 @@ uint32_t t200_ms = payload[i] * abis_nm_t200_ms[i]; #if 0 bts->t200_ms[i] = t200_ms; - DEBUGP(DOML, "T200[%u]: OML=%u, mult=%u => %u ms\n", - i, payload[i], abis_nm_t200_mult[i], - bts->t200_ms[i]); + DEBUGPFOH(DOML, foh, "T200[%u]: OML=%u, mult=%u => %u ms\n", + i, payload[i], abis_nm_t200_mult[i], + bts->t200_ms[i]); #else /* we'd rather use the 1s/2s (long) defaults by * libosmocore, as we appear to have some bug(s) * related to handling T200 expiration in * libosmogsm lapd(m) code? */ - LOGP(DOML, LOGL_NOTICE, "Ignoring T200[%u] (%u ms) " + LOGPFOH(DOML, LOGL_NOTICE, foh, "Ignoring T200[%u] (%u ms) " "as sent by BSC due to suspected LAPDm bug!\n", i, t200_ms); #endif @@ -713,8 +714,7 @@ if (TLVP_PRES_LEN(&tp, NM_ATT_BTS_AIR_TIMER, 1)) { uint8_t t3105 = *TLVP_VAL(&tp, NM_ATT_BTS_AIR_TIMER); if (t3105 == 0) { - LOGP(DOML, LOGL_NOTICE, - "T3105 must have a value != 0.\n"); + LOGPFOH(DOML, LOGL_NOTICE, foh, "T3105 must have a value != 0.\n"); return oml_fom_ack_nack(msg, NM_NACK_PARAM_RANGE); } bts->t3105_ms = t3105 * 10; @@ -743,8 +743,7 @@ struct tlv_parsed tp, *tp_merged; int rc; - abis_nm_debugp_foh(DOML, foh); - DEBUGPC(DOML, "Rx SET RADIO CARRIER ATTR\n"); + DEBUGPFOH(DOML, foh, "Rx SET RADIO CARRIER ATTR\n"); rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { @@ -774,8 +773,8 @@ /* 9.4.47 RF Max Power Reduction */ if (TLVP_PRES_LEN(&tp, NM_ATT_RF_MAXPOWR_R, 1)) { trx->max_power_red = *TLVP_VAL(&tp, NM_ATT_RF_MAXPOWR_R) * 2; - LOGP(DOML, LOGL_INFO, "Set RF Max Power Reduction = %d dBm\n", - trx->max_power_red); + LOGPFOH(DOML, LOGL_INFO, foh, "Set RF Max Power Reduction to " + "%d dBm\n", trx->max_power_red); } /* 9.4.5 ARFCN List */ #if 0 @@ -792,7 +791,7 @@ if (arfcn > 1024) return oml_fom_ack_nack(msg, NM_NACK_FREQ_NOTAVAIL); trx->arfcn_list[i] = arfcn; - LOGP(DOML, LOGL_INFO, " ARFCN list = %d\n", trx->arfcn_list[i]); + LOGPFOH(DOML, LOGL_INFO, foh, " ARFCN list = %d\n", trx->arfcn_list[i]); } trx->arfcn_num = length; } else @@ -804,7 +803,7 @@ uint16_t length = TLVP_LEN(&tp, NM_ATT_ARFCN_LIST); uint16_t arfcn; if (length != 2) { - LOGP(DOML, LOGL_ERROR, "Expecting only one ARFCN, " + LOGPFOH(DOML, LOGL_ERROR, foh, "Expecting only one ARFCN, " "because hopping not supported\n"); return oml_fom_ack_nack(msg, NM_NACK_MSGINCONSIST_PHYSCFG); } @@ -816,8 +815,7 @@ OSMO_EVT_WARN_SW_WARN, "Given ARFCN %u is unsupported", arfcn); - LOGP(DOML, LOGL_NOTICE, - "Given ARFCN %u is unsupported.\n", arfcn); + LOGPFOH(DOML, LOGL_NOTICE, foh, "Given ARFCN %u is unsupported.\n", arfcn); return oml_fom_ack_nack(msg, NM_NACK_FREQ_NOTAVAIL); } trx->arfcn = arfcn; @@ -915,8 +913,7 @@ struct tlv_parsed tp, *tp_merged; int rc; - abis_nm_debugp_foh(DOML, foh); - DEBUGPC(DOML, "Rx SET CHAN ATTR\n"); + DEBUGPFOH(DOML, foh, "Rx SET CHAN ATTR\n"); rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { @@ -929,13 +926,13 @@ /* 9.4.21 HSN... */ /* 9.4.27 MAIO */ if (TLVP_PRESENT(&tp, NM_ATT_HSN) || TLVP_PRESENT(&tp, NM_ATT_MAIO)) { - LOGP(DOML, LOGL_NOTICE, "SET CHAN ATTR: Frequency hopping not supported.\n"); + LOGPFOH(DOML, LOGL_NOTICE, foh, "SET CHAN ATTR: Frequency hopping not supported.\n"); return oml_fom_ack_nack(msg, NM_NACK_SPEC_IMPL_NOTSUPP); } /* 9.4.52 Starting Time */ if (TLVP_PRESENT(&tp, NM_ATT_START_TIME)) { - LOGP(DOML, LOGL_NOTICE, "SET CHAN ATTR: Starting time not supported.\n"); + LOGPFOH(DOML, LOGL_NOTICE, foh, "SET CHAN ATTR: Starting time not supported.\n"); return oml_fom_ack_nack(msg, NM_NACK_SPEC_IMPL_NOTSUPP); } @@ -946,7 +943,7 @@ /* Call into BTS driver to check attribute values */ rc = bts_model_check_oml(bts, foh->msg_type, ts->mo.nm_attr, tp_merged, ts); if (rc < 0) { - LOGP(DOML, LOGL_ERROR, "SET CHAN ATTR: invalid attribute value, rc=%d\n", rc); + LOGPFOH(DOML, LOGL_ERROR, foh, "SET CHAN ATTR: invalid attribute value, rc=%d\n", rc); talloc_free(tp_merged); /* Send NACK */ return oml_fom_ack_nack(msg, -rc); @@ -962,9 +959,9 @@ ts->pchan = abis_nm_pchan4chcomb(comb); rc = conf_lchans(ts); if (rc < 0) { - LOGP(DOML, LOGL_ERROR, "SET CHAN ATTR: invalid Chan Comb 0x%x" - " (pchan=%s, conf_lchans()->%d)\n", - comb, gsm_pchan_name(ts->pchan), rc); + LOGPFOH(DOML, LOGL_ERROR, foh, "SET CHAN ATTR: invalid Chan Comb 0x%x" + " (pchan=%s, conf_lchans()->%d)\n", + comb, gsm_pchan_name(ts->pchan), rc); talloc_free(tp_merged); /* Send NACK */ return oml_fom_ack_nack(msg, -rc); @@ -980,7 +977,7 @@ /* If there is no TSC specified, use the BCC */ ts->tsc = BSIC2BCC(bts->bsic); } - LOGP(DOML, LOGL_INFO, "%s SET CHAN ATTR (TSC=%u pchan=%s)\n", + LOGPFOH(DOML, LOGL_INFO, foh, "%s SET CHAN ATTR (TSC=%u pchan=%s)\n", gsm_abis_mo_name(&ts->mo), ts->tsc, gsm_pchan_name(ts->pchan)); /* call into BTS driver to apply new attributes to hardware */ @@ -994,8 +991,7 @@ struct gsm_abis_mo *mo; void *obj; - abis_nm_debugp_foh(DOML, foh); - DEBUGPC(DOML, "Rx OPSTART\n"); + DEBUGPFOH(DOML, foh, "Rx OPSTART\n"); /* Step 1: Resolve MO by obj_class/obj_inst */ mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst); @@ -1005,7 +1001,7 @@ /* Step 2: Do some global dependency/consistency checking */ if (mo->nm_state.operational == NM_OPSTATE_ENABLED) { - DEBUGP(DOML, "... automatic ACK, OP state already was Enabled\n"); + DEBUGPFOH(DOML, foh, "... automatic ACK, OP state already was Enabled\n"); return oml_mo_opstart_ack(mo); } @@ -1022,17 +1018,16 @@ void *obj; int rc; - abis_nm_debugp_foh(DOML, foh); - DEBUGPC(DOML, "Rx CHG ADM STATE\n"); + DEBUGPFOH(DOML, foh, "Rx CHG ADM STATE\n"); rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { - LOGP(DOML, LOGL_ERROR, "Rx CHG ADM STATE: error during TLV parse\n"); + LOGPFOH(DOML, LOGL_ERROR, foh, "Rx CHG ADM STATE: error during TLV parse\n"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } if (!TLVP_PRESENT(&tp, NM_ATT_ADM_STATE)) { - LOGP(DOML, LOGL_ERROR, "Rx CHG ADM STATE: no ADM state attribute\n"); + LOGPFOH(DOML, LOGL_ERROR, foh, "Rx CHG ADM STATE: no ADM state attribute\n"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } @@ -1046,9 +1041,8 @@ /* Step 2: Do some global dependency/consistency checking */ if (mo->nm_state.administrative == adm_state) - LOGP(DOML, LOGL_NOTICE, - "ADM state already was %s\n", - get_value_string(abis_nm_adm_state_names, adm_state)); + LOGPFOH(DOML, LOGL_NOTICE, foh, "ADM state already was %s\n", + get_value_string(abis_nm_adm_state_names, adm_state)); /* Step 3: Ask BTS driver to apply the state chg */ return bts_model_chg_adm_state(bts, mo, obj, adm_state); @@ -1099,10 +1093,10 @@ if (oh->mdisc == ABIS_OM_MDISC_FOM && oh->data[0] == NM_MT_GET_ATTR && msgb_l3len(msg) == oh->length + 3) { /* work-around a bug present in OsmoBSC before February 2019 */ - DEBUGP(DOML, "GET ATTR with off-by-3 length: Fixing up for OS#3799\n"); + DEBUGPFOH(DOML, foh, "GET ATTR with off-by-3 length: Fixing up for OS#3799\n"); oh->length += 3; } else { - LOGP(DOML, LOGL_NOTICE, "OML message with %u extraneous bytes at end: %s\n", + LOGPFOH(DOML, LOGL_NOTICE, foh, "OML message with %u extraneous bytes at end: %s\n", msgb_l3len(msg) - oh->length, msgb_hexdump(msg)); /* remove extra bytes at end */ msgb_l3trim(msg, oh->length); @@ -1307,8 +1301,7 @@ void *obj; int rc; - abis_nm_debugp_foh(DOML, foh); - DEBUGPC(DOML, "Rx IPA SET ATTR\n"); + DEBUGPFOH(DOML, foh, "Rx IPA SET ATTR\n"); rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { @@ -1415,12 +1408,12 @@ ret = oml_tlv_parse(&tp, foh->data, oh->length - sizeof(*foh)); if (ret < 0) { - LOGP(DOML, LOGL_ERROR, "TLV parse error %d\n", ret); + LOGPFOH(DOML, LOGL_ERROR, foh, "TLV parse error %d\n", ret); return oml_fom_ack_nack(msg, NM_NACK_BTSNR_UNKN); } - abis_nm_debugp_foh(DOML, foh); - DEBUGPC(DOML, "Rx IPACCESS(0x%02x): ", foh->msg_type); + /* FIXME: fix missing \n */ + DEBUGPFOH(DOML, foh, "Rx IPACCESS(0x%02x): ", foh->msg_type); switch (foh->msg_type) { case NM_MT_IPACC_RSL_CONNECT: -- To view, visit https://gerrit.osmocom.org/13877 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I9e9d6ccb88c9c9d35b2ce5778fa2580382704089 Gerrit-Change-Number: 13877 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 13:53:24 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 5 May 2019 13:53:24 +0000 Subject: Change in osmo-bts[master]: common/oml.c: use proper format specifier for uint16_t Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13878 Change subject: common/oml.c: use proper format specifier for uint16_t ...................................................................... common/oml.c: use proper format specifier for uint16_t Change-Id: I8f372a689b3c1cc2cf925654b2db44a0f4ee7603 --- M src/common/oml.c 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/78/13878/1 diff --git a/src/common/oml.c b/src/common/oml.c index f288078..baf374a 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -590,8 +590,7 @@ oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_WARN_SW_WARN, "Given ARFCN %u is not supported", arfcn); - /* FIXME: use proper format specifier for uint16_t */ - LOGPFOH(DOML, LOGL_ERROR, foh, "Given ARFCN %d is not supported.\n", arfcn); + LOGPFOH(DOML, LOGL_ERROR, foh, "Given ARFCN %u is not supported.\n", arfcn); return oml_fom_ack_nack(msg, NM_NACK_FREQ_NOTAVAIL); } } -- To view, visit https://gerrit.osmocom.org/13878 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I8f372a689b3c1cc2cf925654b2db44a0f4ee7603 Gerrit-Change-Number: 13878 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 13:53:24 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 5 May 2019 13:53:24 +0000 Subject: Change in osmo-bts[master]: common/oml.c: fix broken debug print in down_mom() Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13879 Change subject: common/oml.c: fix broken debug print in down_mom() ...................................................................... common/oml.c: fix broken debug print in down_mom() Change-Id: Ideac59946d50c6e06052a9590e02cfcfbf23d003 --- M src/common/oml.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/79/13879/1 diff --git a/src/common/oml.c b/src/common/oml.c index baf374a..62dea7b 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -1411,8 +1411,8 @@ return oml_fom_ack_nack(msg, NM_NACK_BTSNR_UNKN); } - /* FIXME: fix missing \n */ - DEBUGPFOH(DOML, foh, "Rx IPACCESS(0x%02x): ", foh->msg_type); + DEBUGPFOH(DOML, foh, "Rx IPACCESS(0x%02x): %s\n", foh->msg_type, + osmo_hexdump(foh->data, oh->length - sizeof(*foh))); switch (foh->msg_type) { case NM_MT_IPACC_RSL_CONNECT: -- To view, visit https://gerrit.osmocom.org/13879 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ideac59946d50c6e06052a9590e02cfcfbf23d003 Gerrit-Change-Number: 13879 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 14:10:26 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 5 May 2019 14:10:26 +0000 Subject: Change in osmo-bts[master]: common/oml.c: introduce and use both LOGPFOH and DEBUGPFOH In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13877 ) Change subject: common/oml.c: introduce and use both LOGPFOH and DEBUGPFOH ...................................................................... Patch Set 1: Cloning into 'libosmocore'... fatal: Could not read from remote repository. -- To view, visit https://gerrit.osmocom.org/13877 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9e9d6ccb88c9c9d35b2ce5778fa2580382704089 Gerrit-Change-Number: 13877 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 05 May 2019 14:10:26 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 15:52:43 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 May 2019 15:52:43 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: mo and mt voice call tests: add lots of missing parts In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13616 ) Change subject: msc: mo and mt voice call tests: add lots of missing parts ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13616 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I162985045bb5e129977a3a797b656e30220990df Gerrit-Change-Number: 13616 Gerrit-PatchSet: 4 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 05 May 2019 15:52:43 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 16:04:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 May 2019 16:04:18 +0000 Subject: Change in libosmocore[master]: BSSMAP: add messages for inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13578 ) Change subject: BSSMAP: add messages for inter-BSC and inter-MSC Handover ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13578 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9dac375331f6bea744769e973725d58e35f87226 Gerrit-Change-Number: 13578 Gerrit-PatchSet: 4 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 05 May 2019 16:04:18 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 16:04:32 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 May 2019 16:04:32 +0000 Subject: Change in libosmocore[master]: BSSMAP: add messages for inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13578 ) Change subject: BSSMAP: add messages for inter-BSC and inter-MSC Handover ...................................................................... BSSMAP: add messages for inter-BSC and inter-MSC Handover Change-Id: I9dac375331f6bea744769e973725d58e35f87226 --- M include/osmocom/gsm/gsm0808.h M src/gsm/gsm0808.c M src/gsm/libosmogsm.map 3 files changed, 241 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h index 0f2bf1f..2f19466 100644 --- a/include/osmocom/gsm/gsm0808.h +++ b/include/osmocom/gsm/gsm0808.h @@ -27,6 +27,7 @@ #include #include #include +#include #include #define BSSMAP_MSG_SIZE 1024 @@ -143,11 +144,76 @@ }; struct msgb *gsm0808_create_handover_required(const struct gsm0808_handover_required *params); +/*! 3GPP TS 48.008 ?3.2.1.37 HANDOVER REQUIRED REJECT */ +struct gsm0808_handover_required_reject { + uint16_t cause; + + /* more items are defined in the spec and may be added later */ + bool more_items; /*< always set this to false */ +}; +struct msgb *gsm0808_create_handover_required_reject(const struct gsm0808_handover_required_reject *params); + +/*! 3GPP TS 48.008 ?3.2.1.8 HANDOVER REQUEST */ +struct gsm0808_handover_request { + struct gsm0808_channel_type channel_type; + struct gsm0808_encrypt_info encryption_information; + struct osmo_gsm48_classmark classmark_information; + struct gsm0808_cell_id cell_identifier_serving; + struct gsm0808_cell_id cell_identifier_target; + enum gsm0808_cause cause; + + bool current_channel_type_1_present; + uint8_t current_channel_type_1; + + enum gsm0808_permitted_speech speech_version_used; + + uint8_t chosen_encryption_algorithm_serving; + + /*! Pass either old_bss_to_new_bss_info or old_bss_to_new_bss_info_raw. */ + bool old_bss_to_new_bss_info_present; + struct gsm0808_old_bss_to_new_bss_info old_bss_to_new_bss_info; + /*! To feed the Old BSS to New BSS Information IE unchanged from the Handover Required message without having to + * decode it. Pass either old_bss_to_new_bss_info or old_bss_to_new_bss_info_raw. Omit the TL part. */ + const uint8_t *old_bss_to_new_bss_info_raw; + uint8_t old_bss_to_new_bss_info_raw_len; + + const char *imsi; + + const struct sockaddr_storage *aoip_transport_layer; + + const struct gsm0808_speech_codec_list *codec_list_msc_preferred; + + bool call_id_present; + uint32_t call_id; + + const uint8_t *global_call_reference; + uint8_t global_call_reference_len; + + /* more items are defined in the spec and may be added later */ + bool more_items; /*!< always set this to false */ +}; +struct msgb *gsm0808_create_handover_request(const struct gsm0808_handover_request *params); + struct msgb *gsm0808_create_handover_request_ack(const uint8_t *l3_info, uint8_t l3_info_len, uint8_t chosen_channel, uint8_t chosen_encr_alg, uint8_t chosen_speech_version); +struct gsm0808_handover_command { + const uint8_t *l3_info; + uint8_t l3_info_len; + + struct gsm0808_cell_id cell_identifier; + + const uint8_t *new_bss_to_old_bss_info_raw; + size_t new_bss_to_old_bss_info_raw_len; + + /* more items are defined in the spec and may be added later */ + bool more_items; /*!< always set this to false */ +}; +struct msgb *gsm0808_create_handover_command(const struct gsm0808_handover_command *params); + struct msgb *gsm0808_create_handover_detect(); +struct msgb *gsm0808_create_handover_succeeded(); struct gsm0808_handover_complete { bool rr_cause_present; diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c index 3307a5d..4406043 100644 --- a/src/gsm/gsm0808.c +++ b/src/gsm/gsm0808.c @@ -857,6 +857,129 @@ return msg; } +/*! Create BSSMAP HANDOVER REQUIRED REJECT message. + * \returns newly allocated msgb with BSSMAP HANDOVER REQUIRED REJECT message. */ +struct msgb *gsm0808_create_handover_required_reject(const struct gsm0808_handover_required_reject *params) +{ + struct msgb *msg; + + msg = msgb_alloc_headroom(BSSMAP_MSG_SIZE, BSSMAP_MSG_HEADROOM, "BSSMAP-HANDOVER-REQUIRED-REJECT"); + if (!msg) + return NULL; + + /* Message Type, 3.2.2.1 */ + msgb_v_put(msg, BSS_MAP_MSG_HANDOVER_REQUIRED_REJECT); + + /* Cause, 3.2.2.5 */ + gsm0808_enc_cause(msg, params->cause); + + /* prepend the header */ + msg->l3h = msgb_tv_push(msg, BSSAP_MSG_BSS_MANAGEMENT, msgb_length(msg)); + + return msg; +} + +/*! Create BSSMAP HANDOVER REQUEST message, 3GPP TS 48.008 3.2.1.8. + * Sent from the MSC to the potential new target cell during inter-BSC handover, or to the target MSC during inter-MSC + * handover. + */ +struct msgb *gsm0808_create_handover_request(const struct gsm0808_handover_request *params) +{ + struct msgb *msg; + + msg = msgb_alloc_headroom(BSSMAP_MSG_SIZE, BSSMAP_MSG_HEADROOM, "BSSMAP-HANDOVER-REQUEST"); + if (!msg) + return NULL; + + /* Message Type, 3.2.2.1 */ + msgb_v_put(msg, BSS_MAP_MSG_HANDOVER_RQST); + + /* Channel Type 3.2.2.11 */ + gsm0808_enc_channel_type(msg, ¶ms->channel_type); + + /* Encryption Information 3.2.2.10 */ + gsm0808_enc_encrypt_info(msg, ¶ms->encryption_information); + + /* Classmark Information 1 3.2.2.30 or Classmark Information 2 3.2.2.19 (Classmark 2 wins) */ + if (params->classmark_information.classmark2_len) { + msgb_tlv_put(msg, GSM0808_IE_CLASSMARK_INFORMATION_T2, + params->classmark_information.classmark2_len, + (const uint8_t*)¶ms->classmark_information.classmark2); + } else if (params->classmark_information.classmark1_set) { + msgb_tlv_put(msg, GSM0808_IE_CLASSMARK_INFORMATION_TYPE_1, + sizeof(params->classmark_information.classmark1), + (const uint8_t*)¶ms->classmark_information.classmark1); + } + /* (Classmark 3 possibly follows below) */ + + /* Cell Identifier (Serving) , 3.2.2.17 */ + gsm0808_enc_cell_id(msg, ¶ms->cell_identifier_serving); + + /* Cell Identifier (Target) , 3.2.2.17 */ + gsm0808_enc_cell_id(msg, ¶ms->cell_identifier_target); + + /* Cause, 3.2.2.5 */ + gsm0808_enc_cause(msg, params->cause); + + /* Classmark Information 3 3.2.2.20 */ + if (params->classmark_information.classmark3_len) { + msgb_tlv_put(msg, GSM0808_IE_CLASSMARK_INFORMATION_T3, + params->classmark_information.classmark3_len, + (const uint8_t*)¶ms->classmark_information.classmark3); + } + + /* Current Channel type 1 3.2.2.49 */ + if (params->current_channel_type_1_present) + msgb_tv_fixed_put(msg, GSM0808_IE_CURRENT_CHANNEL_TYPE_1, 1, ¶ms->current_channel_type_1); + + /* Speech Version (Used), 3.2.2.51 */ + if (params->speech_version_used) { + msgb_tv_put(msg, GSM0808_IE_SPEECH_VERSION, params->speech_version_used); + } + + /* Chosen Encryption Algorithm (Serving) 3.2.2.44 */ + if (params->chosen_encryption_algorithm_serving) + msgb_tv_put(msg, GSM0808_IE_CHOSEN_ENCR_ALG, params->chosen_encryption_algorithm_serving); + + /* Old BSS to New BSS Information 3.2.2.58 */ + if (params->old_bss_to_new_bss_info_raw && params->old_bss_to_new_bss_info_raw_len) { + msgb_tlv_put(msg, GSM0808_IE_OLD_BSS_TO_NEW_BSS_INFORMATION, + params->old_bss_to_new_bss_info_raw_len, + params->old_bss_to_new_bss_info_raw); + } else if (params->old_bss_to_new_bss_info_present) { + put_old_bss_to_new_bss_information(msg, ¶ms->old_bss_to_new_bss_info); + } + + /* IMSI 3.2.2.6 */ + if (params->imsi) { + uint8_t mid_buf[GSM48_MI_SIZE + 2]; + int mid_len = gsm48_generate_mid_from_imsi(mid_buf, params->imsi); + msgb_tlv_put(msg, GSM0808_IE_IMSI, mid_len - 2, mid_buf + 2); + } + + if (params->aoip_transport_layer) + gsm0808_enc_aoip_trasp_addr(msg, params->aoip_transport_layer); + + if (params->codec_list_msc_preferred) + gsm0808_enc_speech_codec_list(msg, params->codec_list_msc_preferred); + + if (params->call_id_present) { + uint8_t val[4]; + osmo_store32le(params->call_id, val); + msgb_tv_fixed_put(msg, GSM0808_IE_CALL_ID, 4, val); + } + + if (params->global_call_reference && params->global_call_reference_len) { + msgb_tlv_put(msg, GSM0808_IE_GLOBAL_CALL_REF, + params->global_call_reference_len, params->global_call_reference); + } + + /* prepend header with final length */ + msg->l3h = msgb_tv_push(msg, BSSAP_MSG_BSS_MANAGEMENT, msgb_length(msg)); + + return msg; +} + /*! Create BSSMAP HANDOVER REQUEST ACKNOWLEDGE message, 3GPP TS 48.008 3.2.1.10. * Sent from the MT BSC back to the MSC when it has allocated an lchan to handover to. * l3_info is the RR Handover Command that the MO BSC sends to the MS to move over. */ @@ -887,6 +1010,35 @@ return msg; } +/*! Create BSSMAP HANDOVER COMMAND message, 3GPP TS 48.008 3.2.1.11. + * Sent from the MSC to the old BSS to transmit the RR Handover Command received from the new BSS. */ +struct msgb *gsm0808_create_handover_command(const struct gsm0808_handover_command *params) +{ + struct msgb *msg; + + msg = msgb_alloc_headroom(BSSMAP_MSG_SIZE, BSSMAP_MSG_HEADROOM, "BSSMAP-HANDOVER-COMMAND"); + if (!msg) + return NULL; + + /* Message Type, 3.2.2.1 */ + msgb_v_put(msg, BSS_MAP_MSG_HANDOVER_CMD); + + msgb_tlv_put(msg, GSM0808_IE_LAYER_3_INFORMATION, params->l3_info_len, params->l3_info); + + if (params->cell_identifier.id_discr != CELL_IDENT_NO_CELL) + gsm0808_enc_cell_id(msg, ¶ms->cell_identifier); + + if (params->new_bss_to_old_bss_info_raw + && params->new_bss_to_old_bss_info_raw_len) + msgb_tlv_put(msg, GSM0808_IE_NEW_BSS_TO_OLD_BSS_INFO, params->new_bss_to_old_bss_info_raw_len, + params->new_bss_to_old_bss_info_raw); + + /* prepend header with final length */ + msg->l3h = msgb_tv_push(msg, BSSAP_MSG_BSS_MANAGEMENT, msgb_length(msg)); + + return msg; +} + /*! Create BSSMAP HANDOVER DETECT message, 3GPP TS 48.008 3.2.1.40. * Sent from the MT BSC back to the MSC when the MS has sent a handover RACH request and the MT BSC has * received the Handover Detect message. */ @@ -907,6 +1059,25 @@ return msg; } +/*! Create BSSMAP HANDOVER SUCCEEDED message, 3GPP TS 48.008 3.2.1.13. + * Sent from the MSC back to the old BSS to notify that the MS has successfully accessed the new BSS. */ +struct msgb *gsm0808_create_handover_succeeded() +{ + struct msgb *msg; + + msg = msgb_alloc_headroom(BSSMAP_MSG_SIZE, BSSMAP_MSG_HEADROOM, "BSSMAP-HANDOVER-DETECT"); + if (!msg) + return NULL; + + /* Message Type, 3.2.2.1 */ + msgb_v_put(msg, BSS_MAP_MSG_HANDOVER_SUCCEEDED); + + /* prepend header with final length */ + msg->l3h = msgb_tv_push(msg, BSSAP_MSG_BSS_MANAGEMENT, msgb_length(msg)); + + return msg; +} + /*! Create BSSMAP HANDOVER COMPLETE message, 3GPP TS 48.008 3.2.1.12. * Sent from the MT BSC back to the MSC when the MS has fully settled into the new lchan. */ struct msgb *gsm0808_create_handover_complete(const struct gsm0808_handover_complete *params) diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 47f3b45..5bb189f 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -184,8 +184,12 @@ gsm0808_create_reset_ack; gsm0808_create_sapi_reject; gsm0808_create_handover_required; +gsm0808_create_handover_required_reject; +gsm0808_create_handover_request; gsm0808_create_handover_request_ack; +gsm0808_create_handover_command; gsm0808_create_handover_detect; +gsm0808_create_handover_succeeded; gsm0808_create_handover_complete; gsm0808_create_handover_failure; gsm0808_create_handover_performed; -- To view, visit https://gerrit.osmocom.org/13578 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I9dac375331f6bea744769e973725d58e35f87226 Gerrit-Change-Number: 13578 Gerrit-PatchSet: 4 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 16:04:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 May 2019 16:04:33 +0000 Subject: Change in libosmocore[master]: add gsm48_decode_bcd_number2() from osmo-msc In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13579 ) Change subject: add gsm48_decode_bcd_number2() from osmo-msc ...................................................................... add gsm48_decode_bcd_number2() from osmo-msc gsm48_decode_bcd_number() is unable to provide proper bounds validation of input and output data, hence osmo-msc's vlr.c introduced a static decode_bcd_number_safe() a long time ago. Move to libosmocore. I need to use the same function to decode an MSISDN during inter-MSC Handover, instead of making it public in osmo-msc, rather deprecate the unsafe function and provide a safer version for all callers. Mark the old one deprecated. Change-Id: Idb6ae6e2f3bea11ad420dae14d021ac36d99e921 --- M include/osmocom/gsm/gsm48_ie.h M src/gsm/gsm48_ie.c M src/gsm/libosmogsm.map 3 files changed, 33 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/include/osmocom/gsm/gsm48_ie.h b/include/osmocom/gsm/gsm48_ie.h index f7cc24e..71050df 100644 --- a/include/osmocom/gsm/gsm48_ie.h +++ b/include/osmocom/gsm/gsm48_ie.h @@ -13,7 +13,11 @@ /* decode a 'called/calling/connect party BCD number' as in 10.5.4.7 */ int gsm48_decode_bcd_number(char *output, int output_len, - const uint8_t *bcd_lv, int h_len); + const uint8_t *bcd_lv, int h_len) + OSMO_DEPRECATED("Use gsm48_decode_bcd_number2() for improved bounds checking"); +int gsm48_decode_bcd_number2(char *output, size_t output_len, + const uint8_t *bcd_lv, size_t input_len, + size_t h_len); /* convert a ASCII phone number to 'called/calling/connect party BCD number' */ int gsm48_encode_bcd_number(uint8_t *bcd_lv, uint8_t max_len, diff --git a/src/gsm/gsm48_ie.c b/src/gsm/gsm48_ie.c index ffe3eba..049f5dc 100644 --- a/src/gsm/gsm48_ie.c +++ b/src/gsm/gsm48_ie.c @@ -46,7 +46,7 @@ '8', '9', '*', '#', 'a', 'b', 'c', '\0' }; -/*! decode a 'called/calling/connect party BCD number' as in 10.5.4.7 +/*! Like gsm48_decode_bcd_number2() but with less airtight bounds checking. * \param[out] Caller-provided output buffer * \param[in] bcd_lv Length-Value portion of to-be-decoded IE * \param[in] h_len Length of an optional heder between L and V portion @@ -76,6 +76,32 @@ return 0; } +/*! Decode a 'called/calling/connect party BCD number' as in 10.5.4.7. + * \param[out] output Caller-provided output buffer. + * \param[in] output_len sizeof(output). + * \param[in] bcd_lv Length-Value part of to-be-decoded IE. + * \param[in] input_len Size of the buffer to read the IE from. + * \param[in] h_len Length of an optional header between L and V parts. + * \return 0 in case of success, negative on error. Errors checked: no or too little input data, no or too little + * output buffer size, IE length exceeds input data size, decoded number exceeds size of the output buffer. The output + * is guaranteed to be nul terminated iff output_len > 0. + */ +int gsm48_decode_bcd_number2(char *output, size_t output_len, + const uint8_t *bcd_lv, size_t input_len, + size_t h_len) +{ + uint8_t len; + if (output_len < 1) + return -ENOSPC; + *output = '\0'; + if (input_len < 1) + return -EIO; + len = bcd_lv[0]; + if (input_len < len) + return -EIO; + return gsm48_decode_bcd_number(output, output_len, bcd_lv, h_len); +} + /*! convert a single ASCII character to call-control BCD */ static int asc_to_bcd(const char asc) { diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 5bb189f..9c5123e 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -312,6 +312,7 @@ gsm48_encode_ra; gsm48_hdr_gmm_cipherable; gsm48_decode_bcd_number; +gsm48_decode_bcd_number2; gsm48_decode_bearer_cap; gsm48_decode_called; gsm48_decode_callerid; -- To view, visit https://gerrit.osmocom.org/13579 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Idb6ae6e2f3bea11ad420dae14d021ac36d99e921 Gerrit-Change-Number: 13579 Gerrit-PatchSet: 4 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 16:04:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 May 2019 16:04:33 +0000 Subject: Change in libosmocore[master]: add osmo_bssap_tlv_parse2() for multiple identical T In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13580 ) Change subject: add osmo_bssap_tlv_parse2() for multiple identical T ...................................................................... add osmo_bssap_tlv_parse2() for multiple identical T In BSSMAP messages, at least the Cell Identifier IE can appear more than once. We have tlv_parse2() which allows decoding into an array of tlv_parsed to cleanly handle multiple occurences. Hence add osmo_bssap_tlv_parse2() which supports multiple occurences. An alternative would be to directly call tlv_parse2() with gsm0808_att_tlvdef() when multiple T occurences are needed, and I'm not really sure why osmo_bssap_tlv_parse() exists in the first place. But because it does, add a similar definition that is capable of handling multiple IEs with identical Tag discriminator. Change-Id: Ib9a2095f7498dc2cda2a57154b2dbe4621df72f8 --- M include/osmocom/gsm/gsm0808.h 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h index 2f19466..5b05dbc 100644 --- a/include/osmocom/gsm/gsm0808.h +++ b/include/osmocom/gsm/gsm0808.h @@ -282,6 +282,9 @@ /*! Parse BSSAP TLV structure using \ref tlv_parse */ #define osmo_bssap_tlv_parse(dec, buf, len) tlv_parse(dec, gsm0808_att_tlvdef(), buf, len, 0, 0) +/*! Parse BSSAP TLV structure using \ref tlv_parse2 */ +#define osmo_bssap_tlv_parse2(dec, dec_multiples, buf, len) \ + tlv_parse2(dec, dec_multiples, gsm0808_att_tlvdef(), buf, len, 0, 0) const char *gsm0808_bssmap_name(uint8_t msg_type); const char *gsm0808_bssap_name(uint8_t msg_type); -- To view, visit https://gerrit.osmocom.org/13580 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ib9a2095f7498dc2cda2a57154b2dbe4621df72f8 Gerrit-Change-Number: 13580 Gerrit-PatchSet: 4 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 16:04:34 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 May 2019 16:04:34 +0000 Subject: Change in libosmocore[master]: add vty_is_active() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13581 ) Change subject: add vty_is_active() ...................................................................... add vty_is_active() For async callbacks it is useful to determine whether a given VTY pointer is still valid. For example, in osmo-msc, a silent call can be triggered by VTY, which causes a Paging. The paging_cb then writes to the VTY console that the silent call has succeeded. Unless the telnet vty session has already ended, in which case osmo-msc crashes; e.g. from an osmo_interact_vty.py command invocation. With this function, osmo-msc can ask whether the vty pointer passed to the paging callback is still active, and skip vty_out() if not. Change-Id: I42cf2af47283dd42c101faae0fac293c3a68d599 --- M include/osmocom/vty/vty.h M src/vty/telnet_interface.c 2 files changed, 12 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved diff --git a/include/osmocom/vty/vty.h b/include/osmocom/vty/vty.h index 8d2e1b3..03a2924 100644 --- a/include/osmocom/vty/vty.h +++ b/include/osmocom/vty/vty.h @@ -2,6 +2,7 @@ #include #include +#include #include @@ -192,6 +193,7 @@ void vty_reset (void); struct vty *vty_new (void); struct vty *vty_create (int vty_sock, void *priv); +bool vty_is_active(struct vty *vty); int vty_out (struct vty *, const char *, ...) VTY_PRINTF_ATTRIBUTE(2, 3); int vty_out_va(struct vty *vty, const char *format, va_list ap); int vty_out_newline(struct vty *); diff --git a/src/vty/telnet_interface.c b/src/vty/telnet_interface.c index dc23b12..a1fc999 100644 --- a/src/vty/telnet_interface.c +++ b/src/vty/telnet_interface.c @@ -197,6 +197,16 @@ return 0; } +bool vty_is_active(struct vty *vty) +{ + struct telnet_connection *connection; + llist_for_each_entry(connection, &active_connections, entry) { + if (connection->vty == vty) + return true; + } + return false; +} + /*! callback from core VTY code about VTY related events */ void vty_event(enum event event, int sock, struct vty *vty) { -- To view, visit https://gerrit.osmocom.org/13581 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I42cf2af47283dd42c101faae0fac293c3a68d599 Gerrit-Change-Number: 13581 Gerrit-PatchSet: 4 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 16:04:34 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 May 2019 16:04:34 +0000 Subject: Change in libosmocore[master]: add comment to gsm_mncc_bearer_cap.speech_ver In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13814 ) Change subject: add comment to gsm_mncc_bearer_cap.speech_ver ...................................................................... add comment to gsm_mncc_bearer_cap.speech_ver Change-Id: Ib657b1eb55aab400f3682a89bbd428bdee02581c --- M include/osmocom/gsm/mncc.h 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/include/osmocom/gsm/mncc.h b/include/osmocom/gsm/mncc.h index 7e7d12c..e5e9607 100644 --- a/include/osmocom/gsm/mncc.h +++ b/include/osmocom/gsm/mncc.h @@ -15,7 +15,7 @@ int coding; /* Coding Standard */ int radio; /* Radio Channel Requirement */ int speech_ctm; /* CTM text telephony indication */ - int speech_ver[8]; /* Speech version indication */ + int speech_ver[8]; /* Speech version indication, see enum gsm48_bcap_speech_ver; -1 marks end */ struct { enum gsm48_bcap_ra rate_adaption; enum gsm48_bcap_sig_access sig_access; -- To view, visit https://gerrit.osmocom.org/13814 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ib657b1eb55aab400f3682a89bbd428bdee02581c Gerrit-Change-Number: 13814 Gerrit-PatchSet: 2 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 16:05:04 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 5 May 2019 16:05:04 +0000 Subject: Change in docker-playground[master]: gr-gsm-master/Dockerfile: use the official archlinux/base image Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13880 Change subject: gr-gsm-master/Dockerfile: use the official archlinux/base image ...................................................................... gr-gsm-master/Dockerfile: use the official archlinux/base image According to [1], the image 'base/archlinux' has been deprecated. It's recommended to use the official ArchLinux docker image [2]. [1] https://hub.docker.com/r/base/archlinux [2] https://hub.docker.com/r/archlinux/base Change-Id: I7e5d57662e9d8ca2b5037c24427ce1c44de15813 --- M gr-gsm-master/Dockerfile 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/80/13880/1 diff --git a/gr-gsm-master/Dockerfile b/gr-gsm-master/Dockerfile index 1a8a225..03cf427 100644 --- a/gr-gsm-master/Dockerfile +++ b/gr-gsm-master/Dockerfile @@ -1,4 +1,4 @@ -FROM base/archlinux +FROM archlinux/base MAINTAINER Vadim Yanitskiy -- To view, visit https://gerrit.osmocom.org/13880 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I7e5d57662e9d8ca2b5037c24427ce1c44de15813 Gerrit-Change-Number: 13880 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 16:06:36 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 5 May 2019 16:06:36 +0000 Subject: Change in docker-playground[master]: gr-gsm-master/Dockerfile: use the official archlinux/base image In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13880 ) Change subject: gr-gsm-master/Dockerfile: use the official archlinux/base image ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13880 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I7e5d57662e9d8ca2b5037c24427ce1c44de15813 Gerrit-Change-Number: 13880 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Piotr Krysik Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 05 May 2019 16:06:36 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 16:10:52 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 5 May 2019 16:10:52 +0000 Subject: Change in docker-playground[master]: gr-gsm-master/Dockerfile: use the official archlinux/base image In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13880 ) Change subject: gr-gsm-master/Dockerfile: use the official archlinux/base image ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/13880 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I7e5d57662e9d8ca2b5037c24427ce1c44de15813 Gerrit-Change-Number: 13880 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Piotr Krysik Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 05 May 2019 16:10:52 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 16:11:06 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 5 May 2019 16:11:06 +0000 Subject: Change in docker-playground[master]: gr-gsm-master/Dockerfile: use the official archlinux/base image In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/13880 ) Change subject: gr-gsm-master/Dockerfile: use the official archlinux/base image ...................................................................... gr-gsm-master/Dockerfile: use the official archlinux/base image According to [1], the image 'base/archlinux' has been deprecated. It's recommended to use the official ArchLinux docker image [2]. [1] https://hub.docker.com/r/base/archlinux [2] https://hub.docker.com/r/archlinux/base Change-Id: I7e5d57662e9d8ca2b5037c24427ce1c44de15813 --- M gr-gsm-master/Dockerfile 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Vadim Yanitskiy: Looks good to me, approved; Verified diff --git a/gr-gsm-master/Dockerfile b/gr-gsm-master/Dockerfile index 1a8a225..03cf427 100644 --- a/gr-gsm-master/Dockerfile +++ b/gr-gsm-master/Dockerfile @@ -1,4 +1,4 @@ -FROM base/archlinux +FROM archlinux/base MAINTAINER Vadim Yanitskiy -- To view, visit https://gerrit.osmocom.org/13880 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I7e5d57662e9d8ca2b5037c24427ce1c44de15813 Gerrit-Change-Number: 13880 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Piotr Krysik Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 16:16:00 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sun, 5 May 2019 16:16:00 +0000 Subject: Change in libosmocore[master]: Deprecate usage of osmo_counter_* In-Reply-To: References: Message-ID: lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/13808 ) Change subject: Deprecate usage of osmo_counter_* ...................................................................... Patch Set 3: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/13808/3/include/osmocom/core/counter.h File include/osmocom/core/counter.h: https://gerrit.osmocom.org/#/c/13808/3/include/osmocom/core/counter.h at 19 PS3, Line 19: OSMO_DEPRECATED("Implement as osmo_stat_item instead") is the attribute correctly assigned to the osmo_counter_dec here? -- To view, visit https://gerrit.osmocom.org/13808 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If67f64c6ec7a3f3114c962df9db50107d9ea86e2 Gerrit-Change-Number: 13808 Gerrit-PatchSet: 3 Gerrit-Owner: Daniel Willmann Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Sun, 05 May 2019 16:16:00 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 16:23:12 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 May 2019 16:23:12 +0000 Subject: Change in libosmocore[master]: gsm48_decode_bcd_number2(): fix input len check In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13815 ) Change subject: gsm48_decode_bcd_number2(): fix input len check ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13815 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I87599641325c04aae2be224ec350b1a145039528 Gerrit-Change-Number: 13815 Gerrit-PatchSet: 2 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 05 May 2019 16:23:12 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 16:23:42 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 May 2019 16:23:42 +0000 Subject: Change in libosmocore[master]: gsm48_decode_bcd_number2(): fix input len check In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13815 ) Change subject: gsm48_decode_bcd_number2(): fix input len check ...................................................................... gsm48_decode_bcd_number2(): fix input len check The input_len argument for gsm48_decode_bcd_number2() includes the BCD length *and* the length byte itself, so add the missing +1. Also clarify the API doc for the input_len argument. Change-Id: I87599641325c04aae2be224ec350b1a145039528 --- M src/gsm/gsm48_ie.c 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gsm/gsm48_ie.c b/src/gsm/gsm48_ie.c index 049f5dc..0e5f253 100644 --- a/src/gsm/gsm48_ie.c +++ b/src/gsm/gsm48_ie.c @@ -80,7 +80,7 @@ * \param[out] output Caller-provided output buffer. * \param[in] output_len sizeof(output). * \param[in] bcd_lv Length-Value part of to-be-decoded IE. - * \param[in] input_len Size of the buffer to read the IE from. + * \param[in] input_len Size of the bcd_lv buffer for bounds checking. * \param[in] h_len Length of an optional header between L and V parts. * \return 0 in case of success, negative on error. Errors checked: no or too little input data, no or too little * output buffer size, IE length exceeds input data size, decoded number exceeds size of the output buffer. The output @@ -97,7 +97,8 @@ if (input_len < 1) return -EIO; len = bcd_lv[0]; - if (input_len < len) + /* len + 1: the BCD length plus the length byte itself must fit in the input buffer. */ + if (input_len < len + 1) return -EIO; return gsm48_decode_bcd_number(output, output_len, bcd_lv, h_len); } -- To view, visit https://gerrit.osmocom.org/13815 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I87599641325c04aae2be224ec350b1a145039528 Gerrit-Change-Number: 13815 Gerrit-PatchSet: 3 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 16:23:42 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 May 2019 16:23:42 +0000 Subject: Change in libosmocore[master]: gsm48_decode_bcd_number2(): allow avoiding deprecation In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13816 ) Change subject: gsm48_decode_bcd_number2(): allow avoiding deprecation ...................................................................... gsm48_decode_bcd_number2(): allow avoiding deprecation gsm48_decode_bcd_number() is marked as deprecated, so gsm48_decode_bcd_number2() will cause deprecation warnings as long as it calls gsm48_decode_bcd_number(). Hence move the code to gsm48_decode_bcd_number2(). Change-Id: I81925e9afb3451de9b8a268d482f79ee20ca14d6 --- M src/gsm/gsm48_ie.c 1 file changed, 29 insertions(+), 27 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gsm/gsm48_ie.c b/src/gsm/gsm48_ie.c index 0e5f253..ca6489a 100644 --- a/src/gsm/gsm48_ie.c +++ b/src/gsm/gsm48_ie.c @@ -55,7 +55,36 @@ const uint8_t *bcd_lv, int h_len) { uint8_t in_len = bcd_lv[0]; + /* Just assume the input buffer is big enough for the length byte and the following data, so pass in_len + 1 for + * the input buffer size. */ + return gsm48_decode_bcd_number2(output, output_len, bcd_lv, in_len + 1, h_len); +} + +/*! Decode a 'called/calling/connect party BCD number' as in 10.5.4.7. + * \param[out] output Caller-provided output buffer. + * \param[in] output_len sizeof(output). + * \param[in] bcd_lv Length-Value part of to-be-decoded IE. + * \param[in] input_len Size of the bcd_lv buffer for bounds checking. + * \param[in] h_len Length of an optional header between L and V parts. + * \return 0 in case of success, negative on error. Errors checked: no or too little input data, no or too little + * output buffer size, IE length exceeds input data size, decoded number exceeds size of the output buffer. The output + * is guaranteed to be nul terminated iff output_len > 0. + */ +int gsm48_decode_bcd_number2(char *output, size_t output_len, + const uint8_t *bcd_lv, size_t input_len, + size_t h_len) +{ + uint8_t in_len; int i; + if (output_len < 1) + return -ENOSPC; + *output = '\0'; + if (input_len < 1) + return -EIO; + in_len = bcd_lv[0]; + /* len + 1: the BCD length plus the length byte itself must fit in the input buffer. */ + if (input_len < in_len + 1) + return -EIO; for (i = 1 + h_len; i <= in_len; i++) { /* lower nibble */ @@ -76,33 +105,6 @@ return 0; } -/*! Decode a 'called/calling/connect party BCD number' as in 10.5.4.7. - * \param[out] output Caller-provided output buffer. - * \param[in] output_len sizeof(output). - * \param[in] bcd_lv Length-Value part of to-be-decoded IE. - * \param[in] input_len Size of the bcd_lv buffer for bounds checking. - * \param[in] h_len Length of an optional header between L and V parts. - * \return 0 in case of success, negative on error. Errors checked: no or too little input data, no or too little - * output buffer size, IE length exceeds input data size, decoded number exceeds size of the output buffer. The output - * is guaranteed to be nul terminated iff output_len > 0. - */ -int gsm48_decode_bcd_number2(char *output, size_t output_len, - const uint8_t *bcd_lv, size_t input_len, - size_t h_len) -{ - uint8_t len; - if (output_len < 1) - return -ENOSPC; - *output = '\0'; - if (input_len < 1) - return -EIO; - len = bcd_lv[0]; - /* len + 1: the BCD length plus the length byte itself must fit in the input buffer. */ - if (input_len < len + 1) - return -EIO; - return gsm48_decode_bcd_number(output, output_len, bcd_lv, h_len); -} - /*! convert a single ASCII character to call-control BCD */ static int asc_to_bcd(const char asc) { -- To view, visit https://gerrit.osmocom.org/13816 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I81925e9afb3451de9b8a268d482f79ee20ca14d6 Gerrit-Change-Number: 13816 Gerrit-PatchSet: 3 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 16:23:43 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 May 2019 16:23:43 +0000 Subject: Change in libosmocore[master]: osmo_gsup_decode(): properly check IMSI, avoid deprecation In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13817 ) Change subject: osmo_gsup_decode(): properly check IMSI, avoid deprecation ...................................................................... osmo_gsup_decode(): properly check IMSI, avoid deprecation In osmo_gsup_decode(), call gsm48_decode_bcd_number2() to avoid deprecation warning, and also actually check the return value to detect invalid IMSI IEs. Change-Id: Iaded84d91baad5386c8f353c283b6b9e40a43b05 --- M src/gsm/gsup.c 1 file changed, 5 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/gsm/gsup.c b/src/gsm/gsup.c index a3d9eef..2e6690e 100644 --- a/src/gsm/gsup.c +++ b/src/gsm/gsup.c @@ -332,9 +332,11 @@ * before the value part already contains this length so we can use it * here. */ - OSMO_ASSERT(value[-1] == value_len); - gsm48_decode_bcd_number(gsup_msg->imsi, sizeof(gsup_msg->imsi), - value - 1, 0); + if (gsm48_decode_bcd_number2(gsup_msg->imsi, sizeof(gsup_msg->imsi), + value - 1, value_len + 1, 0)) { + LOGP(DLGSUP, LOGL_ERROR, "Cannot decode IMSI\n"); + return -GMM_CAUSE_INV_MAND_INFO; + } /* specific parts */ while (data_len > 0) { -- To view, visit https://gerrit.osmocom.org/13817 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iaded84d91baad5386c8f353c283b6b9e40a43b05 Gerrit-Change-Number: 13817 Gerrit-PatchSet: 3 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 16:25:27 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 May 2019 16:25:27 +0000 Subject: Change in libosmocore[master]: add gsm0808_create_handover_request_ack2 to add AoIP RTP addr In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13259 ) Change subject: add gsm0808_create_handover_request_ack2 to add AoIP RTP addr ...................................................................... Patch Set 12: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13259 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia71542ea37d4fd2c9fb9b40357db7aeb111ec576 Gerrit-Change-Number: 13259 Gerrit-PatchSet: 12 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Comment-Date: Sun, 05 May 2019 16:25:27 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 16:25:29 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 May 2019 16:25:29 +0000 Subject: Change in libosmocore[master]: add gsm0808_create_handover_request_ack2 to add AoIP RTP addr In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13259 ) Change subject: add gsm0808_create_handover_request_ack2 to add AoIP RTP addr ...................................................................... add gsm0808_create_handover_request_ack2 to add AoIP RTP addr osmo-bsc so far omits the AoIP Transport Layer Address from its Handover Request Acknowledge message, which breaks inter-BSC Handover for AoIP. Allow fixing that. One quirk I really don't like about this: I would prefer to directly use struct sockaddr_storage as a member of the struct gsm0808_handover_request_ack. Even though struct sockaddr_storage appears in various function signatures, the gsm0808.c actually also gets built on embedded systems that lack arpa/inet.h (for me indicated by the ARM build job on jenkins). Compiling gsm0808.c works only because the actual coding of struct sockaddr_storage is implemented in gsm0808_util.c, which (apparently) does not get built on embedded and hence, even though there are undefined references to e.g. gsm0808_enc_aoip_trasp_addr() it works. Related: I4a5acdb2d4a0b947cc0c62067a67be88a3d467ff (osmo-bsc) Change-Id: Ia71542ea37d4fd2c9fb9b40357db7aeb111ec576 --- M include/osmocom/gsm/gsm0808.h M src/gsm/gsm0808.c M src/gsm/libosmogsm.map 3 files changed, 60 insertions(+), 12 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h index 5b05dbc..93195b5 100644 --- a/include/osmocom/gsm/gsm0808.h +++ b/include/osmocom/gsm/gsm0808.h @@ -194,9 +194,29 @@ }; struct msgb *gsm0808_create_handover_request(const struct gsm0808_handover_request *params); -struct msgb *gsm0808_create_handover_request_ack(const uint8_t *l3_info, uint8_t l3_info_len, - uint8_t chosen_channel, uint8_t chosen_encr_alg, - uint8_t chosen_speech_version); +struct gsm0808_handover_request_ack { + const uint8_t *l3_info; + uint8_t l3_info_len; + + bool chosen_channel_present; + uint8_t chosen_channel; + + /*! For A5/N set chosen_encr_alg = N+1, e.g. chosen_encr_alg = 1 means A5/0 (no encryption), 2 means A5/1, 4 + * means A5/3. Set chosen_encr_alg = 0 to omit the Chosen Encryption Algorithm IE. */ + uint8_t chosen_encr_alg; + + /* chosen_speech_version == 0 omits the IE */ + enum gsm0808_permitted_speech chosen_speech_version; + + bool speech_codec_chosen_present; + struct gsm0808_speech_codec speech_codec_chosen; + + const struct sockaddr_storage *aoip_transport_layer; + + /* more items are defined in the spec and may be added later */ + bool more_items; /*!< always set this to false */ +}; +struct msgb *gsm0808_create_handover_request_ack2(const struct gsm0808_handover_request_ack *params); struct gsm0808_handover_command { const uint8_t *l3_info; diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c index 4406043..3c77c77 100644 --- a/src/gsm/gsm0808.c +++ b/src/gsm/gsm0808.c @@ -983,9 +983,7 @@ /*! Create BSSMAP HANDOVER REQUEST ACKNOWLEDGE message, 3GPP TS 48.008 3.2.1.10. * Sent from the MT BSC back to the MSC when it has allocated an lchan to handover to. * l3_info is the RR Handover Command that the MO BSC sends to the MS to move over. */ -struct msgb *gsm0808_create_handover_request_ack(const uint8_t *l3_info, uint8_t l3_info_len, - uint8_t chosen_channel, uint8_t chosen_encr_alg, - uint8_t chosen_speech_version) +struct msgb *gsm0808_create_handover_request_ack2(const struct gsm0808_handover_request_ack *params) { struct msgb *msg; @@ -996,13 +994,25 @@ /* Message Type, 3.2.2.1 */ msgb_v_put(msg, BSS_MAP_MSG_HANDOVER_RQST_ACKNOWLEDGE); - /* Layer 3 Information, 3.2.2.24 */ - msgb_tlv_put(msg, GSM0808_IE_LAYER_3_INFORMATION, l3_info_len, l3_info); + /* Layer 3 Information, 3.2.2.24 -- it is actually mandatory, but rather compose a nonstandard message than + * segfault or return NULL without a log message. */ + if (params->l3_info && params->l3_info_len) + msgb_tlv_put(msg, GSM0808_IE_LAYER_3_INFORMATION, params->l3_info_len, params->l3_info); - msgb_tv_put(msg, GSM0808_IE_CHOSEN_CHANNEL, chosen_channel); - msgb_tv_put(msg, GSM0808_IE_CHOSEN_ENCR_ALG, chosen_encr_alg); - if (chosen_speech_version != 0) - msgb_tv_put(msg, GSM0808_IE_SPEECH_VERSION, chosen_speech_version); + if (params->chosen_channel_present) + msgb_tv_put(msg, GSM0808_IE_CHOSEN_CHANNEL, params->chosen_channel); + if (params->chosen_encr_alg) + msgb_tv_put(msg, GSM0808_IE_CHOSEN_ENCR_ALG, params->chosen_encr_alg); + + if (params->chosen_speech_version != 0) + msgb_tv_put(msg, GSM0808_IE_SPEECH_VERSION, params->chosen_speech_version); + + if (params->aoip_transport_layer) + gsm0808_enc_aoip_trasp_addr(msg, params->aoip_transport_layer); + + /* AoIP: Speech Codec (Chosen) 3.2.2.104 */ + if (params->speech_codec_chosen_present) + gsm0808_enc_speech_codec(msg, ¶ms->speech_codec_chosen); /* prepend header with final length */ msg->l3h = msgb_tv_push(msg, BSSAP_MSG_BSS_MANAGEMENT, msgb_length(msg)); @@ -1010,6 +1020,23 @@ return msg; } +/*! Same as gsm0808_create_handover_request_ack2() but with less parameters. + * In particular, this lacks the AoIP Transport Layer address. */ +struct msgb *gsm0808_create_handover_request_ack(const uint8_t *l3_info, uint8_t l3_info_len, + uint8_t chosen_channel, uint8_t chosen_encr_alg, + uint8_t chosen_speech_version) +{ + struct gsm0808_handover_request_ack params = { + .l3_info = l3_info, + .l3_info_len = l3_info_len, + .chosen_channel = chosen_channel, + .chosen_encr_alg = chosen_encr_alg, + .chosen_speech_version = chosen_speech_version, + }; + + return gsm0808_create_handover_request_ack2(¶ms); +} + /*! Create BSSMAP HANDOVER COMMAND message, 3GPP TS 48.008 3.2.1.11. * Sent from the MSC to the old BSS to transmit the RR Handover Command received from the new BSS. */ struct msgb *gsm0808_create_handover_command(const struct gsm0808_handover_command *params) diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 9c5123e..adfa096 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -187,6 +187,7 @@ gsm0808_create_handover_required_reject; gsm0808_create_handover_request; gsm0808_create_handover_request_ack; +gsm0808_create_handover_request_ack2; gsm0808_create_handover_command; gsm0808_create_handover_detect; gsm0808_create_handover_succeeded; -- To view, visit https://gerrit.osmocom.org/13259 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ia71542ea37d4fd2c9fb9b40357db7aeb111ec576 Gerrit-Change-Number: 13259 Gerrit-PatchSet: 13 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 16:26:04 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 May 2019 16:26:04 +0000 Subject: Change in osmo-bsc[master]: fix inter-BSC-HO-incoming for AoIP (1/2) In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13797 ) Change subject: fix inter-BSC-HO-incoming for AoIP (1/2) ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13797 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I00c18b78573386145af71c4b39f7f22aec24579b Gerrit-Change-Number: 13797 Gerrit-PatchSet: 3 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 05 May 2019 16:26:04 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 16:26:31 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 May 2019 16:26:31 +0000 Subject: Change in osmo-bsc[master]: fix inter-BSC-HO-incoming for AoIP (2/2) In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13585 ) Change subject: fix inter-BSC-HO-incoming for AoIP (2/2) ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13585 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia05e37da125eb6e7b7be9b974b73261bd72de1f4 Gerrit-Change-Number: 13585 Gerrit-PatchSet: 4 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 05 May 2019 16:26:31 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 16:26:54 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 May 2019 16:26:54 +0000 Subject: Change in osmo-bts[master]: common/oml.c: introduce and use both LOGPFOH and DEBUGPFOH In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13877 ) Change subject: common/oml.c: introduce and use both LOGPFOH and DEBUGPFOH ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13877 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9e9d6ccb88c9c9d35b2ce5778fa2580382704089 Gerrit-Change-Number: 13877 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 05 May 2019 16:26:54 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 16:27:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 May 2019 16:27:05 +0000 Subject: Change in osmo-bts[master]: common/oml.c: use proper format specifier for uint16_t In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13878 ) Change subject: common/oml.c: use proper format specifier for uint16_t ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13878 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8f372a689b3c1cc2cf925654b2db44a0f4ee7603 Gerrit-Change-Number: 13878 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 05 May 2019 16:27:05 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 16:27:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 May 2019 16:27:18 +0000 Subject: Change in osmo-bts[master]: common/oml.c: fix broken debug print in down_mom() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13879 ) Change subject: common/oml.c: fix broken debug print in down_mom() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13879 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ideac59946d50c6e06052a9590e02cfcfbf23d003 Gerrit-Change-Number: 13879 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 05 May 2019 16:27:18 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 16:27:20 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 5 May 2019 16:27:20 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: mo and mt voice call tests: add lots of missing parts In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13616 ) Change subject: msc: mo and mt voice call tests: add lots of missing parts ...................................................................... Patch Set 4: Code-Review-1 (4 comments) https://gerrit.osmocom.org/#/c/13616/4/msc/BSC_ConnectionHandler.ttcn File msc/BSC_ConnectionHandler.ttcn: https://gerrit.osmocom.org/#/c/13616/4/msc/BSC_ConnectionHandler.ttcn at 486 PS4, Line 486: log("f_mt_call_complete 1"); Is there any way to make such messages more informative than '1', '2', ...? For example, I would love to see something like: "BSC_ConnectionHandler.ttcn:$LINE | f_mt_call_complete(): established BSSMAP connection" https://gerrit.osmocom.org/#/c/13616/4/msc/BSC_ConnectionHandler.ttcn at 494 PS4, Line 494: log("f_mt_call_complete 2"); Same here, e.g.: "BSC_ConnectionHandler.ttcn:$LINE | f_mt_call_complete(): Received (MS -> MSC) ALERTING" https://gerrit.osmocom.org/#/c/13616/4/msc/BSC_ConnectionHandler.ttcn at 503 PS4, Line 503: log("f_mt_call_complete 3"); Same here, e.g.: "BSC_ConnectionHandler.ttcn:$LINE | f_mt_call_complete(): Received first MGCP CRCX (for BSS/RAN side)" https://gerrit.osmocom.org/#/c/13616/4/msc/BSC_ConnectionHandler.ttcn at 542 PS4, Line 542: ws -- To view, visit https://gerrit.osmocom.org/13616 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I162985045bb5e129977a3a797b656e30220990df Gerrit-Change-Number: 13616 Gerrit-PatchSet: 4 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 05 May 2019 16:27:20 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 16:27:21 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 May 2019 16:27:21 +0000 Subject: Change in osmo-bts[master]: common/oml.c: introduce and use both LOGPFOH and DEBUGPFOH In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13877 ) Change subject: common/oml.c: introduce and use both LOGPFOH and DEBUGPFOH ...................................................................... common/oml.c: introduce and use both LOGPFOH and DEBUGPFOH Change-Id: I9e9d6ccb88c9c9d35b2ce5778fa2580382704089 --- M src/common/oml.c 1 file changed, 44 insertions(+), 51 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/common/oml.c b/src/common/oml.c index de7a0e7..f288078 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -49,6 +49,9 @@ #include #include +#define LOGPFOH(ss, lvl, foh, fmt, args ...) LOGP(ss, lvl, "%s: " fmt, abis_nm_dump_foh(foh), ## args) +#define DEBUGPFOH(ss, foh, fmt, args ...) LOGPFOH(ss, LOGL_DEBUG, foh, fmt, ## args) + static int oml_ipa_set_attr(struct gsm_bts *bts, struct msgb *msg); static struct tlv_definition abis_nm_att_tlvdef_ipa_local = {}; @@ -534,14 +537,12 @@ if (!foh || !bts) return -EINVAL; - abis_nm_debugp_foh(DOML, foh); - DEBUGPC(DOML, "Rx GET ATTR\n"); + DEBUGPFOH(DOML, foh, "Rx GET ATTR\n"); /* Determine which OML object is addressed */ mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst); if (!mo) { - LOGP(DOML, LOGL_ERROR, "%s Get Attributes for unknown Object Instance\n", - abis_nm_dump_foh(foh)); + LOGPFOH(DOML, LOGL_ERROR, foh, "Get Attributes for unknown Object Instance\n"); return oml_fom_ack_nack(msg, NM_NACK_OBJINST_UNKN); } @@ -558,7 +559,7 @@ rc = oml_tx_attr_resp(mo, TLVP_VAL(&tp, NM_ATT_LIST_REQ_ATTR), TLVP_LEN(&tp, NM_ATT_LIST_REQ_ATTR)); if (rc < 0) { - LOGP(DOML, LOGL_ERROR, "responding to O&M Get Attributes message with NACK 0%x\n", -rc); + LOGPFOH(DOML, LOGL_ERROR, foh, "Responding to O&M Get Attributes message with NACK 0%x\n", -rc); return oml_fom_ack_nack(msg, -rc); } @@ -573,8 +574,7 @@ int rc, i; const uint8_t *payload; - abis_nm_debugp_foh(DOML, foh); - DEBUGPC(DOML, "Rx SET BTS ATTR\n"); + DEBUGPFOH(DOML, foh, "Rx SET BTS ATTR\n"); rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { @@ -590,7 +590,8 @@ oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_WARN_SW_WARN, "Given ARFCN %u is not supported", arfcn); - LOGP(DOML, LOGL_NOTICE, "Given ARFCN %d is not supported.\n", arfcn); + /* FIXME: use proper format specifier for uint16_t */ + LOGPFOH(DOML, LOGL_ERROR, foh, "Given ARFCN %d is not supported.\n", arfcn); return oml_fom_ack_nack(msg, NM_NACK_FREQ_NOTAVAIL); } } @@ -637,8 +638,8 @@ switch (val[0]) { case 0xFF: /* Osmocom specific Extension of TS 12.21 */ - LOGP(DOML, LOGL_NOTICE, "WARNING: Radio Link Timeout " - "explicitly disabled, only use this for lab testing!\n"); + LOGPFOH(DOML, LOGL_NOTICE, foh, "WARNING: Radio Link Timeout " + "explicitly disabled, only use this for lab testing!\n"); bts->radio_link_timeout = -1; break; case 0x01: /* Based on uplink SACCH (radio link timeout) */ @@ -650,7 +651,7 @@ /* fall-through */ case 0x02: /* Based on RXLEV/RXQUAL measurements */ default: - LOGP(DOML, LOGL_NOTICE, "Given Conn. Failure Criterion " + LOGPFOH(DOML, LOGL_NOTICE, foh, "Given Conn. Failure Criterion " "not supported. Please use criterion 0x01 with " "RADIO_LINK_TIMEOUT value of 4..64\n"); return oml_fom_ack_nack(msg, NM_NACK_PARAM_RANGE); @@ -664,15 +665,15 @@ uint32_t t200_ms = payload[i] * abis_nm_t200_ms[i]; #if 0 bts->t200_ms[i] = t200_ms; - DEBUGP(DOML, "T200[%u]: OML=%u, mult=%u => %u ms\n", - i, payload[i], abis_nm_t200_mult[i], - bts->t200_ms[i]); + DEBUGPFOH(DOML, foh, "T200[%u]: OML=%u, mult=%u => %u ms\n", + i, payload[i], abis_nm_t200_mult[i], + bts->t200_ms[i]); #else /* we'd rather use the 1s/2s (long) defaults by * libosmocore, as we appear to have some bug(s) * related to handling T200 expiration in * libosmogsm lapd(m) code? */ - LOGP(DOML, LOGL_NOTICE, "Ignoring T200[%u] (%u ms) " + LOGPFOH(DOML, LOGL_NOTICE, foh, "Ignoring T200[%u] (%u ms) " "as sent by BSC due to suspected LAPDm bug!\n", i, t200_ms); #endif @@ -713,8 +714,7 @@ if (TLVP_PRES_LEN(&tp, NM_ATT_BTS_AIR_TIMER, 1)) { uint8_t t3105 = *TLVP_VAL(&tp, NM_ATT_BTS_AIR_TIMER); if (t3105 == 0) { - LOGP(DOML, LOGL_NOTICE, - "T3105 must have a value != 0.\n"); + LOGPFOH(DOML, LOGL_NOTICE, foh, "T3105 must have a value != 0.\n"); return oml_fom_ack_nack(msg, NM_NACK_PARAM_RANGE); } bts->t3105_ms = t3105 * 10; @@ -743,8 +743,7 @@ struct tlv_parsed tp, *tp_merged; int rc; - abis_nm_debugp_foh(DOML, foh); - DEBUGPC(DOML, "Rx SET RADIO CARRIER ATTR\n"); + DEBUGPFOH(DOML, foh, "Rx SET RADIO CARRIER ATTR\n"); rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { @@ -774,8 +773,8 @@ /* 9.4.47 RF Max Power Reduction */ if (TLVP_PRES_LEN(&tp, NM_ATT_RF_MAXPOWR_R, 1)) { trx->max_power_red = *TLVP_VAL(&tp, NM_ATT_RF_MAXPOWR_R) * 2; - LOGP(DOML, LOGL_INFO, "Set RF Max Power Reduction = %d dBm\n", - trx->max_power_red); + LOGPFOH(DOML, LOGL_INFO, foh, "Set RF Max Power Reduction to " + "%d dBm\n", trx->max_power_red); } /* 9.4.5 ARFCN List */ #if 0 @@ -792,7 +791,7 @@ if (arfcn > 1024) return oml_fom_ack_nack(msg, NM_NACK_FREQ_NOTAVAIL); trx->arfcn_list[i] = arfcn; - LOGP(DOML, LOGL_INFO, " ARFCN list = %d\n", trx->arfcn_list[i]); + LOGPFOH(DOML, LOGL_INFO, foh, " ARFCN list = %d\n", trx->arfcn_list[i]); } trx->arfcn_num = length; } else @@ -804,7 +803,7 @@ uint16_t length = TLVP_LEN(&tp, NM_ATT_ARFCN_LIST); uint16_t arfcn; if (length != 2) { - LOGP(DOML, LOGL_ERROR, "Expecting only one ARFCN, " + LOGPFOH(DOML, LOGL_ERROR, foh, "Expecting only one ARFCN, " "because hopping not supported\n"); return oml_fom_ack_nack(msg, NM_NACK_MSGINCONSIST_PHYSCFG); } @@ -816,8 +815,7 @@ OSMO_EVT_WARN_SW_WARN, "Given ARFCN %u is unsupported", arfcn); - LOGP(DOML, LOGL_NOTICE, - "Given ARFCN %u is unsupported.\n", arfcn); + LOGPFOH(DOML, LOGL_NOTICE, foh, "Given ARFCN %u is unsupported.\n", arfcn); return oml_fom_ack_nack(msg, NM_NACK_FREQ_NOTAVAIL); } trx->arfcn = arfcn; @@ -915,8 +913,7 @@ struct tlv_parsed tp, *tp_merged; int rc; - abis_nm_debugp_foh(DOML, foh); - DEBUGPC(DOML, "Rx SET CHAN ATTR\n"); + DEBUGPFOH(DOML, foh, "Rx SET CHAN ATTR\n"); rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { @@ -929,13 +926,13 @@ /* 9.4.21 HSN... */ /* 9.4.27 MAIO */ if (TLVP_PRESENT(&tp, NM_ATT_HSN) || TLVP_PRESENT(&tp, NM_ATT_MAIO)) { - LOGP(DOML, LOGL_NOTICE, "SET CHAN ATTR: Frequency hopping not supported.\n"); + LOGPFOH(DOML, LOGL_NOTICE, foh, "SET CHAN ATTR: Frequency hopping not supported.\n"); return oml_fom_ack_nack(msg, NM_NACK_SPEC_IMPL_NOTSUPP); } /* 9.4.52 Starting Time */ if (TLVP_PRESENT(&tp, NM_ATT_START_TIME)) { - LOGP(DOML, LOGL_NOTICE, "SET CHAN ATTR: Starting time not supported.\n"); + LOGPFOH(DOML, LOGL_NOTICE, foh, "SET CHAN ATTR: Starting time not supported.\n"); return oml_fom_ack_nack(msg, NM_NACK_SPEC_IMPL_NOTSUPP); } @@ -946,7 +943,7 @@ /* Call into BTS driver to check attribute values */ rc = bts_model_check_oml(bts, foh->msg_type, ts->mo.nm_attr, tp_merged, ts); if (rc < 0) { - LOGP(DOML, LOGL_ERROR, "SET CHAN ATTR: invalid attribute value, rc=%d\n", rc); + LOGPFOH(DOML, LOGL_ERROR, foh, "SET CHAN ATTR: invalid attribute value, rc=%d\n", rc); talloc_free(tp_merged); /* Send NACK */ return oml_fom_ack_nack(msg, -rc); @@ -962,9 +959,9 @@ ts->pchan = abis_nm_pchan4chcomb(comb); rc = conf_lchans(ts); if (rc < 0) { - LOGP(DOML, LOGL_ERROR, "SET CHAN ATTR: invalid Chan Comb 0x%x" - " (pchan=%s, conf_lchans()->%d)\n", - comb, gsm_pchan_name(ts->pchan), rc); + LOGPFOH(DOML, LOGL_ERROR, foh, "SET CHAN ATTR: invalid Chan Comb 0x%x" + " (pchan=%s, conf_lchans()->%d)\n", + comb, gsm_pchan_name(ts->pchan), rc); talloc_free(tp_merged); /* Send NACK */ return oml_fom_ack_nack(msg, -rc); @@ -980,7 +977,7 @@ /* If there is no TSC specified, use the BCC */ ts->tsc = BSIC2BCC(bts->bsic); } - LOGP(DOML, LOGL_INFO, "%s SET CHAN ATTR (TSC=%u pchan=%s)\n", + LOGPFOH(DOML, LOGL_INFO, foh, "%s SET CHAN ATTR (TSC=%u pchan=%s)\n", gsm_abis_mo_name(&ts->mo), ts->tsc, gsm_pchan_name(ts->pchan)); /* call into BTS driver to apply new attributes to hardware */ @@ -994,8 +991,7 @@ struct gsm_abis_mo *mo; void *obj; - abis_nm_debugp_foh(DOML, foh); - DEBUGPC(DOML, "Rx OPSTART\n"); + DEBUGPFOH(DOML, foh, "Rx OPSTART\n"); /* Step 1: Resolve MO by obj_class/obj_inst */ mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst); @@ -1005,7 +1001,7 @@ /* Step 2: Do some global dependency/consistency checking */ if (mo->nm_state.operational == NM_OPSTATE_ENABLED) { - DEBUGP(DOML, "... automatic ACK, OP state already was Enabled\n"); + DEBUGPFOH(DOML, foh, "... automatic ACK, OP state already was Enabled\n"); return oml_mo_opstart_ack(mo); } @@ -1022,17 +1018,16 @@ void *obj; int rc; - abis_nm_debugp_foh(DOML, foh); - DEBUGPC(DOML, "Rx CHG ADM STATE\n"); + DEBUGPFOH(DOML, foh, "Rx CHG ADM STATE\n"); rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { - LOGP(DOML, LOGL_ERROR, "Rx CHG ADM STATE: error during TLV parse\n"); + LOGPFOH(DOML, LOGL_ERROR, foh, "Rx CHG ADM STATE: error during TLV parse\n"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } if (!TLVP_PRESENT(&tp, NM_ATT_ADM_STATE)) { - LOGP(DOML, LOGL_ERROR, "Rx CHG ADM STATE: no ADM state attribute\n"); + LOGPFOH(DOML, LOGL_ERROR, foh, "Rx CHG ADM STATE: no ADM state attribute\n"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } @@ -1046,9 +1041,8 @@ /* Step 2: Do some global dependency/consistency checking */ if (mo->nm_state.administrative == adm_state) - LOGP(DOML, LOGL_NOTICE, - "ADM state already was %s\n", - get_value_string(abis_nm_adm_state_names, adm_state)); + LOGPFOH(DOML, LOGL_NOTICE, foh, "ADM state already was %s\n", + get_value_string(abis_nm_adm_state_names, adm_state)); /* Step 3: Ask BTS driver to apply the state chg */ return bts_model_chg_adm_state(bts, mo, obj, adm_state); @@ -1099,10 +1093,10 @@ if (oh->mdisc == ABIS_OM_MDISC_FOM && oh->data[0] == NM_MT_GET_ATTR && msgb_l3len(msg) == oh->length + 3) { /* work-around a bug present in OsmoBSC before February 2019 */ - DEBUGP(DOML, "GET ATTR with off-by-3 length: Fixing up for OS#3799\n"); + DEBUGPFOH(DOML, foh, "GET ATTR with off-by-3 length: Fixing up for OS#3799\n"); oh->length += 3; } else { - LOGP(DOML, LOGL_NOTICE, "OML message with %u extraneous bytes at end: %s\n", + LOGPFOH(DOML, LOGL_NOTICE, foh, "OML message with %u extraneous bytes at end: %s\n", msgb_l3len(msg) - oh->length, msgb_hexdump(msg)); /* remove extra bytes at end */ msgb_l3trim(msg, oh->length); @@ -1307,8 +1301,7 @@ void *obj; int rc; - abis_nm_debugp_foh(DOML, foh); - DEBUGPC(DOML, "Rx IPA SET ATTR\n"); + DEBUGPFOH(DOML, foh, "Rx IPA SET ATTR\n"); rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { @@ -1415,12 +1408,12 @@ ret = oml_tlv_parse(&tp, foh->data, oh->length - sizeof(*foh)); if (ret < 0) { - LOGP(DOML, LOGL_ERROR, "TLV parse error %d\n", ret); + LOGPFOH(DOML, LOGL_ERROR, foh, "TLV parse error %d\n", ret); return oml_fom_ack_nack(msg, NM_NACK_BTSNR_UNKN); } - abis_nm_debugp_foh(DOML, foh); - DEBUGPC(DOML, "Rx IPACCESS(0x%02x): ", foh->msg_type); + /* FIXME: fix missing \n */ + DEBUGPFOH(DOML, foh, "Rx IPACCESS(0x%02x): ", foh->msg_type); switch (foh->msg_type) { case NM_MT_IPACC_RSL_CONNECT: -- To view, visit https://gerrit.osmocom.org/13877 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I9e9d6ccb88c9c9d35b2ce5778fa2580382704089 Gerrit-Change-Number: 13877 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 16:27:22 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 May 2019 16:27:22 +0000 Subject: Change in osmo-bts[master]: common/oml.c: use proper format specifier for uint16_t In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13878 ) Change subject: common/oml.c: use proper format specifier for uint16_t ...................................................................... common/oml.c: use proper format specifier for uint16_t Change-Id: I8f372a689b3c1cc2cf925654b2db44a0f4ee7603 --- M src/common/oml.c 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/common/oml.c b/src/common/oml.c index f288078..baf374a 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -590,8 +590,7 @@ oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_WARN_SW_WARN, "Given ARFCN %u is not supported", arfcn); - /* FIXME: use proper format specifier for uint16_t */ - LOGPFOH(DOML, LOGL_ERROR, foh, "Given ARFCN %d is not supported.\n", arfcn); + LOGPFOH(DOML, LOGL_ERROR, foh, "Given ARFCN %u is not supported.\n", arfcn); return oml_fom_ack_nack(msg, NM_NACK_FREQ_NOTAVAIL); } } -- To view, visit https://gerrit.osmocom.org/13878 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I8f372a689b3c1cc2cf925654b2db44a0f4ee7603 Gerrit-Change-Number: 13878 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 5 16:27:22 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 5 May 2019 16:27:22 +0000 Subject: Change in osmo-bts[master]: common/oml.c: fix broken debug print in down_mom() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13879 ) Change subject: common/oml.c: fix broken debug print in down_mom() ...................................................................... common/oml.c: fix broken debug print in down_mom() Change-Id: Ideac59946d50c6e06052a9590e02cfcfbf23d003 --- M src/common/oml.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/common/oml.c b/src/common/oml.c index baf374a..62dea7b 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -1411,8 +1411,8 @@ return oml_fom_ack_nack(msg, NM_NACK_BTSNR_UNKN); } - /* FIXME: fix missing \n */ - DEBUGPFOH(DOML, foh, "Rx IPACCESS(0x%02x): ", foh->msg_type); + DEBUGPFOH(DOML, foh, "Rx IPACCESS(0x%02x): %s\n", foh->msg_type, + osmo_hexdump(foh->data, oh->length - sizeof(*foh))); switch (foh->msg_type) { case NM_MT_IPACC_RSL_CONNECT: -- To view, visit https://gerrit.osmocom.org/13879 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ideac59946d50c6e06052a9590e02cfcfbf23d003 Gerrit-Change-Number: 13879 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 01:19:50 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 6 May 2019 01:19:50 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13137 to look at the new patch set (#7). Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... large refactoring: support inter-BSC and inter-MSC Handover 3GPP TS 49.008 '4.3 Roles of MSC-A, MSC-I and MSC-T' defines distinct roles: - MSC-A is responsible for managing subscribers, - MSC-I is the gateway to the RAN. - MSC-T is a second transitory gateway to another RAN during Handover. After inter-MSC Handover, the MSC-I is handled by a remote MSC instance, while the original MSC-A retains the responsibility of subscriber management. MSC-T exists in this patch but is not yet used, since Handover is only prepared for, not yet implemented. Facilitate Inter-MSC and inter-BSC Handover by the same internal split of MSC roles. Compared to inter-MSC Handover, mere inter-BSC has the obvious simplifications: - all of MSC-A, MSC-I and MSC-T roles will be served by the same osmo-msc instance, - messages between MSC-A and MSC-{I,T} don't need to be routed via E-interface (GSUP), - no call routing between MSC-A and -I via MNCC necessary. This is the largest code bomb I have submitted, ever. Out of principle, I apologize to everyone trying to read this as a whole. Unfortunately, I see no sense in trying to split this patch into smaller bits. It would be a huge amount of work to introduce these changes in separate chunks, especially if each should in turn be useful and pass all test suites. So, unfortunately, we are stuck with this code bomb. The following are some details and rationale for this rather huge refactoring: * separate MSC subscriber management from ran_conn struct ran_conn is reduced from the pivotal subscriber management entity it has been so far to a mere storage for an SCCP connection ID and an MSC subscriber reference. The new pivotal subscriber management entity is struct msc_a -- struct msub lists the msc_a, msc_i, msc_t roles, the vast majority of code paths however use msc_a, since MSC-A is where all the interesting stuff happens. Before handover, msc_i is an FSM implementation that encodes to the local ran_conn. After inter-MSC Handover, msc_i is a compatible but different FSM implementation that instead forwards via/from GSUP. Same goes for the msc_a struct: if osmo-msc is the MSC-I "RAN proxy" for a remote MSC-A role, the msc_a->fi is an FSM implementation that merely forwards via/from GSUP. * New SCCP implementation for RAN access To be able to forward BSSAP and RANAP messages via the GSUP interface, the individual message layers need to be cleanly separated. The IuCS implementation used until now (iu_client from libosmo-ranap) did not provide this level of separation, and needed a complete rewrite. It was trivial to implement this in such a way that both BSSAP and RANAP can be handled by the same SCCP code, hence the new SCCP-RAN layer also replaces BSSAP handling. sccp_ran.h: struct sccp_ran_inst provides an abstract handler for incoming RAN connections. A set of callback functions provides implementation specific details. * RAN Abstraction (BSSAP vs. RANAP) The common SCCP implementation did set the theme for the remaining refactoring: make all other MSC code paths entirely RAN-implementation-agnostic. ran_infra.c provides data structures that list RAN implementation specifics, from logging to RAN de-/encoding to SCCP callbacks and timers. A ran_infra pointer hence allows complete abstraction of RAN implementations: - managing connected RAN peers (BSC, RNC) in ran_peer.c, - classifying and de-/encoding RAN PDUs, - recording connected LACs and cell IDs and sending out Paging requests to matching RAN peers. * RAN RESET now also for RANAP ran_peer.c absorbs the reset_fsm from a_reset.c; in consequence, RANAP also supports proper RESET semantics now. Hence osmo-hnbgw now also needs to provide proper RESET handling, which it so far duly ignores. (TODO) * RAN de-/encoding abstraction The RAN abstraction mentioned above serves not only to separate RANAP and BSSAP implementations transparently, but also to be able to optionally handle RAN on distinct levels. Before Handover, all RAN messages are handled by the MSC-A role. However, after an inter-MSC Handover, a standalone MSC-I will need to decode RAN PDUs, at least in order to manage Assignment of RTP streams between BSS/RNC and MNCC call forwarding. ran_msg.h provides a common API with abstraction for: - receiving events from RAN, i.e. passing RAN decode from the BSC/RNC and MS/UE: struct ran_dec_msg represents RAN messages decoded from either BSSMAP or RANAP; - sending RAN events: ran_enc_msg is the counterpart to compose RAN messages that should be encoded to either BSSMAP or RANAP and passed down to the BSC/RNC and MS/UE. The RAN-specific implementations are completely contained by ran_msg_a.c and ran_msg_iu.c. In particular, Assignment and Ciphering have so far been distinct code paths for BSSAP and RANAP, with switch(via_ran){...} statements all over the place. Using RAN_DEC_* and RAN_ENC_* abstractions, these are now completely unified. Note that SGs does not qualify for RAN abstraction: the SGs interface always remains with the MSC-A role, and SGs messages follow quite distinct semantics from the fairly similar GERAN and UTRAN. * MGW and RTP stream management So far, managing MGW endpoints via MGCP was tightly glued in-between GSM-04.08-CC on the one and MNCC on the other side. Prepare for switching RTP streams between different RAN peers by moving to object-oriented implementations: implement struct call_leg and struct rtp_stream with distinct FSMs each. For MGW communication, use the osmo_mgcpc_ep API that has originated from osmo-bsc and recently moved to libosmo-mgcp-client for this purpose. Instead of implementing a sequence of events with code duplication for the RAN and CN sides, the idea is to manage each RTP stream separately by firing and receiving events as soon as codecs and RTP ports are negotiated, and letting the individual FSMs take care of the MGW management "asynchronously". The caller provides event IDs and an FSM instance that should be notified of RTP stream setup progress. Hence it becomes possible to reconnect RTP streams from one GSM-04.08-CC to another (inter-BSC Handover) or between CC and MNCC RTP peers (inter-MSC Handover) without duplicating the MGCP code for each transition. The number of FSM implementations used for MGCP handling may seem a bit of an overkill. But in fact, the number of perspectives on RTP forwarding are far from trivial: - an MGW endpoint is an entity with N connections, and MGCP "sessions" for configuring them by talking to the MGW; - an RTP stream is a remote peer connected to one of the endpoint's connections, which is asynchronously notified of codec and RTP port choices; - a call leg is the higher level view on either an MT or MO side of a voice call, a combination of two RTP streams to forward between two remote peers. BSC MGW PBX CI CI [MGW-endpoint] [--rtp_stream--] [--rtp_stream--] [----------------call_leg----------------] * Use counts Introduce using the new osmo_use_count API added to libosmocore for this purpose. Each use token has a distinct name in the logging, which can be a globally constant name or ad-hoc, like the local __func__ string constant. Use in the new struct msc_a, as well as change vlr_subscr to the new osmo_use_count API. * FSM Timeouts Introduce using the new osmo_tdef API, which provides a common VTY implementation for all timer numbers, and FSM state transitions with the correct timeout. Originated in osmo-bsc, recently moved to libosmocore. Depends: Ife31e6798b4e728a23913179e346552a7dd338c0 (libosmocore) Ib9af67b100c4583342a2103669732dab2e577b04 (libosmocore) Id617265337f09dfb6ddfe111ef5e578cd3dc9f63 (libosmocore) Ie9e2add7bbfae651c04e230d62e37cebeb91b0f5 (libosmo-sccp) I26be5c4b06a680f25f19797407ab56a5a4880ddc (osmo-mgw) Ida0e59f9a1f2dd18efea0a51680a67b69f141efa (osmo-mgw) I9a3effd38e72841529df6c135c077116981dea36 (osmo-mgw) Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd --- M configure.ac A doc/sequence_charts/Makefile.am A doc/sequence_charts/inter_bsc_ho.msc A doc/sequence_charts/inter_msc_ho.msc A doc/sequence_charts/mncc_fsm.msc M include/osmocom/msc/Makefile.am D include/osmocom/msc/a_iface.h D include/osmocom/msc/a_iface_bssap.h D include/osmocom/msc/a_reset.h A include/osmocom/msc/call_leg.h A include/osmocom/msc/cell_id_list.h A include/osmocom/msc/e_link.h M include/osmocom/msc/gsm_04_08.h M include/osmocom/msc/gsm_04_11.h M include/osmocom/msc/gsm_04_11_gsup.h M include/osmocom/msc/gsm_04_14.h M include/osmocom/msc/gsm_04_80.h M include/osmocom/msc/gsm_09_11.h M include/osmocom/msc/gsm_data.h M include/osmocom/msc/gsm_data_shared.h M include/osmocom/msc/gsm_subscriber.h A include/osmocom/msc/gsup_client_mux.h D include/osmocom/msc/iu_dummy.h D include/osmocom/msc/iucs.h D include/osmocom/msc/iucs_ranap.h M include/osmocom/msc/mncc.h A include/osmocom/msc/mncc_call.h A include/osmocom/msc/msc_a.h A include/osmocom/msc/msc_a_remote.h M include/osmocom/msc/msc_common.h A include/osmocom/msc/msc_ho.h A include/osmocom/msc/msc_i.h A include/osmocom/msc/msc_i_remote.h D include/osmocom/msc/msc_ifaces.h D include/osmocom/msc/msc_mgcp.h A include/osmocom/msc/msc_roles.h A include/osmocom/msc/msc_t.h A include/osmocom/msc/msc_t_remote.h A include/osmocom/msc/msub.h A include/osmocom/msc/neighbor_ident.h A include/osmocom/msc/paging.h M include/osmocom/msc/ran_conn.h A include/osmocom/msc/ran_infra.h A include/osmocom/msc/ran_msg.h A include/osmocom/msc/ran_msg_a.h A include/osmocom/msc/ran_msg_iu.h A include/osmocom/msc/ran_peer.h A include/osmocom/msc/rtp_stream.h A include/osmocom/msc/sccp_ran.h M include/osmocom/msc/sgs_iface.h M include/osmocom/msc/signal.h M include/osmocom/msc/silent_call.h M include/osmocom/msc/sms_queue.h M include/osmocom/msc/transaction.h M include/osmocom/msc/vlr.h M include/osmocom/msc/vlr_sgs.h M src/libmsc/Makefile.am D src/libmsc/a_iface.c D src/libmsc/a_iface_bssap.c D src/libmsc/a_reset.c A src/libmsc/call_leg.c A src/libmsc/cell_id_list.c A src/libmsc/e_link.c M src/libmsc/gsm_04_08.c M src/libmsc/gsm_04_08_cc.c M src/libmsc/gsm_04_11.c M src/libmsc/gsm_04_11_gsup.c M src/libmsc/gsm_04_14.c M src/libmsc/gsm_04_80.c M src/libmsc/gsm_09_11.c D src/libmsc/gsm_subscriber.c A src/libmsc/gsup_client_mux.c D src/libmsc/iu_dummy.c D src/libmsc/iucs.c D src/libmsc/iucs_ranap.c M src/libmsc/mncc.c M src/libmsc/mncc_builtin.c A src/libmsc/mncc_call.c M src/libmsc/mncc_sock.c A src/libmsc/msc_a.c A src/libmsc/msc_a_remote.c A src/libmsc/msc_ho.c A src/libmsc/msc_i.c A src/libmsc/msc_i_remote.c D src/libmsc/msc_ifaces.c D src/libmsc/msc_mgcp.c A src/libmsc/msc_net_init.c A src/libmsc/msc_t.c A src/libmsc/msc_t_remote.c M src/libmsc/msc_vty.c A src/libmsc/msub.c A src/libmsc/neighbor_ident.c A src/libmsc/neighbor_ident_vty.c D src/libmsc/osmo_msc.c A src/libmsc/paging.c M src/libmsc/ran_conn.c A src/libmsc/ran_infra.c A src/libmsc/ran_msg.c A src/libmsc/ran_msg_a.c A src/libmsc/ran_msg_iu.c A src/libmsc/ran_peer.c A src/libmsc/ran_up_l2.c M src/libmsc/rrlp.c A src/libmsc/rtp_stream.c A src/libmsc/sccp_ran.c M src/libmsc/sgs_iface.c M src/libmsc/sgs_server.c M src/libmsc/silent_call.c M src/libmsc/smpp_openbsc.c M src/libmsc/smpp_smsc.h M src/libmsc/sms_queue.c M src/libmsc/transaction.c M src/libvlr/vlr.c M src/libvlr/vlr_access_req_fsm.c M src/libvlr/vlr_lu_fsm.c M src/libvlr/vlr_sgs.c M src/libvlr/vlr_sgs_fsm.c M src/osmo-msc/Makefile.am M src/osmo-msc/msc_main.c M tests/Makefile.am M tests/msc_vlr/Makefile.am M tests/msc_vlr/msc_vlr_test_authen_reuse.c M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_test_gsm_authen.c M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.c M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.c M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.c M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.c M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.c M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_ss.c M tests/msc_vlr/msc_vlr_test_ss.err M tests/msc_vlr/msc_vlr_test_umts_authen.c M tests/msc_vlr/msc_vlr_test_umts_authen.err M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h M tests/sms_queue/Makefile.am M tests/sms_queue/sms_queue_test.c A tests/test_neighbor_ident.vty M tests/test_nodes.vty 151 files changed, 35,651 insertions(+), 22,989 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/13137/7 -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 7 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-CC: Harald Welte Gerrit-CC: Pau Espin Pedrol Gerrit-CC: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 01:19:52 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 6 May 2019 01:19:52 +0000 Subject: Change in osmo-msc[master]: gsm_04_11: use gsm48_decode_bcd_number2(), evaluate rc Message-ID: Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/13881 Change subject: gsm_04_11: use gsm48_decode_bcd_number2(), evaluate rc ...................................................................... gsm_04_11: use gsm48_decode_bcd_number2(), evaluate rc Avoid deprecation warning: use gsm48_decode_bcd_number2() instead of gsm48_decode_bcd_number(). Validate the return value and add error handling. Change-Id: Ibef71c46d72d2d43123e68f73e5ed554a69243d8 --- M src/libmsc/gsm_04_11.c 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/81/13881/1 diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c index 8cbed3e..577a13a 100644 --- a/src/libmsc/gsm_04_11.c +++ b/src/libmsc/gsm_04_11.c @@ -508,8 +508,12 @@ gsms->dst.ton = (address_lv[1] >> 4) & 7; gsms->dst.npi = address_lv[1] & 0xF; /* convert to real number */ - gsm48_decode_bcd_number(gsms->dst.addr, - sizeof(gsms->dst.addr), address_lv, 1); + if (gsm48_decode_bcd_number2(gsms->dst.addr, + sizeof(gsms->dst.addr), address_lv, da_len_bytes, 1)) { + LOG_TRANS(trans, LOGL_ERROR, "Failed to decode destination Address\n"); + rc = GSM411_RP_CAUSE_SEMANT_INC_MSG; + goto out; + } smsp += da_len_bytes; gsms->protocol_id = *smsp++; -- To view, visit https://gerrit.osmocom.org/13881 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ibef71c46d72d2d43123e68f73e5ed554a69243d8 Gerrit-Change-Number: 13881 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 01:20:48 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 6 May 2019 01:20:48 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: mo and mt voice call tests: add lots of missing parts In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13616 to look at the new patch set (#5). Change subject: msc: mo and mt voice call tests: add lots of missing parts ...................................................................... msc: mo and mt voice call tests: add lots of missing parts Both f_mo_call_establish() and f_mt_call_establish() were testing barely half a voice call setup. For example, f_mo_call_establish() used to be satisfied with just two CRCX, but no actual RTP connections being made. Add numerous MNCC and MGCP messages more closely resembling an actual call. The main reason is to achieve a state that passes both current osmo-msc master as well as the upcoming inter-MSC Handover refactoring. Add log markers to f_*_call_*(): often when a test halts, it is not at all clear why. With these log markers it is saner to figure out what has happened and what hasn't. Change-Id: I162985045bb5e129977a3a797b656e30220990df --- M library/L3_Templates.ttcn M library/MGCP_Templates.ttcn M library/MNCC_Types.ttcn M library/RAN_Emulation.ttcnpp M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn 6 files changed, 243 insertions(+), 93 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/16/13616/5 -- To view, visit https://gerrit.osmocom.org/13616 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I162985045bb5e129977a3a797b656e30220990df Gerrit-Change-Number: 13616 Gerrit-PatchSet: 5 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Mon May 6 02:46:18 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 06 May 2019 02:46:18 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5ccfa014bfad1_3a5cdc5f8958235@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_8.0/i586 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 100s] msg = gsm0808_create_handover_request_ack(rr_ho_command->data, rr_ho_command->len, [ 100s] ^ [ 100s] cc1: some warnings being treated as errors [ 100s] Makefile:609: recipe for target 'osmo_bsc_bssap.o' failed [ 100s] make[4]: *** [osmo_bsc_bssap.o] Error 1 [ 100s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/osmo-bsc' [ 100s] Makefile:393: recipe for target 'all-recursive' failed [ 100s] make[3]: *** [all-recursive] Error 1 [ 100s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 100s] Makefile:436: recipe for target 'all-recursive' failed [ 100s] make[2]: *** [all-recursive] Error 1 [ 100s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 100s] Makefile:367: recipe for target 'all' failed [ 100s] make[1]: *** [all] Error 2 [ 100s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 100s] dh_auto_build: make -j1 returned exit code 2 [ 100s] debian/rules:45: recipe for target 'build' failed [ 100s] make: *** [build] Error 2 [ 100s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 100s] [ 100s] lamb22 failed "build osmo-bsc_1.4.0.63.aa824.dsc" at Mon May 6 02:46:06 UTC 2019. [ 100s] [ 100s] ### VM INTERACTION START ### [ 101s] Powering off. [ 102s] [ 90.333594] reboot: Power down [ 102s] ### VM INTERACTION END ### [ 102s] [ 102s] lamb22 failed "build osmo-bsc_1.4.0.63.aa824.dsc" at Mon May 6 02:46:08 UTC 2019. [ 102s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon May 6 02:48:52 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 06 May 2019 02:48:52 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5ccfa0ad78ced_3a5cdc5f89584f8@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 78s] msg = gsm0808_create_handover_request_ack(rr_ho_command->data, rr_ho_command->len, [ 78s] ^ [ 78s] cc1: some warnings being treated as errors [ 78s] Makefile:609: recipe for target 'osmo_bsc_bssap.o' failed [ 78s] make[4]: *** [osmo_bsc_bssap.o] Error 1 [ 78s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/osmo-bsc' [ 78s] Makefile:393: recipe for target 'all-recursive' failed [ 78s] make[3]: *** [all-recursive] Error 1 [ 78s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 78s] Makefile:436: recipe for target 'all-recursive' failed [ 78s] make[2]: *** [all-recursive] Error 1 [ 78s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 78s] Makefile:367: recipe for target 'all' failed [ 78s] make[1]: *** [all] Error 2 [ 78s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 78s] dh_auto_build: make -j1 returned exit code 2 [ 78s] debian/rules:45: recipe for target 'build' failed [ 78s] make: *** [build] Error 2 [ 78s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 78s] [ 78s] sheep83 failed "build osmo-bsc_1.4.0.63.aa824.dsc" at Mon May 6 02:48:44 UTC 2019. [ 78s] [ 78s] ### VM INTERACTION START ### [ 79s] Powering off. [ 79s] [ 71.199734] reboot: Power down [ 79s] ### VM INTERACTION END ### [ 79s] [ 79s] sheep83 failed "build osmo-bsc_1.4.0.63.aa824.dsc" at Mon May 6 02:48:46 UTC 2019. [ 79s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon May 6 02:48:52 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 06 May 2019 02:48:52 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_17.10/i586 In-Reply-To: References: Message-ID: <5ccfa0ad35178_3a5cdc5f8958363@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.10/i586 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_17.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 107s] msg = gsm0808_create_handover_request_ack(rr_ho_command->data, rr_ho_command->len, [ 107s] ^ [ 107s] cc1: some warnings being treated as errors [ 107s] Makefile:620: recipe for target 'osmo_bsc_bssap.o' failed [ 107s] make[4]: *** [osmo_bsc_bssap.o] Error 1 [ 107s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/osmo-bsc' [ 107s] Makefile:405: recipe for target 'all-recursive' failed [ 107s] make[3]: *** [all-recursive] Error 1 [ 107s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 107s] Makefile:448: recipe for target 'all-recursive' failed [ 107s] make[2]: *** [all-recursive] Error 1 [ 107s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 107s] Makefile:380: recipe for target 'all' failed [ 107s] make[1]: *** [all] Error 2 [ 107s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 107s] dh_auto_build: make -j1 returned exit code 2 [ 107s] debian/rules:45: recipe for target 'build' failed [ 107s] make: *** [build] Error 2 [ 107s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 107s] [ 107s] lamb04 failed "build osmo-bsc_1.4.0.63.aa824.dsc" at Mon May 6 02:48:41 UTC 2019. [ 107s] [ 107s] ### VM INTERACTION START ### [ 110s] [ 99.567921] sysrq: SysRq : Power Off [ 111s] [ 99.576173] reboot: Power down [ 111s] ### VM INTERACTION END ### [ 111s] [ 111s] lamb04 failed "build osmo-bsc_1.4.0.63.aa824.dsc" at Mon May 6 02:48:45 UTC 2019. [ 111s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon May 6 02:49:26 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 06 May 2019 02:49:26 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/i586 In-Reply-To: References: Message-ID: <5ccfa0cc24ac7_3a5cdc5f89585e9@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/i586 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 88s] msg = gsm0808_create_handover_request_ack(rr_ho_command->data, rr_ho_command->len, [ 88s] ^ [ 88s] cc1: some warnings being treated as errors [ 88s] Makefile:620: recipe for target 'osmo_bsc_bssap.o' failed [ 88s] make[4]: *** [osmo_bsc_bssap.o] Error 1 [ 88s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/osmo-bsc' [ 88s] Makefile:405: recipe for target 'all-recursive' failed [ 88s] make[3]: *** [all-recursive] Error 1 [ 88s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 88s] Makefile:448: recipe for target 'all-recursive' failed [ 88s] make[2]: *** [all-recursive] Error 1 [ 88s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 88s] Makefile:380: recipe for target 'all' failed [ 88s] make[1]: *** [all] Error 2 [ 88s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 88s] dh_auto_build: make -j1 returned exit code 2 [ 88s] debian/rules:45: recipe for target 'build' failed [ 88s] make: *** [build] Error 2 [ 88s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 88s] [ 88s] sheep82 failed "build osmo-bsc_1.4.0.63.aa824.dsc" at Mon May 6 02:49:07 UTC 2019. [ 88s] [ 88s] ### VM INTERACTION START ### [ 91s] [ 82.076537] sysrq: SysRq : Power Off [ 91s] [ 82.082980] reboot: Power down [ 91s] ### VM INTERACTION END ### [ 91s] [ 91s] sheep82 failed "build osmo-bsc_1.4.0.63.aa824.dsc" at Mon May 6 02:49:10 UTC 2019. [ 91s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon May 6 02:49:44 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 06 May 2019 02:49:44 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_17.10/x86_64 In-Reply-To: References: Message-ID: <5ccfa0cc88e80_3a5cdc5f89586d@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.10/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_17.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 101s] msg = gsm0808_create_handover_request_ack(rr_ho_command->data, rr_ho_command->len, [ 101s] ^ [ 102s] cc1: some warnings being treated as errors [ 102s] Makefile:620: recipe for target 'osmo_bsc_bssap.o' failed [ 102s] make[4]: *** [osmo_bsc_bssap.o] Error 1 [ 102s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/osmo-bsc' [ 102s] Makefile:405: recipe for target 'all-recursive' failed [ 102s] make[3]: *** [all-recursive] Error 1 [ 102s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 102s] Makefile:448: recipe for target 'all-recursive' failed [ 102s] make[2]: *** [all-recursive] Error 1 [ 102s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 102s] Makefile:380: recipe for target 'all' failed [ 102s] make[1]: *** [all] Error 2 [ 102s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 102s] dh_auto_build: make -j1 returned exit code 2 [ 102s] debian/rules:45: recipe for target 'build' failed [ 102s] make: *** [build] Error 2 [ 102s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 102s] [ 102s] lamb57 failed "build osmo-bsc_1.4.0.63.aa824.dsc" at Mon May 6 02:49:35 UTC 2019. [ 102s] [ 102s] ### VM INTERACTION START ### [ 105s] [ 94.571632] sysrq: SysRq : Power Off [ 105s] [ 94.580472] reboot: Power down [ 105s] ### VM INTERACTION END ### [ 105s] [ 105s] lamb57 failed "build osmo-bsc_1.4.0.63.aa824.dsc" at Mon May 6 02:49:38 UTC 2019. [ 105s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon May 6 02:51:09 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 06 May 2019 02:51:09 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <5ccfa12297798_3a5cdc5f8958753@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 106s] msg = gsm0808_create_handover_request_ack(rr_ho_command->data, rr_ho_command->len, [ 106s] ^ [ 106s] cc1: some warnings being treated as errors [ 106s] Makefile:620: recipe for target 'osmo_bsc_bssap.o' failed [ 106s] make[4]: *** [osmo_bsc_bssap.o] Error 1 [ 106s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/osmo-bsc' [ 106s] Makefile:405: recipe for target 'all-recursive' failed [ 106s] make[3]: *** [all-recursive] Error 1 [ 106s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 106s] Makefile:448: recipe for target 'all-recursive' failed [ 106s] make[2]: *** [all-recursive] Error 1 [ 106s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 106s] Makefile:380: recipe for target 'all' failed [ 106s] make[1]: *** [all] Error 2 [ 106s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 106s] dh_auto_build: make -j1 returned exit code 2 [ 106s] debian/rules:45: recipe for target 'build' failed [ 106s] make: *** [build] Error 2 [ 106s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 106s] [ 106s] build31 failed "build osmo-bsc_1.4.0.63.aa824.dsc" at Mon May 6 02:51:00 UTC 2019. [ 106s] [ 106s] ### VM INTERACTION START ### [ 109s] [ 97.672095] sysrq: SysRq : Power Off [ 109s] [ 97.674692] reboot: Power down [ 109s] ### VM INTERACTION END ### [ 110s] [ 110s] build31 failed "build osmo-bsc_1.4.0.63.aa824.dsc" at Mon May 6 02:51:04 UTC 2019. [ 110s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon May 6 02:51:44 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 06 May 2019 02:51:44 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_18.04/x86_64 In-Reply-To: References: Message-ID: <5ccfa14136d5f_3a5cdc5f8958830@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_18.04/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_18.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 126s] msg = gsm0808_create_handover_request_ack(rr_ho_command->data, rr_ho_command->len, [ 126s] ^ [ 127s] cc1: some warnings being treated as errors [ 127s] Makefile:620: recipe for target 'osmo_bsc_bssap.o' failed [ 127s] make[4]: *** [osmo_bsc_bssap.o] Error 1 [ 127s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/osmo-bsc' [ 127s] Makefile:405: recipe for target 'all-recursive' failed [ 127s] make[3]: *** [all-recursive] Error 1 [ 127s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 127s] Makefile:448: recipe for target 'all-recursive' failed [ 127s] make[2]: *** [all-recursive] Error 1 [ 127s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 127s] Makefile:380: recipe for target 'all' failed [ 127s] make[1]: *** [all] Error 2 [ 127s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 127s] dh_auto_build: make -j1 returned exit code 2 [ 127s] debian/rules:45: recipe for target 'build' failed [ 127s] make: *** [build] Error 2 [ 127s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 127s] [ 127s] lamb27 failed "build osmo-bsc_1.4.0.63.aa824.dsc" at Mon May 6 02:51:23 UTC 2019. [ 127s] [ 127s] ### VM INTERACTION START ### [ 130s] [ 118.015288] sysrq: SysRq : Power Off [ 130s] [ 118.023645] reboot: Power down [ 130s] ### VM INTERACTION END ### [ 130s] [ 130s] lamb27 failed "build osmo-bsc_1.4.0.63.aa824.dsc" at Mon May 6 02:51:27 UTC 2019. [ 130s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon May 6 02:51:44 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 06 May 2019 02:51:44 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5ccfa141912d3_3a5cdc5f89589e3@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 134s] msg = gsm0808_create_handover_request_ack(rr_ho_command->data, rr_ho_command->len, [ 134s] ^ [ 135s] cc1: some warnings being treated as errors [ 135s] Makefile:620: recipe for target 'osmo_bsc_bssap.o' failed [ 135s] make[4]: *** [osmo_bsc_bssap.o] Error 1 [ 135s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/osmo-bsc' [ 135s] Makefile:405: recipe for target 'all-recursive' failed [ 135s] make[3]: *** [all-recursive] Error 1 [ 135s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 135s] Makefile:448: recipe for target 'all-recursive' failed [ 135s] make[2]: *** [all-recursive] Error 1 [ 135s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 135s] Makefile:380: recipe for target 'all' failed [ 135s] make[1]: *** [all] Error 2 [ 135s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 135s] dh_auto_build: make -j1 returned exit code 2 [ 135s] debian/rules:45: recipe for target 'build' failed [ 135s] make: *** [build] Error 2 [ 135s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 135s] [ 135s] cloud130 failed "build osmo-bsc_1.4.0.63.aa824.dsc" at Mon May 6 02:51:30 UTC 2019. [ 135s] [ 135s] ### VM INTERACTION START ### [ 138s] [ 117.621438] sysrq: SysRq : Power Off [ 138s] [ 117.625949] reboot: Power down [ 140s] ### VM INTERACTION END ### [ 140s] [ 140s] cloud130 failed "build osmo-bsc_1.4.0.63.aa824.dsc" at Mon May 6 02:51:35 UTC 2019. [ 140s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon May 6 02:52:35 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 06 May 2019 02:52:35 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_18.10/x86_64 In-Reply-To: References: Message-ID: <5ccfa17e8251b_3a5cdc5f8959015@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_18.10/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_18.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 152s] osmo_bsc_bssap.c:1219:8: error: implicit declaration of function 'gsm0808_create_handover_request_ack'; did you mean 'gsm0808_create_handover_request_ack2'? [-Werror=implicit-function-declaration] [ 152s] msg = gsm0808_create_handover_request_ack(rr_ho_command->data, rr_ho_command->len, [ 152s] ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [ 152s] gsm0808_create_handover_request_ack2 [ 152s] osmo_bsc_bssap.c:1219:6: warning: assignment to 'struct msgb *' from 'int' makes pointer from integer without a cast [-Wint-conversion] [ 152s] msg = gsm0808_create_handover_request_ack(rr_ho_command->data, rr_ho_command->len, [ 152s] ^ [ 153s] cc1: some warnings being treated as errors [ 153s] make[4]: *** [Makefile:659: osmo_bsc_bssap.o] Error 1 [ 153s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/osmo-bsc' [ 153s] make[3]: *** [Makefile:405: all-recursive] Error 1 [ 153s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 153s] make[2]: *** [Makefile:448: all-recursive] Error 1 [ 153s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 153s] make[1]: *** [Makefile:380: all] Error 2 [ 153s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 153s] dh_auto_build: make -j1 returned exit code 2 [ 153s] make: *** [debian/rules:45: build] Error 2 [ 153s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 153s] [ 153s] cloud107 failed "build osmo-bsc_1.4.0.63.aa824.dsc" at Mon May 6 02:52:22 UTC 2019. [ 153s] [ 153s] ### VM INTERACTION START ### [ 156s] [ 134.739642] sysrq: SysRq : Power Off [ 156s] [ 134.744274] reboot: Power down [ 157s] ### VM INTERACTION END ### [ 157s] [ 157s] cloud107 failed "build osmo-bsc_1.4.0.63.aa824.dsc" at Mon May 6 02:52:26 UTC 2019. [ 157s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon May 6 02:52:35 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 06 May 2019 02:52:35 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_18.04/i586 In-Reply-To: References: Message-ID: <5ccfa17ed1d14_3a5cdc5f89591d9@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_18.04/i586 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_18.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 74s] msg = gsm0808_create_handover_request_ack(rr_ho_command->data, rr_ho_command->len, [ 74s] ^ [ 74s] cc1: some warnings being treated as errors [ 74s] Makefile:620: recipe for target 'osmo_bsc_bssap.o' failed [ 74s] make[4]: *** [osmo_bsc_bssap.o] Error 1 [ 74s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/osmo-bsc' [ 74s] Makefile:405: recipe for target 'all-recursive' failed [ 74s] make[3]: *** [all-recursive] Error 1 [ 74s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 74s] Makefile:448: recipe for target 'all-recursive' failed [ 74s] make[2]: *** [all-recursive] Error 1 [ 74s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 74s] Makefile:380: recipe for target 'all' failed [ 74s] make[1]: *** [all] Error 2 [ 74s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 74s] dh_auto_build: make -j1 returned exit code 2 [ 74s] debian/rules:45: recipe for target 'build' failed [ 74s] make: *** [build] Error 2 [ 74s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 74s] [ 74s] build70 failed "build osmo-bsc_1.4.0.63.aa824.dsc" at Mon May 6 02:52:30 UTC 2019. [ 74s] [ 74s] ### VM INTERACTION START ### [ 77s] [ 68.917752] sysrq: SysRq : Power Off [ 77s] [ 68.919527] reboot: Power down [ 77s] ### VM INTERACTION END ### [ 77s] [ 77s] build70 failed "build osmo-bsc_1.4.0.63.aa824.dsc" at Mon May 6 02:52:33 UTC 2019. [ 77s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon May 6 02:53:26 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 06 May 2019 02:53:26 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/x86_64 In-Reply-To: References: Message-ID: <5ccfa1bbce3db_3a5cdc5f89592a@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 138s] msg = gsm0808_create_handover_request_ack(rr_ho_command->data, rr_ho_command->len, [ 138s] ^ [ 139s] cc1: some warnings being treated as errors [ 139s] Makefile:620: recipe for target 'osmo_bsc_bssap.o' failed [ 139s] make[4]: *** [osmo_bsc_bssap.o] Error 1 [ 139s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/osmo-bsc' [ 139s] Makefile:405: recipe for target 'all-recursive' failed [ 139s] make[3]: *** [all-recursive] Error 1 [ 139s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 139s] Makefile:448: recipe for target 'all-recursive' failed [ 139s] make[2]: *** [all-recursive] Error 1 [ 139s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 139s] Makefile:380: recipe for target 'all' failed [ 139s] make[1]: *** [all] Error 2 [ 139s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 139s] dh_auto_build: make -j1 returned exit code 2 [ 139s] debian/rules:45: recipe for target 'build' failed [ 139s] make: *** [build] Error 2 [ 139s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 139s] [ 139s] cloud136 failed "build osmo-bsc_1.4.0.63.aa824.dsc" at Mon May 6 02:53:06 UTC 2019. [ 139s] [ 139s] ### VM INTERACTION START ### [ 142s] [ 117.989113] sysrq: SysRq : Power Off [ 142s] [ 117.999159] reboot: Power down [ 143s] ### VM INTERACTION END ### [ 143s] [ 143s] cloud136 failed "build osmo-bsc_1.4.0.63.aa824.dsc" at Mon May 6 02:53:10 UTC 2019. [ 143s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon May 6 03:36:01 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 06 May 2019 03:36:01 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5ccfabb245d8a_3a5cdc5f8960466@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/armv7l Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 304s] msg = gsm0808_create_handover_request_ack(rr_ho_command->data, rr_ho_command->len, [ 304s] ^ [ 306s] cc1: some warnings being treated as errors [ 306s] Makefile:620: recipe for target 'osmo_bsc_bssap.o' failed [ 306s] make[4]: *** [osmo_bsc_bssap.o] Error 1 [ 306s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/osmo-bsc' [ 306s] Makefile:405: recipe for target 'all-recursive' failed [ 306s] make[3]: *** [all-recursive] Error 1 [ 306s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 306s] Makefile:448: recipe for target 'all-recursive' failed [ 306s] make[2]: *** [all-recursive] Error 1 [ 306s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 306s] Makefile:380: recipe for target 'all' failed [ 306s] make[1]: *** [all] Error 2 [ 306s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 306s] dh_auto_build: make -j1 returned exit code 2 [ 306s] debian/rules:45: recipe for target 'build' failed [ 306s] make: *** [build] Error 2 [ 306s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 306s] [ 306s] armbuild04 failed "build osmo-bsc_1.4.0.63.aa824.dsc" at Mon May 6 03:35:53 UTC 2019. [ 306s] [ 306s] ### VM INTERACTION START ### [ 309s] [ 256.487372] sysrq: SysRq : Power Off [ 309s] [ 256.521732] reboot: Power down [ 309s] ### VM INTERACTION END ### [ 309s] [ 309s] armbuild04 failed "build osmo-bsc_1.4.0.63.aa824.dsc" at Mon May 6 03:35:56 UTC 2019. [ 309s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon May 6 03:37:09 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 06 May 2019 03:37:09 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Raspbian_9.0/armv7l In-Reply-To: References: Message-ID: <5ccfabebe1c11_3a5cdc5f896053f@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Raspbian_9.0/armv7l Package network:osmocom:nightly/osmo-bsc failed to build in Raspbian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 225s] msg = gsm0808_create_handover_request_ack(rr_ho_command->data, rr_ho_command->len, [ 225s] ^ [ 227s] cc1: some warnings being treated as errors [ 227s] Makefile:620: recipe for target 'osmo_bsc_bssap.o' failed [ 227s] make[4]: *** [osmo_bsc_bssap.o] Error 1 [ 227s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/osmo-bsc' [ 227s] Makefile:405: recipe for target 'all-recursive' failed [ 227s] make[3]: *** [all-recursive] Error 1 [ 227s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 227s] Makefile:448: recipe for target 'all-recursive' failed [ 227s] make[2]: *** [all-recursive] Error 1 [ 227s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 227s] Makefile:380: recipe for target 'all' failed [ 227s] make[1]: *** [all] Error 2 [ 227s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 227s] dh_auto_build: make -j1 returned exit code 2 [ 227s] debian/rules:45: recipe for target 'build' failed [ 227s] make: *** [build] Error 2 [ 227s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 227s] [ 227s] armbuild21 failed "build osmo-bsc_1.4.0.63.aa824.dsc" at Mon May 6 03:36:58 UTC 2019. [ 227s] [ 227s] ### VM INTERACTION START ### [ 230s] [ 211.108108] sysrq: SysRq : Power Off [ 230s] [ 211.113043] reboot: Power down [ 230s] ### VM INTERACTION END ### [ 230s] [ 230s] armbuild21 failed "build osmo-bsc_1.4.0.63.aa824.dsc" at Mon May 6 03:37:01 UTC 2019. [ 230s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Mon May 6 08:19:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 6 May 2019 08:19:05 +0000 Subject: Change in osmo-ttcn3-hacks[master]: sgsn: Integrate RANAP In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13754 ) Change subject: sgsn: Integrate RANAP ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13754 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib62fc4c6007f6f4c47db7ca096a8d629bc72bb22 Gerrit-Change-Number: 13754 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 06 May 2019 08:19:05 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 08:19:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 6 May 2019 08:19:08 +0000 Subject: Change in osmo-ttcn3-hacks[master]: SGSN_Tests: Make f_gmm_attach() and f_gmm_auth() work on gb_idx != 0 In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13858 ) Change subject: SGSN_Tests: Make f_gmm_attach() and f_gmm_auth() work on gb_idx != 0 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13858 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie88cbf0c70269cc3e2c2fd2a0c65c8f2130ec2b1 Gerrit-Change-Number: 13858 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 06 May 2019 08:19:08 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 08:19:24 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 6 May 2019 08:19:24 +0000 Subject: Change in osmo-ttcn3-hacks[master]: SGSN_Tests: Make more helper functions gb_index aware In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13859 ) Change subject: SGSN_Tests: Make more helper functions gb_index aware ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13859 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I3825634f581897f6951d9673984f138e977cc7ac Gerrit-Change-Number: 13859 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 06 May 2019 08:19:24 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 08:19:32 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 6 May 2019 08:19:32 +0000 Subject: Change in osmo-ttcn3-hacks[master]: SGSN_Tests: Introduce NUM_GB to avoid '3' as magic value In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13860 ) Change subject: SGSN_Tests: Introduce NUM_GB to avoid '3' as magic value ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13860 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I28b7dd26c5c129ec41c6349de9ddc9ef0ffee8ac Gerrit-Change-Number: 13860 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 06 May 2019 08:19:32 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 08:19:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 6 May 2019 08:19:47 +0000 Subject: Change in osmo-ttcn3-hacks[master]: BSSGP_Emulation: Fix transmission of MT L3 in LLC/BSSGP In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13861 ) Change subject: BSSGP_Emulation: Fix transmission of MT L3 in LLC/BSSGP ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13861 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie652598292f2fbd2e1e0c4aa679ff0d68d78c88c Gerrit-Change-Number: 13861 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 06 May 2019 08:19:47 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 08:20:01 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 6 May 2019 08:20:01 +0000 Subject: Change in osmo-ttcn3-hacks[master]: BSSGP_Emulation: Pass uplink L3 to BSSGP Uplink Unitdata In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13862 ) Change subject: BSSGP_Emulation: Pass uplink L3 to BSSGP Uplink Unitdata ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13862 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I71c19cd0f11927eb70667210a4ba1ee5873fd534 Gerrit-Change-Number: 13862 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 06 May 2019 08:20:01 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 08:20:11 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 6 May 2019 08:20:11 +0000 Subject: Change in osmo-ttcn3-hacks[master]: BSSGP_Emulation: Implement LLC sending also for SGSN-role In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13863 ) Change subject: BSSGP_Emulation: Implement LLC sending also for SGSN-role ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13863 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If86f4b7c9e7c3c799c274f37a350dec4a788f124 Gerrit-Change-Number: 13863 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 06 May 2019 08:20:11 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 08:20:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 6 May 2019 08:20:18 +0000 Subject: Change in osmo-ttcn3-hacks[master]: BSSGP_Emulation: More/improved comments In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13864 ) Change subject: BSSGP_Emulation: More/improved comments ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13864 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I04250667a498f3f00d4fbb4cd22a4f7b71e2bba1 Gerrit-Change-Number: 13864 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 06 May 2019 08:20:18 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 08:34:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 6 May 2019 08:34:16 +0000 Subject: Change in libosmocore[master]: Re-introduce declaration of gsm0808_create_handover_request_ack() Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13882 Change subject: Re-introduce declaration of gsm0808_create_handover_request_ack() ...................................................................... Re-introduce declaration of gsm0808_create_handover_request_ack() In Change-Id Ia71542ea37d4fd2c9fb9b40357db7aeb111ec576, the old declaration of gsm0808_create_handover_request_ack() was accidentially removed from the gsm0808.h header file. The actual function itself (and the exported symbol) remained for backwards compatibility at runtime, but removing the declaration from the header file resulted in build failures across the board of all automatic tests. Let's re-introduce the old declaration. Change-Id: I9e96fa675fccca9ee9631caad7559dea3794d490 --- M include/osmocom/gsm/gsm0808.h 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/82/13882/1 diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h index 93195b5..60ff550 100644 --- a/include/osmocom/gsm/gsm0808.h +++ b/include/osmocom/gsm/gsm0808.h @@ -194,6 +194,10 @@ }; struct msgb *gsm0808_create_handover_request(const struct gsm0808_handover_request *params); +struct msgb *gsm0808_create_handover_request_ack(const uint8_t *l3_info, uint8_t l3_info_len, + uint8_t chosen_channel, uint8_t chosen_encr_alg, + uint8_t chosen_speech_version); + struct gsm0808_handover_request_ack { const uint8_t *l3_info; uint8_t l3_info_len; -- To view, visit https://gerrit.osmocom.org/13882 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I9e96fa675fccca9ee9631caad7559dea3794d490 Gerrit-Change-Number: 13882 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 08:34:24 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 May 2019 08:34:24 +0000 Subject: Change in osmo-gsm-tester[master]: virtual: Introduce a base class for test cases In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13825 ) Change subject: virtual: Introduce a base class for test cases ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13825 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I97968fb02436d5ac8248fc8020539e1af547b030 Gerrit-Change-Number: 13825 Gerrit-PatchSet: 2 Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 06 May 2019 08:34:24 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 08:34:43 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 6 May 2019 08:34:43 +0000 Subject: Change in libosmocore[master]: Re-introduce declaration of gsm0808_create_handover_request_ack() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13882 ) Change subject: Re-introduce declaration of gsm0808_create_handover_request_ack() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13882 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9e96fa675fccca9ee9631caad7559dea3794d490 Gerrit-Change-Number: 13882 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-CC: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 06 May 2019 08:34:43 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 08:35:02 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 May 2019 08:35:02 +0000 Subject: Change in osmo-gsm-tester[master]: virtual: Make it possible to add tests to the ms driver In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13826 ) Change subject: virtual: Make it possible to add tests to the ms driver ...................................................................... Patch Set 2: Waiting for my comments to be addresses here before +2. -- To view, visit https://gerrit.osmocom.org/13826 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia65ee53987e92b24e6b8c40e1376bc74dc260180 Gerrit-Change-Number: 13826 Gerrit-PatchSet: 2 Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 06 May 2019 08:35:02 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 08:35:56 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 6 May 2019 08:35:56 +0000 Subject: Change in libosmocore[master]: Re-introduce declaration of gsm0808_create_handover_request_ack() In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13882 to look at the new patch set (#2). Change subject: Re-introduce declaration of gsm0808_create_handover_request_ack() ...................................................................... Re-introduce declaration of gsm0808_create_handover_request_ack() In Change-Id Ia71542ea37d4fd2c9fb9b40357db7aeb111ec576, the old declaration of gsm0808_create_handover_request_ack() was accidentially removed from the gsm0808.h header file. The actual function itself (and the exported symbol) remained for backwards compatibility at runtime, but removing the declaration from the header file resulted in build failures across the board of all automatic tests. Let's re-introduce the old declaration. Change-Id: I9e96fa675fccca9ee9631caad7559dea3794d490 --- M include/osmocom/gsm/gsm0808.h 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/82/13882/2 -- To view, visit https://gerrit.osmocom.org/13882 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9e96fa675fccca9ee9631caad7559dea3794d490 Gerrit-Change-Number: 13882 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-CC: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 08:36:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 6 May 2019 08:36:16 +0000 Subject: Change in libosmocore[master]: Re-introduce declaration of gsm0808_create_handover_request_ack() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13882 ) Change subject: Re-introduce declaration of gsm0808_create_handover_request_ack() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13882 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9e96fa675fccca9ee9631caad7559dea3794d490 Gerrit-Change-Number: 13882 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-CC: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 06 May 2019 08:36:16 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 08:39:54 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 6 May 2019 08:39:54 +0000 Subject: Change in libosmocore[master]: Re-introduce declaration of gsm0808_create_handover_request_ack() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13882 ) Change subject: Re-introduce declaration of gsm0808_create_handover_request_ack() ...................................................................... Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/13882 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9e96fa675fccca9ee9631caad7559dea3794d490 Gerrit-Change-Number: 13882 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Comment-Date: Mon, 06 May 2019 08:39:54 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 08:40:05 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 May 2019 08:40:05 +0000 Subject: Change in libosmocore[master]: Re-introduce declaration of gsm0808_create_handover_request_ack() In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13882 ) Change subject: Re-introduce declaration of gsm0808_create_handover_request_ack() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13882 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9e96fa675fccca9ee9631caad7559dea3794d490 Gerrit-Change-Number: 13882 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 06 May 2019 08:40:05 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 08:40:31 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 6 May 2019 08:40:31 +0000 Subject: Change in libosmocore[master]: Re-introduce declaration of gsm0808_create_handover_request_ack() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13882 ) Change subject: Re-introduce declaration of gsm0808_create_handover_request_ack() ...................................................................... Re-introduce declaration of gsm0808_create_handover_request_ack() In Change-Id Ia71542ea37d4fd2c9fb9b40357db7aeb111ec576, the old declaration of gsm0808_create_handover_request_ack() was accidentially removed from the gsm0808.h header file. The actual function itself (and the exported symbol) remained for backwards compatibility at runtime, but removing the declaration from the header file resulted in build failures across the board of all automatic tests. Let's re-introduce the old declaration. Change-Id: I9e96fa675fccca9ee9631caad7559dea3794d490 --- M include/osmocom/gsm/gsm0808.h 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified Pau Espin Pedrol: Looks good to me, approved diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h index 93195b5..373b434 100644 --- a/include/osmocom/gsm/gsm0808.h +++ b/include/osmocom/gsm/gsm0808.h @@ -194,6 +194,10 @@ }; struct msgb *gsm0808_create_handover_request(const struct gsm0808_handover_request *params); +struct msgb *gsm0808_create_handover_request_ack(const uint8_t *l3_info, uint8_t l3_info_len, + uint8_t chosen_channel, uint8_t chosen_encr_alg, + uint8_t chosen_speech_version); + struct gsm0808_handover_request_ack { const uint8_t *l3_info; uint8_t l3_info_len; -- To view, visit https://gerrit.osmocom.org/13882 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I9e96fa675fccca9ee9631caad7559dea3794d490 Gerrit-Change-Number: 13882 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Mon May 6 08:59:36 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 06 May 2019 08:59:36 +0000 Subject: Build failure of network:osmocom:nightly/libosmo-netif in xUbuntu_18.10/x86_64 In-Reply-To: References: Message-ID: <5ccff77f324fb_3a5cdc5f81003668@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmo-netif/xUbuntu_18.10/x86_64 Package network:osmocom:nightly/libosmo-netif failed to build in xUbuntu_18.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly libosmo-netif Last lines of build log: [ 145s] +++ /usr/src/packages/BUILD/tests/testsuite.dir/at-groups/1/stderr 2019-05-06 08:59:14.240000000 +0000 [ 145s] @@ -20,9 +20,11 @@ [ 145s] autoreconnecting test step 3 [client OK, server OK], FD reg 1 [ 145s] [ 145s] autoreconnecting test step 2 [client OK, server OK], FD reg 0 [ 145s] + [ 145s] +autoreconnecting test step 1 [client OK, server OK], FD reg 0 [ 145s] connection closed with srv [ 145s] [ 145s] -autoreconnecting test step 1 [client OK, server NA], FD reg 0 [ 145s] +autoreconnecting test step 0 [client OK, server NA], FD reg 0 [ 145s] [ 145s] non-reconnecting test step 7 [client NA, server OK], FD reg 1 [ 145s] [ 145s] 1. testsuite.at:4: 1. stream_test (testsuite.at:4): FAILED (testsuite.at:8) [ 145s] make[1]: *** [debian/rules:27: override_dh_auto_test] Error 1 [ 145s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 145s] make: *** [debian/rules:13: build] Error 2 [ 145s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 145s] [ 145s] lamb56 failed "build libosmo-netif_0.4.0.25.e380.dsc" at Mon May 6 08:59:15 UTC 2019. [ 145s] [ 145s] ### VM INTERACTION START ### [ 148s] [ 136.402954] sysrq: SysRq : Power Off [ 148s] [ 136.407887] reboot: Power down [ 148s] ### VM INTERACTION END ### [ 148s] [ 148s] lamb56 failed "build libosmo-netif_0.4.0.25.e380.dsc" at Mon May 6 08:59:19 UTC 2019. [ 148s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Mon May 6 09:25:51 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 May 2019 09:25:51 +0000 Subject: Change in osmo-trx[master]: Introduce LOGCHAN macro to standarize logging channel info In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13871 to look at the new patch set (#3). Change subject: Introduce LOGCHAN macro to standarize logging channel info ...................................................................... Introduce LOGCHAN macro to standarize logging channel info Change-Id: I67d869499aa16af58c863ca7b74c356bcd979936 --- M CommonLibs/Logger.h M Transceiver52M/Transceiver.cpp M Transceiver52M/device/lms/LMSDevice.cpp 3 files changed, 39 insertions(+), 36 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/71/13871/3 -- To view, visit https://gerrit.osmocom.org/13871 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I67d869499aa16af58c863ca7b74c356bcd979936 Gerrit-Change-Number: 13871 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 09:25:51 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 May 2019 09:25:51 +0000 Subject: Change in osmo-trx[master]: smpl_buf: Move it to device/common and create libdevice_common.la In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13873 to look at the new patch set (#3). Change subject: smpl_buf: Move it to device/common and create libdevice_common.la ...................................................................... smpl_buf: Move it to device/common and create libdevice_common.la Since in next commit osmo-trx-lms starts using smpl_buf.cpp, it seems some automake step doesn't like including a cpp file twice from a different directory, since race conditions can occur building it. Instead we define the dependency by first building a static lib and then using it on each libdevice.la (one per device type). We already do the similar under arch/ subdir, where we have a common/ subdir and then one subdir and lib per architecture. Change-Id: I465ad0f6d5569bb3006d711c8fd0df14391fcf35 --- M Transceiver52M/Makefile.am M Transceiver52M/device/Makefile.am A Transceiver52M/device/common/Makefile.am R Transceiver52M/device/common/radioDevice.h R Transceiver52M/device/common/smpl_buf.cpp R Transceiver52M/device/common/smpl_buf.h M Transceiver52M/device/lms/Makefile.am M Transceiver52M/device/uhd/Makefile.am M Transceiver52M/device/usrp1/Makefile.am M configure.ac 10 files changed, 20 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/73/13873/3 -- To view, visit https://gerrit.osmocom.org/13873 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I465ad0f6d5569bb3006d711c8fd0df14391fcf35 Gerrit-Change-Number: 13873 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 10:13:41 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 6 May 2019 10:13:41 +0000 Subject: Change in osmo-trx[master]: Introduce LOGCHAN macro to standarize logging channel info In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13871 ) Change subject: Introduce LOGCHAN macro to standarize logging channel info ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13871 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I67d869499aa16af58c863ca7b74c356bcd979936 Gerrit-Change-Number: 13871 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Mon, 06 May 2019 10:13:41 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 10:15:10 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 6 May 2019 10:15:10 +0000 Subject: Change in osmo-trx[master]: smpl_buf: Move it to device/common and create libdevice_common.la In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13873 ) Change subject: smpl_buf: Move it to device/common and create libdevice_common.la ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13873 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I465ad0f6d5569bb3006d711c8fd0df14391fcf35 Gerrit-Change-Number: 13873 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Mon, 06 May 2019 10:15:10 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 10:33:37 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 6 May 2019 10:33:37 +0000 Subject: Change in libosmocore[master]: Deprecate usage of osmo_counter_* In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13808 ) Change subject: Deprecate usage of osmo_counter_* ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13808 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If67f64c6ec7a3f3114c962df9db50107d9ea86e2 Gerrit-Change-Number: 13808 Gerrit-PatchSet: 3 Gerrit-Owner: Daniel Willmann Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Mon, 06 May 2019 10:33:37 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 11:58:26 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 May 2019 11:58:26 +0000 Subject: Change in osmo-mgw[master]: osmux: Log osmux socket during osmux_init Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13883 Change subject: osmux: Log osmux socket during osmux_init ...................................................................... osmux: Log osmux socket during osmux_init Change-Id: I43a658b19765b1c3b3cc42f78602b793ee36c67d --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/83/13883/1 diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 3bd765e..aab8963 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -15,6 +15,7 @@ #include /* for PRIu64 */ #include #include +#include #include #include @@ -517,7 +518,8 @@ ret = mgcp_create_bind(cfg->osmux_addr, &osmux_fd, cfg->osmux_port); if (ret < 0) { - LOGP(DLMGCP, LOGL_ERROR, "cannot bind OSMUX socket\n"); + LOGP(DLMGCP, LOGL_ERROR, "cannot bind OSMUX socket to %s:%u\n", + cfg->osmux_addr, cfg->osmux_port); return ret; } mgcp_set_ip_tos(osmux_fd.fd, cfg->endp_dscp); @@ -525,11 +527,15 @@ ret = osmo_fd_register(&osmux_fd); if (ret < 0) { - LOGP(DLMGCP, LOGL_ERROR, "cannot register OSMUX socket\n"); + LOGP(DLMGCP, LOGL_ERROR, "cannot register OSMUX socket %s\n", + osmo_sock_get_name2(osmux_fd.fd)); return ret; } cfg->osmux_init = 1; + LOGP(DLMGCP, LOGL_INFO, "OSMUX socket listening on %s\n", + osmo_sock_get_name2(osmux_fd.fd)); + return 0; } -- To view, visit https://gerrit.osmocom.org/13883 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I43a658b19765b1c3b3cc42f78602b793ee36c67d Gerrit-Change-Number: 13883 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 13:19:17 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 6 May 2019 13:19:17 +0000 Subject: Change in osmo-mgw[master]: osmux: Log osmux socket during osmux_init In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13883 ) Change subject: osmux: Log osmux socket during osmux_init ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13883 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I43a658b19765b1c3b3cc42f78602b793ee36c67d Gerrit-Change-Number: 13883 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Mon, 06 May 2019 13:19:17 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 16:03:28 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 May 2019 16:03:28 +0000 Subject: Change in osmo-mgw[master]: mgcp_osmux.c: osmux_enable_endpoint: Fix incorrect return check Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13884 Change subject: mgcp_osmux.c: osmux_enable_endpoint: Fix incorrect return check ...................................................................... mgcp_osmux.c: osmux_enable_endpoint: Fix incorrect return check osmux_xfrm_input_open_circuit returns 0 on success and -1 on error. Confusion comes from that function being implemented by calling osmux_batch_add_circuit which returns NULL on error. cherry-picked from: openbsc.git ac1b03c8e59408336d07527e2597171cb99ed654. Change-Id: Iba018aa57901642ea4c486526a973fe6023e10cf --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/84/13884/1 diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 3bd765e..7e26d7a 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -567,7 +567,7 @@ mgcp_conn_dump(conn->conn)); return -1; } - if (!osmux_xfrm_input_open_circuit(conn->osmux.in, conn->osmux.cid, osmux_dummy)) { + if (osmux_xfrm_input_open_circuit(conn->osmux.in, conn->osmux.cid, osmux_dummy) < 0) { LOGP(DLMGCP, LOGL_ERROR, "Cannot open osmux circuit %u for conn:%s\n", conn->osmux.cid, mgcp_conn_dump(conn->conn)); return -1; -- To view, visit https://gerrit.osmocom.org/13884 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Iba018aa57901642ea4c486526a973fe6023e10cf Gerrit-Change-Number: 13884 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 17:40:51 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 6 May 2019 17:40:51 +0000 Subject: Change in osmo-bts[master]: common/oml.c: fix: properly encode NM_ATT_SW_CONFIG In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13709 ) Change subject: common/oml.c: fix: properly encode NM_ATT_SW_CONFIG ...................................................................... Patch Set 3: Code-Review-1 agreeing with pau -- To view, visit https://gerrit.osmocom.org/13709 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id26104719891944f3e2151df362bd45bb057a9c5 Gerrit-Change-Number: 13709 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Mon, 06 May 2019 17:40:51 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 17:40:56 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 6 May 2019 17:40:56 +0000 Subject: Change in osmo-bts[master]: common/oml.c: fix: properly encode NM_ATT_SW_CONFIG In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13709 to look at the new patch set (#4). Change subject: common/oml.c: fix: properly encode NM_ATT_SW_CONFIG ...................................................................... common/oml.c: fix: properly encode NM_ATT_SW_CONFIG According to 3GPP TS 52.021, sections 9.4.61-62, 'SW Configuration' shall contain a list of 'SW Descriptions' related to the MO. In other words, all 'NM_ATT_SW_DESCR' blobs shall be encapsulated into a single NM_ATT_SW_CONFIG attribute. For some reason, they were not encapsulated properly, so OsmoBSC were unable to parse the 'SW Descriptions'. However, unlike OsmoBSC the old OpenBSC does not expect this encapsulation, thus after this change it will be unable to parse the 'SW Descriptions'. Change-Id: Id26104719891944f3e2151df362bd45bb057a9c5 Related: OS#3938 --- M src/common/oml.c 1 file changed, 33 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/09/13709/4 -- To view, visit https://gerrit.osmocom.org/13709 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id26104719891944f3e2151df362bd45bb057a9c5 Gerrit-Change-Number: 13709 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 17:41:15 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 6 May 2019 17:41:15 +0000 Subject: Change in osmo-mgw[master]: mgcp_osmux.c: osmux_enable_endpoint: Fix incorrect return check In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13884 ) Change subject: mgcp_osmux.c: osmux_enable_endpoint: Fix incorrect return check ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13884 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iba018aa57901642ea4c486526a973fe6023e10cf Gerrit-Change-Number: 13884 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 06 May 2019 17:41:15 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 17:41:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 6 May 2019 17:41:16 +0000 Subject: Change in osmo-mgw[master]: mgcp_osmux.c: osmux_enable_endpoint: Fix incorrect return check In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13884 ) Change subject: mgcp_osmux.c: osmux_enable_endpoint: Fix incorrect return check ...................................................................... mgcp_osmux.c: osmux_enable_endpoint: Fix incorrect return check osmux_xfrm_input_open_circuit returns 0 on success and -1 on error. Confusion comes from that function being implemented by calling osmux_batch_add_circuit which returns NULL on error. cherry-picked from: openbsc.git ac1b03c8e59408336d07527e2597171cb99ed654. Change-Id: Iba018aa57901642ea4c486526a973fe6023e10cf --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 3bd765e..7e26d7a 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -567,7 +567,7 @@ mgcp_conn_dump(conn->conn)); return -1; } - if (!osmux_xfrm_input_open_circuit(conn->osmux.in, conn->osmux.cid, osmux_dummy)) { + if (osmux_xfrm_input_open_circuit(conn->osmux.in, conn->osmux.cid, osmux_dummy) < 0) { LOGP(DLMGCP, LOGL_ERROR, "Cannot open osmux circuit %u for conn:%s\n", conn->osmux.cid, mgcp_conn_dump(conn->conn)); return -1; -- To view, visit https://gerrit.osmocom.org/13884 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iba018aa57901642ea4c486526a973fe6023e10cf Gerrit-Change-Number: 13884 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 17:41:37 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 6 May 2019 17:41:37 +0000 Subject: Change in osmo-mgw[master]: osmux: Log osmux socket during osmux_init In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13883 ) Change subject: osmux: Log osmux socket during osmux_init ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13883 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I43a658b19765b1c3b3cc42f78602b793ee36c67d Gerrit-Change-Number: 13883 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Mon, 06 May 2019 17:41:37 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 17:41:38 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 6 May 2019 17:41:38 +0000 Subject: Change in osmo-mgw[master]: osmux: Log osmux socket during osmux_init In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13883 ) Change subject: osmux: Log osmux socket during osmux_init ...................................................................... osmux: Log osmux socket during osmux_init Change-Id: I43a658b19765b1c3b3cc42f78602b793ee36c67d --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 8 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 7e26d7a..ce89df1 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -15,6 +15,7 @@ #include /* for PRIu64 */ #include #include +#include #include #include @@ -517,7 +518,8 @@ ret = mgcp_create_bind(cfg->osmux_addr, &osmux_fd, cfg->osmux_port); if (ret < 0) { - LOGP(DLMGCP, LOGL_ERROR, "cannot bind OSMUX socket\n"); + LOGP(DLMGCP, LOGL_ERROR, "cannot bind OSMUX socket to %s:%u\n", + cfg->osmux_addr, cfg->osmux_port); return ret; } mgcp_set_ip_tos(osmux_fd.fd, cfg->endp_dscp); @@ -525,11 +527,15 @@ ret = osmo_fd_register(&osmux_fd); if (ret < 0) { - LOGP(DLMGCP, LOGL_ERROR, "cannot register OSMUX socket\n"); + LOGP(DLMGCP, LOGL_ERROR, "cannot register OSMUX socket %s\n", + osmo_sock_get_name2(osmux_fd.fd)); return ret; } cfg->osmux_init = 1; + LOGP(DLMGCP, LOGL_INFO, "OSMUX socket listening on %s\n", + osmo_sock_get_name2(osmux_fd.fd)); + return 0; } -- To view, visit https://gerrit.osmocom.org/13883 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I43a658b19765b1c3b3cc42f78602b793ee36c67d Gerrit-Change-Number: 13883 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 17:42:34 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 6 May 2019 17:42:34 +0000 Subject: Change in osmo-bts[master]: common/oml.c: fix: properly encode NM_ATT_SW_CONFIG In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13709 ) Change subject: common/oml.c: fix: properly encode NM_ATT_SW_CONFIG ...................................................................... Patch Set 4: (2 comments) > agreeing with pau I forgot to commit my changes before pushing, please see the new version. https://gerrit.osmocom.org/#/c/13709/2/src/common/oml.c File src/common/oml.c: https://gerrit.osmocom.org/#/c/13709/2/src/common/oml.c at 164 PS2, Line 164: } > better use osmo_store16be, len may not be aligned? Sure, thanks! Done. https://gerrit.osmocom.org/#/c/13709/2/src/common/oml.c at 190 PS2, Line 190: total_len = abis_nm_put_sw_file(msg, btsatttr2str(TRX_PHY_VERSION), phy_version, true); > same as comment above. Done. -- To view, visit https://gerrit.osmocom.org/13709 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id26104719891944f3e2151df362bd45bb057a9c5 Gerrit-Change-Number: 13709 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Mon, 06 May 2019 17:42:34 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 17:42:49 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 6 May 2019 17:42:49 +0000 Subject: Change in osmo-bts[master]: common/oml.c: fix: properly encode NM_ATT_SW_CONFIG In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13709 ) Change subject: common/oml.c: fix: properly encode NM_ATT_SW_CONFIG ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13709 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id26104719891944f3e2151df362bd45bb057a9c5 Gerrit-Change-Number: 13709 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Mon, 06 May 2019 17:42:49 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 21:04:58 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 6 May 2019 21:04:58 +0000 Subject: Change in osmo-bsc[master]: handover_fsm.c: fix: prevent possible buffer overflow Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13885 Change subject: handover_fsm.c: fix: prevent possible buffer overflow ...................................................................... handover_fsm.c: fix: prevent possible buffer overflow Change-Id: If51f8f82d3b2462cb7d7a531fe4411509344842b Fixes: CID#197643 --- M src/osmo-bsc/handover_fsm.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/85/13885/1 diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c index c044407..62927f9 100644 --- a/src/osmo-bsc/handover_fsm.c +++ b/src/osmo-bsc/handover_fsm.c @@ -637,6 +637,7 @@ if (req->ei.key_len > sizeof(info.encr.key)) { ho_fail(HO_RESULT_ERROR, "Encryption Information IE key length is too large: %u\n", req->ei.key_len); + return; } memcpy(info.encr.key, req->ei.key, req->ei.key_len); info.encr.key_len = req->ei.key_len; -- To view, visit https://gerrit.osmocom.org/13885 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If51f8f82d3b2462cb7d7a531fe4411509344842b Gerrit-Change-Number: 13885 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 21:21:38 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 6 May 2019 21:21:38 +0000 Subject: Change in libosmocore[master]: Add VTY and CTRL port numbers for OsmoCBC (Cell Broadcast Centre) Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13886 Change subject: Add VTY and CTRL port numbers for OsmoCBC (Cell Broadcast Centre) ...................................................................... Add VTY and CTRL port numbers for OsmoCBC (Cell Broadcast Centre) Change-Id: I2075420048b43973c800ba0fc389f4b559437233 --- M include/osmocom/ctrl/ports.h M include/osmocom/vty/ports.h 2 files changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/86/13886/1 diff --git a/include/osmocom/ctrl/ports.h b/include/osmocom/ctrl/ports.h index b65bd00..25d2491 100644 --- a/include/osmocom/ctrl/ports.h +++ b/include/osmocom/ctrl/ports.h @@ -22,4 +22,6 @@ #define OSMO_CTRL_PORT_HLR 4259 #define OSMO_CTRL_PORT_HNBGW 4262 #define OSMO_CTRL_PORT_GBPROXY 4263 +/* 4264 used by VTY interface */ +#define OSMO_CTRL_PORT_CBC 4265 /* When adding/changing port numbers, keep docs and wiki in sync. See above. */ diff --git a/include/osmocom/vty/ports.h b/include/osmocom/vty/ports.h index 5a8faed..201e115 100644 --- a/include/osmocom/vty/ports.h +++ b/include/osmocom/vty/ports.h @@ -33,4 +33,5 @@ #define OSMO_VTY_PORT_GGSN 4260 #define OSMO_VTY_PORT_HNBGW 4261 /* 4262-4263 used by control interface */ +#define OSMO_VTY_PORT_CBC 4264 /* When adding/changing port numbers, keep docs and wiki in sync. See above. */ -- To view, visit https://gerrit.osmocom.org/13886 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I2075420048b43973c800ba0fc389f4b559437233 Gerrit-Change-Number: 13886 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 21:21:38 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 6 May 2019 21:21:38 +0000 Subject: Change in libosmocore[master]: gsm0808_utils: Introduce gsm0808_msgb_put_cell_id_u() Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13887 Change subject: gsm0808_utils: Introduce gsm0808_msgb_put_cell_id_u() ...................................................................... gsm0808_utils: Introduce gsm0808_msgb_put_cell_id_u() This function is doing the bulk work of encoding a given Cell ID List item. gsm0808_enc_cell_id_list2() is modified to be a wrapper / loop around the new function. The purpose of this is to expose Cell ID List Entry encoding so that the upcoming CBSP protocol encoder can re-use this code. Related: OS#3537 Change-Id: I6cc567798e20365e6587e6b2988e834306d8c80c --- M include/osmocom/gsm/gsm0808_utils.h M src/gsm/gsm0808_utils.c M src/gsm/libosmogsm.map 3 files changed, 44 insertions(+), 41 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/87/13887/1 diff --git a/include/osmocom/gsm/gsm0808_utils.h b/include/osmocom/gsm/gsm0808_utils.h index 47c4e95..3a7beb7 100644 --- a/include/osmocom/gsm/gsm0808_utils.h +++ b/include/osmocom/gsm/gsm0808_utils.h @@ -93,6 +93,7 @@ void gsm0808_cell_id_from_cgi(struct gsm0808_cell_id *cid, enum CELL_IDENT id_discr, const struct osmo_cell_global_id *cgi); int gsm0808_cell_id_to_cgi(struct osmo_cell_global_id *cgi, const struct gsm0808_cell_id *cid); +void gsm0808_msgb_put_cell_id_u(struct msgb *msg, enum CELL_IDENT id_discr, const union gsm0808_cell_id_u *u); uint8_t gsm0808_enc_cause(struct msgb *msg, uint16_t cause); uint8_t gsm0808_enc_aoip_trasp_addr(struct msgb *msg, diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c index 99cf188..e825930 100644 --- a/src/gsm/gsm0808_utils.c +++ b/src/gsm/gsm0808_utils.c @@ -737,6 +737,46 @@ return (int)(elem - old_elem); } +void gsm0808_msgb_put_cell_id_u(struct msgb *msg, enum CELL_IDENT id_discr, const union gsm0808_cell_id_u *u) +{ + switch (id_discr) { + case CELL_IDENT_WHOLE_GLOBAL: { + const struct osmo_cell_global_id *id = &u->global; + struct gsm48_loc_area_id lai; + gsm48_generate_lai2(&lai, &id->lai); + memcpy(msgb_put(msg, sizeof(lai)), &lai, sizeof(lai)); + msgb_put_u16(msg, id->cell_identity); + break; + } + case CELL_IDENT_LAC_AND_CI: { + const struct osmo_lac_and_ci_id *id = &u->lac_and_ci; + msgb_put_u16(msg, id->lac); + msgb_put_u16(msg, id->ci); + break; + } + case CELL_IDENT_CI: + msgb_put_u16(msg, u->ci); + break; + case CELL_IDENT_LAI_AND_LAC: { + const struct osmo_location_area_id *id = &u->lai_and_lac; + struct gsm48_loc_area_id lai; + gsm48_generate_lai2(&lai, id); + memcpy(msgb_put(msg, sizeof(lai)), &lai, sizeof(lai)); + break; + } + case CELL_IDENT_LAC: + msgb_put_u16(msg, u->lac); + break; + case CELL_IDENT_BSS: + case CELL_IDENT_NO_CELL: + /* Does not have any list items */ + break; + default: + /* Support for other identifier list types is not implemented. */ + OSMO_ASSERT(false); + } +} + /*! Encode TS 08.08 Cell Identifier List IE * \param[out] msg Message Buffer to which IE is to be appended * \param[in] cil Cell ID List to be encoded @@ -758,47 +798,8 @@ msgb_put_u8(msg, cil->id_discr & 0x0f); OSMO_ASSERT(cil->id_list_len <= GSM0808_CELL_ID_LIST2_MAXLEN) - switch (cil->id_discr) { - case CELL_IDENT_WHOLE_GLOBAL: - for (i = 0; i < cil->id_list_len; i++) { - const struct osmo_cell_global_id *id = &cil->id_list[i].global; - struct gsm48_loc_area_id lai; - gsm48_generate_lai2(&lai, &id->lai); - memcpy(msgb_put(msg, sizeof(lai)), &lai, sizeof(lai)); - msgb_put_u16(msg, id->cell_identity); - } - break; - case CELL_IDENT_LAC_AND_CI: - for (i = 0; i < cil->id_list_len; i++) { - const struct osmo_lac_and_ci_id *id = &cil->id_list[i].lac_and_ci; - msgb_put_u16(msg, id->lac); - msgb_put_u16(msg, id->ci); - } - break; - case CELL_IDENT_CI: - for (i = 0; i < cil->id_list_len; i++) - msgb_put_u16(msg, cil->id_list[i].ci); - break; - case CELL_IDENT_LAI_AND_LAC: - for (i = 0; i < cil->id_list_len; i++) { - const struct osmo_location_area_id *id = &cil->id_list[i].lai_and_lac; - struct gsm48_loc_area_id lai; - gsm48_generate_lai2(&lai, id); - memcpy(msgb_put(msg, sizeof(lai)), &lai, sizeof(lai)); - } - break; - case CELL_IDENT_LAC: - for (i = 0; i < cil->id_list_len; i++) - msgb_put_u16(msg, cil->id_list[i].lac); - break; - case CELL_IDENT_BSS: - case CELL_IDENT_NO_CELL: - /* Does not have any list items */ - break; - default: - /* Support for other identifier list types is not implemented. */ - OSMO_ASSERT(false); - } + for (i = 0; i < cil->id_list_len; i++) + gsm0808_msgb_put_cell_id_u(msg, cil->id_discr, &cil->id_list[i]); *tlv_len = (uint8_t) (msg->tail - old_tail); return *tlv_len + 2; diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index adfa096..840bac9 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -242,6 +242,7 @@ gsm0808_lcls_status_names; gsm0808_enc_lcls; gsm0808_dec_lcls; +gsm0808_msgb_put_cell_id_u; gsm29118_msgb_alloc; gsm29118_create_alert_req; -- To view, visit https://gerrit.osmocom.org/13887 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I6cc567798e20365e6587e6b2988e834306d8c80c Gerrit-Change-Number: 13887 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 21:21:39 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 6 May 2019 21:21:39 +0000 Subject: Change in libosmocore[master]: gsm0808_utils: Add gsm0808_decode_cell_id_u() Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13888 Change subject: gsm0808_utils: Add gsm0808_decode_cell_id_u() ...................................................................... gsm0808_utils: Add gsm0808_decode_cell_id_u() This function parses a single Cell ID list element into a 'union gsm0808_cell_id_u'. This function is going to be used by the upcoming CBSP support. Related: OS#3537 Change-Id: I08b33881667aa32f01e53ccb70d44d5b79c7c986 --- M include/osmocom/gsm/gsm0808_utils.h M src/gsm/gsm0808_utils.c M src/gsm/libosmogsm.map 3 files changed, 60 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/88/13888/1 diff --git a/include/osmocom/gsm/gsm0808_utils.h b/include/osmocom/gsm/gsm0808_utils.h index 3a7beb7..fa9d18e 100644 --- a/include/osmocom/gsm/gsm0808_utils.h +++ b/include/osmocom/gsm/gsm0808_utils.h @@ -94,6 +94,7 @@ const struct osmo_cell_global_id *cgi); int gsm0808_cell_id_to_cgi(struct osmo_cell_global_id *cgi, const struct gsm0808_cell_id *cid); void gsm0808_msgb_put_cell_id_u(struct msgb *msg, enum CELL_IDENT id_discr, const union gsm0808_cell_id_u *u); +int gsm0808_decode_cell_id_u(union gsm0808_cell_id_u *out, enum CELL_IDENT discr, const uint8_t *buf, unsigned int len); uint8_t gsm0808_enc_cause(struct msgb *msg, uint16_t cause); uint8_t gsm0808_enc_aoip_trasp_addr(struct msgb *msg, diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c index e825930..fe86031 100644 --- a/src/gsm/gsm0808_utils.c +++ b/src/gsm/gsm0808_utils.c @@ -49,6 +49,17 @@ * \file gsm0808_utils.c */ +/* Decode 5-byte LAI list element data (see TS 08.08 3.2.2.27) into MCC/MNC/LAC. */ +static void decode_lai(const uint8_t *data, struct osmo_location_area_id *decoded) +{ + struct gsm48_loc_area_id lai; + + /* Copy data to stack to prevent unaligned access in gsm48_decode_lai2(). */ + memcpy(&lai, data, sizeof(lai)); /* don't byte swap yet */ + + gsm48_decode_lai2(&lai, decoded); +} + /*! Encode TS 08.08 AoIP Cause IE * \param[out] msg Message Buffer to which to append IE * \param[in] cause Cause code to be used in IE @@ -737,6 +748,53 @@ return (int)(elem - old_elem); } +/*! Decode a single GSM 08.08 Cell ID list element payload + * \param[out] out caller-provided output union + * \param[in] discr Cell ID discriminator describing type to be decoded + * \param[in] buf User-provided input buffer containing binary Cell ID list element + * \param[in] len Length of buf + * \returns 0 on success; negative on error */ +int gsm0808_decode_cell_id_u(union gsm0808_cell_id_u *out, enum CELL_IDENT discr, const uint8_t *buf, unsigned int len) +{ + switch (discr) { + case CELL_IDENT_WHOLE_GLOBAL: + if (len < 7) + return -EINVAL; + decode_lai(buf, &out->global.lai); + out->global.cell_identity = osmo_load16be(buf + sizeof(struct gsm48_loc_area_id)); + break; + case CELL_IDENT_LAC_AND_CI: + if (len < 4) + return -EINVAL; + out->lac_and_ci.lac = osmo_load16be(buf); + out->lac_and_ci.ci = osmo_load16be(buf + sizeof(uint16_t)); + break; + case CELL_IDENT_CI: + if (len < 2) + return -EINVAL; + out->ci = osmo_load16be(buf); + break; + case CELL_IDENT_LAI_AND_LAC: + if (len < 5) + return -EINVAL; + decode_lai(buf, &out->lai_and_lac); + break; + case CELL_IDENT_LAC: + if (len < 2) + return -EINVAL; + out->lac = osmo_load16be(buf); + break; + case CELL_IDENT_BSS: + case CELL_IDENT_NO_CELL: + /* Does not have any list items */ + break; + default: + /* Remaining cell identification types are not implemented. */ + return -EINVAL; + } + return 0; +} + void gsm0808_msgb_put_cell_id_u(struct msgb *msg, enum CELL_IDENT id_discr, const union gsm0808_cell_id_u *u) { switch (id_discr) { @@ -846,17 +904,6 @@ return *tlv_len + 2; } -/* Decode 5-byte LAI list element data (see TS 08.08 3.2.2.27) into MCC/MNC/LAC. */ -static void decode_lai(const uint8_t *data, struct osmo_location_area_id *decoded) -{ - struct gsm48_loc_area_id lai; - - /* Copy data to stack to prevent unaligned access in gsm48_decode_lai2(). */ - memcpy(&lai, data, sizeof(lai)); /* don't byte swap yet */ - - gsm48_decode_lai2(&lai, decoded); -} - static int parse_cell_id_global_list(struct gsm0808_cell_id_list2 *cil, const uint8_t *data, size_t remain, size_t *consumed) { diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 840bac9..c095650 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -243,6 +243,7 @@ gsm0808_enc_lcls; gsm0808_dec_lcls; gsm0808_msgb_put_cell_id_u; +gsm0808_decode_cell_id_u; gsm29118_msgb_alloc; gsm29118_create_alert_req; -- To view, visit https://gerrit.osmocom.org/13888 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I08b33881667aa32f01e53ccb70d44d5b79c7c986 Gerrit-Change-Number: 13888 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 21:44:21 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 6 May 2019 21:44:21 +0000 Subject: Change in osmo-bsc[master]: fix inter-BSC-HO-incoming for AoIP (1/2) In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13797 to look at the new patch set (#4). Change subject: fix inter-BSC-HO-incoming for AoIP (1/2) ...................................................................... fix inter-BSC-HO-incoming for AoIP (1/2) Move the HO_ST_WAIT_MGW_ENDPOINT_TO_MSC state up to right after the lchan is done establishing. For AoIP, the local RTP address towards the MSC already needs to be known before the Handover Request Acknowledge is sent, so the AoIP Transport Layer Address IE can be included. This patch only modifies the handover FSM, a subsequent patch adds the IE. Change-Id: I00c18b78573386145af71c4b39f7f22aec24579b --- M include/osmocom/bsc/handover_fsm.h M src/osmo-bsc/handover_fsm.c 2 files changed, 105 insertions(+), 86 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/97/13797/4 -- To view, visit https://gerrit.osmocom.org/13797 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I00c18b78573386145af71c4b39f7f22aec24579b Gerrit-Change-Number: 13797 Gerrit-PatchSet: 4 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 21:44:21 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 6 May 2019 21:44:21 +0000 Subject: Change in osmo-bsc[master]: fix inter-BSC-HO-incoming for AoIP (2/2) In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13585 to look at the new patch set (#5). Change subject: fix inter-BSC-HO-incoming for AoIP (2/2) ...................................................................... fix inter-BSC-HO-incoming for AoIP (2/2) For AoIP, the AoIP Transport Layer Address IE must be included in the Handover Request Acknowledge message, so the MSC can send RTP to the right place. Add this IE for AoIP. Depends: Ia71542ea37d4fd2c9fb9b40357db7aeb111ec576 (libosmocore) Depends: Id617265337f09dfb6ddfe111ef5e578cd3dc9f63 (libosmocore) Change-Id: Ia05e37da125eb6e7b7be9b974b73261bd72de1f4 --- M src/osmo-bsc/osmo_bsc_bssap.c 1 file changed, 31 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/85/13585/5 -- To view, visit https://gerrit.osmocom.org/13585 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia05e37da125eb6e7b7be9b974b73261bd72de1f4 Gerrit-Change-Number: 13585 Gerrit-PatchSet: 5 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 21:44:23 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 6 May 2019 21:44:23 +0000 Subject: Change in osmo-bsc[master]: abis_rsl.c: missing newlines on log lines Message-ID: Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/13889 Change subject: abis_rsl.c: missing newlines on log lines ...................................................................... abis_rsl.c: missing newlines on log lines Change-Id: Ic8885ca75ff23e4813a133f8fe34b7e67a1bc3e3 --- M src/osmo-bsc/abis_rsl.c 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/89/13889/1 diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 0117435..bc07457 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -1899,7 +1899,7 @@ struct gsm_lchan *lchan = msg->lchan; if (!lchan->fi_rtp) { - LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: CRCX ACK message for unconfigured lchan"); + LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: CRCX ACK message for unconfigured lchan\n"); return -EINVAL; } @@ -1930,7 +1930,7 @@ rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_IPA_NACK]); if (!lchan->fi_rtp) { - LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: CRCX NACK message for unconfigured lchan"); + LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: CRCX NACK message for unconfigured lchan\n"); return -EINVAL; } osmo_fsm_inst_dispatch(msg->lchan->fi_rtp, LCHAN_RTP_EV_IPACC_CRCX_NACK, 0); @@ -1944,7 +1944,7 @@ struct gsm_lchan *lchan = msg->lchan; if (!lchan->fi_rtp) { - LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: MDCX ACK message for unconfigured lchan"); + LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: MDCX ACK message for unconfigured lchan\n"); return -EINVAL; } @@ -1968,7 +1968,7 @@ rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_IPA_NACK]); if (!lchan->fi_rtp) { - LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: MDCX NACK message for unconfigured lchan"); + LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: MDCX NACK message for unconfigured lchan\n"); return -EINVAL; } osmo_fsm_inst_dispatch(msg->lchan->fi_rtp, LCHAN_RTP_EV_IPACC_MDCX_NACK, 0); -- To view, visit https://gerrit.osmocom.org/13889 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ic8885ca75ff23e4813a133f8fe34b7e67a1bc3e3 Gerrit-Change-Number: 13889 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 21:45:45 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 6 May 2019 21:45:45 +0000 Subject: Change in osmo-msc[master]: fix various missing line endings in logging Message-ID: Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/13890 Change subject: fix various missing line endings in logging ...................................................................... fix various missing line endings in logging Change-Id: I013eb0eeb5673c06034465020e5dc5230f45ddf5 --- M src/libmsc/gsm_04_11.c M src/libvlr/vlr.c M src/libvlr/vlr_access_req_fsm.c 3 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/90/13890/1 diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c index da0744a..71069dc 100644 --- a/src/libmsc/gsm_04_11.c +++ b/src/libmsc/gsm_04_11.c @@ -425,7 +425,7 @@ /* unknown subscriber, try local */ goto try_local; if (rc < 0) { - LOG_TRANS(trans, LOGL_ERROR, "SMS delivery error: %d.", rc); + LOG_TRANS(trans, LOGL_ERROR, "SMS delivery error: %d\n", rc); rc = GSM411_RP_CAUSE_MO_TEMP_FAIL; /* rc will be logged by gsm411_send_rp_error() */ rate_ctr_inc(&conn->network->msc_ctrs->ctr[ @@ -451,7 +451,7 @@ if (rc == GSM411_RP_CAUSE_MO_NUM_UNASSIGNED) { rate_ctr_inc(&conn->network->msc_ctrs->ctr[MSC_CTR_SMS_NO_RECEIVER]); } else if (rc < 0) { - LOG_TRANS(trans, LOGL_ERROR, "SMS delivery error: %d.", rc); + LOG_TRANS(trans, LOGL_ERROR, "SMS delivery error: %d\n", rc); rc = GSM411_RP_CAUSE_MO_TEMP_FAIL; /* rc will be logged by gsm411_send_rp_error() */ rate_ctr_inc(&conn->network->msc_ctrs->ctr[ diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 1afdbec..c6d8805 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -1241,7 +1241,7 @@ PR_ARQ_E_TMSI_ACK, NULL); } else { LOGVSUBP(LOGL_NOTICE, vsub, - "gratuitous TMSI REALLOC COMPL"); + "gratuitous TMSI REALLOC COMPL\n"); return -EINVAL; } } diff --git a/src/libvlr/vlr_access_req_fsm.c b/src/libvlr/vlr_access_req_fsm.c index 3040158..fccb6d3 100644 --- a/src/libvlr/vlr_access_req_fsm.c +++ b/src/libvlr/vlr_access_req_fsm.c @@ -141,7 +141,7 @@ * will start handling pending paging transactions. */ if (!fi->proc.parent) { - LOGPFSML(fi, LOGL_ERROR, "No parent FSM"); + LOGPFSML(fi, LOGL_ERROR, "No parent FSM\n"); return; } osmo_fsm_inst_dispatch(fi->proc.parent, -- To view, visit https://gerrit.osmocom.org/13890 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I013eb0eeb5673c06034465020e5dc5230f45ddf5 Gerrit-Change-Number: 13890 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 22:15:11 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 6 May 2019 22:15:11 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bsc: deterministic TC_ho_in_fail_msc_clears: wait for MGW setup Message-ID: Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/13891 Change subject: bsc: deterministic TC_ho_in_fail_msc_clears: wait for MGW setup ...................................................................... bsc: deterministic TC_ho_in_fail_msc_clears: wait for MGW setup Randomly, this test issues the Clear Command so fast that the MGW has not yet been set up, and hence the test cannot possibly see DLCX for endpoint conns that haven't been set up at all. So, simply wait a bit before clearing. Change-Id: Idd0b3810916efd02a499e0ac060a6a275265b8c3 --- M bsc/BSC_Tests.ttcn 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/91/13891/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index fb43d5e..0583b30 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -3195,6 +3195,9 @@ } log("Handover Command chan_nr is", actual_new_chan_nr); + /* For deterministic test results, give some time for the MGW endpoint to be configured */ + f_sleep(1.0); + /* Now the MSC forwards the RR Handover Command to the other BSC, which * tells the MS to handover to the new lchan. In this case, the MS * reports a Handover Failure to the old BSS, which forwards a BSSMAP -- To view, visit https://gerrit.osmocom.org/13891 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Idd0b3810916efd02a499e0ac060a6a275265b8c3 Gerrit-Change-Number: 13891 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 23:11:57 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 6 May 2019 23:11:57 +0000 Subject: Change in osmo-bsc[master]: fix inter-BSC-HO-incoming for AoIP (1/2) In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/13797 ) Change subject: fix inter-BSC-HO-incoming for AoIP (1/2) ...................................................................... fix inter-BSC-HO-incoming for AoIP (1/2) Move the HO_ST_WAIT_MGW_ENDPOINT_TO_MSC state up to right after the lchan is done establishing. For AoIP, the local RTP address towards the MSC already needs to be known before the Handover Request Acknowledge is sent, so the AoIP Transport Layer Address IE can be included. This patch only modifies the handover FSM, a subsequent patch adds the IE. Change-Id: I00c18b78573386145af71c4b39f7f22aec24579b --- M include/osmocom/bsc/handover_fsm.h M src/osmo-bsc/handover_fsm.c 2 files changed, 105 insertions(+), 86 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/include/osmocom/bsc/handover_fsm.h b/include/osmocom/bsc/handover_fsm.h index 4db0890..7c2145e 100644 --- a/include/osmocom/bsc/handover_fsm.h +++ b/include/osmocom/bsc/handover_fsm.h @@ -28,10 +28,10 @@ HO_ST_NOT_STARTED, HO_ST_WAIT_LCHAN_ACTIVE, + HO_ST_WAIT_MGW_ENDPOINT_TO_MSC, HO_ST_WAIT_RR_HO_DETECT, HO_ST_WAIT_RR_HO_COMPLETE, HO_ST_WAIT_LCHAN_ESTABLISHED, - HO_ST_WAIT_MGW_ENDPOINT_TO_MSC, /* The inter-BSC Outgoing Handover FSM has completely separate states, but since it makes sense for it * to also live in conn->ho.fi, it should share the same event enum. From there it is merely @@ -46,11 +46,11 @@ HO_EV_LCHAN_ACTIVE, HO_EV_LCHAN_ESTABLISHED, HO_EV_LCHAN_ERROR, + HO_EV_MSC_MGW_OK, + HO_EV_MSC_MGW_FAIL, HO_EV_RR_HO_DETECT, HO_EV_RR_HO_COMPLETE, HO_EV_RR_HO_FAIL, - HO_EV_MSC_MGW_OK, - HO_EV_MSC_MGW_FAIL, HO_EV_CONN_RELEASING, HO_OUT_EV_BSSMAP_HO_COMMAND, diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c index c044407..442f7be 100644 --- a/src/osmo-bsc/handover_fsm.c +++ b/src/osmo-bsc/handover_fsm.c @@ -162,10 +162,10 @@ static const struct osmo_tdef_state_timeout ho_fsm_timeouts[32] = { [HO_ST_WAIT_LCHAN_ACTIVE] = { .T = 23042 }, + [HO_ST_WAIT_MGW_ENDPOINT_TO_MSC] = { .T = 23042 }, [HO_ST_WAIT_RR_HO_DETECT] = { .T = 23042 }, [HO_ST_WAIT_RR_HO_COMPLETE] = { .T = 23042 }, [HO_ST_WAIT_LCHAN_ESTABLISHED] = { .T = 23042 }, - [HO_ST_WAIT_MGW_ENDPOINT_TO_MSC] = { .T = 23042 }, [HO_OUT_ST_WAIT_HO_COMMAND] = { .T = 7 }, [HO_OUT_ST_WAIT_CLEAR] = { .T = 8 }, }; @@ -878,10 +878,24 @@ static void ho_fsm_wait_lchan_active(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct gsm_subscriber_connection *conn = ho_fi_conn(fi); + struct handover *ho = &conn->ho; switch (event) { case HO_EV_LCHAN_ACTIVE: - ho_fsm_state_chg(HO_ST_WAIT_RR_HO_DETECT); + /* - If the lchan is voiceless, no need to even think about the MGW. + * - If this is an intra-BSC Handover, we already have an RTP stream towards the MSC and aren't + * touching it. + * - If we're on SCCPlite, the MSC manages the MGW endpoint, all we do is the BTS side CI, so we can + * skip the part that would CRCX towards the MSC. + * So create an MSC side endpoint CI only if a voice lchan is established for an incoming inter-BSC + * handover on AoIP. Otherwise go on to send a Handover Command and wait for the Detect. + */ + if (ho->new_lchan->activate.info.requires_voice_stream + && (ho->scope & HO_INTER_BSC_IN) + && gscon_is_aoip(conn)) + ho_fsm_state_chg(HO_ST_WAIT_MGW_ENDPOINT_TO_MSC); + else + ho_fsm_state_chg(HO_ST_WAIT_RR_HO_DETECT); return; case HO_EV_LCHAN_ERROR: @@ -894,6 +908,75 @@ } } +/* Only for voice, only for inter-BSC Handover into this BSC, and only for AoIP: + * + * Establish the MGW endpoint CI that points towards the MSC. This needs to happen after the lchan (lchan_rtp_fsm) has + * created an MGW endpoint with the first CRCX, so that an endpoint is available, and before sending the Handover + * Request Acknowledge, so that the RTP address and port established towards the MSC can be included in the Handover + * Request Acknowledge message. + * (For SCCPlite, the MSC manages the CN side endpoint CI itself, and we don't need to send any RTP address in the + * Handover Request Acknowledge.) + * + * Actually, it should be possible to kick this off even above in handover_start_inter_bsc_in(), to do the CRCX towards + * the MSC at the same time as establishing the lchan. The gscon_ensure_mgw_endpoint() doesn't care which one of + * lchan_rtp_fsm or handover_start_inter_bsc_in() calls it first. The benefit would be that we'd send out the Handover + * Command ever so slightly sooner -- which isn't critical really, because a) how long does a CRCX take, milliseconds? + * and b) the time critical part is *after* the Handover Command was kicked off to keep the transition between cells as + * short as possible. The drawback of doing this earlier is code complexity: receiving the HO_EV_MSC_MGW_OK / + * HO_EV_MSC_MGW_FAIL events would need to be juggled in between the HO_EV_LCHAN_ACTIVE / HO_EV_LCHAN_ERROR. So the + * decision for now is to leave it here. + */ +static void ho_fsm_wait_mgw_endpoint_to_msc_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) +{ + struct gsm_subscriber_connection *conn = ho_fi_conn(fi); + struct handover *ho = &conn->ho; + + if (!gscon_connect_mgw_to_msc(conn, + ho->new_lchan, + ho->inter_bsc_in.msc_assigned_rtp_addr, + ho->inter_bsc_in.msc_assigned_rtp_port, + fi, + HO_EV_MSC_MGW_OK, + HO_EV_MSC_MGW_FAIL, + NULL, + &ho->created_ci_for_msc)) { + ho_fail(HO_RESULT_ERROR, + "Unable to connect MGW endpoint to the MSC side"); + } +} + +static void ho_fsm_wait_mgw_endpoint_to_msc(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct gsm_subscriber_connection *conn = ho_fi_conn(fi); + const struct mgcp_conn_peer *mgw_info; + + switch (event) { + + case HO_EV_MSC_MGW_OK: + /* Ensure the endpoint is really there, and log it. This state is only entered for AoIP connections, see + * ho_fsm_wait_lchan_active() above. */ + mgw_info = osmo_mgcpc_ep_ci_get_rtp_info(conn->user_plane.mgw_endpoint_ci_msc); + if (!mgw_info) { + ho_fail(HO_RESULT_ERROR, + "Unable to retrieve RTP port info allocated by MGW for" + " the MSC side."); + return; + } + LOG_HO(conn, LOGL_DEBUG, "MGW's MSC side CI: %s:%u\n", + mgw_info->addr, mgw_info->port); + ho_fsm_state_chg(HO_ST_WAIT_RR_HO_DETECT); + return; + + case HO_EV_MSC_MGW_FAIL: + ho_fail(HO_RESULT_ERROR, + "Unable to connect MGW endpoint to the MSC side"); + return; + + default: + OSMO_ASSERT(false); + } +} + static void ho_fsm_wait_rr_ho_detect_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) { int rc; @@ -1011,24 +1094,23 @@ } } -static void ho_fsm_post_lchan_established(struct osmo_fsm_inst *fi); - static void ho_fsm_wait_lchan_established_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) { struct gsm_subscriber_connection *conn = ho_fi_conn(fi); if (conn->ho.fi && lchan_state_is(conn->ho.new_lchan, LCHAN_ST_ESTABLISHED)) { LOG_HO(conn, LOGL_DEBUG, "lchan already established earlier\n"); - ho_fsm_post_lchan_established(fi); + ho_success(); } } static void ho_fsm_wait_lchan_established(struct osmo_fsm_inst *fi, uint32_t event, void *data) { - switch (event) { + struct gsm_subscriber_connection *conn = ho_fi_conn(fi); + switch (event) { case HO_EV_LCHAN_ESTABLISHED: - ho_fsm_post_lchan_established(fi); + ho_success(); break; default: @@ -1036,69 +1118,6 @@ } } -static void ho_fsm_post_lchan_established(struct osmo_fsm_inst *fi) -{ - struct gsm_subscriber_connection *conn = ho_fi_conn(fi); - struct handover *ho = &conn->ho; - - if (ho->new_lchan->activate.info.requires_voice_stream - && (ho->scope & HO_INTER_BSC_IN)) - ho_fsm_state_chg(HO_ST_WAIT_MGW_ENDPOINT_TO_MSC); - else - ho_success(); -} - -static void ho_fsm_wait_mgw_endpoint_to_msc_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) -{ - struct gsm_subscriber_connection *conn = ho_fi_conn(fi); - struct handover *ho = &conn->ho; - - if (!gscon_connect_mgw_to_msc(conn, - ho->new_lchan, - ho->inter_bsc_in.msc_assigned_rtp_addr, - ho->inter_bsc_in.msc_assigned_rtp_port, - fi, - HO_EV_MSC_MGW_OK, - HO_EV_MSC_MGW_FAIL, - NULL, - &ho->created_ci_for_msc)) { - ho_fail(HO_RESULT_ERROR, - "Unable to connect MGW endpoint to the MSC side"); - } -} - -static void ho_fsm_wait_mgw_endpoint_to_msc(struct osmo_fsm_inst *fi, uint32_t event, void *data) -{ - struct gsm_subscriber_connection *conn = ho_fi_conn(fi); - switch (event) { - - case HO_EV_MSC_MGW_OK: - /* For AoIP, we created the MGW endpoint. Ensure it is really there, and log it. */ - if (gscon_is_aoip(conn)) { - const struct mgcp_conn_peer *mgw_info; - mgw_info = osmo_mgcpc_ep_ci_get_rtp_info(conn->user_plane.mgw_endpoint_ci_msc); - if (!mgw_info) { - ho_fail(HO_RESULT_ERROR, - "Unable to retrieve RTP port info allocated by MGW for" - " the MSC side."); - return; - } - LOG_HO(conn, LOGL_DEBUG, "MGW's MSC side CI: %s:%u\n", - mgw_info->addr, mgw_info->port); - } - ho_success(); - return; - - case HO_EV_MSC_MGW_FAIL: - ho_fail(HO_RESULT_ERROR, - "Unable to connect MGW endpoint to the MSC side"); - return; - - default: - OSMO_ASSERT(false); - } -} - /* Inter-BSC OUT */ static void handover_start_inter_bsc_out(struct gsm_subscriber_connection *conn, @@ -1187,6 +1206,19 @@ , .out_state_mask = 0 | S(HO_ST_WAIT_LCHAN_ACTIVE) + | S(HO_ST_WAIT_MGW_ENDPOINT_TO_MSC) + | S(HO_ST_WAIT_RR_HO_DETECT) + , + }, + [HO_ST_WAIT_MGW_ENDPOINT_TO_MSC] = { + .name = "WAIT_MGW_ENDPOINT_TO_MSC", + .onenter = ho_fsm_wait_mgw_endpoint_to_msc_onenter, + .action = ho_fsm_wait_mgw_endpoint_to_msc, + .in_event_mask = 0 + | S(HO_EV_MSC_MGW_OK) + | S(HO_EV_MSC_MGW_FAIL) + , + .out_state_mask = 0 | S(HO_ST_WAIT_RR_HO_DETECT) , }, @@ -1224,20 +1256,7 @@ .in_event_mask = 0 | S(HO_EV_LCHAN_ESTABLISHED) , - .out_state_mask = 0 - | S(HO_ST_WAIT_MGW_ENDPOINT_TO_MSC) - , }, - [HO_ST_WAIT_MGW_ENDPOINT_TO_MSC] = { - .name = "WAIT_MGW_ENDPOINT_TO_MSC", - .onenter = ho_fsm_wait_mgw_endpoint_to_msc_onenter, - .action = ho_fsm_wait_mgw_endpoint_to_msc, - .in_event_mask = 0 - | S(HO_EV_MSC_MGW_OK) - | S(HO_EV_MSC_MGW_FAIL) - , - }, - [HO_OUT_ST_WAIT_HO_COMMAND] = { .name = "inter-BSC-OUT:WAIT_HO_COMMAND", .action = ho_out_fsm_wait_ho_command, -- To view, visit https://gerrit.osmocom.org/13797 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I00c18b78573386145af71c4b39f7f22aec24579b Gerrit-Change-Number: 13797 Gerrit-PatchSet: 4 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 23:11:58 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 6 May 2019 23:11:58 +0000 Subject: Change in osmo-bsc[master]: fix inter-BSC-HO-incoming for AoIP (2/2) In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/13585 ) Change subject: fix inter-BSC-HO-incoming for AoIP (2/2) ...................................................................... fix inter-BSC-HO-incoming for AoIP (2/2) For AoIP, the AoIP Transport Layer Address IE must be included in the Handover Request Acknowledge message, so the MSC can send RTP to the right place. Add this IE for AoIP. Depends: Ia71542ea37d4fd2c9fb9b40357db7aeb111ec576 (libosmocore) Depends: Id617265337f09dfb6ddfe111ef5e578cd3dc9f63 (libosmocore) Change-Id: Ia05e37da125eb6e7b7be9b974b73261bd72de1f4 --- M src/osmo-bsc/osmo_bsc_bssap.c 1 file changed, 31 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 470ae42..e79a344 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -43,6 +43,7 @@ #include #include #include +#include #define IP_V4_ADDR_LEN 4 @@ -1214,14 +1215,38 @@ { struct msgb *msg; struct gsm_lchan *new_lchan = conn->ho.new_lchan; + struct sockaddr_storage ss; + struct gsm0808_handover_request_ack params = { + .l3_info = rr_ho_command->data, + .l3_info_len = rr_ho_command->len, + .chosen_channel_present = true, + .chosen_channel = gsm0808_chosen_channel(new_lchan->type, new_lchan->tch_mode), + .chosen_encr_alg = new_lchan->encr.alg_id, + .chosen_speech_version = gsm0808_permitted_speech(new_lchan->type, new_lchan->tch_mode), + }; + + if (gscon_is_aoip(conn)) { + struct osmo_sockaddr_str to_msc_rtp; + const struct mgcp_conn_peer *rtp_info = osmo_mgcpc_ep_ci_get_rtp_info(conn->user_plane.mgw_endpoint_ci_msc); + if (!rtp_info) { + LOG_HO(conn, LOGL_ERROR, + "Handover Request Acknowledge: no RTP address known to send as" + " AoIP Transport Layer Address\n"); + return -EINVAL; + } + if (osmo_sockaddr_str_from_str(&to_msc_rtp, rtp_info->addr, rtp_info->port)) { + LOG_HO(conn, LOGL_ERROR, "Handover Request Acknowledge: cannot encode AoIP Transport Layer\n"); + return -EINVAL; + } + if (osmo_sockaddr_str_to_sockaddr(&to_msc_rtp, &ss)) { + LOG_HO(conn, LOGL_ERROR, "Handover Request Acknowledge: cannot encode AoIP Transport Layer\n"); + return -EINVAL; + } + params.aoip_transport_layer = &ss; + } LOG_HO(conn, LOGL_DEBUG, "Sending BSSMAP Handover Request Acknowledge\n"); - msg = gsm0808_create_handover_request_ack(rr_ho_command->data, rr_ho_command->len, - gsm0808_chosen_channel(new_lchan->type, - new_lchan->tch_mode), - new_lchan->encr.alg_id, - gsm0808_permitted_speech(new_lchan->type, - new_lchan->tch_mode)); + msg = gsm0808_create_handover_request_ack2(¶ms); msgb_free(rr_ho_command); if (!msg) return -ENOMEM; -- To view, visit https://gerrit.osmocom.org/13585 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ia05e37da125eb6e7b7be9b974b73261bd72de1f4 Gerrit-Change-Number: 13585 Gerrit-PatchSet: 5 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 23:12:26 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 6 May 2019 23:12:26 +0000 Subject: Change in osmo-bsc[master]: abis_rsl.c: missing newlines on log lines In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13889 ) Change subject: abis_rsl.c: missing newlines on log lines ...................................................................... Patch Set 1: Code-Review+2 triviality +2 -- To view, visit https://gerrit.osmocom.org/13889 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic8885ca75ff23e4813a133f8fe34b7e67a1bc3e3 Gerrit-Change-Number: 13889 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Comment-Date: Mon, 06 May 2019 23:12:26 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 6 23:12:27 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 6 May 2019 23:12:27 +0000 Subject: Change in osmo-bsc[master]: abis_rsl.c: missing newlines on log lines In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/13889 ) Change subject: abis_rsl.c: missing newlines on log lines ...................................................................... abis_rsl.c: missing newlines on log lines Change-Id: Ic8885ca75ff23e4813a133f8fe34b7e67a1bc3e3 --- M src/osmo-bsc/abis_rsl.c 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified Neels Hofmeyr: Looks good to me, approved diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 0117435..bc07457 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -1899,7 +1899,7 @@ struct gsm_lchan *lchan = msg->lchan; if (!lchan->fi_rtp) { - LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: CRCX ACK message for unconfigured lchan"); + LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: CRCX ACK message for unconfigured lchan\n"); return -EINVAL; } @@ -1930,7 +1930,7 @@ rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_IPA_NACK]); if (!lchan->fi_rtp) { - LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: CRCX NACK message for unconfigured lchan"); + LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: CRCX NACK message for unconfigured lchan\n"); return -EINVAL; } osmo_fsm_inst_dispatch(msg->lchan->fi_rtp, LCHAN_RTP_EV_IPACC_CRCX_NACK, 0); @@ -1944,7 +1944,7 @@ struct gsm_lchan *lchan = msg->lchan; if (!lchan->fi_rtp) { - LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: MDCX ACK message for unconfigured lchan"); + LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: MDCX ACK message for unconfigured lchan\n"); return -EINVAL; } @@ -1968,7 +1968,7 @@ rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_IPA_NACK]); if (!lchan->fi_rtp) { - LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: MDCX NACK message for unconfigured lchan"); + LOG_LCHAN(msg->lchan, LOGL_ERROR, "Rx RSL IPACC: MDCX NACK message for unconfigured lchan\n"); return -EINVAL; } osmo_fsm_inst_dispatch(msg->lchan->fi_rtp, LCHAN_RTP_EV_IPACC_MDCX_NACK, 0); -- To view, visit https://gerrit.osmocom.org/13889 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ic8885ca75ff23e4813a133f8fe34b7e67a1bc3e3 Gerrit-Change-Number: 13889 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 00:22:33 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 May 2019 00:22:33 +0000 Subject: Change in osmo-msc[master]: fix various missing line endings in logging In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13890 ) Change subject: fix various missing line endings in logging ...................................................................... Patch Set 1: Code-Review+2 triviality +2 -- To view, visit https://gerrit.osmocom.org/13890 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I013eb0eeb5673c06034465020e5dc5230f45ddf5 Gerrit-Change-Number: 13890 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Comment-Date: Tue, 07 May 2019 00:22:33 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 00:22:36 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 May 2019 00:22:36 +0000 Subject: Change in osmo-msc[master]: fix various missing line endings in logging In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/13890 ) Change subject: fix various missing line endings in logging ...................................................................... fix various missing line endings in logging Change-Id: I013eb0eeb5673c06034465020e5dc5230f45ddf5 --- M src/libmsc/gsm_04_11.c M src/libvlr/vlr.c M src/libvlr/vlr_access_req_fsm.c 3 files changed, 4 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified Neels Hofmeyr: Looks good to me, approved diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c index da0744a..71069dc 100644 --- a/src/libmsc/gsm_04_11.c +++ b/src/libmsc/gsm_04_11.c @@ -425,7 +425,7 @@ /* unknown subscriber, try local */ goto try_local; if (rc < 0) { - LOG_TRANS(trans, LOGL_ERROR, "SMS delivery error: %d.", rc); + LOG_TRANS(trans, LOGL_ERROR, "SMS delivery error: %d\n", rc); rc = GSM411_RP_CAUSE_MO_TEMP_FAIL; /* rc will be logged by gsm411_send_rp_error() */ rate_ctr_inc(&conn->network->msc_ctrs->ctr[ @@ -451,7 +451,7 @@ if (rc == GSM411_RP_CAUSE_MO_NUM_UNASSIGNED) { rate_ctr_inc(&conn->network->msc_ctrs->ctr[MSC_CTR_SMS_NO_RECEIVER]); } else if (rc < 0) { - LOG_TRANS(trans, LOGL_ERROR, "SMS delivery error: %d.", rc); + LOG_TRANS(trans, LOGL_ERROR, "SMS delivery error: %d\n", rc); rc = GSM411_RP_CAUSE_MO_TEMP_FAIL; /* rc will be logged by gsm411_send_rp_error() */ rate_ctr_inc(&conn->network->msc_ctrs->ctr[ diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 1afdbec..c6d8805 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -1241,7 +1241,7 @@ PR_ARQ_E_TMSI_ACK, NULL); } else { LOGVSUBP(LOGL_NOTICE, vsub, - "gratuitous TMSI REALLOC COMPL"); + "gratuitous TMSI REALLOC COMPL\n"); return -EINVAL; } } diff --git a/src/libvlr/vlr_access_req_fsm.c b/src/libvlr/vlr_access_req_fsm.c index 3040158..fccb6d3 100644 --- a/src/libvlr/vlr_access_req_fsm.c +++ b/src/libvlr/vlr_access_req_fsm.c @@ -141,7 +141,7 @@ * will start handling pending paging transactions. */ if (!fi->proc.parent) { - LOGPFSML(fi, LOGL_ERROR, "No parent FSM"); + LOGPFSML(fi, LOGL_ERROR, "No parent FSM\n"); return; } osmo_fsm_inst_dispatch(fi->proc.parent, -- To view, visit https://gerrit.osmocom.org/13890 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I013eb0eeb5673c06034465020e5dc5230f45ddf5 Gerrit-Change-Number: 13890 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Tue May 7 02:54:25 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 07 May 2019 02:54:25 +0000 Subject: Build failure of network:osmocom:nightly/libosmo-netif in xUbuntu_17.10/x86_64 In-Reply-To: References: Message-ID: <5cd0f37654902_3a5cdc5f81300799@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmo-netif/xUbuntu_17.10/x86_64 Package network:osmocom:nightly/libosmo-netif failed to build in xUbuntu_17.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly libosmo-netif Last lines of build log: [ 264s] autoreconnecting test step 3 [client OK, server OK], FD reg 1 [ 264s] [ 264s] autoreconnecting test step 2 [client OK, server OK], FD reg 0 [ 264s] + [ 264s] +autoreconnecting test step 1 [client OK, server OK], FD reg 0 [ 264s] connection closed with srv [ 264s] [ 264s] -autoreconnecting test step 1 [client OK, server NA], FD reg 0 [ 264s] +autoreconnecting test step 0 [client OK, server NA], FD reg 0 [ 264s] [ 264s] non-reconnecting test step 7 [client NA, server OK], FD reg 1 [ 264s] [ 264s] 1. testsuite.at:4: 1. stream_test (testsuite.at:4): FAILED (testsuite.at:8) [ 264s] debian/rules:27: recipe for target 'override_dh_auto_test' failed [ 264s] make[1]: *** [override_dh_auto_test] Error 1 [ 264s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 264s] debian/rules:13: recipe for target 'build' failed [ 264s] make: *** [build] Error 2 [ 264s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 264s] [ 264s] lamb28 failed "build libosmo-netif_0.4.0.25.e380.dsc" at Tue May 7 02:54:11 UTC 2019. [ 264s] [ 264s] ### VM INTERACTION START ### [ 267s] [ 244.678808] sysrq: SysRq : Power Off [ 267s] [ 244.725265] reboot: Power down [ 267s] ### VM INTERACTION END ### [ 267s] [ 267s] lamb28 failed "build libosmo-netif_0.4.0.25.e380.dsc" at Tue May 7 02:54:14 UTC 2019. [ 267s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Tue May 7 03:36:11 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 May 2019 03:36:11 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13137 to look at the new patch set (#8). Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... large refactoring: support inter-BSC and inter-MSC Handover 3GPP TS 49.008 '4.3 Roles of MSC-A, MSC-I and MSC-T' defines distinct roles: - MSC-A is responsible for managing subscribers, - MSC-I is the gateway to the RAN. - MSC-T is a second transitory gateway to another RAN during Handover. After inter-MSC Handover, the MSC-I is handled by a remote MSC instance, while the original MSC-A retains the responsibility of subscriber management. MSC-T exists in this patch but is not yet used, since Handover is only prepared for, not yet implemented. Facilitate Inter-MSC and inter-BSC Handover by the same internal split of MSC roles. Compared to inter-MSC Handover, mere inter-BSC has the obvious simplifications: - all of MSC-A, MSC-I and MSC-T roles will be served by the same osmo-msc instance, - messages between MSC-A and MSC-{I,T} don't need to be routed via E-interface (GSUP), - no call routing between MSC-A and -I via MNCC necessary. This is the largest code bomb I have submitted, ever. Out of principle, I apologize to everyone trying to read this as a whole. Unfortunately, I see no sense in trying to split this patch into smaller bits. It would be a huge amount of work to introduce these changes in separate chunks, especially if each should in turn be useful and pass all test suites. So, unfortunately, we are stuck with this code bomb. The following are some details and rationale for this rather huge refactoring: * separate MSC subscriber management from ran_conn struct ran_conn is reduced from the pivotal subscriber management entity it has been so far to a mere storage for an SCCP connection ID and an MSC subscriber reference. The new pivotal subscriber management entity is struct msc_a -- struct msub lists the msc_a, msc_i, msc_t roles, the vast majority of code paths however use msc_a, since MSC-A is where all the interesting stuff happens. Before handover, msc_i is an FSM implementation that encodes to the local ran_conn. After inter-MSC Handover, msc_i is a compatible but different FSM implementation that instead forwards via/from GSUP. Same goes for the msc_a struct: if osmo-msc is the MSC-I "RAN proxy" for a remote MSC-A role, the msc_a->fi is an FSM implementation that merely forwards via/from GSUP. * New SCCP implementation for RAN access To be able to forward BSSAP and RANAP messages via the GSUP interface, the individual message layers need to be cleanly separated. The IuCS implementation used until now (iu_client from libosmo-ranap) did not provide this level of separation, and needed a complete rewrite. It was trivial to implement this in such a way that both BSSAP and RANAP can be handled by the same SCCP code, hence the new SCCP-RAN layer also replaces BSSAP handling. sccp_ran.h: struct sccp_ran_inst provides an abstract handler for incoming RAN connections. A set of callback functions provides implementation specific details. * RAN Abstraction (BSSAP vs. RANAP) The common SCCP implementation did set the theme for the remaining refactoring: make all other MSC code paths entirely RAN-implementation-agnostic. ran_infra.c provides data structures that list RAN implementation specifics, from logging to RAN de-/encoding to SCCP callbacks and timers. A ran_infra pointer hence allows complete abstraction of RAN implementations: - managing connected RAN peers (BSC, RNC) in ran_peer.c, - classifying and de-/encoding RAN PDUs, - recording connected LACs and cell IDs and sending out Paging requests to matching RAN peers. * RAN RESET now also for RANAP ran_peer.c absorbs the reset_fsm from a_reset.c; in consequence, RANAP also supports proper RESET semantics now. Hence osmo-hnbgw now also needs to provide proper RESET handling, which it so far duly ignores. (TODO) * RAN de-/encoding abstraction The RAN abstraction mentioned above serves not only to separate RANAP and BSSAP implementations transparently, but also to be able to optionally handle RAN on distinct levels. Before Handover, all RAN messages are handled by the MSC-A role. However, after an inter-MSC Handover, a standalone MSC-I will need to decode RAN PDUs, at least in order to manage Assignment of RTP streams between BSS/RNC and MNCC call forwarding. ran_msg.h provides a common API with abstraction for: - receiving events from RAN, i.e. passing RAN decode from the BSC/RNC and MS/UE: struct ran_dec_msg represents RAN messages decoded from either BSSMAP or RANAP; - sending RAN events: ran_enc_msg is the counterpart to compose RAN messages that should be encoded to either BSSMAP or RANAP and passed down to the BSC/RNC and MS/UE. The RAN-specific implementations are completely contained by ran_msg_a.c and ran_msg_iu.c. In particular, Assignment and Ciphering have so far been distinct code paths for BSSAP and RANAP, with switch(via_ran){...} statements all over the place. Using RAN_DEC_* and RAN_ENC_* abstractions, these are now completely unified. Note that SGs does not qualify for RAN abstraction: the SGs interface always remains with the MSC-A role, and SGs messages follow quite distinct semantics from the fairly similar GERAN and UTRAN. * MGW and RTP stream management So far, managing MGW endpoints via MGCP was tightly glued in-between GSM-04.08-CC on the one and MNCC on the other side. Prepare for switching RTP streams between different RAN peers by moving to object-oriented implementations: implement struct call_leg and struct rtp_stream with distinct FSMs each. For MGW communication, use the osmo_mgcpc_ep API that has originated from osmo-bsc and recently moved to libosmo-mgcp-client for this purpose. Instead of implementing a sequence of events with code duplication for the RAN and CN sides, the idea is to manage each RTP stream separately by firing and receiving events as soon as codecs and RTP ports are negotiated, and letting the individual FSMs take care of the MGW management "asynchronously". The caller provides event IDs and an FSM instance that should be notified of RTP stream setup progress. Hence it becomes possible to reconnect RTP streams from one GSM-04.08-CC to another (inter-BSC Handover) or between CC and MNCC RTP peers (inter-MSC Handover) without duplicating the MGCP code for each transition. The number of FSM implementations used for MGCP handling may seem a bit of an overkill. But in fact, the number of perspectives on RTP forwarding are far from trivial: - an MGW endpoint is an entity with N connections, and MGCP "sessions" for configuring them by talking to the MGW; - an RTP stream is a remote peer connected to one of the endpoint's connections, which is asynchronously notified of codec and RTP port choices; - a call leg is the higher level view on either an MT or MO side of a voice call, a combination of two RTP streams to forward between two remote peers. BSC MGW PBX CI CI [MGW-endpoint] [--rtp_stream--] [--rtp_stream--] [----------------call_leg----------------] * Use counts Introduce using the new osmo_use_count API added to libosmocore for this purpose. Each use token has a distinct name in the logging, which can be a globally constant name or ad-hoc, like the local __func__ string constant. Use in the new struct msc_a, as well as change vlr_subscr to the new osmo_use_count API. * FSM Timeouts Introduce using the new osmo_tdef API, which provides a common VTY implementation for all timer numbers, and FSM state transitions with the correct timeout. Originated in osmo-bsc, recently moved to libosmocore. Depends: Ife31e6798b4e728a23913179e346552a7dd338c0 (libosmocore) Ib9af67b100c4583342a2103669732dab2e577b04 (libosmocore) Id617265337f09dfb6ddfe111ef5e578cd3dc9f63 (libosmocore) Ie9e2add7bbfae651c04e230d62e37cebeb91b0f5 (libosmo-sccp) I26be5c4b06a680f25f19797407ab56a5a4880ddc (osmo-mgw) Ida0e59f9a1f2dd18efea0a51680a67b69f141efa (osmo-mgw) I9a3effd38e72841529df6c135c077116981dea36 (osmo-mgw) Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd --- M configure.ac A doc/sequence_charts/Makefile.am A doc/sequence_charts/inter_bsc_ho.msc A doc/sequence_charts/inter_msc_ho.msc A doc/sequence_charts/mncc_fsm.msc M include/osmocom/msc/Makefile.am D include/osmocom/msc/a_iface.h D include/osmocom/msc/a_iface_bssap.h D include/osmocom/msc/a_reset.h A include/osmocom/msc/call_leg.h A include/osmocom/msc/cell_id_list.h A include/osmocom/msc/e_link.h M include/osmocom/msc/gsm_04_08.h M include/osmocom/msc/gsm_04_11.h M include/osmocom/msc/gsm_04_11_gsup.h M include/osmocom/msc/gsm_04_14.h M include/osmocom/msc/gsm_04_80.h M include/osmocom/msc/gsm_09_11.h M include/osmocom/msc/gsm_data.h M include/osmocom/msc/gsm_data_shared.h M include/osmocom/msc/gsm_subscriber.h A include/osmocom/msc/gsup_client_mux.h D include/osmocom/msc/iu_dummy.h D include/osmocom/msc/iucs.h D include/osmocom/msc/iucs_ranap.h M include/osmocom/msc/mncc.h A include/osmocom/msc/mncc_call.h A include/osmocom/msc/msc_a.h A include/osmocom/msc/msc_a_remote.h M include/osmocom/msc/msc_common.h A include/osmocom/msc/msc_ho.h A include/osmocom/msc/msc_i.h A include/osmocom/msc/msc_i_remote.h D include/osmocom/msc/msc_ifaces.h D include/osmocom/msc/msc_mgcp.h A include/osmocom/msc/msc_roles.h A include/osmocom/msc/msc_t.h A include/osmocom/msc/msc_t_remote.h A include/osmocom/msc/msub.h A include/osmocom/msc/neighbor_ident.h A include/osmocom/msc/paging.h M include/osmocom/msc/ran_conn.h A include/osmocom/msc/ran_infra.h A include/osmocom/msc/ran_msg.h A include/osmocom/msc/ran_msg_a.h A include/osmocom/msc/ran_msg_iu.h A include/osmocom/msc/ran_peer.h A include/osmocom/msc/rtp_stream.h A include/osmocom/msc/sccp_ran.h M include/osmocom/msc/sgs_iface.h M include/osmocom/msc/signal.h M include/osmocom/msc/silent_call.h M include/osmocom/msc/sms_queue.h M include/osmocom/msc/transaction.h M include/osmocom/msc/vlr.h M include/osmocom/msc/vlr_sgs.h M src/libmsc/Makefile.am D src/libmsc/a_iface.c D src/libmsc/a_iface_bssap.c D src/libmsc/a_reset.c A src/libmsc/call_leg.c A src/libmsc/cell_id_list.c A src/libmsc/e_link.c M src/libmsc/gsm_04_08.c M src/libmsc/gsm_04_08_cc.c M src/libmsc/gsm_04_11.c M src/libmsc/gsm_04_11_gsup.c M src/libmsc/gsm_04_14.c M src/libmsc/gsm_04_80.c M src/libmsc/gsm_09_11.c D src/libmsc/gsm_subscriber.c A src/libmsc/gsup_client_mux.c D src/libmsc/iu_dummy.c D src/libmsc/iucs.c D src/libmsc/iucs_ranap.c M src/libmsc/mncc.c M src/libmsc/mncc_builtin.c A src/libmsc/mncc_call.c M src/libmsc/mncc_sock.c A src/libmsc/msc_a.c A src/libmsc/msc_a_remote.c A src/libmsc/msc_ho.c A src/libmsc/msc_i.c A src/libmsc/msc_i_remote.c D src/libmsc/msc_ifaces.c D src/libmsc/msc_mgcp.c A src/libmsc/msc_net_init.c A src/libmsc/msc_t.c A src/libmsc/msc_t_remote.c M src/libmsc/msc_vty.c A src/libmsc/msub.c A src/libmsc/neighbor_ident.c A src/libmsc/neighbor_ident_vty.c D src/libmsc/osmo_msc.c A src/libmsc/paging.c M src/libmsc/ran_conn.c A src/libmsc/ran_infra.c A src/libmsc/ran_msg.c A src/libmsc/ran_msg_a.c A src/libmsc/ran_msg_iu.c A src/libmsc/ran_peer.c A src/libmsc/ran_up_l2.c M src/libmsc/rrlp.c A src/libmsc/rtp_stream.c A src/libmsc/sccp_ran.c M src/libmsc/sgs_iface.c M src/libmsc/sgs_server.c M src/libmsc/silent_call.c M src/libmsc/smpp_openbsc.c M src/libmsc/smpp_smsc.h M src/libmsc/sms_queue.c M src/libmsc/transaction.c M src/libvlr/vlr.c M src/libvlr/vlr_access_req_fsm.c M src/libvlr/vlr_lu_fsm.c M src/libvlr/vlr_sgs.c M src/libvlr/vlr_sgs_fsm.c M src/osmo-msc/Makefile.am M src/osmo-msc/msc_main.c M tests/Makefile.am M tests/msc_vlr/Makefile.am M tests/msc_vlr/msc_vlr_test_authen_reuse.c M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_test_gsm_authen.c M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.c M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.c M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.c M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.c M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.c M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_ss.c M tests/msc_vlr/msc_vlr_test_ss.err M tests/msc_vlr/msc_vlr_test_umts_authen.c M tests/msc_vlr/msc_vlr_test_umts_authen.err M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h M tests/sms_queue/Makefile.am M tests/sms_queue/sms_queue_test.c A tests/test_neighbor_ident.vty M tests/test_nodes.vty 151 files changed, 35,651 insertions(+), 22,989 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/13137/8 -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 8 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-CC: Harald Welte Gerrit-CC: Pau Espin Pedrol Gerrit-CC: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 06:30:35 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 May 2019 06:30:35 +0000 Subject: Change in osmo-bsc[master]: handover_fsm.c: fix: prevent possible buffer overflow In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13885 ) Change subject: handover_fsm.c: fix: prevent possible buffer overflow ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13885 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If51f8f82d3b2462cb7d7a531fe4411509344842b Gerrit-Change-Number: 13885 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 07 May 2019 06:30:35 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 06:30:46 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 May 2019 06:30:46 +0000 Subject: Change in osmo-bsc[master]: handover_fsm.c: fix: prevent possible buffer overflow In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13885 ) Change subject: handover_fsm.c: fix: prevent possible buffer overflow ...................................................................... handover_fsm.c: fix: prevent possible buffer overflow Change-Id: If51f8f82d3b2462cb7d7a531fe4411509344842b Fixes: CID#197643 --- M src/osmo-bsc/handover_fsm.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c index 442f7be..22618c5 100644 --- a/src/osmo-bsc/handover_fsm.c +++ b/src/osmo-bsc/handover_fsm.c @@ -637,6 +637,7 @@ if (req->ei.key_len > sizeof(info.encr.key)) { ho_fail(HO_RESULT_ERROR, "Encryption Information IE key length is too large: %u\n", req->ei.key_len); + return; } memcpy(info.encr.key, req->ei.key, req->ei.key_len); info.encr.key_len = req->ei.key_len; -- To view, visit https://gerrit.osmocom.org/13885 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If51f8f82d3b2462cb7d7a531fe4411509344842b Gerrit-Change-Number: 13885 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 06:31:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 May 2019 06:31:08 +0000 Subject: Change in docker-playground[master]: debian-*-build: don't download "Release" file In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13867 ) Change subject: debian-*-build: don't download "Release" file ...................................................................... Patch Set 2: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13867 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ieedb310814412f235e56bdc65517404842eac00f Gerrit-Change-Number: 13867 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Tue, 07 May 2019 06:31:08 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 06:31:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 May 2019 06:31:16 +0000 Subject: Change in docker-playground[master]: debian-*-build: don't download "Release" file In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13867 ) Change subject: debian-*-build: don't download "Release" file ...................................................................... debian-*-build: don't download "Release" file Stop jenkins jobs from failing, due to the download errors we are getting from time to time, by simply not downloading these files. They are redundant, because we are already running 'docker build --pull' before trying to build the debian-*-build images [1], and the docker images are released at least as often, as the "Release" file gets updated [2]. This is in line with how it is done in osmo-ci.git. [1]: Change-Id: I1076bbb7d77bdc99f5d60d641c09ce965fb9dfc6 [2]: https://hub.docker.com/_/debian Change-Id: Ieedb310814412f235e56bdc65517404842eac00f --- M debian-jessie-build/Dockerfile M debian-stretch-build/Dockerfile 2 files changed, 0 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/debian-jessie-build/Dockerfile b/debian-jessie-build/Dockerfile index 29daff6..6fe1efa 100644 --- a/debian-jessie-build/Dockerfile +++ b/debian-jessie-build/Dockerfile @@ -2,7 +2,6 @@ MAINTAINER Harald Welte -ADD http://ftp.debian.org/debian/dists/jessie/Release /tmp/Release RUN apt-get update && \ apt-get upgrade -y && \ apt-get install -y --no-install-recommends \ diff --git a/debian-stretch-build/Dockerfile b/debian-stretch-build/Dockerfile index e262d86..a4526f7 100644 --- a/debian-stretch-build/Dockerfile +++ b/debian-stretch-build/Dockerfile @@ -2,7 +2,6 @@ MAINTAINER Harald Welte -ADD http://ftp.debian.org/debian/dists/stretch/Release /tmp/Release RUN apt-get update && \ apt-get upgrade -y && \ apt-get install -y --no-install-recommends \ -- To view, visit https://gerrit.osmocom.org/13867 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ieedb310814412f235e56bdc65517404842eac00f Gerrit-Change-Number: 13867 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 06:33:38 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 May 2019 06:33:38 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bsc: deterministic TC_ho_in_fail_msc_clears: wait for MGW setup In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13891 ) Change subject: bsc: deterministic TC_ho_in_fail_msc_clears: wait for MGW setup ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13891 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Idd0b3810916efd02a499e0ac060a6a275265b8c3 Gerrit-Change-Number: 13891 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 07 May 2019 06:33:38 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 06:33:40 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 May 2019 06:33:40 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bsc: deterministic TC_ho_in_fail_msc_clears: wait for MGW setup In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13891 ) Change subject: bsc: deterministic TC_ho_in_fail_msc_clears: wait for MGW setup ...................................................................... bsc: deterministic TC_ho_in_fail_msc_clears: wait for MGW setup Randomly, this test issues the Clear Command so fast that the MGW has not yet been set up, and hence the test cannot possibly see DLCX for endpoint conns that haven't been set up at all. So, simply wait a bit before clearing. Change-Id: Idd0b3810916efd02a499e0ac060a6a275265b8c3 --- M bsc/BSC_Tests.ttcn 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index fb43d5e..0583b30 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -3195,6 +3195,9 @@ } log("Handover Command chan_nr is", actual_new_chan_nr); + /* For deterministic test results, give some time for the MGW endpoint to be configured */ + f_sleep(1.0); + /* Now the MSC forwards the RR Handover Command to the other BSC, which * tells the MS to handover to the new lchan. In this case, the MS * reports a Handover Failure to the old BSS, which forwards a BSSMAP -- To view, visit https://gerrit.osmocom.org/13891 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Idd0b3810916efd02a499e0ac060a6a275265b8c3 Gerrit-Change-Number: 13891 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 06:34:48 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 May 2019 06:34:48 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: mo and mt voice call tests: add lots of missing parts In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13616 ) Change subject: msc: mo and mt voice call tests: add lots of missing parts ...................................................................... Patch Set 5: bsc code needs to be adjusted -- To view, visit https://gerrit.osmocom.org/13616 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I162985045bb5e129977a3a797b656e30220990df Gerrit-Change-Number: 13616 Gerrit-PatchSet: 5 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 07 May 2019 06:34:48 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 06:35:29 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 May 2019 06:35:29 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: mo and mt voice call tests: add lots of missing parts In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13616 ) Change subject: msc: mo and mt voice call tests: add lots of missing parts ...................................................................... Patch Set 5: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13616 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I162985045bb5e129977a3a797b656e30220990df Gerrit-Change-Number: 13616 Gerrit-PatchSet: 5 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 07 May 2019 06:35:29 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 08:34:31 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 May 2019 08:34:31 +0000 Subject: Change in libosmocore[master]: Add VTY and CTRL port numbers for OsmoCBC (Cell Broadcast Centre) In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13886 ) Change subject: Add VTY and CTRL port numbers for OsmoCBC (Cell Broadcast Centre) ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13886 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2075420048b43973c800ba0fc389f4b559437233 Gerrit-Change-Number: 13886 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 07 May 2019 08:34:31 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 08:38:19 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 May 2019 08:38:19 +0000 Subject: Change in libosmocore[master]: gsm0808_utils: Introduce gsm0808_msgb_put_cell_id_u() In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13887 ) Change subject: gsm0808_utils: Introduce gsm0808_msgb_put_cell_id_u() ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/13887/1/src/gsm/gsm0808_utils.c File src/gsm/gsm0808_utils.c: https://gerrit.osmocom.org/#/c/13887/1/src/gsm/gsm0808_utils.c at 802 PS1, Line 802: gsm0808_msgb_put_cell_id_u(msg, cil->id_discr, &cil->id_list[i]); Can you really have different id_discr in encoding of list in CBSP? Otherwise it makes sense to keep the foor loop inside. -- To view, visit https://gerrit.osmocom.org/13887 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6cc567798e20365e6587e6b2988e834306d8c80c Gerrit-Change-Number: 13887 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 07 May 2019 08:38:19 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 08:46:07 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 May 2019 08:46:07 +0000 Subject: Change in libosmocore[master]: gsm0808_utils: Add gsm0808_decode_cell_id_u() In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13888 ) Change subject: gsm0808_utils: Add gsm0808_decode_cell_id_u() ...................................................................... Patch Set 1: (2 comments) https://gerrit.osmocom.org/#/c/13888/1/src/gsm/gsm0808_utils.c File src/gsm/gsm0808_utils.c: https://gerrit.osmocom.org/#/c/13888/1/src/gsm/gsm0808_utils.c at 761 PS1, Line 761: if (len < 7) would be good to known where do this sizes come from. Perhaps we have some structs we can use with sizeof() here? https://gerrit.osmocom.org/#/c/13888/1/src/gsm/gsm0808_utils.c at 796 PS1, Line 796: } Just to make sure: It is intendeded that "discr" is not set somewhere inside "out"? In order to have together which values are avaialable with the values (as in a variant let's say). -- To view, visit https://gerrit.osmocom.org/13888 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I08b33881667aa32f01e53ccb70d44d5b79c7c986 Gerrit-Change-Number: 13888 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 07 May 2019 08:46:07 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 08:55:20 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 May 2019 08:55:20 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13137 ) Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... Patch Set 8: Build error: In file included from /build/deps/install/stow/osmo-mgw/include/osmocom/mgcp_client/mgcp_common.h:45:0, from /build/deps/install/stow/osmo-mgw/include/osmocom/mgcp_client/mgcp_client.h:6, from ../../include/osmocom/msc/gsm_data.h:16, from e_link.c:27: e_link.c: In function ?msc_a_i_t_gsup_rx?: /build/deps/install/stow/libosmocore/include/osmocom/core/logging.h:95:5: error: ?msub? may be used uninitialized in this function [-Werror=maybe-uninitialized] logp2(ss, level, __FILE__, __LINE__, cont, fmt, ##args); \ ^ e_link.c:161:15: note: ?msub? was declared here struct msub *msub; ^ -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 8 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-CC: Harald Welte Gerrit-CC: Pau Espin Pedrol Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 07 May 2019 08:55:20 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 10:05:44 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 7 May 2019 10:05:44 +0000 Subject: Change in osmo-msc[master]: vty: make retrieve-imeisv-early configurable Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/13892 Change subject: vty: make retrieve-imeisv-early configurable ...................................................................... vty: make retrieve-imeisv-early configurable Prepare for Rhizomatica's subscriber on demand use case, in which the network access is disabled by default for new subscribers, but the IMEI is required in the HLR to find out which user has which IMSI. Due to the network access being disabled, the location update fails and the MS gets rejected, so we need to get the IMEI early. The OsmoHLR documentation referenced in the code will be added in osmo-hlr.git's Change-Id I2dd4a56f7b8be8b5d0e6fc32e04459e5e278d0a9. Related: OS#2542 Change-Id: I256224194c3b8caf2b58a88d11dccd32c569201f --- M src/libmsc/msc_vty.c M tests/test_nodes.vty 2 files changed, 19 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/92/13892/1 diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index 9bc8f3a..cce8aac 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -460,6 +460,19 @@ return CMD_SUCCESS; } +DEFUN(cfg_msc_retrieve_imeisv_early, cfg_msc_retrieve_imeisv_early_cmd, + "retrieve-imeisv-early (0|1)", + "Retrieve the IMEISV from the MS before doing the location update. In combination with other MSC and HLR" + " configuration, this allows sending the IMEI to the HLR, even if the MS would get rejected in the location" + " update. To set this up with OsmoHLR, see the \"Configuring the Subscribers Create on Demand Feature\" section" + " of the OsmoHLR user manual.\n" + "Retrieve IMEISV before location update\n" + "Do not retrieve IMEISV before location update\n") +{ + gsmnet->vlr->cfg.retrieve_imeisv_early = atoi(argv[0]) ? true : false; + return CMD_SUCCESS; +} + DEFUN(cfg_msc_paging_response_timer, cfg_msc_paging_response_timer_cmd, "paging response-timer (default|<1-65535>)", "Configure Paging\n" @@ -535,6 +548,10 @@ vty_out(vty, " check-imei-rqd 1 %s", VTY_NEWLINE); + if (gsmnet->vlr->cfg.retrieve_imeisv_early) + vty_out(vty, " retrieve-imeisv-early 1 %s", + VTY_NEWLINE); + if (gsmnet->paging_response_timer != MSC_PAGING_RESPONSE_TIMER_DEFAULT) vty_out(vty, " paging response-timer %u%s", gsmnet->paging_response_timer, VTY_NEWLINE); @@ -1686,6 +1703,7 @@ install_element(MSC_NODE, &cfg_msc_auth_tuple_max_reuse_count_cmd); install_element(MSC_NODE, &cfg_msc_auth_tuple_reuse_on_error_cmd); install_element(MSC_NODE, &cfg_msc_check_imei_rqd_cmd); + install_element(MSC_NODE, &cfg_msc_retrieve_imeisv_early_cmd); install_element(MSC_NODE, &cfg_msc_cs7_instance_a_cmd); install_element(MSC_NODE, &cfg_msc_cs7_instance_iu_cmd); install_element(MSC_NODE, &cfg_msc_paging_response_timer_cmd); diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty index 8aceb86..7996ace 100644 --- a/tests/test_nodes.vty +++ b/tests/test_nodes.vty @@ -39,6 +39,7 @@ auth-tuple-max-reuse-count <-1-2147483647> auth-tuple-reuse-on-error (0|1) check-imei-rqd (0|1) + retrieve-imeisv-early (0|1) cs7-instance-a <0-15> cs7-instance-iu <0-15> paging response-timer (default|<1-65535>) -- To view, visit https://gerrit.osmocom.org/13892 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I256224194c3b8caf2b58a88d11dccd32c569201f Gerrit-Change-Number: 13892 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 10:05:44 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 7 May 2019 10:05:44 +0000 Subject: Change in osmo-msc[master]: vlr: when setting IMEISV, also set IMEI Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/13893 Change subject: vlr: when setting IMEISV, also set IMEI ...................................................................... vlr: when setting IMEISV, also set IMEI Fix IMEI length in vlr_subscr->imei, and copy IMEISV to IMEI when IMEISV changes. The additional SV digits will get cut off then. This is needed for the subscriber on demand use case, since we can get the IMEISV early (see [1]), but need to send the IMEI to the Check IMEI procedure. While adjusting the tests, I have noticed that there are code paths where we ask the MS for the IMEISV first, and later ask the MS for the IMEI, although we already have the IMEISV. This could be improved in a future patch. [1] Change-Id I256224194c3b8caf2b58a88d11dccd32c569201f Related: OS#2542 Change-Id: I02e7b66848bf7dddb31b105e2ae981432817ae1e --- M include/osmocom/msc/vlr.h M src/libvlr/vlr.c M tests/msc_vlr/msc_vlr_test_gsm_authen.c M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_no_authen.err 8 files changed, 66 insertions(+), 61 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/93/13893/1 diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index ce6a232..a8a3810 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -151,7 +151,7 @@ struct osmo_cell_global_id cgi; /* 2.4.16 */ char imeisv[GSM23003_IMEISV_NUM_DIGITS+1]; /* 2.2.3 */ - char imei[GSM23003_IMEISV_NUM_DIGITS+1]; /* 2.1.9 */ + char imei[GSM23003_IMEI_NUM_DIGITS_NO_CHK+1]; /* 2.1.9 */ bool imsi_detached_flag; /* 2.7.1 */ bool conf_by_radio_contact_ind; /* 2.7.4.1 */ bool sub_dataconf_by_hlr_ind; /* 2.7.4.2 */ diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 1afdbec..03d6be6 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -462,6 +462,9 @@ OSMO_STRLCPY_ARRAY(vsub->imeisv, imeisv); DEBUGP(DVLR, "set IMEISV on subscriber; IMSI=%s IMEISV=%s\n", vsub->imsi, vsub->imeisv); + + /* Copy IMEISV to IMEI (additional SV digits get cut off) */ + vlr_subscr_set_imei(vsub, imeisv); } /* Safely copy the given MSISDN string to vsub->msisdn */ diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.c b/tests/msc_vlr/msc_vlr_test_gsm_authen.c index 0153609..2da5108 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_authen.c +++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.c @@ -575,7 +575,7 @@ thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0"); + gsup_expect_tx("30010809710000004026f050080724433224433224"); ms_sends_msg("0559084a32244332244302"); EXPECT_ACCEPTED(false); thwart_rx_non_initial_requests(); @@ -593,7 +593,7 @@ btw("Subscriber has the IMEI"); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); - VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d"); + VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d"); vlr_subscr_put(vsub, __func__); BTW("subscriber detaches"); @@ -683,7 +683,7 @@ thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0"); + gsup_expect_tx("30010809710000004026f050080724433224433224"); ms_sends_msg("0559084a32244332244302"); EXPECT_ACCEPTED(false); thwart_rx_non_initial_requests(); @@ -776,7 +776,7 @@ thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0"); + gsup_expect_tx("30010809710000004026f050080724433224433224"); ms_sends_msg("0559084a32244332244302"); EXPECT_ACCEPTED(false); thwart_rx_non_initial_requests(); @@ -870,7 +870,7 @@ thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0"); + gsup_expect_tx("30010809710000004026f050080724433224433224"); ms_sends_msg("0559084a32244332244302"); EXPECT_ACCEPTED(false); thwart_rx_non_initial_requests(); @@ -904,7 +904,7 @@ btw("Subscriber has the IMEI and TMSI"); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); - VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d"); + VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d"); VERBOSE_ASSERT(vsub->tmsi, == 0x03020100, "0x%08x"); vlr_subscr_put(vsub, __func__); diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.err b/tests/msc_vlr/msc_vlr_test_gsm_authen.err index 457b77f..0cf1ab2 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_authen.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.err @@ -1300,10 +1300,10 @@ DREF IMSI-901700000004620:MSISDN-46071: MSC conn use + dtap == 1 (0x2: dtap) DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -DVLR GSUP tx: 30010809710000004026f050090824433224433224f0 -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0 +DVLR GSUP tx: 30010809710000004026f050080724433224433224 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: ) DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED @@ -1359,7 +1359,7 @@ llist_count(&net->ran_conns) == 0 - Subscriber has the IMEI DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_gsm_authen_imei: now used by 2 (attached,test_gsm_authen_imei) - strcmp(vsub->imei, "423423423423420") == 0 + strcmp(vsub->imei, "42342342342342") == 0 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_gsm_authen_imei: now used by 1 (attached) --- - subscriber detaches @@ -1546,10 +1546,10 @@ DREF IMSI-901700000004620:MSISDN-46071: MSC conn use + dtap == 1 (0x2: dtap) DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -DVLR GSUP tx: 30010809710000004026f050090824433224433224f0 -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0 +DVLR GSUP tx: 30010809710000004026f050080724433224433224 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: ) DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED @@ -1765,10 +1765,10 @@ DREF IMSI-901700000004620:MSISDN-46071: MSC conn use + dtap == 1 (0x2: dtap) DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -DVLR GSUP tx: 30010809710000004026f050090824433224433224f0 -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0 +DVLR GSUP tx: 30010809710000004026f050080724433224433224 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: ) DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED @@ -1985,10 +1985,10 @@ DREF IMSI-901700000004620:MSISDN-46071: MSC conn use + dtap == 1 (0x2: dtap) DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -DVLR GSUP tx: 30010809710000004026f050090824433224433224f0 -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0 +DVLR GSUP tx: 30010809710000004026f050080724433224433224 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: ) DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED @@ -2077,7 +2077,7 @@ llist_count(&net->ran_conns) == 0 - Subscriber has the IMEI and TMSI DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 + test_gsm_authen_tmsi_imei: now used by 2 (attached,test_gsm_authen_tmsi_imei) - strcmp(vsub->imei, "423423423423420") == 0 + strcmp(vsub->imei, "42342342342342") == 0 vsub->tmsi == 0x03020100 DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 - test_gsm_authen_tmsi_imei: now used by 1 (attached) --- diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c index cbcc11d..e1ee156 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c @@ -555,7 +555,7 @@ thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0"); + gsup_expect_tx("30010809710000004026f050080724433224433224"); ms_sends_msg("0559084a32244332244302"); EXPECT_ACCEPTED(false); thwart_rx_non_initial_requests(); @@ -573,7 +573,7 @@ btw("Subscriber has the IMEI"); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); - VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d"); + VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d"); vlr_subscr_put(vsub, __func__); BTW("subscriber detaches"); @@ -766,7 +766,7 @@ thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0"); + gsup_expect_tx("30010809710000004026f050080724433224433224"); ms_sends_msg("0559084a32244332244302"); EXPECT_ACCEPTED(false); thwart_rx_non_initial_requests(); @@ -800,7 +800,7 @@ btw("Subscriber has the IMEI and TMSI"); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); - VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d"); + VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d"); VERBOSE_ASSERT(vsub->tmsi, == 0x03020100, "0x%08x"); vlr_subscr_put(vsub, __func__); diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err index 9ca5b8c..6674734 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err @@ -1243,10 +1243,10 @@ DREF IMSI-901700000004620:MSISDN-46071: MSC conn use + dtap == 1 (0x2: dtap) DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -DVLR GSUP tx: 30010809710000004026f050090824433224433224f0 -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0 +DVLR GSUP tx: 30010809710000004026f050080724433224433224 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: ) DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED @@ -1302,7 +1302,7 @@ llist_count(&net->ran_conns) == 0 - Subscriber has the IMEI DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_ciph_imei: now used by 2 (attached,test_ciph_imei) - strcmp(vsub->imei, "423423423423420") == 0 + strcmp(vsub->imei, "42342342342342") == 0 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_ciph_imei: now used by 1 (attached) --- - subscriber detaches @@ -1435,6 +1435,7 @@ DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_CIPH}: Received Event VLR_ULA_E_CIPH_RES DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_CIPH}: got IMEISV: 4234234234234275F DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=4234234234234275 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_CIPH}: vlr_loc_upd_post_ciph() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_CIPH}: vlr_loc_upd_node_4() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_CIPH}: state_chg to VLR_ULA_S_WAIT_HLR_UPD @@ -1711,10 +1712,10 @@ DREF IMSI-901700000004620:MSISDN-46071: MSC conn use + dtap == 1 (0x2: dtap) DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -DVLR GSUP tx: 30010809710000004026f050090824433224433224f0 -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0 +DVLR GSUP tx: 30010809710000004026f050080724433224433224 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: ) DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED @@ -1803,7 +1804,7 @@ llist_count(&net->ran_conns) == 0 - Subscriber has the IMEI and TMSI DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 + test_ciph_tmsi_imei: now used by 2 (attached,test_ciph_tmsi_imei) - strcmp(vsub->imei, "423423423423420") == 0 + strcmp(vsub->imei, "42342342342342") == 0 vsub->tmsi == 0x03020100 DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 - test_ciph_tmsi_imei: now used by 1 (attached) --- diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.c b/tests/msc_vlr/msc_vlr_test_no_authen.c index 2a4a14e..e5dd0b7 100644 --- a/tests/msc_vlr/msc_vlr_test_no_authen.c +++ b/tests/msc_vlr/msc_vlr_test_no_authen.c @@ -430,7 +430,7 @@ thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0"); + gsup_expect_tx("30010809710000004026f050080724433224433224"); /* 3GPP TS 23.003: 6.2.1 Composition of IMEI: the IMEI ends with a * spare digit that shall be sent as zero by the MS. */ ms_sends_msg("0559084a32244332244302"); @@ -448,7 +448,7 @@ btw("Subscriber has the IMEI"); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); - VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d"); + VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d"); vlr_subscr_put(vsub, __func__); BTW("subscriber detaches"); @@ -505,7 +505,7 @@ thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0"); + gsup_expect_tx("30010809710000004026f050080724433224433224"); ms_sends_msg("0559084a32244332244302"); btw("HLR accepts the IMEI"); @@ -530,7 +530,7 @@ btw("Subscriber has the IMEI and TMSI"); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); - VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d"); + VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d"); VERBOSE_ASSERT(vsub->tmsi, == 0x03020100, "0x%08x"); vlr_subscr_put(vsub, __func__); @@ -656,13 +656,12 @@ EXPECT_CONN_COUNT(1); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); - VERBOSE_ASSERT(vsub->imei[0], == 0, "%d"); vlr_subscr_put(vsub, __func__); EXPECT_ACCEPTED(false); thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0"); + gsup_expect_tx("30010809710000004026f050080724433224433224"); ms_sends_msg("0559084a32244332244302"); btw("HLR accepts the IMEI"); @@ -678,7 +677,7 @@ btw("Subscriber has the IMEI"); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); - VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d"); + VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d"); vlr_subscr_put(vsub, __func__); BTW("subscriber detaches"); @@ -882,13 +881,12 @@ EXPECT_CONN_COUNT(1); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); - VERBOSE_ASSERT(vsub->imei[0], == 0, "%d"); vlr_subscr_put(vsub, __func__); EXPECT_ACCEPTED(false); thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0"); + gsup_expect_tx("30010809710000004026f050080724433224433224"); ms_sends_msg("0559084a32244332244302"); btw("HLR accepts the IMEI"); @@ -914,7 +912,7 @@ vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); VERBOSE_ASSERT(strcmp(vsub->imeisv, "4234234234234275"), == 0, "%d"); - VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d"); + VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d"); VERBOSE_ASSERT(vsub->tmsi, == 0x03020100, "0x%08x"); vlr_subscr_put(vsub, __func__); diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.err b/tests/msc_vlr/msc_vlr_test_no_authen.err index 6f5adb6..538f8c7 100644 --- a/tests/msc_vlr/msc_vlr_test_no_authen.err +++ b/tests/msc_vlr/msc_vlr_test_no_authen.err @@ -987,10 +987,10 @@ DREF IMSI-901700000004620:MSISDN-46071: MSC conn use + dtap == 1 (0x2: dtap) DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -DVLR GSUP tx: 30010809710000004026f050090824433224433224f0 -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0 +DVLR GSUP tx: 30010809710000004026f050080724433224433224 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: ) DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED @@ -1036,7 +1036,7 @@ llist_count(&net->ran_conns) == 0 - Subscriber has the IMEI DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_no_authen_imei: now used by 2 (attached,test_no_authen_imei) - strcmp(vsub->imei, "423423423423420") == 0 + strcmp(vsub->imei, "42342342342342") == 0 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_no_authen_imei: now used by 1 (attached) --- - subscriber detaches @@ -1176,10 +1176,10 @@ DREF IMSI-901700000004620:MSISDN-46071: MSC conn use + dtap == 1 (0x2: dtap) DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -DVLR GSUP tx: 30010809710000004026f050090824433224433224f0 -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0 +DVLR GSUP tx: 30010809710000004026f050080724433224433224 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: ) DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED @@ -1252,7 +1252,7 @@ llist_count(&net->ran_conns) == 0 - Subscriber has the IMEI and TMSI DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 + test_no_authen_tmsi_imei: now used by 2 (attached,test_no_authen_tmsi_imei) - strcmp(vsub->imei, "423423423423420") == 0 + strcmp(vsub->imei, "42342342342342") == 0 vsub->tmsi == 0x03020100 DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 - test_no_authen_tmsi_imei: now used by 1 (attached) --- @@ -1324,6 +1324,7 @@ DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) DMM IDENTITY RESPONSE: MI=IMEI-SV-4234234234234275 DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=4234234234234275 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: Received Event VLR_ULA_E_ID_IMEISV DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_auth() @@ -1488,6 +1489,7 @@ DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) DMM IDENTITY RESPONSE: MI=IMEI-SV-4234234234234275 DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=4234234234234275 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: Received Event VLR_ULA_E_ID_IMEISV DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_auth() @@ -1558,7 +1560,6 @@ - We will only do business when the IMEI is known llist_count(&net->ran_conns) == 1 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_no_authen_imeisv_imei: now used by 2 (conn,test_no_authen_imeisv_imei) - vsub->imei[0] == 0 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_no_authen_imeisv_imei: now used by 1 (conn) ran_conn_is_accepted() == false requests shall be thwarted @@ -1575,10 +1576,10 @@ DREF IMSI-901700000004620:MSISDN-46071: MSC conn use + dtap == 1 (0x2: dtap) DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -DVLR GSUP tx: 30010809710000004026f050090824433224433224f0 -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0 +DVLR GSUP tx: 30010809710000004026f050080724433224433224 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: ) DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED @@ -1624,7 +1625,7 @@ llist_count(&net->ran_conns) == 0 - Subscriber has the IMEI DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_no_authen_imeisv_imei: now used by 2 (attached,test_no_authen_imeisv_imei) - strcmp(vsub->imei, "423423423423420") == 0 + strcmp(vsub->imei, "42342342342342") == 0 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_no_authen_imeisv_imei: now used by 1 (attached) --- - subscriber detaches @@ -1695,6 +1696,7 @@ DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) DMM IDENTITY RESPONSE: MI=IMEI-SV-4234234234234275 DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=4234234234234275 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: Received Event VLR_ULA_E_ID_IMEISV DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_auth() @@ -1857,6 +1859,7 @@ DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) DMM IDENTITY RESPONSE: MI=IMEI-SV-5234234234234276 DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=5234234234234276 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=52342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: Received Event VLR_ULA_E_ID_IMEISV DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_auth() @@ -2060,6 +2063,7 @@ DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) DMM IDENTITY RESPONSE: MI=IMEI-SV-4234234234234275 DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=4234234234234275 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: Received Event VLR_ULA_E_ID_IMEISV DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_auth() @@ -2130,7 +2134,6 @@ - We will only do business when the IMEI is known llist_count(&net->ran_conns) == 1 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_no_authen_imeisv_tmsi_imei: now used by 2 (conn,test_no_authen_imeisv_tmsi_imei) - vsub->imei[0] == 0 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_no_authen_imeisv_tmsi_imei: now used by 1 (conn) ran_conn_is_accepted() == false requests shall be thwarted @@ -2147,10 +2150,10 @@ DREF IMSI-901700000004620:MSISDN-46071: MSC conn use + dtap == 1 (0x2: dtap) DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -DVLR GSUP tx: 30010809710000004026f050090824433224433224f0 -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0 +DVLR GSUP tx: 30010809710000004026f050080724433224433224 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: ) DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED @@ -2224,7 +2227,7 @@ - Subscriber has the IMEISV, IMEI and TMSI DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 + test_no_authen_imeisv_tmsi_imei: now used by 2 (attached,test_no_authen_imeisv_tmsi_imei) strcmp(vsub->imeisv, "4234234234234275") == 0 - strcmp(vsub->imei, "423423423423420") == 0 + strcmp(vsub->imei, "42342342342342") == 0 vsub->tmsi == 0x03020100 DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 - test_no_authen_imeisv_tmsi_imei: now used by 1 (attached) --- -- To view, visit https://gerrit.osmocom.org/13893 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I02e7b66848bf7dddb31b105e2ae981432817ae1e Gerrit-Change-Number: 13893 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 10:05:45 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 7 May 2019 10:05:45 +0000 Subject: Change in osmo-msc[master]: vlr: check IMEI early for retrieve-imeisv-early 1 Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/13894 Change subject: vlr: check IMEI early for retrieve-imeisv-early 1 ...................................................................... vlr: check IMEI early for retrieve-imeisv-early 1 When 'retrieve-imeisv-early 1' is set in the config, send the IMEI to the HLR before doing the location update with the HLR. The OsmoHLR documentation referenced in the code will be added in osmo-hlr.git's Change-Id I2dd4a56f7b8be8b5d0e6fc32e04459e5e278d0a9. Related: OS#2542 Change-Id: I88283cad23793b475445d814ff49db534cb41244 --- M src/libvlr/vlr.c M src/libvlr/vlr_lu_fsm.c M src/libvlr/vlr_lu_fsm.h M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_ss.err M tests/msc_vlr/msc_vlr_test_umts_authen.err 16 files changed, 215 insertions(+), 161 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/94/13894/1 diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 03d6be6..743fbd3 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -1068,6 +1068,8 @@ return -ENODEV; } + /* Dispatch result to vsub->lu_fsm, which will either handle the result by itself (Check IMEI early) or dispatch + * it further to lu_compl_vlr_fsm (Check IMEI after LU). */ if (gsup->message_type == OSMO_GSUP_MSGT_CHECK_IMEI_RESULT) { if (gsup->imei_result == OSMO_GSUP_IMEI_RESULT_ACK) osmo_fsm_inst_dispatch(vsub->lu_fsm, VLR_ULA_E_HLR_IMEI_ACK, NULL); diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c index ecf96fa..2ec16a8 100644 --- a/src/libvlr/vlr_lu_fsm.c +++ b/src/libvlr/vlr_lu_fsm.c @@ -460,7 +460,7 @@ /* TODO: Trace_Subscriber_Activity_VLR */ - if (vlr->cfg.check_imei_rqd) { + if (vlr->cfg.check_imei_rqd && !vlr->cfg.retrieve_imeisv_early) { /* Check IMEI VLR */ osmo_fsm_inst_state_chg(fi, lcvp->assign_tmsi ? @@ -924,6 +924,40 @@ } } +static void vlr_loc_upd_node1_pre(struct osmo_fsm_inst *fi) +{ + struct lu_fsm_priv *lfp = lu_fsm_fi_priv(fi); + struct vlr_instance *vlr = lfp->vlr; + + LOGPFSM(fi, "%s()\n", __func__); + + if (vlr->cfg.check_imei_rqd && vlr->cfg.retrieve_imeisv_early) { + osmo_fsm_inst_state_chg(fi, VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY, vlr_timer(lfp->vlr, 3270), 3270); + vlr_subscr_tx_req_check_imei(lfp->vsub); + } + else + vlr_loc_upd_node1(fi); +} + +/* End of Check_IMEI Procedure. Executed early (before the location update), so we can send the IMEI to the HLR even if + * the MS would be rejected in LU. See the "Configuring the Subscribers Create on Demand Feature" section of the OsmoHLR + * user manual for a detailed explanation of the use case. */ +static void lu_fsm_wait_hlr_check_imei_early(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case VLR_ULA_E_HLR_IMEI_ACK: + vlr_loc_upd_node1(fi); + break; + case VLR_ULA_E_HLR_IMEI_NACK: + lu_fsm_failure(fi, GSM48_REJECT_ILLEGAL_ME); + break; + default: + LOGPFSML(fi, LOGL_ERROR, "event without effect: %s\n", + osmo_fsm_event_name(fi->fsm, event)); + break; + } +} + static void vlr_loc_upd_want_imsi(struct osmo_fsm_inst *fi) { struct lu_fsm_priv *lfp = lu_fsm_fi_priv(fi); @@ -937,7 +971,7 @@ osmo_fsm_inst_state_chg(fi, VLR_ULA_S_WAIT_IMSI, vlr_timer(vlr, 3270), 3270); vlr->ops.tx_id_req(lfp->msc_conn_ref, GSM_MI_TYPE_IMSI); - /* will continue at vlr_loc_upd_node1() once IMSI arrives */ + /* will continue at vlr_loc_upd_node1_pre() once IMSI arrives */ } static int assoc_lfp_with_sub(struct osmo_fsm_inst *fi, struct vlr_subscr *vsub) @@ -1043,7 +1077,7 @@ if (!lfp->vsub->imsi[0]) vlr_loc_upd_want_imsi(fi); else - vlr_loc_upd_node1(fi); + vlr_loc_upd_node1_pre(fi); } static void lu_fsm_idle(struct osmo_fsm_inst *fi, uint32_t event, @@ -1098,7 +1132,7 @@ { switch (event) { case VLR_ULA_E_SEND_ID_ACK: - vlr_loc_upd_node1(fi); + vlr_loc_upd_node1_pre(fi); break; case VLR_ULA_E_SEND_ID_NACK: vlr_loc_upd_want_imsi(fi); @@ -1175,7 +1209,7 @@ switch (event) { case VLR_ULA_E_ID_IMSI: vlr_subscr_set_imsi(vsub, mi_string); - vlr_loc_upd_node1(fi); + vlr_loc_upd_node1_pre(fi); break; default: LOGPFSML(fi, LOGL_ERROR, "event without effect: %s\n", @@ -1319,6 +1353,7 @@ S(VLR_ULA_S_WAIT_IMSI) | S(VLR_ULA_S_WAIT_AUTH) | S(VLR_ULA_S_WAIT_CIPH) | + S(VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY) | S(VLR_ULA_S_WAIT_HLR_UPD) | S(VLR_ULA_S_DONE), .name = OSMO_STRINGIFY(VLR_ULA_S_IDLE), @@ -1330,6 +1365,7 @@ S(VLR_ULA_S_WAIT_IMSI) | S(VLR_ULA_S_WAIT_AUTH) | S(VLR_ULA_S_WAIT_CIPH) | + S(VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY) | S(VLR_ULA_S_WAIT_HLR_UPD) | S(VLR_ULA_S_DONE), .name = OSMO_STRINGIFY(VLR_ULA_S_WAIT_IMEISV), @@ -1341,6 +1377,7 @@ .out_state_mask = S(VLR_ULA_S_WAIT_IMSI) | S(VLR_ULA_S_WAIT_AUTH) | S(VLR_ULA_S_WAIT_CIPH) | + S(VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY) | S(VLR_ULA_S_DONE), .name = OSMO_STRINGIFY(VLR_ULA_S_WAIT_PVLR), .action = lu_fsm_wait_pvlr, @@ -1366,11 +1403,23 @@ .in_event_mask = S(VLR_ULA_E_ID_IMSI), .out_state_mask = S(VLR_ULA_S_WAIT_AUTH) | S(VLR_ULA_S_WAIT_CIPH) | + S(VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY) | S(VLR_ULA_S_WAIT_HLR_UPD) | S(VLR_ULA_S_DONE), .name = OSMO_STRINGIFY(VLR_ULA_S_WAIT_IMSI), .action = lu_fsm_wait_imsi, }, + [VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY] = { + .in_event_mask = S(VLR_ULA_E_HLR_IMEI_ACK) | + S(VLR_ULA_E_HLR_IMEI_NACK), + .out_state_mask = S(VLR_ULA_S_WAIT_AUTH) | + S(VLR_ULA_S_WAIT_CIPH) | + S(VLR_ULA_S_WAIT_HLR_UPD) | + S(VLR_ULA_S_WAIT_LU_COMPL) | + S(VLR_ULA_S_DONE), + .name = OSMO_STRINGIFY(VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY), + .action = lu_fsm_wait_hlr_check_imei_early, + }, [VLR_ULA_S_WAIT_HLR_UPD] = { .in_event_mask = S(VLR_ULA_E_HLR_LU_RES) | S(VLR_ULA_E_UPD_HLR_COMPL), diff --git a/src/libvlr/vlr_lu_fsm.h b/src/libvlr/vlr_lu_fsm.h index 5cf13c7..b5c4a5e 100644 --- a/src/libvlr/vlr_lu_fsm.h +++ b/src/libvlr/vlr_lu_fsm.h @@ -9,6 +9,7 @@ VLR_ULA_S_WAIT_AUTH, /* Waiting for Authentication */ VLR_ULA_S_WAIT_CIPH, /* Waiting for Ciphering Complete */ VLR_ULA_S_WAIT_IMSI, /* Waiting for IMSI from MS */ + VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY, /* Waiting for Check IMEI result from HLR */ VLR_ULA_S_WAIT_HLR_UPD, /* Waiting for end of HLR update */ VLR_ULA_S_WAIT_LU_COMPL,/* Waiting for LU complete */ VLR_ULA_S_WAIT_LU_COMPL_STANDALONE, /* Standalone VLR */ diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.err b/tests/msc_vlr/msc_vlr_test_authen_reuse.err index 56da5b9..13b100f 100644 --- a/tests/msc_vlr/msc_vlr_test_authen_reuse.err +++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.err @@ -21,6 +21,7 @@ DREF VLR subscr IMSI-901700000010650 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000010650:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -428,6 +429,7 @@ DREF VLR subscr IMSI-901700000010650 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000010650:UTRAN-Iu-42:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -873,6 +875,7 @@ DREF VLR subscr IMSI-901700000010650 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000010650:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1358,6 +1361,7 @@ DREF VLR subscr IMSI-901700000010650 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000010650:UTRAN-Iu-42:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1894,6 +1898,7 @@ DREF VLR subscr IMSI-901700000010650 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000010650:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -2209,6 +2214,7 @@ DREF VLR subscr IMSI-901700000010650 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000010650:UTRAN-Iu-42:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated diff --git a/tests/msc_vlr/msc_vlr_test_call.err b/tests/msc_vlr/msc_vlr_test_call.err index e364162..a849032 100644 --- a/tests/msc_vlr/msc_vlr_test_call.err +++ b/tests/msc_vlr/msc_vlr_test_call.err @@ -22,6 +22,7 @@ DREF VLR subscr IMSI-901700000010650 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000010650:UTRAN-Iu-42:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -402,6 +403,7 @@ DREF VLR subscr IMSI-901700000010650 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000010650:UTRAN-Iu-42:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -780,6 +782,7 @@ DREF VLR subscr IMSI-901700000010650 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000010650:UTRAN-Iu-42:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1123,6 +1126,7 @@ DREF VLR subscr IMSI-901700000010650 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000010650:UTRAN-Iu-42:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1465,6 +1469,7 @@ DREF VLR subscr IMSI-901700000010650 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000010650:UTRAN-Iu-42:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.err b/tests/msc_vlr/msc_vlr_test_gsm_authen.err index 0cf1ab2..773b526 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_authen.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.err @@ -21,6 +21,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -492,6 +493,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -968,6 +970,7 @@ DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 + conn: now used by 3 (attached,_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 - _lu_fsm_associate_vsub: now used by 2 (attached,conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1169,6 +1172,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1415,6 +1419,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1634,6 +1639,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1854,6 +1860,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -2134,6 +2141,7 @@ DREF VLR subscr IMSI-901700000010650 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000010650:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -2587,6 +2595,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err index 6674734..11d5f57 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err @@ -21,6 +21,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -544,6 +545,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1108,6 +1110,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1358,6 +1361,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1577,6 +1581,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1861,6 +1866,7 @@ DREF VLR subscr IMSI-901700000010650 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000010650:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -2353,6 +2359,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -2878,6 +2885,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated diff --git a/tests/msc_vlr/msc_vlr_test_hlr_reject.err b/tests/msc_vlr/msc_vlr_test_hlr_reject.err index 7afad90..a4bf279 100644 --- a/tests/msc_vlr/msc_vlr_test_hlr_reject.err +++ b/tests/msc_vlr/msc_vlr_test_hlr_reject.err @@ -21,6 +21,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -99,6 +100,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -179,6 +181,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -323,6 +326,7 @@ DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + conn: now used by 3 (attached,_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - _lu_fsm_associate_vsub: now used by 2 (attached,conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -470,6 +474,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -614,6 +619,7 @@ DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + conn: now used by 3 (attached,_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - _lu_fsm_associate_vsub: now used by 2 (attached,conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -694,6 +700,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -839,6 +846,7 @@ DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + conn: now used by 3 (attached,_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - _lu_fsm_associate_vsub: now used by 2 (attached,conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -917,6 +925,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -994,6 +1003,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -1074,6 +1084,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() diff --git a/tests/msc_vlr/msc_vlr_test_hlr_timeout.err b/tests/msc_vlr/msc_vlr_test_hlr_timeout.err index 900488a..c647164 100644 --- a/tests/msc_vlr/msc_vlr_test_hlr_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_hlr_timeout.err @@ -22,6 +22,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -108,6 +109,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.err b/tests/msc_vlr/msc_vlr_test_ms_timeout.err index 8ff251a..a1b05c4 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.err @@ -22,6 +22,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -128,6 +129,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -361,6 +363,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -624,6 +627,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.c b/tests/msc_vlr/msc_vlr_test_no_authen.c index e5dd0b7..22ee46b 100644 --- a/tests/msc_vlr/msc_vlr_test_no_authen.c +++ b/tests/msc_vlr/msc_vlr_test_no_authen.c @@ -626,11 +626,10 @@ ms_sends_msg("050802008168000130089910070000006402"); OSMO_ASSERT(dtap_tx_confirmed); - btw("MS replies with an Identity Response, causes LU to commence with a GSUP LU request to HLR"); - gsup_expect_tx("04010809710000004026f0280102"); + btw("MS replies with an Identity Response, causes an early GSUP Check IMEI request to HLR"); + gsup_expect_tx("30010809710000004026f050080724433224433224"); ms_sends_msg("0559094332244332244372f5"); OSMO_ASSERT(gsup_tx_confirmed); - VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); btw("Subscriber has the IMEISV from the ID Response"); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); @@ -638,6 +637,13 @@ VERBOSE_ASSERT(strcmp(vsub->imeisv, "4234234234234275"), == 0, "%d"); vlr_subscr_put(vsub, __func__); + btw("HLR accepts the IMEI, VLR responds with LU Request"); + expect_bssap_clear(); + gsup_rx("32010809710000004026f0510100", + "04010809710000004026f0280102"); + OSMO_ASSERT(gsup_tx_confirmed); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + btw("HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT"); gsup_rx("10010809710000004026f00804036470f1", "12010809710000004026f0"); @@ -648,27 +654,9 @@ thwart_rx_non_initial_requests(); VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); - btw("HLR also sends GSUP _UPDATE_LOCATION_RESULT, and we send an ID Request for the IMEI to the MS"); - dtap_expect_tx("051802"); + btw("HLR also sends GSUP _UPDATE_LOCATION_RESULT"); gsup_rx("06010809710000004026f0", NULL); - btw("We will only do business when the IMEI is known"); - EXPECT_CONN_COUNT(1); - vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); - OSMO_ASSERT(vsub); - vlr_subscr_put(vsub, __func__); - EXPECT_ACCEPTED(false); - thwart_rx_non_initial_requests(); - - btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050080724433224433224"); - ms_sends_msg("0559084a32244332244302"); - - btw("HLR accepts the IMEI"); - expect_bssap_clear(); - gsup_rx("32010809710000004026f0510100", NULL); - VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); - btw("LU was successful, and the conn has already been closed"); VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d"); bss_sends_clear_complete(); @@ -851,11 +839,10 @@ ms_sends_msg("050802008168000130089910070000006402"); OSMO_ASSERT(dtap_tx_confirmed); - btw("MS replies with an Identity Response, causes LU to commence with a GSUP LU request to HLR"); - gsup_expect_tx("04010809710000004026f0280102"); + btw("MS replies with an Identity Response, causes an early GSUP Check IMEI request to HLR"); + gsup_expect_tx("30010809710000004026f050080724433224433224"); ms_sends_msg("0559094332244332244372f5"); OSMO_ASSERT(gsup_tx_confirmed); - VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); btw("Subscriber has the IMEISV from the ID Response"); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); @@ -863,6 +850,13 @@ VERBOSE_ASSERT(strcmp(vsub->imeisv, "4234234234234275"), == 0, "%d"); vlr_subscr_put(vsub, __func__); + btw("HLR accepts the IMEI, VLR responds with LU Request"); + expect_bssap_clear(); + gsup_rx("32010809710000004026f0510100", + "04010809710000004026f0280102"); + OSMO_ASSERT(gsup_tx_confirmed); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + btw("HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT"); gsup_rx("10010809710000004026f00804036470f1", "12010809710000004026f0"); @@ -873,25 +867,9 @@ thwart_rx_non_initial_requests(); VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); - btw("HLR also sends GSUP _UPDATE_LOCATION_RESULT, and we send an ID Request for the IMEI to the MS"); - dtap_expect_tx("051802"); + btw("HLR also sends GSUP _UPDATE_LOCATION_RESULT"); gsup_rx("06010809710000004026f0", NULL); - btw("We will only do business when the IMEI is known"); - EXPECT_CONN_COUNT(1); - vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); - OSMO_ASSERT(vsub); - vlr_subscr_put(vsub, __func__); - EXPECT_ACCEPTED(false); - thwart_rx_non_initial_requests(); - - btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050080724433224433224"); - ms_sends_msg("0559084a32244332244302"); - - btw("HLR accepts the IMEI"); - gsup_rx("32010809710000004026f0510100", NULL); - btw("a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl"); EXPECT_CONN_COUNT(1); VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d"); diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.err b/tests/msc_vlr/msc_vlr_test_no_authen.err index 538f8c7..a755d9e 100644 --- a/tests/msc_vlr/msc_vlr_test_no_authen.err +++ b/tests/msc_vlr/msc_vlr_test_no_authen.err @@ -21,6 +21,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -367,6 +368,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -718,6 +720,7 @@ DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 + conn: now used by 3 (attached,_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 - _lu_fsm_associate_vsub: now used by 2 (attached,conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -903,6 +906,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -1092,6 +1096,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -1326,6 +1331,7 @@ DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=4234234234234275 DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: Received Event VLR_ULA_E_ID_IMEISV +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_ciph() @@ -1483,7 +1489,7 @@ DREF IMSI-901700000004620: MSC conn use - compl_l3 == 0 (0x0: ) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED -- MS replies with an Identity Response, causes LU to commence with a GSUP LU request to HLR +- MS replies with an Identity Response, causes an early GSUP Check IMEI request to HLR MSC <--GERAN-A-- MS: GSM48_MT_MM_ID_RESP DREF IMSI-901700000004620: MSC conn use + dtap == 1 (0x2: dtap) DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) @@ -1491,25 +1497,36 @@ DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=4234234234234275 DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: Received Event VLR_ULA_E_ID_IMEISV -DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1() -DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_auth() -DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_ciph() -DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node_4() -DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: state_chg to VLR_ULA_S_WAIT_HLR_UPD +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1_pre() +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: state_chg to VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY +DVLR GSUP tx: 30010809710000004026f050080724433224433224 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224 +DREF IMSI-901700000004620: MSC conn use - dtap == 0 (0x0: ) +DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED +DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED +- Subscriber has the IMEISV from the ID Response +DREF VLR subscr IMSI-901700000004620 + test_no_authen_imeisv_imei: now used by 2 (conn,test_no_authen_imeisv_imei) + strcmp(vsub->imeisv, "4234234234234275") == 0 +DREF VLR subscr IMSI-901700000004620 - test_no_authen_imeisv_imei: now used by 1 (conn) +- HLR accepts the IMEI, VLR responds with LU Request +<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: 32010809710000004026f0510100 +DVLR GSUP rx 14: 32010809710000004026f0510100 +DREF VLR subscr IMSI-901700000004620 + vlr_gsupc_read_cb: now used by 2 (conn,vlr_gsupc_read_cb) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY}: Received Event VLR_ULA_E_HLR_IMEI_ACK +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY}: vlr_loc_upd_node1() +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY}: vlr_loc_upd_post_ciph() +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY}: vlr_loc_upd_node_4() +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY}: state_chg to VLR_ULA_S_WAIT_HLR_UPD DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A-0:LU){UPD_HLR_VLR_S_INIT}: Allocated DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A-0:LU){UPD_HLR_VLR_S_INIT}: is child of vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU) DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A-0:LU){UPD_HLR_VLR_S_INIT}: Received Event UPD_HLR_VLR_E_START DVLR GSUP tx: 04010809710000004026f0280102 GSUP --> HLR: OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST: 04010809710000004026f0280102 DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A-0:LU){UPD_HLR_VLR_S_INIT}: state_chg to UPD_HLR_VLR_S_WAIT_FOR_DATA -DREF IMSI-901700000004620: MSC conn use - dtap == 0 (0x0: ) -DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED -DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED +DREF VLR subscr IMSI-901700000004620 - vlr_gsupc_read_cb: now used by 1 (conn) +<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: vlr_gsupc_read_cb() returns 0 lu_result_sent == 0 -- Subscriber has the IMEISV from the ID Response -DREF VLR subscr IMSI-901700000004620 + test_no_authen_imeisv_imei: now used by 2 (conn,test_no_authen_imeisv_imei) - strcmp(vsub->imeisv, "4234234234234275") == 0 -DREF VLR subscr IMSI-901700000004620 - test_no_authen_imeisv_imei: now used by 1 (conn) - HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT <-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: 10010809710000004026f00804036470f1 DVLR GSUP rx 17: 10010809710000004026f00804036470f1 @@ -1534,7 +1551,7 @@ DRLL Dispatching 04.08 message SMS:0x01 (0x9:0x1) DRLL subscr IMSI-901700000004620:MSISDN-46071: Message not permitted for initial conn: SMS:0x01 lu_result_sent == 0 -- HLR also sends GSUP _UPDATE_LOCATION_RESULT, and we send an ID Request for the IMEI to the MS +- HLR also sends GSUP _UPDATE_LOCATION_RESULT <-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: 06010809710000004026f0 DVLR GSUP rx 11: 06010809710000004026f0 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + vlr_gsupc_read_cb: now used by 2 (conn,vlr_gsupc_read_cb) @@ -1550,52 +1567,13 @@ DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){LU_COMPL_VLR_S_INIT}: Received Event LU_COMPL_VLR_E_START DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){LU_COMPL_VLR_S_INIT}: state_chg to LU_COMPL_VLR_S_WAIT_SUB_PRES DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){LU_COMPL_VLR_S_WAIT_SUB_PRES}: Received Event LU_COMPL_VLR_E_SUB_PRES_COMPL -DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){LU_COMPL_VLR_S_WAIT_SUB_PRES}: state_chg to LU_COMPL_VLR_S_WAIT_IMEI -DMSC msc_tx 3 bytes to IMSI-901700000004620:MSISDN-46071 via GERAN-A -- DTAP --GERAN-A--> MS: GSM48_MT_MM_ID_REQ: 051802 -- DTAP matches expected message -DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A-0:LU){UPD_HLR_VLR_S_DONE}: Deallocated -DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - vlr_gsupc_read_cb: now used by 1 (conn) -<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: vlr_gsupc_read_cb() returns 0 -- We will only do business when the IMEI is known - llist_count(&net->ran_conns) == 1 -DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_no_authen_imeisv_imei: now used by 2 (conn,test_no_authen_imeisv_imei) -DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_no_authen_imeisv_imei: now used by 1 (conn) -ran_conn_is_accepted() == false - requests shall be thwarted -DRLL Dispatching 04.08 message GSM48_MT_CC_SETUP (0x3:0x5) -DRLL subscr IMSI-901700000004620:MSISDN-46071: Message not permitted for initial conn: GSM48_MT_CC_SETUP -DRLL Dispatching 04.08 message unknown 0x33 (0x5:0x33) -DRLL subscr IMSI-901700000004620:MSISDN-46071: Message not permitted for initial conn: unknown 0x33 -DRLL Dispatching 04.08 message GSM48_MT_RR_SYSINFO_1 (0x6:0x19) -DRLL subscr IMSI-901700000004620:MSISDN-46071: Message not permitted for initial conn: GSM48_MT_RR_SYSINFO_1 -DRLL Dispatching 04.08 message SMS:0x01 (0x9:0x1) -DRLL subscr IMSI-901700000004620:MSISDN-46071: Message not permitted for initial conn: SMS:0x01 -- MS replies with an Identity Response, VLR sends the IMEI to HLR - MSC <--GERAN-A-- MS: GSM48_MT_MM_ID_RESP -DREF IMSI-901700000004620:MSISDN-46071: MSC conn use + dtap == 1 (0x2: dtap) -DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) -DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 -DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -DVLR GSUP tx: 30010809710000004026f050080724433224433224 -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224 -DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: ) -DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED -DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED -- HLR accepts the IMEI -<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: 32010809710000004026f0510100 -DVLR GSUP rx 14: 32010809710000004026f0510100 -DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + vlr_gsupc_read_cb: now used by 2 (conn,vlr_gsupc_read_cb) -DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_HLR_IMEI_ACK -DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){LU_COMPL_VLR_S_WAIT_IMEI}: Received Event LU_COMPL_VLR_E_IMEI_CHECK_ACK - sending LU Accept for IMSI-901700000004620:MSISDN-46071 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + attached: now used by 3 (conn,vlr_gsupc_read_cb,attached) -DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){LU_COMPL_VLR_S_WAIT_IMEI}: state_chg to LU_COMPL_VLR_S_DONE +DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){LU_COMPL_VLR_S_WAIT_SUB_PRES}: state_chg to LU_COMPL_VLR_S_DONE DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_LU_COMPL_SUCCESS -DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){LU_COMPL_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){LU_COMPL_VLR_S_DONE}: Terminating in cascade, depth 2 (cause = OSMO_FSM_TERM_PARENT, caused by: upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A-0:LU)) DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){LU_COMPL_VLR_S_DONE}: Removing from parent vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU) -DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){LU_COMPL_VLR_S_DONE}: Deallocated +DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){LU_COMPL_VLR_S_DONE}: Deferring: will deallocate with upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A-0:LU) DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_WAIT_LU_COMPL}: state_chg to VLR_ULA_S_DONE DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_ACCEPTED DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: state_chg to RAN_CONN_S_ACCEPTED @@ -1605,9 +1583,9 @@ DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + vlr_subscr_cancel_attach_fsm: now used by 4 (conn,vlr_gsupc_read_cb,attached,vlr_subscr_cancel_attach_fsm) DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - vlr_subscr_cancel_attach_fsm: now used by 3 (conn,vlr_gsupc_read_cb,attached) - BSSAP Clear --GERAN-A--> MS +DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A-0:LU){UPD_HLR_VLR_S_DONE}: Deallocated, including all deferred deallocations DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - vlr_gsupc_read_cb: now used by 2 (conn,attached) -<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: vlr_gsupc_read_cb() returns 0 - bssap_clear_sent == 1 +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: vlr_gsupc_read_cb() returns 0 - LU was successful, and the conn has already been closed lu_result_sent == 1 - BSS sends BSSMAP Clear Complete @@ -1698,6 +1676,7 @@ DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=4234234234234275 DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: Received Event VLR_ULA_E_ID_IMEISV +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_ciph() @@ -1861,6 +1840,7 @@ DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=5234234234234276 DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=52342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: Received Event VLR_ULA_E_ID_IMEISV +DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_ciph() @@ -2057,7 +2037,7 @@ DREF IMSI-901700000004620: MSC conn use - compl_l3 == 0 (0x0: ) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED -- MS replies with an Identity Response, causes LU to commence with a GSUP LU request to HLR +- MS replies with an Identity Response, causes an early GSUP Check IMEI request to HLR MSC <--GERAN-A-- MS: GSM48_MT_MM_ID_RESP DREF IMSI-901700000004620: MSC conn use + dtap == 1 (0x2: dtap) DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) @@ -2065,25 +2045,36 @@ DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=4234234234234275 DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: Received Event VLR_ULA_E_ID_IMEISV -DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1() -DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_auth() -DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_ciph() -DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node_4() -DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: state_chg to VLR_ULA_S_WAIT_HLR_UPD +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1_pre() +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMEISV}: state_chg to VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY +DVLR GSUP tx: 30010809710000004026f050080724433224433224 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224 +DREF IMSI-901700000004620: MSC conn use - dtap == 0 (0x0: ) +DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED +DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED +- Subscriber has the IMEISV from the ID Response +DREF VLR subscr IMSI-901700000004620 + test_no_authen_imeisv_tmsi_imei: now used by 2 (conn,test_no_authen_imeisv_tmsi_imei) + strcmp(vsub->imeisv, "4234234234234275") == 0 +DREF VLR subscr IMSI-901700000004620 - test_no_authen_imeisv_tmsi_imei: now used by 1 (conn) +- HLR accepts the IMEI, VLR responds with LU Request +<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: 32010809710000004026f0510100 +DVLR GSUP rx 14: 32010809710000004026f0510100 +DREF VLR subscr IMSI-901700000004620 + vlr_gsupc_read_cb: now used by 2 (conn,vlr_gsupc_read_cb) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY}: Received Event VLR_ULA_E_HLR_IMEI_ACK +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY}: vlr_loc_upd_node1() +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY}: vlr_loc_upd_post_ciph() +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY}: vlr_loc_upd_node_4() +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY}: state_chg to VLR_ULA_S_WAIT_HLR_UPD DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A-0:LU){UPD_HLR_VLR_S_INIT}: Allocated DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A-0:LU){UPD_HLR_VLR_S_INIT}: is child of vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU) DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A-0:LU){UPD_HLR_VLR_S_INIT}: Received Event UPD_HLR_VLR_E_START DVLR GSUP tx: 04010809710000004026f0280102 GSUP --> HLR: OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST: 04010809710000004026f0280102 DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A-0:LU){UPD_HLR_VLR_S_INIT}: state_chg to UPD_HLR_VLR_S_WAIT_FOR_DATA -DREF IMSI-901700000004620: MSC conn use - dtap == 0 (0x0: ) -DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED -DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED +DREF VLR subscr IMSI-901700000004620 - vlr_gsupc_read_cb: now used by 1 (conn) +<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: vlr_gsupc_read_cb() returns 0 lu_result_sent == 0 -- Subscriber has the IMEISV from the ID Response -DREF VLR subscr IMSI-901700000004620 + test_no_authen_imeisv_tmsi_imei: now used by 2 (conn,test_no_authen_imeisv_tmsi_imei) - strcmp(vsub->imeisv, "4234234234234275") == 0 -DREF VLR subscr IMSI-901700000004620 - test_no_authen_imeisv_tmsi_imei: now used by 1 (conn) - HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT <-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: 10010809710000004026f00804036470f1 DVLR GSUP rx 17: 10010809710000004026f00804036470f1 @@ -2108,7 +2099,7 @@ DRLL Dispatching 04.08 message SMS:0x01 (0x9:0x1) DRLL subscr IMSI-901700000004620:MSISDN-46071: Message not permitted for initial conn: SMS:0x01 lu_result_sent == 0 -- HLR also sends GSUP _UPDATE_LOCATION_RESULT, and we send an ID Request for the IMEI to the MS +- HLR also sends GSUP _UPDATE_LOCATION_RESULT <-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: 06010809710000004026f0 DVLR GSUP rx 11: 06010809710000004026f0 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + vlr_gsupc_read_cb: now used by 2 (conn,vlr_gsupc_read_cb) @@ -2124,52 +2115,14 @@ DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){LU_COMPL_VLR_S_INIT}: Received Event LU_COMPL_VLR_E_START DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){LU_COMPL_VLR_S_INIT}: state_chg to LU_COMPL_VLR_S_WAIT_SUB_PRES DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){LU_COMPL_VLR_S_WAIT_SUB_PRES}: Received Event LU_COMPL_VLR_E_SUB_PRES_COMPL -DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){LU_COMPL_VLR_S_WAIT_SUB_PRES}: state_chg to LU_COMPL_VLR_S_WAIT_IMEI_TMSI -DMSC msc_tx 3 bytes to IMSI-901700000004620:MSISDN-46071 via GERAN-A -- DTAP --GERAN-A--> MS: GSM48_MT_MM_ID_REQ: 051802 -- DTAP matches expected message -DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A-0:LU){UPD_HLR_VLR_S_DONE}: Deallocated -DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - vlr_gsupc_read_cb: now used by 1 (conn) -<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: vlr_gsupc_read_cb() returns 0 -- We will only do business when the IMEI is known - llist_count(&net->ran_conns) == 1 -DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_no_authen_imeisv_tmsi_imei: now used by 2 (conn,test_no_authen_imeisv_tmsi_imei) -DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_no_authen_imeisv_tmsi_imei: now used by 1 (conn) -ran_conn_is_accepted() == false - requests shall be thwarted -DRLL Dispatching 04.08 message GSM48_MT_CC_SETUP (0x3:0x5) -DRLL subscr IMSI-901700000004620:MSISDN-46071: Message not permitted for initial conn: GSM48_MT_CC_SETUP -DRLL Dispatching 04.08 message unknown 0x33 (0x5:0x33) -DRLL subscr IMSI-901700000004620:MSISDN-46071: Message not permitted for initial conn: unknown 0x33 -DRLL Dispatching 04.08 message GSM48_MT_RR_SYSINFO_1 (0x6:0x19) -DRLL subscr IMSI-901700000004620:MSISDN-46071: Message not permitted for initial conn: GSM48_MT_RR_SYSINFO_1 -DRLL Dispatching 04.08 message SMS:0x01 (0x9:0x1) -DRLL subscr IMSI-901700000004620:MSISDN-46071: Message not permitted for initial conn: SMS:0x01 -- MS replies with an Identity Response, VLR sends the IMEI to HLR - MSC <--GERAN-A-- MS: GSM48_MT_MM_ID_RESP -DREF IMSI-901700000004620:MSISDN-46071: MSC conn use + dtap == 1 (0x2: dtap) -DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) -DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 -DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -DVLR GSUP tx: 30010809710000004026f050080724433224433224 -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224 -DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: ) -DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED -DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED -- HLR accepts the IMEI -<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: 32010809710000004026f0510100 -DVLR GSUP rx 14: 32010809710000004026f0510100 -DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + vlr_gsupc_read_cb: now used by 2 (conn,vlr_gsupc_read_cb) -DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_HLR_IMEI_ACK -DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){LU_COMPL_VLR_S_WAIT_IMEI_TMSI}: Received Event LU_COMPL_VLR_E_IMEI_CHECK_ACK -DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){LU_COMPL_VLR_S_WAIT_IMEI_TMSI}: lu_compl_vlr_new_tmsi() +DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){LU_COMPL_VLR_S_WAIT_SUB_PRES}: lu_compl_vlr_new_tmsi() DVLR SUBSCR(IMSI-901700000004620:MSISDN-46071:TMSInew-0x03020100) VLR: update for IMSI=901700000004620 (MSISDN=46071) DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:TMSInew-0x03020100:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Updated ID -DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){LU_COMPL_VLR_S_WAIT_IMEI_TMSI}: state_chg to LU_COMPL_VLR_S_WAIT_TMSI_CNF +DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){LU_COMPL_VLR_S_WAIT_SUB_PRES}: state_chg to LU_COMPL_VLR_S_WAIT_TMSI_CNF - sending LU Accept for IMSI-901700000004620:MSISDN-46071:TMSInew-0x03020100, with TMSI 0x03020100 +DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A-0:LU){UPD_HLR_VLR_S_DONE}: Deallocated DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSInew-0x03020100 - vlr_gsupc_read_cb: now used by 1 (conn) -<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: vlr_gsupc_read_cb() returns 0 +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: vlr_gsupc_read_cb() returns 0 - a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl llist_count(&net->ran_conns) == 1 lu_result_sent == 1 @@ -2286,6 +2239,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() diff --git a/tests/msc_vlr/msc_vlr_test_reject_concurrency.err b/tests/msc_vlr/msc_vlr_test_reject_concurrency.err index 71bf732..ac1be2c 100644 --- a/tests/msc_vlr/msc_vlr_test_reject_concurrency.err +++ b/tests/msc_vlr/msc_vlr_test_reject_concurrency.err @@ -21,6 +21,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -168,6 +169,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -288,6 +290,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -414,6 +417,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -536,6 +540,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -722,6 +727,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -912,6 +918,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -1089,6 +1096,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -1341,6 +1349,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -1614,6 +1623,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() diff --git a/tests/msc_vlr/msc_vlr_test_rest.err b/tests/msc_vlr/msc_vlr_test_rest.err index 9989c66..403fa50 100644 --- a/tests/msc_vlr/msc_vlr_test_rest.err +++ b/tests/msc_vlr/msc_vlr_test_rest.err @@ -112,6 +112,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -223,6 +224,7 @@ DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + conn: now used by 3 (attached,_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - _lu_fsm_associate_vsub: now used by 2 (attached,conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -396,6 +398,7 @@ DVLR set IMSI on subscriber; IMSI=901700000004620 id=901700000004620 DVLR vlr_lu_fsm(TMSI-0x23422342:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMSI}: Received Event VLR_ULA_E_ID_IMSI DVLR set IMSI on subscriber; IMSI=901700000004620 id=901700000004620 +DVLR vlr_lu_fsm(TMSI-0x23422342:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMSI}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(TMSI-0x23422342:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMSI}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(TMSI-0x23422342:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMSI}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(TMSI-0x23422342:GERAN-A-0:LU){VLR_ULA_S_WAIT_IMSI}: vlr_loc_upd_post_ciph() diff --git a/tests/msc_vlr/msc_vlr_test_ss.err b/tests/msc_vlr/msc_vlr_test_ss.err index fa091ce..bba7b3d 100644 --- a/tests/msc_vlr/msc_vlr_test_ss.err +++ b/tests/msc_vlr/msc_vlr_test_ss.err @@ -21,6 +21,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -214,6 +215,7 @@ DREF VLR subscr IMSI-901700000004620 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000004620:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() diff --git a/tests/msc_vlr/msc_vlr_test_umts_authen.err b/tests/msc_vlr/msc_vlr_test_umts_authen.err index 298d6ad..059bf06 100644 --- a/tests/msc_vlr/msc_vlr_test_umts_authen.err +++ b/tests/msc_vlr/msc_vlr_test_umts_authen.err @@ -21,6 +21,7 @@ DREF VLR subscr IMSI-901700000010650 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000010650:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -510,6 +511,7 @@ DREF VLR subscr IMSI-901700000010650 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000010650:UTRAN-Iu-42:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1037,6 +1039,7 @@ DREF VLR subscr IMSI-901700000010650 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000010650:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1249,6 +1252,7 @@ DREF VLR subscr IMSI-901700000010650 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000010650:UTRAN-Iu-42:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1473,6 +1477,7 @@ DREF VLR subscr IMSI-901700000010650 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000010650:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1569,6 +1574,7 @@ DREF VLR subscr IMSI-901700000010650 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000010650:UTRAN-Iu-42:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1665,6 +1671,7 @@ DREF VLR subscr IMSI-901700000010650 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000010650:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1761,6 +1768,7 @@ DREF VLR subscr IMSI-901700000010650 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000010650:UTRAN-Iu-42:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1857,6 +1865,7 @@ DREF VLR subscr IMSI-901700000010650 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000010650:GERAN-A-0:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A-0:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:GERAN-A-0:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1953,6 +1962,7 @@ DREF VLR subscr IMSI-901700000010650 + conn: now used by 2 (_lu_fsm_associate_vsub,conn) DMM RAN_conn(IMSI-901700000010650:UTRAN-Iu-42:LU){RAN_CONN_S_NEW}: Updated ID DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:UTRAN-Iu-42:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated -- To view, visit https://gerrit.osmocom.org/13894 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I88283cad23793b475445d814ff49db534cb41244 Gerrit-Change-Number: 13894 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 10:21:24 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 7 May 2019 10:21:24 +0000 Subject: Change in docker-playground[master]: Simplify git checkout, allow branches and commits Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/13895 Change subject: Simplify git checkout, allow branches and commits ...................................................................... Simplify git checkout, allow branches and commits Replace the following statements: a) "git checkout -f -B $BRANCH origin/$BRANCH" b) "git checkout -f -B $BRANCH $BRANCH" with: c) "git checkout -f $BRANCH" Regarding a), we don't need to specify 'origin/' for each branch, since we are cloning the repositories in the same Dockerfile, and therefore we know for sure that there is only one remote and branch names won't be ambiguous. Removing the 'origin/' allows to put commit hashes into the branch variables (like done in the new bisect script [1]). Version b) does not work with branch names: $ git checkout -f -B osmith/check-imei-before-lu osmith/check-imei-before-lu fatal: Cannot update paths and switch to branch 'osmith/check-imei-before-lu' at the same time. Did you intend to checkout 'osmith/check-imei-before-lu' which can not be resolved as commit? New version c) works with both commits and branches, and it is shorter. [1] Change-Id: I11f7e61a9b30d58a0fdfcaf77dde447806bf661f Change-Id: I2ff745c8d19b777d876170d5717c082ceb68a1f3 --- M gr-gsm-master/Dockerfile M osmo-bsc-master/Dockerfile M osmo-bts-master/Dockerfile M osmo-gerrit-libosmo/Dockerfile M osmo-ggsn-master/Dockerfile M osmo-hlr-master/Dockerfile M osmo-hnbgw-master/Dockerfile M osmo-mgw-master/Dockerfile M osmo-msc-master/Dockerfile M osmo-nitb-master/Dockerfile M osmo-pcu-master/Dockerfile M osmo-sgsn-master/Dockerfile M osmo-sip-master/Dockerfile M osmo-stp-master/Dockerfile M osmocom-bb-host-master/Dockerfile M ttcn3-bsc-test/Dockerfile M ttcn3-bscnat-test/Dockerfile M ttcn3-bts-test/Dockerfile M ttcn3-ggsn-test/Dockerfile M ttcn3-hlr-test/Dockerfile M ttcn3-mgw-test/Dockerfile M ttcn3-msc-test/Dockerfile M ttcn3-nitb-sysinfo/Dockerfile M ttcn3-pcu-test/Dockerfile M ttcn3-sgsn-test/Dockerfile M ttcn3-sip-test/Dockerfile 26 files changed, 47 insertions(+), 47 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/95/13895/1 diff --git a/gr-gsm-master/Dockerfile b/gr-gsm-master/Dockerfile index 03cf427..b678dd6 100644 --- a/gr-gsm-master/Dockerfile +++ b/gr-gsm-master/Dockerfile @@ -50,7 +50,7 @@ ADD http://git.osmocom.org/libosmocore/patch?h=$LIBOSMOCORE_BRANCH /tmp/commit-libosmocore RUN cd libosmocore \ - && git fetch && git checkout -f -B $LIBOSMOCORE_BRANCH origin/$LIBOSMOCORE_BRANCH \ + && git fetch && git checkout -f $LIBOSMOCORE_BRANCH \ && git rev-parse --abbrev-ref HEAD && git rev-parse HEAD \ && autoreconf -fi \ && ./configure \ @@ -65,7 +65,7 @@ ADD http://git.osmocom.org/gr-gsm/patch?h=$GR_GSM_BRANCH /tmp/commit-gr-gsm RUN cd gr-gsm \ - && git fetch && git checkout -f -B $GR_GSM_BRANCH origin/$GR_GSM_BRANCH \ + && git fetch && git checkout -f $GR_GSM_BRANCH \ && git rev-parse HEAD \ && mkdir build/ \ && cd build/ \ diff --git a/osmo-bsc-master/Dockerfile b/osmo-bsc-master/Dockerfile index bcd0573..cbf80f9 100644 --- a/osmo-bsc-master/Dockerfile +++ b/osmo-bsc-master/Dockerfile @@ -32,7 +32,7 @@ ADD http://git.osmocom.org/osmo-bsc/patch?h=$OSMO_BSC_BRANCH /tmp/commit-osmo-bsc RUN cd osmo-bsc && \ - git fetch && git checkout -f -B $OSMO_BSC_BRANCH $OSMO_BSC_BRANCH && \ + git fetch && git checkout -f $OSMO_BSC_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-bts-master/Dockerfile b/osmo-bts-master/Dockerfile index f4ddf3a..d7707a3 100644 --- a/osmo-bts-master/Dockerfile +++ b/osmo-bts-master/Dockerfile @@ -33,7 +33,7 @@ ADD http://git.osmocom.org/osmo-bts/patch?h=$OSMO_BTS_BRANCH /tmp/commit-osmo-bts RUN cd osmo-bts && \ - git fetch && git checkout -f -B $OSMO_BTS_BRANCH $OSMO_BTS_BRANCH && \ + git fetch && git checkout -f $OSMO_BTS_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-trx && \ diff --git a/osmo-gerrit-libosmo/Dockerfile b/osmo-gerrit-libosmo/Dockerfile index 5442703..4db1923 100644 --- a/osmo-gerrit-libosmo/Dockerfile +++ b/osmo-gerrit-libosmo/Dockerfile @@ -45,7 +45,7 @@ # build libasn1c first, no libosmo* dependency and infrequent changes ADD http://git.osmocom.org/libasn1c/patch /tmp/commit-libasn1c RUN cd libasn1c && \ - git fetch && git checkout -f -B master origin/master && \ + git fetch && git checkout -f master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -56,7 +56,7 @@ # build libsmpp34 first, no libosmo* dependency and infrequent changes ADD http://git.osmocom.org/libsmpp34/patch /tmp/commit-libsmpp34 RUN cd libsmpp34 && \ - git fetch && git checkout -f -B master origin/master && \ + git fetch && git checkout -f master && \ autoreconf -fi && \ ./configure && \ make -j1 && \ @@ -67,7 +67,7 @@ # build libosmocore before any of its downatream dependences ADD http://git.osmocom.org/libosmocore/patch /tmp/commit-libosmocore RUN cd libosmocore && \ - git fetch && git checkout -f -B master origin/master && \ + git fetch && git checkout -f master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -79,7 +79,7 @@ ADD http://git.osmocom.org/libosmo-abis/patch /tmp/commit-libosmo-abis RUN cd libosmo-abis && \ - git fetch && git checkout -f -B master origin/master && \ + git fetch && git checkout -f master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -89,7 +89,7 @@ ADD http://git.osmocom.org/libosmo-netif/patch /tmp/commit-libosmo-netif RUN cd libosmo-netif && \ - git fetch && git checkout -f -B master origin/master && \ + git fetch && git checkout -f master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -99,7 +99,7 @@ ADD http://git.osmocom.org/libosmo-sccp/patch /tmp/commit-libosmo-sccp RUN cd libosmo-sccp && \ - git fetch && git checkout -f -B master origin/master && \ + git fetch && git checkout -f master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -109,7 +109,7 @@ ADD http://git.osmocom.org/osmo-mgw/patch /tmp/commit-osmo-mgw RUN cd osmo-mgw && \ - git fetch && git checkout -f -B master origin/master && \ + git fetch && git checkout -f master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -119,7 +119,7 @@ ADD http://git.osmocom.org/osmo-iuh/patch /tmp/commit-osmo-iuh RUN cd osmo-iuh && \ - git fetch && git checkout -f -B master origin/master && \ + git fetch && git checkout -f master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -129,7 +129,7 @@ ADD http://git.osmocom.org/osmo-ggsn/patch /tmp/commit-osmo-ggsn RUN cd osmo-ggsn && \ - git fetch && git checkout -f -B master origin/master && \ + git fetch && git checkout -f master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -139,4 +139,4 @@ # example command which builds a single osmo-* application at 'docker run' time in tmpfs -CMD /bin/sh -c 'cd /tmpfs && git clone --reference /build/openbsc git://git.osmocom.org/openbsc.git && cd openbsc && git checkout -f -B master origin/master && cd openbsc && autoreconf -fi && ./configure --enable-nat --enable-osmo-bsc --enable-smpp --enable-vty-tests --enable-external-tests && make -j8 check' +CMD /bin/sh -c 'cd /tmpfs && git clone --reference /build/openbsc git://git.osmocom.org/openbsc.git && cd openbsc && git checkout -f master && cd openbsc && autoreconf -fi && ./configure --enable-nat --enable-osmo-bsc --enable-smpp --enable-vty-tests --enable-external-tests && make -j8 check' diff --git a/osmo-ggsn-master/Dockerfile b/osmo-ggsn-master/Dockerfile index cf84d02..8398fbb 100644 --- a/osmo-ggsn-master/Dockerfile +++ b/osmo-ggsn-master/Dockerfile @@ -25,7 +25,7 @@ RUN git clone git://git.osmocom.org/osmo-ggsn.git ADD http://git.osmocom.org/osmo-ggsn/patch/?h=$OSMO_GGSN_BRANCH /tmp/commit RUN cd osmo-ggsn && \ - git fetch && git checkout -f -B $OSMO_GGSN_BRANCH $OSMO_GGSN_BRANCH && \ + git fetch && git checkout -f $OSMO_GGSN_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-hlr-master/Dockerfile b/osmo-hlr-master/Dockerfile index 2da7c08..84df534 100644 --- a/osmo-hlr-master/Dockerfile +++ b/osmo-hlr-master/Dockerfile @@ -30,7 +30,7 @@ ADD http://git.osmocom.org/osmo-hlr/patch?h=$OSMO_HLR_BRANCH /tmp/commit-osmo-hlr RUN cd osmo-hlr && \ - git fetch && git checkout -f -B $OSMO_HLR_BRANCH $OSMO_HLR_BRANCH && \ + git fetch && git checkout -f $OSMO_HLR_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-hnbgw-master/Dockerfile b/osmo-hnbgw-master/Dockerfile index c89502b..347e8d4 100644 --- a/osmo-hnbgw-master/Dockerfile +++ b/osmo-hnbgw-master/Dockerfile @@ -30,7 +30,7 @@ ADD http://git.osmocom.org/osmo-iuh/patch?h=$OSMO_IUH_BRANCH /tmp/commit-osmo-mgw RUN cd osmo-iuh && \ - git fetch && git checkout -f -B $OSMO_IUH_BRANCH $OSMO_IUH_BRANCH && \ + git fetch && git checkout -f $OSMO_IUH_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-mgw-master/Dockerfile b/osmo-mgw-master/Dockerfile index 4c6d32a..92e499e 100644 --- a/osmo-mgw-master/Dockerfile +++ b/osmo-mgw-master/Dockerfile @@ -30,7 +30,7 @@ RUN cd osmo-mgw && \ - git fetch && git checkout -f -B $OSMO_MGW_BRANCH $OSMO_MGW_BRANCH && \ + git fetch && git checkout -f $OSMO_MGW_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-msc-master/Dockerfile b/osmo-msc-master/Dockerfile index c8cfd62..83576ea 100644 --- a/osmo-msc-master/Dockerfile +++ b/osmo-msc-master/Dockerfile @@ -37,7 +37,7 @@ ADD http://git.osmocom.org/osmo-msc/patch?h=$OSMO_MSC_BRANCH /tmp/commit-osmo-msc RUN cd osmo-msc && \ - git fetch && git checkout -f -B $OSMO_MSC_BRANCH $OSMO_MSC_BRANCH && \ + git fetch && git checkout -f $OSMO_MSC_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-smpp --enable-iu && \ diff --git a/osmo-nitb-master/Dockerfile b/osmo-nitb-master/Dockerfile index d3774da..d0fc8af 100644 --- a/osmo-nitb-master/Dockerfile +++ b/osmo-nitb-master/Dockerfile @@ -31,7 +31,7 @@ ADD http://git.osmocom.org/openbsc/patch?h=$OSMO_NITB_BRANCH /tmp/commit-openbsc RUN cd openbsc/openbsc && \ - git fetch && git checkout -f -B $OSMO_NITB_BRANCH $OSMO_NITB_BRANCH && \ + git fetch && git checkout -f $OSMO_NITB_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-nat --enable-osmo-bsc --enable-smpp && \ diff --git a/osmo-pcu-master/Dockerfile b/osmo-pcu-master/Dockerfile index 7a294a4..fba8c31 100644 --- a/osmo-pcu-master/Dockerfile +++ b/osmo-pcu-master/Dockerfile @@ -28,7 +28,7 @@ ADD http://git.osmocom.org/osmo-pcu/patch?h=$OSMO_PCU_BRANCH /tmp/commit-osmo-pcu RUN cd osmo-pcu && \ - git fetch && git checkout -f -B $OSMO_PCU_BRANCH $OSMO_PCU_BRANCH && \ + git fetch && git checkout -f $OSMO_PCU_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-trx && \ diff --git a/osmo-sgsn-master/Dockerfile b/osmo-sgsn-master/Dockerfile index c373564..4973240 100644 --- a/osmo-sgsn-master/Dockerfile +++ b/osmo-sgsn-master/Dockerfile @@ -32,7 +32,7 @@ ADD http://git.osmocom.org/osmo-sgsn/patch?h=$OSMO_SGSN_BRANCH /tmp/commit RUN cd osmo-sgsn && \ - git fetch && git checkout -f -B $OSMO_SGSN_BRANCH $OSMO_SGSN_BRANCH && \ + git fetch && git checkout -f $OSMO_SGSN_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-sip-master/Dockerfile b/osmo-sip-master/Dockerfile index 258b1fe..a8d14c7 100644 --- a/osmo-sip-master/Dockerfile +++ b/osmo-sip-master/Dockerfile @@ -36,7 +36,7 @@ ADD http://git.osmocom.org/osmo-sip-connector/patch?h=$OSMO_SIP_BRANCH /tmp/commit-osmo-sip-connector RUN cd osmo-sip-connector && \ - git fetch && git checkout -f -B $OSMO_SIP_BRANCH $OSMO_SIP_BRANCH && \ + git fetch && git checkout -f $OSMO_SIP_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-smpp --enable-iu && \ diff --git a/osmo-stp-master/Dockerfile b/osmo-stp-master/Dockerfile index 0a62ed7..a1e931f 100644 --- a/osmo-stp-master/Dockerfile +++ b/osmo-stp-master/Dockerfile @@ -26,7 +26,7 @@ RUN git clone git://git.osmocom.org/libosmo-sccp.git ADD http://git.osmocom.org/libosmo-sccp/patch?h=$OSMO_STP_BRANCH /tmp/commit RUN cd libosmo-sccp && \ - git fetch && git checkout -f -B $OSMO_STP_BRANCH $OSMO_STP_BRANCH && \ + git fetch && git checkout -f $OSMO_STP_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmocom-bb-host-master/Dockerfile b/osmocom-bb-host-master/Dockerfile index 260f381..ef6ff2d 100644 --- a/osmocom-bb-host-master/Dockerfile +++ b/osmocom-bb-host-master/Dockerfile @@ -25,7 +25,7 @@ ADD http://git.osmocom.org/osmocom-bb/patch?h=$OSMO_BB_BRANCH /tmp/commit RUN cd osmocom-bb && \ - git fetch && git checkout -f -B $OSMO_BB_BRANCH origin/$OSMO_BB_BRANCH && \ + git fetch && git checkout -f $OSMO_BB_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD RUN cd osmocom-bb/src/host/trxcon && \ diff --git a/ttcn3-bsc-test/Dockerfile b/ttcn3-bsc-test/Dockerfile index 546f33b..93d65ad 100644 --- a/ttcn3-bsc-test/Dockerfile +++ b/ttcn3-bsc-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f -B master origin/master && \ + git checkout -f master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout -f $OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make bsc diff --git a/ttcn3-bscnat-test/Dockerfile b/ttcn3-bscnat-test/Dockerfile index 047f21c..86422b3 100644 --- a/ttcn3-bscnat-test/Dockerfile +++ b/ttcn3-bscnat-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f -B master origin/master && \ + git checkout -f master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout -f $OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make bsc-nat diff --git a/ttcn3-bts-test/Dockerfile b/ttcn3-bts-test/Dockerfile index d8969bb..387afb0 100644 --- a/ttcn3-bts-test/Dockerfile +++ b/ttcn3-bts-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f -B master origin/master && \ + git checkout -f master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout -f $OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make deps-update bts diff --git a/ttcn3-ggsn-test/Dockerfile b/ttcn3-ggsn-test/Dockerfile index 6d6aff6..7bfb0a8 100644 --- a/ttcn3-ggsn-test/Dockerfile +++ b/ttcn3-ggsn-test/Dockerfile @@ -4,7 +4,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f -B master origin/master && \ + git checkout -f master && \ make deps ARG OSMO_TTCN3_BRANCH="master" @@ -12,7 +12,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout -f $OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make ggsn_tests diff --git a/ttcn3-hlr-test/Dockerfile b/ttcn3-hlr-test/Dockerfile index 752d442..fa70311 100644 --- a/ttcn3-hlr-test/Dockerfile +++ b/ttcn3-hlr-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f -B master origin/master && \ + git checkout -f master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout -f $OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make deps-update hlr diff --git a/ttcn3-mgw-test/Dockerfile b/ttcn3-mgw-test/Dockerfile index bf13d12..d6267e8 100644 --- a/ttcn3-mgw-test/Dockerfile +++ b/ttcn3-mgw-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f -B master origin/master && \ + git checkout -f master && \ make deps ARG OSMO_TTCN3_BRANCH="master" @@ -13,7 +13,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout -f $OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make mgw diff --git a/ttcn3-msc-test/Dockerfile b/ttcn3-msc-test/Dockerfile index 53aa393..92eeee0 100644 --- a/ttcn3-msc-test/Dockerfile +++ b/ttcn3-msc-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f -B master origin/master && \ + git checkout -f master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout -f $OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make msc diff --git a/ttcn3-nitb-sysinfo/Dockerfile b/ttcn3-nitb-sysinfo/Dockerfile index d0ec87a..45bf225 100644 --- a/ttcn3-nitb-sysinfo/Dockerfile +++ b/ttcn3-nitb-sysinfo/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f -B master origin/master && \ + git checkout -f master && \ make deps ARG OSMO_TTCN3_BRANCH="master" @@ -13,7 +13,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout -f $OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make sysinfo diff --git a/ttcn3-pcu-test/Dockerfile b/ttcn3-pcu-test/Dockerfile index fbb64f5..fa9e724 100644 --- a/ttcn3-pcu-test/Dockerfile +++ b/ttcn3-pcu-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f -B master origin/master && \ + git checkout -f master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout -f $OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make pcu diff --git a/ttcn3-sgsn-test/Dockerfile b/ttcn3-sgsn-test/Dockerfile index 60ec333..4ea5daf 100644 --- a/ttcn3-sgsn-test/Dockerfile +++ b/ttcn3-sgsn-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f -B master origin/master && \ + git checkout -f master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout -f $OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make sgsn diff --git a/ttcn3-sip-test/Dockerfile b/ttcn3-sip-test/Dockerfile index eead347..4ba59be 100644 --- a/ttcn3-sip-test/Dockerfile +++ b/ttcn3-sip-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f -B master origin/master && \ + git checkout -f master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout -f $OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make sip -- To view, visit https://gerrit.osmocom.org/13895 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I2ff745c8d19b777d876170d5717c082ceb68a1f3 Gerrit-Change-Number: 13895 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 10:25:18 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 7 May 2019 10:25:18 +0000 Subject: Change in docker-playground[master]: Add OSMO_*_BRANCH environment variables for build args In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/13779 ) Change subject: Add OSMO_*_BRANCH environment variables for build args ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/13779/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/#/c/13779/1//COMMIT_MSG at 15 PS1, Line 15: The origin/ prefix from the git checkout command is removed so the : *_BRANCH variable doesn't have to contain branch names, but van also : contain arbitrary commits. This shouldn't have any adverse effect as we : only have one remote in the checkout. This breaks using branch names in these variables: $ git checkout -f -B osmith/check-imei-before-lu osmith/check-imei-before-lu fatal: Cannot update paths and switch to branch 'osmith/check-imei-before-lu' at the same time. Did you intend to checkout 'osmith/check-imei-before-lu' which can not be resolved as commit? Fix submitted here: https://gerrit.osmocom.org/#/c/docker-playground/+/13895/ -- To view, visit https://gerrit.osmocom.org/13779 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If3bc5fae07cf63c4fef68306be4c4328660bc869 Gerrit-Change-Number: 13779 Gerrit-PatchSet: 1 Gerrit-Owner: Daniel Willmann Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-Comment-Date: Tue, 07 May 2019 10:25:18 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 10:27:40 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 7 May 2019 10:27:40 +0000 Subject: Change in docker-playground[master]: Simplify git checkout, allow branches and commits In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/13895 ) Change subject: Simplify git checkout, allow branches and commits ...................................................................... Patch Set 1: Verified+1 I've tested that this fixes using branch names in the variables: $ export OSMO_MSC_BRANCH="osmith/check-imei-before-lu" $ cd ttcn3-msc-test $ ./jenkins.sh -- To view, visit https://gerrit.osmocom.org/13895 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2ff745c8d19b777d876170d5717c082ceb68a1f3 Gerrit-Change-Number: 13895 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-Comment-Date: Tue, 07 May 2019 10:27:40 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 10:50:05 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 May 2019 10:50:05 +0000 Subject: Change in osmo-msc[master]: vty: make retrieve-imeisv-early configurable In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13892 ) Change subject: vty: make retrieve-imeisv-early configurable ...................................................................... Patch Set 1: Code-Review-1 (3 comments) https://gerrit.osmocom.org/#/c/13892/1/src/libmsc/msc_vty.c File src/libmsc/msc_vty.c: https://gerrit.osmocom.org/#/c/13892/1/src/libmsc/msc_vty.c at 465 PS1, Line 465: "Retrieve the IMEISV from the MS before doing the location update. In combination with other MSC and HLR" I think "accepting" or "concluding" location update makes more sense here instead of "before". https://gerrit.osmocom.org/#/c/13892/1/src/libmsc/msc_vty.c at 470 PS1, Line 470: "Do not retrieve IMEISV before location update\n") I think these two lines should be swapped. Actually, I think you should move into "retrieve-imeisv-early" and "no retrieve-imeisv-early" commands, being no the default. https://gerrit.osmocom.org/#/c/13892/1/src/libmsc/msc_vty.c at 552 PS1, Line 552: vty_out(vty, " retrieve-imeisv-early 1 %s", See my comment about adding the "no retrieve-imeisv-early" command. -- To view, visit https://gerrit.osmocom.org/13892 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I256224194c3b8caf2b58a88d11dccd32c569201f Gerrit-Change-Number: 13892 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 07 May 2019 10:50:05 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 11:10:33 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 May 2019 11:10:33 +0000 Subject: Change in osmo-msc[master]: vlr: when setting IMEISV, also set IMEI In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13893 ) Change subject: vlr: when setting IMEISV, also set IMEI ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/13893/1/include/osmocom/msc/vlr.h File include/osmocom/msc/vlr.h: https://gerrit.osmocom.org/#/c/13893/1/include/osmocom/msc/vlr.h at 154 PS1, Line 154: char imei[GSM23003_IMEI_NUM_DIGITS_NO_CHK+1]; /* 2.1.9 */ Send this as a separate patch please. -- To view, visit https://gerrit.osmocom.org/13893 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I02e7b66848bf7dddb31b105e2ae981432817ae1e Gerrit-Change-Number: 13893 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 07 May 2019 11:10:33 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 11:30:16 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 May 2019 11:30:16 +0000 Subject: Change in osmo-msc[master]: vlr: check IMEI early for retrieve-imeisv-early 1 In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13894 ) Change subject: vlr: check IMEI early for retrieve-imeisv-early 1 ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/13894/1/src/libvlr/vlr_lu_fsm.c File src/libvlr/vlr_lu_fsm.c: https://gerrit.osmocom.org/#/c/13894/1/src/libvlr/vlr_lu_fsm.c at 463 PS1, Line 463: if (vlr->cfg.check_imei_rqd && !vlr->cfg.retrieve_imeisv_early) { Add a comment here like "if imeisv_eraly is enabled, we already have IMEI so no need to ask for it again" -- To view, visit https://gerrit.osmocom.org/13894 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I88283cad23793b475445d814ff49db534cb41244 Gerrit-Change-Number: 13894 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 07 May 2019 11:30:16 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 11:32:25 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 May 2019 11:32:25 +0000 Subject: Change in docker-playground[master]: Simplify git checkout, allow branches and commits In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13895 ) Change subject: Simplify git checkout, allow branches and commits ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13895 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2ff745c8d19b777d876170d5717c082ceb68a1f3 Gerrit-Change-Number: 13895 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-Comment-Date: Tue, 07 May 2019 11:32:25 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 11:54:30 2019 From: gerrit-no-reply at lists.osmocom.org (Mykola Shchetinin) Date: Tue, 7 May 2019 11:54:30 +0000 Subject: Change in libosmocore[master]: add osmo_stat_item_inc/osmo_stat_item_dec to set it relative In-Reply-To: References: Message-ID: Mykola Shchetinin has posted comments on this change. ( https://gerrit.osmocom.org/13801 ) Change subject: add osmo_stat_item_inc/osmo_stat_item_dec to set it relative ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13801 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id2462c4866bd22bc2338c9c8f69b775f88ae7511 Gerrit-Change-Number: 13801 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Mykola Shchetinin Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 07 May 2019 11:54:30 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 12:43:50 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 7 May 2019 12:43:50 +0000 Subject: Change in osmo-msc[master]: vty: make retrieve-imeisv-early configurable In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13892 ) Change subject: vty: make retrieve-imeisv-early configurable ...................................................................... Patch Set 1: (3 comments) https://gerrit.osmocom.org/#/c/13892/1/src/libmsc/msc_vty.c File src/libmsc/msc_vty.c: https://gerrit.osmocom.org/#/c/13892/1/src/libmsc/msc_vty.c at 464 PS1, Line 464: retrieve-imeisv-early Is this command related to 'check-imei-rqd' anyhow? If yes, it would make sense to merge this one as a flag of the existing command, i.e.: "check-imei-rqd (0|1) [early]". https://gerrit.osmocom.org/#/c/13892/1/src/libmsc/msc_vty.c at 465 PS1, Line 465: "Retrieve the IMEISV from the MS before doing the location update. In combination with other MSC and HLR" > I think "accepting" or "concluding" location update makes more sense here instead of "before". ACK https://gerrit.osmocom.org/#/c/13892/1/src/libmsc/msc_vty.c at 470 PS1, Line 470: "Do not retrieve IMEISV before location update\n") > I think these two lines should be swapped. ACK. > I think you should move into "retrieve-imeisv-early" and "no retrieve-imeisv-early" [...] Well, 'check-imei-rqd' is already using (0|1), so using the suggested approach would increase the inconsistency. -- To view, visit https://gerrit.osmocom.org/13892 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I256224194c3b8caf2b58a88d11dccd32c569201f Gerrit-Change-Number: 13892 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 07 May 2019 12:43:50 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 13:00:21 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 7 May 2019 13:00:21 +0000 Subject: Change in osmo-msc[master]: vlr: check IMEI early for retrieve-imeisv-early 1 In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13894 ) Change subject: vlr: check IMEI early for retrieve-imeisv-early 1 ...................................................................... Patch Set 1: (3 comments) Fine in general, just a few not critical notes. https://gerrit.osmocom.org/#/c/13894/1/src/libvlr/vlr_lu_fsm.c File src/libvlr/vlr_lu_fsm.c: https://gerrit.osmocom.org/#/c/13894/1/src/libvlr/vlr_lu_fsm.c at 932 PS1, Line 932: LOGPFSM(fi, "%s()\n", __func__); What would this message mean for a regular user (not a developer)? Either it should contain something more informative, or it should be removed. https://gerrit.osmocom.org/#/c/13894/1/src/libvlr/vlr_lu_fsm.c at 937 PS1, Line 937: } : else Please fix the coding style: ... } else { ... https://gerrit.osmocom.org/#/c/13894/1/src/libvlr/vlr_lu_fsm.c at 955 PS1, Line 955: event without effect I guess if this happens, then we have a bug somewhere? I would rather OSMO_ASSERT(0) here... Not critical though. -- To view, visit https://gerrit.osmocom.org/13894 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I88283cad23793b475445d814ff49db534cb41244 Gerrit-Change-Number: 13894 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 07 May 2019 13:00:21 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 13:06:14 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 May 2019 13:06:14 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: mo and mt voice call tests: add lots of missing parts In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13616 to look at the new patch set (#6). Change subject: msc: mo and mt voice call tests: add lots of missing parts ...................................................................... msc: mo and mt voice call tests: add lots of missing parts Both f_mo_call_establish() and f_mt_call_establish() were testing barely half a voice call setup. For example, f_mo_call_establish() used to be satisfied with just two CRCX, but no actual RTP connections being made. Add numerous MNCC and MGCP messages more closely resembling an actual call. The main reason is to achieve a state that passes both current osmo-msc master as well as the upcoming inter-MSC Handover refactoring. Add log markers to f_*_call_*(): often when a test halts, it is not at all clear why. With these log markers it is saner to figure out what has happened and what hasn't. Change-Id: I162985045bb5e129977a3a797b656e30220990df --- M library/L3_Templates.ttcn M library/MGCP_Templates.ttcn M library/MNCC_Types.ttcn M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn 5 files changed, 231 insertions(+), 93 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/16/13616/6 -- To view, visit https://gerrit.osmocom.org/13616 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I162985045bb5e129977a3a797b656e30220990df Gerrit-Change-Number: 13616 Gerrit-PatchSet: 6 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 13:06:51 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 May 2019 13:06:51 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13137 to look at the new patch set (#9). Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... large refactoring: support inter-BSC and inter-MSC Handover 3GPP TS 49.008 '4.3 Roles of MSC-A, MSC-I and MSC-T' defines distinct roles: - MSC-A is responsible for managing subscribers, - MSC-I is the gateway to the RAN. - MSC-T is a second transitory gateway to another RAN during Handover. After inter-MSC Handover, the MSC-I is handled by a remote MSC instance, while the original MSC-A retains the responsibility of subscriber management. MSC-T exists in this patch but is not yet used, since Handover is only prepared for, not yet implemented. Facilitate Inter-MSC and inter-BSC Handover by the same internal split of MSC roles. Compared to inter-MSC Handover, mere inter-BSC has the obvious simplifications: - all of MSC-A, MSC-I and MSC-T roles will be served by the same osmo-msc instance, - messages between MSC-A and MSC-{I,T} don't need to be routed via E-interface (GSUP), - no call routing between MSC-A and -I via MNCC necessary. This is the largest code bomb I have submitted, ever. Out of principle, I apologize to everyone trying to read this as a whole. Unfortunately, I see no sense in trying to split this patch into smaller bits. It would be a huge amount of work to introduce these changes in separate chunks, especially if each should in turn be useful and pass all test suites. So, unfortunately, we are stuck with this code bomb. The following are some details and rationale for this rather huge refactoring: * separate MSC subscriber management from ran_conn struct ran_conn is reduced from the pivotal subscriber management entity it has been so far to a mere storage for an SCCP connection ID and an MSC subscriber reference. The new pivotal subscriber management entity is struct msc_a -- struct msub lists the msc_a, msc_i, msc_t roles, the vast majority of code paths however use msc_a, since MSC-A is where all the interesting stuff happens. Before handover, msc_i is an FSM implementation that encodes to the local ran_conn. After inter-MSC Handover, msc_i is a compatible but different FSM implementation that instead forwards via/from GSUP. Same goes for the msc_a struct: if osmo-msc is the MSC-I "RAN proxy" for a remote MSC-A role, the msc_a->fi is an FSM implementation that merely forwards via/from GSUP. * New SCCP implementation for RAN access To be able to forward BSSAP and RANAP messages via the GSUP interface, the individual message layers need to be cleanly separated. The IuCS implementation used until now (iu_client from libosmo-ranap) did not provide this level of separation, and needed a complete rewrite. It was trivial to implement this in such a way that both BSSAP and RANAP can be handled by the same SCCP code, hence the new SCCP-RAN layer also replaces BSSAP handling. sccp_ran.h: struct sccp_ran_inst provides an abstract handler for incoming RAN connections. A set of callback functions provides implementation specific details. * RAN Abstraction (BSSAP vs. RANAP) The common SCCP implementation did set the theme for the remaining refactoring: make all other MSC code paths entirely RAN-implementation-agnostic. ran_infra.c provides data structures that list RAN implementation specifics, from logging to RAN de-/encoding to SCCP callbacks and timers. A ran_infra pointer hence allows complete abstraction of RAN implementations: - managing connected RAN peers (BSC, RNC) in ran_peer.c, - classifying and de-/encoding RAN PDUs, - recording connected LACs and cell IDs and sending out Paging requests to matching RAN peers. * RAN RESET now also for RANAP ran_peer.c absorbs the reset_fsm from a_reset.c; in consequence, RANAP also supports proper RESET semantics now. Hence osmo-hnbgw now also needs to provide proper RESET handling, which it so far duly ignores. (TODO) * RAN de-/encoding abstraction The RAN abstraction mentioned above serves not only to separate RANAP and BSSAP implementations transparently, but also to be able to optionally handle RAN on distinct levels. Before Handover, all RAN messages are handled by the MSC-A role. However, after an inter-MSC Handover, a standalone MSC-I will need to decode RAN PDUs, at least in order to manage Assignment of RTP streams between BSS/RNC and MNCC call forwarding. ran_msg.h provides a common API with abstraction for: - receiving events from RAN, i.e. passing RAN decode from the BSC/RNC and MS/UE: struct ran_dec_msg represents RAN messages decoded from either BSSMAP or RANAP; - sending RAN events: ran_enc_msg is the counterpart to compose RAN messages that should be encoded to either BSSMAP or RANAP and passed down to the BSC/RNC and MS/UE. The RAN-specific implementations are completely contained by ran_msg_a.c and ran_msg_iu.c. In particular, Assignment and Ciphering have so far been distinct code paths for BSSAP and RANAP, with switch(via_ran){...} statements all over the place. Using RAN_DEC_* and RAN_ENC_* abstractions, these are now completely unified. Note that SGs does not qualify for RAN abstraction: the SGs interface always remains with the MSC-A role, and SGs messages follow quite distinct semantics from the fairly similar GERAN and UTRAN. * MGW and RTP stream management So far, managing MGW endpoints via MGCP was tightly glued in-between GSM-04.08-CC on the one and MNCC on the other side. Prepare for switching RTP streams between different RAN peers by moving to object-oriented implementations: implement struct call_leg and struct rtp_stream with distinct FSMs each. For MGW communication, use the osmo_mgcpc_ep API that has originated from osmo-bsc and recently moved to libosmo-mgcp-client for this purpose. Instead of implementing a sequence of events with code duplication for the RAN and CN sides, the idea is to manage each RTP stream separately by firing and receiving events as soon as codecs and RTP ports are negotiated, and letting the individual FSMs take care of the MGW management "asynchronously". The caller provides event IDs and an FSM instance that should be notified of RTP stream setup progress. Hence it becomes possible to reconnect RTP streams from one GSM-04.08-CC to another (inter-BSC Handover) or between CC and MNCC RTP peers (inter-MSC Handover) without duplicating the MGCP code for each transition. The number of FSM implementations used for MGCP handling may seem a bit of an overkill. But in fact, the number of perspectives on RTP forwarding are far from trivial: - an MGW endpoint is an entity with N connections, and MGCP "sessions" for configuring them by talking to the MGW; - an RTP stream is a remote peer connected to one of the endpoint's connections, which is asynchronously notified of codec and RTP port choices; - a call leg is the higher level view on either an MT or MO side of a voice call, a combination of two RTP streams to forward between two remote peers. BSC MGW PBX CI CI [MGW-endpoint] [--rtp_stream--] [--rtp_stream--] [----------------call_leg----------------] * Use counts Introduce using the new osmo_use_count API added to libosmocore for this purpose. Each use token has a distinct name in the logging, which can be a globally constant name or ad-hoc, like the local __func__ string constant. Use in the new struct msc_a, as well as change vlr_subscr to the new osmo_use_count API. * FSM Timeouts Introduce using the new osmo_tdef API, which provides a common VTY implementation for all timer numbers, and FSM state transitions with the correct timeout. Originated in osmo-bsc, recently moved to libosmocore. Depends: Ife31e6798b4e728a23913179e346552a7dd338c0 (libosmocore) Ib9af67b100c4583342a2103669732dab2e577b04 (libosmocore) Id617265337f09dfb6ddfe111ef5e578cd3dc9f63 (libosmocore) Ie9e2add7bbfae651c04e230d62e37cebeb91b0f5 (libosmo-sccp) I26be5c4b06a680f25f19797407ab56a5a4880ddc (osmo-mgw) Ida0e59f9a1f2dd18efea0a51680a67b69f141efa (osmo-mgw) I9a3effd38e72841529df6c135c077116981dea36 (osmo-mgw) Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd --- M configure.ac A doc/sequence_charts/Makefile.am A doc/sequence_charts/inter_bsc_ho.msc A doc/sequence_charts/inter_msc_ho.msc A doc/sequence_charts/mncc_fsm.msc M include/osmocom/msc/Makefile.am D include/osmocom/msc/a_iface.h D include/osmocom/msc/a_iface_bssap.h D include/osmocom/msc/a_reset.h A include/osmocom/msc/call_leg.h A include/osmocom/msc/cell_id_list.h A include/osmocom/msc/e_link.h M include/osmocom/msc/gsm_04_08.h M include/osmocom/msc/gsm_04_11.h M include/osmocom/msc/gsm_04_11_gsup.h M include/osmocom/msc/gsm_04_14.h M include/osmocom/msc/gsm_04_80.h M include/osmocom/msc/gsm_09_11.h M include/osmocom/msc/gsm_data.h M include/osmocom/msc/gsm_data_shared.h M include/osmocom/msc/gsm_subscriber.h A include/osmocom/msc/gsup_client_mux.h D include/osmocom/msc/iu_dummy.h D include/osmocom/msc/iucs.h D include/osmocom/msc/iucs_ranap.h M include/osmocom/msc/mncc.h A include/osmocom/msc/mncc_call.h A include/osmocom/msc/msc_a.h A include/osmocom/msc/msc_a_remote.h M include/osmocom/msc/msc_common.h A include/osmocom/msc/msc_ho.h A include/osmocom/msc/msc_i.h A include/osmocom/msc/msc_i_remote.h D include/osmocom/msc/msc_ifaces.h D include/osmocom/msc/msc_mgcp.h A include/osmocom/msc/msc_roles.h A include/osmocom/msc/msc_t.h A include/osmocom/msc/msc_t_remote.h A include/osmocom/msc/msub.h A include/osmocom/msc/neighbor_ident.h A include/osmocom/msc/paging.h M include/osmocom/msc/ran_conn.h A include/osmocom/msc/ran_infra.h A include/osmocom/msc/ran_msg.h A include/osmocom/msc/ran_msg_a.h A include/osmocom/msc/ran_msg_iu.h A include/osmocom/msc/ran_peer.h A include/osmocom/msc/rtp_stream.h A include/osmocom/msc/sccp_ran.h M include/osmocom/msc/sgs_iface.h M include/osmocom/msc/signal.h M include/osmocom/msc/silent_call.h M include/osmocom/msc/sms_queue.h M include/osmocom/msc/transaction.h M include/osmocom/msc/vlr.h M include/osmocom/msc/vlr_sgs.h M src/libmsc/Makefile.am D src/libmsc/a_iface.c D src/libmsc/a_iface_bssap.c D src/libmsc/a_reset.c A src/libmsc/call_leg.c A src/libmsc/cell_id_list.c A src/libmsc/e_link.c M src/libmsc/gsm_04_08.c M src/libmsc/gsm_04_08_cc.c M src/libmsc/gsm_04_11.c M src/libmsc/gsm_04_11_gsup.c M src/libmsc/gsm_04_14.c M src/libmsc/gsm_04_80.c M src/libmsc/gsm_09_11.c D src/libmsc/gsm_subscriber.c A src/libmsc/gsup_client_mux.c D src/libmsc/iu_dummy.c D src/libmsc/iucs.c D src/libmsc/iucs_ranap.c M src/libmsc/mncc.c M src/libmsc/mncc_builtin.c A src/libmsc/mncc_call.c M src/libmsc/mncc_sock.c A src/libmsc/msc_a.c A src/libmsc/msc_a_remote.c A src/libmsc/msc_ho.c A src/libmsc/msc_i.c A src/libmsc/msc_i_remote.c D src/libmsc/msc_ifaces.c D src/libmsc/msc_mgcp.c A src/libmsc/msc_net_init.c A src/libmsc/msc_t.c A src/libmsc/msc_t_remote.c M src/libmsc/msc_vty.c A src/libmsc/msub.c A src/libmsc/neighbor_ident.c A src/libmsc/neighbor_ident_vty.c D src/libmsc/osmo_msc.c A src/libmsc/paging.c M src/libmsc/ran_conn.c A src/libmsc/ran_infra.c A src/libmsc/ran_msg.c A src/libmsc/ran_msg_a.c A src/libmsc/ran_msg_iu.c A src/libmsc/ran_peer.c A src/libmsc/ran_up_l2.c M src/libmsc/rrlp.c A src/libmsc/rtp_stream.c A src/libmsc/sccp_ran.c M src/libmsc/sgs_iface.c M src/libmsc/sgs_server.c M src/libmsc/silent_call.c M src/libmsc/smpp_openbsc.c M src/libmsc/smpp_smsc.h M src/libmsc/sms_queue.c M src/libmsc/transaction.c M src/libvlr/vlr.c M src/libvlr/vlr_access_req_fsm.c M src/libvlr/vlr_lu_fsm.c M src/libvlr/vlr_sgs.c M src/libvlr/vlr_sgs_fsm.c M src/osmo-msc/Makefile.am M src/osmo-msc/msc_main.c M tests/Makefile.am M tests/msc_vlr/Makefile.am M tests/msc_vlr/msc_vlr_test_authen_reuse.c M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_test_gsm_authen.c M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.c M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.c M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.c M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.c M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.c M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_ss.c M tests/msc_vlr/msc_vlr_test_ss.err M tests/msc_vlr/msc_vlr_test_umts_authen.c M tests/msc_vlr/msc_vlr_test_umts_authen.err M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h M tests/sms_queue/Makefile.am M tests/sms_queue/sms_queue_test.c A tests/test_neighbor_ident.vty M tests/test_nodes.vty 151 files changed, 35,644 insertions(+), 22,989 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/13137/9 -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 9 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-CC: Harald Welte Gerrit-CC: Pau Espin Pedrol Gerrit-CC: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 13:06:51 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 May 2019 13:06:51 +0000 Subject: Change in osmo-msc[master]: rename bscconfig.h to config.h, cleanup In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13138 to look at the new patch set (#9). Change subject: rename bscconfig.h to config.h, cleanup ...................................................................... rename bscconfig.h to config.h, cleanup Get rid of the legacy name bscconfig.h from osmo-nitb times. Remove the #include from some of the files that aren't actually using it. Instead of '#include "../../config.h"', use plain '#include "config.h"' because we're anyway passing $top_srcdir as -I during compilation. Change-Id: Id4f683be1f36f0630c83da54e02868aae847aeec --- M .gitignore M configure.ac M src/libmsc/gsm_04_08.c M src/libmsc/gsm_04_08_cc.c M src/libmsc/gsm_04_11.c M src/libmsc/gsm_04_14.c M src/libmsc/msc_net_init.c M src/libmsc/msc_vty.c M src/libmsc/ran_infra.c M src/osmo-msc/msc_main.c 10 files changed, 9 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/38/13138/9 -- To view, visit https://gerrit.osmocom.org/13138 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id4f683be1f36f0630c83da54e02868aae847aeec Gerrit-Change-Number: 13138 Gerrit-PatchSet: 9 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Max -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 13:06:51 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 May 2019 13:06:51 +0000 Subject: Change in osmo-msc[master]: gsm_04_11: use gsm48_decode_bcd_number2(), evaluate rc In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13881 to look at the new patch set (#3). Change subject: gsm_04_11: use gsm48_decode_bcd_number2(), evaluate rc ...................................................................... gsm_04_11: use gsm48_decode_bcd_number2(), evaluate rc Avoid deprecation warning: use gsm48_decode_bcd_number2() instead of gsm48_decode_bcd_number(). Validate the return value and add error handling. Change-Id: Ibef71c46d72d2d43123e68f73e5ed554a69243d8 --- M src/libmsc/gsm_04_11.c 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/81/13881/3 -- To view, visit https://gerrit.osmocom.org/13881 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibef71c46d72d2d43123e68f73e5ed554a69243d8 Gerrit-Change-Number: 13881 Gerrit-PatchSet: 3 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 13:07:17 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 May 2019 13:07:17 +0000 Subject: Change in libosmo-sccp[master]: add osmo_sccp_inst_unused_conn_id() In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. ( https://gerrit.osmocom.org/13278 ) Change subject: add osmo_sccp_inst_unused_conn_id() ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/13278 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: I6e1b4897f4143b97bf90bfd8d0ae5d50bbd2e1dd Gerrit-Change-Number: 13278 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 13:08:29 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 May 2019 13:08:29 +0000 Subject: Change in osmo-hlr[master]: hlr.c: forward GSUP messages between clients In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13006 ) Change subject: hlr.c: forward GSUP messages between clients ...................................................................... Patch Set 13: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13006 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia4f345abc877baaf0a8f73b8988e6514d9589bf5 Gerrit-Change-Number: 13006 Gerrit-PatchSet: 13 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: osmith Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 07 May 2019 13:08:29 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 13:08:42 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 May 2019 13:08:42 +0000 Subject: Change in osmo-hlr[master]: hlr.c: forward GSUP messages between clients In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/13006 ) Change subject: hlr.c: forward GSUP messages between clients ...................................................................... hlr.c: forward GSUP messages between clients Allow clients to forward any GSUP message between clients. Determine the sender and receiver from the new {source,dest}_name{,_len} IEs. Reject messages with a forged source name. This will be used for the inter-MSC handover. Depends: Ic00b0601eacff6d72927cea51767801142ee75db (libosmocore.git) Related: OS#3793 Change-Id: Ia4f345abc877baaf0a8f73b8988e6514d9589bf5 --- M src/hlr.c 1 file changed, 79 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Neels Hofmeyr: Looks good to me, approved diff --git a/src/hlr.c b/src/hlr.c index 19cfebb..8078db0 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -441,6 +441,82 @@ return osmo_gsup_conn_send(conn, msg_out); } +static char namebuf[255]; +#define LOGP_GSUP_FWD(gsup, level, fmt, args ...) \ + LOGP(DMAIN, level, "Forward %s (class=%s, IMSI=%s, %s->%s): " fmt, \ + osmo_gsup_message_type_name(gsup->message_type), \ + osmo_gsup_message_class_name(gsup->message_class), \ + gsup->imsi, \ + osmo_quote_str((const char *)gsup->source_name, gsup->source_name_len), \ + osmo_quote_str_buf2(namebuf, sizeof(namebuf), (const char *)gsup->destination_name, gsup->destination_name_len), \ + ## args) + +static int read_cb_forward(struct osmo_gsup_conn *conn, struct msgb *msg, const struct osmo_gsup_message *gsup) +{ + int ret = -EINVAL; + struct osmo_gsup_message *gsup_err; + + /* FIXME: it would be better if the msgb never were deallocated immediately by osmo_gsup_addr_send(), which a + * select-loop volatile talloc context could facilitate. Then we would still be able to access gsup-> members + * (pointing into the msgb) even after sending failed, and we wouldn't need to copy this data before sending: */ + /* Prepare error message (before IEs get deallocated) */ + gsup_err = talloc_zero(hlr_ctx, struct osmo_gsup_message); + OSMO_STRLCPY_ARRAY(gsup_err->imsi, gsup->imsi); + gsup_err->message_class = gsup->message_class; + gsup_err->destination_name = talloc_memdup(gsup_err, gsup->destination_name, gsup->destination_name_len); + gsup_err->destination_name_len = gsup->destination_name_len; + gsup_err->message_type = OSMO_GSUP_MSGT_E_ROUTING_ERROR; + gsup_err->session_id = gsup->session_id; + gsup_err->source_name = talloc_memdup(gsup_err, gsup->source_name, gsup->source_name_len); + gsup_err->source_name_len = gsup->source_name_len; + + /* Check for routing IEs */ + if (!gsup->source_name || !gsup->source_name_len || !gsup->destination_name || !gsup->destination_name_len) { + LOGP_GSUP_FWD(gsup, LOGL_ERROR, "missing routing IEs\n"); + goto end; + } + + /* Verify source name (e.g. "MSC-00-00-00-00-00-00") */ + if (gsup_route_find(conn->server, gsup->source_name, gsup->source_name_len) != conn) { + LOGP_GSUP_FWD(gsup, LOGL_ERROR, "mismatching source name\n"); + goto end; + } + + if (!msgb_l2(msg) || !msgb_l2len(msg)) { + LOGP_GSUP_FWD(gsup, LOGL_ERROR, "missing or empty l2 data\n"); + goto end; + } + + /* Forward message without re-encoding (so we don't remove unknown IEs) */ + LOGP_GSUP_FWD(gsup, LOGL_INFO, "checks passed, forwarding\n"); + + /* Remove incoming IPA header to be able to prepend an outgoing IPA header */ + msgb_pull_to_l2(msg); + ret = osmo_gsup_addr_send(g_hlr->gs, gsup->destination_name, gsup->destination_name_len, msg); + /* AT THIS POINT, THE msg MAY BE DEALLOCATED and the data like gsup->imsi, gsup->source_name etc may all be + * invalid and cause segfaults. */ + msg = NULL; + gsup = NULL; + if (ret == -ENODEV) + LOGP_GSUP_FWD(gsup_err, LOGL_ERROR, "destination not connected\n"); + else if (ret) + LOGP_GSUP_FWD(gsup_err, LOGL_ERROR, "unknown error %i\n", ret); + +end: + /* Send error back to source */ + if (ret) { + struct msgb *msg_err = msgb_alloc_headroom(1024+16, 16, "GSUP forward ERR response"); + OSMO_ASSERT(msg_err); + osmo_gsup_encode(msg_err, gsup_err); + LOGP_GSUP_FWD(gsup_err, LOGL_NOTICE, "Tx %s\n", osmo_gsup_message_type_name(gsup_err->message_type)); + osmo_gsup_conn_send(conn, msg_err); + } + talloc_free(gsup_err); + if (msg) + msgb_free(msg); + return ret; +} + static int read_cb(struct osmo_gsup_conn *conn, struct msgb *msg) { static struct osmo_gsup_message gsup; @@ -459,6 +535,9 @@ return gsup_send_err_reply(conn, gsup.imsi, gsup.message_type, GMM_CAUSE_INV_MAND_INFO); } + if (gsup.destination_name_len) + return read_cb_forward(conn, msg, &gsup); + switch (gsup.message_type) { /* requests sent to us */ case OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST: -- To view, visit https://gerrit.osmocom.org/13006 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ia4f345abc877baaf0a8f73b8988e6514d9589bf5 Gerrit-Change-Number: 13006 Gerrit-PatchSet: 13 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: osmith Gerrit-CC: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 13:16:29 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 May 2019 13:16:29 +0000 Subject: Change in osmo-hlr[master]: osmo-hlr: allow configuring db path from cfg file In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13586 to look at the new patch set (#4). Change subject: osmo-hlr: allow configuring db path from cfg file ...................................................................... osmo-hlr: allow configuring db path from cfg file So far, the cmdline argument was the only way to set a database config file. Add a similar config to VTY as 'hlr' / 'database'. The cmdline arg is stronger than the 'database' cfg item. DB is not reloaded from VTY command. Change-Id: I87b8673324e1e6225afb758fb4963ff3279ea3d8 --- M src/hlr.c M src/hlr.h M src/hlr_vty.c M tests/test_nodes.vty 4 files changed, 25 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/86/13586/4 -- To view, visit https://gerrit.osmocom.org/13586 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I87b8673324e1e6225afb758fb4963ff3279ea3d8 Gerrit-Change-Number: 13586 Gerrit-PatchSet: 4 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 13:17:00 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 May 2019 13:17:00 +0000 Subject: Change in osmo-hlr[master]: osmo-hlr: allow configuring db path from cfg file In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13586 ) Change subject: osmo-hlr: allow configuring db path from cfg file ...................................................................... Patch Set 4: (1 comment) (comment on earlier patch set) https://gerrit.osmocom.org/#/c/13586/1/src/hlr.c File src/hlr.c: https://gerrit.osmocom.org/#/c/13586/1/src/hlr.c at 739 PS1, Line 739: > Makes sense, took me a while to understand what you mean. [?] no, can't. The g_hlr->db_file_path needs to be a talloc allocated string from the start. This first populates the NULL string with a talloc string. So we can't make this conditional. That said, maybe you are confused by the "replace", instead I could assign a talloc string directly, because I know anyway that it is always NULL here. -- To view, visit https://gerrit.osmocom.org/13586 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I87b8673324e1e6225afb758fb4963ff3279ea3d8 Gerrit-Change-Number: 13586 Gerrit-PatchSet: 4 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 07 May 2019 13:17:00 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 13:19:23 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 May 2019 13:19:23 +0000 Subject: Change in osmo-hlr[master]: osmo-hlr: allow configuring db path from cfg file In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13586 ) Change subject: osmo-hlr: allow configuring db path from cfg file ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13586 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I87b8673324e1e6225afb758fb4963ff3279ea3d8 Gerrit-Change-Number: 13586 Gerrit-PatchSet: 4 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 07 May 2019 13:19:23 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 13:19:36 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 May 2019 13:19:36 +0000 Subject: Change in osmo-hlr[master]: use new OSMO_IMSI_BUF_SIZE In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13589 ) Change subject: use new OSMO_IMSI_BUF_SIZE ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13589 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8e8fa221e97303df3c6cce96b25d31a53f67b939 Gerrit-Change-Number: 13589 Gerrit-PatchSet: 4 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 07 May 2019 13:19:36 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 13:20:55 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 May 2019 13:20:55 +0000 Subject: Change in libosmocore[master]: add osmo_stat_item_inc/osmo_stat_item_dec to set it relative In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13801 ) Change subject: add osmo_stat_item_inc/osmo_stat_item_dec to set it relative ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13801 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id2462c4866bd22bc2338c9c8f69b775f88ae7511 Gerrit-Change-Number: 13801 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Mykola Shchetinin Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 07 May 2019 13:20:55 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 13:20:57 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 May 2019 13:20:57 +0000 Subject: Change in libosmocore[master]: add osmo_stat_item_inc/osmo_stat_item_dec to set it relative In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13801 ) Change subject: add osmo_stat_item_inc/osmo_stat_item_dec to set it relative ...................................................................... add osmo_stat_item_inc/osmo_stat_item_dec to set it relative Change-Id: Id2462c4866bd22bc2338c9c8f69b775f88ae7511 --- M include/osmocom/core/stat_item.h M src/stat_item.c M tests/stats/stats_test.c 3 files changed, 42 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Daniel Willmann: Looks good to me, but someone else must approve Mykola Shchetinin: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/core/stat_item.h b/include/osmocom/core/stat_item.h index 260ffb1..806173a 100644 --- a/include/osmocom/core/stat_item.h +++ b/include/osmocom/core/stat_item.h @@ -79,6 +79,8 @@ void osmo_stat_item_group_free(struct osmo_stat_item_group *statg); +void osmo_stat_item_inc(struct osmo_stat_item *item, int32_t value); +void osmo_stat_item_dec(struct osmo_stat_item *item, int32_t value); void osmo_stat_item_set(struct osmo_stat_item *item, int32_t value); int osmo_stat_item_init(void *tall_ctx); diff --git a/src/stat_item.c b/src/stat_item.c index cb9b90f..6716575 100644 --- a/src/stat_item.c +++ b/src/stat_item.c @@ -150,6 +150,30 @@ talloc_free(grp); } +/*! Increase the stat_item to the given value. + * This function adds a new value for the given stat_item at the end of + * the FIFO. + * \param[in] item The stat_item whose \a value we want to set + * \param[in] value The numeric value we want to store at end of FIFO + */ +void osmo_stat_item_inc(struct osmo_stat_item *item, int32_t value) +{ + int32_t oldvalue = item->values[item->last_offs].value; + osmo_stat_item_set(item, oldvalue + value); +} + +/*! Descrease the stat_item to the given value. + * This function adds a new value for the given stat_item at the end of + * the FIFO. + * \param[in] item The stat_item whose \a value we want to set + * \param[in] value The numeric value we want to store at end of FIFO + */ +void osmo_stat_item_dec(struct osmo_stat_item *item, int32_t value) +{ + int32_t oldvalue = item->values[item->last_offs].value; + osmo_stat_item_set(item, oldvalue - value); +} + /*! Set the a given stat_item to the given value. * This function adds a new value for the given stat_item at the end of * the FIFO. diff --git a/tests/stats/stats_test.c b/tests/stats/stats_test.c index 6ef8841..71f710a 100644 --- a/tests/stats/stats_test.c +++ b/tests/stats/stats_test.c @@ -147,6 +147,22 @@ OSMO_ASSERT(value == 1000 + i); } + /* check if dec & inc is working */ + osmo_stat_item_set(statg->items[TEST_A_ITEM], 42); + rc = osmo_stat_item_get_next(statg->items[TEST_A_ITEM], &rd_a, &value); + OSMO_ASSERT(rc > 0); + OSMO_ASSERT(value == 42); + + osmo_stat_item_dec(statg->items[TEST_A_ITEM], 21); + rc = osmo_stat_item_get_next(statg->items[TEST_A_ITEM], &rd_a, &value); + OSMO_ASSERT(rc > 0); + OSMO_ASSERT(value == 21); + + osmo_stat_item_inc(statg->items[TEST_A_ITEM], 21); + rc = osmo_stat_item_get_next(statg->items[TEST_A_ITEM], &rd_a, &value); + OSMO_ASSERT(rc > 0); + OSMO_ASSERT(value == 42); + /* Keep 2 in FIFO */ osmo_stat_item_set(statg->items[TEST_A_ITEM], 33); osmo_stat_item_set(statg->items[TEST_B_ITEM], 1000 + 33); -- To view, visit https://gerrit.osmocom.org/13801 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id2462c4866bd22bc2338c9c8f69b775f88ae7511 Gerrit-Change-Number: 13801 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Mykola Shchetinin Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 13:29:23 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 7 May 2019 13:29:23 +0000 Subject: Change in osmo-hlr[master]: hlr.c: forward GSUP messages between clients In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13006 ) Change subject: hlr.c: forward GSUP messages between clients ...................................................................... Patch Set 13: (4 comments) https://gerrit.osmocom.org/#/c/13006/13/src/hlr.c File src/hlr.c: https://gerrit.osmocom.org/#/c/13006/13/src/hlr.c at 469 PS13, Line 469: session_id AFAIR, libosmocore doesn't encode the OSMO_GSUP_SESSION_ID_IE if gsup_msg->session_state == 0. Most likely, we should also store the gsup_msg->session_state here. https://gerrit.osmocom.org/#/c/13006/13/src/hlr.c at 485 PS13, Line 485: if (!msgb_l2(msg) || !msgb_l2len(msg)) This check is redundant and not actually needed, since we do osmo_gsup_decode(msgb_l2(msg), msgb_l2len(msg), &gsup) at line #525. https://gerrit.osmocom.org/#/c/13006/13/src/hlr.c at 501 PS13, Line 501: LOGP_GSUP_FWD Here we would see 'OSMO_GSUP_MSGT_E_ROUTING_ERROR' as the message name, because we don't store the original value. This may be confusing. https://gerrit.osmocom.org/#/c/13006/13/src/hlr.c at 503 PS13, Line 503: LOGP_GSUP_FWD Same as above. -- To view, visit https://gerrit.osmocom.org/13006 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia4f345abc877baaf0a8f73b8988e6514d9589bf5 Gerrit-Change-Number: 13006 Gerrit-PatchSet: 13 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: osmith Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 07 May 2019 13:29:23 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 13:36:17 2019 From: gerrit-no-reply at lists.osmocom.org (Mykola Shchetinin) Date: Tue, 7 May 2019 13:36:17 +0000 Subject: Change in osmo-iuh[master]: Discard the existing HNB+ContextID to SCCP Connection ID mapping on N... Message-ID: Mykola Shchetinin has uploaded this change for review. ( https://gerrit.osmocom.org/13896 Change subject: Discard the existing HNB+ContextID to SCCP Connection ID mapping on N-CONNECT. ...................................................................... Discard the existing HNB+ContextID to SCCP Connection ID mapping on N-CONNECT. After a period of inactivity the phone sends a GMM Service Request again in an InitialUE-Request message which triggers a new connection to be created. The problem is that a new SCCP connection wasn't created but a new ranap_ue_conn_ctx was allocated. As a result, the following message (SecurityModeComplete) uses the old SCCP connection and the wrong ranap_ue_conn_ctx (old) is selected. hnbgw_rua.c: rua_to_scu: in case of OSMO_SCU_PRIM_N_CONNECT deactivate the existing hnbgw_context_map to force the context_map_alloc_by_hnb to allocate a new one. context_map.c/.h: Create function context_map_find_by_hnb. It replaces part of context_map_alloc_by_hnb's functionality. Fixes: OS#3936 Change-Id: If85d45dc0c5c6f1a9dbfed6c3752f00ff7b541f2 --- M include/osmocom/iuh/context_map.h M src/context_map.c M src/hnbgw_rua.c 3 files changed, 35 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/96/13896/1 diff --git a/include/osmocom/iuh/context_map.h b/include/osmocom/iuh/context_map.h index 6279b91..29eb64a 100644 --- a/include/osmocom/iuh/context_map.h +++ b/include/osmocom/iuh/context_map.h @@ -37,6 +37,10 @@ enum hnbgw_context_map_state state; }; +struct hnbgw_context_map * +context_map_find_by_hnb(struct hnb_context *hnb, uint32_t rua_ctx_id, + bool is_ps, + struct hnbgw_cnlink *cn_if_new); struct hnbgw_context_map * context_map_alloc_by_hnb(struct hnb_context *hnb, uint32_t rua_ctx_id, diff --git a/src/context_map.c b/src/context_map.c index dc555bf..d13eea3 100644 --- a/src/context_map.c +++ b/src/context_map.c @@ -63,11 +63,13 @@ return -1; } -/* Map from a HNB + ContextID to the SCCP-side Connection ID */ +/* Map from a HNB + ContextID to the SCCP-side Connection ID. + * Return NULL if not found. + */ struct hnbgw_context_map * -context_map_alloc_by_hnb(struct hnb_context *hnb, uint32_t rua_ctx_id, - bool is_ps, - struct hnbgw_cnlink *cn_if_new) +context_map_find_by_hnb(struct hnb_context *hnb, uint32_t rua_ctx_id, + bool is_ps, + struct hnbgw_cnlink *cn_if_new) { struct hnbgw_context_map *map; uint32_t new_scu_conn_id; @@ -84,6 +86,25 @@ } } + return NULL; +} + +/* Map from a HNB + ContextID to the SCCP-side Connection ID. + * Find an existing one or allocate a new one if not found. + */ +struct hnbgw_context_map * +context_map_alloc_by_hnb(struct hnb_context *hnb, uint32_t rua_ctx_id, + bool is_ps, + struct hnbgw_cnlink *cn_if_new) +{ + struct hnbgw_context_map *map; + uint32_t new_scu_conn_id; + + map = context_map_find_by_hnb(hnb, rua_ctx_id, is_ps, cn_if_new); + + if (map) + return map; + if (alloc_cn_conn_id(cn_if_new, &new_scu_conn_id) < 0) { LOGP(DMAIN, LOGL_ERROR, "Unable to allocate CN connection ID\n"); return NULL; diff --git a/src/hnbgw_rua.c b/src/hnbgw_rua.c index 40d1d94..f225f1a 100644 --- a/src/hnbgw_rua.c +++ b/src/hnbgw_rua.c @@ -220,6 +220,12 @@ osmo_sccp_addr_dump(remote_addr), context_id); break; + case OSMO_SCU_PRIM_N_CONNECT: + map = context_map_find_by_hnb(hnb, context_id, is_ps, cn); + if (map) { + /* Forcing context_map_alloc_by_hnb to allocate a new "map" */ + context_map_deactivate(map); + } default: map = context_map_alloc_by_hnb(hnb, context_id, is_ps, cn); OSMO_ASSERT(map); -- To view, visit https://gerrit.osmocom.org/13896 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If85d45dc0c5c6f1a9dbfed6c3752f00ff7b541f2 Gerrit-Change-Number: 13896 Gerrit-PatchSet: 1 Gerrit-Owner: Mykola Shchetinin -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 13:38:52 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 May 2019 13:38:52 +0000 Subject: Change in osmo-hlr[master]: hlr.c: forward GSUP messages between clients In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13006 ) Change subject: hlr.c: forward GSUP messages between clients ...................................................................... Patch Set 13: (3 comments) https://gerrit.osmocom.org/#/c/13006/13/src/hlr.c File src/hlr.c: https://gerrit.osmocom.org/#/c/13006/13/src/hlr.c at 469 PS13, Line 469: session_id > AFAIR, libosmocore doesn't encode the OSMO_GSUP_SESSION_ID_IE if gsup_msg->session_state == 0. [?] (So far none of the forwarded messages use a session id or session state. For MAP/DIAMETER compatibility, that might be necessary/nice-to-have in the future though) https://gerrit.osmocom.org/#/c/13006/13/src/hlr.c at 485 PS13, Line 485: if (!msgb_l2(msg) || !msgb_l2len(msg)) > This check is redundant and not actually needed, since we do osmo_gsup_decode(msgb_l2(msg), msgb_l2l [?] I see it as an initial sanity check. If msgb_l2() is NULL, we may run into segfaults, if the len is 0, we should reject it. I'd rather keep this check. This comes from buggy code actually killing osmo-hlr, instead it should merely complain and continue to run. https://gerrit.osmocom.org/#/c/13006/13/src/hlr.c at 501 PS13, Line 501: LOGP_GSUP_FWD > Here we would see 'OSMO_GSUP_MSGT_E_ROUTING_ERROR' as the message name, because we don't store the o [?] Ok, you are saying the logging fails to log the initial message, and instead logs the Routing Error reply. Nice catch. The problem is that at this point the initial msg has already been discarded... maybe LOG_GSUP_FWD should have a separate arg passing the original message type? -- To view, visit https://gerrit.osmocom.org/13006 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia4f345abc877baaf0a8f73b8988e6514d9589bf5 Gerrit-Change-Number: 13006 Gerrit-PatchSet: 13 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: osmith Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 07 May 2019 13:38:52 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 13:44:47 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 May 2019 13:44:47 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: mo and mt voice call tests: add lots of missing parts In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13616 ) Change subject: msc: mo and mt voice call tests: add lots of missing parts ...................................................................... Patch Set 6: (1 comment) https://gerrit.osmocom.org/#/c/13616/4/msc/BSC_ConnectionHandler.ttcn File msc/BSC_ConnectionHandler.ttcn: https://gerrit.osmocom.org/#/c/13616/4/msc/BSC_ConnectionHandler.ttcn at 486 PS4, Line 486: } > Is there any way to make such messages more informative than '1', '2', ... [?] Feel free to add more info at the end, but please keep the numbers at the beginnig. The reason for the numbers is that when I search through the log, I can very easily see which parts happened. e.g. if you see 1, 2, 4, 5, 7, 6, 3, you can easily figure out that 8 and 9 are missing. Wouldn't be that easy with prose. -- To view, visit https://gerrit.osmocom.org/13616 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I162985045bb5e129977a3a797b656e30220990df Gerrit-Change-Number: 13616 Gerrit-PatchSet: 6 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 07 May 2019 13:44:47 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 13:45:35 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 May 2019 13:45:35 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: mo and mt voice call tests: add lots of missing parts In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13616 ) Change subject: msc: mo and mt voice call tests: add lots of missing parts ...................................................................... Patch Set 6: Code-Review+2 re-adding previous +2, and deciding that vadim's comments aren't merge critical, no offense intended -- To view, visit https://gerrit.osmocom.org/13616 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I162985045bb5e129977a3a797b656e30220990df Gerrit-Change-Number: 13616 Gerrit-PatchSet: 6 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 07 May 2019 13:45:35 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 13:46:05 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 May 2019 13:46:05 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: mo and mt voice call tests: add lots of missing parts In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13616 ) Change subject: msc: mo and mt voice call tests: add lots of missing parts ...................................................................... Patch Set 6: merging now because this reaches a state where both the old osmo-msc and the new osmo-msc pass the tests -- To view, visit https://gerrit.osmocom.org/13616 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I162985045bb5e129977a3a797b656e30220990df Gerrit-Change-Number: 13616 Gerrit-PatchSet: 6 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 07 May 2019 13:46:05 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 13:46:07 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 May 2019 13:46:07 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: mo and mt voice call tests: add lots of missing parts In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/13616 ) Change subject: msc: mo and mt voice call tests: add lots of missing parts ...................................................................... msc: mo and mt voice call tests: add lots of missing parts Both f_mo_call_establish() and f_mt_call_establish() were testing barely half a voice call setup. For example, f_mo_call_establish() used to be satisfied with just two CRCX, but no actual RTP connections being made. Add numerous MNCC and MGCP messages more closely resembling an actual call. The main reason is to achieve a state that passes both current osmo-msc master as well as the upcoming inter-MSC Handover refactoring. Add log markers to f_*_call_*(): often when a test halts, it is not at all clear why. With these log markers it is saner to figure out what has happened and what hasn't. Change-Id: I162985045bb5e129977a3a797b656e30220990df --- M library/L3_Templates.ttcn M library/MGCP_Templates.ttcn M library/MNCC_Types.ttcn M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn 5 files changed, 231 insertions(+), 93 deletions(-) Approvals: Jenkins Builder: Verified Neels Hofmeyr: Looks good to me, approved diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn index 6099303..4d71f27 100644 --- a/library/L3_Templates.ttcn +++ b/library/L3_Templates.ttcn @@ -1271,12 +1271,12 @@ } -template (value) PDU_ML3_MS_NW ts_ML3_MO_CC_REL_COMPL(integer tid) := { +template (value) PDU_ML3_MS_NW ts_ML3_MO_CC_REL_COMPL(integer tid, BIT1 tid_remote := '0'B) := { discriminator := '0011'B, tiOrSkip := { transactionId := { tio := int2bit(tid, 3), - tiFlag := '0'B, + tiFlag := tid_remote, tIExtension := omit } }, diff --git a/library/MGCP_Templates.ttcn b/library/MGCP_Templates.ttcn index f720553..506100f 100644 --- a/library/MGCP_Templates.ttcn +++ b/library/MGCP_Templates.ttcn @@ -286,6 +286,22 @@ } } + function f_mgcp_contains_par(MgcpMessage msg, MgcpInfoCode code) return boolean { + var MgcpParameterList pars; + if (ischosen(msg.command)) { + pars := msg.command.params; + } else { + pars := msg.response.params; + } + for (var integer i := 0; i < lengthof(pars); i := i + 1) { + var MgcpParameter par := pars[i]; + if (par.code == code) { + return true; + } + } + return false; + } + function f_mgcp_extract_par(MgcpMessage msg, MgcpInfoCode code) return charstring { var MgcpParameterList pars; if (ischosen(msg.command)) { @@ -317,6 +333,13 @@ return f_mgcp_extract_par(msg, code); } + function f_MgcpCmd_contains_par(MgcpCommand cmd, MgcpInfoCode code) return boolean { + var MgcpMessage msg := { + command := cmd + } + return f_mgcp_contains_par(msg, code); + } + function f_MgcpResp_extract_conn_id(MgcpResponse resp) return MgcpConnectionId { return str2hex(f_MgcpResp_extract_par(resp, "I")); } diff --git a/library/MNCC_Types.ttcn b/library/MNCC_Types.ttcn index a3714b1..f5028d2 100644 --- a/library/MNCC_Types.ttcn +++ b/library/MNCC_Types.ttcn @@ -1874,14 +1874,17 @@ template MNCC_PDU ts_MNCC_RTP_CREATE(uint32_t call_id) := ts_MNCC_SIMPLE_RTP(MNCC_RTP_CREATE, call_id); /* MSC -> MNCC: RTP_CREATE.rsp; acknowledge creation of RTP (stating MSC side IP/Port) */ -template MNCC_PDU tr_MNCC_RTP_CREATE(template uint32_t call_id := ?) := { +template MNCC_PDU tr_MNCC_RTP_CREATE(template uint32_t call_id := ?, + template uint32_t ip := ?, + template uint32_t rtp_port := ?, + template uint32_t payload_type := ?) := { msg_type := MNCC_RTP_CREATE, u := { rtp := { callref := call_id, - ip := ?, - rtp_port := ?, - payload_type := ?, + ip := ip, + rtp_port := rtp_port, + payload_type := payload_type, payload_msg_type := ? } } diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 1750bf5..44d3c6d 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -551,6 +551,8 @@ /* CC related parameters */ hexstring called_party, /* whom are we calling */ integer transaction_id optional, /* which TS 04.08 CC transaction ID to use */ + boolean mo_call, /* For a MO call, the transaction_id was allocated by the MS, + important to set the TI flag properly */ BearerCapability_TLV bearer_cap, /* which bearer capabilities to claim */ boolean emergency, /* is this an emergency call? */ @@ -581,6 +583,7 @@ template (value) CallParameters t_CallParams(hexstring called, integer tid) := { called_party := called, transaction_id := tid, + mo_call := false, bearer_cap := valueof(ts_Bcap_voice), emergency := false, mncc_callref := omit, @@ -595,6 +598,7 @@ mgw_rtp_port_mss := 11000, rtp_payload_type := 98, rtp_sdp_format := "AMR/8000", + mgw_drop_dlcx := false, mgcp_call_id := omit, mgcp_ep := omit, mgcp_connection_id_bss := '0'H,// @@ -628,12 +632,15 @@ f_establish_fully(EST_TYPE_PAG_RESP); + log("f_mt_call_complete 1"); + /* MS <- MSC: Expect CC SETUP */ BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_SETUP(cpars.transaction_id, *, cpars.called_party))); /* MS -> MSC: ALERTING */ BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_ALERTING(cpars.transaction_id))); MNCC.receive(tr_MNCC_ALERT_ind(cpars.mncc_callref)); + log("f_mt_call_complete 2"); /* Create MGCP expect */ f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit}); @@ -642,6 +649,7 @@ /* First MGCP CRCX (for BSS/RAN side) */ MGCP.receive(tr_CRCX) -> value mgcp_cmd { + log("f_mt_call_complete 3"); cpars.mgcp_call_id := f_MgcpCmd_extract_call_id(mgcp_cmd); /* When the endpoint contains a wildcard we keep the endpoint @@ -672,21 +680,64 @@ interleave { /* Second MGCP CRCX (this time for MSS/CN side) */ [] MGCP.receive(tr_CRCX(cpars.mgcp_ep)) -> value mgcp_cmd { + log("f_mt_call_complete 4"); var SDP_Message sdp := valueof(ts_SDP_CRCX_CN(cpars)); MGCP.send(ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp)); - /* MSC acknowledges the MNCC_CREATE to the MNCC handler */ - MNCC.receive(tr_MNCC_RTP_CREATE(cpars.mncc_callref)); } + + /* MSC acknowledges the MNCC_CREATE to the MNCC handler */ + [] MNCC.receive(tr_MNCC_RTP_CREATE(cpars.mncc_callref)) { + log("f_mt_call_complete 5"); + } + /* expect the MSC to trigger a BSSMAP ASSIGNMENT */ [] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) { var BSSMAP_IE_AoIP_TransportLayerAddress tla; var BSSMAP_IE_SpeechCodec codec; + log("f_mt_call_complete 6"); tla := valueof(ts_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.bss_rtp_ip), cpars.bss_rtp_port)); codec := valueof(ts_BSSMAP_IE_SpeechCodec({ts_CodecFR})); BSSAP.send(ts_BSSMAP_AssignmentComplete(omit, tla, codec)); + + BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_CONNECT(cpars.transaction_id))); } + + [] MNCC.receive(tr_MNCC_SETUP_cnf(cpars.mncc_callref)) { + log("f_mt_call_complete 7"); + MNCC.send(ts_MNCC_RTP_CONNECT(cpars.mncc_callref, + /* ip 42.23.11.5 */ hex2int('42231105'H), + /* port 423 */ 423, + /* payload type 3 = GSM FR */ 3)); + } + + /* MDCX setting up the RAN side remote RTP address received from Assignment Complete */ + [] MGCP.receive(tr_MDCX) -> value mgcp_cmd { + log("f_mt_call_complete 8"); + var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_mss, cpars.mgw_rtp_ip_mss, + hex2str(cpars.mgcp_call_id), "42", + cpars.mgw_rtp_port_mss, + { int2str(cpars.rtp_payload_type) }, + { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, + cpars.rtp_sdp_format)), + valueof(ts_SDP_ptime(20)) })); + MGCP.send(ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp)); + } + + /* MDCX setting up the CN side remote RTP address received from MNCC CONNECT */ + [] MGCP.receive(tr_MDCX) -> value mgcp_cmd { + log("f_mt_call_complete 9"); + var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_mss, cpars.mgw_rtp_ip_mss, + hex2str(cpars.mgcp_call_id), "42", + cpars.mgw_rtp_port_mss, + { int2str(cpars.rtp_payload_type) }, + { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, + cpars.rtp_sdp_format)), + valueof(ts_SDP_ptime(20)) })); + MGCP.send(ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp)); + } + } } else { var template TransportLayerAddress rab_tla := ? /* FIXME: encode the mgw_rtp_ip_bss/mgw_rtp_port_bss */ @@ -702,12 +753,12 @@ [] BSSAP.receive(tr_RANAP_RabAssReq(rab_sml)) { //BSSAP.send(ts_RANAP_RabAssResp(rab_sml)); FIXME } + + /* FIXME: same MNCC and MGCP as in 2G above */ } } - /* MS -> MSC: ALERTING */ - BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_CONNECT(cpars.transaction_id))); - MNCC.receive(tr_MNCC_SETUP_cnf(cpars.mncc_callref)); + log("f_mt_call_complete DONE"); } function f_expect_paging(boolean by_tmsi := true) @@ -757,15 +808,20 @@ } else { BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_SETUP(cpars.transaction_id, cpars.called_party))); } + + var BSSMAP_IE_AoIP_TransportLayerAddress tla_ass := + valueof(ts_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.mgw_rtp_ip_bss),cpars.mgw_rtp_port_bss)); + interleave { [] MNCC.receive(tr_MNCC_SETUP_ind(?, tr_MNCC_number(hex2str(cpars.called_party)))) -> value mncc { + log("f_mo_call_establish 1: rx MNCC SETUP ind"); cpars.mncc_callref := mncc.u.signal.callref; - /* Call Proceeding */ - MNCC.send(ts_MNCC_CALL_PROC_req(cpars.mncc_callref, cpars.mncc_bearer_cap)); - BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_CALL_PROC(cpars.transaction_id))); - }; + MNCC.send(ts_MNCC_RTP_CREATE(cpars.mncc_callref)); + } + /* First MGCP CRCX (for BSS/RAN side) */ [] MGCP.receive(tr_CRCX) -> value mgcp_cmd { + log("f_mo_call_establish 2: rx 1st CRCX"); cpars.mgcp_call_id := f_MgcpCmd_extract_call_id(mgcp_cmd); /* When the endpoint contains a wildcard we keep the endpoint @@ -788,64 +844,94 @@ f_mgcp_par_append(mgcp_resp.params, ts_MgcpParSpecEP(cpars.mgcp_ep)); MGCP.send(mgcp_resp); } - } - if (g_pars.ran_is_geran) { - var BSSMAP_IE_AoIP_TransportLayerAddress tla_ass := - valueof(ts_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.mgw_rtp_ip_bss),cpars.mgw_rtp_port_bss)); + [] MNCC.receive(tr_MNCC_RTP_CREATE(cpars.mncc_callref)) { + log("f_mo_call_establish 3: rx RTP CREATE"); + /* Call Proceeding */ + MNCC.send(ts_MNCC_CALL_PROC_req(cpars.mncc_callref, cpars.mncc_bearer_cap)); + BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_CALL_PROC(cpars.transaction_id))); - interleave { - /* Second MGCP CRCX (this time for MSS/CN side) */ - [] MGCP.receive(tr_CRCX(cpars.mgcp_ep)) -> value mgcp_cmd { - var SDP_Message sdp := valueof(ts_SDP_CRCX_CN(cpars)); - MGCP.send(ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp)); - - /* Alerting */ - MNCC.send(ts_MNCC_ALERT_req(cpars.mncc_callref)); - } - - [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_ALERTING(cpars.transaction_id))) { - } - /* expect AoIP IP/Port to match what we returned in CRCX_ACK above */ - [] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) { - var BSSMAP_IE_AoIP_TransportLayerAddress tla; - var BSSMAP_IE_SpeechCodec codec; - tla := valueof(ts_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.bss_rtp_ip), cpars.bss_rtp_port)); - codec := valueof(ts_BSSMAP_IE_SpeechCodec({ts_CodecFR})); - BSSAP.send(ts_BSSMAP_AssignmentComplete(omit, tla, codec)); - } + /* Alerting */ + MNCC.send(ts_MNCC_ALERT_req(cpars.mncc_callref)); } - } else { - var template TransportLayerAddress rab_tla := ?; /* FIXME: encode the mgw_rtp_ip_bss/mgw_rtp_port_bss */ - var template RAB_SetupOrModifyList rab_sml := tr_RAB_SML(rab_id := ?, tla := rab_tla, binding_id := ?); - interleave { - /* Second MGCP CRCX (this time for MSS/CN side) */ - [] MGCP.receive(tr_CRCX(cpars.mgcp_ep)) -> value mgcp_cmd { - var SDP_Message sdp := valueof(ts_SDP_CRCX_CN(cpars)); - MGCP.send(ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp)); + //[g_pars.ran_is_geran] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) { + [] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) { + log("f_mo_call_establish 4: rx Assignment Request"); + var BSSMAP_IE_AoIP_TransportLayerAddress tla; + var BSSMAP_IE_SpeechCodec codec; + tla := valueof(ts_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.bss_rtp_ip), cpars.bss_rtp_port)); + codec := valueof(ts_BSSMAP_IE_SpeechCodec({ts_CodecFR})); + BSSAP.send(ts_BSSMAP_AssignmentComplete(omit, tla, codec)); + } + /* + [!g_pars.ran_is_geran] BSSAP.receive(tr_RANAP_RabAssReq(rab_sml)) { + //BSSAP.send(ts_RANAP_RabAssResp(rab_sml)); FIXME + } + */ - /* Alerting */ - MNCC.send(ts_MNCC_ALERT_req(cpars.mncc_callref)); - } + /* MDCX setting up the RAN side remote RTP address received from Assignment Complete */ + [] MGCP.receive(tr_MDCX) -> value mgcp_cmd { + log("f_mo_call_establish 5: rx MDCX for the RAN side"); + var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_mss, cpars.mgw_rtp_ip_mss, + hex2str(cpars.mgcp_call_id), "42", + cpars.mgw_rtp_port_mss, + { int2str(cpars.rtp_payload_type) }, + { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, + cpars.rtp_sdp_format)), + valueof(ts_SDP_ptime(20)) })); + MGCP.send(ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp)); + } - [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_ALERTING(cpars.transaction_id))) { - } + /* Second MGCP CRCX (this time for MSS/CN side) */ + [] MGCP.receive(tr_CRCX(cpars.mgcp_ep)) -> value mgcp_cmd { + log("f_mo_call_establish 6: rx 2nd CRCX, for CN side"); + var SDP_Message sdp := valueof(ts_SDP_CRCX_CN(cpars)); + MGCP.send(ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp)); + } - [] BSSAP.receive(tr_RANAP_RabAssReq(rab_sml)) { - //BSSAP.send(ts_RANAP_RabAssResp(rab_sml)); FIXME - } + [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_ALERTING(cpars.transaction_id))) { + log("f_mo_call_establish 7: rx CC Alerting"); + cpars.mncc_callref := mncc.u.signal.callref; + /* Call Proceeding */ + MNCC.send(ts_MNCC_RTP_CONNECT(cpars.mncc_callref, + /* ip 42.23.11.5 */ hex2int('42231105'H), + /* port 423 */ 423, + /* payload type 3 = GSM FR */ 3)); + MNCC.send(ts_MNCC_SETUP_rsp(cpars.mncc_callref)); + } + + [] MNCC.receive(tr_MNCC_SETUP_COMPL_ind(?)) -> value mncc { + log("f_mo_call_establish 8: rx MNCC SETUP COMPLETE ind"); + } + + /* second MDCX setting up the CN side remote RTP address and codec received from MNCC RTP CONNECT */ + [] MGCP.receive(tr_MDCX) -> value mgcp_cmd { + log("f_mo_call_establish 9: rx MDCX for CN side"); + var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_mss, cpars.mgw_rtp_ip_mss, + hex2str(cpars.mgcp_call_id), "42", + cpars.mgw_rtp_port_mss, + { int2str(cpars.rtp_payload_type) }, + { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, + cpars.rtp_sdp_format)), + valueof(ts_SDP_ptime(20)) })); + MGCP.send(ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp)); + } + + [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_CONNECT(cpars.transaction_id))) { + log("f_mo_call_establish 10: rx CC CONNECT"); + BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_CONNECT_ACK(cpars.transaction_id))); } } - /* Answer. MNCC_SETUP_RSP -> CONNECT to MS; CONNECT_ACK from MS */ - MNCC.send(ts_MNCC_SETUP_rsp(cpars.mncc_callref)); - BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_CONNECT(cpars.transaction_id))); - BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_CONNECT_ACK(cpars.transaction_id))); - + log("f_mo_call_establish DONE"); setverdict(pass); } +private altstep as_optional_mgcp_mdcx() runs on BSC_ConnHdlr { + [] MGCP.receive(tr_MDCX) {}; +} + function f_call_hangup(inout CallParameters cpars, boolean release_by_ms, boolean is_csfb := false) runs on BSC_ConnHdlr { @@ -853,63 +939,81 @@ var MNCC_PDU mncc; var MgcpCommand mgcp_cmd; var boolean respond_to_dlcx; + var boolean dlcx_contained_ci := false; + var template PDU_BSSAP t_clear := tr_BSSMAP_ClearCommand; + + if (is_csfb) { + t_clear := tr_BSSMAP_ClearCommandCSFB; + } + MNCC.send(ts_MNCC_DISC_req(cpars.mncc_callref, valueof(ts_MNCC_cause(23)))); BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_DISC(cpars.transaction_id))); + log("f_call_hangup 1: rx DTAP CC DISC"); + if (release_by_ms) { + var BIT1 tid_remote := '1'B; + if (cpars.mo_call) { + tid_remote := '0'B; + } /* B-side (MS) Release of call */ - BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_RELEASE(cpars.transaction_id, '1'B, '0000000'B))); + BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_RELEASE(cpars.transaction_id, tid_remote, '0000000'B))); MNCC.receive(tr_MNCC_REL_ind(cpars.mncc_callref)); + log("f_call_hangup 2: rx MNCC REL ind"); BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_REL_COMPL(cpars.transaction_id))); + log("f_call_hangup 3: rx DTAP CC REL COMPL"); } else { /* A-side (PLMN) Release of call */ MNCC.send(ts_MNCC_REL_req(cpars.mncc_callref, valueof(ts_MNCC_cause(42)))); BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(cpars.transaction_id))); + log("f_call_hangup 4: rx DTAP CC RELEASE"); BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_REL_COMPL(cpars.transaction_id))); } respond_to_dlcx := not (isbound(cpars.mgw_drop_dlcx) and valueof(cpars.mgw_drop_dlcx)); - /* clearing of radio channel */ - if (g_pars.ran_is_geran) { - var template PDU_BSSAP t_clear := tr_BSSMAP_ClearCommand; - if (is_csfb) { - t_clear := tr_BSSMAP_ClearCommandCSFB; - } + var default mdcx := activate(as_optional_mgcp_mdcx()); - interleave { - [] BSSAP.receive(t_clear) { - BSSAP.send(ts_BSSMAP_ClearComplete); - BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND); - } - [] MGCP.receive(tr_DLCX(?)) -> value mgcp_cmd { - if (respond_to_dlcx) { - /* TODO: For one or all connections on EP? */ - MGCP.send(ts_DLCX_ACK2(mgcp_cmd.line.trans_id)); - f_create_mgcp_delete_ep(cpars.mgcp_ep); - } - } + /* clearing of radio channel */ + interleave { + //[g_pars.ran_is_geran] BSSAP.receive(t_clear) { + [] BSSAP.receive(t_clear) { + log("f_call_hangup 5: rx BSSAP Clear Command"); + BSSAP.send(ts_BSSMAP_ClearComplete); + BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND); + log("f_call_hangup 6: rx SCCP DISC"); } - } else { - var template RANAP_PDU t_iurel := tr_RANAP_IuReleaseCommand(?); - if (is_csfb) { - /* FIXME! */ + /* + [!g_pars.ran_is_geran] BSSAP.receive(t_iurel) { + BSSAP.send(ts_RANAP_IuReleaseComplete); + BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND); } - interleave { - [] BSSAP.receive(t_iurel) { - BSSAP.send(ts_RANAP_IuReleaseComplete); - BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND); - } - [] MGCP.receive(tr_DLCX(?)) -> value mgcp_cmd { + */ + [] MGCP.receive(tr_DLCX(?)) -> value mgcp_cmd { + log("f_call_hangup 7: rx MGCP DLCX"); if (respond_to_dlcx) { - /* TODO: For one or all connections on EP? */ MGCP.send(ts_DLCX_ACK2(mgcp_cmd.line.trans_id)); - f_create_mgcp_delete_ep(cpars.mgcp_ep); } + dlcx_contained_ci := f_MgcpCmd_contains_par(mgcp_cmd, "I"); + } + } + + /* Two DLCXes expected, one for RAN and one for CN side. + * Unless the first DLCX did not contain a CI, in which case it was a wildcard DLCX for both. */ + if (dlcx_contained_ci) { + MGCP.receive(tr_DLCX(?)) -> value mgcp_cmd { + log("f_call_hangup 8: rx MGCP DLCX"); + if (respond_to_dlcx) { + MGCP.send(ts_DLCX_ACK2(mgcp_cmd.line.trans_id)); } } } + f_create_mgcp_delete_ep(cpars.mgcp_ep); + log("f_call_hangup 9: done"); + + deactivate(mdcx); + setverdict(pass); } diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index d4be96b..709a73c 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -157,8 +157,16 @@ } } -private altstep as_optional_cc_rel(CallParameters cpars) runs on BSC_ConnHdlr { - [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(cpars.transaction_id))) { repeat; }; +private altstep as_optional_cc_rel(CallParameters cpars, boolean respond := false) runs on BSC_ConnHdlr { + [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(cpars.transaction_id))) { + if (respond) { + var BIT1 tid_remote := '1'B; + if (cpars.mo_call) { + tid_remote := '0'B; + } + BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_REL_COMPL(cpars.transaction_id, tid_remote))); + } + } } function f_init_smpp(charstring id) runs on MTC_CT { -- To view, visit https://gerrit.osmocom.org/13616 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I162985045bb5e129977a3a797b656e30220990df Gerrit-Change-Number: 13616 Gerrit-PatchSet: 6 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 14:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 7 May 2019 14:12:17 +0000 Subject: Change in osmo-hlr[master]: hlr.c: fix: also store the session state in read_cb_forward() Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13897 Change subject: hlr.c: fix: also store the session state in read_cb_forward() ...................................................................... hlr.c: fix: also store the session state in read_cb_forward() If the session state is not set (OSMO_GSUP_SESSION_STATE_NONE), osmo_gsup_encode() would omit the OSMO_GSUP_SESSION_ID_IE. Fix for Change-Id: Ia4f345abc877baaf0a8f73b8988e6514d9589bf5 Change-Id: Idcd209a59d1ee5230104f3101740140d366b0646 --- M src/hlr.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/97/13897/1 diff --git a/src/hlr.c b/src/hlr.c index 8078db0..38422c8 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -466,6 +466,7 @@ gsup_err->destination_name = talloc_memdup(gsup_err, gsup->destination_name, gsup->destination_name_len); gsup_err->destination_name_len = gsup->destination_name_len; gsup_err->message_type = OSMO_GSUP_MSGT_E_ROUTING_ERROR; + gsup_err->session_state = gsup->session_state; gsup_err->session_id = gsup->session_id; gsup_err->source_name = talloc_memdup(gsup_err, gsup->source_name, gsup->source_name_len); gsup_err->source_name_len = gsup->source_name_len; -- To view, visit https://gerrit.osmocom.org/13897 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Idcd209a59d1ee5230104f3101740140d366b0646 Gerrit-Change-Number: 13897 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 14:12:18 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 7 May 2019 14:12:18 +0000 Subject: Change in osmo-hlr[master]: hlr.c: fix: properly print the original message type in read_cb_forwa... Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13898 Change subject: hlr.c: fix: properly print the original message type in read_cb_forward() ...................................................................... hlr.c: fix: properly print the original message type in read_cb_forward() Printing 'OSMO_GSUP_MSGT_E_ROUTING_ERROR' in routing error messages instead of the original message type may be confusing. Let's store the original message type, and change just before sending. Fix for Change-Id: Ia4f345abc877baaf0a8f73b8988e6514d9589bf5 Change-Id: Ic1db1e089fc0f8e03653a9f05058e95d2adaee39 --- M src/hlr.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/98/13898/1 diff --git a/src/hlr.c b/src/hlr.c index 38422c8..3df700a 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -465,7 +465,7 @@ gsup_err->message_class = gsup->message_class; gsup_err->destination_name = talloc_memdup(gsup_err, gsup->destination_name, gsup->destination_name_len); gsup_err->destination_name_len = gsup->destination_name_len; - gsup_err->message_type = OSMO_GSUP_MSGT_E_ROUTING_ERROR; + gsup_err->message_type = gsup->message_type; gsup_err->session_state = gsup->session_state; gsup_err->session_id = gsup->session_id; gsup_err->source_name = talloc_memdup(gsup_err, gsup->source_name, gsup->source_name_len); @@ -508,6 +508,7 @@ if (ret) { struct msgb *msg_err = msgb_alloc_headroom(1024+16, 16, "GSUP forward ERR response"); OSMO_ASSERT(msg_err); + gsup_err->message_type = OSMO_GSUP_MSGT_E_ROUTING_ERROR; osmo_gsup_encode(msg_err, gsup_err); LOGP_GSUP_FWD(gsup_err, LOGL_NOTICE, "Tx %s\n", osmo_gsup_message_type_name(gsup_err->message_type)); osmo_gsup_conn_send(conn, msg_err); -- To view, visit https://gerrit.osmocom.org/13898 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ic1db1e089fc0f8e03653a9f05058e95d2adaee39 Gerrit-Change-Number: 13898 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 14:12:18 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 7 May 2019 14:12:18 +0000 Subject: Change in osmo-hlr[master]: hlr.c: check the presence of msgb->l2h in read_cb() Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13899 Change subject: hlr.c: check the presence of msgb->l2h in read_cb() ...................................................................... hlr.c: check the presence of msgb->l2h in read_cb() Checking the presence of msgb->l2h in read_cb_forward() doesn't make sense, since in read_cb() we pass it to osmo_gsup_decode(). Let's rather do this before calling osmo_gsup_decode(). Fix for Change-Id: Ia4f345abc877baaf0a8f73b8988e6514d9589bf5 Change-Id: I69a3d31aacbbb1abef3d83e42e46c899fe2f914b --- M src/hlr.c 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/99/13899/1 diff --git a/src/hlr.c b/src/hlr.c index 3df700a..84daa47 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -483,11 +483,6 @@ goto end; } - if (!msgb_l2(msg) || !msgb_l2len(msg)) { - LOGP_GSUP_FWD(gsup, LOGL_ERROR, "missing or empty l2 data\n"); - goto end; - } - /* Forward message without re-encoding (so we don't remove unknown IEs) */ LOGP_GSUP_FWD(gsup, LOGL_INFO, "checks passed, forwarding\n"); @@ -524,10 +519,15 @@ static struct osmo_gsup_message gsup; int rc; + if (!msgb_l2(msg) || !msgb_l2len(msg)) { + LOGP(DMAIN, LOGL_ERROR, "missing or empty L2 data\n"); + return -EINVAL; /* FIXME: msgb_free(msg); */ + } + rc = osmo_gsup_decode(msgb_l2(msg), msgb_l2len(msg), &gsup); if (rc < 0) { LOGP(DMAIN, LOGL_ERROR, "error in GSUP decode: %d\n", rc); - return rc; + return rc; /* FIXME: msgb_free(msg); */ } /* 3GPP TS 23.003 Section 2.2 clearly states that an IMSI with less than 5 -- To view, visit https://gerrit.osmocom.org/13899 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I69a3d31aacbbb1abef3d83e42e46c899fe2f914b Gerrit-Change-Number: 13899 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 14:12:18 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 7 May 2019 14:12:18 +0000 Subject: Change in osmo-hlr[master]: hlr.c: fix possible msgb memleaks in read_cb() Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13900 Change subject: hlr.c: fix possible msgb memleaks in read_cb() ...................................................................... hlr.c: fix possible msgb memleaks in read_cb() Change-Id: I1226eeb24d7657e2782760fab1b49d5581ab53e2 --- M src/hlr.c 1 file changed, 8 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/00/13900/1 diff --git a/src/hlr.c b/src/hlr.c index 84daa47..d9ebaf7 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -521,20 +521,24 @@ if (!msgb_l2(msg) || !msgb_l2len(msg)) { LOGP(DMAIN, LOGL_ERROR, "missing or empty L2 data\n"); - return -EINVAL; /* FIXME: msgb_free(msg); */ + msgb_free(msg); + return -EINVAL; } rc = osmo_gsup_decode(msgb_l2(msg), msgb_l2len(msg), &gsup); if (rc < 0) { LOGP(DMAIN, LOGL_ERROR, "error in GSUP decode: %d\n", rc); - return rc; /* FIXME: msgb_free(msg); */ + msgb_free(msg); + return rc; } /* 3GPP TS 23.003 Section 2.2 clearly states that an IMSI with less than 5 * digits is impossible. Even 5 digits is a highly theoretical case */ - if (strlen(gsup.imsi) < 5) { + if (strlen(gsup.imsi) < 5) { /* TODO: move this check to libosmogsm/gsup.c? */ LOGP(DMAIN, LOGL_ERROR, "IMSI too short: %s\n", osmo_quote_str(gsup.imsi, -1)); - return gsup_send_err_reply(conn, gsup.imsi, gsup.message_type, GMM_CAUSE_INV_MAND_INFO); + gsup_send_err_reply(conn, gsup.imsi, gsup.message_type, GMM_CAUSE_INV_MAND_INFO); + msgb_free(msg); + return -EINVAL; } if (gsup.destination_name_len) -- To view, visit https://gerrit.osmocom.org/13900 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I1226eeb24d7657e2782760fab1b49d5581ab53e2 Gerrit-Change-Number: 13900 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 14:15:34 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 May 2019 14:15:34 +0000 Subject: Change in osmo-hlr[master]: hlr.c: fix possible msgb memleaks in read_cb() In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13900 ) Change subject: hlr.c: fix possible msgb memleaks in read_cb() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13900 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1226eeb24d7657e2782760fab1b49d5581ab53e2 Gerrit-Change-Number: 13900 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 07 May 2019 14:15:34 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 14:18:09 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 May 2019 14:18:09 +0000 Subject: Change in osmo-hlr[master]: hlr.c: fix: properly print the original message type in read_cb_forwa... In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13898 ) Change subject: hlr.c: fix: properly print the original message type in read_cb_forward() ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/13898/1/src/hlr.c File src/hlr.c: https://gerrit.osmocom.org/#/c/13898/1/src/hlr.c at 502 PS1, Line 502: LOGP_GSUP_FWD(gsup_err, LOGL_ERROR, "destination not connected\n"); Why not using gsup here instead of gsup_err, and then moving all gsup_err allocation after "end" tag? -- To view, visit https://gerrit.osmocom.org/13898 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic1db1e089fc0f8e03653a9f05058e95d2adaee39 Gerrit-Change-Number: 13898 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 07 May 2019 14:18:09 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 14:38:48 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 May 2019 14:38:48 +0000 Subject: Change in osmo-hlr[master]: hlr.c: fix: also store the session state in read_cb_forward() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13897 ) Change subject: hlr.c: fix: also store the session state in read_cb_forward() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13897 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Idcd209a59d1ee5230104f3101740140d366b0646 Gerrit-Change-Number: 13897 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 07 May 2019 14:38:48 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 14:40:17 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 May 2019 14:40:17 +0000 Subject: Change in osmo-hlr[master]: hlr.c: check the presence of msgb->l2h in read_cb() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13899 ) Change subject: hlr.c: check the presence of msgb->l2h in read_cb() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13899 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I69a3d31aacbbb1abef3d83e42e46c899fe2f914b Gerrit-Change-Number: 13899 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 07 May 2019 14:40:17 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 14:40:35 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 May 2019 14:40:35 +0000 Subject: Change in osmo-hlr[master]: hlr.c: fix possible msgb memleaks in read_cb() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13900 ) Change subject: hlr.c: fix possible msgb memleaks in read_cb() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13900 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1226eeb24d7657e2782760fab1b49d5581ab53e2 Gerrit-Change-Number: 13900 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 07 May 2019 14:40:35 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 14:41:14 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 May 2019 14:41:14 +0000 Subject: Change in osmo-hlr[master]: hlr.c: fix possible msgb memleaks in read_cb() In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13900 ) Change subject: hlr.c: fix possible msgb memleaks in read_cb() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13900 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1226eeb24d7657e2782760fab1b49d5581ab53e2 Gerrit-Change-Number: 13900 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 07 May 2019 14:41:14 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 14:42:13 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 May 2019 14:42:13 +0000 Subject: Change in osmo-hlr[master]: hlr.c: check the presence of msgb->l2h in read_cb() In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13899 ) Change subject: hlr.c: check the presence of msgb->l2h in read_cb() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13899 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I69a3d31aacbbb1abef3d83e42e46c899fe2f914b Gerrit-Change-Number: 13899 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Comment-Date: Tue, 07 May 2019 14:42:13 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 14:43:03 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 May 2019 14:43:03 +0000 Subject: Change in osmo-hlr[master]: hlr.c: fix: properly print the original message type in read_cb_forwa... In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13898 ) Change subject: hlr.c: fix: properly print the original message type in read_cb_forward() ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/13898/1/src/hlr.c File src/hlr.c: https://gerrit.osmocom.org/#/c/13898/1/src/hlr.c at 502 PS1, Line 502: LOGP_GSUP_FWD(gsup_err, LOGL_ERROR, "destination not connected\n"); > Why not using gsup here instead of gsup_err, and then moving all gsup_err allocation after "end" tag [?] because msg is already deallocated when we reach here -- To view, visit https://gerrit.osmocom.org/13898 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic1db1e089fc0f8e03653a9f05058e95d2adaee39 Gerrit-Change-Number: 13898 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Neels Hofmeyr Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 07 May 2019 14:43:03 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 14:44:05 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 May 2019 14:44:05 +0000 Subject: Change in osmo-hlr[master]: hlr.c: fix: properly print the original message type in read_cb_forwa... In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13898 ) Change subject: hlr.c: fix: properly print the original message type in read_cb_forward() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13898 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic1db1e089fc0f8e03653a9f05058e95d2adaee39 Gerrit-Change-Number: 13898 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 07 May 2019 14:44:05 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 14:54:55 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 May 2019 14:54:55 +0000 Subject: Change in libosmocore[master]: Fix osmo_quote_str_c() for strings larger than 32 bytes Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13901 Change subject: Fix osmo_quote_str_c() for strings larger than 32 bytes ...................................................................... Fix osmo_quote_str_c() for strings larger than 32 bytes As Neels pointed out, we shouldn't pass a constant value of 32 to osmo_quote_str_buf2(). Change-Id: Id9bde14166d6674ce4dda36fa9f4ae9217ce5cc2 --- M src/utils.c 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/01/13901/1 diff --git a/src/utils.c b/src/utils.c index b66721e..e6d9389 100644 --- a/src/utils.c +++ b/src/utils.c @@ -813,10 +813,12 @@ */ char *osmo_quote_str_c(const void *ctx, const char *str, int in_len) { - char *buf = talloc_size(ctx, OSMO_MAX(in_len+2, 32)); + /* some minimum length for things like "NULL" or "(error)" */ + int alloc_size = OSMO_MAX(in_len+2, 32); + char *buf = talloc_size(ctx, alloc_size); if (!buf) return NULL; - return osmo_quote_str_buf2(buf, 32, str, in_len); + return osmo_quote_str_buf2(buf, alloc_size, str, in_len); } /*! perform an integer square root operation on unsigned 32bit integer. -- To view, visit https://gerrit.osmocom.org/13901 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id9bde14166d6674ce4dda36fa9f4ae9217ce5cc2 Gerrit-Change-Number: 13901 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 16:18:33 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 May 2019 16:18:33 +0000 Subject: Change in libosmocore[master]: Fix osmo_quote_str_c() for strings larger than 32 bytes In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13901 ) Change subject: Fix osmo_quote_str_c() for strings larger than 32 bytes ...................................................................... Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/13901/1/src/utils.c File src/utils.c: https://gerrit.osmocom.org/#/c/13901/1/src/utils.c at 816 PS1, Line 816: /* some minimum length for things like "NULL" or "(error)" */ -1 case is still not handle corrected, see my previous email in ML about it: char *osmo_quote_str_c(const void *ctx, const char *str, int in_len) { size_t len = in_len == -1 ? strlen(str) : in_len; len += 2; char *buf = talloc_size(ctx, len); if (!buf) return NULL; return osmo_quote_str_buf2(buf, len, str, in_len); } -- To view, visit https://gerrit.osmocom.org/13901 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id9bde14166d6674ce4dda36fa9f4ae9217ce5cc2 Gerrit-Change-Number: 13901 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 07 May 2019 16:18:33 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 16:39:04 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 May 2019 16:39:04 +0000 Subject: =?UTF-8?Q?Change_in_libosmocore=5Bmaster=5D=3A_Bump_version=3A_1=2E0=2E1=2E143-cc72c_=E2=86=92_1=2E1=2E0?= Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13902 Change subject: Bump version: 1.0.1.143-cc72c ? 1.1.0 ...................................................................... Bump version: 1.0.1.143-cc72c ? 1.1.0 Change-Id: I351411ca5913c8b40f23287ec7c9ebfe11bd2bb0 --- M TODO-RELEASE M debian/changelog M debian/control R debian/libosmogb9.install R debian/libosmogsm12.install M src/Makefile.am M src/gb/Makefile.am M src/gsm/Makefile.am M src/sim/Makefile.am M src/vty/Makefile.am 10 files changed, 177 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/02/13902/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index db3be49..8ccfa49 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,17 +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. #library what description / commit summary line -libosmogb gprs_ns_inst Adding bss_sns_fi member for IP-SNS support -libosmogb gprs_nsvc Adding sig_weight and data_weight members for IP-SNS support -libosmogb various new symbols Adding functions related to IP-SNS support -libosmocore osmo_fsm_inst Add flag proc.terminating (ABI change) -libosmocore osmo_escape_str(), These now always copy to the buffer instead of returning the - osmo_escape_str_buf() unchanged input string when no chars needed escaping, hence - returned strings might now also be truncated even if all chars were printable. -libosmocore osmo_escape_str_buf2() New function signature similar to snprintf(), for use with OSMO_STRBUF_APPEND(). -libosmocore osmo_quote_str(), On string truncation, these used to print a closing quote '"' after the - osmo_quote_str_buf() truncated string. This is no longer the case. e.g. a string 'truncated' in a - 9-char buffer used to print '"trunca"\0', which now becomes '"truncat\0'. -libosmocore osmo_quote_str_buf2() New function signature similar to snprintf(), for use with OSMO_STRBUF_APPEND(). -libosmogsm gsm0808_handover_required Storage size changed, speech_version_used now an enum. - gsm0808_handover_performed Storage size changed, speech_version_chosen now an enum. diff --git a/debian/changelog b/debian/changelog index 2cdab76..5ed8fe6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,169 @@ +libosmocore (1.1.0) unstable; urgency=medium + + [ Oliver Smith ] + * gsm_23_003.h: add GSM23003_IMEI_NUM_DIGITS_NO_CHK + * GSUP: deprecate osmo_gsup_get_err_msg_type() + * Revert "signal.c: Make non-exported tall_sigh_ctx static" + * Revert "ipa_ccm_idtag_parse*: Fix reported length value" + * GSUP: add inter-MSC handover related msgs and IEs + + [ Harald Welte ] + * Bump version: 1.0.0 ? 1.0.1 + * gsm0408_test: Fix IMEI-SV related tests to use no more than 16 digits + * constrain gsm48_generate_mid() output array bounds + * Work around bogus gcc-8.2 array-bounds warning/error + * Extend gsm_04_08.h with CSFB related definitiosn form 44.018 Rel 15 + * gsm_08_08.h: Add IEI definitions from Release 15 + * bitvec: Add bitvec_bytes_used() function + * bitvec: Add bitvec_tailroom_bits() function + * Fix BSSMAP length generated by gsm0808_create_clear_command2() + * gsm0808: comment about difference of gsm0808_create_clear_command() + * gsm0808: Add unit tests for test_create_clear_command2() + * bssgp_tx_bvc_unblock(): Fix log message + * gprs_ns: Use gprs_ns_tx_alive() instead of gprs_ns_tx_simple() + * gprs_ns.c: cosmetic whitespace fixes + * gprs_ns: Declare gprs_ns_tx_alive*() in header file + * gprs_ns: Add missing NSVCI IE to NS-BLOCK-ACK message + * select: Call log_reset_context() before calling file descriptor callbacks + * NS: Don't print information about FR/GRE if not enabled! + * NS: Add missing NS Cause strings + * GPRS: Doxygen documentation for 'struct libgb_msgb_cb' + * gprs_ns: Add code for SNS-SIZE and SNS-CONFIG encoding + * NS: Factor out gprs_nsvc_start_test() and use it + * NS: Add support for GPRS NS IP Sub-Network-Service (SNS) + * gprs_ns.c: Update comment: IP SNS has recently been implemented + * gprs_ns: Don't use initial IP/port for anything but SNS + * gprs_ns_sns: Use "correct" remote IP address for local IP endpoint + * tests: use -no-install libtool flag to avoid ./lt-* scripts + * ipa_ccm_idtag_parse*: Fix reported length value + * socket: osmo_sock_get_name() Use "const void *" as talloc context + * gprs_ns_sns: Properly initialize sockaddr_in in gprs_nsvc_create_ip4() + * select: Rename BSC_FD_* constants to OSMO_FD_* + * signal.c: Fix osmo_signal_talloc_ctx_init() + * signal.c: Make non-exported tall_sigh_ctx static + * osmo_escape_str_buf: Always copy, don't return input string pointer + * Add _buf() functions to bypass static string buffers + * Add _c versions of functions that otherwise return static buffers + * Re-introduce declaration of gsm0808_create_handover_request_ack() + + [ Neels Hofmeyr ] + * gsm0808: add BSSMAP Cell Identifier matching API + * add osmo_hexdump_buf() and test + * add osmo_classmark_* API + * osmo_fsm_state_name: make robust against NULL fi + * build: add missing logging_vty_test.vty to EXTRA_DIST + * jenkins distcheck: enable external tests + * osmo_fsm_inst_state_chg(): set T also for zero timeout + * osmo_fsm_inst_state_chg(): clamp timeout_secs to <= ~68 years + * add generic vty_transcript_test.c, vty_transcript_test.vty + * vty: enable optional-multi-choice syntax: ([one]|[two]) + * vty: enable optional-multi-choice syntax: [(one|two)] + * vty: enable tab-completion for optional-multi-choice args + * vty telnet: consistently never change nodes upon CTRL-C + * vty api: add vty_out_va() + * doxygen: enable cross referencing everywhere + * doxygen: add source files as dependencies + * doxygen: allow manual 'make apidoc' even if --disable-doxygen + * add osmo_tdef API, originally adopted from osmo-bsc T_def + * platform independence fix: tdef range tests + * get_value_string(): guard against NULL + * fix osmo_gsm48_classmark* libosmogsm.map entries + * add OSMO_STRBUF_PRINTF() + * enlarge gsm0808 msgb headroom + * log: fsm: allow logging the timeout on state change + * fix api doc typo for osmo_plmn_name2() + * api doc: tweak gsm0808_cell_id_matches_list() doc + * represent negative T-timers as Osmocom-specific X-timers + * tdef_test: tweak output to prepare for a fix + * fix tdef_test.c: do call the function-to-test in all cases + * fsm: add osmo_fsm_inst_state_chg_keep_or_start_timer() + * add gsm0808_cell_id_from_cgi(), gsm0808_cell_id_to_cgi() + * osmo_gsm48_classmark_a5_name(): fix 'no-cm3' label + * gsm_utils.h: remove unused include of gsm_08_08.h + * add osmo_sockaddr_str API + * add osmo_use_count API + * add fsm_dealloc_test.c + * fsm: add flag to ensure osmo_fsm_inst_term() happens only once + * fsm: support graceful osmo_fsm_inst_term() cascades + * fsm_dealloc_test: no need for ST_DESTROYING + * make osmo_sockaddr_str_is_set() NULL-safe + * add osmo_str_startswith() + * tweak OSMO_STRBUF_APPEND(), add OSMO_STRBUF_APPEND_NOLEN() + * add osmo_{escape,quote}_str_buf2() for standard args ordering + * add identifier sanitation for setting FSM instance ids + * add OSMO_IMSI_BUF_SIZE + * GSUP: add Message Class IE + * BSSMAP: tweaks + * BSSMAP: add messages for inter-BSC and inter-MSC Handover + * add gsm48_decode_bcd_number2() from osmo-msc + * add osmo_bssap_tlv_parse2() for multiple identical T + * add vty_is_active() + * add comment to gsm_mncc_bearer_cap.speech_ver + * gsm48_decode_bcd_number2(): fix input len check + * gsm48_decode_bcd_number2(): allow avoiding deprecation + * osmo_gsup_decode(): properly check IMSI, avoid deprecation + * add gsm0808_create_handover_request_ack2 to add AoIP RTP addr + + [ Max ] + * socket.h: add missing include + * Enable remote SIM protocol log level + * Add multipatch capability to osmo-config-merge + * LCLS: add string dump helpers + * coding: check gsm0503_rach_*() results + * rate_ctr_group_free(): guard against empty or NULL input + * BSSGP: use variable for NSEI + + [ Philipp Maier ] + * gsm0808: Add CSFB indication IE to BSSMAP CLEAR COMMAND + * gsm0808_utils: fix gsm48 multirate configuration generator + * gsm0808_utils: fix gsm48 multirate to S-bit converter + * gsm_utils: fix use buf_len instead of sizeof in osmo_dump_gsmtime_buf + + [ Sylvain Munaut ] + * protocol/gsm_04_14: Fix the OPEN LOOP message type + * gsm_08_08.h: Add constants for Channel Type in signalling mode + + [ Vadim Yanitskiy ] + * gsm/gsm0480: introduce gsm0480_create_release_complete() + * vty/tdef_vty.c: drop redundant comparison + * src/signal.c: cosmetic: use talloc_zero() + * Doxygen: fix incorrect / missing parameter description + * core/linuxlist.h: fix and unify Doxygen documentation + * core/linuxlist.h: fix white-space and inconsistent alignment + * src/logging.c: fix syntax errors in Doxygen documentation + * core/msgb.h: fix dead msgb2 reference in msgb_eq_* helpers + * core/msgb.h: drop meaningless parameter of msgb_eq_* helpers + * src/msgb.c: fix Doxygen documentation for msgb_printf() + * core/msgb.h: fix incorrect Doxygen parameter description + * Doxygen: fix documentation of rate_ctr_for_each_counter() + * src/rate_ctr.c: drop some incorrect \ref references + * Doxygen: fix documentation of osmo_timer_setup() + * logging_gsmtap.c: document all params of log_target_create_gsmtap() + * src/gsmtap_util.c: fix possible memleak in gsmtap_source_init() + * gsm_03_40.h: define max SM-TP-UDL (User-Data-Length) values + * vty/talloc_ctx_vty.c: allocate walk_cb_params on stack, not heap + * vty/talloc_ctx_vty.c: use REG_NOSUB flag of regcomp() + * gsm_utils.c: fix Doxygen description for gsm_get_octet_len() + * Fix incorrect buffer size calculation + * gb/gprs_ns_sns.c: fix incorrect sizeof() calculation + * gsm/gsm_utils.c: indicate intentional fall-through + * application.c: drop wrong \references of osmo_init_ignore_signals() + * bitcomp.c: fix missing Doxygen group closing tag + * gsm/gsm_utils.h: fix argument type of gsm_chan_t_name() + + [ Pau Espin Pedrol ] + * rsl: Support PDCH in rsl_chan_nr_str + * ipa: Document ipa_ccm_idtag_parse_off and fix ipa_ccm_idtag_parse + * ipa: Fix ipa_ccm_id_resp_parse on big endian systems + + [ Karl Koscher ] + * Fix build on non-glibc systems + + [ Alexander Couzens ] + * add osmo_stat_item_inc/osmo_stat_item_dec to set it relative + + -- Pau Espin Pedrol Tue, 07 May 2019 18:36:51 +0200 + libosmocore (1.0.1) unstable; urgency=medium [ Max ] diff --git a/debian/control b/debian/control index 454a548..9accf61 100644 --- a/debian/control +++ b/debian/control @@ -28,8 +28,8 @@ Depends: libosmocodec0 (= ${binary:Version}), libosmocoding0 (= ${binary:Version}), libosmocore12 (= ${binary:Version}), - libosmogb6 (= ${binary:Version}), - libosmogsm11 (= ${binary:Version}), + libosmogb9 (= ${binary:Version}), + libosmogsm12 (= ${binary:Version}), libosmovty4 (= ${binary:Version}), libosmoctrl0 (= ${binary:Version}), libosmosim0 (= ${binary:Version}), @@ -146,7 +146,7 @@ . This package contains the documentation for the libosmocore library. -Package: libosmogb6 +Package: libosmogb9 Section: libs Architecture: any Multi-Arch: same @@ -167,7 +167,7 @@ Architecture: all Section: doc Depends: ${misc:Depends}, - libosmogb6, + libosmogb9, libjs-jquery Description: Documentation for the Osmo GPRS Gb library This is part of the libosmocore "meta"-library. The libosmocore library @@ -178,7 +178,7 @@ . This package contains the documentation for the libosmogb library. -Package: libosmogsm11 +Package: libosmogsm12 Section: libs Architecture: any Multi-Arch: same @@ -202,7 +202,7 @@ Architecture: all Section: doc Depends: ${misc:Depends}, - libosmogsm11, + libosmogsm12, libjs-jquery Description: Documentation for the Osmo GSM utility library This is part of the libosmocore "meta"-library. The libosmocore library diff --git a/debian/libosmogb6.install b/debian/libosmogb9.install similarity index 100% rename from debian/libosmogb6.install rename to debian/libosmogb9.install diff --git a/debian/libosmogsm11.install b/debian/libosmogsm12.install similarity index 100% rename from debian/libosmogsm11.install rename to debian/libosmogsm12.install diff --git a/src/Makefile.am b/src/Makefile.am index aaf2233..e65e0c9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,7 +1,7 @@ # This is _NOT_ the library release version, it's an API version. # Please read chapter "Library interface versions" of the libtool documentation # before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html -LIBVERSION=12:1:0 +LIBVERSION=13:0:1 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include AM_CFLAGS = -Wall $(TALLOC_CFLAGS) diff --git a/src/gb/Makefile.am b/src/gb/Makefile.am index 3180f9c..9d66678 100644 --- a/src/gb/Makefile.am +++ b/src/gb/Makefile.am @@ -1,6 +1,6 @@ # This is _NOT_ the library release version, it's an API version. # Please read Chapter 6 "Library interface versions" of the libtool documentation before making any modification -LIBVERSION=8:0:2 +LIBVERSION=9:0:0 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include AM_CFLAGS = -Wall ${GCC_FVISIBILITY_HIDDEN} -fno-strict-aliasing $(TALLOC_CFLAGS) diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index 9066500..658ef2d 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -1,7 +1,7 @@ # This is _NOT_ the library release version, it's an API version. # Please read chapter "Library interface versions" of the libtool documentation # before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html -LIBVERSION=11:0:0 +LIBVERSION=12:0:0 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(TALLOC_CFLAGS) AM_CFLAGS = -Wall ${GCC_FVISIBILITY_HIDDEN} diff --git a/src/sim/Makefile.am b/src/sim/Makefile.am index ebf4739..f495985 100644 --- a/src/sim/Makefile.am +++ b/src/sim/Makefile.am @@ -1,7 +1,7 @@ # This is _NOT_ the library release version, it's an API version. # Please read chapter "Library interface versions" of the libtool documentation # before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html -LIBVERSION=0:2:0 +LIBVERSION=1:0:1 AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)/include AM_CFLAGS = -fPIC -Wall $(PCSC_CFLAGS) $(TALLOC_CFLAGS) diff --git a/src/vty/Makefile.am b/src/vty/Makefile.am index cdde0fa..258d193 100644 --- a/src/vty/Makefile.am +++ b/src/vty/Makefile.am @@ -1,7 +1,7 @@ # This is _NOT_ the library release version, it's an API version. # Please read chapter "Library interface versions" of the libtool documentation # before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html -LIBVERSION=6:0:2 +LIBVERSION=7:0:3 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include AM_CFLAGS = -Wall $(TALLOC_CFLAGS) -- To view, visit https://gerrit.osmocom.org/13902 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I351411ca5913c8b40f23287ec7c9ebfe11bd2bb0 Gerrit-Change-Number: 13902 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 16:47:53 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 May 2019 16:47:53 +0000 Subject: =?UTF-8?Q?Change_in_osmo-msc=5Bpespin/release-1=2E4=2E0=5D=3A_Bump_version=3A_1=2E3=2E1=2E39-83e31-dirty_=E2=86=92_1=2E4=2E0?= Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13903 Change subject: Bump version: 1.3.1.39-83e31-dirty ? 1.4.0 ...................................................................... Bump version: 1.3.1.39-83e31-dirty ? 1.4.0 Change-Id: I66ecb2ed3db965cdfe956a85a1b52cd0c069d352 --- M configure.ac M debian/changelog 2 files changed, 63 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/03/13903/1 diff --git a/configure.ac b/configure.ac index f8787cf..4b8d1f7 100644 --- a/configure.ac +++ b/configure.ac @@ -35,10 +35,10 @@ ]) -PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.0.0) -PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.0.0) -PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.0.0) -PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.0.0) +PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.1.0) +PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.1.0) +PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.1.0) +PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.1.0) PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.6.0) PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.4.0) PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 1.0.0) diff --git a/debian/changelog b/debian/changelog index 8aec381..aaf7c91 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,62 @@ +osmo-msc (1.4.0) unstable; urgency=medium + + [ Max ] + * Handle LCLS-NOTIFICATION message from BSS + * Various logging fixes + * VLR tests: use msgb_eq_data_print() for comparison + * transaction: drop meaningless ti_flag of trans_assign_trans_id() + * transaction: clarify magic 0xff transaction ID + + [ Vadim Yanitskiy ] + * transaction.c: cosmetic: use 'default' branch in trans_free() + * libmsc/ran_conn.c: cosmetic: use tabs instead of N * 8 spaces + * transaction: change arguments of trans_find_by_sm_rp_mr() + * libmsc/gsm_04_11.c: also assign SM-RP-MR to MO transactions + * libmsc/gsm_04_11.c: introduce and use gsm411_assign_sm_rp_mr() + * libmsc/gsm_04_80.c: use gsm0480_create_release_complete() + * libmsc/gsm_04_80.c: add msc_send_ussd_release_complete_cause() + * libmsc/osmo_msc.c: move connection ref-counting code to 'ran_conn.c' + * transaction: fix description of trans_assign_trans_id() + * transaction.h: use #pragma once as include guard + * libmsc/gsm_09_11.c: implement guard timer for NCSS sessions + * libmsc/ran_conn.c: add missing 'break' to OSMO_RAT_EUTRAN_SGS + * libmsc/sgs_iface.c: fix SGS_STATE_NS11 counter reference + * libmsc/sgs_vty.c: always write server address and VLR name + * libmsc/msc_vty.c: drop dead comparison against null + + [ Harald Welte ] + * Add SGs Interface + * debian: depend on libsctp-dev + * configure.ac: Check for libsctp + * a_iface: Centralize/wrap BSSAP / N-DATA transmission + * a_iface: use 'const' qualifier for ran_conn whenever possible + * a_iface: Fix hexdumping of N-DATA.req + * a_iface: OSMO_ASSERT() if we ever want to send BSSAP with invalid length + + [ Philipp Maier ] + * a_iface: Include CSFB Indication into BSSMAP CLEAR COMMAND + * silent_call: use osmo_strlcpy() instead of strncpy() + * msc_vty: add missing header file + + [ Oliver Smith ] + * debian: depend on libdbd-sqlite3 + + [ Keith ] + * Don't deliver alert notifications to ESME not yet bound. + + [ Neels Hofmeyr ] + * use only accepted ran_conns for new transactions + * gsm_04_11_gsup.c: drop unused conn lookup + * SMS queue: properly log failed attempts number + * vty: add cmd subscriber ID sms delete-all + * vlr_subscr_name(): use OSMO_STRBUF + + [ Sylvain Munaut ] + * libmsc: Allow different channel types to be requested as silent calls + * libvlr: Allow 2G auth tuples to be re-used without going through AUTH + + -- Pau Espin Pedrol Tue, 07 May 2019 18:45:05 +0200 + osmo-msc (1.3.1) unstable; urgency=medium [ Neels Hofmeyr ] -- To view, visit https://gerrit.osmocom.org/13903 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: pespin/release-1.4.0 Gerrit-MessageType: newchange Gerrit-Change-Id: I66ecb2ed3db965cdfe956a85a1b52cd0c069d352 Gerrit-Change-Number: 13903 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 16:49:20 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 May 2019 16:49:20 +0000 Subject: =?UTF-8?Q?Change_in_libosmocore=5Bmaster=5D=3A_Bump_version=3A_1=2E0=2E1=2E143-cc72c_=E2=86=92_1=2E1=2E0?= In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13902 ) Change subject: Bump version: 1.0.1.143-cc72c ? 1.1.0 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13902 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I351411ca5913c8b40f23287ec7c9ebfe11bd2bb0 Gerrit-Change-Number: 13902 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 07 May 2019 16:49:20 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 16:49:34 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 May 2019 16:49:34 +0000 Subject: =?UTF-8?Q?Change_in_osmo-msc=5Bpespin/release-1=2E4=2E0=5D=3A_Bump_version=3A_1=2E3=2E1=2E39-83e31-dirty_=E2=86=92_1=2E4=2E0?= In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13903 ) Change subject: Bump version: 1.3.1.39-83e31-dirty ? 1.4.0 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13903 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: pespin/release-1.4.0 Gerrit-MessageType: comment Gerrit-Change-Id: I66ecb2ed3db965cdfe956a85a1b52cd0c069d352 Gerrit-Change-Number: 13903 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-CC: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 07 May 2019 16:49:34 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 16:51:52 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 May 2019 16:51:52 +0000 Subject: =?UTF-8?Q?Change_in_libosmocore=5Bmaster=5D=3A_Bump_version=3A_1=2E0=2E1=2E143-cc72c_=E2=86=92_1=2E1=2E0?= In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/13902 ) Change subject: Bump version: 1.0.1.143-cc72c ? 1.1.0 ...................................................................... Bump version: 1.0.1.143-cc72c ? 1.1.0 Change-Id: I351411ca5913c8b40f23287ec7c9ebfe11bd2bb0 --- M TODO-RELEASE M debian/changelog M debian/control R debian/libosmogb9.install R debian/libosmogsm12.install M src/Makefile.am M src/gb/Makefile.am M src/gsm/Makefile.am M src/sim/Makefile.am M src/vty/Makefile.am 10 files changed, 177 insertions(+), 25 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/TODO-RELEASE b/TODO-RELEASE index db3be49..8ccfa49 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,17 +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. #library what description / commit summary line -libosmogb gprs_ns_inst Adding bss_sns_fi member for IP-SNS support -libosmogb gprs_nsvc Adding sig_weight and data_weight members for IP-SNS support -libosmogb various new symbols Adding functions related to IP-SNS support -libosmocore osmo_fsm_inst Add flag proc.terminating (ABI change) -libosmocore osmo_escape_str(), These now always copy to the buffer instead of returning the - osmo_escape_str_buf() unchanged input string when no chars needed escaping, hence - returned strings might now also be truncated even if all chars were printable. -libosmocore osmo_escape_str_buf2() New function signature similar to snprintf(), for use with OSMO_STRBUF_APPEND(). -libosmocore osmo_quote_str(), On string truncation, these used to print a closing quote '"' after the - osmo_quote_str_buf() truncated string. This is no longer the case. e.g. a string 'truncated' in a - 9-char buffer used to print '"trunca"\0', which now becomes '"truncat\0'. -libosmocore osmo_quote_str_buf2() New function signature similar to snprintf(), for use with OSMO_STRBUF_APPEND(). -libosmogsm gsm0808_handover_required Storage size changed, speech_version_used now an enum. - gsm0808_handover_performed Storage size changed, speech_version_chosen now an enum. diff --git a/debian/changelog b/debian/changelog index 2cdab76..5ed8fe6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,169 @@ +libosmocore (1.1.0) unstable; urgency=medium + + [ Oliver Smith ] + * gsm_23_003.h: add GSM23003_IMEI_NUM_DIGITS_NO_CHK + * GSUP: deprecate osmo_gsup_get_err_msg_type() + * Revert "signal.c: Make non-exported tall_sigh_ctx static" + * Revert "ipa_ccm_idtag_parse*: Fix reported length value" + * GSUP: add inter-MSC handover related msgs and IEs + + [ Harald Welte ] + * Bump version: 1.0.0 ? 1.0.1 + * gsm0408_test: Fix IMEI-SV related tests to use no more than 16 digits + * constrain gsm48_generate_mid() output array bounds + * Work around bogus gcc-8.2 array-bounds warning/error + * Extend gsm_04_08.h with CSFB related definitiosn form 44.018 Rel 15 + * gsm_08_08.h: Add IEI definitions from Release 15 + * bitvec: Add bitvec_bytes_used() function + * bitvec: Add bitvec_tailroom_bits() function + * Fix BSSMAP length generated by gsm0808_create_clear_command2() + * gsm0808: comment about difference of gsm0808_create_clear_command() + * gsm0808: Add unit tests for test_create_clear_command2() + * bssgp_tx_bvc_unblock(): Fix log message + * gprs_ns: Use gprs_ns_tx_alive() instead of gprs_ns_tx_simple() + * gprs_ns.c: cosmetic whitespace fixes + * gprs_ns: Declare gprs_ns_tx_alive*() in header file + * gprs_ns: Add missing NSVCI IE to NS-BLOCK-ACK message + * select: Call log_reset_context() before calling file descriptor callbacks + * NS: Don't print information about FR/GRE if not enabled! + * NS: Add missing NS Cause strings + * GPRS: Doxygen documentation for 'struct libgb_msgb_cb' + * gprs_ns: Add code for SNS-SIZE and SNS-CONFIG encoding + * NS: Factor out gprs_nsvc_start_test() and use it + * NS: Add support for GPRS NS IP Sub-Network-Service (SNS) + * gprs_ns.c: Update comment: IP SNS has recently been implemented + * gprs_ns: Don't use initial IP/port for anything but SNS + * gprs_ns_sns: Use "correct" remote IP address for local IP endpoint + * tests: use -no-install libtool flag to avoid ./lt-* scripts + * ipa_ccm_idtag_parse*: Fix reported length value + * socket: osmo_sock_get_name() Use "const void *" as talloc context + * gprs_ns_sns: Properly initialize sockaddr_in in gprs_nsvc_create_ip4() + * select: Rename BSC_FD_* constants to OSMO_FD_* + * signal.c: Fix osmo_signal_talloc_ctx_init() + * signal.c: Make non-exported tall_sigh_ctx static + * osmo_escape_str_buf: Always copy, don't return input string pointer + * Add _buf() functions to bypass static string buffers + * Add _c versions of functions that otherwise return static buffers + * Re-introduce declaration of gsm0808_create_handover_request_ack() + + [ Neels Hofmeyr ] + * gsm0808: add BSSMAP Cell Identifier matching API + * add osmo_hexdump_buf() and test + * add osmo_classmark_* API + * osmo_fsm_state_name: make robust against NULL fi + * build: add missing logging_vty_test.vty to EXTRA_DIST + * jenkins distcheck: enable external tests + * osmo_fsm_inst_state_chg(): set T also for zero timeout + * osmo_fsm_inst_state_chg(): clamp timeout_secs to <= ~68 years + * add generic vty_transcript_test.c, vty_transcript_test.vty + * vty: enable optional-multi-choice syntax: ([one]|[two]) + * vty: enable optional-multi-choice syntax: [(one|two)] + * vty: enable tab-completion for optional-multi-choice args + * vty telnet: consistently never change nodes upon CTRL-C + * vty api: add vty_out_va() + * doxygen: enable cross referencing everywhere + * doxygen: add source files as dependencies + * doxygen: allow manual 'make apidoc' even if --disable-doxygen + * add osmo_tdef API, originally adopted from osmo-bsc T_def + * platform independence fix: tdef range tests + * get_value_string(): guard against NULL + * fix osmo_gsm48_classmark* libosmogsm.map entries + * add OSMO_STRBUF_PRINTF() + * enlarge gsm0808 msgb headroom + * log: fsm: allow logging the timeout on state change + * fix api doc typo for osmo_plmn_name2() + * api doc: tweak gsm0808_cell_id_matches_list() doc + * represent negative T-timers as Osmocom-specific X-timers + * tdef_test: tweak output to prepare for a fix + * fix tdef_test.c: do call the function-to-test in all cases + * fsm: add osmo_fsm_inst_state_chg_keep_or_start_timer() + * add gsm0808_cell_id_from_cgi(), gsm0808_cell_id_to_cgi() + * osmo_gsm48_classmark_a5_name(): fix 'no-cm3' label + * gsm_utils.h: remove unused include of gsm_08_08.h + * add osmo_sockaddr_str API + * add osmo_use_count API + * add fsm_dealloc_test.c + * fsm: add flag to ensure osmo_fsm_inst_term() happens only once + * fsm: support graceful osmo_fsm_inst_term() cascades + * fsm_dealloc_test: no need for ST_DESTROYING + * make osmo_sockaddr_str_is_set() NULL-safe + * add osmo_str_startswith() + * tweak OSMO_STRBUF_APPEND(), add OSMO_STRBUF_APPEND_NOLEN() + * add osmo_{escape,quote}_str_buf2() for standard args ordering + * add identifier sanitation for setting FSM instance ids + * add OSMO_IMSI_BUF_SIZE + * GSUP: add Message Class IE + * BSSMAP: tweaks + * BSSMAP: add messages for inter-BSC and inter-MSC Handover + * add gsm48_decode_bcd_number2() from osmo-msc + * add osmo_bssap_tlv_parse2() for multiple identical T + * add vty_is_active() + * add comment to gsm_mncc_bearer_cap.speech_ver + * gsm48_decode_bcd_number2(): fix input len check + * gsm48_decode_bcd_number2(): allow avoiding deprecation + * osmo_gsup_decode(): properly check IMSI, avoid deprecation + * add gsm0808_create_handover_request_ack2 to add AoIP RTP addr + + [ Max ] + * socket.h: add missing include + * Enable remote SIM protocol log level + * Add multipatch capability to osmo-config-merge + * LCLS: add string dump helpers + * coding: check gsm0503_rach_*() results + * rate_ctr_group_free(): guard against empty or NULL input + * BSSGP: use variable for NSEI + + [ Philipp Maier ] + * gsm0808: Add CSFB indication IE to BSSMAP CLEAR COMMAND + * gsm0808_utils: fix gsm48 multirate configuration generator + * gsm0808_utils: fix gsm48 multirate to S-bit converter + * gsm_utils: fix use buf_len instead of sizeof in osmo_dump_gsmtime_buf + + [ Sylvain Munaut ] + * protocol/gsm_04_14: Fix the OPEN LOOP message type + * gsm_08_08.h: Add constants for Channel Type in signalling mode + + [ Vadim Yanitskiy ] + * gsm/gsm0480: introduce gsm0480_create_release_complete() + * vty/tdef_vty.c: drop redundant comparison + * src/signal.c: cosmetic: use talloc_zero() + * Doxygen: fix incorrect / missing parameter description + * core/linuxlist.h: fix and unify Doxygen documentation + * core/linuxlist.h: fix white-space and inconsistent alignment + * src/logging.c: fix syntax errors in Doxygen documentation + * core/msgb.h: fix dead msgb2 reference in msgb_eq_* helpers + * core/msgb.h: drop meaningless parameter of msgb_eq_* helpers + * src/msgb.c: fix Doxygen documentation for msgb_printf() + * core/msgb.h: fix incorrect Doxygen parameter description + * Doxygen: fix documentation of rate_ctr_for_each_counter() + * src/rate_ctr.c: drop some incorrect \ref references + * Doxygen: fix documentation of osmo_timer_setup() + * logging_gsmtap.c: document all params of log_target_create_gsmtap() + * src/gsmtap_util.c: fix possible memleak in gsmtap_source_init() + * gsm_03_40.h: define max SM-TP-UDL (User-Data-Length) values + * vty/talloc_ctx_vty.c: allocate walk_cb_params on stack, not heap + * vty/talloc_ctx_vty.c: use REG_NOSUB flag of regcomp() + * gsm_utils.c: fix Doxygen description for gsm_get_octet_len() + * Fix incorrect buffer size calculation + * gb/gprs_ns_sns.c: fix incorrect sizeof() calculation + * gsm/gsm_utils.c: indicate intentional fall-through + * application.c: drop wrong \references of osmo_init_ignore_signals() + * bitcomp.c: fix missing Doxygen group closing tag + * gsm/gsm_utils.h: fix argument type of gsm_chan_t_name() + + [ Pau Espin Pedrol ] + * rsl: Support PDCH in rsl_chan_nr_str + * ipa: Document ipa_ccm_idtag_parse_off and fix ipa_ccm_idtag_parse + * ipa: Fix ipa_ccm_id_resp_parse on big endian systems + + [ Karl Koscher ] + * Fix build on non-glibc systems + + [ Alexander Couzens ] + * add osmo_stat_item_inc/osmo_stat_item_dec to set it relative + + -- Pau Espin Pedrol Tue, 07 May 2019 18:36:51 +0200 + libosmocore (1.0.1) unstable; urgency=medium [ Max ] diff --git a/debian/control b/debian/control index 454a548..9accf61 100644 --- a/debian/control +++ b/debian/control @@ -28,8 +28,8 @@ Depends: libosmocodec0 (= ${binary:Version}), libosmocoding0 (= ${binary:Version}), libosmocore12 (= ${binary:Version}), - libosmogb6 (= ${binary:Version}), - libosmogsm11 (= ${binary:Version}), + libosmogb9 (= ${binary:Version}), + libosmogsm12 (= ${binary:Version}), libosmovty4 (= ${binary:Version}), libosmoctrl0 (= ${binary:Version}), libosmosim0 (= ${binary:Version}), @@ -146,7 +146,7 @@ . This package contains the documentation for the libosmocore library. -Package: libosmogb6 +Package: libosmogb9 Section: libs Architecture: any Multi-Arch: same @@ -167,7 +167,7 @@ Architecture: all Section: doc Depends: ${misc:Depends}, - libosmogb6, + libosmogb9, libjs-jquery Description: Documentation for the Osmo GPRS Gb library This is part of the libosmocore "meta"-library. The libosmocore library @@ -178,7 +178,7 @@ . This package contains the documentation for the libosmogb library. -Package: libosmogsm11 +Package: libosmogsm12 Section: libs Architecture: any Multi-Arch: same @@ -202,7 +202,7 @@ Architecture: all Section: doc Depends: ${misc:Depends}, - libosmogsm11, + libosmogsm12, libjs-jquery Description: Documentation for the Osmo GSM utility library This is part of the libosmocore "meta"-library. The libosmocore library diff --git a/debian/libosmogb6.install b/debian/libosmogb9.install similarity index 100% rename from debian/libosmogb6.install rename to debian/libosmogb9.install diff --git a/debian/libosmogsm11.install b/debian/libosmogsm12.install similarity index 100% rename from debian/libosmogsm11.install rename to debian/libosmogsm12.install diff --git a/src/Makefile.am b/src/Makefile.am index aaf2233..e65e0c9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,7 +1,7 @@ # This is _NOT_ the library release version, it's an API version. # Please read chapter "Library interface versions" of the libtool documentation # before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html -LIBVERSION=12:1:0 +LIBVERSION=13:0:1 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include AM_CFLAGS = -Wall $(TALLOC_CFLAGS) diff --git a/src/gb/Makefile.am b/src/gb/Makefile.am index 3180f9c..9d66678 100644 --- a/src/gb/Makefile.am +++ b/src/gb/Makefile.am @@ -1,6 +1,6 @@ # This is _NOT_ the library release version, it's an API version. # Please read Chapter 6 "Library interface versions" of the libtool documentation before making any modification -LIBVERSION=8:0:2 +LIBVERSION=9:0:0 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include AM_CFLAGS = -Wall ${GCC_FVISIBILITY_HIDDEN} -fno-strict-aliasing $(TALLOC_CFLAGS) diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index 9066500..658ef2d 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -1,7 +1,7 @@ # This is _NOT_ the library release version, it's an API version. # Please read chapter "Library interface versions" of the libtool documentation # before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html -LIBVERSION=11:0:0 +LIBVERSION=12:0:0 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(TALLOC_CFLAGS) AM_CFLAGS = -Wall ${GCC_FVISIBILITY_HIDDEN} diff --git a/src/sim/Makefile.am b/src/sim/Makefile.am index ebf4739..f495985 100644 --- a/src/sim/Makefile.am +++ b/src/sim/Makefile.am @@ -1,7 +1,7 @@ # This is _NOT_ the library release version, it's an API version. # Please read chapter "Library interface versions" of the libtool documentation # before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html -LIBVERSION=0:2:0 +LIBVERSION=1:0:1 AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)/include AM_CFLAGS = -fPIC -Wall $(PCSC_CFLAGS) $(TALLOC_CFLAGS) diff --git a/src/vty/Makefile.am b/src/vty/Makefile.am index cdde0fa..258d193 100644 --- a/src/vty/Makefile.am +++ b/src/vty/Makefile.am @@ -1,7 +1,7 @@ # This is _NOT_ the library release version, it's an API version. # Please read chapter "Library interface versions" of the libtool documentation # before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html -LIBVERSION=6:0:2 +LIBVERSION=7:0:3 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include AM_CFLAGS = -Wall $(TALLOC_CFLAGS) -- To view, visit https://gerrit.osmocom.org/13902 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I351411ca5913c8b40f23287ec7c9ebfe11bd2bb0 Gerrit-Change-Number: 13902 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 16:54:09 2019 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 7 May 2019 16:54:09 +0000 Subject: Change in libosmo-sccp[master]: xudt: Implement address and data extraction In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. ( https://gerrit.osmocom.org/13838 ) Change subject: xudt: Implement address and data extraction ...................................................................... xudt: Implement address and data extraction The cellmgr-ng unfortunately looks at the data being sent and can't handle the presence of XUDT at all. Add the structure definition and refactor extraction code to work on offsets. Add a unit test. Change-Id: I45a7447cc1be432fff34849e0e35abc0410cf153 --- M include/osmocom/sccp/sccp_types.h M src/sccp.c M tests/sccp/sccp_test.c 3 files changed, 142 insertions(+), 14 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/include/osmocom/sccp/sccp_types.h b/include/osmocom/sccp/sccp_types.h index ab7f74f..18b54f4 100644 --- a/include/osmocom/sccp/sccp_types.h +++ b/include/osmocom/sccp/sccp_types.h @@ -422,6 +422,60 @@ uint8_t data[0]; } __attribute__((packed)); +/* Extended unitdata (XUDT) */ +struct sccp_data_ext_unitdata { + /* mandatory */ + uint8_t type; + uint8_t proto_class; + uint8_t hop_counter; + + /* variable */ + uint8_t variable_called; + uint8_t variable_calling; + uint8_t variable_data; + +#if VARIABLE + called party address + calling party address + data +#endif + +#if OPTIONAL + segmentation + importance +#endif + + uint8_t data[0]; + +} __attribute__((packed)); + + +/* Extended unitdata service (XUDTS) */ +struct sccp_data_ext_unitdata_service { + /* mandantory */ + uint8_t type; + uint8_t return_cause; + uint8_t hop_counter; + + + /* variable */ + uint8_t variable_called; + uint8_t variable_calling; + uint8_t variable_data; + +#if VARIABLE + called party address + calling party address + data +#endif + +#if OPTIONAL + segmentation + importancd +#endif + + uint8_t data[0]; +} __attribute__((packed)); struct sccp_data_it { /* mandatory */ diff --git a/src/sccp.c b/src/sccp.c index ec0f3b7..c14e850 100644 --- a/src/sccp.c +++ b/src/sccp.c @@ -406,37 +406,46 @@ return 0; } -int _sccp_parse_udt(struct msgb *msgb, struct sccp_parse_result *result) +struct udt_offsets { + uint32_t header_size; + uint32_t called_offset; + uint32_t calling_offset; + uint32_t data_offset; +}; + +static int _sccp_parse_unitdata(struct msgb *msgb, struct sccp_parse_result *result, + const struct udt_offsets *offs) { - static const uint32_t header_size = sizeof(struct sccp_data_unitdata); - static const uint32_t called_offset = offsetof(struct sccp_data_unitdata, variable_called); - static const uint32_t calling_offset = offsetof(struct sccp_data_unitdata, variable_calling); - static const uint32_t data_offset = offsetof(struct sccp_data_unitdata, variable_data); + uint8_t variable_called; + uint8_t variable_calling; + uint8_t variable_data; - struct sccp_data_unitdata *udt = (struct sccp_data_unitdata *)msgb->l2h; - - if (msgb_l2len(msgb) < header_size) { + if (msgb_l2len(msgb) < offs->header_size) { LOGP(DSCCP, LOGL_ERROR, "msgb < header_size %u %u\n", - msgb_l2len(msgb), header_size); + msgb_l2len(msgb), offs->header_size); return -1; } + variable_called = msgb->l2h[offs->called_offset]; + variable_calling = msgb->l2h[offs->calling_offset]; + variable_data = msgb->l2h[offs->data_offset]; + /* copy out the calling and called address. Add the off */ - if (copy_address(&result->called, called_offset + udt->variable_called, msgb) != 0) + if (copy_address(&result->called, offs->called_offset + variable_called, msgb) != 0) return -1; - if (copy_address(&result->calling, calling_offset + udt->variable_calling, msgb) != 0) + if (copy_address(&result->calling, offs->calling_offset + variable_calling, msgb) != 0) return -1; /* we don't have enough size for the data */ - if (msgb_l2len(msgb) < data_offset + udt->variable_data + 1) { + if (msgb_l2len(msgb) < offs->data_offset + variable_data + 1) { LOGP(DSCCP, LOGL_ERROR, "msgb < header + offset %u %u %u\n", - msgb_l2len(msgb), header_size, udt->variable_data); + msgb_l2len(msgb), offs->header_size, variable_data); return -1; } - msgb->l3h = &udt->data[udt->variable_data]; + msgb->l3h = &msgb->l2h[offs->data_offset + variable_data + 1]; result->data_len = msgb_l3len(msgb); if (msgb_l3len(msgb) < msgb->l3h[-1]) { @@ -448,6 +457,30 @@ return 0; } +int _sccp_parse_udt(struct msgb *msgb, struct sccp_parse_result *result) +{ + static const struct udt_offsets offsets = { + .header_size = sizeof(struct sccp_data_unitdata), + .called_offset = offsetof(struct sccp_data_unitdata, variable_called), + .calling_offset = offsetof(struct sccp_data_unitdata, variable_calling), + .data_offset = offsetof(struct sccp_data_unitdata, variable_data), + }; + + return _sccp_parse_unitdata(msgb, result, &offsets); +} + +static int _sccp_parse_xudt(struct msgb *msgb, struct sccp_parse_result *result) +{ + static const struct udt_offsets offsets = { + .header_size = sizeof(struct sccp_data_ext_unitdata), + .called_offset = offsetof(struct sccp_data_ext_unitdata, variable_called), + .calling_offset = offsetof(struct sccp_data_ext_unitdata, variable_calling), + .data_offset = offsetof(struct sccp_data_ext_unitdata, variable_data), + }; + + return _sccp_parse_unitdata(msgb, result, &offsets); +} + static int _sccp_parse_it(struct msgb *msgb, struct sccp_parse_result *result) { static const uint32_t header_size = sizeof(struct sccp_data_it); @@ -1457,6 +1490,9 @@ case SCCP_MSG_TYPE_UDT: return _sccp_parse_udt(msg, result); break; + case SCCP_MSG_TYPE_XUDT: + return _sccp_parse_xudt(msg, result); + break; case SCCP_MSG_TYPE_IT: return _sccp_parse_it(msg, result); break; diff --git a/tests/sccp/sccp_test.c b/tests/sccp/sccp_test.c index ba9ff7a..29f343f 100644 --- a/tests/sccp/sccp_test.c +++ b/tests/sccp/sccp_test.c @@ -312,6 +312,32 @@ 0x0f, 0x0c, 0x04, 0x00, 0x00, }; +static const uint8_t xudt_test_src_gt[] = { +0x00, 0x11, 0x04, 0x26, 0x18, 0x01, 0x30, 0x08, +0x01 +}; + +static const uint8_t xudt_test_dst_gt[] = { +0x00, 0x61, 0x04, 0x15, 0x10, 0x80, 0x21, 0x35, +0x98, 0x55, 0x08 +}; + +static const uint8_t xudt_test[] = { +0x11, 0x81, 0x02, 0x04, 0x11, 0x1C, 0x00, 0x0D, +0x52, 0x06, 0x00, 0x61, 0x04, 0x15, 0x10, 0x80, +0x21, 0x35, 0x98, 0x55, 0x08, 0x0B, 0x12, 0x95, +0x00, 0x11, 0x04, 0x26, 0x18, 0x01, 0x30, 0x08, +0x01, 0x44, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, +0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, +0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, +0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, +0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, +0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, +0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, +0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, +0x3F, 0x40, 0x41, 0x42, 0x43, 0x44 +}; + static const struct sccp_parse_header_result parse_result[] = { { .msg_type = SCCP_MSG_TYPE_IT, @@ -362,6 +388,18 @@ .src_gti_data = tcap_global_src_gti, .src_gti_len = 9, }, + { + .msg_type = SCCP_MSG_TYPE_XUDT, + .input = xudt_test, + .input_len = sizeof(xudt_test), + .wanted_len = 68, + .dst_ssn = 6, + .dst_gti_data = xudt_test_dst_gt, + .dst_gti_len = 11, + .src_ssn = 149, + .src_gti_data = xudt_test_src_gt, + .src_gti_len = 9, + }, }; -- To view, visit https://gerrit.osmocom.org/13838 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I45a7447cc1be432fff34849e0e35abc0410cf153 Gerrit-Change-Number: 13838 Gerrit-PatchSet: 1 Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 16:54:10 2019 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 7 May 2019 16:54:10 +0000 Subject: Change in libosmo-sccp[master]: udts/xudts: Attempt to implement unitdata service parsing In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. ( https://gerrit.osmocom.org/13839 ) Change subject: udts/xudts: Attempt to implement unitdata service parsing ...................................................................... udts/xudts: Attempt to implement unitdata service parsing Use the new offset based parsing to extract GT and data from the UDTS/XUDTS message as well. Test vectors are missing right now. Change-Id: Id0a3a291d8bad3f8c9621e6c97d4ea0b8bbe6035 --- M src/sccp.c 1 file changed, 30 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/sccp.c b/src/sccp.c index c14e850..cbc63b1 100644 --- a/src/sccp.c +++ b/src/sccp.c @@ -469,6 +469,18 @@ return _sccp_parse_unitdata(msgb, result, &offsets); } +int _sccp_parse_udts(struct msgb *msgb, struct sccp_parse_result *result) +{ + static const struct udt_offsets offsets = { + .header_size = sizeof(struct sccp_data_unitdata_service), + .called_offset = offsetof(struct sccp_data_unitdata_service, variable_called), + .calling_offset = offsetof(struct sccp_data_unitdata_service, variable_calling), + .data_offset = offsetof(struct sccp_data_unitdata_service, variable_data), + }; + + return _sccp_parse_unitdata(msgb, result, &offsets); +} + static int _sccp_parse_xudt(struct msgb *msgb, struct sccp_parse_result *result) { static const struct udt_offsets offsets = { @@ -481,6 +493,18 @@ return _sccp_parse_unitdata(msgb, result, &offsets); } +static int _sccp_parse_xudts(struct msgb *msgb, struct sccp_parse_result *result) +{ + static const struct udt_offsets offsets = { + .header_size = sizeof(struct sccp_data_ext_unitdata_service), + .called_offset = offsetof(struct sccp_data_ext_unitdata_service, variable_called), + .calling_offset = offsetof(struct sccp_data_ext_unitdata_service, variable_calling), + .data_offset = offsetof(struct sccp_data_ext_unitdata_service, variable_data), + }; + + return _sccp_parse_unitdata(msgb, result, &offsets); +} + static int _sccp_parse_it(struct msgb *msgb, struct sccp_parse_result *result) { static const uint32_t header_size = sizeof(struct sccp_data_it); @@ -1490,9 +1514,15 @@ case SCCP_MSG_TYPE_UDT: return _sccp_parse_udt(msg, result); break; + case SCCP_MSG_TYPE_UDTS: + return _sccp_parse_udts(msg, result); + break; case SCCP_MSG_TYPE_XUDT: return _sccp_parse_xudt(msg, result); break; + case SCCP_MSG_TYPE_XUDTS: + return _sccp_parse_xudts(msg, result); + break; case SCCP_MSG_TYPE_IT: return _sccp_parse_it(msg, result); break; -- To view, visit https://gerrit.osmocom.org/13839 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id0a3a291d8bad3f8c9621e6c97d4ea0b8bbe6035 Gerrit-Change-Number: 13839 Gerrit-PatchSet: 1 Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 16:54:26 2019 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 7 May 2019 16:54:26 +0000 Subject: Change in osmo-gsm-tester[master]: virtual: Move the starter code into the starter module In-Reply-To: References: Message-ID: Holger Freyther has posted comments on this change. ( https://gerrit.osmocom.org/13824 ) Change subject: virtual: Move the starter code into the starter module ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13824 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0cd5705eaf53a14523feacece9446331a53b3e59 Gerrit-Change-Number: 13824 Gerrit-PatchSet: 2 Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 07 May 2019 16:54:26 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 16:54:57 2019 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 7 May 2019 16:54:57 +0000 Subject: Change in osmo-gsm-tester[master]: virtual: Move the starter code into the starter module In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. ( https://gerrit.osmocom.org/13824 ) Change subject: virtual: Move the starter code into the starter module ...................................................................... virtual: Move the starter code into the starter module There is nothing location update specific in the file. Let's move it into the starter file. Change-Id: I0cd5705eaf53a14523feacece9446331a53b3e59 --- M src/osmo_gsm_tester/ms_driver.py M src/osmo_ms_driver/__main__.py M src/osmo_ms_driver/location_update_test.py M src/osmo_ms_driver/starter.py 4 files changed, 167 insertions(+), 162 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/osmo_gsm_tester/ms_driver.py b/src/osmo_gsm_tester/ms_driver.py index 329662a..d35f02e 100644 --- a/src/osmo_gsm_tester/ms_driver.py +++ b/src/osmo_gsm_tester/ms_driver.py @@ -20,8 +20,8 @@ from osmo_ms_driver.cdf import cdfs from osmo_ms_driver.event_server import EventServer from osmo_ms_driver.simple_loop import SimpleLoop -from osmo_ms_driver.location_update_test import MassUpdateLocationTest, MobileTestStarter -from osmo_ms_driver.starter import BinaryOptions +from osmo_ms_driver.location_update_test import MassUpdateLocationTest +from osmo_ms_driver.starter import BinaryOptions, MobileTestStarter import os.path import shutil diff --git a/src/osmo_ms_driver/__main__.py b/src/osmo_ms_driver/__main__.py index 642002f..c3da49d 100644 --- a/src/osmo_ms_driver/__main__.py +++ b/src/osmo_ms_driver/__main__.py @@ -18,9 +18,9 @@ # Local modules from .event_server import EventServer from .simple_loop import SimpleLoop -from .location_update_test import MassUpdateLocationTest, MobileTestStarter +from .location_update_test import MassUpdateLocationTest from .cdf import cdfs -from .starter import BinaryOptions +from .starter import BinaryOptions, MobileTestStarter from .test_support import imsi_ki_gen from osmo_gsm_tester import log, util from osmo_gsm_tester import ms_osmo_mobile diff --git a/src/osmo_ms_driver/location_update_test.py b/src/osmo_ms_driver/location_update_test.py index efb161e..7a58b93 100644 --- a/src/osmo_ms_driver/location_update_test.py +++ b/src/osmo_ms_driver/location_update_test.py @@ -16,10 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from copy import copy from osmo_gsm_tester import log -from .starter import OsmoVirtPhy, OsmoMobile -from .test_support import ResultStore from datetime import timedelta @@ -137,158 +134,3 @@ res.append(result) return res -class MobileTestStarter(log.Origin): - """ - A test to launch a configurable amount of MS and make them - execute a Location Updating Procedure. - - Configure the number of MS to be tested and a function that - decides how quickly to start them and a timeout. - """ - - TEMPLATE_LUA = "osmo-mobile.lua" - TEMPLATE_CFG = "osmo-mobile.cfg" - - def __init__(self, name, options, cdf_function, - event_server, tmp_dir, results, suite_run=None): - super().__init__(log.C_RUN, name) - self._binary_options = options - self._cdf = cdf_function - self._suite_run = suite_run - self._tmp_dir = tmp_dir - self._event_server = event_server - self._results = results - self._unstarted = [] - self._mobiles = [] - self._phys = [] - - self._started = [] - self._subscribers = [] - - self._event_server.register(self.handle_msg) - - def subscriber_add(self, subscriber): - """ - Adds a subscriber to the list of subscribers. - - Must be called before starting the testcase. - """ - self._subscribers.append(subscriber) - - def configure_tasks(self): - """Sets up the test run.""" - - self._cdf.set_target(len(self._subscribers)) - self._outstanding = len(self._subscribers) - for i in range(0, self._outstanding): - ms_name = "%.5d" % i - - phy = OsmoVirtPhy(self._binary_options.virtphy, - self._binary_options.env, - ms_name, self._tmp_dir) - self._phys.append(phy) - - launcher = OsmoMobile(self._binary_options.mobile, - self._binary_options.env, - ms_name, self._tmp_dir, self.TEMPLATE_LUA, - self.TEMPLATE_CFG, self._subscribers[i], - phy.phy_filename(), - self._event_server.server_path()) - self._results[ms_name] = ResultStore(ms_name) - self._mobiles.append(launcher) - self._unstarted = copy(self._mobiles) - - def pre_launch(self, loop): - """ - We need the virtphy's be ready when the lua script in the - mobile comes and kicks-off the test. In lua we don't seem to - be able to just stat/check if a file/socket exists so we need - to do this from here. - """ - self.log("Pre-launching all virtphy's") - for phy in self._phys: - phy.start(loop, self._suite_run) - - self.log("Checking if sockets are in the filesystem") - for phy in self._phys: - phy.verify_ready() - - def prepare(self, loop): - self.log("Starting testcase") - - self.configure_tasks() - self.pre_launch(loop) - - self._start_time = time.clock_gettime(time.CLOCK_MONOTONIC) - self._end_time = self._start_time + \ - self._cdf.duration().total_seconds() + \ - timedelta(seconds=120).total_seconds() - - self._started = [] - self._too_slow = 0 - - def step_once(self, loop, current_time): - if len(self._unstarted) <= 0: - return current_time, None - - step_size = self._cdf.step_size().total_seconds() - - # Start - self._cdf.step_once() - - # Check for timeout - # start pending MS - while len(self._started) < self._cdf.current_scaled_value() and len(self._unstarted) > 0: - ms = self._unstarted.pop(0) - ms.start(loop, self._suite_run) - launch_time = time.clock_gettime(time.CLOCK_MONOTONIC) - self._results[ms.name_number()].set_launch_time(launch_time) - self._started.append(ms) - - now_time = time.clock_gettime(time.CLOCK_MONOTONIC) - sleep_time = (current_time + step_size) - now_time - if sleep_time <= 0: - self.log("Starting too slowly. Moving on", - target=(current_time + step_size), now=now_time, sleep=sleep_time) - self._too_slow += 1 - sleep_time = 0 - - if len(self._unstarted) == 0: - end_time = time.clock_gettime(time.CLOCK_MONOTONIC) - self.log("All started...", too_slow=self._too_slow, duration=end_time - self._start_time) - return current_time, None - - return current_time + step_size, sleep_time - - def start_all(self, loop, test_duration): - """ - Starts all processes according to the schedule set by the CDF. - """ - self.prepare(loop) - - self._to_complete_time = self._start_time + test_duration.total_seconds() - tick_time = self._start_time - - while len(self._unstarted) > 0: - tick_time, sleep_time = self.step_once(loop, tick_time) - now_time = time.clock_gettime(time.CLOCK_MONOTONIC) - if sleep_time is None: - sleep_time = self._to_complete_time - now_time - if sleep_time < 0: - break - loop.schedule_timeout(sleep_time) - loop.select() - return self._to_complete_time - - def stop_all(self): - for launcher in self._started: - launcher.terminate() - - def handle_msg(self, _data, addr, time): - data = json.loads(_data.decode()) - - if data['type'] == 'register': - ms = self._results[data['ms']] - ms.set_start_time(time) - launch_delay = ms.start_time() - ms.launch_time() - self.log("MS start registered ", ms=ms, at=time, delay=launch_delay) diff --git a/src/osmo_ms_driver/starter.py b/src/osmo_ms_driver/starter.py index 20977d6..61d3bb0 100644 --- a/src/osmo_ms_driver/starter.py +++ b/src/osmo_ms_driver/starter.py @@ -18,7 +18,13 @@ from osmo_gsm_tester import log, process, template +from .test_support import ResultStore + +from copy import copy +from datetime import timedelta + import collections +import json import os import os.path import time @@ -133,3 +139,160 @@ """Clean up things.""" if self._omob_proc: self._omob_proc.terminate() + + +class MobileTestStarter(log.Origin): + """ + A test to launch a configurable amount of MS and make them + execute a Location Updating Procedure. + + Configure the number of MS to be tested and a function that + decides how quickly to start them and a timeout. + """ + + TEMPLATE_LUA = "osmo-mobile.lua" + TEMPLATE_CFG = "osmo-mobile.cfg" + + def __init__(self, name, options, cdf_function, + event_server, tmp_dir, results, suite_run=None): + super().__init__(log.C_RUN, name) + self._binary_options = options + self._cdf = cdf_function + self._suite_run = suite_run + self._tmp_dir = tmp_dir + self._event_server = event_server + self._results = results + self._unstarted = [] + self._mobiles = [] + self._phys = [] + + self._started = [] + self._subscribers = [] + + self._event_server.register(self.handle_msg) + + def subscriber_add(self, subscriber): + """ + Adds a subscriber to the list of subscribers. + + Must be called before starting the testcase. + """ + self._subscribers.append(subscriber) + + def configure_tasks(self): + """Sets up the test run.""" + + self._cdf.set_target(len(self._subscribers)) + self._outstanding = len(self._subscribers) + for i in range(0, self._outstanding): + ms_name = "%.5d" % i + + phy = OsmoVirtPhy(self._binary_options.virtphy, + self._binary_options.env, + ms_name, self._tmp_dir) + self._phys.append(phy) + + launcher = OsmoMobile(self._binary_options.mobile, + self._binary_options.env, + ms_name, self._tmp_dir, self.TEMPLATE_LUA, + self.TEMPLATE_CFG, self._subscribers[i], + phy.phy_filename(), + self._event_server.server_path()) + self._results[ms_name] = ResultStore(ms_name) + self._mobiles.append(launcher) + self._unstarted = copy(self._mobiles) + + def pre_launch(self, loop): + """ + We need the virtphy's be ready when the lua script in the + mobile comes and kicks-off the test. In lua we don't seem to + be able to just stat/check if a file/socket exists so we need + to do this from here. + """ + self.log("Pre-launching all virtphy's") + for phy in self._phys: + phy.start(loop, self._suite_run) + + self.log("Checking if sockets are in the filesystem") + for phy in self._phys: + phy.verify_ready() + + def prepare(self, loop): + self.log("Starting testcase") + + self.configure_tasks() + self.pre_launch(loop) + + self._start_time = time.clock_gettime(time.CLOCK_MONOTONIC) + self._end_time = self._start_time + \ + self._cdf.duration().total_seconds() + \ + timedelta(seconds=120).total_seconds() + + self._started = [] + self._too_slow = 0 + + def step_once(self, loop, current_time): + if len(self._unstarted) <= 0: + return current_time, None + + step_size = self._cdf.step_size().total_seconds() + + # Start + self._cdf.step_once() + + # Check for timeout + # start pending MS + while len(self._started) < self._cdf.current_scaled_value() and len(self._unstarted) > 0: + ms = self._unstarted.pop(0) + ms.start(loop, self._suite_run) + launch_time = time.clock_gettime(time.CLOCK_MONOTONIC) + self._results[ms.name_number()].set_launch_time(launch_time) + self._started.append(ms) + + now_time = time.clock_gettime(time.CLOCK_MONOTONIC) + sleep_time = (current_time + step_size) - now_time + if sleep_time <= 0: + self.log("Starting too slowly. Moving on", + target=(current_time + step_size), now=now_time, sleep=sleep_time) + self._too_slow += 1 + sleep_time = 0 + + if len(self._unstarted) == 0: + end_time = time.clock_gettime(time.CLOCK_MONOTONIC) + self.log("All started...", too_slow=self._too_slow, duration=end_time - self._start_time) + return current_time, None + + return current_time + step_size, sleep_time + + def start_all(self, loop, test_duration): + """ + Starts all processes according to the schedule set by the CDF. + """ + self.prepare(loop) + + self._to_complete_time = self._start_time + test_duration.total_seconds() + tick_time = self._start_time + + while len(self._unstarted) > 0: + tick_time, sleep_time = self.step_once(loop, tick_time) + now_time = time.clock_gettime(time.CLOCK_MONOTONIC) + if sleep_time is None: + sleep_time = self._to_complete_time - now_time + if sleep_time < 0: + break + loop.schedule_timeout(sleep_time) + loop.select() + return self._to_complete_time + + def stop_all(self): + for launcher in self._started: + launcher.terminate() + + def handle_msg(self, _data, addr, time): + data = json.loads(_data.decode()) + + if data['type'] == 'register': + ms = self._results[data['ms']] + ms.set_start_time(time) + launch_delay = ms.start_time() - ms.launch_time() + self.log("MS start registered ", ms=ms, at=time, delay=launch_delay) -- To view, visit https://gerrit.osmocom.org/13824 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I0cd5705eaf53a14523feacece9446331a53b3e59 Gerrit-Change-Number: 13824 Gerrit-PatchSet: 2 Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 16:55:26 2019 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 7 May 2019 16:55:26 +0000 Subject: Change in osmo-gsm-tester[master]: virtual: Introduce a base class for test cases In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. ( https://gerrit.osmocom.org/13825 ) Change subject: virtual: Introduce a base class for test cases ...................................................................... virtual: Introduce a base class for test cases Introduce a base class with the intended life cycle and use it. Change-Id: I97968fb02436d5ac8248fc8020539e1af547b030 --- M src/osmo_gsm_tester/ms_driver.py M src/osmo_ms_driver/location_update_test.py M src/osmo_ms_driver/test_support.py 3 files changed, 38 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified Pau Espin Pedrol: Looks good to me, approved diff --git a/src/osmo_gsm_tester/ms_driver.py b/src/osmo_gsm_tester/ms_driver.py index d35f02e..dddedf7 100644 --- a/src/osmo_gsm_tester/ms_driver.py +++ b/src/osmo_gsm_tester/ms_driver.py @@ -114,7 +114,9 @@ """ if not self._configured: self.configure() + self._test_case.before_start() deadline = self._starter.start_all(self._loop, self._test_duration) + self._test_case.after_start() self._test_case.wait_for_test(self._loop, deadline) def print_stats(self): diff --git a/src/osmo_ms_driver/location_update_test.py b/src/osmo_ms_driver/location_update_test.py index 7a58b93..1a33f09 100644 --- a/src/osmo_ms_driver/location_update_test.py +++ b/src/osmo_ms_driver/location_update_test.py @@ -16,10 +16,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from osmo_gsm_tester import log - from datetime import timedelta +from .test_support import TestBase + import collections import json import time @@ -55,12 +55,10 @@ LUStats = collections.namedtuple("LUStats", ["num_attempted", "num_completed", "min_latency", "max_latency"]) -class MassUpdateLocationTest(log.Origin): +class MassUpdateLocationTest(TestBase): def __init__(self, name, event_server, results): - super().__init__(log.C_RUN, name) - self._event_server = event_server + super().__init__(name, event_server, results) self._event_server.register(self.handle_msg) - self._results = results def configure(self, num_subscribers): self._num_subscribers = num_subscribers @@ -77,12 +75,12 @@ set_lu_time(ms, time) self.log("MS performed LU ", ms=ms, at=time, lu_delay=lu_delay(ms)) - def all_completed(self): + def has_completed(self): return self._outstanding == 0 def wait_for_test(self, loop, deadline): """Waits up to the absolute deadline for the test to complete.""" - while not self.all_completed(): + while not self.has_completed(): now_time = time.clock_gettime(time.CLOCK_MONOTONIC) sleep_time = deadline - now_time if sleep_time < 0: diff --git a/src/osmo_ms_driver/test_support.py b/src/osmo_ms_driver/test_support.py index 670d795..cbfd444 100644 --- a/src/osmo_ms_driver/test_support.py +++ b/src/osmo_ms_driver/test_support.py @@ -15,6 +15,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +from abc import ABCMeta from osmo_gsm_tester import log def imsi_ki_gen(): @@ -63,3 +64,32 @@ def has_result(self, key): """Returns true if there is a value for the key.""" return self._results.get(key) is not None + + +class TestBase(log.Origin, metaclass=ABCMeta): + """Base class for all mass test cases.""" + + def __init__(self, name, event_server, results): + super().__init__(log.C_RUN, name) + self._event_server = event_server + self._results = results + + def configure(self, num_subscribers): + """Configures the test given the (number) of subscribers.""" + pass + + def before_start(self): + """Prepares the test for starting.""" + pass + + def after_start(self): + """Finishes the test after starting.""" + pass + + def has_completed(self): + """Returns true if the test has completed.""" + pass + + def print_stats(self): + """Prints statistics/results of the test.""" + pass -- To view, visit https://gerrit.osmocom.org/13825 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I97968fb02436d5ac8248fc8020539e1af547b030 Gerrit-Change-Number: 13825 Gerrit-PatchSet: 2 Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 17:10:17 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 7 May 2019 17:10:17 +0000 Subject: =?UTF-8?Q?Change_in_osmo-msc=5Bpespin/release-1=2E4=2E0=5D=3A_Bump_version=3A_1=2E3=2E1=2E39-83e31-dirty_=E2=86=92_1=2E4=2E0?= In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/13903 ) Change subject: Bump version: 1.3.1.39-83e31-dirty ? 1.4.0 ...................................................................... Bump version: 1.3.1.39-83e31-dirty ? 1.4.0 Change-Id: I66ecb2ed3db965cdfe956a85a1b52cd0c069d352 --- M configure.ac M debian/changelog 2 files changed, 63 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index f8787cf..4b8d1f7 100644 --- a/configure.ac +++ b/configure.ac @@ -35,10 +35,10 @@ ]) -PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.0.0) -PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.0.0) -PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.0.0) -PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.0.0) +PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.1.0) +PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.1.0) +PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.1.0) +PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.1.0) PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.6.0) PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.4.0) PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 1.0.0) diff --git a/debian/changelog b/debian/changelog index 8aec381..aaf7c91 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,62 @@ +osmo-msc (1.4.0) unstable; urgency=medium + + [ Max ] + * Handle LCLS-NOTIFICATION message from BSS + * Various logging fixes + * VLR tests: use msgb_eq_data_print() for comparison + * transaction: drop meaningless ti_flag of trans_assign_trans_id() + * transaction: clarify magic 0xff transaction ID + + [ Vadim Yanitskiy ] + * transaction.c: cosmetic: use 'default' branch in trans_free() + * libmsc/ran_conn.c: cosmetic: use tabs instead of N * 8 spaces + * transaction: change arguments of trans_find_by_sm_rp_mr() + * libmsc/gsm_04_11.c: also assign SM-RP-MR to MO transactions + * libmsc/gsm_04_11.c: introduce and use gsm411_assign_sm_rp_mr() + * libmsc/gsm_04_80.c: use gsm0480_create_release_complete() + * libmsc/gsm_04_80.c: add msc_send_ussd_release_complete_cause() + * libmsc/osmo_msc.c: move connection ref-counting code to 'ran_conn.c' + * transaction: fix description of trans_assign_trans_id() + * transaction.h: use #pragma once as include guard + * libmsc/gsm_09_11.c: implement guard timer for NCSS sessions + * libmsc/ran_conn.c: add missing 'break' to OSMO_RAT_EUTRAN_SGS + * libmsc/sgs_iface.c: fix SGS_STATE_NS11 counter reference + * libmsc/sgs_vty.c: always write server address and VLR name + * libmsc/msc_vty.c: drop dead comparison against null + + [ Harald Welte ] + * Add SGs Interface + * debian: depend on libsctp-dev + * configure.ac: Check for libsctp + * a_iface: Centralize/wrap BSSAP / N-DATA transmission + * a_iface: use 'const' qualifier for ran_conn whenever possible + * a_iface: Fix hexdumping of N-DATA.req + * a_iface: OSMO_ASSERT() if we ever want to send BSSAP with invalid length + + [ Philipp Maier ] + * a_iface: Include CSFB Indication into BSSMAP CLEAR COMMAND + * silent_call: use osmo_strlcpy() instead of strncpy() + * msc_vty: add missing header file + + [ Oliver Smith ] + * debian: depend on libdbd-sqlite3 + + [ Keith ] + * Don't deliver alert notifications to ESME not yet bound. + + [ Neels Hofmeyr ] + * use only accepted ran_conns for new transactions + * gsm_04_11_gsup.c: drop unused conn lookup + * SMS queue: properly log failed attempts number + * vty: add cmd subscriber ID sms delete-all + * vlr_subscr_name(): use OSMO_STRBUF + + [ Sylvain Munaut ] + * libmsc: Allow different channel types to be requested as silent calls + * libvlr: Allow 2G auth tuples to be re-used without going through AUTH + + -- Pau Espin Pedrol Tue, 07 May 2019 18:45:05 +0200 + osmo-msc (1.3.1) unstable; urgency=medium [ Neels Hofmeyr ] -- To view, visit https://gerrit.osmocom.org/13903 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: pespin/release-1.4.0 Gerrit-MessageType: merged Gerrit-Change-Id: I66ecb2ed3db965cdfe956a85a1b52cd0c069d352 Gerrit-Change-Number: 13903 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 17:47:15 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 7 May 2019 17:47:15 +0000 Subject: Change in osmo-hlr[master]: hlr.c: fix: also store the session state in read_cb_forward() In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/13897 ) Change subject: hlr.c: fix: also store the session state in read_cb_forward() ...................................................................... hlr.c: fix: also store the session state in read_cb_forward() If the session state is not set (OSMO_GSUP_SESSION_STATE_NONE), osmo_gsup_encode() would omit the OSMO_GSUP_SESSION_ID_IE. Fix for Change-Id: Ia4f345abc877baaf0a8f73b8988e6514d9589bf5 Change-Id: Idcd209a59d1ee5230104f3101740140d366b0646 --- M src/hlr.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/hlr.c b/src/hlr.c index 8078db0..38422c8 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -466,6 +466,7 @@ gsup_err->destination_name = talloc_memdup(gsup_err, gsup->destination_name, gsup->destination_name_len); gsup_err->destination_name_len = gsup->destination_name_len; gsup_err->message_type = OSMO_GSUP_MSGT_E_ROUTING_ERROR; + gsup_err->session_state = gsup->session_state; gsup_err->session_id = gsup->session_id; gsup_err->source_name = talloc_memdup(gsup_err, gsup->source_name, gsup->source_name_len); gsup_err->source_name_len = gsup->source_name_len; -- To view, visit https://gerrit.osmocom.org/13897 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Idcd209a59d1ee5230104f3101740140d366b0646 Gerrit-Change-Number: 13897 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 17:47:16 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 7 May 2019 17:47:16 +0000 Subject: Change in osmo-hlr[master]: hlr.c: fix: properly print the original message type in read_cb_forwa... In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/13898 ) Change subject: hlr.c: fix: properly print the original message type in read_cb_forward() ...................................................................... hlr.c: fix: properly print the original message type in read_cb_forward() Printing 'OSMO_GSUP_MSGT_E_ROUTING_ERROR' in routing error messages instead of the original message type may be confusing. Let's store the original message type, and change just before sending. Fix for Change-Id: Ia4f345abc877baaf0a8f73b8988e6514d9589bf5 Change-Id: Ic1db1e089fc0f8e03653a9f05058e95d2adaee39 --- M src/hlr.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Neels Hofmeyr: Looks good to me, approved diff --git a/src/hlr.c b/src/hlr.c index 38422c8..3df700a 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -465,7 +465,7 @@ gsup_err->message_class = gsup->message_class; gsup_err->destination_name = talloc_memdup(gsup_err, gsup->destination_name, gsup->destination_name_len); gsup_err->destination_name_len = gsup->destination_name_len; - gsup_err->message_type = OSMO_GSUP_MSGT_E_ROUTING_ERROR; + gsup_err->message_type = gsup->message_type; gsup_err->session_state = gsup->session_state; gsup_err->session_id = gsup->session_id; gsup_err->source_name = talloc_memdup(gsup_err, gsup->source_name, gsup->source_name_len); @@ -508,6 +508,7 @@ if (ret) { struct msgb *msg_err = msgb_alloc_headroom(1024+16, 16, "GSUP forward ERR response"); OSMO_ASSERT(msg_err); + gsup_err->message_type = OSMO_GSUP_MSGT_E_ROUTING_ERROR; osmo_gsup_encode(msg_err, gsup_err); LOGP_GSUP_FWD(gsup_err, LOGL_NOTICE, "Tx %s\n", osmo_gsup_message_type_name(gsup_err->message_type)); osmo_gsup_conn_send(conn, msg_err); -- To view, visit https://gerrit.osmocom.org/13898 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ic1db1e089fc0f8e03653a9f05058e95d2adaee39 Gerrit-Change-Number: 13898 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 17:47:16 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 7 May 2019 17:47:16 +0000 Subject: Change in osmo-hlr[master]: hlr.c: check the presence of msgb->l2h in read_cb() In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/13899 ) Change subject: hlr.c: check the presence of msgb->l2h in read_cb() ...................................................................... hlr.c: check the presence of msgb->l2h in read_cb() Checking the presence of msgb->l2h in read_cb_forward() doesn't make sense, since in read_cb() we pass it to osmo_gsup_decode(). Let's rather do this before calling osmo_gsup_decode(). Fix for Change-Id: Ia4f345abc877baaf0a8f73b8988e6514d9589bf5 Change-Id: I69a3d31aacbbb1abef3d83e42e46c899fe2f914b --- M src/hlr.c 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved Neels Hofmeyr: Looks good to me, approved diff --git a/src/hlr.c b/src/hlr.c index 3df700a..84daa47 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -483,11 +483,6 @@ goto end; } - if (!msgb_l2(msg) || !msgb_l2len(msg)) { - LOGP_GSUP_FWD(gsup, LOGL_ERROR, "missing or empty l2 data\n"); - goto end; - } - /* Forward message without re-encoding (so we don't remove unknown IEs) */ LOGP_GSUP_FWD(gsup, LOGL_INFO, "checks passed, forwarding\n"); @@ -524,10 +519,15 @@ static struct osmo_gsup_message gsup; int rc; + if (!msgb_l2(msg) || !msgb_l2len(msg)) { + LOGP(DMAIN, LOGL_ERROR, "missing or empty L2 data\n"); + return -EINVAL; /* FIXME: msgb_free(msg); */ + } + rc = osmo_gsup_decode(msgb_l2(msg), msgb_l2len(msg), &gsup); if (rc < 0) { LOGP(DMAIN, LOGL_ERROR, "error in GSUP decode: %d\n", rc); - return rc; + return rc; /* FIXME: msgb_free(msg); */ } /* 3GPP TS 23.003 Section 2.2 clearly states that an IMSI with less than 5 -- To view, visit https://gerrit.osmocom.org/13899 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I69a3d31aacbbb1abef3d83e42e46c899fe2f914b Gerrit-Change-Number: 13899 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 17:47:17 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 7 May 2019 17:47:17 +0000 Subject: Change in osmo-hlr[master]: hlr.c: fix possible msgb memleaks in read_cb() In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/13900 ) Change subject: hlr.c: fix possible msgb memleaks in read_cb() ...................................................................... hlr.c: fix possible msgb memleaks in read_cb() Change-Id: I1226eeb24d7657e2782760fab1b49d5581ab53e2 --- M src/hlr.c 1 file changed, 8 insertions(+), 4 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hlr.c b/src/hlr.c index 84daa47..d9ebaf7 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -521,20 +521,24 @@ if (!msgb_l2(msg) || !msgb_l2len(msg)) { LOGP(DMAIN, LOGL_ERROR, "missing or empty L2 data\n"); - return -EINVAL; /* FIXME: msgb_free(msg); */ + msgb_free(msg); + return -EINVAL; } rc = osmo_gsup_decode(msgb_l2(msg), msgb_l2len(msg), &gsup); if (rc < 0) { LOGP(DMAIN, LOGL_ERROR, "error in GSUP decode: %d\n", rc); - return rc; /* FIXME: msgb_free(msg); */ + msgb_free(msg); + return rc; } /* 3GPP TS 23.003 Section 2.2 clearly states that an IMSI with less than 5 * digits is impossible. Even 5 digits is a highly theoretical case */ - if (strlen(gsup.imsi) < 5) { + if (strlen(gsup.imsi) < 5) { /* TODO: move this check to libosmogsm/gsup.c? */ LOGP(DMAIN, LOGL_ERROR, "IMSI too short: %s\n", osmo_quote_str(gsup.imsi, -1)); - return gsup_send_err_reply(conn, gsup.imsi, gsup.message_type, GMM_CAUSE_INV_MAND_INFO); + gsup_send_err_reply(conn, gsup.imsi, gsup.message_type, GMM_CAUSE_INV_MAND_INFO); + msgb_free(msg); + return -EINVAL; } if (gsup.destination_name_len) -- To view, visit https://gerrit.osmocom.org/13900 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I1226eeb24d7657e2782760fab1b49d5581ab53e2 Gerrit-Change-Number: 13900 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 18:00:46 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 7 May 2019 18:00:46 +0000 Subject: Change in osmo-hlr[master]: use new OSMO_IMSI_BUF_SIZE In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13589 ) Change subject: use new OSMO_IMSI_BUF_SIZE ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13589 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8e8fa221e97303df3c6cce96b25d31a53f67b939 Gerrit-Change-Number: 13589 Gerrit-PatchSet: 4 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 07 May 2019 18:00:46 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 18:14:06 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 May 2019 18:14:06 +0000 Subject: Change in osmo-bts[master]: common/oml.c: fix: properly encode NM_ATT_SW_CONFIG In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13709 ) Change subject: common/oml.c: fix: properly encode NM_ATT_SW_CONFIG ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13709 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id26104719891944f3e2151df362bd45bb057a9c5 Gerrit-Change-Number: 13709 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 07 May 2019 18:14:06 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 18:14:07 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 May 2019 18:14:07 +0000 Subject: Change in osmo-bts[master]: common/oml.c: refactor Get Attribute Response message generation In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13708 ) Change subject: common/oml.c: refactor Get Attribute Response message generation ...................................................................... common/oml.c: refactor Get Attribute Response message generation Instead of allocating two transitional buffers (one static, another dynamic), we can use the existing message buffer. Both handle_attrs_bts() and handle_attrs_trx() can put (append) the reported attributes, and push (prepend) non-reported ones as per 3GPP TS 52.021, 9.4.64 "Get Attribute Response Info". Change-Id: I349447a43bce360f59e0c6b435906c65167d158b --- M src/common/oml.c 1 file changed, 54 insertions(+), 68 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/common/oml.c b/src/common/oml.c index 62dea7b..d1db8f4 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -166,92 +166,79 @@ true); } -/* The number of attributes in ?9.4.26 List of Required Attributes is 2 bytes, - but the Count of not-reported attributes from ?9.4.64 is 1 byte */ -static inline uint8_t pack_num_unreported_attr(uint16_t attrs) +/* Handle a list of attributes requested by the BSC, compose + * TRX-specific Get Attribute Response IE as per 9.4.64. */ +static inline int handle_attrs_trx(struct msgb *out_msg, const struct gsm_bts_trx *trx, + const uint8_t *attr, uint16_t attr_len) { - if (attrs > 255) { - LOGP(DOML, LOGL_ERROR, "O&M Get Attributes, Count of not-reported attributes is too big: %u\n", - attrs); - return 255; + uint8_t num_unsupported = 0; + uint8_t *buf; + int i; + + if (!trx) { + LOGP(DOML, LOGL_ERROR, "O&M Get Attributes for unknown TRX\n"); + return -NM_NACK_TRXNR_UNKN; } - return attrs; /* Return number of unhandled attributes */ -} - -/* copy all the attributes accumulated in msg to out and return the total length of out buffer */ -static inline int cleanup_attr_msg(uint8_t *out, int out_offset, struct msgb *msg) -{ - int len = 0; - - out[0] = pack_num_unreported_attr(out_offset - 1); - - if (msg) { - memcpy(out + out_offset, msgb_data(msg), msg->len); - len = msg->len; - msgb_free(msg); - } - - return len + out_offset; -} - -static inline int handle_attrs_trx(uint8_t *out, const struct gsm_bts_trx *trx, const uint8_t *attr, uint16_t attr_len) -{ - uint16_t i, attr_out_index = 1; /* byte 0 is reserved for unsupported attributes counter */ - struct msgb *attr_buf = oml_msgb_alloc(); - - if (!attr_buf) - return -NM_NACK_CANT_PERFORM; for (i = 0; i < attr_len; i++) { - bool processed = false; switch (attr[i]) { case NM_ATT_SW_CONFIG: - if (trx) { - add_trx_attr(attr_buf, trx); - processed = true; - } else - LOGP(DOML, LOGL_ERROR, "O&M Get Attributes [%u], %s is unhandled due to missing TRX.\n", - i, get_value_string(abis_nm_att_names, attr[i])); + add_trx_attr(out_msg, trx); break; default: LOGP(DOML, LOGL_ERROR, "O&M Get Attributes [%u], %s is unsupported by TRX.\n", i, get_value_string(abis_nm_att_names, attr[i])); - } - /* assemble values of supported attributes and list of unsupported ones */ - if (!processed) { - out[attr_out_index] = attr[i]; - attr_out_index++; + /* Push this tag to the list of unsupported attributes */ + buf = msgb_push(out_msg, 1); + *buf = attr[i]; + num_unsupported++; } } - return cleanup_attr_msg(out, attr_out_index, attr_buf); + /* Push the amount of unsupported attributes */ + buf = msgb_push(out_msg, 1); + *buf = num_unsupported; + + return 0; } -static inline int handle_attrs_bts(uint8_t *out, const struct gsm_bts *bts, const uint8_t *attr, uint16_t attr_len) +/* Handle a list of attributes requested by the BSC, compose + * BTS-specific Get Attribute Response IE as per 9.4.64. */ +static inline int handle_attrs_bts(struct msgb *out_msg, const struct gsm_bts *bts, + const uint8_t *attr, uint16_t attr_len) { - uint16_t i, attr_out_index = 1; /* byte 0 is reserved for unsupported attributes counter */ - struct msgb *attr_buf = oml_msgb_alloc(); + uint8_t num_unsupported = 0; + uint8_t *buf; + int i; - if (!attr_buf) - return -NM_NACK_CANT_PERFORM; + if (!bts) { + LOGP(DOML, LOGL_ERROR, "O&M Get Attributes for unknown BTS\n"); + return -NM_NACK_BTSNR_UNKN; + } for (i = 0; i < attr_len; i++) { switch (attr[i]) { case NM_ATT_SW_CONFIG: - add_bts_attrs(attr_buf, bts); + add_bts_attrs(out_msg, bts); break; case NM_ATT_MANUF_ID: - add_bts_feat(attr_buf, bts); + add_bts_feat(out_msg, bts); break; default: LOGP(DOML, LOGL_ERROR, "O&M Get Attributes [%u], %s is unsupported by BTS.\n", i, get_value_string(abis_nm_att_names, attr[i])); - out[attr_out_index] = attr[i]; /* assemble values of supported attributes and list of unsupported ones */ - attr_out_index++; + /* Push this tag to the list of unsupported attributes */ + buf = msgb_push(out_msg, 1); + *buf = attr[i]; + num_unsupported++; } } - return cleanup_attr_msg(out, attr_out_index, attr_buf); + /* Push the amount of unsupported attributes */ + buf = msgb_push(out_msg, 1); + *buf = num_unsupported; + + return 0; } /* send 3GPP TS 52.021 ?8.11.2 Get Attribute Response */ @@ -259,8 +246,7 @@ const uint8_t *attr, uint16_t attr_len) { struct msgb *nmsg = oml_msgb_alloc(); - uint8_t resp[MAX_VERSION_LENGTH * attr_len * 2]; /* heuristic for Attribute Response Info space requirements */ - int len; + int rc; LOGP(DOML, LOGL_INFO, "%s Tx Get Attribute Response\n", get_value_string(abis_nm_obj_class_names, mo->obj_class)); @@ -270,28 +256,28 @@ switch (mo->obj_class) { case NM_OC_BTS: - len = handle_attrs_bts(resp, mo->bts, attr, attr_len); + rc = handle_attrs_bts(nmsg, mo->bts, attr, attr_len); break; case NM_OC_BASEB_TRANSC: - len = handle_attrs_trx(resp, gsm_bts_trx_num(mo->bts, mo->obj_inst.trx_nr), attr, attr_len); + rc = handle_attrs_trx(nmsg, gsm_bts_trx_num(mo->bts, mo->obj_inst.trx_nr), attr, attr_len); break; default: LOGP(DOML, LOGL_ERROR, "Unsupported MO class %s in Get Attribute Response\n", get_value_string(abis_nm_obj_class_names, mo->obj_class)); - len = -NM_NACK_OBJCLASS_NOTSUPP; + rc = -NM_NACK_OBJCLASS_NOTSUPP; } - if (len < 0) { - LOGP(DOML, LOGL_ERROR, "Tx Get Attribute Response FAILED with %d\n", len); + if (rc < 0) { + LOGP(DOML, LOGL_ERROR, "Tx Get Attribute Response FAILED with rc=%d\n", rc); msgb_free(nmsg); - return len; + return rc; } - /* ?9.4.64 Get Attribute Response Info */ - msgb_tl16v_put(nmsg, NM_ATT_GET_ARI, len, resp); + /* Push Get Attribute Response Info TL (actually TV where V is L) */ + msgb_tv16_push(nmsg, NM_ATT_GET_ARI, msgb_length(nmsg)); - len = oml_mo_send_msg(mo, nmsg, NM_MT_GET_ATTR_RESP); - return (len < 0) ? -NM_NACK_CANT_PERFORM : len; + rc = oml_mo_send_msg(mo, nmsg, NM_MT_GET_ATTR_RESP); + return (rc < 0) ? -NM_NACK_CANT_PERFORM : rc; } /* 8.8.1 sending State Changed Event Report */ -- To view, visit https://gerrit.osmocom.org/13708 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I349447a43bce360f59e0c6b435906c65167d158b Gerrit-Change-Number: 13708 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 18:14:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 7 May 2019 18:14:08 +0000 Subject: Change in osmo-bts[master]: common/oml.c: fix: properly encode NM_ATT_SW_CONFIG In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13709 ) Change subject: common/oml.c: fix: properly encode NM_ATT_SW_CONFIG ...................................................................... common/oml.c: fix: properly encode NM_ATT_SW_CONFIG According to 3GPP TS 52.021, sections 9.4.61-62, 'SW Configuration' shall contain a list of 'SW Descriptions' related to the MO. In other words, all 'NM_ATT_SW_DESCR' blobs shall be encapsulated into a single NM_ATT_SW_CONFIG attribute. For some reason, they were not encapsulated properly, so OsmoBSC were unable to parse the 'SW Descriptions'. However, unlike OsmoBSC the old OpenBSC does not expect this encapsulation, thus after this change it will be unable to parse the 'SW Descriptions'. Change-Id: Id26104719891944f3e2151df362bd45bb057a9c5 Related: OS#3938 --- M src/common/oml.c 1 file changed, 33 insertions(+), 6 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/oml.c b/src/common/oml.c index d1db8f4..260dfc4 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -145,11 +145,26 @@ static inline void add_bts_attrs(struct msgb *msg, const struct gsm_bts *bts) { - abis_nm_put_sw_file(msg, "osmobts", PACKAGE_VERSION, true); - abis_nm_put_sw_file(msg, btsatttr2str(BTS_TYPE_VARIANT), btsvariant2str(bts->variant), true); + uint16_t total_len = 0; + uint8_t *len; - if (strlen(bts->sub_model)) - abis_nm_put_sw_file(msg, btsatttr2str(BTS_SUB_MODEL), bts->sub_model, true); + /* Put NM_ATT_SW_CONFIG as per 9.4.61 "SW Configuration". */ + msgb_v_put(msg, NM_ATT_SW_CONFIG); + + /* We don't know the length yet, so we update it later. */ + len = msgb_put(msg, 2); + + total_len += abis_nm_put_sw_file(msg, "osmobts", PACKAGE_VERSION, true); + total_len += abis_nm_put_sw_file(msg, btsatttr2str(BTS_TYPE_VARIANT), + btsvariant2str(bts->variant), true); + + if (strlen(bts->sub_model)) { + total_len += abis_nm_put_sw_file(msg, btsatttr2str(BTS_SUB_MODEL), + bts->sub_model, true); + } + + /* Finally, update the length */ + osmo_store16be(total_len, len); } /* Add BTS features as 3GPP TS 52.021 ?9.4.30 Manufacturer Id */ @@ -161,9 +176,21 @@ static inline void add_trx_attr(struct msgb *msg, const struct gsm_bts_trx *trx) { const struct phy_instance *pinst = trx_phy_instance(trx); + const char *phy_version; + uint16_t total_len; + uint8_t *len; - abis_nm_put_sw_file(msg, btsatttr2str(TRX_PHY_VERSION), pinst && strlen(pinst->version) ? pinst->version : "Unknown", - true); + /* Put NM_ATT_SW_CONFIG as per 9.4.61 "SW Configuration". */ + msgb_v_put(msg, NM_ATT_SW_CONFIG); + + /* We don't know the length yet, so we update it later. */ + len = msgb_put(msg, 2); + + phy_version = pinst && strlen(pinst->version) ? pinst->version : "Unknown"; + total_len = abis_nm_put_sw_file(msg, btsatttr2str(TRX_PHY_VERSION), phy_version, true); + + /* Finally, update the length */ + osmo_store16be(total_len, len); } /* Handle a list of attributes requested by the BSC, compose -- To view, visit https://gerrit.osmocom.org/13709 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id26104719891944f3e2151df362bd45bb057a9c5 Gerrit-Change-Number: 13709 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 18:53:47 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 7 May 2019 18:53:47 +0000 Subject: Change in osmo-hlr[master]: osmo-hlr: allow configuring db path from cfg file In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13586 ) Change subject: osmo-hlr: allow configuring db path from cfg file ...................................................................... Patch Set 4: (1 comment) https://gerrit.osmocom.org/#/c/13586/4/src/hlr.c File src/hlr.c: https://gerrit.osmocom.org/#/c/13586/4/src/hlr.c at 777 PS4, Line 777: if (cmdline_opts.db_file) The point is that you could add an 'else if' branch here: if (cmdline_opts.db_file) osmo_talloc_replace_string(..., cmdline_opts.db_file); else if (g_hlr->db_file_path == NULL) talloc_strdup(g_hlr, HLR_DEFAULT_DB_FILE_PATH); -- To view, visit https://gerrit.osmocom.org/13586 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I87b8673324e1e6225afb758fb4963ff3279ea3d8 Gerrit-Change-Number: 13586 Gerrit-PatchSet: 4 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 07 May 2019 18:53:47 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 19:05:47 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 7 May 2019 19:05:47 +0000 Subject: Change in osmo-msc[master]: gsm_04_11: use gsm48_decode_bcd_number2(), evaluate rc In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13881 ) Change subject: gsm_04_11: use gsm48_decode_bcd_number2(), evaluate rc ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13881 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibef71c46d72d2d43123e68f73e5ed554a69243d8 Gerrit-Change-Number: 13881 Gerrit-PatchSet: 3 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 07 May 2019 19:05:47 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 19:11:47 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 7 May 2019 19:11:47 +0000 Subject: Change in osmo-msc[master]: rename bscconfig.h to config.h, cleanup In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13138 ) Change subject: rename bscconfig.h to config.h, cleanup ...................................................................... Patch Set 9: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13138 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id4f683be1f36f0630c83da54e02868aae847aeec Gerrit-Change-Number: 13138 Gerrit-PatchSet: 9 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Max Gerrit-Comment-Date: Tue, 07 May 2019 19:11:47 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 21:11:51 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 7 May 2019 21:11:51 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13137 ) Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... Patch Set 9: Code-Review-1 (22 comments) https://gerrit.osmocom.org/#/c/13137/9/doc/sequence_charts/inter_bsc_ho.msc File doc/sequence_charts/inter_bsc_ho.msc: https://gerrit.osmocom.org/#/c/13137/9/doc/sequence_charts/inter_bsc_ho.msc at 27 PS9, Line 27: ws https://gerrit.osmocom.org/#/c/13137/9/doc/sequence_charts/inter_msc_ho.msc File doc/sequence_charts/inter_msc_ho.msc: https://gerrit.osmocom.org/#/c/13137/9/doc/sequence_charts/inter_msc_ho.msc at 47 PS9, Line 47: ws https://gerrit.osmocom.org/#/c/13137/9/doc/sequence_charts/inter_msc_ho.msc at 74 PS9, Line 74: ws https://gerrit.osmocom.org/#/c/13137/9/include/osmocom/msc/Makefile.am File include/osmocom/msc/Makefile.am: https://gerrit.osmocom.org/#/c/13137/9/include/osmocom/msc/Makefile.am at 9 PS9, Line 9: gsm_04_11.h \ Looks like a meaningless change. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c File src/libmsc/call_leg.c: https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 34 PS9, Line 34: LOG_CALL_LEG LOGPFSML can handle fi=NULL, so we probably don't need this macro. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 78 PS9, Line 78: fi AFAICS, you're using 'fi' as the talloc-parent in order to deallocate it automatically when the 'fi' is terminated and freed. If it's the only reason, then I don't like this approach. You could just call talloc_free(fi->priv) in the FSM's cleanup() handler. Thus there will be no need to init dummy call_leg_fsm on line #59. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 78 PS9, Line 78: talloc_zero Since you're doing *cl = (struct call_leg) { ... } below, zero-initialization doesn't make sense I think. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 101 PS9, Line 101: cl->fi Looks like a bug to me. We need to change the parent talloc context of 'cl' itself, right? Here we keeping 'cl' as a child of the old 'osmo_fsm_inst', and changing the talloc-parent of 'new_parent_fi' to 'new_parent_fi' o_O. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 142 PS9, Line 142: ws https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 145 PS9, Line 145: for (i = 0; i < ARRAY_SIZE(cl->rtp); i++) { So here we check whether all RTP connections of this call leg are established, right? Would be great to have a comment. Also, is it possible to have more than 2 RTP connections for a call leg? If no, this code can be simplified: if (!rtp_stream_is_established(cl->rtp[0])) break; if (!rtp_stream_is_established(cl->rtp[1])) break; And should we print some debug / notice message if not all RTP connections are established? Currently we silently suppress CALL_LEG_EV_RTP_STREAM_ESTABLISHED in such case. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 153 PS9, Line 153: if (cl->fi->state != CALL_LEG_ST_ESTABLISHED) This check could be done before iterating over 'cl->rtp': if (cl->fi->state == CALL_LEG_ST_ESTABLISHED) break; https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 158 PS9, Line 158: rtps = data; This assignment looks useless to me. You could pass 'data' directly to osmo_fsm_inst_dispatch(). https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 178 PS9, Line 178: struct call_leg *cl = fi->priv; Same here, just pass 'fi->priv' directly to osmo_fsm_inst_dispatch(). Casting from (void *) to (struct call_leg *) and then back to (void *) doesn't make sense. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 192 PS9, Line 192: ws https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 202 PS9, Line 202: break Should we OSMO_ASSERT() here? https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 211 PS9, Line 211: {} I know that you prefer this way of array-termination, but in general we use { 0, NULL }. Not critical, but let's please be consistent. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 229 PS9, Line 229: call_leg_fsm_establishing_established The function name looks confusing... Establishing established? https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 244 PS9, Line 244: /* same action function as above */ Ok, now I see. But still, it looks odd that we have two different states with the same set of events, state transitions and the same event handler... https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 248 PS9, Line 248: in_event_mask Since we terminate the FSM instance as soon as we enter this state, is there a chance that it would receive any events? https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 253 PS9, Line 253: /* same action function as above */ Copy-pasted ;) https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 257 PS9, Line 257: static struct osmo_fsm call_leg_fsm This symbol was already defined at line #59. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 290 PS9, Line 290: call_leg_ensure_rtp_alloc Basically, this function just calls call_leg_rtp_alloc() and checks if the allocation was successful. Looks redundant to me. -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 9 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Harald Welte Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 07 May 2019 21:11:51 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 21:47:04 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 7 May 2019 21:47:04 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13137 ) Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... Patch Set 9: (7 comments) https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/cell_id_list.c File src/libmsc/cell_id_list.c: https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/cell_id_list.c at 35 PS9, Line 35: e->cell_id = *cid; Coverity won't be happy. Please OSMO_ASSERT(e) before referencing. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c File src/libmsc/e_link.c: https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c at 77 PS9, Line 77: *e = (struct e_link) { I think you're abusing this way of structure initialization here. All fields of 'e', excluding 'gcm', are zero-initialized, but a few lines below you (re)initialize them again. This would also suppress the compiler's -Wuninitialized warnings. Rather do 'e->gcm = gcm' below. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c at 84 PS9, Line 84: memcpy If 'remote_name' were of type 'const char *', you could just use osmo_strdup(). Why do we need 'uint8_t *'? https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c at 84 PS9, Line 84: memcpy(e->remote_name, remote_name, remote_name_len); OSMO_ASSERT(e->remote_name) before referencing? https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c at 105 PS9, Line 105: enum msc_role from_role Unused parameter? https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c at 127 PS9, Line 127: strlen(local_msc_name) Do we need to also include '\0'? https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c at 132 PS9, Line 132: if (vsub) AFAIR, IMSI is mandatory for all GSUP messages. If 'vsub' is NULL, this function would prepare an incomplete GSUP message. -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 9 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Harald Welte Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 07 May 2019 21:47:04 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 22:22:16 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 7 May 2019 22:22:16 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13137 ) Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... Patch Set 9: (23 comments) https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c File src/libmsc/gsm_04_08.c: https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 156 PS9, Line 156: DEBUGP How about LOG_MSC_A_CAT() here? https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 164 PS9, Line 164: DEBUGP How about LOG_MSC_A_CAT() here? https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 201 PS9, Line 201: LOGP How about LOG_MSC_A_CAT() here? https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 206 PS9, Line 206: DEBUGP How about LOG_MSC_A_CAT() here? https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 279 PS9, Line 279: switch if (gsm48_hdr_msg_type(gh) != GSM48_MT_RR_PAG_RESP) return -1; https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 409 PS9, Line 409: msc_a_put(msc_a, __func__); Shouldn't we also msc_a_put(MSC_A_USE_LOCATION_UPDATING) here? https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 416 PS9, Line 416: msc_a_put(msc_a, __func__); Shouldn't we also msc_a_put(MSC_A_USE_LOCATION_UPDATING) here? https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 615 PS9, Line 615: DEBUGP What about LOG_MSC_A() here? https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 617 PS9, Line 617: DEBUGP What about LOG_MSC_A() here? https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 677 PS9, Line 677: gsm48_mi_type_name(mi_type), mi_string); Still unaligned: one space is missing. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 719 PS9, Line 719: msg->data_len, sizeof(struct gsm48_service_request*)); Fancy alignment needs one more space ;) https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 719 PS9, Line 719: sizeof(struct gsm48_service_request*) Wait, sizeof pointer?!? Looks like a bug. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 808 PS9, Line 808: DEBUGP What about LOG_MSC_A() here? https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 825 PS9, Line 825: DEBUGP What about LOG_MSC_A() here? https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 850 PS9, Line 850: ws https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 852 PS9, Line 852: LOGP What about LOG_MSC_A() here? https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 855 PS9, Line 855: LOGP What about LOG_MSC_A() here? https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 890 PS9, Line 890: msgb_l3len(msg)); Broken alignment: +1 space. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 921 PS9, Line 921: msgb_l3len(msg) I think it should be data_len. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 969 PS9, Line 969: "MM AUTHENTICATION RESPONSE: invalid: parsing %s AKA Auth Response" Broken alignment. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 1202 PS9, Line 1202: DEBUGP What about LOG_MSC_A()? https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 1244 PS9, Line 1244: DEBUGP What about LOG_MSC_A()? https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 1302 PS9, Line 1302: cm_service_type Unused? -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 9 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Harald Welte Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 07 May 2019 22:22:16 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 23:39:56 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 May 2019 23:39:56 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13137 ) Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... Patch Set 9: (28 comments) hmm, my idea was to have received this review a lot earlier. I am N times through final-final and absolutely final testing after patch changes. I appreciate the review, but to be honest I personally need to get this load off my shoulders. I am applying your review thus far, but would prefer to not squash more modifications into this patch set, but rather move on to separate follow-up patches after this. This patch being in limbo is a huge burden: - having to continuously rebase it keeps introducing merge conflicts that are completely loaded onto my shoulders -- I have to understand and adjust to all other work going on; this limbo has been going on for far too long and by now is profoundly impacting my private life (stress / frustration). - Secondly, squashing changes into the patch set happens sort of hidden, not seen in the git history; I've often had to revisit the reflog to analyse past versions of the patch set to fix bugs introduced by modifications squashed into this -- that's not how version control should happen. So please, unless you have absolutely critical bugs that need fixing, let's move to merge + separate patches as soon as possible. Nevertheless: many thanks for reviewing this with close scrutiny! If you can, by all means please go on to do so! https://gerrit.osmocom.org/#/c/13137/9/include/osmocom/msc/Makefile.am File include/osmocom/msc/Makefile.am: https://gerrit.osmocom.org/#/c/13137/9/include/osmocom/msc/Makefile.am at 9 PS9, Line 9: gsm_04_11.h \ > Looks like a meaningless change. I think I decided to alphabetically sort (vim ':sort' command) ... can we just keep this? https://gerrit.osmocom.org/#/c/13137/6/include/osmocom/msc/msc_roles.h File include/osmocom/msc/msc_roles.h: https://gerrit.osmocom.org/#/c/13137/6/include/osmocom/msc/msc_roles.h at 379 PS6, Line 379: struct an_apdu { : /* accessNetworkProtocolId */ : enum osmo_gsup_access_network_protocol an_proto; : /* signalInfo */ : struct msgb *msg; : /* If this AN-APDU is sent between MSCs, additional information from the E-interface messaging, like the : * Handover Number, will placed/available here. Otherwise may be left NULL. */ : const struct osmo_gsup_message *e_info; : }; > hmm, indeed, didn't see that... [?] In the end decided against using the msgb->cb[], because it makes the type conversions a lot more complex / ugly. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c File src/libmsc/call_leg.c: https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 34 PS9, Line 34: LOG_CALL_LEG > LOGPFSML can handle fi=NULL, so we probably don't need this macro. indeed it ended up being a simplistic wrapper, but it is my preferred pattern to keep FSM specific log macros. That way we can trivially tweak all log context for a given object in a single place. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 78 PS9, Line 78: fi > AFAICS, you're using 'fi' as the talloc-parent in order to deallocate it automatically when the 'fi' [?] I want the struct and the fi to be one talloc unit, and I specifically do not want to have to remember to talloc_free in a cleanup function. It is also a functional requirement to keep the struct around until the FSM instance frees to avoid all sorts of complex freeing cascades hitting use-after-free problems. See http://git.osmocom.org/libosmocore/commit/?id=1f9cc018618e7d1e9a7a37e1ef08e059a4e02e87 -- which would be quite useless if the cleanup function freed the struct separately. You will see this exact pattern in *all* of the FSM instance implementations I have written, both in osmo-bsc and here. I appreciate your opinion, but will not adjust this pattern. I don't understand what you mean by "no need to init dummy call_leg_fsm on line #59." -- line 59 has the global FSM definition, which is not the FSM instance that is allocated here based on that singleton FSM definition. Again this is a common pattern. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 78 PS9, Line 78: talloc_zero > Since you're doing *cl = (struct call_leg) { ... [?] you mean I don't need to talloc_zero()? Below cl = (struct...){...} can be seen as syntactic sugar to not have to repeat cl-> in every line, and to make clear that the struct is fully initialized. The talloc API does not provide a macro similar to talloc_zero() that names the struct but doesn't zero initialize. What is the reason for this statement, optimization? I would just keep it as is, no point in changing it? https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 101 PS9, Line 101: cl->fi > Looks like a bug to me. [?] osmo_fsm_inst_change_reparent() indeed contains this bug. Thanks for highlighting, I found it while neck deep in developing and forgot about it. Opened https://osmocom.org/issues/3983 Since we need an osmo_fsm_inst_change_parent2() for compat, this code can be merged as-is now, and can be fixed once the new osmo_fsm_inst_change_parent2() exists. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 142 PS9, Line 142: > ws the blank line is intentional https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 145 PS9, Line 145: for (i = 0; i < ARRAY_SIZE(cl->rtp); i++) { > So here we check whether all RTP connections of this call leg are established, right? Would be great [?] IMHO the code is quite clear, but ok. What you see as simplification is code duplication in my eyes. I prefer to traverse arrays in for loops, even if they have only two members. We don't suppress. Incoming event is an RTP stream saying it is ready, and if all are ready we pass on the *CALL_LEG* event that the entire call leg is established. No logging needed besides the events that are already logged. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 153 PS9, Line 153: if (cl->fi->state != CALL_LEG_ST_ESTABLISHED) > This check could be done before iterating over 'cl->rtp': [?] I don't remember why I added this if()... theoretically, if any call leg is non-established, the call leg should also not be in established state. I think I would rather remove the if() and have some error log when re-entering the same state... https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 158 PS9, Line 158: rtps = data; > This assignment looks useless to me. You could pass 'data' directly to osmo_fsm_inst_dispatch(). it is to clarify the type of the data argument. Otherwise the reader has to move to other parts of the code to investigate what the type is intended to be. It is a common pattern that indeed doesn't have much functional use in this case, yet I would prefer to keep it. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 178 PS9, Line 178: struct call_leg *cl = fi->priv; > Same here, just pass 'fi->priv' directly to osmo_fsm_inst_dispatch(). [?] same humble opinion, would prefer to keep for some degree of "type safety" https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 211 PS9, Line 211: {} > I know that you prefer this way of array-termination, but in general we use { 0, NULL }. [?] I am being consistent with using {} everywhere in my patches all over the place for years :P The cat is already out of the bag. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 229 PS9, Line 229: call_leg_fsm_establishing_established > The function name looks confusing... [?] one function for both states https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 244 PS9, Line 244: /* same action function as above */ > Ok, now I see. [?] it is mostly for logging https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 248 PS9, Line 248: in_event_mask > Since we terminate the FSM instance as soon as we enter this state, is there a chance that it would [?] of course, cleanup and termination events ricocheting often dispatch numerous events https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 253 PS9, Line 253: /* same action function as above */ > Copy-pasted ;) thx https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 257 PS9, Line 257: static struct osmo_fsm call_leg_fsm > This symbol was already defined at line #59. it obviously has to be done exactly this way, unless I move the alloc function to below here. I prefer it in the beginning though. It's called "forward declaration" and is a common tool in the C language. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 290 PS9, Line 290: call_leg_ensure_rtp_alloc > Basically, this function just calls call_leg_rtp_alloc() and checks if the allocation was successful [?] the critical difference is that it calls call_leg_rtp_alloc() only if it hasn't been called yet on that rtp_stream. I would like to keep this. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c File src/libmsc/e_link.c: https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c at 77 PS9, Line 77: *e = (struct e_link) { > I think you're abusing this way of structure initialization here. [?] I prefer this to clearly indicate that the struct is initialized from scratch. You are right that it seems unnecessary, but nevertheless is a common patter I use everywhere: foo = talloc *foo = (struct foo){ initialze all members that can be initialized inline like this } initialize all members that need multiple lines and function calls, like memcpy and so forth what's the point of changing this... https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c at 84 PS9, Line 84: memcpy > If 'remote_name' were of type 'const char *', you could just use osmo_strdup(). [?] it is a blob with length, to one day support Global Title or something. Wasn't my idea, but it is a BLOB, not a char*. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c at 105 PS9, Line 105: enum msc_role from_role > Unused parameter? indeed, came from an earlier patch set where the role was reflected in the GSUP_ENTITY. Now we have just the GSUP_MESSAGE_CLASS https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c at 127 PS9, Line 127: strlen(local_msc_name) > Do we need to also include '\0'? yes :/ it's a long story... https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c at 132 PS9, Line 132: if (vsub) > AFAIR, IMSI is mandatory for all GSUP messages. [?] the idea is that e_prep_gsup_msg() is generally working. If the result is an invalid message, tough luck for the caller, but I definitely want to avoid null pointer access. The caller might be aware of a missing vsub and obtain the IMSI otherwise? (not sure if any such caller exists, but that is the semantic idea of this function) https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c File src/libmsc/gsm_04_08.c: https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 156 PS9, Line 156: DEBUGP > How about LOG_MSC_A_CAT() here? yes. This is legacy logging, not sure if we really need to change all of it now? I agree that this can be changed but will not spend time on it. Feel free to post a follow-up patch. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 279 PS9, Line 279: switch > if (gsm48_hdr_msg_type(gh) != GSM48_MT_RR_PAG_RESP) [?] no: one day another message type comes along and we need to change to a switch() again. Following same pattern as above. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 409 PS9, Line 409: msc_a_put(msc_a, __func__); > Shouldn't we also msc_a_put(MSC_A_USE_LOCATION_UPDATING) here? the MSC_A_USE_LOCATION_UPDATING is put() by the FSM instance https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 719 PS9, Line 719: sizeof(struct gsm48_service_request*) > Wait, sizeof pointer?!? Looks like a bug. hmmm this bug predates this patch, feel free to fix separately https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 1302 PS9, Line 1302: cm_service_type > Unused? defined by vlr.ops API, even if we don't use it, we comply with that cb signature -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 9 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Harald Welte Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 07 May 2019 23:39:56 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 23:42:36 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 May 2019 23:42:36 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13137 to look at the new patch set (#10). Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... large refactoring: support inter-BSC and inter-MSC Handover 3GPP TS 49.008 '4.3 Roles of MSC-A, MSC-I and MSC-T' defines distinct roles: - MSC-A is responsible for managing subscribers, - MSC-I is the gateway to the RAN. - MSC-T is a second transitory gateway to another RAN during Handover. After inter-MSC Handover, the MSC-I is handled by a remote MSC instance, while the original MSC-A retains the responsibility of subscriber management. MSC-T exists in this patch but is not yet used, since Handover is only prepared for, not yet implemented. Facilitate Inter-MSC and inter-BSC Handover by the same internal split of MSC roles. Compared to inter-MSC Handover, mere inter-BSC has the obvious simplifications: - all of MSC-A, MSC-I and MSC-T roles will be served by the same osmo-msc instance, - messages between MSC-A and MSC-{I,T} don't need to be routed via E-interface (GSUP), - no call routing between MSC-A and -I via MNCC necessary. This is the largest code bomb I have submitted, ever. Out of principle, I apologize to everyone trying to read this as a whole. Unfortunately, I see no sense in trying to split this patch into smaller bits. It would be a huge amount of work to introduce these changes in separate chunks, especially if each should in turn be useful and pass all test suites. So, unfortunately, we are stuck with this code bomb. The following are some details and rationale for this rather huge refactoring: * separate MSC subscriber management from ran_conn struct ran_conn is reduced from the pivotal subscriber management entity it has been so far to a mere storage for an SCCP connection ID and an MSC subscriber reference. The new pivotal subscriber management entity is struct msc_a -- struct msub lists the msc_a, msc_i, msc_t roles, the vast majority of code paths however use msc_a, since MSC-A is where all the interesting stuff happens. Before handover, msc_i is an FSM implementation that encodes to the local ran_conn. After inter-MSC Handover, msc_i is a compatible but different FSM implementation that instead forwards via/from GSUP. Same goes for the msc_a struct: if osmo-msc is the MSC-I "RAN proxy" for a remote MSC-A role, the msc_a->fi is an FSM implementation that merely forwards via/from GSUP. * New SCCP implementation for RAN access To be able to forward BSSAP and RANAP messages via the GSUP interface, the individual message layers need to be cleanly separated. The IuCS implementation used until now (iu_client from libosmo-ranap) did not provide this level of separation, and needed a complete rewrite. It was trivial to implement this in such a way that both BSSAP and RANAP can be handled by the same SCCP code, hence the new SCCP-RAN layer also replaces BSSAP handling. sccp_ran.h: struct sccp_ran_inst provides an abstract handler for incoming RAN connections. A set of callback functions provides implementation specific details. * RAN Abstraction (BSSAP vs. RANAP) The common SCCP implementation did set the theme for the remaining refactoring: make all other MSC code paths entirely RAN-implementation-agnostic. ran_infra.c provides data structures that list RAN implementation specifics, from logging to RAN de-/encoding to SCCP callbacks and timers. A ran_infra pointer hence allows complete abstraction of RAN implementations: - managing connected RAN peers (BSC, RNC) in ran_peer.c, - classifying and de-/encoding RAN PDUs, - recording connected LACs and cell IDs and sending out Paging requests to matching RAN peers. * RAN RESET now also for RANAP ran_peer.c absorbs the reset_fsm from a_reset.c; in consequence, RANAP also supports proper RESET semantics now. Hence osmo-hnbgw now also needs to provide proper RESET handling, which it so far duly ignores. (TODO) * RAN de-/encoding abstraction The RAN abstraction mentioned above serves not only to separate RANAP and BSSAP implementations transparently, but also to be able to optionally handle RAN on distinct levels. Before Handover, all RAN messages are handled by the MSC-A role. However, after an inter-MSC Handover, a standalone MSC-I will need to decode RAN PDUs, at least in order to manage Assignment of RTP streams between BSS/RNC and MNCC call forwarding. ran_msg.h provides a common API with abstraction for: - receiving events from RAN, i.e. passing RAN decode from the BSC/RNC and MS/UE: struct ran_dec_msg represents RAN messages decoded from either BSSMAP or RANAP; - sending RAN events: ran_enc_msg is the counterpart to compose RAN messages that should be encoded to either BSSMAP or RANAP and passed down to the BSC/RNC and MS/UE. The RAN-specific implementations are completely contained by ran_msg_a.c and ran_msg_iu.c. In particular, Assignment and Ciphering have so far been distinct code paths for BSSAP and RANAP, with switch(via_ran){...} statements all over the place. Using RAN_DEC_* and RAN_ENC_* abstractions, these are now completely unified. Note that SGs does not qualify for RAN abstraction: the SGs interface always remains with the MSC-A role, and SGs messages follow quite distinct semantics from the fairly similar GERAN and UTRAN. * MGW and RTP stream management So far, managing MGW endpoints via MGCP was tightly glued in-between GSM-04.08-CC on the one and MNCC on the other side. Prepare for switching RTP streams between different RAN peers by moving to object-oriented implementations: implement struct call_leg and struct rtp_stream with distinct FSMs each. For MGW communication, use the osmo_mgcpc_ep API that has originated from osmo-bsc and recently moved to libosmo-mgcp-client for this purpose. Instead of implementing a sequence of events with code duplication for the RAN and CN sides, the idea is to manage each RTP stream separately by firing and receiving events as soon as codecs and RTP ports are negotiated, and letting the individual FSMs take care of the MGW management "asynchronously". The caller provides event IDs and an FSM instance that should be notified of RTP stream setup progress. Hence it becomes possible to reconnect RTP streams from one GSM-04.08-CC to another (inter-BSC Handover) or between CC and MNCC RTP peers (inter-MSC Handover) without duplicating the MGCP code for each transition. The number of FSM implementations used for MGCP handling may seem a bit of an overkill. But in fact, the number of perspectives on RTP forwarding are far from trivial: - an MGW endpoint is an entity with N connections, and MGCP "sessions" for configuring them by talking to the MGW; - an RTP stream is a remote peer connected to one of the endpoint's connections, which is asynchronously notified of codec and RTP port choices; - a call leg is the higher level view on either an MT or MO side of a voice call, a combination of two RTP streams to forward between two remote peers. BSC MGW PBX CI CI [MGW-endpoint] [--rtp_stream--] [--rtp_stream--] [----------------call_leg----------------] * Use counts Introduce using the new osmo_use_count API added to libosmocore for this purpose. Each use token has a distinct name in the logging, which can be a globally constant name or ad-hoc, like the local __func__ string constant. Use in the new struct msc_a, as well as change vlr_subscr to the new osmo_use_count API. * FSM Timeouts Introduce using the new osmo_tdef API, which provides a common VTY implementation for all timer numbers, and FSM state transitions with the correct timeout. Originated in osmo-bsc, recently moved to libosmocore. Depends: Ife31e6798b4e728a23913179e346552a7dd338c0 (libosmocore) Ib9af67b100c4583342a2103669732dab2e577b04 (libosmocore) Id617265337f09dfb6ddfe111ef5e578cd3dc9f63 (libosmocore) Ie9e2add7bbfae651c04e230d62e37cebeb91b0f5 (libosmo-sccp) I26be5c4b06a680f25f19797407ab56a5a4880ddc (osmo-mgw) Ida0e59f9a1f2dd18efea0a51680a67b69f141efa (osmo-mgw) I9a3effd38e72841529df6c135c077116981dea36 (osmo-mgw) Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd --- M configure.ac A doc/sequence_charts/Makefile.am A doc/sequence_charts/inter_bsc_ho.msc A doc/sequence_charts/inter_msc_ho.msc A doc/sequence_charts/mncc_fsm.msc M include/osmocom/msc/Makefile.am D include/osmocom/msc/a_iface.h D include/osmocom/msc/a_iface_bssap.h D include/osmocom/msc/a_reset.h A include/osmocom/msc/call_leg.h A include/osmocom/msc/cell_id_list.h A include/osmocom/msc/e_link.h M include/osmocom/msc/gsm_04_08.h M include/osmocom/msc/gsm_04_11.h M include/osmocom/msc/gsm_04_11_gsup.h M include/osmocom/msc/gsm_04_14.h M include/osmocom/msc/gsm_04_80.h M include/osmocom/msc/gsm_09_11.h M include/osmocom/msc/gsm_data.h M include/osmocom/msc/gsm_data_shared.h M include/osmocom/msc/gsm_subscriber.h A include/osmocom/msc/gsup_client_mux.h D include/osmocom/msc/iu_dummy.h D include/osmocom/msc/iucs.h D include/osmocom/msc/iucs_ranap.h M include/osmocom/msc/mncc.h A include/osmocom/msc/mncc_call.h A include/osmocom/msc/msc_a.h A include/osmocom/msc/msc_a_remote.h M include/osmocom/msc/msc_common.h A include/osmocom/msc/msc_ho.h A include/osmocom/msc/msc_i.h A include/osmocom/msc/msc_i_remote.h D include/osmocom/msc/msc_ifaces.h D include/osmocom/msc/msc_mgcp.h A include/osmocom/msc/msc_roles.h A include/osmocom/msc/msc_t.h A include/osmocom/msc/msc_t_remote.h A include/osmocom/msc/msub.h A include/osmocom/msc/neighbor_ident.h A include/osmocom/msc/paging.h M include/osmocom/msc/ran_conn.h A include/osmocom/msc/ran_infra.h A include/osmocom/msc/ran_msg.h A include/osmocom/msc/ran_msg_a.h A include/osmocom/msc/ran_msg_iu.h A include/osmocom/msc/ran_peer.h A include/osmocom/msc/rtp_stream.h A include/osmocom/msc/sccp_ran.h M include/osmocom/msc/sgs_iface.h M include/osmocom/msc/signal.h M include/osmocom/msc/silent_call.h M include/osmocom/msc/sms_queue.h M include/osmocom/msc/transaction.h M include/osmocom/msc/vlr.h M include/osmocom/msc/vlr_sgs.h M src/libmsc/Makefile.am D src/libmsc/a_iface.c D src/libmsc/a_iface_bssap.c D src/libmsc/a_reset.c A src/libmsc/call_leg.c A src/libmsc/cell_id_list.c A src/libmsc/e_link.c M src/libmsc/gsm_04_08.c M src/libmsc/gsm_04_08_cc.c M src/libmsc/gsm_04_11.c M src/libmsc/gsm_04_11_gsup.c M src/libmsc/gsm_04_14.c M src/libmsc/gsm_04_80.c M src/libmsc/gsm_09_11.c D src/libmsc/gsm_subscriber.c A src/libmsc/gsup_client_mux.c D src/libmsc/iu_dummy.c D src/libmsc/iucs.c D src/libmsc/iucs_ranap.c M src/libmsc/mncc.c M src/libmsc/mncc_builtin.c A src/libmsc/mncc_call.c M src/libmsc/mncc_sock.c A src/libmsc/msc_a.c A src/libmsc/msc_a_remote.c A src/libmsc/msc_ho.c A src/libmsc/msc_i.c A src/libmsc/msc_i_remote.c D src/libmsc/msc_ifaces.c D src/libmsc/msc_mgcp.c A src/libmsc/msc_net_init.c A src/libmsc/msc_t.c A src/libmsc/msc_t_remote.c M src/libmsc/msc_vty.c A src/libmsc/msub.c A src/libmsc/neighbor_ident.c A src/libmsc/neighbor_ident_vty.c D src/libmsc/osmo_msc.c A src/libmsc/paging.c M src/libmsc/ran_conn.c A src/libmsc/ran_infra.c A src/libmsc/ran_msg.c A src/libmsc/ran_msg_a.c A src/libmsc/ran_msg_iu.c A src/libmsc/ran_peer.c A src/libmsc/ran_up_l2.c M src/libmsc/rrlp.c A src/libmsc/rtp_stream.c A src/libmsc/sccp_ran.c M src/libmsc/sgs_iface.c M src/libmsc/sgs_server.c M src/libmsc/silent_call.c M src/libmsc/smpp_openbsc.c M src/libmsc/smpp_smsc.h M src/libmsc/sms_queue.c M src/libmsc/transaction.c M src/libvlr/vlr.c M src/libvlr/vlr_access_req_fsm.c M src/libvlr/vlr_lu_fsm.c M src/libvlr/vlr_sgs.c M src/libvlr/vlr_sgs_fsm.c M src/osmo-msc/Makefile.am M src/osmo-msc/msc_main.c M tests/Makefile.am M tests/msc_vlr/Makefile.am M tests/msc_vlr/msc_vlr_test_authen_reuse.c M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_test_gsm_authen.c M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.c M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.c M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.c M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.c M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.c M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_ss.c M tests/msc_vlr/msc_vlr_test_ss.err M tests/msc_vlr/msc_vlr_test_umts_authen.c M tests/msc_vlr/msc_vlr_test_umts_authen.err M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h M tests/sms_queue/Makefile.am M tests/sms_queue/sms_queue_test.c A tests/test_neighbor_ident.vty M tests/test_nodes.vty 151 files changed, 35,647 insertions(+), 22,990 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/13137/10 -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 10 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Harald Welte Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 7 23:42:36 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 7 May 2019 23:42:36 +0000 Subject: Change in osmo-msc[master]: GSUP: include terminating nul in inter-MSC source/destination name In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13612 to look at the new patch set (#4). Change subject: GSUP: include terminating nul in inter-MSC source/destination name ...................................................................... GSUP: include terminating nul in inter-MSC source/destination name Before, I was testing with osmo-hlr patch I01a45900e14d41bcd338f50ad85d9fabf2c61405 applied, but that patch is currently in an abandoned state. This is the counterpart implemented in osmo-msc: always include the terminating nul char in the "blob" that is the MSC IPA name. The dualities in the formats of routing between MSCs is whether to handle it as a char*, or as a uint8_t* with explicit len (a blob). In the VTY config to indicate target MSCs for inter-MSC handover, we have strings. We currently even completely lack a way of configuring any blob-like data as a VTY config item. In osmo-hlr, the IPA names used for routing are currently received as a char* which *includes* the terminating nul char. So in osmo-msc, if we also always include the nul char, it works. Instead, we could just send the char* part without the nul char, and apply above mentioned osmo-hlr patch. That patch would magically match a name that lacks a nul with a name that includes one. I think it is better to agree on one format on the GSUP wire now, instead of making assumptions in osmo-hlr on the format of the source/target names for routing. This format, from the way GSUP so far transmits the IPA SERNO tag when a client attaches to osmo-hlr, happens to include the terminating nul char. Change-Id: I9ca8c9eef104519ed1ea46e2fef46dcdc0d554eb --- M src/libmsc/e_link.c 1 file changed, 14 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/12/13612/4 -- To view, visit https://gerrit.osmocom.org/13612 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9ca8c9eef104519ed1ea46e2fef46dcdc0d554eb Gerrit-Change-Number: 13612 Gerrit-PatchSet: 4 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 00:02:45 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 00:02:45 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13137 ) Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... Patch Set 11: > Patch Set 11: Verified-1 > > Build Failed > > https://jenkins.osmocom.org/jenkins/job/gerrit-osmo-msc/1524/ : FAILURE the build says In file included from /build/deps/install/stow/osmo-mgw/include/osmocom/mgcp_client/mgcp_common.h:45:0, from /build/deps/install/stow/osmo-mgw/include/osmocom/mgcp_client/mgcp_client.h:6, from ../../include/osmocom/msc/gsm_data.h:16, from e_link.c:27: e_link.c: In function ?msc_a_i_t_gsup_rx?: /build/deps/install/stow/libosmocore/include/osmocom/core/logging.h:95:5: error: ?msub? may be used uninitialized in this function [-Werror=maybe-uninitialized] logp2(ss, level, __FILE__, __LINE__, cont, fmt, ##args); \ ^ e_link.c:155:15: note: ?msub? was declared here struct msub *msub; ^ and I completely don't understand this. line 155 in e_link.c is a completely unrelated place in the code, and I can't find any code path where an uninitialized msub might be used in msc_a_i_t_gsup_rx() :/ -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 11 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Harald Welte Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 00:02:45 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 00:07:10 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 00:07:10 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13137 ) Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... Patch Set 11: found something in msc_new_msc_t_for_handover_request() instead. WTF though with that super odd error message!?!? -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 11 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Harald Welte Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 00:07:10 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 00:07:44 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 00:07:44 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13137 to look at the new patch set (#12). Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... large refactoring: support inter-BSC and inter-MSC Handover 3GPP TS 49.008 '4.3 Roles of MSC-A, MSC-I and MSC-T' defines distinct roles: - MSC-A is responsible for managing subscribers, - MSC-I is the gateway to the RAN. - MSC-T is a second transitory gateway to another RAN during Handover. After inter-MSC Handover, the MSC-I is handled by a remote MSC instance, while the original MSC-A retains the responsibility of subscriber management. MSC-T exists in this patch but is not yet used, since Handover is only prepared for, not yet implemented. Facilitate Inter-MSC and inter-BSC Handover by the same internal split of MSC roles. Compared to inter-MSC Handover, mere inter-BSC has the obvious simplifications: - all of MSC-A, MSC-I and MSC-T roles will be served by the same osmo-msc instance, - messages between MSC-A and MSC-{I,T} don't need to be routed via E-interface (GSUP), - no call routing between MSC-A and -I via MNCC necessary. This is the largest code bomb I have submitted, ever. Out of principle, I apologize to everyone trying to read this as a whole. Unfortunately, I see no sense in trying to split this patch into smaller bits. It would be a huge amount of work to introduce these changes in separate chunks, especially if each should in turn be useful and pass all test suites. So, unfortunately, we are stuck with this code bomb. The following are some details and rationale for this rather huge refactoring: * separate MSC subscriber management from ran_conn struct ran_conn is reduced from the pivotal subscriber management entity it has been so far to a mere storage for an SCCP connection ID and an MSC subscriber reference. The new pivotal subscriber management entity is struct msc_a -- struct msub lists the msc_a, msc_i, msc_t roles, the vast majority of code paths however use msc_a, since MSC-A is where all the interesting stuff happens. Before handover, msc_i is an FSM implementation that encodes to the local ran_conn. After inter-MSC Handover, msc_i is a compatible but different FSM implementation that instead forwards via/from GSUP. Same goes for the msc_a struct: if osmo-msc is the MSC-I "RAN proxy" for a remote MSC-A role, the msc_a->fi is an FSM implementation that merely forwards via/from GSUP. * New SCCP implementation for RAN access To be able to forward BSSAP and RANAP messages via the GSUP interface, the individual message layers need to be cleanly separated. The IuCS implementation used until now (iu_client from libosmo-ranap) did not provide this level of separation, and needed a complete rewrite. It was trivial to implement this in such a way that both BSSAP and RANAP can be handled by the same SCCP code, hence the new SCCP-RAN layer also replaces BSSAP handling. sccp_ran.h: struct sccp_ran_inst provides an abstract handler for incoming RAN connections. A set of callback functions provides implementation specific details. * RAN Abstraction (BSSAP vs. RANAP) The common SCCP implementation did set the theme for the remaining refactoring: make all other MSC code paths entirely RAN-implementation-agnostic. ran_infra.c provides data structures that list RAN implementation specifics, from logging to RAN de-/encoding to SCCP callbacks and timers. A ran_infra pointer hence allows complete abstraction of RAN implementations: - managing connected RAN peers (BSC, RNC) in ran_peer.c, - classifying and de-/encoding RAN PDUs, - recording connected LACs and cell IDs and sending out Paging requests to matching RAN peers. * RAN RESET now also for RANAP ran_peer.c absorbs the reset_fsm from a_reset.c; in consequence, RANAP also supports proper RESET semantics now. Hence osmo-hnbgw now also needs to provide proper RESET handling, which it so far duly ignores. (TODO) * RAN de-/encoding abstraction The RAN abstraction mentioned above serves not only to separate RANAP and BSSAP implementations transparently, but also to be able to optionally handle RAN on distinct levels. Before Handover, all RAN messages are handled by the MSC-A role. However, after an inter-MSC Handover, a standalone MSC-I will need to decode RAN PDUs, at least in order to manage Assignment of RTP streams between BSS/RNC and MNCC call forwarding. ran_msg.h provides a common API with abstraction for: - receiving events from RAN, i.e. passing RAN decode from the BSC/RNC and MS/UE: struct ran_dec_msg represents RAN messages decoded from either BSSMAP or RANAP; - sending RAN events: ran_enc_msg is the counterpart to compose RAN messages that should be encoded to either BSSMAP or RANAP and passed down to the BSC/RNC and MS/UE. The RAN-specific implementations are completely contained by ran_msg_a.c and ran_msg_iu.c. In particular, Assignment and Ciphering have so far been distinct code paths for BSSAP and RANAP, with switch(via_ran){...} statements all over the place. Using RAN_DEC_* and RAN_ENC_* abstractions, these are now completely unified. Note that SGs does not qualify for RAN abstraction: the SGs interface always remains with the MSC-A role, and SGs messages follow quite distinct semantics from the fairly similar GERAN and UTRAN. * MGW and RTP stream management So far, managing MGW endpoints via MGCP was tightly glued in-between GSM-04.08-CC on the one and MNCC on the other side. Prepare for switching RTP streams between different RAN peers by moving to object-oriented implementations: implement struct call_leg and struct rtp_stream with distinct FSMs each. For MGW communication, use the osmo_mgcpc_ep API that has originated from osmo-bsc and recently moved to libosmo-mgcp-client for this purpose. Instead of implementing a sequence of events with code duplication for the RAN and CN sides, the idea is to manage each RTP stream separately by firing and receiving events as soon as codecs and RTP ports are negotiated, and letting the individual FSMs take care of the MGW management "asynchronously". The caller provides event IDs and an FSM instance that should be notified of RTP stream setup progress. Hence it becomes possible to reconnect RTP streams from one GSM-04.08-CC to another (inter-BSC Handover) or between CC and MNCC RTP peers (inter-MSC Handover) without duplicating the MGCP code for each transition. The number of FSM implementations used for MGCP handling may seem a bit of an overkill. But in fact, the number of perspectives on RTP forwarding are far from trivial: - an MGW endpoint is an entity with N connections, and MGCP "sessions" for configuring them by talking to the MGW; - an RTP stream is a remote peer connected to one of the endpoint's connections, which is asynchronously notified of codec and RTP port choices; - a call leg is the higher level view on either an MT or MO side of a voice call, a combination of two RTP streams to forward between two remote peers. BSC MGW PBX CI CI [MGW-endpoint] [--rtp_stream--] [--rtp_stream--] [----------------call_leg----------------] * Use counts Introduce using the new osmo_use_count API added to libosmocore for this purpose. Each use token has a distinct name in the logging, which can be a globally constant name or ad-hoc, like the local __func__ string constant. Use in the new struct msc_a, as well as change vlr_subscr to the new osmo_use_count API. * FSM Timeouts Introduce using the new osmo_tdef API, which provides a common VTY implementation for all timer numbers, and FSM state transitions with the correct timeout. Originated in osmo-bsc, recently moved to libosmocore. Depends: Ife31e6798b4e728a23913179e346552a7dd338c0 (libosmocore) Ib9af67b100c4583342a2103669732dab2e577b04 (libosmocore) Id617265337f09dfb6ddfe111ef5e578cd3dc9f63 (libosmocore) Ie9e2add7bbfae651c04e230d62e37cebeb91b0f5 (libosmo-sccp) I26be5c4b06a680f25f19797407ab56a5a4880ddc (osmo-mgw) Ida0e59f9a1f2dd18efea0a51680a67b69f141efa (osmo-mgw) I9a3effd38e72841529df6c135c077116981dea36 (osmo-mgw) Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd --- M configure.ac A doc/sequence_charts/Makefile.am A doc/sequence_charts/inter_bsc_ho.msc A doc/sequence_charts/inter_msc_ho.msc A doc/sequence_charts/mncc_fsm.msc M include/osmocom/msc/Makefile.am D include/osmocom/msc/a_iface.h D include/osmocom/msc/a_iface_bssap.h D include/osmocom/msc/a_reset.h A include/osmocom/msc/call_leg.h A include/osmocom/msc/cell_id_list.h A include/osmocom/msc/e_link.h M include/osmocom/msc/gsm_04_08.h M include/osmocom/msc/gsm_04_11.h M include/osmocom/msc/gsm_04_11_gsup.h M include/osmocom/msc/gsm_04_14.h M include/osmocom/msc/gsm_04_80.h M include/osmocom/msc/gsm_09_11.h M include/osmocom/msc/gsm_data.h M include/osmocom/msc/gsm_data_shared.h M include/osmocom/msc/gsm_subscriber.h A include/osmocom/msc/gsup_client_mux.h D include/osmocom/msc/iu_dummy.h D include/osmocom/msc/iucs.h D include/osmocom/msc/iucs_ranap.h M include/osmocom/msc/mncc.h A include/osmocom/msc/mncc_call.h A include/osmocom/msc/msc_a.h A include/osmocom/msc/msc_a_remote.h M include/osmocom/msc/msc_common.h A include/osmocom/msc/msc_ho.h A include/osmocom/msc/msc_i.h A include/osmocom/msc/msc_i_remote.h D include/osmocom/msc/msc_ifaces.h D include/osmocom/msc/msc_mgcp.h A include/osmocom/msc/msc_roles.h A include/osmocom/msc/msc_t.h A include/osmocom/msc/msc_t_remote.h A include/osmocom/msc/msub.h A include/osmocom/msc/neighbor_ident.h A include/osmocom/msc/paging.h M include/osmocom/msc/ran_conn.h A include/osmocom/msc/ran_infra.h A include/osmocom/msc/ran_msg.h A include/osmocom/msc/ran_msg_a.h A include/osmocom/msc/ran_msg_iu.h A include/osmocom/msc/ran_peer.h A include/osmocom/msc/rtp_stream.h A include/osmocom/msc/sccp_ran.h M include/osmocom/msc/sgs_iface.h M include/osmocom/msc/signal.h M include/osmocom/msc/silent_call.h M include/osmocom/msc/sms_queue.h M include/osmocom/msc/transaction.h M include/osmocom/msc/vlr.h M include/osmocom/msc/vlr_sgs.h M src/libmsc/Makefile.am D src/libmsc/a_iface.c D src/libmsc/a_iface_bssap.c D src/libmsc/a_reset.c A src/libmsc/call_leg.c A src/libmsc/cell_id_list.c A src/libmsc/e_link.c M src/libmsc/gsm_04_08.c M src/libmsc/gsm_04_08_cc.c M src/libmsc/gsm_04_11.c M src/libmsc/gsm_04_11_gsup.c M src/libmsc/gsm_04_14.c M src/libmsc/gsm_04_80.c M src/libmsc/gsm_09_11.c D src/libmsc/gsm_subscriber.c A src/libmsc/gsup_client_mux.c D src/libmsc/iu_dummy.c D src/libmsc/iucs.c D src/libmsc/iucs_ranap.c M src/libmsc/mncc.c M src/libmsc/mncc_builtin.c A src/libmsc/mncc_call.c M src/libmsc/mncc_sock.c A src/libmsc/msc_a.c A src/libmsc/msc_a_remote.c A src/libmsc/msc_ho.c A src/libmsc/msc_i.c A src/libmsc/msc_i_remote.c D src/libmsc/msc_ifaces.c D src/libmsc/msc_mgcp.c A src/libmsc/msc_net_init.c A src/libmsc/msc_t.c A src/libmsc/msc_t_remote.c M src/libmsc/msc_vty.c A src/libmsc/msub.c A src/libmsc/neighbor_ident.c A src/libmsc/neighbor_ident_vty.c D src/libmsc/osmo_msc.c A src/libmsc/paging.c M src/libmsc/ran_conn.c A src/libmsc/ran_infra.c A src/libmsc/ran_msg.c A src/libmsc/ran_msg_a.c A src/libmsc/ran_msg_iu.c A src/libmsc/ran_peer.c A src/libmsc/ran_up_l2.c M src/libmsc/rrlp.c A src/libmsc/rtp_stream.c A src/libmsc/sccp_ran.c M src/libmsc/sgs_iface.c M src/libmsc/sgs_server.c M src/libmsc/silent_call.c M src/libmsc/smpp_openbsc.c M src/libmsc/smpp_smsc.h M src/libmsc/sms_queue.c M src/libmsc/transaction.c M src/libvlr/vlr.c M src/libvlr/vlr_access_req_fsm.c M src/libvlr/vlr_lu_fsm.c M src/libvlr/vlr_sgs.c M src/libvlr/vlr_sgs_fsm.c M src/osmo-msc/Makefile.am M src/osmo-msc/msc_main.c M tests/Makefile.am M tests/msc_vlr/Makefile.am M tests/msc_vlr/msc_vlr_test_authen_reuse.c M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_test_gsm_authen.c M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.c M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.c M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.c M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.c M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.c M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_ss.c M tests/msc_vlr/msc_vlr_test_ss.err M tests/msc_vlr/msc_vlr_test_umts_authen.c M tests/msc_vlr/msc_vlr_test_umts_authen.err M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h M tests/sms_queue/Makefile.am M tests/sms_queue/sms_queue_test.c A tests/test_neighbor_ident.vty M tests/test_nodes.vty 151 files changed, 35,647 insertions(+), 22,990 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/13137/12 -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 12 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Harald Welte Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 00:30:55 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 00:30:55 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13137 to look at the new patch set (#13). Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... large refactoring: support inter-BSC and inter-MSC Handover 3GPP TS 49.008 '4.3 Roles of MSC-A, MSC-I and MSC-T' defines distinct roles: - MSC-A is responsible for managing subscribers, - MSC-I is the gateway to the RAN. - MSC-T is a second transitory gateway to another RAN during Handover. After inter-MSC Handover, the MSC-I is handled by a remote MSC instance, while the original MSC-A retains the responsibility of subscriber management. MSC-T exists in this patch but is not yet used, since Handover is only prepared for, not yet implemented. Facilitate Inter-MSC and inter-BSC Handover by the same internal split of MSC roles. Compared to inter-MSC Handover, mere inter-BSC has the obvious simplifications: - all of MSC-A, MSC-I and MSC-T roles will be served by the same osmo-msc instance, - messages between MSC-A and MSC-{I,T} don't need to be routed via E-interface (GSUP), - no call routing between MSC-A and -I via MNCC necessary. This is the largest code bomb I have submitted, ever. Out of principle, I apologize to everyone trying to read this as a whole. Unfortunately, I see no sense in trying to split this patch into smaller bits. It would be a huge amount of work to introduce these changes in separate chunks, especially if each should in turn be useful and pass all test suites. So, unfortunately, we are stuck with this code bomb. The following are some details and rationale for this rather huge refactoring: * separate MSC subscriber management from ran_conn struct ran_conn is reduced from the pivotal subscriber management entity it has been so far to a mere storage for an SCCP connection ID and an MSC subscriber reference. The new pivotal subscriber management entity is struct msc_a -- struct msub lists the msc_a, msc_i, msc_t roles, the vast majority of code paths however use msc_a, since MSC-A is where all the interesting stuff happens. Before handover, msc_i is an FSM implementation that encodes to the local ran_conn. After inter-MSC Handover, msc_i is a compatible but different FSM implementation that instead forwards via/from GSUP. Same goes for the msc_a struct: if osmo-msc is the MSC-I "RAN proxy" for a remote MSC-A role, the msc_a->fi is an FSM implementation that merely forwards via/from GSUP. * New SCCP implementation for RAN access To be able to forward BSSAP and RANAP messages via the GSUP interface, the individual message layers need to be cleanly separated. The IuCS implementation used until now (iu_client from libosmo-ranap) did not provide this level of separation, and needed a complete rewrite. It was trivial to implement this in such a way that both BSSAP and RANAP can be handled by the same SCCP code, hence the new SCCP-RAN layer also replaces BSSAP handling. sccp_ran.h: struct sccp_ran_inst provides an abstract handler for incoming RAN connections. A set of callback functions provides implementation specific details. * RAN Abstraction (BSSAP vs. RANAP) The common SCCP implementation did set the theme for the remaining refactoring: make all other MSC code paths entirely RAN-implementation-agnostic. ran_infra.c provides data structures that list RAN implementation specifics, from logging to RAN de-/encoding to SCCP callbacks and timers. A ran_infra pointer hence allows complete abstraction of RAN implementations: - managing connected RAN peers (BSC, RNC) in ran_peer.c, - classifying and de-/encoding RAN PDUs, - recording connected LACs and cell IDs and sending out Paging requests to matching RAN peers. * RAN RESET now also for RANAP ran_peer.c absorbs the reset_fsm from a_reset.c; in consequence, RANAP also supports proper RESET semantics now. Hence osmo-hnbgw now also needs to provide proper RESET handling, which it so far duly ignores. (TODO) * RAN de-/encoding abstraction The RAN abstraction mentioned above serves not only to separate RANAP and BSSAP implementations transparently, but also to be able to optionally handle RAN on distinct levels. Before Handover, all RAN messages are handled by the MSC-A role. However, after an inter-MSC Handover, a standalone MSC-I will need to decode RAN PDUs, at least in order to manage Assignment of RTP streams between BSS/RNC and MNCC call forwarding. ran_msg.h provides a common API with abstraction for: - receiving events from RAN, i.e. passing RAN decode from the BSC/RNC and MS/UE: struct ran_dec_msg represents RAN messages decoded from either BSSMAP or RANAP; - sending RAN events: ran_enc_msg is the counterpart to compose RAN messages that should be encoded to either BSSMAP or RANAP and passed down to the BSC/RNC and MS/UE. The RAN-specific implementations are completely contained by ran_msg_a.c and ran_msg_iu.c. In particular, Assignment and Ciphering have so far been distinct code paths for BSSAP and RANAP, with switch(via_ran){...} statements all over the place. Using RAN_DEC_* and RAN_ENC_* abstractions, these are now completely unified. Note that SGs does not qualify for RAN abstraction: the SGs interface always remains with the MSC-A role, and SGs messages follow quite distinct semantics from the fairly similar GERAN and UTRAN. * MGW and RTP stream management So far, managing MGW endpoints via MGCP was tightly glued in-between GSM-04.08-CC on the one and MNCC on the other side. Prepare for switching RTP streams between different RAN peers by moving to object-oriented implementations: implement struct call_leg and struct rtp_stream with distinct FSMs each. For MGW communication, use the osmo_mgcpc_ep API that has originated from osmo-bsc and recently moved to libosmo-mgcp-client for this purpose. Instead of implementing a sequence of events with code duplication for the RAN and CN sides, the idea is to manage each RTP stream separately by firing and receiving events as soon as codecs and RTP ports are negotiated, and letting the individual FSMs take care of the MGW management "asynchronously". The caller provides event IDs and an FSM instance that should be notified of RTP stream setup progress. Hence it becomes possible to reconnect RTP streams from one GSM-04.08-CC to another (inter-BSC Handover) or between CC and MNCC RTP peers (inter-MSC Handover) without duplicating the MGCP code for each transition. The number of FSM implementations used for MGCP handling may seem a bit of an overkill. But in fact, the number of perspectives on RTP forwarding are far from trivial: - an MGW endpoint is an entity with N connections, and MGCP "sessions" for configuring them by talking to the MGW; - an RTP stream is a remote peer connected to one of the endpoint's connections, which is asynchronously notified of codec and RTP port choices; - a call leg is the higher level view on either an MT or MO side of a voice call, a combination of two RTP streams to forward between two remote peers. BSC MGW PBX CI CI [MGW-endpoint] [--rtp_stream--] [--rtp_stream--] [----------------call_leg----------------] * Use counts Introduce using the new osmo_use_count API added to libosmocore for this purpose. Each use token has a distinct name in the logging, which can be a globally constant name or ad-hoc, like the local __func__ string constant. Use in the new struct msc_a, as well as change vlr_subscr to the new osmo_use_count API. * FSM Timeouts Introduce using the new osmo_tdef API, which provides a common VTY implementation for all timer numbers, and FSM state transitions with the correct timeout. Originated in osmo-bsc, recently moved to libosmocore. Depends: Ife31e6798b4e728a23913179e346552a7dd338c0 (libosmocore) Ib9af67b100c4583342a2103669732dab2e577b04 (libosmocore) Id617265337f09dfb6ddfe111ef5e578cd3dc9f63 (libosmocore) Ie9e2add7bbfae651c04e230d62e37cebeb91b0f5 (libosmo-sccp) I26be5c4b06a680f25f19797407ab56a5a4880ddc (osmo-mgw) Ida0e59f9a1f2dd18efea0a51680a67b69f141efa (osmo-mgw) I9a3effd38e72841529df6c135c077116981dea36 (osmo-mgw) Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd --- M configure.ac A doc/sequence_charts/Makefile.am A doc/sequence_charts/inter_bsc_ho.msc A doc/sequence_charts/inter_msc_ho.msc A doc/sequence_charts/mncc_fsm.msc M include/osmocom/msc/Makefile.am D include/osmocom/msc/a_iface.h D include/osmocom/msc/a_iface_bssap.h D include/osmocom/msc/a_reset.h A include/osmocom/msc/call_leg.h A include/osmocom/msc/cell_id_list.h A include/osmocom/msc/e_link.h M include/osmocom/msc/gsm_04_08.h M include/osmocom/msc/gsm_04_11.h M include/osmocom/msc/gsm_04_11_gsup.h M include/osmocom/msc/gsm_04_14.h M include/osmocom/msc/gsm_04_80.h M include/osmocom/msc/gsm_09_11.h M include/osmocom/msc/gsm_data.h M include/osmocom/msc/gsm_data_shared.h M include/osmocom/msc/gsm_subscriber.h A include/osmocom/msc/gsup_client_mux.h D include/osmocom/msc/iu_dummy.h D include/osmocom/msc/iucs.h D include/osmocom/msc/iucs_ranap.h M include/osmocom/msc/mncc.h A include/osmocom/msc/mncc_call.h A include/osmocom/msc/msc_a.h A include/osmocom/msc/msc_a_remote.h M include/osmocom/msc/msc_common.h A include/osmocom/msc/msc_ho.h A include/osmocom/msc/msc_i.h A include/osmocom/msc/msc_i_remote.h D include/osmocom/msc/msc_ifaces.h D include/osmocom/msc/msc_mgcp.h A include/osmocom/msc/msc_roles.h A include/osmocom/msc/msc_t.h A include/osmocom/msc/msc_t_remote.h A include/osmocom/msc/msub.h A include/osmocom/msc/neighbor_ident.h A include/osmocom/msc/paging.h M include/osmocom/msc/ran_conn.h A include/osmocom/msc/ran_infra.h A include/osmocom/msc/ran_msg.h A include/osmocom/msc/ran_msg_a.h A include/osmocom/msc/ran_msg_iu.h A include/osmocom/msc/ran_peer.h A include/osmocom/msc/rtp_stream.h A include/osmocom/msc/sccp_ran.h M include/osmocom/msc/sgs_iface.h M include/osmocom/msc/signal.h M include/osmocom/msc/silent_call.h M include/osmocom/msc/sms_queue.h M include/osmocom/msc/transaction.h M include/osmocom/msc/vlr.h M include/osmocom/msc/vlr_sgs.h M src/libmsc/Makefile.am D src/libmsc/a_iface.c D src/libmsc/a_iface_bssap.c D src/libmsc/a_reset.c A src/libmsc/call_leg.c A src/libmsc/cell_id_list.c A src/libmsc/e_link.c M src/libmsc/gsm_04_08.c M src/libmsc/gsm_04_08_cc.c M src/libmsc/gsm_04_11.c M src/libmsc/gsm_04_11_gsup.c M src/libmsc/gsm_04_14.c M src/libmsc/gsm_04_80.c M src/libmsc/gsm_09_11.c D src/libmsc/gsm_subscriber.c A src/libmsc/gsup_client_mux.c D src/libmsc/iu_dummy.c D src/libmsc/iucs.c D src/libmsc/iucs_ranap.c M src/libmsc/mncc.c M src/libmsc/mncc_builtin.c A src/libmsc/mncc_call.c M src/libmsc/mncc_sock.c A src/libmsc/msc_a.c A src/libmsc/msc_a_remote.c A src/libmsc/msc_ho.c A src/libmsc/msc_i.c A src/libmsc/msc_i_remote.c D src/libmsc/msc_ifaces.c D src/libmsc/msc_mgcp.c A src/libmsc/msc_net_init.c A src/libmsc/msc_t.c A src/libmsc/msc_t_remote.c M src/libmsc/msc_vty.c A src/libmsc/msub.c A src/libmsc/neighbor_ident.c A src/libmsc/neighbor_ident_vty.c D src/libmsc/osmo_msc.c A src/libmsc/paging.c M src/libmsc/ran_conn.c A src/libmsc/ran_infra.c A src/libmsc/ran_msg.c A src/libmsc/ran_msg_a.c A src/libmsc/ran_msg_iu.c A src/libmsc/ran_peer.c A src/libmsc/ran_up_l2.c M src/libmsc/rrlp.c A src/libmsc/rtp_stream.c A src/libmsc/sccp_ran.c M src/libmsc/sgs_iface.c M src/libmsc/sgs_server.c M src/libmsc/silent_call.c M src/libmsc/smpp_openbsc.c M src/libmsc/smpp_smsc.h M src/libmsc/sms_queue.c M src/libmsc/transaction.c M src/libvlr/vlr.c M src/libvlr/vlr_access_req_fsm.c M src/libvlr/vlr_lu_fsm.c M src/libvlr/vlr_sgs.c M src/libvlr/vlr_sgs_fsm.c M src/osmo-msc/Makefile.am M src/osmo-msc/msc_main.c M tests/Makefile.am M tests/msc_vlr/Makefile.am M tests/msc_vlr/msc_vlr_test_authen_reuse.c M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_test_gsm_authen.c M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.c M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.c M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.c M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.c M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.c M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_ss.c M tests/msc_vlr/msc_vlr_test_ss.err M tests/msc_vlr/msc_vlr_test_umts_authen.c M tests/msc_vlr/msc_vlr_test_umts_authen.err M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h M tests/sms_queue/Makefile.am A tests/test_neighbor_ident.vty M tests/test_nodes.vty 150 files changed, 35,646 insertions(+), 22,990 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/13137/13 -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 13 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Harald Welte Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 00:42:33 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 00:42:33 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13137 to look at the new patch set (#14). Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... large refactoring: support inter-BSC and inter-MSC Handover 3GPP TS 49.008 '4.3 Roles of MSC-A, MSC-I and MSC-T' defines distinct roles: - MSC-A is responsible for managing subscribers, - MSC-I is the gateway to the RAN. - MSC-T is a second transitory gateway to another RAN during Handover. After inter-MSC Handover, the MSC-I is handled by a remote MSC instance, while the original MSC-A retains the responsibility of subscriber management. MSC-T exists in this patch but is not yet used, since Handover is only prepared for, not yet implemented. Facilitate Inter-MSC and inter-BSC Handover by the same internal split of MSC roles. Compared to inter-MSC Handover, mere inter-BSC has the obvious simplifications: - all of MSC-A, MSC-I and MSC-T roles will be served by the same osmo-msc instance, - messages between MSC-A and MSC-{I,T} don't need to be routed via E-interface (GSUP), - no call routing between MSC-A and -I via MNCC necessary. This is the largest code bomb I have submitted, ever. Out of principle, I apologize to everyone trying to read this as a whole. Unfortunately, I see no sense in trying to split this patch into smaller bits. It would be a huge amount of work to introduce these changes in separate chunks, especially if each should in turn be useful and pass all test suites. So, unfortunately, we are stuck with this code bomb. The following are some details and rationale for this rather huge refactoring: * separate MSC subscriber management from ran_conn struct ran_conn is reduced from the pivotal subscriber management entity it has been so far to a mere storage for an SCCP connection ID and an MSC subscriber reference. The new pivotal subscriber management entity is struct msc_a -- struct msub lists the msc_a, msc_i, msc_t roles, the vast majority of code paths however use msc_a, since MSC-A is where all the interesting stuff happens. Before handover, msc_i is an FSM implementation that encodes to the local ran_conn. After inter-MSC Handover, msc_i is a compatible but different FSM implementation that instead forwards via/from GSUP. Same goes for the msc_a struct: if osmo-msc is the MSC-I "RAN proxy" for a remote MSC-A role, the msc_a->fi is an FSM implementation that merely forwards via/from GSUP. * New SCCP implementation for RAN access To be able to forward BSSAP and RANAP messages via the GSUP interface, the individual message layers need to be cleanly separated. The IuCS implementation used until now (iu_client from libosmo-ranap) did not provide this level of separation, and needed a complete rewrite. It was trivial to implement this in such a way that both BSSAP and RANAP can be handled by the same SCCP code, hence the new SCCP-RAN layer also replaces BSSAP handling. sccp_ran.h: struct sccp_ran_inst provides an abstract handler for incoming RAN connections. A set of callback functions provides implementation specific details. * RAN Abstraction (BSSAP vs. RANAP) The common SCCP implementation did set the theme for the remaining refactoring: make all other MSC code paths entirely RAN-implementation-agnostic. ran_infra.c provides data structures that list RAN implementation specifics, from logging to RAN de-/encoding to SCCP callbacks and timers. A ran_infra pointer hence allows complete abstraction of RAN implementations: - managing connected RAN peers (BSC, RNC) in ran_peer.c, - classifying and de-/encoding RAN PDUs, - recording connected LACs and cell IDs and sending out Paging requests to matching RAN peers. * RAN RESET now also for RANAP ran_peer.c absorbs the reset_fsm from a_reset.c; in consequence, RANAP also supports proper RESET semantics now. Hence osmo-hnbgw now also needs to provide proper RESET handling, which it so far duly ignores. (TODO) * RAN de-/encoding abstraction The RAN abstraction mentioned above serves not only to separate RANAP and BSSAP implementations transparently, but also to be able to optionally handle RAN on distinct levels. Before Handover, all RAN messages are handled by the MSC-A role. However, after an inter-MSC Handover, a standalone MSC-I will need to decode RAN PDUs, at least in order to manage Assignment of RTP streams between BSS/RNC and MNCC call forwarding. ran_msg.h provides a common API with abstraction for: - receiving events from RAN, i.e. passing RAN decode from the BSC/RNC and MS/UE: struct ran_dec_msg represents RAN messages decoded from either BSSMAP or RANAP; - sending RAN events: ran_enc_msg is the counterpart to compose RAN messages that should be encoded to either BSSMAP or RANAP and passed down to the BSC/RNC and MS/UE. The RAN-specific implementations are completely contained by ran_msg_a.c and ran_msg_iu.c. In particular, Assignment and Ciphering have so far been distinct code paths for BSSAP and RANAP, with switch(via_ran){...} statements all over the place. Using RAN_DEC_* and RAN_ENC_* abstractions, these are now completely unified. Note that SGs does not qualify for RAN abstraction: the SGs interface always remains with the MSC-A role, and SGs messages follow quite distinct semantics from the fairly similar GERAN and UTRAN. * MGW and RTP stream management So far, managing MGW endpoints via MGCP was tightly glued in-between GSM-04.08-CC on the one and MNCC on the other side. Prepare for switching RTP streams between different RAN peers by moving to object-oriented implementations: implement struct call_leg and struct rtp_stream with distinct FSMs each. For MGW communication, use the osmo_mgcpc_ep API that has originated from osmo-bsc and recently moved to libosmo-mgcp-client for this purpose. Instead of implementing a sequence of events with code duplication for the RAN and CN sides, the idea is to manage each RTP stream separately by firing and receiving events as soon as codecs and RTP ports are negotiated, and letting the individual FSMs take care of the MGW management "asynchronously". The caller provides event IDs and an FSM instance that should be notified of RTP stream setup progress. Hence it becomes possible to reconnect RTP streams from one GSM-04.08-CC to another (inter-BSC Handover) or between CC and MNCC RTP peers (inter-MSC Handover) without duplicating the MGCP code for each transition. The number of FSM implementations used for MGCP handling may seem a bit of an overkill. But in fact, the number of perspectives on RTP forwarding are far from trivial: - an MGW endpoint is an entity with N connections, and MGCP "sessions" for configuring them by talking to the MGW; - an RTP stream is a remote peer connected to one of the endpoint's connections, which is asynchronously notified of codec and RTP port choices; - a call leg is the higher level view on either an MT or MO side of a voice call, a combination of two RTP streams to forward between two remote peers. BSC MGW PBX CI CI [MGW-endpoint] [--rtp_stream--] [--rtp_stream--] [----------------call_leg----------------] * Use counts Introduce using the new osmo_use_count API added to libosmocore for this purpose. Each use token has a distinct name in the logging, which can be a globally constant name or ad-hoc, like the local __func__ string constant. Use in the new struct msc_a, as well as change vlr_subscr to the new osmo_use_count API. * FSM Timeouts Introduce using the new osmo_tdef API, which provides a common VTY implementation for all timer numbers, and FSM state transitions with the correct timeout. Originated in osmo-bsc, recently moved to libosmocore. Depends: Ife31e6798b4e728a23913179e346552a7dd338c0 (libosmocore) Ib9af67b100c4583342a2103669732dab2e577b04 (libosmocore) Id617265337f09dfb6ddfe111ef5e578cd3dc9f63 (libosmocore) Ie9e2add7bbfae651c04e230d62e37cebeb91b0f5 (libosmo-sccp) I26be5c4b06a680f25f19797407ab56a5a4880ddc (osmo-mgw) Ida0e59f9a1f2dd18efea0a51680a67b69f141efa (osmo-mgw) I9a3effd38e72841529df6c135c077116981dea36 (osmo-mgw) Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd --- M configure.ac A doc/sequence_charts/Makefile.am A doc/sequence_charts/inter_bsc_ho.msc A doc/sequence_charts/inter_msc_ho.msc A doc/sequence_charts/mncc_fsm.msc M include/osmocom/msc/Makefile.am D include/osmocom/msc/a_iface.h D include/osmocom/msc/a_iface_bssap.h D include/osmocom/msc/a_reset.h A include/osmocom/msc/call_leg.h A include/osmocom/msc/cell_id_list.h A include/osmocom/msc/e_link.h M include/osmocom/msc/gsm_04_08.h M include/osmocom/msc/gsm_04_11.h M include/osmocom/msc/gsm_04_11_gsup.h M include/osmocom/msc/gsm_04_14.h M include/osmocom/msc/gsm_04_80.h M include/osmocom/msc/gsm_09_11.h M include/osmocom/msc/gsm_data.h M include/osmocom/msc/gsm_data_shared.h M include/osmocom/msc/gsm_subscriber.h A include/osmocom/msc/gsup_client_mux.h D include/osmocom/msc/iu_dummy.h D include/osmocom/msc/iucs.h D include/osmocom/msc/iucs_ranap.h M include/osmocom/msc/mncc.h A include/osmocom/msc/mncc_call.h A include/osmocom/msc/msc_a.h A include/osmocom/msc/msc_a_remote.h M include/osmocom/msc/msc_common.h A include/osmocom/msc/msc_ho.h A include/osmocom/msc/msc_i.h A include/osmocom/msc/msc_i_remote.h D include/osmocom/msc/msc_ifaces.h D include/osmocom/msc/msc_mgcp.h A include/osmocom/msc/msc_roles.h A include/osmocom/msc/msc_t.h A include/osmocom/msc/msc_t_remote.h A include/osmocom/msc/msub.h A include/osmocom/msc/neighbor_ident.h A include/osmocom/msc/paging.h M include/osmocom/msc/ran_conn.h A include/osmocom/msc/ran_infra.h A include/osmocom/msc/ran_msg.h A include/osmocom/msc/ran_msg_a.h A include/osmocom/msc/ran_msg_iu.h A include/osmocom/msc/ran_peer.h A include/osmocom/msc/rtp_stream.h A include/osmocom/msc/sccp_ran.h M include/osmocom/msc/sgs_iface.h M include/osmocom/msc/signal.h M include/osmocom/msc/silent_call.h M include/osmocom/msc/sms_queue.h M include/osmocom/msc/transaction.h M include/osmocom/msc/vlr.h M include/osmocom/msc/vlr_sgs.h M src/libmsc/Makefile.am D src/libmsc/a_iface.c D src/libmsc/a_iface_bssap.c D src/libmsc/a_reset.c A src/libmsc/call_leg.c A src/libmsc/cell_id_list.c A src/libmsc/e_link.c M src/libmsc/gsm_04_08.c M src/libmsc/gsm_04_08_cc.c M src/libmsc/gsm_04_11.c M src/libmsc/gsm_04_11_gsup.c M src/libmsc/gsm_04_14.c M src/libmsc/gsm_04_80.c M src/libmsc/gsm_09_11.c D src/libmsc/gsm_subscriber.c A src/libmsc/gsup_client_mux.c D src/libmsc/iu_dummy.c D src/libmsc/iucs.c D src/libmsc/iucs_ranap.c M src/libmsc/mncc.c M src/libmsc/mncc_builtin.c A src/libmsc/mncc_call.c M src/libmsc/mncc_sock.c A src/libmsc/msc_a.c A src/libmsc/msc_a_remote.c A src/libmsc/msc_ho.c A src/libmsc/msc_i.c A src/libmsc/msc_i_remote.c D src/libmsc/msc_ifaces.c D src/libmsc/msc_mgcp.c A src/libmsc/msc_net_init.c A src/libmsc/msc_t.c A src/libmsc/msc_t_remote.c M src/libmsc/msc_vty.c A src/libmsc/msub.c A src/libmsc/neighbor_ident.c A src/libmsc/neighbor_ident_vty.c D src/libmsc/osmo_msc.c A src/libmsc/paging.c M src/libmsc/ran_conn.c A src/libmsc/ran_infra.c A src/libmsc/ran_msg.c A src/libmsc/ran_msg_a.c A src/libmsc/ran_msg_iu.c A src/libmsc/ran_peer.c A src/libmsc/ran_up_l2.c M src/libmsc/rrlp.c A src/libmsc/rtp_stream.c A src/libmsc/sccp_ran.c M src/libmsc/sgs_iface.c M src/libmsc/sgs_server.c M src/libmsc/silent_call.c M src/libmsc/smpp_openbsc.c M src/libmsc/smpp_smsc.h M src/libmsc/sms_queue.c M src/libmsc/transaction.c M src/libvlr/vlr.c M src/libvlr/vlr_access_req_fsm.c M src/libvlr/vlr_lu_fsm.c M src/libvlr/vlr_sgs.c M src/libvlr/vlr_sgs_fsm.c M src/osmo-msc/Makefile.am M src/osmo-msc/msc_main.c M tests/Makefile.am M tests/msc_vlr/Makefile.am M tests/msc_vlr/msc_vlr_test_authen_reuse.c M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_test_gsm_authen.c M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.c M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.c M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.c M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.c M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.c M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_ss.c M tests/msc_vlr/msc_vlr_test_ss.err M tests/msc_vlr/msc_vlr_test_umts_authen.c M tests/msc_vlr/msc_vlr_test_umts_authen.err M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h M tests/sms_queue/Makefile.am A tests/test_neighbor_ident.vty M tests/test_nodes.vty 150 files changed, 35,652 insertions(+), 22,990 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/13137/14 -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 14 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Harald Welte Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 01:06:30 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 01:06:30 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13137 to look at the new patch set (#15). Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... large refactoring: support inter-BSC and inter-MSC Handover 3GPP TS 49.008 '4.3 Roles of MSC-A, MSC-I and MSC-T' defines distinct roles: - MSC-A is responsible for managing subscribers, - MSC-I is the gateway to the RAN. - MSC-T is a second transitory gateway to another RAN during Handover. After inter-MSC Handover, the MSC-I is handled by a remote MSC instance, while the original MSC-A retains the responsibility of subscriber management. MSC-T exists in this patch but is not yet used, since Handover is only prepared for, not yet implemented. Facilitate Inter-MSC and inter-BSC Handover by the same internal split of MSC roles. Compared to inter-MSC Handover, mere inter-BSC has the obvious simplifications: - all of MSC-A, MSC-I and MSC-T roles will be served by the same osmo-msc instance, - messages between MSC-A and MSC-{I,T} don't need to be routed via E-interface (GSUP), - no call routing between MSC-A and -I via MNCC necessary. This is the largest code bomb I have submitted, ever. Out of principle, I apologize to everyone trying to read this as a whole. Unfortunately, I see no sense in trying to split this patch into smaller bits. It would be a huge amount of work to introduce these changes in separate chunks, especially if each should in turn be useful and pass all test suites. So, unfortunately, we are stuck with this code bomb. The following are some details and rationale for this rather huge refactoring: * separate MSC subscriber management from ran_conn struct ran_conn is reduced from the pivotal subscriber management entity it has been so far to a mere storage for an SCCP connection ID and an MSC subscriber reference. The new pivotal subscriber management entity is struct msc_a -- struct msub lists the msc_a, msc_i, msc_t roles, the vast majority of code paths however use msc_a, since MSC-A is where all the interesting stuff happens. Before handover, msc_i is an FSM implementation that encodes to the local ran_conn. After inter-MSC Handover, msc_i is a compatible but different FSM implementation that instead forwards via/from GSUP. Same goes for the msc_a struct: if osmo-msc is the MSC-I "RAN proxy" for a remote MSC-A role, the msc_a->fi is an FSM implementation that merely forwards via/from GSUP. * New SCCP implementation for RAN access To be able to forward BSSAP and RANAP messages via the GSUP interface, the individual message layers need to be cleanly separated. The IuCS implementation used until now (iu_client from libosmo-ranap) did not provide this level of separation, and needed a complete rewrite. It was trivial to implement this in such a way that both BSSAP and RANAP can be handled by the same SCCP code, hence the new SCCP-RAN layer also replaces BSSAP handling. sccp_ran.h: struct sccp_ran_inst provides an abstract handler for incoming RAN connections. A set of callback functions provides implementation specific details. * RAN Abstraction (BSSAP vs. RANAP) The common SCCP implementation did set the theme for the remaining refactoring: make all other MSC code paths entirely RAN-implementation-agnostic. ran_infra.c provides data structures that list RAN implementation specifics, from logging to RAN de-/encoding to SCCP callbacks and timers. A ran_infra pointer hence allows complete abstraction of RAN implementations: - managing connected RAN peers (BSC, RNC) in ran_peer.c, - classifying and de-/encoding RAN PDUs, - recording connected LACs and cell IDs and sending out Paging requests to matching RAN peers. * RAN RESET now also for RANAP ran_peer.c absorbs the reset_fsm from a_reset.c; in consequence, RANAP also supports proper RESET semantics now. Hence osmo-hnbgw now also needs to provide proper RESET handling, which it so far duly ignores. (TODO) * RAN de-/encoding abstraction The RAN abstraction mentioned above serves not only to separate RANAP and BSSAP implementations transparently, but also to be able to optionally handle RAN on distinct levels. Before Handover, all RAN messages are handled by the MSC-A role. However, after an inter-MSC Handover, a standalone MSC-I will need to decode RAN PDUs, at least in order to manage Assignment of RTP streams between BSS/RNC and MNCC call forwarding. ran_msg.h provides a common API with abstraction for: - receiving events from RAN, i.e. passing RAN decode from the BSC/RNC and MS/UE: struct ran_dec_msg represents RAN messages decoded from either BSSMAP or RANAP; - sending RAN events: ran_enc_msg is the counterpart to compose RAN messages that should be encoded to either BSSMAP or RANAP and passed down to the BSC/RNC and MS/UE. The RAN-specific implementations are completely contained by ran_msg_a.c and ran_msg_iu.c. In particular, Assignment and Ciphering have so far been distinct code paths for BSSAP and RANAP, with switch(via_ran){...} statements all over the place. Using RAN_DEC_* and RAN_ENC_* abstractions, these are now completely unified. Note that SGs does not qualify for RAN abstraction: the SGs interface always remains with the MSC-A role, and SGs messages follow quite distinct semantics from the fairly similar GERAN and UTRAN. * MGW and RTP stream management So far, managing MGW endpoints via MGCP was tightly glued in-between GSM-04.08-CC on the one and MNCC on the other side. Prepare for switching RTP streams between different RAN peers by moving to object-oriented implementations: implement struct call_leg and struct rtp_stream with distinct FSMs each. For MGW communication, use the osmo_mgcpc_ep API that has originated from osmo-bsc and recently moved to libosmo-mgcp-client for this purpose. Instead of implementing a sequence of events with code duplication for the RAN and CN sides, the idea is to manage each RTP stream separately by firing and receiving events as soon as codecs and RTP ports are negotiated, and letting the individual FSMs take care of the MGW management "asynchronously". The caller provides event IDs and an FSM instance that should be notified of RTP stream setup progress. Hence it becomes possible to reconnect RTP streams from one GSM-04.08-CC to another (inter-BSC Handover) or between CC and MNCC RTP peers (inter-MSC Handover) without duplicating the MGCP code for each transition. The number of FSM implementations used for MGCP handling may seem a bit of an overkill. But in fact, the number of perspectives on RTP forwarding are far from trivial: - an MGW endpoint is an entity with N connections, and MGCP "sessions" for configuring them by talking to the MGW; - an RTP stream is a remote peer connected to one of the endpoint's connections, which is asynchronously notified of codec and RTP port choices; - a call leg is the higher level view on either an MT or MO side of a voice call, a combination of two RTP streams to forward between two remote peers. BSC MGW PBX CI CI [MGW-endpoint] [--rtp_stream--] [--rtp_stream--] [----------------call_leg----------------] * Use counts Introduce using the new osmo_use_count API added to libosmocore for this purpose. Each use token has a distinct name in the logging, which can be a globally constant name or ad-hoc, like the local __func__ string constant. Use in the new struct msc_a, as well as change vlr_subscr to the new osmo_use_count API. * FSM Timeouts Introduce using the new osmo_tdef API, which provides a common VTY implementation for all timer numbers, and FSM state transitions with the correct timeout. Originated in osmo-bsc, recently moved to libosmocore. Depends: Ife31e6798b4e728a23913179e346552a7dd338c0 (libosmocore) Ib9af67b100c4583342a2103669732dab2e577b04 (libosmocore) Id617265337f09dfb6ddfe111ef5e578cd3dc9f63 (libosmocore) Ie9e2add7bbfae651c04e230d62e37cebeb91b0f5 (libosmo-sccp) I26be5c4b06a680f25f19797407ab56a5a4880ddc (osmo-mgw) Ida0e59f9a1f2dd18efea0a51680a67b69f141efa (osmo-mgw) I9a3effd38e72841529df6c135c077116981dea36 (osmo-mgw) Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd --- M configure.ac A doc/sequence_charts/Makefile.am A doc/sequence_charts/inter_bsc_ho.msc A doc/sequence_charts/inter_msc_ho.msc A doc/sequence_charts/mncc_fsm.msc M include/osmocom/msc/Makefile.am D include/osmocom/msc/a_iface.h D include/osmocom/msc/a_iface_bssap.h D include/osmocom/msc/a_reset.h A include/osmocom/msc/call_leg.h A include/osmocom/msc/cell_id_list.h A include/osmocom/msc/e_link.h M include/osmocom/msc/gsm_04_08.h M include/osmocom/msc/gsm_04_11.h M include/osmocom/msc/gsm_04_11_gsup.h M include/osmocom/msc/gsm_04_14.h M include/osmocom/msc/gsm_04_80.h M include/osmocom/msc/gsm_09_11.h M include/osmocom/msc/gsm_data.h M include/osmocom/msc/gsm_data_shared.h M include/osmocom/msc/gsm_subscriber.h A include/osmocom/msc/gsup_client_mux.h D include/osmocom/msc/iu_dummy.h D include/osmocom/msc/iucs.h D include/osmocom/msc/iucs_ranap.h M include/osmocom/msc/mncc.h A include/osmocom/msc/mncc_call.h A include/osmocom/msc/msc_a.h A include/osmocom/msc/msc_a_remote.h M include/osmocom/msc/msc_common.h A include/osmocom/msc/msc_ho.h A include/osmocom/msc/msc_i.h A include/osmocom/msc/msc_i_remote.h D include/osmocom/msc/msc_ifaces.h D include/osmocom/msc/msc_mgcp.h A include/osmocom/msc/msc_roles.h A include/osmocom/msc/msc_t.h A include/osmocom/msc/msc_t_remote.h A include/osmocom/msc/msub.h A include/osmocom/msc/neighbor_ident.h A include/osmocom/msc/paging.h M include/osmocom/msc/ran_conn.h A include/osmocom/msc/ran_infra.h A include/osmocom/msc/ran_msg.h A include/osmocom/msc/ran_msg_a.h A include/osmocom/msc/ran_msg_iu.h A include/osmocom/msc/ran_peer.h A include/osmocom/msc/rtp_stream.h A include/osmocom/msc/sccp_ran.h M include/osmocom/msc/sgs_iface.h M include/osmocom/msc/signal.h M include/osmocom/msc/silent_call.h M include/osmocom/msc/sms_queue.h M include/osmocom/msc/transaction.h M include/osmocom/msc/vlr.h M include/osmocom/msc/vlr_sgs.h M src/libmsc/Makefile.am D src/libmsc/a_iface.c D src/libmsc/a_iface_bssap.c D src/libmsc/a_reset.c A src/libmsc/call_leg.c A src/libmsc/cell_id_list.c A src/libmsc/e_link.c M src/libmsc/gsm_04_08.c M src/libmsc/gsm_04_08_cc.c M src/libmsc/gsm_04_11.c M src/libmsc/gsm_04_11_gsup.c M src/libmsc/gsm_04_14.c M src/libmsc/gsm_04_80.c M src/libmsc/gsm_09_11.c D src/libmsc/gsm_subscriber.c A src/libmsc/gsup_client_mux.c D src/libmsc/iu_dummy.c D src/libmsc/iucs.c D src/libmsc/iucs_ranap.c M src/libmsc/mncc.c M src/libmsc/mncc_builtin.c A src/libmsc/mncc_call.c M src/libmsc/mncc_sock.c A src/libmsc/msc_a.c A src/libmsc/msc_a_remote.c A src/libmsc/msc_ho.c A src/libmsc/msc_i.c A src/libmsc/msc_i_remote.c D src/libmsc/msc_ifaces.c D src/libmsc/msc_mgcp.c A src/libmsc/msc_net_init.c A src/libmsc/msc_t.c A src/libmsc/msc_t_remote.c M src/libmsc/msc_vty.c A src/libmsc/msub.c A src/libmsc/neighbor_ident.c A src/libmsc/neighbor_ident_vty.c D src/libmsc/osmo_msc.c A src/libmsc/paging.c M src/libmsc/ran_conn.c A src/libmsc/ran_infra.c A src/libmsc/ran_msg.c A src/libmsc/ran_msg_a.c A src/libmsc/ran_msg_iu.c A src/libmsc/ran_peer.c A src/libmsc/ran_up_l2.c M src/libmsc/rrlp.c A src/libmsc/rtp_stream.c A src/libmsc/sccp_ran.c M src/libmsc/sgs_iface.c M src/libmsc/sgs_server.c M src/libmsc/silent_call.c M src/libmsc/smpp_openbsc.c M src/libmsc/smpp_smsc.h M src/libmsc/sms_queue.c M src/libmsc/transaction.c M src/libvlr/vlr.c M src/libvlr/vlr_access_req_fsm.c M src/libvlr/vlr_lu_fsm.c M src/libvlr/vlr_sgs.c M src/libvlr/vlr_sgs_fsm.c M src/osmo-msc/Makefile.am M src/osmo-msc/msc_main.c M tests/Makefile.am M tests/msc_vlr/Makefile.am M tests/msc_vlr/msc_vlr_test_authen_reuse.c M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_test_gsm_authen.c M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.c M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.c M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.c M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.c M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.c M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_ss.c M tests/msc_vlr/msc_vlr_test_ss.err M tests/msc_vlr/msc_vlr_test_umts_authen.c M tests/msc_vlr/msc_vlr_test_umts_authen.err M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h M tests/sms_queue/Makefile.am A tests/test_neighbor_ident.vty M tests/test_nodes.vty 150 files changed, 35,653 insertions(+), 22,990 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/13137/15 -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 15 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Harald Welte Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 01:21:42 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 01:21:42 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13137 to look at the new patch set (#16). Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... large refactoring: support inter-BSC and inter-MSC Handover 3GPP TS 49.008 '4.3 Roles of MSC-A, MSC-I and MSC-T' defines distinct roles: - MSC-A is responsible for managing subscribers, - MSC-I is the gateway to the RAN. - MSC-T is a second transitory gateway to another RAN during Handover. After inter-MSC Handover, the MSC-I is handled by a remote MSC instance, while the original MSC-A retains the responsibility of subscriber management. MSC-T exists in this patch but is not yet used, since Handover is only prepared for, not yet implemented. Facilitate Inter-MSC and inter-BSC Handover by the same internal split of MSC roles. Compared to inter-MSC Handover, mere inter-BSC has the obvious simplifications: - all of MSC-A, MSC-I and MSC-T roles will be served by the same osmo-msc instance, - messages between MSC-A and MSC-{I,T} don't need to be routed via E-interface (GSUP), - no call routing between MSC-A and -I via MNCC necessary. This is the largest code bomb I have submitted, ever. Out of principle, I apologize to everyone trying to read this as a whole. Unfortunately, I see no sense in trying to split this patch into smaller bits. It would be a huge amount of work to introduce these changes in separate chunks, especially if each should in turn be useful and pass all test suites. So, unfortunately, we are stuck with this code bomb. The following are some details and rationale for this rather huge refactoring: * separate MSC subscriber management from ran_conn struct ran_conn is reduced from the pivotal subscriber management entity it has been so far to a mere storage for an SCCP connection ID and an MSC subscriber reference. The new pivotal subscriber management entity is struct msc_a -- struct msub lists the msc_a, msc_i, msc_t roles, the vast majority of code paths however use msc_a, since MSC-A is where all the interesting stuff happens. Before handover, msc_i is an FSM implementation that encodes to the local ran_conn. After inter-MSC Handover, msc_i is a compatible but different FSM implementation that instead forwards via/from GSUP. Same goes for the msc_a struct: if osmo-msc is the MSC-I "RAN proxy" for a remote MSC-A role, the msc_a->fi is an FSM implementation that merely forwards via/from GSUP. * New SCCP implementation for RAN access To be able to forward BSSAP and RANAP messages via the GSUP interface, the individual message layers need to be cleanly separated. The IuCS implementation used until now (iu_client from libosmo-ranap) did not provide this level of separation, and needed a complete rewrite. It was trivial to implement this in such a way that both BSSAP and RANAP can be handled by the same SCCP code, hence the new SCCP-RAN layer also replaces BSSAP handling. sccp_ran.h: struct sccp_ran_inst provides an abstract handler for incoming RAN connections. A set of callback functions provides implementation specific details. * RAN Abstraction (BSSAP vs. RANAP) The common SCCP implementation did set the theme for the remaining refactoring: make all other MSC code paths entirely RAN-implementation-agnostic. ran_infra.c provides data structures that list RAN implementation specifics, from logging to RAN de-/encoding to SCCP callbacks and timers. A ran_infra pointer hence allows complete abstraction of RAN implementations: - managing connected RAN peers (BSC, RNC) in ran_peer.c, - classifying and de-/encoding RAN PDUs, - recording connected LACs and cell IDs and sending out Paging requests to matching RAN peers. * RAN RESET now also for RANAP ran_peer.c absorbs the reset_fsm from a_reset.c; in consequence, RANAP also supports proper RESET semantics now. Hence osmo-hnbgw now also needs to provide proper RESET handling, which it so far duly ignores. (TODO) * RAN de-/encoding abstraction The RAN abstraction mentioned above serves not only to separate RANAP and BSSAP implementations transparently, but also to be able to optionally handle RAN on distinct levels. Before Handover, all RAN messages are handled by the MSC-A role. However, after an inter-MSC Handover, a standalone MSC-I will need to decode RAN PDUs, at least in order to manage Assignment of RTP streams between BSS/RNC and MNCC call forwarding. ran_msg.h provides a common API with abstraction for: - receiving events from RAN, i.e. passing RAN decode from the BSC/RNC and MS/UE: struct ran_dec_msg represents RAN messages decoded from either BSSMAP or RANAP; - sending RAN events: ran_enc_msg is the counterpart to compose RAN messages that should be encoded to either BSSMAP or RANAP and passed down to the BSC/RNC and MS/UE. The RAN-specific implementations are completely contained by ran_msg_a.c and ran_msg_iu.c. In particular, Assignment and Ciphering have so far been distinct code paths for BSSAP and RANAP, with switch(via_ran){...} statements all over the place. Using RAN_DEC_* and RAN_ENC_* abstractions, these are now completely unified. Note that SGs does not qualify for RAN abstraction: the SGs interface always remains with the MSC-A role, and SGs messages follow quite distinct semantics from the fairly similar GERAN and UTRAN. * MGW and RTP stream management So far, managing MGW endpoints via MGCP was tightly glued in-between GSM-04.08-CC on the one and MNCC on the other side. Prepare for switching RTP streams between different RAN peers by moving to object-oriented implementations: implement struct call_leg and struct rtp_stream with distinct FSMs each. For MGW communication, use the osmo_mgcpc_ep API that has originated from osmo-bsc and recently moved to libosmo-mgcp-client for this purpose. Instead of implementing a sequence of events with code duplication for the RAN and CN sides, the idea is to manage each RTP stream separately by firing and receiving events as soon as codecs and RTP ports are negotiated, and letting the individual FSMs take care of the MGW management "asynchronously". The caller provides event IDs and an FSM instance that should be notified of RTP stream setup progress. Hence it becomes possible to reconnect RTP streams from one GSM-04.08-CC to another (inter-BSC Handover) or between CC and MNCC RTP peers (inter-MSC Handover) without duplicating the MGCP code for each transition. The number of FSM implementations used for MGCP handling may seem a bit of an overkill. But in fact, the number of perspectives on RTP forwarding are far from trivial: - an MGW endpoint is an entity with N connections, and MGCP "sessions" for configuring them by talking to the MGW; - an RTP stream is a remote peer connected to one of the endpoint's connections, which is asynchronously notified of codec and RTP port choices; - a call leg is the higher level view on either an MT or MO side of a voice call, a combination of two RTP streams to forward between two remote peers. BSC MGW PBX CI CI [MGW-endpoint] [--rtp_stream--] [--rtp_stream--] [----------------call_leg----------------] * Use counts Introduce using the new osmo_use_count API added to libosmocore for this purpose. Each use token has a distinct name in the logging, which can be a globally constant name or ad-hoc, like the local __func__ string constant. Use in the new struct msc_a, as well as change vlr_subscr to the new osmo_use_count API. * FSM Timeouts Introduce using the new osmo_tdef API, which provides a common VTY implementation for all timer numbers, and FSM state transitions with the correct timeout. Originated in osmo-bsc, recently moved to libosmocore. Depends: Ife31e6798b4e728a23913179e346552a7dd338c0 (libosmocore) Ib9af67b100c4583342a2103669732dab2e577b04 (libosmocore) Id617265337f09dfb6ddfe111ef5e578cd3dc9f63 (libosmocore) Ie9e2add7bbfae651c04e230d62e37cebeb91b0f5 (libosmo-sccp) I26be5c4b06a680f25f19797407ab56a5a4880ddc (osmo-mgw) Ida0e59f9a1f2dd18efea0a51680a67b69f141efa (osmo-mgw) I9a3effd38e72841529df6c135c077116981dea36 (osmo-mgw) Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd --- M configure.ac M doc/Makefile.am A doc/sequence_charts/Makefile.am A doc/sequence_charts/inter_bsc_ho.msc A doc/sequence_charts/inter_msc_ho.msc A doc/sequence_charts/mncc_fsm.msc M include/osmocom/msc/Makefile.am D include/osmocom/msc/a_iface.h D include/osmocom/msc/a_iface_bssap.h D include/osmocom/msc/a_reset.h A include/osmocom/msc/call_leg.h A include/osmocom/msc/cell_id_list.h A include/osmocom/msc/e_link.h M include/osmocom/msc/gsm_04_08.h M include/osmocom/msc/gsm_04_11.h M include/osmocom/msc/gsm_04_11_gsup.h M include/osmocom/msc/gsm_04_14.h M include/osmocom/msc/gsm_04_80.h M include/osmocom/msc/gsm_09_11.h M include/osmocom/msc/gsm_data.h M include/osmocom/msc/gsm_data_shared.h M include/osmocom/msc/gsm_subscriber.h A include/osmocom/msc/gsup_client_mux.h D include/osmocom/msc/iu_dummy.h D include/osmocom/msc/iucs.h D include/osmocom/msc/iucs_ranap.h M include/osmocom/msc/mncc.h A include/osmocom/msc/mncc_call.h A include/osmocom/msc/msc_a.h A include/osmocom/msc/msc_a_remote.h M include/osmocom/msc/msc_common.h A include/osmocom/msc/msc_ho.h A include/osmocom/msc/msc_i.h A include/osmocom/msc/msc_i_remote.h D include/osmocom/msc/msc_ifaces.h D include/osmocom/msc/msc_mgcp.h A include/osmocom/msc/msc_roles.h A include/osmocom/msc/msc_t.h A include/osmocom/msc/msc_t_remote.h A include/osmocom/msc/msub.h A include/osmocom/msc/neighbor_ident.h A include/osmocom/msc/paging.h M include/osmocom/msc/ran_conn.h A include/osmocom/msc/ran_infra.h A include/osmocom/msc/ran_msg.h A include/osmocom/msc/ran_msg_a.h A include/osmocom/msc/ran_msg_iu.h A include/osmocom/msc/ran_peer.h A include/osmocom/msc/rtp_stream.h A include/osmocom/msc/sccp_ran.h M include/osmocom/msc/sgs_iface.h M include/osmocom/msc/signal.h M include/osmocom/msc/silent_call.h M include/osmocom/msc/sms_queue.h M include/osmocom/msc/transaction.h M include/osmocom/msc/vlr.h M include/osmocom/msc/vlr_sgs.h M src/libmsc/Makefile.am D src/libmsc/a_iface.c D src/libmsc/a_iface_bssap.c D src/libmsc/a_reset.c A src/libmsc/call_leg.c A src/libmsc/cell_id_list.c A src/libmsc/e_link.c M src/libmsc/gsm_04_08.c M src/libmsc/gsm_04_08_cc.c M src/libmsc/gsm_04_11.c M src/libmsc/gsm_04_11_gsup.c M src/libmsc/gsm_04_14.c M src/libmsc/gsm_04_80.c M src/libmsc/gsm_09_11.c D src/libmsc/gsm_subscriber.c A src/libmsc/gsup_client_mux.c D src/libmsc/iu_dummy.c D src/libmsc/iucs.c D src/libmsc/iucs_ranap.c M src/libmsc/mncc.c M src/libmsc/mncc_builtin.c A src/libmsc/mncc_call.c M src/libmsc/mncc_sock.c A src/libmsc/msc_a.c A src/libmsc/msc_a_remote.c A src/libmsc/msc_ho.c A src/libmsc/msc_i.c A src/libmsc/msc_i_remote.c D src/libmsc/msc_ifaces.c D src/libmsc/msc_mgcp.c A src/libmsc/msc_net_init.c A src/libmsc/msc_t.c A src/libmsc/msc_t_remote.c M src/libmsc/msc_vty.c A src/libmsc/msub.c A src/libmsc/neighbor_ident.c A src/libmsc/neighbor_ident_vty.c D src/libmsc/osmo_msc.c A src/libmsc/paging.c M src/libmsc/ran_conn.c A src/libmsc/ran_infra.c A src/libmsc/ran_msg.c A src/libmsc/ran_msg_a.c A src/libmsc/ran_msg_iu.c A src/libmsc/ran_peer.c A src/libmsc/ran_up_l2.c M src/libmsc/rrlp.c A src/libmsc/rtp_stream.c A src/libmsc/sccp_ran.c M src/libmsc/sgs_iface.c M src/libmsc/sgs_server.c M src/libmsc/silent_call.c M src/libmsc/smpp_openbsc.c M src/libmsc/smpp_smsc.h M src/libmsc/sms_queue.c M src/libmsc/transaction.c M src/libvlr/vlr.c M src/libvlr/vlr_access_req_fsm.c M src/libvlr/vlr_lu_fsm.c M src/libvlr/vlr_sgs.c M src/libvlr/vlr_sgs_fsm.c M src/osmo-msc/Makefile.am M src/osmo-msc/msc_main.c M tests/Makefile.am M tests/msc_vlr/Makefile.am M tests/msc_vlr/msc_vlr_test_authen_reuse.c M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_test_gsm_authen.c M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.c M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.c M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.c M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.c M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.c M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_ss.c M tests/msc_vlr/msc_vlr_test_ss.err M tests/msc_vlr/msc_vlr_test_umts_authen.c M tests/msc_vlr/msc_vlr_test_umts_authen.err M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h M tests/sms_queue/Makefile.am A tests/test_neighbor_ident.vty M tests/test_nodes.vty 151 files changed, 35,654 insertions(+), 22,990 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/13137/16 -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 16 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Harald Welte Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Wed May 8 02:18:30 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 02:18:30 +0000 Subject: Build failure of network:osmocom:latest/osmo-sgsn in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5cd23c7f2c30c_3a5cdc5f8160612@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sgsn/Debian_8.0/i586 Package network:osmocom:latest/osmo-sgsn failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:latest osmo-sgsn Last lines of build log: [ 138s] | #define HAVE_MEMORY_H 1 [ 138s] | #define HAVE_STRINGS_H 1 [ 138s] | #define HAVE_INTTYPES_H 1 [ 138s] | #define HAVE_STDINT_H 1 [ 138s] | #define HAVE_UNISTD_H 1 [ 138s] | #define HAVE_DLFCN_H 1 [ 138s] | #define LT_OBJDIR ".libs/" [ 138s] | #define BUILD_IU 1 [ 138s] | #define STDC_HEADERS 1 [ 138s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 138s] | [ 138s] | configure: exit 0 [ 138s] [ 138s] debian/rules:65: recipe for target 'override_dh_auto_test' failed [ 138s] make[1]: *** [override_dh_auto_test] Error 1 [ 138s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 138s] debian/rules:45: recipe for target 'build' failed [ 138s] make: *** [build] Error 2 [ 138s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 138s] [ 138s] morla3 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 02:18:23 UTC 2019. [ 138s] [ 138s] ### VM INTERACTION START ### [ 139s] Powering off. [ 139s] [ 125.519247] reboot: Power down [ 139s] ### VM INTERACTION END ### [ 139s] [ 139s] morla3 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 02:18:25 UTC 2019. [ 139s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Wed May 8 02:20:10 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 02:20:10 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13137 to look at the new patch set (#17). Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... large refactoring: support inter-BSC and inter-MSC Handover 3GPP TS 49.008 '4.3 Roles of MSC-A, MSC-I and MSC-T' defines distinct roles: - MSC-A is responsible for managing subscribers, - MSC-I is the gateway to the RAN. - MSC-T is a second transitory gateway to another RAN during Handover. After inter-MSC Handover, the MSC-I is handled by a remote MSC instance, while the original MSC-A retains the responsibility of subscriber management. MSC-T exists in this patch but is not yet used, since Handover is only prepared for, not yet implemented. Facilitate Inter-MSC and inter-BSC Handover by the same internal split of MSC roles. Compared to inter-MSC Handover, mere inter-BSC has the obvious simplifications: - all of MSC-A, MSC-I and MSC-T roles will be served by the same osmo-msc instance, - messages between MSC-A and MSC-{I,T} don't need to be routed via E-interface (GSUP), - no call routing between MSC-A and -I via MNCC necessary. This is the largest code bomb I have submitted, ever. Out of principle, I apologize to everyone trying to read this as a whole. Unfortunately, I see no sense in trying to split this patch into smaller bits. It would be a huge amount of work to introduce these changes in separate chunks, especially if each should in turn be useful and pass all test suites. So, unfortunately, we are stuck with this code bomb. The following are some details and rationale for this rather huge refactoring: * separate MSC subscriber management from ran_conn struct ran_conn is reduced from the pivotal subscriber management entity it has been so far to a mere storage for an SCCP connection ID and an MSC subscriber reference. The new pivotal subscriber management entity is struct msc_a -- struct msub lists the msc_a, msc_i, msc_t roles, the vast majority of code paths however use msc_a, since MSC-A is where all the interesting stuff happens. Before handover, msc_i is an FSM implementation that encodes to the local ran_conn. After inter-MSC Handover, msc_i is a compatible but different FSM implementation that instead forwards via/from GSUP. Same goes for the msc_a struct: if osmo-msc is the MSC-I "RAN proxy" for a remote MSC-A role, the msc_a->fi is an FSM implementation that merely forwards via/from GSUP. * New SCCP implementation for RAN access To be able to forward BSSAP and RANAP messages via the GSUP interface, the individual message layers need to be cleanly separated. The IuCS implementation used until now (iu_client from libosmo-ranap) did not provide this level of separation, and needed a complete rewrite. It was trivial to implement this in such a way that both BSSAP and RANAP can be handled by the same SCCP code, hence the new SCCP-RAN layer also replaces BSSAP handling. sccp_ran.h: struct sccp_ran_inst provides an abstract handler for incoming RAN connections. A set of callback functions provides implementation specific details. * RAN Abstraction (BSSAP vs. RANAP) The common SCCP implementation did set the theme for the remaining refactoring: make all other MSC code paths entirely RAN-implementation-agnostic. ran_infra.c provides data structures that list RAN implementation specifics, from logging to RAN de-/encoding to SCCP callbacks and timers. A ran_infra pointer hence allows complete abstraction of RAN implementations: - managing connected RAN peers (BSC, RNC) in ran_peer.c, - classifying and de-/encoding RAN PDUs, - recording connected LACs and cell IDs and sending out Paging requests to matching RAN peers. * RAN RESET now also for RANAP ran_peer.c absorbs the reset_fsm from a_reset.c; in consequence, RANAP also supports proper RESET semantics now. Hence osmo-hnbgw now also needs to provide proper RESET handling, which it so far duly ignores. (TODO) * RAN de-/encoding abstraction The RAN abstraction mentioned above serves not only to separate RANAP and BSSAP implementations transparently, but also to be able to optionally handle RAN on distinct levels. Before Handover, all RAN messages are handled by the MSC-A role. However, after an inter-MSC Handover, a standalone MSC-I will need to decode RAN PDUs, at least in order to manage Assignment of RTP streams between BSS/RNC and MNCC call forwarding. ran_msg.h provides a common API with abstraction for: - receiving events from RAN, i.e. passing RAN decode from the BSC/RNC and MS/UE: struct ran_dec_msg represents RAN messages decoded from either BSSMAP or RANAP; - sending RAN events: ran_enc_msg is the counterpart to compose RAN messages that should be encoded to either BSSMAP or RANAP and passed down to the BSC/RNC and MS/UE. The RAN-specific implementations are completely contained by ran_msg_a.c and ran_msg_iu.c. In particular, Assignment and Ciphering have so far been distinct code paths for BSSAP and RANAP, with switch(via_ran){...} statements all over the place. Using RAN_DEC_* and RAN_ENC_* abstractions, these are now completely unified. Note that SGs does not qualify for RAN abstraction: the SGs interface always remains with the MSC-A role, and SGs messages follow quite distinct semantics from the fairly similar GERAN and UTRAN. * MGW and RTP stream management So far, managing MGW endpoints via MGCP was tightly glued in-between GSM-04.08-CC on the one and MNCC on the other side. Prepare for switching RTP streams between different RAN peers by moving to object-oriented implementations: implement struct call_leg and struct rtp_stream with distinct FSMs each. For MGW communication, use the osmo_mgcpc_ep API that has originated from osmo-bsc and recently moved to libosmo-mgcp-client for this purpose. Instead of implementing a sequence of events with code duplication for the RAN and CN sides, the idea is to manage each RTP stream separately by firing and receiving events as soon as codecs and RTP ports are negotiated, and letting the individual FSMs take care of the MGW management "asynchronously". The caller provides event IDs and an FSM instance that should be notified of RTP stream setup progress. Hence it becomes possible to reconnect RTP streams from one GSM-04.08-CC to another (inter-BSC Handover) or between CC and MNCC RTP peers (inter-MSC Handover) without duplicating the MGCP code for each transition. The number of FSM implementations used for MGCP handling may seem a bit of an overkill. But in fact, the number of perspectives on RTP forwarding are far from trivial: - an MGW endpoint is an entity with N connections, and MGCP "sessions" for configuring them by talking to the MGW; - an RTP stream is a remote peer connected to one of the endpoint's connections, which is asynchronously notified of codec and RTP port choices; - a call leg is the higher level view on either an MT or MO side of a voice call, a combination of two RTP streams to forward between two remote peers. BSC MGW PBX CI CI [MGW-endpoint] [--rtp_stream--] [--rtp_stream--] [----------------call_leg----------------] * Use counts Introduce using the new osmo_use_count API added to libosmocore for this purpose. Each use token has a distinct name in the logging, which can be a globally constant name or ad-hoc, like the local __func__ string constant. Use in the new struct msc_a, as well as change vlr_subscr to the new osmo_use_count API. * FSM Timeouts Introduce using the new osmo_tdef API, which provides a common VTY implementation for all timer numbers, and FSM state transitions with the correct timeout. Originated in osmo-bsc, recently moved to libosmocore. Depends: Ife31e6798b4e728a23913179e346552a7dd338c0 (libosmocore) Ib9af67b100c4583342a2103669732dab2e577b04 (libosmocore) Id617265337f09dfb6ddfe111ef5e578cd3dc9f63 (libosmocore) Ie9e2add7bbfae651c04e230d62e37cebeb91b0f5 (libosmo-sccp) I26be5c4b06a680f25f19797407ab56a5a4880ddc (osmo-mgw) Ida0e59f9a1f2dd18efea0a51680a67b69f141efa (osmo-mgw) I9a3effd38e72841529df6c135c077116981dea36 (osmo-mgw) Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd --- M configure.ac M doc/Makefile.am A doc/sequence_charts/Makefile.am A doc/sequence_charts/inter_bsc_ho.msc A doc/sequence_charts/inter_msc_ho.msc A doc/sequence_charts/mncc_fsm.msc M include/osmocom/msc/Makefile.am D include/osmocom/msc/a_iface.h D include/osmocom/msc/a_iface_bssap.h D include/osmocom/msc/a_reset.h A include/osmocom/msc/call_leg.h A include/osmocom/msc/cell_id_list.h A include/osmocom/msc/e_link.h M include/osmocom/msc/gsm_04_08.h M include/osmocom/msc/gsm_04_11.h M include/osmocom/msc/gsm_04_11_gsup.h M include/osmocom/msc/gsm_04_14.h M include/osmocom/msc/gsm_04_80.h M include/osmocom/msc/gsm_09_11.h M include/osmocom/msc/gsm_data.h M include/osmocom/msc/gsm_data_shared.h M include/osmocom/msc/gsm_subscriber.h A include/osmocom/msc/gsup_client_mux.h D include/osmocom/msc/iu_dummy.h D include/osmocom/msc/iucs.h D include/osmocom/msc/iucs_ranap.h M include/osmocom/msc/mncc.h A include/osmocom/msc/mncc_call.h A include/osmocom/msc/msc_a.h A include/osmocom/msc/msc_a_remote.h M include/osmocom/msc/msc_common.h A include/osmocom/msc/msc_ho.h A include/osmocom/msc/msc_i.h A include/osmocom/msc/msc_i_remote.h D include/osmocom/msc/msc_ifaces.h D include/osmocom/msc/msc_mgcp.h A include/osmocom/msc/msc_roles.h A include/osmocom/msc/msc_t.h A include/osmocom/msc/msc_t_remote.h A include/osmocom/msc/msub.h A include/osmocom/msc/neighbor_ident.h A include/osmocom/msc/paging.h M include/osmocom/msc/ran_conn.h A include/osmocom/msc/ran_infra.h A include/osmocom/msc/ran_msg.h A include/osmocom/msc/ran_msg_a.h A include/osmocom/msc/ran_msg_iu.h A include/osmocom/msc/ran_peer.h A include/osmocom/msc/rtp_stream.h A include/osmocom/msc/sccp_ran.h M include/osmocom/msc/sgs_iface.h M include/osmocom/msc/signal.h M include/osmocom/msc/silent_call.h M include/osmocom/msc/sms_queue.h M include/osmocom/msc/transaction.h M include/osmocom/msc/vlr.h M include/osmocom/msc/vlr_sgs.h M src/libmsc/Makefile.am D src/libmsc/a_iface.c D src/libmsc/a_iface_bssap.c D src/libmsc/a_reset.c A src/libmsc/call_leg.c A src/libmsc/cell_id_list.c A src/libmsc/e_link.c M src/libmsc/gsm_04_08.c M src/libmsc/gsm_04_08_cc.c M src/libmsc/gsm_04_11.c M src/libmsc/gsm_04_11_gsup.c M src/libmsc/gsm_04_14.c M src/libmsc/gsm_04_80.c M src/libmsc/gsm_09_11.c D src/libmsc/gsm_subscriber.c A src/libmsc/gsup_client_mux.c D src/libmsc/iu_dummy.c D src/libmsc/iucs.c D src/libmsc/iucs_ranap.c M src/libmsc/mncc.c M src/libmsc/mncc_builtin.c A src/libmsc/mncc_call.c M src/libmsc/mncc_sock.c A src/libmsc/msc_a.c A src/libmsc/msc_a_remote.c A src/libmsc/msc_ho.c A src/libmsc/msc_i.c A src/libmsc/msc_i_remote.c D src/libmsc/msc_ifaces.c D src/libmsc/msc_mgcp.c A src/libmsc/msc_net_init.c A src/libmsc/msc_t.c A src/libmsc/msc_t_remote.c M src/libmsc/msc_vty.c A src/libmsc/msub.c A src/libmsc/neighbor_ident.c A src/libmsc/neighbor_ident_vty.c D src/libmsc/osmo_msc.c A src/libmsc/paging.c M src/libmsc/ran_conn.c A src/libmsc/ran_infra.c A src/libmsc/ran_msg.c A src/libmsc/ran_msg_a.c A src/libmsc/ran_msg_iu.c A src/libmsc/ran_peer.c A src/libmsc/ran_up_l2.c M src/libmsc/rrlp.c A src/libmsc/rtp_stream.c A src/libmsc/sccp_ran.c M src/libmsc/sgs_iface.c M src/libmsc/sgs_server.c M src/libmsc/silent_call.c M src/libmsc/smpp_openbsc.c M src/libmsc/smpp_smsc.h M src/libmsc/sms_queue.c M src/libmsc/transaction.c M src/libvlr/vlr.c M src/libvlr/vlr_access_req_fsm.c M src/libvlr/vlr_lu_fsm.c M src/libvlr/vlr_sgs.c M src/libvlr/vlr_sgs_fsm.c M src/osmo-msc/Makefile.am M src/osmo-msc/msc_main.c M tests/Makefile.am M tests/msc_vlr/Makefile.am M tests/msc_vlr/msc_vlr_test_authen_reuse.c M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_test_gsm_authen.c M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.c M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.c M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.c M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.c M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.c M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_ss.c M tests/msc_vlr/msc_vlr_test_ss.err M tests/msc_vlr/msc_vlr_test_umts_authen.c M tests/msc_vlr/msc_vlr_test_umts_authen.err M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h M tests/sms_queue/Makefile.am A tests/test_neighbor_ident.vty M tests/test_nodes.vty 151 files changed, 35,666 insertions(+), 22,989 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/13137/17 -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 17 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Harald Welte Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Wed May 8 02:21:04 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 02:21:04 +0000 Subject: Build failure of network:osmocom:latest/osmo-sgsn in Debian_9.0/aarch64 In-Reply-To: References: Message-ID: <5cd23d1a34e7e_3a5cdc5f816065f7@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sgsn/Debian_9.0/aarch64 Package network:osmocom:latest/osmo-sgsn failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:latest osmo-sgsn Last lines of build log: [ 251s] signal 'NS-RESET' for unknown peer NSEI=4096/NSVCI=4097 [ 251s] signal 'NS-UNBLOCK' for unknown peer NSEI=4096/NSVCI=4097 [ 251s] NSEI=4096 Rx BVC RESET (BVCI=4098) [ 251s] Allocationg new peer for BVCI=4098 via NSEI=4096 [ 251s] validating counter group 0xaaaab60659d8(gbproxy:peer) with 33 counters [ 251s] NSEI=4096/BVCI=4098 Cell ID 112-332-16464-96 [ 251s] NSEI=4096 proxying BTS->SGSN (NS_BVCI=0, NSEI=256) [ 251s] NSEI=256 proxying SGSN->BSS (NS_BVCI=0, NSEI=4096) [ 251s] LLC SAPI=1 C U GEA? IOV-UI=0x000000 FCS=0x016d16 CMD=UI DATA [ 251s] Got LLC message, CRC: 016d16 (computed 016d16) [ 251s] ATTACH_REQ: Got TLLI afe2b700, BSSGP RAID 112-332-16464-96, old RAID 112-332-16464-96, PTMSI fbc54679 [ 251s] Adding TLLI afe2b700 to list [ 251s] NSEI=4096(BSS) IMSI acquisition in progress, storing message (ATTACH_REQ) [ 251s] NSEI=4096(BSS) IMSI is required but not available, initiating identification procedure (ATTACH_REQ) [ 251s] NSEI=0 proxying SGSN->BSS (NS_BVCI=4098, NSEI=4096) [ 251s] LLC SAPI=1 R U GEA? IOV-UI=0x000000 FCS=0x36f8b7 CMD=UI DATA [ 251s] Got LLC message, CRC: 36f8b7 (computed 36f8b7) [ 251s] Unhandled GSM 04.08 message type IDENTITY REQUEST for protocol discriminator GMM. [ 251s] LLC SAPI=1 C U GEA? IOV-UI=0x000000 FCS=0x2805ad CMD=UI DATA [ 251s] Got LLC message, CRC: 2805ad (computed 2805ad) [ 251s] ID_RESP: Got TLLI afe2b700, BSSGP RAID 112-332-16464-96, IMSI 12131415161718 [ 251s] gbproxy_validate_tlli({current = afe2b700, assigned = 00000000, net_vld = 0, bss_vld = 0}, afe2b700) [ 251s] gbproxy_validate_tlli({current = afe2b700, assigned = 00000000, net_vld = 0, bss_vld = 0}, afe2b700) [ 253s] NSEI=[ 229.133650] sysrq: SysRq : Power Off [ 254s] [ 229.149525] reboot: Power down [ 254s] ### VM INTERACTION END ### [ 254s] [ 254s] obs-arm-4 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 02:20:54 UTC 2019. [ 254s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed May 8 02:24:46 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 02:24:46 +0000 Subject: Build failure of network:osmocom:latest/osmo-bsc in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5cd23e01c26ce_3a5cdc5f816066cd@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-bsc/Debian_8.0/i586 Package network:osmocom:latest/osmo-bsc failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:latest osmo-bsc Last lines of build log: [ 147s] DRSL fsm.c:535 handover(intraCell_conn4294967295_IMSI000003){WAIT_LCHAN_ACTIVE}: Deallocated [ 147s] DCHAN lchan_fsm.c:544 lchan(0-0-1-TCH_F-0){WAIT_BEFORE_RF_RELEASE}: state_chg to UNUSED [ 147s] DCHAN lchan_fsm.c:377 lchan(0-0-1-TCH_F-0){UNUSED}: (type=TCH_F) Clearing lchan state [ 147s] DTS lchan_fsm.c:410 timeslot(0-0-1-TCH_F){UNUSED}: Received Event TS_EV_LCHAN_UNUSED [ 147s] DHODEC handover_decision_2.c:1824 Congestion at BTS 0 reduced! [ 147s] - Expecting channel request at BTS 0 TS 1 [ 147s] --- expout 2019-05-08 02:24:07.360000000 +0000 [ 147s] +++ /usr/src/packages/BUILD/tests/testsuite.dir/at-groups/35/stdout 2019-05-08 02:24:07.376000000 +0000 [ 147s] @@ -1 +1 @@ [ 147s] -Test OK [ 147s] +Test failed, because no channel was requested [ 147s] ./testsuite.at:213: exit code was 1, expected 0 [ 147s] 35. testsuite.at:210: 35. handover test 27 (testsuite.at:210): FAILED (testsuite.at:213) [ 147s] debian/rules:62: recipe for target 'override_dh_auto_test' failed [ 147s] make[1]: *** [override_dh_auto_test] Error 1 [ 147s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 147s] debian/rules:45: recipe for target 'build' failed [ 147s] make: *** [build] Error 2 [ 147s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 147s] [ 147s] lamb14 failed "build osmo-bsc_1.4.0.dsc" at Wed May 8 02:24:29 UTC 2019. [ 147s] [ 147s] ### VM INTERACTION START ### [ 147s] Powering off. [ 147s] [ 135.562535] reboot: Power down [ 147s] ### VM INTERACTION END ### [ 147s] [ 147s] lamb14 failed "build osmo-bsc_1.4.0.dsc" at Wed May 8 02:24:30 UTC 2019. [ 147s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed May 8 02:28:45 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 02:28:45 +0000 Subject: Build failure of network:osmocom:latest/osmo-bsc in Debian_9.0/aarch64 In-Reply-To: References: Message-ID: <5cd23ef2c3910_3a5cdc5f8160712e@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-bsc/Debian_9.0/aarch64 Package network:osmocom:latest/osmo-bsc failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:latest osmo-bsc Last lines of build log: [ 186s] | #define HAVE_STRING_H 1 [ 186s] | #define HAVE_MEMORY_H 1 [ 186s] | #define HAVE_STRINGS_H 1 [ 186s] | #define HAVE_INTTYPES_H 1 [ 186s] | #define HAVE_STDINT_H 1 [ 186s] | #define HAVE_UNISTD_H 1 [ 186s] | #define HAVE_DLFCN_H 1 [ 186s] | #define LT_OBJDIR ".libs/" [ 186s] | #define STDC_HEADERS 1 [ 186s] | #define HAVE_CDK_CDK_H 1 [ 186s] | [ 186s] | configure: exit 0 [ 186s] [ 186s] debian/rules:62: recipe for target 'override_dh_auto_test' failed [ 186s] make[1]: *** [override_dh_auto_test] Error 1 [ 186s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 186s] debian/rules:45: recipe for target 'build' failed [ 186s] make: *** [build] Error 2 [ 186s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 186s] [ 186s] obs-arm-7 failed "build osmo-bsc_1.4.0.dsc" at Wed May 8 02:28:28 UTC 2019. [ 186s] [ 186s] ### VM INTERACTION START ### [ 189s] [ 158.645357] sysrq: SysRq : Power Off [ 189s] [ 158.681902] reboot: Power down [ 189s] ### VM INTERACTION END ### [ 189s] [ 189s] obs-arm-7 failed "build osmo-bsc_1.4.0.dsc" at Wed May 8 02:28:32 UTC 2019. [ 189s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed May 8 02:31:23 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 02:31:23 +0000 Subject: Build failure of network:osmocom:latest/osmo-sgsn in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5cd23f8aae206_3a5cdc5f816076c8@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sgsn/Debian_8.0/x86_64 Package network:osmocom:latest/osmo-sgsn failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:latest osmo-sgsn Last lines of build log: [ 84s] [ 84s] PROCESSING ALIVE_ACK from 0x05060708:32000 [ 84s] 0b [ 84s] @@ -7311,7 +7311,7 @@ [ 84s] MESSAGE to SGSN at 0x05060708:32000, msg length 1 [ 84s] 0a [ 84s] [ 84s] -result (RESET_ACK) = 1 [ 84s] +result (RESET_ACK) = 0 [ 84s] [ 84s] PROCESSING ALIVE_ACK from 0x05060708:32000 [ 84s] 0b [ 84s] 2. testsuite.at:10: 2. gbproxy (testsuite.at:10): FAILED (testsuite.at:13) [ 84s] debian/rules:65: recipe for target 'override_dh_auto_test' failed [ 84s] make[1]: *** [override_dh_auto_test] Error 1 [ 84s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 84s] debian/rules:45: recipe for target 'build' failed [ 84s] make: *** [build] Error 2 [ 84s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 84s] [ 84s] sheep81 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 02:31:17 UTC 2019. [ 84s] [ 84s] ### VM INTERACTION START ### [ 85s] Powering off. [ 85s] [ 76.486201] reboot: Power down [ 85s] ### VM INTERACTION END ### [ 85s] [ 85s] sheep81 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 02:31:18 UTC 2019. [ 85s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed May 8 02:39:04 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 02:39:04 +0000 Subject: Build failure of network:osmocom:latest/osmo-sgsn in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <5cd2414c26d56_3a5cdc5f8160833e@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sgsn/xUbuntu_16.04/i586 Package network:osmocom:latest/osmo-sgsn failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:latest osmo-sgsn Last lines of build log: [ 208s] | #define HAVE_MEMORY_H 1 [ 208s] | #define HAVE_STRINGS_H 1 [ 208s] | #define HAVE_INTTYPES_H 1 [ 208s] | #define HAVE_STDINT_H 1 [ 208s] | #define HAVE_UNISTD_H 1 [ 208s] | #define HAVE_DLFCN_H 1 [ 208s] | #define LT_OBJDIR ".libs/" [ 208s] | #define BUILD_IU 1 [ 208s] | #define STDC_HEADERS 1 [ 208s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 208s] | [ 208s] | configure: exit 0 [ 208s] [ 208s] debian/rules:65: recipe for target 'override_dh_auto_test' failed [ 208s] make[1]: *** [override_dh_auto_test] Error 1 [ 208s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 208s] debian/rules:45: recipe for target 'build' failed [ 208s] make: *** [build] Error 2 [ 208s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 208s] [ 208s] morla5 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 02:38:51 UTC 2019. [ 208s] [ 208s] ### VM INTERACTION START ### [ 211s] [ 195.429571] sysrq: SysRq : Power Off [ 211s] [ 195.455006] reboot: Power down [ 211s] ### VM INTERACTION END ### [ 211s] [ 211s] morla5 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 02:38:55 UTC 2019. [ 211s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed May 8 02:43:04 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 02:43:04 +0000 Subject: Build failure of network:osmocom:latest/osmo-bsc in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5cd24258258bf_3a5cdc5f8160941b@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-bsc/Debian_8.0/x86_64 Package network:osmocom:latest/osmo-bsc failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:latest osmo-bsc Last lines of build log: [ 297s] | #define HAVE_STRING_H 1 [ 297s] | #define HAVE_MEMORY_H 1 [ 297s] | #define HAVE_STRINGS_H 1 [ 297s] | #define HAVE_INTTYPES_H 1 [ 297s] | #define HAVE_STDINT_H 1 [ 297s] | #define HAVE_UNISTD_H 1 [ 297s] | #define HAVE_DLFCN_H 1 [ 297s] | #define LT_OBJDIR ".libs/" [ 297s] | #define STDC_HEADERS 1 [ 297s] | #define HAVE_CDK_CDK_H 1 [ 297s] | [ 297s] | configure: exit 0 [ 297s] [ 297s] debian/rules:62: recipe for target 'override_dh_auto_test' failed [ 297s] make[1]: *** [override_dh_auto_test] Error 1 [ 297s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 297s] debian/rules:45: recipe for target 'build' failed [ 297s] make: *** [build] Error 2 [ 297s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 297s] [ 297s] lamb62 failed "build osmo-bsc_1.4.0.dsc" at Wed May 8 02:42:59 UTC 2019. [ 297s] [ 297s] ### VM INTERACTION START ### [ 297s] Powering off. [ 298s] [ 277.085018] reboot: Power down [ 298s] ### VM INTERACTION END ### [ 298s] [ 298s] lamb62 failed "build osmo-bsc_1.4.0.dsc" at Wed May 8 02:43:02 UTC 2019. [ 298s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed May 8 02:43:21 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 02:43:21 +0000 Subject: Build failure of network:osmocom:latest/osmo-sgsn in xUbuntu_17.04/i586 In-Reply-To: References: Message-ID: <5cd2425947581_3a5cdc5f816095fe@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sgsn/xUbuntu_17.04/i586 Package network:osmocom:latest/osmo-sgsn failed to build in xUbuntu_17.04/i586 Check out the package for editing: osc checkout network:osmocom:latest osmo-sgsn Last lines of build log: [ 125s] | #define HAVE_MEMORY_H 1 [ 125s] | #define HAVE_STRINGS_H 1 [ 125s] | #define HAVE_INTTYPES_H 1 [ 125s] | #define HAVE_STDINT_H 1 [ 125s] | #define HAVE_UNISTD_H 1 [ 125s] | #define HAVE_DLFCN_H 1 [ 125s] | #define LT_OBJDIR ".libs/" [ 125s] | #define BUILD_IU 1 [ 125s] | #define STDC_HEADERS 1 [ 125s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 125s] | [ 125s] | configure: exit 0 [ 125s] [ 125s] debian/rules:65: recipe for target 'override_dh_auto_test' failed [ 125s] make[1]: *** [override_dh_auto_test] Error 1 [ 125s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 125s] debian/rules:45: recipe for target 'build' failed [ 125s] make: *** [build] Error 2 [ 125s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 125s] [ 125s] build83 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 02:43:16 UTC 2019. [ 125s] [ 125s] ### VM INTERACTION START ### [ 128s] [ 117.886854] sysrq: SysRq : Power Off [ 128s] [ 117.906599] reboot: Power down [ 128s] ### VM INTERACTION END ### [ 128s] [ 128s] build83 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 02:43:20 UTC 2019. [ 128s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed May 8 02:44:12 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 02:44:12 +0000 Subject: Build failure of network:osmocom:latest/osmo-bsc in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <5cd242927d364_3a5cdc5f81609620@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-bsc/xUbuntu_16.04/i586 Package network:osmocom:latest/osmo-bsc failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:latest osmo-bsc Last lines of build log: [ 168s] DRSL handover_fsm.c:844 handover(intraBSC_conn4294967295_IMSI000001){WAIT_LCHAN_ACTIVE}: Freeing instance [ 168s] DRSL fsm.c:535 handover(intraBSC_conn4294967295_IMSI000001){WAIT_LCHAN_ACTIVE}: Deallocated [ 168s] DCHAN lchan_fsm.c:544 lchan(1-0-1-TCH_F-0){WAIT_BEFORE_RF_RELEASE}: state_chg to UNUSED [ 168s] DCHAN lchan_fsm.c:377 lchan(1-0-1-TCH_F-0){UNUSED}: (type=TCH_F) Clearing lchan state [ 168s] DTS lchan_fsm.c:410 timeslot(1-0-1-TCH_F){UNUSED}: Received Event TS_EV_LCHAN_UNUSED [ 168s] - Expecting channel request at BTS 1 TS 1 [ 168s] --- expout 2019-05-08 02:43:44.384000000 +0000 [ 168s] +++ /usr/src/packages/BUILD/tests/testsuite.dir/at-groups/23/stdout 2019-05-08 02:43:44.388000000 +0000 [ 168s] @@ -1 +1 @@ [ 168s] -Test OK [ 168s] +Test failed, because no channel was requested [ 168s] ./testsuite.at:141: exit code was 1, expected 0 [ 168s] 23. testsuite.at:138: 23. handover test 15 (testsuite.at:138): FAILED (testsuite.at:141) [ 168s] debian/rules:62: recipe for target 'override_dh_auto_test' failed [ 168s] make[1]: *** [override_dh_auto_test] Error 1 [ 168s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 168s] debian/rules:45: recipe for target 'build' failed [ 168s] make: *** [build] Error 2 [ 168s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 168s] [ 168s] lamb27 failed "build osmo-bsc_1.4.0.dsc" at Wed May 8 02:44:05 UTC 2019. [ 168s] [ 168s] ### VM INTERACTION START ### [ 171s] [ 160.237932] sysrq: SysRq : Power Off [ 171s] [ 160.243570] reboot: Power down [ 171s] ### VM INTERACTION END ### [ 171s] [ 171s] lamb27 failed "build osmo-bsc_1.4.0.dsc" at Wed May 8 02:44:09 UTC 2019. [ 171s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed May 8 02:48:46 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 02:48:46 +0000 Subject: Build failure of network:osmocom:latest/osmo-sgsn in xUbuntu_17.10/x86_64 In-Reply-To: References: Message-ID: <5cd243a3d4c05_3a5cdc5f816105a0@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sgsn/xUbuntu_17.10/x86_64 Package network:osmocom:latest/osmo-sgsn failed to build in xUbuntu_17.10/x86_64 Check out the package for editing: osc checkout network:osmocom:latest osmo-sgsn Last lines of build log: [ 250s] | #define HAVE_MEMORY_H 1 [ 250s] | #define HAVE_STRINGS_H 1 [ 250s] | #define HAVE_INTTYPES_H 1 [ 250s] | #define HAVE_STDINT_H 1 [ 250s] | #define HAVE_UNISTD_H 1 [ 250s] | #define HAVE_DLFCN_H 1 [ 250s] | #define LT_OBJDIR ".libs/" [ 250s] | #define BUILD_IU 1 [ 250s] | #define STDC_HEADERS 1 [ 250s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 250s] | [ 250s] | configure: exit 0 [ 250s] [ 250s] debian/rules:65: recipe for target 'override_dh_auto_test' failed [ 250s] make[1]: *** [override_dh_auto_test] Error 1 [ 250s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 250s] debian/rules:45: recipe for target 'build' failed [ 250s] make: *** [build] Error 2 [ 250s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 250s] [ 250s] lamb57 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 02:48:34 UTC 2019. [ 250s] [ 250s] ### VM INTERACTION START ### [ 253s] [ 219.165589] sysrq: SysRq : Power Off [ 253s] [ 219.190938] reboot: Power down [ 253s] ### VM INTERACTION END ### [ 253s] [ 253s] lamb57 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 02:48:39 UTC 2019. [ 253s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed May 8 02:57:04 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 02:57:04 +0000 Subject: Build failure of network:osmocom:latest/osmo-sgsn in xUbuntu_16.10/i586 In-Reply-To: References: Message-ID: <5cd245858a57d_3a5cdc5f8161197e@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sgsn/xUbuntu_16.10/i586 Package network:osmocom:latest/osmo-sgsn failed to build in xUbuntu_16.10/i586 Check out the package for editing: osc checkout network:osmocom:latest osmo-sgsn Last lines of build log: [ 148s] | #define HAVE_MEMORY_H 1 [ 148s] | #define HAVE_STRINGS_H 1 [ 148s] | #define HAVE_INTTYPES_H 1 [ 148s] | #define HAVE_STDINT_H 1 [ 148s] | #define HAVE_UNISTD_H 1 [ 148s] | #define HAVE_DLFCN_H 1 [ 148s] | #define LT_OBJDIR ".libs/" [ 148s] | #define BUILD_IU 1 [ 148s] | #define STDC_HEADERS 1 [ 148s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 148s] | [ 148s] | configure: exit 0 [ 148s] [ 148s] debian/rules:65: recipe for target 'override_dh_auto_test' failed [ 148s] make[1]: *** [override_dh_auto_test] Error 1 [ 148s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 148s] debian/rules:45: recipe for target 'build' failed [ 148s] make: *** [build] Error 2 [ 148s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 148s] [ 148s] lamb58 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 02:56:50 UTC 2019. [ 148s] [ 148s] ### VM INTERACTION START ### [ 151s] [ 139.298240] sysrq: SysRq : Power Off [ 151s] [ 139.306137] reboot: Power down [ 151s] ### VM INTERACTION END ### [ 152s] [ 152s] lamb58 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 02:56:56 UTC 2019. [ 152s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed May 8 03:02:11 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 03:02:11 +0000 Subject: Build failure of network:osmocom:latest/osmo-sgsn in Debian_9.0/i586 In-Reply-To: References: Message-ID: <5cd246cd2bd4d_3a5cdc5f8161222c@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sgsn/Debian_9.0/i586 Package network:osmocom:latest/osmo-sgsn failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:latest osmo-sgsn Last lines of build log: [ 152s] | #define HAVE_MEMORY_H 1 [ 152s] | #define HAVE_STRINGS_H 1 [ 152s] | #define HAVE_INTTYPES_H 1 [ 152s] | #define HAVE_STDINT_H 1 [ 152s] | #define HAVE_UNISTD_H 1 [ 152s] | #define HAVE_DLFCN_H 1 [ 152s] | #define LT_OBJDIR ".libs/" [ 152s] | #define BUILD_IU 1 [ 152s] | #define STDC_HEADERS 1 [ 152s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 152s] | [ 152s] | configure: exit 0 [ 152s] [ 152s] debian/rules:65: recipe for target 'override_dh_auto_test' failed [ 152s] make[1]: *** [override_dh_auto_test] Error 1 [ 152s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 152s] debian/rules:45: recipe for target 'build' failed [ 152s] make: *** [build] Error 2 [ 152s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 152s] [ 152s] lamb15 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 03:01:50 UTC 2019. [ 152s] [ 152s] ### VM INTERACTION START ### [ 155s] [ 141.386679] sysrq: SysRq : Power Off [ 155s] [ 141.391138] reboot: Power down [ 155s] ### VM INTERACTION END ### [ 155s] [ 155s] lamb15 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 03:01:54 UTC 2019. [ 155s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed May 8 03:02:45 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 03:02:45 +0000 Subject: Build failure of network:osmocom:latest/osmo-bsc in xUbuntu_17.10/x86_64 In-Reply-To: References: Message-ID: <5cd246ed3f849_3a5cdc5f816123cc@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-bsc/xUbuntu_17.10/x86_64 Package network:osmocom:latest/osmo-bsc failed to build in xUbuntu_17.10/x86_64 Check out the package for editing: osc checkout network:osmocom:latest osmo-bsc Last lines of build log: [ 118s] DRSL handover_fsm.c:844 handover(intraBSC_conn4294967295_IMSI000001){WAIT_LCHAN_ACTIVE}: Freeing instance [ 118s] DRSL fsm.c:535 handover(intraBSC_conn4294967295_IMSI000001){WAIT_LCHAN_ACTIVE}: Deallocated [ 118s] DCHAN lchan_fsm.c:544 lchan(1-0-1-TCH_F-0){WAIT_BEFORE_RF_RELEASE}: state_chg to UNUSED [ 118s] DCHAN lchan_fsm.c:377 lchan(1-0-1-TCH_F-0){UNUSED}: (type=TCH_F) Clearing lchan state [ 118s] DTS lchan_fsm.c:410 timeslot(1-0-1-TCH_F){UNUSED}: Received Event TS_EV_LCHAN_UNUSED [ 118s] - Expecting channel request at BTS 1 TS 1 [ 118s] --- expout 2019-05-08 03:02:19.712000000 +0000 [ 118s] +++ /usr/src/packages/BUILD/tests/testsuite.dir/at-groups/24/stdout 2019-05-08 03:02:19.716000000 +0000 [ 118s] @@ -1 +1 @@ [ 118s] -Test OK [ 118s] +Test failed, because no channel was requested [ 118s] ./testsuite.at:147: exit code was 1, expected 0 [ 118s] 24. testsuite.at:144: 24. handover test 16 (testsuite.at:144): FAILED (testsuite.at:147) [ 118s] debian/rules:62: recipe for target 'override_dh_auto_test' failed [ 118s] make[1]: *** [override_dh_auto_test] Error 1 [ 118s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 118s] debian/rules:45: recipe for target 'build' failed [ 118s] make: *** [build] Error 2 [ 118s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 118s] [ 118s] sheep81 failed "build osmo-bsc_1.4.0.dsc" at Wed May 8 03:02:37 UTC 2019. [ 118s] [ 118s] ### VM INTERACTION START ### [ 121s] [ 111.655405] sysrq: SysRq : Power Off [ 121s] [ 111.660373] reboot: Power down [ 121s] ### VM INTERACTION END ### [ 121s] [ 121s] sheep81 failed "build osmo-bsc_1.4.0.dsc" at Wed May 8 03:02:40 UTC 2019. [ 121s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed May 8 03:06:12 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 03:06:12 +0000 Subject: Build failure of network:osmocom:latest/osmo-bsc in Debian_9.0/i586 In-Reply-To: References: Message-ID: <5cd247bcdefc1_3a5cdc5f8161269b@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-bsc/Debian_9.0/i586 Package network:osmocom:latest/osmo-bsc failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:latest osmo-bsc Last lines of build log: [ 150s] DRSL handover_fsm.c:844 handover(intraBSC_conn4294967295_IMSI000001){WAIT_LCHAN_ACTIVE}: Freeing instance [ 150s] DRSL fsm.c:535 handover(intraBSC_conn4294967295_IMSI000001){WAIT_LCHAN_ACTIVE}: Deallocated [ 150s] DCHAN lchan_fsm.c:544 lchan(1-0-1-TCH_F-0){WAIT_BEFORE_RF_RELEASE}: state_chg to UNUSED [ 150s] DCHAN lchan_fsm.c:377 lchan(1-0-1-TCH_F-0){UNUSED}: (type=TCH_F) Clearing lchan state [ 150s] DTS lchan_fsm.c:410 timeslot(1-0-1-TCH_F){UNUSED}: Received Event TS_EV_LCHAN_UNUSED [ 150s] - Expecting channel request at BTS 1 TS 1 [ 150s] --- expout 2019-05-08 03:05:46.124000000 +0000 [ 150s] +++ /usr/src/packages/BUILD/tests/testsuite.dir/at-groups/24/stdout 2019-05-08 03:05:46.128000000 +0000 [ 150s] @@ -1 +1 @@ [ 150s] -Test OK [ 150s] +Test failed, because no channel was requested [ 150s] ./testsuite.at:147: exit code was 1, expected 0 [ 150s] 24. testsuite.at:144: 24. handover test 16 (testsuite.at:144): FAILED (testsuite.at:147) [ 150s] debian/rules:62: recipe for target 'override_dh_auto_test' failed [ 150s] make[1]: *** [override_dh_auto_test] Error 1 [ 150s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 150s] debian/rules:45: recipe for target 'build' failed [ 150s] make: *** [build] Error 2 [ 150s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 150s] [ 150s] lamb07 failed "build osmo-bsc_1.4.0.dsc" at Wed May 8 03:06:06 UTC 2019. [ 150s] [ 150s] ### VM INTERACTION START ### [ 153s] [ 139.977822] sysrq: SysRq : Power Off [ 153s] [ 139.982678] reboot: Power down [ 153s] ### VM INTERACTION END ### [ 153s] [ 153s] lamb07 failed "build osmo-bsc_1.4.0.dsc" at Wed May 8 03:06:10 UTC 2019. [ 153s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed May 8 03:08:29 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 03:08:29 +0000 Subject: Build failure of network:osmocom:latest/osmo-sgsn in Debian_9.0/x86_64 In-Reply-To: References: Message-ID: <5cd248378d6e5_3a5cdc5f81613211@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sgsn/Debian_9.0/x86_64 Package network:osmocom:latest/osmo-sgsn failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:latest osmo-sgsn Last lines of build log: [ 104s] | #define HAVE_MEMORY_H 1 [ 104s] | #define HAVE_STRINGS_H 1 [ 104s] | #define HAVE_INTTYPES_H 1 [ 104s] | #define HAVE_STDINT_H 1 [ 104s] | #define HAVE_UNISTD_H 1 [ 104s] | #define HAVE_DLFCN_H 1 [ 104s] | #define LT_OBJDIR ".libs/" [ 104s] | #define BUILD_IU 1 [ 104s] | #define STDC_HEADERS 1 [ 104s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 104s] | [ 104s] | configure: exit 0 [ 104s] [ 104s] debian/rules:65: recipe for target 'override_dh_auto_test' failed [ 104s] make[1]: *** [override_dh_auto_test] Error 1 [ 104s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 104s] debian/rules:45: recipe for target 'build' failed [ 104s] make: *** [build] Error 2 [ 104s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 104s] [ 104s] lamb12 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 03:08:23 UTC 2019. [ 104s] [ 104s] ### VM INTERACTION START ### [ 107s] [ 94.505476] sysrq: SysRq : Power Off [ 107s] [ 94.510614] reboot: Power down [ 107s] ### VM INTERACTION END ### [ 107s] [ 107s] lamb12 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 03:08:27 UTC 2019. [ 107s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed May 8 03:08:46 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 03:08:46 +0000 Subject: Build failure of network:osmocom:latest/osmo-sgsn in xUbuntu_16.10/x86_64 In-Reply-To: References: Message-ID: <5cd2485220ca9_3a5cdc5f8161339e@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sgsn/xUbuntu_16.10/x86_64 Package network:osmocom:latest/osmo-sgsn failed to build in xUbuntu_16.10/x86_64 Check out the package for editing: osc checkout network:osmocom:latest osmo-sgsn Last lines of build log: [ 108s] | #define HAVE_MEMORY_H 1 [ 108s] | #define HAVE_STRINGS_H 1 [ 108s] | #define HAVE_INTTYPES_H 1 [ 108s] | #define HAVE_STDINT_H 1 [ 108s] | #define HAVE_UNISTD_H 1 [ 108s] | #define HAVE_DLFCN_H 1 [ 108s] | #define LT_OBJDIR ".libs/" [ 108s] | #define BUILD_IU 1 [ 108s] | #define STDC_HEADERS 1 [ 108s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 108s] | [ 108s] | configure: exit 0 [ 108s] [ 108s] debian/rules:65: recipe for target 'override_dh_auto_test' failed [ 108s] make[1]: *** [override_dh_auto_test] Error 1 [ 108s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 108s] debian/rules:45: recipe for target 'build' failed [ 108s] make: *** [build] Error 2 [ 108s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 108s] [ 108s] lamb19 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 03:08:25 UTC 2019. [ 108s] [ 108s] ### VM INTERACTION START ### [ 111s] [ 99.783721] sysrq: SysRq : Power Off [ 111s] [ 99.790673] reboot: Power down [ 111s] ### VM INTERACTION END ### [ 111s] [ 111s] lamb19 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 03:08:29 UTC 2019. [ 111s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed May 8 03:09:21 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 03:09:21 +0000 Subject: Build failure of network:osmocom:latest/osmo-sgsn in xUbuntu_17.04/x86_64 In-Reply-To: References: Message-ID: <5cd2486e866b3_3a5cdc5f81613562@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sgsn/xUbuntu_17.04/x86_64 Package network:osmocom:latest/osmo-sgsn failed to build in xUbuntu_17.04/x86_64 Check out the package for editing: osc checkout network:osmocom:latest osmo-sgsn Last lines of build log: [ 153s] | #define HAVE_MEMORY_H 1 [ 153s] | #define HAVE_STRINGS_H 1 [ 153s] | #define HAVE_INTTYPES_H 1 [ 153s] | #define HAVE_STDINT_H 1 [ 153s] | #define HAVE_UNISTD_H 1 [ 153s] | #define HAVE_DLFCN_H 1 [ 153s] | #define LT_OBJDIR ".libs/" [ 153s] | #define BUILD_IU 1 [ 153s] | #define STDC_HEADERS 1 [ 153s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 153s] | [ 153s] | configure: exit 0 [ 153s] [ 153s] debian/rules:65: recipe for target 'override_dh_auto_test' failed [ 153s] make[1]: *** [override_dh_auto_test] Error 1 [ 153s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 153s] debian/rules:45: recipe for target 'build' failed [ 153s] make: *** [build] Error 2 [ 153s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 153s] [ 153s] lamb01 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 03:09:12 UTC 2019. [ 153s] [ 153s] ### VM INTERACTION START ### [ 156s] [ 142.324429] sysrq: SysRq : Power Off [ 156s] [ 142.337509] reboot: Power down [ 156s] ### VM INTERACTION END ### [ 156s] [ 156s] lamb01 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 03:09:16 UTC 2019. [ 156s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed May 8 03:12:29 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 03:12:29 +0000 Subject: Build failure of network:osmocom:latest/osmo-sgsn in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5cd24927ce645_3a5cdc5f8161393f@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sgsn/xUbuntu_16.04/x86_64 Package network:osmocom:latest/osmo-sgsn failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:latest osmo-sgsn Last lines of build log: [ 83s] | #define HAVE_MEMORY_H 1 [ 83s] | #define HAVE_STRINGS_H 1 [ 83s] | #define HAVE_INTTYPES_H 1 [ 83s] | #define HAVE_STDINT_H 1 [ 83s] | #define HAVE_UNISTD_H 1 [ 83s] | #define HAVE_DLFCN_H 1 [ 83s] | #define LT_OBJDIR ".libs/" [ 83s] | #define BUILD_IU 1 [ 83s] | #define STDC_HEADERS 1 [ 83s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 83s] | [ 83s] | configure: exit 0 [ 83s] [ 83s] debian/rules:65: recipe for target 'override_dh_auto_test' failed [ 83s] make[1]: *** [override_dh_auto_test] Error 1 [ 83s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 83s] debian/rules:45: recipe for target 'build' failed [ 83s] make: *** [build] Error 2 [ 83s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 83s] [ 83s] sheep84 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 03:12:14 UTC 2019. [ 83s] [ 83s] ### VM INTERACTION START ### [ 86s] [ 78.046868] sysrq: SysRq : Power Off [ 86s] [ 78.051714] reboot: Power down [ 86s] ### VM INTERACTION END ### [ 86s] [ 86s] sheep84 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 03:12:18 UTC 2019. [ 86s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed May 8 03:13:38 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 03:13:38 +0000 Subject: Build failure of network:osmocom:latest/osmo-bsc in Debian_9.0/x86_64 In-Reply-To: References: Message-ID: <5cd2497cb1606_3a5cdc5f81614353@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-bsc/Debian_9.0/x86_64 Package network:osmocom:latest/osmo-bsc failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:latest osmo-bsc Last lines of build log: [ 150s] | #define HAVE_STRING_H 1 [ 150s] | #define HAVE_MEMORY_H 1 [ 150s] | #define HAVE_STRINGS_H 1 [ 150s] | #define HAVE_INTTYPES_H 1 [ 150s] | #define HAVE_STDINT_H 1 [ 150s] | #define HAVE_UNISTD_H 1 [ 150s] | #define HAVE_DLFCN_H 1 [ 150s] | #define LT_OBJDIR ".libs/" [ 150s] | #define STDC_HEADERS 1 [ 150s] | #define HAVE_CDK_CDK_H 1 [ 150s] | [ 150s] | configure: exit 0 [ 150s] [ 150s] debian/rules:62: recipe for target 'override_dh_auto_test' failed [ 150s] make[1]: *** [override_dh_auto_test] Error 1 [ 150s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 150s] debian/rules:45: recipe for target 'build' failed [ 151s] make: *** [build] Error 2 [ 151s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 151s] [ 151s] lamb27 failed "build osmo-bsc_1.4.0.dsc" at Wed May 8 03:13:25 UTC 2019. [ 151s] [ 151s] ### VM INTERACTION START ### [ 153s] [ 139.578465] sysrq: SysRq : Power Off [ 153s] [ 139.586774] reboot: Power down [ 153s] ### VM INTERACTION END ### [ 153s] [ 153s] lamb27 failed "build osmo-bsc_1.4.0.dsc" at Wed May 8 03:13:30 UTC 2019. [ 153s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed May 8 03:17:38 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 03:17:38 +0000 Subject: Build failure of network:osmocom:latest/osmo-bsc in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5cd24a6f1b6a2_3a5cdc5f816150e4@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-bsc/xUbuntu_16.04/x86_64 Package network:osmocom:latest/osmo-bsc failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:latest osmo-bsc Last lines of build log: [ 155s] DRSL handover_fsm.c:844 handover(intraBSC_conn4294967295_IMSI000001){WAIT_LCHAN_ACTIVE}: Freeing instance [ 155s] DRSL fsm.c:535 handover(intraBSC_conn4294967295_IMSI000001){WAIT_LCHAN_ACTIVE}: Deallocated [ 155s] DCHAN lchan_fsm.c:544 lchan(1-0-1-TCH_F-0){WAIT_BEFORE_RF_RELEASE}: state_chg to UNUSED [ 155s] DCHAN lchan_fsm.c:377 lchan(1-0-1-TCH_F-0){UNUSED}: (type=TCH_F) Clearing lchan state [ 155s] DTS lchan_fsm.c:410 timeslot(1-0-1-TCH_F){UNUSED}: Received Event TS_EV_LCHAN_UNUSED [ 155s] - Expecting channel request at BTS 1 TS 1 [ 155s] --- expout 2019-05-08 03:16:58.168000000 +0000 [ 155s] +++ /usr/src/packages/BUILD/tests/testsuite.dir/at-groups/18/stdout 2019-05-08 03:16:58.172000000 +0000 [ 155s] @@ -1 +1 @@ [ 155s] -Test OK [ 155s] +Test failed, because no channel was requested [ 155s] ./testsuite.at:111: exit code was 1, expected 0 [ 155s] 18. testsuite.at:108: 18. handover test 10 (testsuite.at:108): FAILED (testsuite.at:111) [ 155s] debian/rules:62: recipe for target 'override_dh_auto_test' failed [ 155s] make[1]: *** [override_dh_auto_test] Error 1 [ 155s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 155s] debian/rules:45: recipe for target 'build' failed [ 155s] make: *** [build] Error 2 [ 155s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 155s] [ 155s] lamb16 failed "build osmo-bsc_1.4.0.dsc" at Wed May 8 03:17:19 UTC 2019. [ 155s] [ 155s] ### VM INTERACTION START ### [ 158s] [ 146.326007] sysrq: SysRq : Power Off [ 158s] [ 146.332423] reboot: Power down [ 158s] ### VM INTERACTION END ### [ 158s] [ 158s] lamb16 failed "build osmo-bsc_1.4.0.dsc" at Wed May 8 03:17:23 UTC 2019. [ 158s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Wed May 8 03:20:02 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 03:20:02 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13137 to look at the new patch set (#18). Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... large refactoring: support inter-BSC and inter-MSC Handover 3GPP TS 49.008 '4.3 Roles of MSC-A, MSC-I and MSC-T' defines distinct roles: - MSC-A is responsible for managing subscribers, - MSC-I is the gateway to the RAN. - MSC-T is a second transitory gateway to another RAN during Handover. After inter-MSC Handover, the MSC-I is handled by a remote MSC instance, while the original MSC-A retains the responsibility of subscriber management. MSC-T exists in this patch but is not yet used, since Handover is only prepared for, not yet implemented. Facilitate Inter-MSC and inter-BSC Handover by the same internal split of MSC roles. Compared to inter-MSC Handover, mere inter-BSC has the obvious simplifications: - all of MSC-A, MSC-I and MSC-T roles will be served by the same osmo-msc instance, - messages between MSC-A and MSC-{I,T} don't need to be routed via E-interface (GSUP), - no call routing between MSC-A and -I via MNCC necessary. This is the largest code bomb I have submitted, ever. Out of principle, I apologize to everyone trying to read this as a whole. Unfortunately, I see no sense in trying to split this patch into smaller bits. It would be a huge amount of work to introduce these changes in separate chunks, especially if each should in turn be useful and pass all test suites. So, unfortunately, we are stuck with this code bomb. The following are some details and rationale for this rather huge refactoring: * separate MSC subscriber management from ran_conn struct ran_conn is reduced from the pivotal subscriber management entity it has been so far to a mere storage for an SCCP connection ID and an MSC subscriber reference. The new pivotal subscriber management entity is struct msc_a -- struct msub lists the msc_a, msc_i, msc_t roles, the vast majority of code paths however use msc_a, since MSC-A is where all the interesting stuff happens. Before handover, msc_i is an FSM implementation that encodes to the local ran_conn. After inter-MSC Handover, msc_i is a compatible but different FSM implementation that instead forwards via/from GSUP. Same goes for the msc_a struct: if osmo-msc is the MSC-I "RAN proxy" for a remote MSC-A role, the msc_a->fi is an FSM implementation that merely forwards via/from GSUP. * New SCCP implementation for RAN access To be able to forward BSSAP and RANAP messages via the GSUP interface, the individual message layers need to be cleanly separated. The IuCS implementation used until now (iu_client from libosmo-ranap) did not provide this level of separation, and needed a complete rewrite. It was trivial to implement this in such a way that both BSSAP and RANAP can be handled by the same SCCP code, hence the new SCCP-RAN layer also replaces BSSAP handling. sccp_ran.h: struct sccp_ran_inst provides an abstract handler for incoming RAN connections. A set of callback functions provides implementation specific details. * RAN Abstraction (BSSAP vs. RANAP) The common SCCP implementation did set the theme for the remaining refactoring: make all other MSC code paths entirely RAN-implementation-agnostic. ran_infra.c provides data structures that list RAN implementation specifics, from logging to RAN de-/encoding to SCCP callbacks and timers. A ran_infra pointer hence allows complete abstraction of RAN implementations: - managing connected RAN peers (BSC, RNC) in ran_peer.c, - classifying and de-/encoding RAN PDUs, - recording connected LACs and cell IDs and sending out Paging requests to matching RAN peers. * RAN RESET now also for RANAP ran_peer.c absorbs the reset_fsm from a_reset.c; in consequence, RANAP also supports proper RESET semantics now. Hence osmo-hnbgw now also needs to provide proper RESET handling, which it so far duly ignores. (TODO) * RAN de-/encoding abstraction The RAN abstraction mentioned above serves not only to separate RANAP and BSSAP implementations transparently, but also to be able to optionally handle RAN on distinct levels. Before Handover, all RAN messages are handled by the MSC-A role. However, after an inter-MSC Handover, a standalone MSC-I will need to decode RAN PDUs, at least in order to manage Assignment of RTP streams between BSS/RNC and MNCC call forwarding. ran_msg.h provides a common API with abstraction for: - receiving events from RAN, i.e. passing RAN decode from the BSC/RNC and MS/UE: struct ran_dec_msg represents RAN messages decoded from either BSSMAP or RANAP; - sending RAN events: ran_enc_msg is the counterpart to compose RAN messages that should be encoded to either BSSMAP or RANAP and passed down to the BSC/RNC and MS/UE. The RAN-specific implementations are completely contained by ran_msg_a.c and ran_msg_iu.c. In particular, Assignment and Ciphering have so far been distinct code paths for BSSAP and RANAP, with switch(via_ran){...} statements all over the place. Using RAN_DEC_* and RAN_ENC_* abstractions, these are now completely unified. Note that SGs does not qualify for RAN abstraction: the SGs interface always remains with the MSC-A role, and SGs messages follow quite distinct semantics from the fairly similar GERAN and UTRAN. * MGW and RTP stream management So far, managing MGW endpoints via MGCP was tightly glued in-between GSM-04.08-CC on the one and MNCC on the other side. Prepare for switching RTP streams between different RAN peers by moving to object-oriented implementations: implement struct call_leg and struct rtp_stream with distinct FSMs each. For MGW communication, use the osmo_mgcpc_ep API that has originated from osmo-bsc and recently moved to libosmo-mgcp-client for this purpose. Instead of implementing a sequence of events with code duplication for the RAN and CN sides, the idea is to manage each RTP stream separately by firing and receiving events as soon as codecs and RTP ports are negotiated, and letting the individual FSMs take care of the MGW management "asynchronously". The caller provides event IDs and an FSM instance that should be notified of RTP stream setup progress. Hence it becomes possible to reconnect RTP streams from one GSM-04.08-CC to another (inter-BSC Handover) or between CC and MNCC RTP peers (inter-MSC Handover) without duplicating the MGCP code for each transition. The number of FSM implementations used for MGCP handling may seem a bit of an overkill. But in fact, the number of perspectives on RTP forwarding are far from trivial: - an MGW endpoint is an entity with N connections, and MGCP "sessions" for configuring them by talking to the MGW; - an RTP stream is a remote peer connected to one of the endpoint's connections, which is asynchronously notified of codec and RTP port choices; - a call leg is the higher level view on either an MT or MO side of a voice call, a combination of two RTP streams to forward between two remote peers. BSC MGW PBX CI CI [MGW-endpoint] [--rtp_stream--] [--rtp_stream--] [----------------call_leg----------------] * Use counts Introduce using the new osmo_use_count API added to libosmocore for this purpose. Each use token has a distinct name in the logging, which can be a globally constant name or ad-hoc, like the local __func__ string constant. Use in the new struct msc_a, as well as change vlr_subscr to the new osmo_use_count API. * FSM Timeouts Introduce using the new osmo_tdef API, which provides a common VTY implementation for all timer numbers, and FSM state transitions with the correct timeout. Originated in osmo-bsc, recently moved to libosmocore. Depends: Ife31e6798b4e728a23913179e346552a7dd338c0 (libosmocore) Ib9af67b100c4583342a2103669732dab2e577b04 (libosmocore) Id617265337f09dfb6ddfe111ef5e578cd3dc9f63 (libosmocore) Ie9e2add7bbfae651c04e230d62e37cebeb91b0f5 (libosmo-sccp) I26be5c4b06a680f25f19797407ab56a5a4880ddc (osmo-mgw) Ida0e59f9a1f2dd18efea0a51680a67b69f141efa (osmo-mgw) I9a3effd38e72841529df6c135c077116981dea36 (osmo-mgw) Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd --- M configure.ac M doc/Makefile.am A doc/sequence_charts/Makefile.am A doc/sequence_charts/inter_bsc_ho.msc A doc/sequence_charts/inter_msc_ho.msc A doc/sequence_charts/mncc_fsm.msc M include/osmocom/msc/Makefile.am D include/osmocom/msc/a_iface.h D include/osmocom/msc/a_iface_bssap.h D include/osmocom/msc/a_reset.h A include/osmocom/msc/call_leg.h A include/osmocom/msc/cell_id_list.h A include/osmocom/msc/e_link.h M include/osmocom/msc/gsm_04_08.h M include/osmocom/msc/gsm_04_11.h M include/osmocom/msc/gsm_04_11_gsup.h M include/osmocom/msc/gsm_04_14.h M include/osmocom/msc/gsm_04_80.h M include/osmocom/msc/gsm_09_11.h M include/osmocom/msc/gsm_data.h M include/osmocom/msc/gsm_data_shared.h M include/osmocom/msc/gsm_subscriber.h A include/osmocom/msc/gsup_client_mux.h D include/osmocom/msc/iu_dummy.h D include/osmocom/msc/iucs.h D include/osmocom/msc/iucs_ranap.h M include/osmocom/msc/mncc.h A include/osmocom/msc/mncc_call.h A include/osmocom/msc/msc_a.h A include/osmocom/msc/msc_a_remote.h M include/osmocom/msc/msc_common.h A include/osmocom/msc/msc_ho.h A include/osmocom/msc/msc_i.h A include/osmocom/msc/msc_i_remote.h D include/osmocom/msc/msc_ifaces.h D include/osmocom/msc/msc_mgcp.h A include/osmocom/msc/msc_roles.h A include/osmocom/msc/msc_t.h A include/osmocom/msc/msc_t_remote.h A include/osmocom/msc/msub.h A include/osmocom/msc/neighbor_ident.h A include/osmocom/msc/paging.h M include/osmocom/msc/ran_conn.h A include/osmocom/msc/ran_infra.h A include/osmocom/msc/ran_msg.h A include/osmocom/msc/ran_msg_a.h A include/osmocom/msc/ran_msg_iu.h A include/osmocom/msc/ran_peer.h A include/osmocom/msc/rtp_stream.h A include/osmocom/msc/sccp_ran.h M include/osmocom/msc/sgs_iface.h M include/osmocom/msc/signal.h M include/osmocom/msc/silent_call.h M include/osmocom/msc/sms_queue.h M include/osmocom/msc/transaction.h M include/osmocom/msc/vlr.h M include/osmocom/msc/vlr_sgs.h M src/libmsc/Makefile.am D src/libmsc/a_iface.c D src/libmsc/a_iface_bssap.c D src/libmsc/a_reset.c A src/libmsc/call_leg.c A src/libmsc/cell_id_list.c A src/libmsc/e_link.c M src/libmsc/gsm_04_08.c M src/libmsc/gsm_04_08_cc.c M src/libmsc/gsm_04_11.c M src/libmsc/gsm_04_11_gsup.c M src/libmsc/gsm_04_14.c M src/libmsc/gsm_04_80.c M src/libmsc/gsm_09_11.c D src/libmsc/gsm_subscriber.c A src/libmsc/gsup_client_mux.c D src/libmsc/iu_dummy.c D src/libmsc/iucs.c D src/libmsc/iucs_ranap.c M src/libmsc/mncc.c M src/libmsc/mncc_builtin.c A src/libmsc/mncc_call.c M src/libmsc/mncc_sock.c A src/libmsc/msc_a.c A src/libmsc/msc_a_remote.c A src/libmsc/msc_ho.c A src/libmsc/msc_i.c A src/libmsc/msc_i_remote.c D src/libmsc/msc_ifaces.c D src/libmsc/msc_mgcp.c A src/libmsc/msc_net_init.c A src/libmsc/msc_t.c A src/libmsc/msc_t_remote.c M src/libmsc/msc_vty.c A src/libmsc/msub.c A src/libmsc/neighbor_ident.c A src/libmsc/neighbor_ident_vty.c D src/libmsc/osmo_msc.c A src/libmsc/paging.c M src/libmsc/ran_conn.c A src/libmsc/ran_infra.c A src/libmsc/ran_msg.c A src/libmsc/ran_msg_a.c A src/libmsc/ran_msg_iu.c A src/libmsc/ran_peer.c A src/libmsc/ran_up_l2.c M src/libmsc/rrlp.c A src/libmsc/rtp_stream.c A src/libmsc/sccp_ran.c M src/libmsc/sgs_iface.c M src/libmsc/sgs_server.c M src/libmsc/silent_call.c M src/libmsc/smpp_openbsc.c M src/libmsc/smpp_smsc.h M src/libmsc/sms_queue.c M src/libmsc/transaction.c M src/libvlr/vlr.c M src/libvlr/vlr_access_req_fsm.c M src/libvlr/vlr_lu_fsm.c M src/libvlr/vlr_sgs.c M src/libvlr/vlr_sgs_fsm.c M src/osmo-msc/Makefile.am M src/osmo-msc/msc_main.c M tests/Makefile.am M tests/msc_vlr/Makefile.am M tests/msc_vlr/msc_vlr_test_authen_reuse.c M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_test_gsm_authen.c M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.c M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.c M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.c M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.c M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.c M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_ss.c M tests/msc_vlr/msc_vlr_test_ss.err M tests/msc_vlr/msc_vlr_test_umts_authen.c M tests/msc_vlr/msc_vlr_test_umts_authen.err M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h M tests/sms_queue/Makefile.am A tests/test_neighbor_ident.vty M tests/test_nodes.vty 151 files changed, 35,672 insertions(+), 22,989 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/13137/18 -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 18 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Harald Welte Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Wed May 8 03:33:21 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 03:33:21 +0000 Subject: Build failure of network:osmocom:latest/osmo-sgsn in xUbuntu_18.04/x86_64 In-Reply-To: References: Message-ID: <5cd24e0e31d80_3a5cdc5f816173dc@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sgsn/xUbuntu_18.04/x86_64 Package network:osmocom:latest/osmo-sgsn failed to build in xUbuntu_18.04/x86_64 Check out the package for editing: osc checkout network:osmocom:latest osmo-sgsn Last lines of build log: [ 273s] [ 273s] PROCESSING ALIVE_ACK from 0x05060708:32000 [ 273s] 0b [ 273s] @@ -7311,7 +7311,7 @@ [ 273s] MESSAGE to SGSN at 0x05060708:32000, msg length 1 [ 273s] 0a [ 273s] [ 273s] -result (RESET_ACK) = 1 [ 273s] +result (RESET_ACK) = 0 [ 273s] [ 273s] PROCESSING ALIVE_ACK from 0x05060708:32000 [ 273s] 0b [ 273s] 2. testsuite.at:10: 2. gbproxy (testsuite.at:10): FAILED (testsuite.at:13) [ 273s] debian/rules:65: recipe for target 'override_dh_auto_test' failed [ 273s] make[1]: *** [override_dh_auto_test] Error 1 [ 273s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 273s] debian/rules:45: recipe for target 'build' failed [ 273s] make: *** [build] Error 2 [ 273s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 273s] [ 273s] lamb09 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 03:33:08 UTC 2019. [ 273s] [ 273s] ### VM INTERACTION START ### [ 276s] [ 262.190951] sysrq: SysRq : Power Off [ 276s] [ 262.211765] reboot: Power down [ 276s] ### VM INTERACTION END ### [ 276s] [ 276s] lamb09 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 03:33:11 UTC 2019. [ 276s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Wed May 8 03:36:01 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 03:36:01 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13137 ) Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... Patch Set 18: it's bloody time, too. what a marathon. -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 18 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Harald Welte Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 03:36:01 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Wed May 8 03:35:55 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 03:35:55 +0000 Subject: Build failure of network:osmocom:latest/osmo-sgsn in xUbuntu_18.10/x86_64 In-Reply-To: References: Message-ID: <5cd24ea6a662f_3a5cdc5f816177c7@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sgsn/xUbuntu_18.10/x86_64 Package network:osmocom:latest/osmo-sgsn failed to build in xUbuntu_18.10/x86_64 Check out the package for editing: osc checkout network:osmocom:latest osmo-sgsn Last lines of build log: [ 143s] | #define HAVE_STDLIB_H 1 [ 143s] | #define HAVE_STRING_H 1 [ 143s] | #define HAVE_MEMORY_H 1 [ 143s] | #define HAVE_STRINGS_H 1 [ 143s] | #define HAVE_INTTYPES_H 1 [ 143s] | #define HAVE_STDINT_H 1 [ 143s] | #define HAVE_UNISTD_H 1 [ 143s] | #define HAVE_DLFCN_H 1 [ 143s] | #define LT_OBJDIR ".libs/" [ 143s] | #define BUILD_IU 1 [ 143s] | #define STDC_HEADERS 1 [ 143s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 143s] | [ 143s] | configure: exit 0 [ 143s] [ 143s] make[1]: *** [debian/rules:65: override_dh_auto_test] Error 1 [ 143s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 143s] make: *** [debian/rules:45: build] Error 2 [ 143s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 143s] [ 143s] lamb08 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 03:35:40 UTC 2019. [ 143s] [ 143s] ### VM INTERACTION START ### [ 146s] [ 134.248518] sysrq: SysRq : Power Off [ 146s] [ 134.254511] reboot: Power down [ 146s] ### VM INTERACTION END ### [ 146s] [ 146s] lamb08 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 03:35:44 UTC 2019. [ 146s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed May 8 03:39:21 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 03:39:21 +0000 Subject: Build failure of network:osmocom:latest/osmo-bsc in xUbuntu_18.04/x86_64 In-Reply-To: References: Message-ID: <5cd24f79d21a9_3a5cdc5f816181f2@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-bsc/xUbuntu_18.04/x86_64 Package network:osmocom:latest/osmo-bsc failed to build in xUbuntu_18.04/x86_64 Check out the package for editing: osc checkout network:osmocom:latest osmo-bsc Last lines of build log: [ 177s] | #define HAVE_STRING_H 1 [ 177s] | #define HAVE_MEMORY_H 1 [ 177s] | #define HAVE_STRINGS_H 1 [ 177s] | #define HAVE_INTTYPES_H 1 [ 177s] | #define HAVE_STDINT_H 1 [ 177s] | #define HAVE_UNISTD_H 1 [ 177s] | #define HAVE_DLFCN_H 1 [ 177s] | #define LT_OBJDIR ".libs/" [ 177s] | #define STDC_HEADERS 1 [ 177s] | #define HAVE_CDK_CDK_H 1 [ 177s] | [ 177s] | configure: exit 0 [ 177s] [ 177s] debian/rules:62: recipe for target 'override_dh_auto_test' failed [ 177s] make[1]: *** [override_dh_auto_test] Error 1 [ 177s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 177s] debian/rules:45: recipe for target 'build' failed [ 177s] make: *** [build] Error 2 [ 177s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 177s] [ 177s] lamb55 failed "build osmo-bsc_1.4.0.dsc" at Wed May 8 03:39:09 UTC 2019. [ 177s] [ 177s] ### VM INTERACTION START ### [ 179s] [ 166.265290] sysrq: SysRq : Power Off [ 179s] [ 166.271036] reboot: Power down [ 179s] ### VM INTERACTION END ### [ 179s] [ 179s] lamb55 failed "build osmo-bsc_1.4.0.dsc" at Wed May 8 03:39:13 UTC 2019. [ 179s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed May 8 03:41:21 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 03:41:21 +0000 Subject: Build failure of network:osmocom:latest/osmo-bsc in xUbuntu_18.10/x86_64 In-Reply-To: References: Message-ID: <5cd24ff2a4c28_3a5cdc5f816183ec@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-bsc/xUbuntu_18.10/x86_64 Package network:osmocom:latest/osmo-bsc failed to build in xUbuntu_18.10/x86_64 Check out the package for editing: osc checkout network:osmocom:latest osmo-bsc Last lines of build log: [ 176s] DRSL handover_fsm.c:844 handover(intraCell_conn4294967295_IMSI000003){WAIT_LCHAN_ACTIVE}: Terminating (cause = OSMO_FSM_TERM_REGULAR) [ 176s] DRSL handover_fsm.c:844 handover(intraCell_conn4294967295_IMSI000003){WAIT_LCHAN_ACTIVE}: Freeing instance [ 176s] DRSL fsm.c:535 handover(intraCell_conn4294967295_IMSI000003){WAIT_LCHAN_ACTIVE}: Deallocated [ 176s] DCHAN lchan_fsm.c:544 lchan(0-0-1-TCH_F-0){WAIT_BEFORE_RF_RELEASE}: state_chg to UNUSED [ 176s] DCHAN lchan_fsm.c:377 lchan(0-0-1-TCH_F-0){UNUSED}: (type=TCH_F) Clearing lchan state [ 176s] DTS lchan_fsm.c:410 timeslot(0-0-1-TCH_F){UNUSED}: Received Event TS_EV_LCHAN_UNUSED [ 176s] DHODEC handover_decision_2.c:1824 Congestion at BTS 0 reduced! [ 176s] - Expecting channel request at BTS 0 TS 1 [ 176s] --- expout 2019-05-08 03:40:43.556000000 +0000 [ 176s] +++ /usr/src/packages/BUILD/tests/testsuite.dir/at-groups/35/stdout 2019-05-08 03:40:43.564000000 +0000 [ 176s] @@ -1 +1 @@ [ 176s] -Test OK [ 176s] +Test failed, because no channel was requested [ 176s] ./testsuite.at:213: exit code was 1, expected 0 [ 176s] 35. testsuite.at:210: 35. handover test 27 (testsuite.at:210): FAILED (testsuite.at:213) [ 176s] make[1]: *** [debian/rules:62: override_dh_auto_test] Error 1 [ 176s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 176s] make: *** [debian/rules:45: build] Error 2 [ 176s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 176s] [ 176s] lamb13 failed "build osmo-bsc_1.4.0.dsc" at Wed May 8 03:41:03 UTC 2019. [ 176s] [ 176s] ### VM INTERACTION START ### [ 179s] [ 167.814821] sysrq: SysRq : Power Off [ 179s] [ 167.821399] reboot: Power down [ 179s] ### VM INTERACTION END ### [ 179s] [ 179s] lamb13 failed "build osmo-bsc_1.4.0.dsc" at Wed May 8 03:41:07 UTC 2019. [ 179s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Wed May 8 04:01:56 2019 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 8 May 2019 04:01:56 +0000 Subject: Change in openbsc[master]: nat: Fix crash (double-free) in forward_sccp_to_msc In-Reply-To: References: Message-ID: Holger Freyther has posted comments on this change. ( https://gerrit.osmocom.org/13837 ) Change subject: nat: Fix crash (double-free) in forward_sccp_to_msc ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13837 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I209d3e2d809a67915ec43c874e68f7f746a565f0 Gerrit-Change-Number: 13837 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 04:01:56 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 04:10:04 2019 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 8 May 2019 04:10:04 +0000 Subject: Change in openbsc[master]: nat: Allocate bsc_nat_parsed on the stack instead of heap In-Reply-To: References: Message-ID: Holger Freyther has posted comments on this change. ( https://gerrit.osmocom.org/13843 ) Change subject: nat: Allocate bsc_nat_parsed on the stack instead of heap ...................................................................... Patch Set 3: (1 comment) Looks good. I think we should have consistency about the success and error space and maybe return a boolean directly. WDUT? https://gerrit.osmocom.org/#/c/13843/3/openbsc/src/osmo-bsc_nat/bsc_nat.c File openbsc/src/osmo-bsc_nat/bsc_nat.c: https://gerrit.osmocom.org/#/c/13843/3/openbsc/src/osmo-bsc_nat/bsc_nat.c at 703 PS3, Line 703: < What about != 0 like in many other cases (e.g. the write queue success tests)? This would match the bool success = ... == 0 behavior further down. Or return a boolean directly? -- To view, visit https://gerrit.osmocom.org/13843 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I66c44890952339f15131081e2f629a2824b6d3ba Gerrit-Change-Number: 13843 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 08 May 2019 04:10:04 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 04:12:38 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 04:12:38 +0000 Subject: Change in osmo-hlr[master]: osmo-hlr: allow configuring db path from cfg file In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/13586 ) Change subject: osmo-hlr: allow configuring db path from cfg file ...................................................................... osmo-hlr: allow configuring db path from cfg file So far, the cmdline argument was the only way to set a database config file. Add a similar config to VTY as 'hlr' / 'database'. The cmdline arg is stronger than the 'database' cfg item. DB is not reloaded from VTY command. Change-Id: I87b8673324e1e6225afb758fb4963ff3279ea3d8 --- M src/hlr.c M src/hlr.h M src/hlr_vty.c M tests/test_nodes.vty 4 files changed, 25 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hlr.c b/src/hlr.c index d9ebaf7..0bea590 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -626,7 +626,7 @@ bool db_upgrade; } cmdline_opts = { .config_file = "osmo-hlr.cfg", - .db_file = "hlr.db", + .db_file = NULL, .daemonize = false, .db_upgrade = false, }; @@ -741,6 +741,7 @@ INIT_LLIST_HEAD(&g_hlr->iuse_list); INIT_LLIST_HEAD(&g_hlr->ss_sessions); INIT_LLIST_HEAD(&g_hlr->ussd_routes); + g_hlr->db_file_path = talloc_strdup(g_hlr, HLR_DEFAULT_DB_FILE_PATH); /* Init default (call independent) SS session guard timeout value */ g_hlr->ncss_guard_timeout = NCSS_GUARD_TIMEOUT_DEFAULT; @@ -779,9 +780,12 @@ exit(1); } - g_hlr->dbc = db_open(hlr_ctx, cmdline_opts.db_file, true, cmdline_opts.db_upgrade); + if (cmdline_opts.db_file) + osmo_talloc_replace_string(g_hlr, &g_hlr->db_file_path, cmdline_opts.db_file); + + g_hlr->dbc = db_open(hlr_ctx, g_hlr->db_file_path, true, cmdline_opts.db_upgrade); if (!g_hlr->dbc) { - LOGP(DMAIN, LOGL_FATAL, "Error opening database\n"); + LOGP(DMAIN, LOGL_FATAL, "Error opening database %s\n", osmo_quote_str(g_hlr->db_file_path, -1)); exit(1); } diff --git a/src/hlr.h b/src/hlr.h index 00fa43c..e2e96a4 100644 --- a/src/hlr.h +++ b/src/hlr.h @@ -25,6 +25,8 @@ #include #include +#define HLR_DEFAULT_DB_FILE_PATH "hlr.db" + struct hlr_euse; struct hlr { @@ -32,6 +34,7 @@ struct osmo_gsup_server *gs; /* DB context */ + char *db_file_path; struct db_context *dbc; /* Control Interface */ diff --git a/src/hlr_vty.c b/src/hlr_vty.c index d0a623a..e4cc4be 100644 --- a/src/hlr_vty.c +++ b/src/hlr_vty.c @@ -74,6 +74,8 @@ vty_out(vty, "hlr%s", VTY_NEWLINE); if (g_hlr->store_imei) vty_out(vty, " store-imei%s", VTY_NEWLINE); + if (g_hlr->db_file_path && strcmp(g_hlr->db_file_path, HLR_DEFAULT_DB_FILE_PATH)) + vty_out(vty, " database %s%s", g_hlr->db_file_path, VTY_NEWLINE); return CMD_SUCCESS; } @@ -224,6 +226,15 @@ return CMD_SUCCESS; } +DEFUN(cfg_database, cfg_database_cmd, + "database PATH", + "Set the path to the HLR database file\n" + "Relative or absolute file system path to the database file (default is '" HLR_DEFAULT_DB_FILE_PATH "')\n") +{ + osmo_talloc_replace_string(g_hlr, &g_hlr->db_file_path, argv[0]); + return CMD_SUCCESS; +} + struct cmd_node euse_node = { EUSE_NODE, "%s(config-hlr-euse)# ", @@ -380,6 +391,8 @@ install_element(GSUP_NODE, &cfg_hlr_gsup_bind_ip_cmd); + install_element(HLR_NODE, &cfg_database_cmd); + install_element(HLR_NODE, &cfg_euse_cmd); install_element(HLR_NODE, &cfg_no_euse_cmd); install_node(&euse_node, config_write_euse); diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty index d90fa70..a4e53db 100644 --- a/tests/test_nodes.vty +++ b/tests/test_nodes.vty @@ -75,6 +75,7 @@ exit end gsup + database PATH euse NAME no euse NAME ussd route prefix PREFIX internal (own-msisdn|own-imsi) @@ -124,6 +125,7 @@ ... hlr store-imei + database hlr_vty_test.db gsup bind ip 127.0.0.1 ussd route prefix *#100# internal own-msisdn -- To view, visit https://gerrit.osmocom.org/13586 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I87b8673324e1e6225afb758fb4963ff3279ea3d8 Gerrit-Change-Number: 13586 Gerrit-PatchSet: 5 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 04:12:40 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 04:12:40 +0000 Subject: Change in osmo-hlr[master]: use new OSMO_IMSI_BUF_SIZE In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/13589 ) Change subject: use new OSMO_IMSI_BUF_SIZE ...................................................................... use new OSMO_IMSI_BUF_SIZE Depends: Id11ada4c96b79f7f0ad58185ab7dbf24622fb770 (libosmocore) Change-Id: I8e8fa221e97303df3c6cce96b25d31a53f67b939 --- M src/hlr_ussd.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, approved Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hlr_ussd.c b/src/hlr_ussd.c index 50a0167..4024780 100644 --- a/src/hlr_ussd.c +++ b/src/hlr_ussd.c @@ -150,7 +150,7 @@ /* link us to hlr->ss_sessions */ struct llist_head list; /* imsi of this session */ - char imsi[GSM23003_IMSI_MAX_DIGITS+2]; + char imsi[OSMO_IMSI_BUF_SIZE]; /* ID of this session (unique per IMSI) */ uint32_t session_id; /* state of the session */ -- To view, visit https://gerrit.osmocom.org/13589 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I8e8fa221e97303df3c6cce96b25d31a53f67b939 Gerrit-Change-Number: 13589 Gerrit-PatchSet: 5 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 04:16:48 2019 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 8 May 2019 04:16:48 +0000 Subject: Change in osmo-gsm-tester[master]: virtual: Make it possible to add tests to the ms driver In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13826 to look at the new patch set (#3). Change subject: virtual: Make it possible to add tests to the ms driver ...................................................................... virtual: Make it possible to add tests to the ms driver Introduce an Executor that forwards all testcase related methods to a list of testcases. Allow to instantiate them by name and use the result to access the statistics. Change-Id: Ia65ee53987e92b24e6b8c40e1376bc74dc260180 --- M src/osmo_gsm_tester/ms_driver.py M src/osmo_ms_driver/test_support.py M suites/nitb_netreg_mass/register_default_mass.py 3 files changed, 82 insertions(+), 33 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/26/13826/3 -- To view, visit https://gerrit.osmocom.org/13826 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia65ee53987e92b24e6b8c40e1376bc74dc260180 Gerrit-Change-Number: 13826 Gerrit-PatchSet: 3 Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Wed May 8 04:43:20 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 04:43:20 +0000 Subject: Build failure of network:osmocom:latest/osmo-sgsn in Raspbian_9.0/armv7l In-Reply-To: References: Message-ID: <5cd25e779e0e3_3a5cdc5f816230af@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sgsn/Raspbian_9.0/armv7l Package network:osmocom:latest/osmo-sgsn failed to build in Raspbian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:latest osmo-sgsn Last lines of build log: [ 271s] Unregistering TLLI efe2b700 [ 271s] NSEI=4096 proxying BTS->SGSN (NS_BVCI=4098, NSEI=256) [ 271s] LLC SAPI=1 C U GEA? IOV-UI=0x000000 FCS=0x26c6f3 CMD=UI DATA [ 271s] Got LLC message, CRC: 26c6f3 (computed 26c6f3) [ 271s] LLC SAPI=1 C U GEA? IOV-UI=0x000000 FCS=0x1285e4 CMD=UI DATA [ 271s] Got LLC message, CRC: 1285e4 (computed 1285e4) [ 271s] ATTACH_REQ: Got TLLI afe2b700, BSSGP RAID 112-332-16464-96, old RAID 112-332-16464-96, PTMSI efe2b700 [ 271s] Updated LLC message, CRC: 1285e4 -> 1285e4 [ 271s] NSEI=4096 proxying BTS->SGSN (NS_BVCI=4098, NSEI=256) [ 271s] LLC SAPI=1 C U GEA? IOV-UI=0x000000 FCS=0x1285e4 CMD=UI DATA [ 271s] Got LLC message, CRC: 1285e4 (computed 1285e4) [ 271s] LLC SAPI=1 R U GEA? IOV-UI=0x000000 FCS=0x3ed1d2 CMD=UI DATA [ 271s] Got LLC message, CRC: 3ed1d2 (computed 3ed1d2) [ 271s] ATTACH_ACK: Got TLLI afe2b700, RAID 123-456-16464-96, new PTMSI efe2b700, IMSI 12131415161718 [ 271s] Got new PTMSI efe2b700 from SGSN, using efe2b700 for BSS [ 271s] Updated LLC message, CRC: 3ed1d2 -> 3ed1d2 [ 271s] Assigning new TLLI efe2b700 to SGSN, efe2b700 to BSS [ 271s] The TLLI has been reassigned from afe2b700 to efe2b700 [ 271s] The TLLI has been reassigned from afe2b700 to efe2b700 [ 271s] NSEI=256 proxying SGSN->BSS (NS_BVCI=4098, NSEI=4096) [ 271s] LLC SAPI=1 R U GEA? IOV-UI=0x000000 FCS=0x3ed1d2 CMD=UI DATA [ 271s] Got LLC message, CRC: 3ed1d2 (computed 3ed1d2) [ 271s] LLC SAPI=1 C U GEA? IOV-UI=0x000000 FCS=0xea7648 CMD=UI DATA [ 273s] Got LLC message, CRC: [ 235.605553] sysrq: SysRq : Power Off [ 273s] [ 235.607962] reboot: Power down [ 273s] ### VM INTERACTION END ### [ 273s] [ 273s] armbuild14 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 04:43:16 UTC 2019. [ 273s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed May 8 04:55:55 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 04:55:55 +0000 Subject: Build failure of network:osmocom:latest/osmo-bsc in Raspbian_9.0/armv7l In-Reply-To: References: Message-ID: <5cd261654c084_3a5cdc5f816240e@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-bsc/Raspbian_9.0/armv7l Package network:osmocom:latest/osmo-bsc failed to build in Raspbian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:latest osmo-bsc Last lines of build log: [ 609s] | #define HAVE_STRING_H 1 [ 609s] | #define HAVE_MEMORY_H 1 [ 609s] | #define HAVE_STRINGS_H 1 [ 609s] | #define HAVE_INTTYPES_H 1 [ 609s] | #define HAVE_STDINT_H 1 [ 609s] | #define HAVE_UNISTD_H 1 [ 609s] | #define HAVE_DLFCN_H 1 [ 609s] | #define LT_OBJDIR ".libs/" [ 609s] | #define STDC_HEADERS 1 [ 609s] | #define HAVE_CDK_CDK_H 1 [ 609s] | [ 609s] | configure: exit 0 [ 609s] [ 609s] debian/rules:62: recipe for target 'override_dh_auto_test' failed [ 609s] make[1]: *** [override_dh_auto_test] Error 1 [ 609s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 609s] debian/rules:45: recipe for target 'build' failed [ 609s] make: *** [build] Error 2 [ 609s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 609s] [ 609s] obs-arm-6 failed "build osmo-bsc_1.4.0.dsc" at Wed May 8 04:55:35 UTC 2019. [ 609s] [ 609s] ### VM INTERACTION START ### [ 611s] [ 562.387628] sysrq: SysRq : Power Off [ 611s] [ 562.406980] reboot: Power down [ 611s] ### VM INTERACTION END ### [ 611s] [ 611s] obs-arm-6 failed "build osmo-bsc_1.4.0.dsc" at Wed May 8 04:55:38 UTC 2019. [ 611s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed May 8 05:02:46 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 05:02:46 +0000 Subject: Build failure of network:osmocom:latest/osmo-sgsn in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5cd2630a96629_3a5cdc5f816242ae@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sgsn/Debian_9.0/armv7l Package network:osmocom:latest/osmo-sgsn failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:latest osmo-sgsn Last lines of build log: [ 270s] Got LLC message, CRC: 36f8b7 (computed 36f8b7) [ 270s] Unhandled GSM 04.08 message type IDENTITY REQUEST for protocol discriminator GMM. [ 270s] LLC SAPI=1 C U GEA? IOV-UI=0x000000 FCS=0x3fca86 CMD=UI DATA [ 270s] Got LLC message, CRC: 3fca86 (computed 3fca86) [ 270s] ID_RESP: Got TLLI afe2b700, BSSGP RAID 112-332-16464-96, IMSI 12131415161718 [ 270s] gbproxy_validate_tlli({current = afe2b700, assigned = 00000000, net_vld = 0, bss_vld = 0}, afe2b700) [ 270s] gbproxy_validate_tlli({current = afe2b700, assigned = 00000000, net_vld = 0, bss_vld = 0}, afe2b700) [ 270s] Removing TLLI 00000000 from list (IMSI 12131415161718 re-used) [ 270s] NSEI=4096(BSS) IMSI acquisition succeeded, flushing stored messages [ 270s] LLC SAPI=1 C U GEA? IOV-UI=0x000000 FCS=0xc3cc50 CMD=UI DATA [ 270s] Got LLC message, CRC: c3cc50 (computed c3cc50) [ 270s] Updated LLC message, CRC: c3cc50 -> c3cc50 [ 270s] NSEI=4096 proxying BTS->SGSN (NS_BVCI=4098, NSEI=256) [ 270s] LLC SAPI=1 C U GEA? IOV-UI=0x000000 FCS=0xc3cc50 CMD=UI DATA [ 270s] Got LLC message, CRC: c3cc50 (computed c3cc50) [ 270s] LLC SAPI=1 R U GEA? IOV-UI=0x000000 FCS=0xce22f5 CMD=UI DATA [ 270s] Got LLC message, CRC: ce22f5 (computed ce22f5) [ 270s] ATTACH_ACK: Got TLLI afe2b700, RAID 123-456-16464-96, new PTMSI efe2b700, IMSI 12131415161718 [ 270s] Got new PTMSI efe2b700 from SGSN, using efe2b700 for BSS [ 270s] Updated LLC message, CRC: ce22f5 -> ce22f5 [ 270s] Assigning new TLLI efe2b700 to SGSN, efe2b700 to BSS [ 270s] The TLLI has been reassigned from afe2b700 to efe2b700 [ 270s] The TLLI has been reassigned from afe2b700 to efe2b700 [ 272s] NSEI=256 proxying SGSN->BSS (NS[ 231.173479] sysrq: SysRq : Power Off [ 272s] [ 231.175810] reboot: Power down [ 272s] ### VM INTERACTION END ### [ 272s] [ 272s] armbuild15 failed "build osmo-sgsn_1.4.0.dsc" at Wed May 8 05:02:45 UTC 2019. [ 272s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed May 8 05:08:12 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 08 May 2019 05:08:12 +0000 Subject: Build failure of network:osmocom:latest/osmo-bsc in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5cd26451b9001_3a5cdc5f81625079@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-bsc/Debian_9.0/armv7l Package network:osmocom:latest/osmo-bsc failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:latest osmo-bsc Last lines of build log: [ 290s] DHODEC handover_decision_2.c:1824 Congestion at BTS 0 reduced! [ 290s] DHODEC handover_decision_2.c:1863 (BTS 1) Congestion check: (free/want-free) TCH/F=3/2 TCH/H=3/2 [ 290s] DHODEC handover_decision_2.c:1867 (BTS 1) Not congested [ 290s] DHODEC handover_decision_2.c:1863 (BTS 2) Congestion check: (free/want-free) TCH/F=4/2 TCH/H=4/2 [ 290s] DHODEC handover_decision_2.c:1867 (BTS 2) Not congested [ 290s] - Expecting channel request at BTS 1 TS 2 [ 290s] --- expout 2019-05-08 05:07:40.700000000 +0000 [ 290s] +++ /usr/src/packages/BUILD/tests/testsuite.dir/at-groups/26/stdout 2019-05-08 05:07:40.725000000 +0000 [ 290s] @@ -1 +1 @@ [ 290s] -Test OK [ 290s] +Test failed, because no channel was requested [ 290s] ./testsuite.at:159: exit code was 1, expected 0 [ 290s] 26. testsuite.at:156: 26. handover test 18 (testsuite.at:156): FAILED (testsuite.at:159) [ 290s] debian/rules:62: recipe for target 'override_dh_auto_test' failed [ 290s] make[1]: *** [override_dh_auto_test] Error 1 [ 290s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 290s] debian/rules:45: recipe for target 'build' failed [ 290s] make: *** [build] Error 2 [ 290s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 290s] [ 290s] armbuild24 failed "build osmo-bsc_1.4.0.dsc" at Wed May 8 05:08:07 UTC 2019. [ 290s] [ 290s] ### VM INTERACTION START ### [ 292s] [ 273.737683] sysrq: SysRq : Power Off [ 292s] [ 273.739999] reboot: Power down [ 292s] ### VM INTERACTION END ### [ 292s] [ 292s] armbuild24 failed "build osmo-bsc_1.4.0.dsc" at Wed May 8 05:08:10 UTC 2019. [ 292s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Wed May 8 06:31:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 06:31:09 +0000 Subject: Change in osmo-msc[master]: gsm_04_11: use gsm48_decode_bcd_number2(), evaluate rc In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13881 ) Change subject: gsm_04_11: use gsm48_decode_bcd_number2(), evaluate rc ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13881 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibef71c46d72d2d43123e68f73e5ed554a69243d8 Gerrit-Change-Number: 13881 Gerrit-PatchSet: 5 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Wed, 08 May 2019 06:31:09 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 06:31:11 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 06:31:11 +0000 Subject: Change in osmo-msc[master]: gsm_04_11: use gsm48_decode_bcd_number2(), evaluate rc In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13881 ) Change subject: gsm_04_11: use gsm48_decode_bcd_number2(), evaluate rc ...................................................................... gsm_04_11: use gsm48_decode_bcd_number2(), evaluate rc Avoid deprecation warning: use gsm48_decode_bcd_number2() instead of gsm48_decode_bcd_number(). Validate the return value and add error handling. Change-Id: Ibef71c46d72d2d43123e68f73e5ed554a69243d8 --- M src/libmsc/gsm_04_11.c 1 file changed, 6 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c index 71069dc..85b861c 100644 --- a/src/libmsc/gsm_04_11.c +++ b/src/libmsc/gsm_04_11.c @@ -526,8 +526,12 @@ gsms->dst.ton = (address_lv[1] >> 4) & 7; gsms->dst.npi = address_lv[1] & 0xF; /* convert to real number */ - gsm48_decode_bcd_number(gsms->dst.addr, - sizeof(gsms->dst.addr), address_lv, 1); + if (gsm48_decode_bcd_number2(gsms->dst.addr, + sizeof(gsms->dst.addr), address_lv, da_len_bytes, 1)) { + LOG_TRANS(trans, LOGL_ERROR, "Failed to decode destination Address\n"); + rc = GSM411_RP_CAUSE_SEMANT_INC_MSG; + goto out; + } smsp += da_len_bytes; gsms->protocol_id = *smsp++; -- To view, visit https://gerrit.osmocom.org/13881 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ibef71c46d72d2d43123e68f73e5ed554a69243d8 Gerrit-Change-Number: 13881 Gerrit-PatchSet: 5 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 06:31:36 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 06:31:36 +0000 Subject: Change in osmo-msc[master]: GSUP: include terminating nul in inter-MSC source/destination name In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13612 ) Change subject: GSUP: include terminating nul in inter-MSC source/destination name ...................................................................... Patch Set 8: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13612 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9ca8c9eef104519ed1ea46e2fef46dcdc0d554eb Gerrit-Change-Number: 13612 Gerrit-PatchSet: 8 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 08 May 2019 06:31:36 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 06:41:52 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 06:41:52 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13137 ) Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... Patch Set 18: Code-Review+2 (1 comment) You don't have to change the double-intialization right now before the merge, but I would ask you to create a ticket about it and look into replacing any such instances at some point in the future. Same goes for Vadim's other comments [as far as they are valid]. Let's make sure you put something in place (ticket or whatever else) to not forget about those, thanks. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c File src/libmsc/e_link.c: https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c at 77 PS9, Line 77: *e = (struct e_link) { > I prefer this to clearly indicate that the struct is initialized from scratch. [?] the point is that the compiler is unable to optimize away initializing the same bit of memory *twice*, as talloc hapepns inside a library (and thus is outside of the scope of allocation). I'm flexible to tolerate different preferences in syntax or code style to some extent, but when it comes with a runtime overhead, then I'm quite certain the variant causing the overhead is inferior to the veriant that doesn't. So please kindly adjust your "common pattern" in a way that doesn't incur runtime overhead. Either you don't use talloc_zero() but regular talloc(), or (very much preferred) don't initialize the entire struct all over again. Sure, we have many other areas left for optimization, but there is absolutely zero advantage to initializing the memory twice to (mostly) zero. -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 18 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 06:41:52 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 06:42:07 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 06:42:07 +0000 Subject: Change in openbsc[master]: nat: Fix crash (double-free) in forward_sccp_to_msc In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13837 ) Change subject: nat: Fix crash (double-free) in forward_sccp_to_msc ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13837 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I209d3e2d809a67915ec43c874e68f7f746a565f0 Gerrit-Change-Number: 13837 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 06:42:07 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 06:46:16 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 8 May 2019 06:46:16 +0000 Subject: Change in osmo-msc[master]: vty: make retrieve-imeisv-early configurable In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Pau Espin Pedrol, Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13892 to look at the new patch set (#2). Change subject: vty: make retrieve-imeisv-early configurable ...................................................................... vty: make retrieve-imeisv-early configurable Prepare for Rhizomatica's subscriber on demand use case, in which the network access is disabled by default for new subscribers, but the IMEI is required in the HLR to find out which user has which IMSI. Due to the network access being disabled, the location update request towards the HLR fails and the MS gets rejected, so we need to get the IMEI early. Related: OS#2542, OS#3755 Change-Id: I256224194c3b8caf2b58a88d11dccd32c569201f --- M src/libmsc/msc_vty.c M tests/test_nodes.vty 2 files changed, 25 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/92/13892/2 -- To view, visit https://gerrit.osmocom.org/13892 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I256224194c3b8caf2b58a88d11dccd32c569201f Gerrit-Change-Number: 13892 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 06:46:16 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 8 May 2019 06:46:16 +0000 Subject: Change in osmo-msc[master]: vlr: when setting IMEISV, also set IMEI In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13893 to look at the new patch set (#2). Change subject: vlr: when setting IMEISV, also set IMEI ...................................................................... vlr: when setting IMEISV, also set IMEI Copy IMEISV to IMEI when IMEISV changes. The additional SV digits will get cut off then. This is needed for the subscriber on demand use case, since we can get the IMEISV early (see [1]), but need to send the IMEI to the Check IMEI procedure. While adjusting the tests, I have noticed that there are code paths where we ask the MS for the IMEISV first, and later ask the MS for the IMEI, although we already have the IMEISV. This could be improved in a future patch. [1] Change-Id I256224194c3b8caf2b58a88d11dccd32c569201f Related: OS#2542 Change-Id: I02e7b66848bf7dddb31b105e2ae981432817ae1e --- M src/libvlr/vlr.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_no_authen.err 3 files changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/93/13893/2 -- To view, visit https://gerrit.osmocom.org/13893 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I02e7b66848bf7dddb31b105e2ae981432817ae1e Gerrit-Change-Number: 13893 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 06:46:16 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 8 May 2019 06:46:16 +0000 Subject: Change in osmo-msc[master]: vlr: optionally send IMEI early to HLR In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13894 to look at the new patch set (#2). Change subject: vlr: optionally send IMEI early to HLR ...................................................................... vlr: optionally send IMEI early to HLR When 'check-imei-rqd 1 early' is set in the config, send the IMEI to the HLR before doing the location update with the HLR. The OsmoHLR documentation referenced in the code will be added in osmo-hlr.git's Change-Id I2dd4a56f7b8be8b5d0e6fc32e04459e5e278d0a9. Related: OS#2542 Change-Id: I88283cad23793b475445d814ff49db534cb41244 --- M src/libvlr/vlr.c M src/libvlr/vlr_lu_fsm.c M src/libvlr/vlr_lu_fsm.h M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_ss.err M tests/msc_vlr/msc_vlr_test_umts_authen.err 16 files changed, 216 insertions(+), 161 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/94/13894/2 -- To view, visit https://gerrit.osmocom.org/13894 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I88283cad23793b475445d814ff49db534cb41244 Gerrit-Change-Number: 13894 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 06:46:19 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 8 May 2019 06:46:19 +0000 Subject: Change in osmo-msc[master]: vlr: fix IMEI length Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/13904 Change subject: vlr: fix IMEI length ...................................................................... vlr: fix IMEI length Set the length of vlr_subscr->imei to GSM23003_IMEI_NUM_DIGITS_NO_CHK (14) instead of GSM23003_IMEISV_NUM_DIGITS (16). Note that there is also GSM23003_IMEI_NUM_DIGITS (15), which includes an additional checksum digit. This digit is not intended for digital transmission, so we don't need to store it. Also by not storing it, we can simply copy the IMEI-part from the IMEISV to the IMEI without worrying about the checksum (will be done in a follow up patch). A good overview of the IMEI/IMEISV structure is here: https://en.wikipedia.org/wiki/International_Mobile_Equipment_Identity#Structure_of_the_IMEI_and_IMEISV_(IMEI_software_version) Related: OS#2542 Change-Id: Iaf2569c099874b55acbd748b776394726cc5ce54 --- M include/osmocom/msc/vlr.h M tests/msc_vlr/msc_vlr_test_gsm_authen.c M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_no_authen.err 7 files changed, 57 insertions(+), 61 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/04/13904/1 diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index ce6a232..a8a3810 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -151,7 +151,7 @@ struct osmo_cell_global_id cgi; /* 2.4.16 */ char imeisv[GSM23003_IMEISV_NUM_DIGITS+1]; /* 2.2.3 */ - char imei[GSM23003_IMEISV_NUM_DIGITS+1]; /* 2.1.9 */ + char imei[GSM23003_IMEI_NUM_DIGITS_NO_CHK+1]; /* 2.1.9 */ bool imsi_detached_flag; /* 2.7.1 */ bool conf_by_radio_contact_ind; /* 2.7.4.1 */ bool sub_dataconf_by_hlr_ind; /* 2.7.4.2 */ diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.c b/tests/msc_vlr/msc_vlr_test_gsm_authen.c index 0153609..2da5108 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_authen.c +++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.c @@ -575,7 +575,7 @@ thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0"); + gsup_expect_tx("30010809710000004026f050080724433224433224"); ms_sends_msg("0559084a32244332244302"); EXPECT_ACCEPTED(false); thwart_rx_non_initial_requests(); @@ -593,7 +593,7 @@ btw("Subscriber has the IMEI"); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); - VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d"); + VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d"); vlr_subscr_put(vsub, __func__); BTW("subscriber detaches"); @@ -683,7 +683,7 @@ thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0"); + gsup_expect_tx("30010809710000004026f050080724433224433224"); ms_sends_msg("0559084a32244332244302"); EXPECT_ACCEPTED(false); thwart_rx_non_initial_requests(); @@ -776,7 +776,7 @@ thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0"); + gsup_expect_tx("30010809710000004026f050080724433224433224"); ms_sends_msg("0559084a32244332244302"); EXPECT_ACCEPTED(false); thwart_rx_non_initial_requests(); @@ -870,7 +870,7 @@ thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0"); + gsup_expect_tx("30010809710000004026f050080724433224433224"); ms_sends_msg("0559084a32244332244302"); EXPECT_ACCEPTED(false); thwart_rx_non_initial_requests(); @@ -904,7 +904,7 @@ btw("Subscriber has the IMEI and TMSI"); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); - VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d"); + VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d"); VERBOSE_ASSERT(vsub->tmsi, == 0x03020100, "0x%08x"); vlr_subscr_put(vsub, __func__); diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.err b/tests/msc_vlr/msc_vlr_test_gsm_authen.err index 457b77f..0cf1ab2 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_authen.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.err @@ -1300,10 +1300,10 @@ DREF IMSI-901700000004620:MSISDN-46071: MSC conn use + dtap == 1 (0x2: dtap) DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -DVLR GSUP tx: 30010809710000004026f050090824433224433224f0 -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0 +DVLR GSUP tx: 30010809710000004026f050080724433224433224 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: ) DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED @@ -1359,7 +1359,7 @@ llist_count(&net->ran_conns) == 0 - Subscriber has the IMEI DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_gsm_authen_imei: now used by 2 (attached,test_gsm_authen_imei) - strcmp(vsub->imei, "423423423423420") == 0 + strcmp(vsub->imei, "42342342342342") == 0 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_gsm_authen_imei: now used by 1 (attached) --- - subscriber detaches @@ -1546,10 +1546,10 @@ DREF IMSI-901700000004620:MSISDN-46071: MSC conn use + dtap == 1 (0x2: dtap) DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -DVLR GSUP tx: 30010809710000004026f050090824433224433224f0 -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0 +DVLR GSUP tx: 30010809710000004026f050080724433224433224 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: ) DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED @@ -1765,10 +1765,10 @@ DREF IMSI-901700000004620:MSISDN-46071: MSC conn use + dtap == 1 (0x2: dtap) DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -DVLR GSUP tx: 30010809710000004026f050090824433224433224f0 -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0 +DVLR GSUP tx: 30010809710000004026f050080724433224433224 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: ) DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED @@ -1985,10 +1985,10 @@ DREF IMSI-901700000004620:MSISDN-46071: MSC conn use + dtap == 1 (0x2: dtap) DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -DVLR GSUP tx: 30010809710000004026f050090824433224433224f0 -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0 +DVLR GSUP tx: 30010809710000004026f050080724433224433224 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: ) DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED @@ -2077,7 +2077,7 @@ llist_count(&net->ran_conns) == 0 - Subscriber has the IMEI and TMSI DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 + test_gsm_authen_tmsi_imei: now used by 2 (attached,test_gsm_authen_tmsi_imei) - strcmp(vsub->imei, "423423423423420") == 0 + strcmp(vsub->imei, "42342342342342") == 0 vsub->tmsi == 0x03020100 DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 - test_gsm_authen_tmsi_imei: now used by 1 (attached) --- diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c index cbcc11d..e1ee156 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c @@ -555,7 +555,7 @@ thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0"); + gsup_expect_tx("30010809710000004026f050080724433224433224"); ms_sends_msg("0559084a32244332244302"); EXPECT_ACCEPTED(false); thwart_rx_non_initial_requests(); @@ -573,7 +573,7 @@ btw("Subscriber has the IMEI"); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); - VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d"); + VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d"); vlr_subscr_put(vsub, __func__); BTW("subscriber detaches"); @@ -766,7 +766,7 @@ thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0"); + gsup_expect_tx("30010809710000004026f050080724433224433224"); ms_sends_msg("0559084a32244332244302"); EXPECT_ACCEPTED(false); thwart_rx_non_initial_requests(); @@ -800,7 +800,7 @@ btw("Subscriber has the IMEI and TMSI"); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); - VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d"); + VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d"); VERBOSE_ASSERT(vsub->tmsi, == 0x03020100, "0x%08x"); vlr_subscr_put(vsub, __func__); diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err index 9ca5b8c..43956c8 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err @@ -1243,10 +1243,10 @@ DREF IMSI-901700000004620:MSISDN-46071: MSC conn use + dtap == 1 (0x2: dtap) DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -DVLR GSUP tx: 30010809710000004026f050090824433224433224f0 -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0 +DVLR GSUP tx: 30010809710000004026f050080724433224433224 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: ) DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED @@ -1302,7 +1302,7 @@ llist_count(&net->ran_conns) == 0 - Subscriber has the IMEI DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_ciph_imei: now used by 2 (attached,test_ciph_imei) - strcmp(vsub->imei, "423423423423420") == 0 + strcmp(vsub->imei, "42342342342342") == 0 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_ciph_imei: now used by 1 (attached) --- - subscriber detaches @@ -1711,10 +1711,10 @@ DREF IMSI-901700000004620:MSISDN-46071: MSC conn use + dtap == 1 (0x2: dtap) DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -DVLR GSUP tx: 30010809710000004026f050090824433224433224f0 -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0 +DVLR GSUP tx: 30010809710000004026f050080724433224433224 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: ) DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED @@ -1803,7 +1803,7 @@ llist_count(&net->ran_conns) == 0 - Subscriber has the IMEI and TMSI DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 + test_ciph_tmsi_imei: now used by 2 (attached,test_ciph_tmsi_imei) - strcmp(vsub->imei, "423423423423420") == 0 + strcmp(vsub->imei, "42342342342342") == 0 vsub->tmsi == 0x03020100 DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 - test_ciph_tmsi_imei: now used by 1 (attached) --- diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.c b/tests/msc_vlr/msc_vlr_test_no_authen.c index 2a4a14e..e5dd0b7 100644 --- a/tests/msc_vlr/msc_vlr_test_no_authen.c +++ b/tests/msc_vlr/msc_vlr_test_no_authen.c @@ -430,7 +430,7 @@ thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0"); + gsup_expect_tx("30010809710000004026f050080724433224433224"); /* 3GPP TS 23.003: 6.2.1 Composition of IMEI: the IMEI ends with a * spare digit that shall be sent as zero by the MS. */ ms_sends_msg("0559084a32244332244302"); @@ -448,7 +448,7 @@ btw("Subscriber has the IMEI"); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); - VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d"); + VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d"); vlr_subscr_put(vsub, __func__); BTW("subscriber detaches"); @@ -505,7 +505,7 @@ thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0"); + gsup_expect_tx("30010809710000004026f050080724433224433224"); ms_sends_msg("0559084a32244332244302"); btw("HLR accepts the IMEI"); @@ -530,7 +530,7 @@ btw("Subscriber has the IMEI and TMSI"); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); - VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d"); + VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d"); VERBOSE_ASSERT(vsub->tmsi, == 0x03020100, "0x%08x"); vlr_subscr_put(vsub, __func__); @@ -656,13 +656,12 @@ EXPECT_CONN_COUNT(1); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); - VERBOSE_ASSERT(vsub->imei[0], == 0, "%d"); vlr_subscr_put(vsub, __func__); EXPECT_ACCEPTED(false); thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0"); + gsup_expect_tx("30010809710000004026f050080724433224433224"); ms_sends_msg("0559084a32244332244302"); btw("HLR accepts the IMEI"); @@ -678,7 +677,7 @@ btw("Subscriber has the IMEI"); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); - VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d"); + VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d"); vlr_subscr_put(vsub, __func__); BTW("subscriber detaches"); @@ -882,13 +881,12 @@ EXPECT_CONN_COUNT(1); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); - VERBOSE_ASSERT(vsub->imei[0], == 0, "%d"); vlr_subscr_put(vsub, __func__); EXPECT_ACCEPTED(false); thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0"); + gsup_expect_tx("30010809710000004026f050080724433224433224"); ms_sends_msg("0559084a32244332244302"); btw("HLR accepts the IMEI"); @@ -914,7 +912,7 @@ vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); VERBOSE_ASSERT(strcmp(vsub->imeisv, "4234234234234275"), == 0, "%d"); - VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d"); + VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d"); VERBOSE_ASSERT(vsub->tmsi, == 0x03020100, "0x%08x"); vlr_subscr_put(vsub, __func__); diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.err b/tests/msc_vlr/msc_vlr_test_no_authen.err index 6f5adb6..7e08c45 100644 --- a/tests/msc_vlr/msc_vlr_test_no_authen.err +++ b/tests/msc_vlr/msc_vlr_test_no_authen.err @@ -987,10 +987,10 @@ DREF IMSI-901700000004620:MSISDN-46071: MSC conn use + dtap == 1 (0x2: dtap) DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -DVLR GSUP tx: 30010809710000004026f050090824433224433224f0 -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0 +DVLR GSUP tx: 30010809710000004026f050080724433224433224 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: ) DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED @@ -1036,7 +1036,7 @@ llist_count(&net->ran_conns) == 0 - Subscriber has the IMEI DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_no_authen_imei: now used by 2 (attached,test_no_authen_imei) - strcmp(vsub->imei, "423423423423420") == 0 + strcmp(vsub->imei, "42342342342342") == 0 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_no_authen_imei: now used by 1 (attached) --- - subscriber detaches @@ -1176,10 +1176,10 @@ DREF IMSI-901700000004620:MSISDN-46071: MSC conn use + dtap == 1 (0x2: dtap) DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -DVLR GSUP tx: 30010809710000004026f050090824433224433224f0 -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0 +DVLR GSUP tx: 30010809710000004026f050080724433224433224 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: ) DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED @@ -1252,7 +1252,7 @@ llist_count(&net->ran_conns) == 0 - Subscriber has the IMEI and TMSI DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 + test_no_authen_tmsi_imei: now used by 2 (attached,test_no_authen_tmsi_imei) - strcmp(vsub->imei, "423423423423420") == 0 + strcmp(vsub->imei, "42342342342342") == 0 vsub->tmsi == 0x03020100 DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 - test_no_authen_tmsi_imei: now used by 1 (attached) --- @@ -1558,7 +1558,6 @@ - We will only do business when the IMEI is known llist_count(&net->ran_conns) == 1 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_no_authen_imeisv_imei: now used by 2 (conn,test_no_authen_imeisv_imei) - vsub->imei[0] == 0 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_no_authen_imeisv_imei: now used by 1 (conn) ran_conn_is_accepted() == false requests shall be thwarted @@ -1575,10 +1574,10 @@ DREF IMSI-901700000004620:MSISDN-46071: MSC conn use + dtap == 1 (0x2: dtap) DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -DVLR GSUP tx: 30010809710000004026f050090824433224433224f0 -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0 +DVLR GSUP tx: 30010809710000004026f050080724433224433224 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: ) DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED @@ -1624,7 +1623,7 @@ llist_count(&net->ran_conns) == 0 - Subscriber has the IMEI DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_no_authen_imeisv_imei: now used by 2 (attached,test_no_authen_imeisv_imei) - strcmp(vsub->imei, "423423423423420") == 0 + strcmp(vsub->imei, "42342342342342") == 0 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_no_authen_imeisv_imei: now used by 1 (attached) --- - subscriber detaches @@ -2130,7 +2129,6 @@ - We will only do business when the IMEI is known llist_count(&net->ran_conns) == 1 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_no_authen_imeisv_tmsi_imei: now used by 2 (conn,test_no_authen_imeisv_tmsi_imei) - vsub->imei[0] == 0 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_no_authen_imeisv_tmsi_imei: now used by 1 (conn) ran_conn_is_accepted() == false requests shall be thwarted @@ -2147,10 +2145,10 @@ DREF IMSI-901700000004620:MSISDN-46071: MSC conn use + dtap == 1 (0x2: dtap) DRLL Dispatching 04.08 message GSM48_MT_MM_ID_RESP (0x5:0x19) DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -DVLR GSUP tx: 30010809710000004026f050090824433224433224f0 -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f0 +DVLR GSUP tx: 30010809710000004026f050080724433224433224 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050080724433224433224 DREF IMSI-901700000004620:MSISDN-46071: MSC conn use - dtap == 0 (0x0: ) DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Received Event RAN_CONN_E_UNUSED DMM RAN_conn(IMSI-901700000004620:MSISDN-46071:GERAN-A-0:LU){RAN_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event RAN_CONN_E_UNUSED @@ -2224,7 +2222,7 @@ - Subscriber has the IMEISV, IMEI and TMSI DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 + test_no_authen_imeisv_tmsi_imei: now used by 2 (attached,test_no_authen_imeisv_tmsi_imei) strcmp(vsub->imeisv, "4234234234234275") == 0 - strcmp(vsub->imei, "423423423423420") == 0 + strcmp(vsub->imei, "42342342342342") == 0 vsub->tmsi == 0x03020100 DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 - test_no_authen_imeisv_tmsi_imei: now used by 1 (attached) --- -- To view, visit https://gerrit.osmocom.org/13904 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Iaf2569c099874b55acbd748b776394726cc5ce54 Gerrit-Change-Number: 13904 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 06:46:48 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 06:46:48 +0000 Subject: Change in osmo-msc[master]: vlr: optionally send IMEI early to HLR In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13894 ) Change subject: vlr: optionally send IMEI early to HLR ...................................................................... Patch Set 1: Code-Review+1 (1 comment) I would have simply moved the IMEI CHECK unconditionally to the start, but maybe that violates some GSM MAP related spec? Either way, I'm happy with this approach, aside from the minor comments below. https://gerrit.osmocom.org/#/c/13894/1/src/libvlr/vlr_lu_fsm.c File src/libvlr/vlr_lu_fsm.c: https://gerrit.osmocom.org/#/c/13894/1/src/libvlr/vlr_lu_fsm.c at 955 PS1, Line 955: event without effect > I guess if this happens, then we have a bug somewhere? I would rather OSMO_ASSERT(0) here... [?] There's two cases: 1) the event is permitted in in_event_mask of the state, but we don't handle it here. Then it's a bug of the code and the code is incomplete, hence we normally put a "default: OSMO_ASSERT(0)" here 2) the event is not permitted in in_event_mask of the state. In this case, the osmo_fsm core will already print a message about an 'unhandled event' and discard the event. So in either case, the logging here is not needed/intended. -- To view, visit https://gerrit.osmocom.org/13894 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I88283cad23793b475445d814ff49db534cb41244 Gerrit-Change-Number: 13894 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 06:46:48 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 06:51:36 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 06:51:36 +0000 Subject: Change in osmo-msc[master]: vlr: fix IMEI length In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13904 ) Change subject: vlr: fix IMEI length ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13904 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iaf2569c099874b55acbd748b776394726cc5ce54 Gerrit-Change-Number: 13904 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-CC: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 08 May 2019 06:51:36 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 06:57:04 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 8 May 2019 06:57:04 +0000 Subject: Change in osmo-msc[master]: vlr: when setting IMEISV, also set IMEI In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/13893 ) Change subject: vlr: when setting IMEISV, also set IMEI ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/13893/1/include/osmocom/msc/vlr.h File include/osmocom/msc/vlr.h: https://gerrit.osmocom.org/#/c/13893/1/include/osmocom/msc/vlr.h at 154 PS1, Line 154: char imei[GSM23003_IMEI_NUM_DIGITS_NO_CHK+1]; /* 2.1.9 */ > Send this as a separate patch please. Done: https://gerrit.osmocom.org/#/c/osmo-msc/+/13904/ -- To view, visit https://gerrit.osmocom.org/13893 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I02e7b66848bf7dddb31b105e2ae981432817ae1e Gerrit-Change-Number: 13893 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 06:57:04 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 06:57:54 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 8 May 2019 06:57:54 +0000 Subject: Change in osmo-msc[master]: vlr: optionally send IMEI early to HLR In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/13894 ) Change subject: vlr: optionally send IMEI early to HLR ...................................................................... Patch Set 2: (4 comments) https://gerrit.osmocom.org/#/c/13894/1/src/libvlr/vlr_lu_fsm.c File src/libvlr/vlr_lu_fsm.c: https://gerrit.osmocom.org/#/c/13894/1/src/libvlr/vlr_lu_fsm.c at 463 PS1, Line 463: /* If imeisv_early is enabled: IMEI already retrieved and checked (vlr_loc_upd_node1_pre), don't do it again. */ > Add a comment here like "if imeisv_eraly is enabled, we already have IMEI so no need to ask for it a [?] Done https://gerrit.osmocom.org/#/c/13894/1/src/libvlr/vlr_lu_fsm.c at 932 PS1, Line 932: > What would this message mean for a regular user (not a developer)? Either it should contain somethin [?] I've added it for consistency with related functions, that also log just their function name. But if you prefer, I can remove it or change it. * vlr_loc_upd_node1 https://git.osmocom.org/osmo-msc/tree/src/libvlr/vlr_lu_fsm.c?id=5b1e0309b513ebe05a4b5b6dfa0c8ad620d34a99#n909 * lu_compl_vlr_new_tmsi https://git.osmocom.org/osmo-msc/tree/src/libvlr/vlr_lu_fsm.c?id=5b1e0309b513ebe05a4b5b6dfa0c8ad620d34a99#n434 * vlr_loc_upd_node_4 https://git.osmocom.org/osmo-msc/tree/src/libvlr/vlr_lu_fsm.c?id=5b1e0309b513ebe05a4b5b6dfa0c8ad620d34a99#n791 * vlr_loc_upd_node_b https://git.osmocom.org/osmo-msc/tree/src/libvlr/vlr_lu_fsm.c?id=5b1e0309b513ebe05a4b5b6dfa0c8ad620d34a99#n809 * vlr_loc_upd_post_ciph https://git.osmocom.org/osmo-msc/tree/src/libvlr/vlr_lu_fsm.c?id=5b1e0309b513ebe05a4b5b6dfa0c8ad620d34a99#n830 * vlr_loc_upd_post_auth https://git.osmocom.org/osmo-msc/tree/src/libvlr/vlr_lu_fsm.c?id=5b1e0309b513ebe05a4b5b6dfa0c8ad620d34a99#n863 * vlr_loc_upd_want_imsi https://git.osmocom.org/osmo-msc/tree/src/libvlr/vlr_lu_fsm.c?id=5b1e0309b513ebe05a4b5b6dfa0c8ad620d34a99#n932 https://gerrit.osmocom.org/#/c/13894/1/src/libvlr/vlr_lu_fsm.c at 937 PS1, Line 937: vlr_subscr_tx_req_check_imei(lfp->vsub); : } el > Please fix the coding style: ... } else { ... Done https://gerrit.osmocom.org/#/c/13894/1/src/libvlr/vlr_lu_fsm.c at 955 PS1, Line 955: > I guess if this happens, then we have a bug somewhere? I would rather OSMO_ASSERT(0) here... [?] It is done like this 6 other times in the file already, so I'd keep that for consistency. -- To view, visit https://gerrit.osmocom.org/13894 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I88283cad23793b475445d814ff49db534cb41244 Gerrit-Change-Number: 13894 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 06:57:54 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 06:59:00 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 06:59:00 +0000 Subject: Change in libosmocore[master]: Fix osmo_quote_str_c() for strings larger than 32 bytes In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13901 to look at the new patch set (#2). Change subject: Fix osmo_quote_str_c() for strings larger than 32 bytes ...................................................................... Fix osmo_quote_str_c() for strings larger than 32 bytes As Neels pointed out, we shouldn't pass a constant value of 32 to osmo_quote_str_buf2(). Change-Id: Id9bde14166d6674ce4dda36fa9f4ae9217ce5cc2 --- M src/utils.c 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/01/13901/2 -- To view, visit https://gerrit.osmocom.org/13901 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id9bde14166d6674ce4dda36fa9f4ae9217ce5cc2 Gerrit-Change-Number: 13901 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 07:01:23 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 8 May 2019 07:01:23 +0000 Subject: Change in osmo-msc[master]: vlr: optionally send IMEI early to HLR In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/13894 ) Change subject: vlr: optionally send IMEI early to HLR ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/13894/1/src/libvlr/vlr_lu_fsm.c File src/libvlr/vlr_lu_fsm.c: https://gerrit.osmocom.org/#/c/13894/1/src/libvlr/vlr_lu_fsm.c at 955 PS1, Line 955: event without effect > It is done like this 6 other times in the file already, so I'd keep that for consistency. I wrote my previous answer as reply to Vadmin's comment and submitted it, before I saw Harald's comment. I'll update it and put an OSMO_ASSERT(0) there then. -- To view, visit https://gerrit.osmocom.org/13894 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I88283cad23793b475445d814ff49db534cb41244 Gerrit-Change-Number: 13894 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 07:01:23 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 07:31:49 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 8 May 2019 07:31:49 +0000 Subject: Change in osmo-msc[master]: vlr: optionally send IMEI early to HLR In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13894 to look at the new patch set (#3). Change subject: vlr: optionally send IMEI early to HLR ...................................................................... vlr: optionally send IMEI early to HLR When 'check-imei-rqd 1 early' is set in the config, send the IMEI to the HLR before doing the location update with the HLR. The OsmoHLR documentation referenced in the code will be added in osmo-hlr.git's Change-Id I2dd4a56f7b8be8b5d0e6fc32e04459e5e278d0a9. Related: OS#2542 Change-Id: I88283cad23793b475445d814ff49db534cb41244 --- M src/libvlr/vlr.c M src/libvlr/vlr_lu_fsm.c M src/libvlr/vlr_lu_fsm.h M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_ss.err M tests/msc_vlr/msc_vlr_test_umts_authen.err 16 files changed, 215 insertions(+), 161 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/94/13894/3 -- To view, visit https://gerrit.osmocom.org/13894 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I88283cad23793b475445d814ff49db534cb41244 Gerrit-Change-Number: 13894 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 07:36:54 2019 From: gerrit-no-reply at lists.osmocom.org (Mykola Shchetinin) Date: Wed, 8 May 2019 07:36:54 +0000 Subject: Change in libosmocore[master]: Fix osmo_quote_str_c() for strings larger than 32 bytes In-Reply-To: References: Message-ID: Mykola Shchetinin has posted comments on this change. ( https://gerrit.osmocom.org/13901 ) Change subject: Fix osmo_quote_str_c() for strings larger than 32 bytes ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13901 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id9bde14166d6674ce4dda36fa9f4ae9217ce5cc2 Gerrit-Change-Number: 13901 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Mykola Shchetinin Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 07:36:54 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 07:50:31 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 07:50:31 +0000 Subject: Change in osmo-ttcn3-hacks[master]: sgsn: Use f_send_l3() instead of 2G speicific f_send_l3_gmm_llc() Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13905 Change subject: sgsn: Use f_send_l3() instead of 2G speicific f_send_l3_gmm_llc() ...................................................................... sgsn: Use f_send_l3() instead of 2G speicific f_send_l3_gmm_llc() Change-Id: If80da5a94fd786b90f71121b51742c9f70a693eb --- M sgsn/SGSN_Tests.ttcn 1 file changed, 39 insertions(+), 40 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/05/13905/1 diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index 8bd32b1..d76ae5e 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -450,7 +450,7 @@ BSSGP[gb_index].send(ts_BSSGP_UL_UD(g_pars.tlli, g_pars.bssgp_cell_id[gb_index], llc_enc)); } -function f_send_l3_gmm_llc(template PDU_L3_MS_SGSN l3_mo, integer gb_index := 0) runs on BSSGP_ConnHdlr { +private function f_send_l3_gmm_llc(template PDU_L3_MS_SGSN l3_mo, integer gb_index := 0) runs on BSSGP_ConnHdlr { var octetstring l3_enc := enc_PDU_L3_MS_SGSN(valueof(l3_mo)); var BIT4 sapi := f_llc_sapi_by_l3_mo(valueof(l3_mo)); var integer n_u := f_llc_get_n_u_tx(llc[bit2int(sapi)]); @@ -786,7 +786,7 @@ private function f_TC_attach_auth_id_timeout(charstring id) runs on BSSGP_ConnHdlr { var RoutingAreaIdentificationV old_ra := f_random_RAI(); - f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit)); + f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit)); alt { [] BSSGP[0].receive(tr_GMM_ID_REQ(?)) { /* don't send ID Response */ @@ -812,7 +812,7 @@ private function f_TC_attach_auth_sai_timeout(charstring id) runs on BSSGP_ConnHdlr { var RoutingAreaIdentificationV old_ra := f_random_RAI(); - f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit)); + f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit)); alt { [] as_mm_identity(); [] GSUP.receive(tr_GSUP_SAI_REQ(g_pars.imsi)); { } @@ -832,7 +832,7 @@ private function f_TC_attach_auth_sai_reject(charstring id) runs on BSSGP_ConnHdlr { var RoutingAreaIdentificationV old_ra := f_random_RAI(); - f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit)); + f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit)); alt { [] as_mm_identity(); [] GSUP.receive(tr_GSUP_SAI_REQ(g_pars.imsi)); { @@ -854,7 +854,7 @@ var PDU_L3_SGSN_MS l3_mt; var RoutingAreaIdentificationV old_ra := f_random_RAI(); - f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit)); + f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit)); f_gmm_auth(); /* Expect MSC to perform LU with HLR */ GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi)); @@ -883,7 +883,7 @@ var PDU_L3_SGSN_MS l3_mt; var RoutingAreaIdentificationV old_ra := f_random_RAI(); - f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit)); + f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit)); f_gmm_auth(); /* Expect MSC to perform LU with HLR */ GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi)) { @@ -914,7 +914,7 @@ var PDU_L3_SGSN_MS l3_mt; var RoutingAreaIdentificationV old_ra := f_random_RAI(); - f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, true, false, omit, omit)); + f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, true, false, omit, omit)); f_gmm_auth(); /* Expect MSC to perform LU with HLR */ f_gmm_gsup_lu_isd(); @@ -922,7 +922,7 @@ BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?)) -> value l3_mt { f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept); } - f_send_l3_gmm_llc(ts_GMM_ATTACH_COMPL); + f_send_l3(ts_GMM_ATTACH_COMPL); setverdict(pass); } testcase TC_attach_combined() runs on test_CT { @@ -940,12 +940,12 @@ g_pars.net.expect_auth := false; - f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit)); + f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit)); f_gmm_auth(); BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?)) -> value l3_mt { f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept); } - f_send_l3_gmm_llc(ts_GMM_ATTACH_COMPL); + f_send_l3(ts_GMM_ATTACH_COMPL); setverdict(pass); } testcase TC_attach_accept_all() runs on test_CT { @@ -967,7 +967,7 @@ g_pars.net.expect_auth := false; - f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit)); + f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit)); alt { [] as_mm_identity(); [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT('07'O)) { @@ -999,7 +999,7 @@ private function f_TC_rau_unknown(charstring id) runs on BSSGP_ConnHdlr { var RoutingAreaIdentificationV old_ra := f_random_RAI(); - f_send_l3_gmm_llc(ts_GMM_RAU_REQ(f_mi_get_lv(), GPRS_UPD_T_RA, old_ra, false, omit, omit)); + f_send_l3(ts_GMM_RAU_REQ(f_mi_get_lv(), GPRS_UPD_T_RA, old_ra, false, omit, omit)); alt { [] BSSGP[0].receive(tr_GMM_RAU_REJECT('0a'O)) { setverdict(pass); @@ -1035,7 +1035,7 @@ function f_detach_mo(BIT3 detach_type, boolean power_off, boolean expect_purge, integer bssgp_index := 0) runs on BSSGP_ConnHdlr { var PDU_L3_SGSN_MS l3_mt; timer T := 5.0; - f_send_l3_gmm_llc(ts_GMM_DET_REQ_MO(detach_type, power_off), bssgp_index); + f_send_l3(ts_GMM_DET_REQ_MO(detach_type, power_off), bssgp_index); if (expect_purge) { GSUP.receive(tr_GSUP_PURGE_MS_REQ(g_pars.imsi, OSMO_GSUP_CN_DOMAIN_PS)); GSUP.send(ts_GSUP_PURGE_MS_RES(g_pars.imsi)); @@ -1163,7 +1163,7 @@ recovery := ts_Recovery(apars.ggsn_restart_ctr); } - f_send_l3_gmm_llc(ts_SM_ACT_PDP_REQ(apars.tid, apars.nsapi, apars.sapi, apars.qos, apars.addr, + f_send_l3(ts_SM_ACT_PDP_REQ(apars.tid, apars.nsapi, apars.sapi, apars.qos, apars.addr, apars.apn, apars.pco), gb_idx); GTP.receive(tr_GTPC_MsgType(?, createPDPContextRequest, ?)) -> value g_ud { f_process_gtp_ctx_act_req(apars, g_ud.gtpc); @@ -1203,7 +1203,7 @@ var boolean exp_rej := ispresent(apars.exp_rej_cause); var Gtp1cUnitdata g_ud; - f_send_l3_gmm_llc(ts_SM_DEACT_PDP_REQ_MO(apars.tid, cause, false, omit), gb_idx); + f_send_l3(ts_SM_DEACT_PDP_REQ_MO(apars.tid, cause, false, omit), gb_idx); GTP.receive(tr_GTPC_MsgType(?, deletePDPContextRequest, apars.ggsn_tei_c)) -> value g_ud { var integer seq_nr := oct2int(g_ud.gtpc.opt_part.sequenceNumber); BSSGP[gb_idx].clear; @@ -1235,7 +1235,7 @@ alt { [] BSSGP[gb_idx].receive(tr_SM_DEACT_PDP_REQ_MT(apars.tid, ?, true)) { - f_send_l3_gmm_llc(ts_SM_DEACT_PDP_ACCEPT_MO(apars.tid), gb_idx); + f_send_l3(ts_SM_DEACT_PDP_ACCEPT_MO(apars.tid), gb_idx); } [not error_ind] GTP.receive(tr_GTPC_MsgType(?, deletePDPContextResponse, apars.ggsn_tei_c)) { repeat; @@ -1421,7 +1421,7 @@ /* PDP Context activation for not-attached subscriber; expect fail */ private function f_TC_pdp_act_unattached(charstring id) runs on BSSGP_ConnHdlr { var PdpActPars apars := valueof(t_PdpActPars(mp_ggsn_ip)); - f_send_l3_gmm_llc(ts_SM_ACT_PDP_REQ(apars.tid, apars.nsapi, apars.sapi, apars.qos, apars.addr, + f_send_l3(ts_SM_ACT_PDP_REQ(apars.tid, apars.nsapi, apars.sapi, apars.qos, apars.addr, apars.apn, apars.pco)); alt { /* We might want toalso actually expect a PDPC CTX ACT REJ? */ @@ -1569,7 +1569,7 @@ var OCT1 cause_network_failure := int2oct(38, 1) alt { [] BSSGP[0].receive(tr_SM_DEACT_PDP_REQ_MT(apars.tid, cause_network_failure, true)) { - f_send_l3_gmm_llc(ts_SM_DEACT_PDP_ACCEPT_MO(apars.tid)); + f_send_l3(ts_SM_DEACT_PDP_ACCEPT_MO(apars.tid)); setverdict(pass); } [] as_xid(apars); @@ -1650,7 +1650,7 @@ GTP.receive(tr_GTPC_MsgType(?, deletePDPContextResponse, apars.ggsn_tei_c)) {} - f_send_l3_gmm_llc(ts_SM_DEACT_PDP_ACCEPT_MO(apars.tid)); + f_send_l3(ts_SM_DEACT_PDP_ACCEPT_MO(apars.tid)); setverdict(pass); } testcase TC_attach_pdp_act_deact_mt_t3395_expire() runs on test_CT { @@ -1733,7 +1733,7 @@ /* MS: receive a Detach Request */ BSSGP[0].receive(tr_GMM_DET_REQ_MT(c_GMM_DTT_MT_IMSI_DETACH, ?, ?)); - f_send_l3_gmm_llc(ts_GMM_DET_ACCEPT_MO); + f_send_l3(ts_GMM_DET_ACCEPT_MO); setverdict(pass); } @@ -1824,7 +1824,7 @@ var integer count_req := 0; var MobileL3_CommonIE_Types.MobileIdentityLV mi; - f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), f_random_RAI(), true, false, omit, omit)); + f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), f_random_RAI(), true, false, omit, omit)); alt { [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) { @@ -1832,7 +1832,7 @@ } [] BSSGP[0].receive(tr_GMM_ID_REQ('001'B)) { mi := valueof(ts_MI_IMSI_LV(g_pars.imsi)); - f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi)); + f_send_l3(ts_GMM_ID_RESP(mi)); repeat; } [] BSSGP[0].receive(tr_GMM_ID_REQ('010'B)) { @@ -1872,7 +1872,7 @@ /* set p_tmsi to use it in Attach Req via f_mi_get_lv() */ g_pars.p_tmsi := 'c0000035'O; - f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), f_random_RAI(), true, false, omit, omit)); + f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), f_random_RAI(), true, false, omit, omit)); alt { [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) { @@ -1885,7 +1885,7 @@ } [] BSSGP[0].receive(tr_GMM_ID_REQ('010'B)) { mi := valueof(ts_MI_IMEI_LV(g_pars.imei)); - f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi)); + f_send_l3(ts_GMM_ID_RESP(mi)); repeat; } } @@ -1946,7 +1946,7 @@ /* there is no auth */ g_pars.net.expect_auth := false; - f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit)); + f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit)); f_gmm_auth(); alt { [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) { @@ -1955,7 +1955,7 @@ } [] BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT(*, *, *)) -> value l3_mt { f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept); - f_send_l3_gmm_llc(ts_GMM_ATTACH_COMPL); + f_send_l3(ts_GMM_ATTACH_COMPL); setverdict(pass); } } @@ -1999,7 +1999,7 @@ private function f_TC_attach_check_complete_resend(charstring id) runs on BSSGP_ConnHdlr { var integer count_req := 0; - f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), f_random_RAI(), true, false, omit, omit)); + f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), f_random_RAI(), true, false, omit, omit)); f_gmm_auth(); timer T := 10.0; @@ -2039,11 +2039,11 @@ var PDU_L3_SGSN_MS l3_mt; /* then send RAU */ - f_send_l3_gmm_llc(ts_GMM_RAU_REQ(f_mi_get_lv(), GPRS_UPD_T_RA, g_pars.ra, false, omit, omit), bssgp); + f_send_l3(ts_GMM_RAU_REQ(f_mi_get_lv(), GPRS_UPD_T_RA, g_pars.ra, false, omit, omit), bssgp); alt { [] BSSGP[bssgp].receive(tr_GMM_RAU_ACCEPT) -> value l3_mt { f_process_rau_accept(l3_mt.msgs.gprs_mm.routingAreaUpdateAccept, bssgp); - f_send_l3_gmm_llc(ts_GMM_RAU_COMPL, bssgp); + f_send_l3(ts_GMM_RAU_COMPL, bssgp); setverdict(pass); } [] BSSGP[bssgp].receive(tr_GMM_RAU_REJECT) { @@ -2119,7 +2119,7 @@ var RoutingAreaIdentificationV rand_rai := f_random_RAI(); var PDU_L3_SGSN_MS l3_mt; - f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), rand_rai, true, false, omit, omit)); + f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), rand_rai, true, false, omit, omit)); alt { [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) { @@ -2128,16 +2128,16 @@ } [] BSSGP[0].receive(tr_GMM_ID_REQ('001'B)) { mi := valueof(ts_MI_IMSI_LV(g_pars.imsi)); - f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi)); + f_send_l3(ts_GMM_ID_RESP(mi)); repeat; } [] BSSGP[0].receive(tr_GMM_ID_REQ('010'B)) { /* send out a second GMM_Attach Request. * If the SGSN follows the rules, this 2nd ATTACH REQ should be ignored, because * of the same content */ - f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), rand_rai, true, false, omit, omit)); + f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), rand_rai, true, false, omit, omit)); mi := valueof(ts_MI_IMEI_LV(g_pars.imei)); - f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi)); + f_send_l3(ts_GMM_ID_RESP(mi)); } } f_sleep(1.0); @@ -2146,7 +2146,7 @@ alt { [] BSSGP[0].receive(tr_GMM_ID_REQ('001'B)) { mi := valueof(ts_MI_IMSI_LV(g_pars.imsi)); - f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi)); + f_send_l3(ts_GMM_ID_RESP(mi)); repeat; } [] BSSGP[0].receive(tr_GMM_ID_REQ('010'B)) { @@ -2159,7 +2159,7 @@ } [] BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?)) -> value l3_mt { f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept); - f_send_l3_gmm_llc(ts_GMM_ATTACH_COMPL); + f_send_l3(ts_GMM_ATTACH_COMPL); setverdict(pass); /* FIXME: Extract P-TMSI, if any. Only send Complete if necessary */ } @@ -2197,7 +2197,7 @@ /* The thing is, if the solSACapability is 'omit', then the * revisionLevelIndicatior is at the wrong place! */ attach_req.msgs.gprs_mm.attachRequest.msNetworkCapability.msNetworkCapabilityV.solSACapability := '0'B; - f_send_l3_gmm_llc(attach_req); + f_send_l3(attach_req); /* do the auth */ var PDU_L3_MS_SGSN l3_mo; @@ -2229,7 +2229,7 @@ BSSGP[0].receive(auth_ciph_req) -> value l3_mt; /* send the gmm auth failure with resync IE */ - f_send_l3_gmm_llc(ts_GMM_AUTH_FAIL_UMTS_AKA_RESYNC(g_pars.vec.auts)); + f_send_l3(ts_GMM_AUTH_FAIL_UMTS_AKA_RESYNC(g_pars.vec.auts)); /* wait for the GSUP resync request */ GSUP.receive(tr_GSUP_SAI_REQ_UMTS_AKA_RESYNC( @@ -2276,7 +2276,7 @@ l3_mo.msgs.gprs_mm.authenticationAndCipheringResponse.imeisv := valueof(ts_MI_IMEISV_TLV(g_pars.imei & '0'H)); } - f_send_l3_gmm_llc(l3_mo); + f_send_l3(l3_mo); deactivate(di); /* Expect SGSN to perform LU with HLR */ @@ -2285,7 +2285,7 @@ BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?)) -> value l3_mt { f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept); } - f_send_l3_gmm_llc(ts_GMM_ATTACH_COMPL); + f_send_l3(ts_GMM_ATTACH_COMPL); setverdict(pass); } @@ -2420,7 +2420,6 @@ } - control { execute( TC_attach() ); execute( TC_attach_mnc3() ); -- To view, visit https://gerrit.osmocom.org/13905 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If80da5a94fd786b90f71121b51742c9f70a693eb Gerrit-Change-Number: 13905 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 09:40:24 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 09:40:24 +0000 Subject: Change in libosmocore[master]: Fix osmo_quote_str_c() for strings larger than 32 bytes In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13901 ) Change subject: Fix osmo_quote_str_c() for strings larger than 32 bytes ...................................................................... Patch Set 2: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/13901/2/src/utils.c File src/utils.c: https://gerrit.osmocom.org/#/c/13901/2/src/utils.c at 816 PS2, Line 816: size_t len = in_len == -1 ? strlen(str) : in_len; You are still missing len +=3 afterwards. You need to allocate the buffer being strlen(str) + 2x'"' + NULL char. -- To view, visit https://gerrit.osmocom.org/13901 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id9bde14166d6674ce4dda36fa9f4ae9217ce5cc2 Gerrit-Change-Number: 13901 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Mykola Shchetinin Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 09:40:24 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 09:42:24 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 09:42:24 +0000 Subject: Change in openbsc[master]: nat: Fix crash (double-free) in forward_sccp_to_msc In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/13837 ) Change subject: nat: Fix crash (double-free) in forward_sccp_to_msc ...................................................................... nat: Fix crash (double-free) in forward_sccp_to_msc In bsc_nat_parse(), parsed is allocated this way: """parsed = talloc_zero(msg, struct bsc_nat_parsed);""" So parsed is a child of msg, and so it's freed when msg is freed. Since libosmocore c7f52c4c84d6a8898048738c4db9266289c40b45, osmo_wqueue_enqueue() correctly detects queue full and returns an error, and then queue_for_msc() calls msgb_free(). Code in osmo-bsc-nat was probably written before that change in behavior, so that's why probably the bug was not hit before. The "if (parsed)" condition is removed since it's actually fine to talloc_free(NULL). Related: SYS#4548 Change-Id: I209d3e2d809a67915ec43c874e68f7f746a565f0 --- M openbsc/src/osmo-bsc_nat/bsc_nat.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Holger Freyther: Looks good to me, approved Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c index c97483a..30e4b34 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c @@ -1281,9 +1281,9 @@ } /* send the non-filtered but maybe modified msg */ + talloc_free(parsed); queue_for_msc(con_msc, msg); - if (parsed) - talloc_free(parsed); + return 0; exit: -- To view, visit https://gerrit.osmocom.org/13837 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I209d3e2d809a67915ec43c874e68f7f746a565f0 Gerrit-Change-Number: 13837 Gerrit-PatchSet: 4 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 10:13:38 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 8 May 2019 10:13:38 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13137 ) Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... Patch Set 18: (5 comments) Since it was decided to merge this bomb 'as-is', let's move it forward. Please consider my comments as the points for further improvements and follow-up patches, not as merge-blockers. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c File src/libmsc/call_leg.c: https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 78 PS9, Line 78: talloc_zero > The talloc API does not provide a macro similar to talloc_zero() that names the struct [...] Of course it does, see talloc(). talloc_zero() is just a wrapper around talloc() + memset(). > What is the reason for this statement, optimization? Exactly. I'm not sure if compiler can optimize out such double zero-initialization. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 158 PS9, Line 158: ase CALL_LEG > it is to clarify the type of the data argument [...] osmo_fsm_inst_dispatch(fi->proc.parent, cl->parent_event_rtp_addr_available, (struct rtp_stream *) rtps); https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 178 PS9, Line 178: Also same opinion, variable is not needed for that: osmo_fsm_inst_dispatch(fi->proc.parent, cl->parent_event_rtp_complete, (struct call_leg *) cl); > prefer to keep for some degree of "type safety" TBH, I dont't see any "type safety" here. This just indicates the original type of the pointer to code readers. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 290 PS9, Line 290: > the critical difference is that it calls call_leg_rtp_alloc() only if it hasn't been called yet on t [?] Well, call_leg_rtp_alloc() also would just return 0 if it was already called for a given RTP stream. I still think that this function should be merged into call_leg_rtp_alloc(). https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c File src/libmsc/gsm_04_08.c: https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 156 PS9, Line 156: DEBUGP > This is legacy logging, not sure if we really need to change all of it now? You're already changing some DEBUGP / LOGP statements to LOG_MSC_A_CAT() in this patch. I would rather change all of them and don't leave this work to somebody else... -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 18 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 10:13:38 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 10:22:16 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 8 May 2019 10:22:16 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_08.c: fix: print proper length value Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13906 Change subject: libmsc/gsm_04_08.c: fix: print proper length value ...................................................................... libmsc/gsm_04_08.c: fix: print proper length value Since in parse_umts_auth_resp() we are checking the length of GSM48_IE_AUTH_RES_EXT TLV, we need to print its length, but not the length of the whole L3. Change-Id: I2bfebce6d017be834bfe7628ffa2b341eb82c11c --- M src/libmsc/gsm_04_08.c 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/06/13906/1 diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 4be42e9..32a7b7f 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -967,9 +967,9 @@ if (data_len < 3) { LOGP(DMM, LOGL_ERROR, - "%s: MM AUTHENTICATION RESPONSE:" - " l3 length invalid: %u\n", - vlr_subscr_name(conn->vsub), msgb_l3len(msg)); + "%s: MM AUTHENTICATION RESPONSE: " + "GSM48_IE_AUTH_RES_EXT TLV's length %u < 3\n" + vlr_subscr_name(conn->vsub), data_len); return -EINVAL; } -- To view, visit https://gerrit.osmocom.org/13906 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I2bfebce6d017be834bfe7628ffa2b341eb82c11c Gerrit-Change-Number: 13906 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 10:22:17 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 8 May 2019 10:22:17 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_08.c: fix sizeof(pointer) instead of sizeof(struct) Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13907 Change subject: libmsc/gsm_04_08.c: fix sizeof(pointer) instead of sizeof(struct) ...................................................................... libmsc/gsm_04_08.c: fix sizeof(pointer) instead of sizeof(struct) In gsm48_rx_mm_serv_req() we need to make sure that a given message buffer is large enough to contain both 'gsm48_hdr' and 'gsm48_service_request' structures. Comparing msg->data_len with size of pointer if wrong because: - we actually need to compare with size of struct(s), - we need msgb_l3len(), not length of the whole buffer. Change-Id: I6e7454d7a6f63fd5a0e12fb90d8c58688da0951e --- M src/libmsc/gsm_04_08.c 1 file changed, 19 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/07/13907/1 diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 32a7b7f..ac00025 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -738,28 +738,35 @@ { struct gsm_network *net = conn->network; uint8_t mi_type; - struct gsm48_hdr *gh = msgb_l3(msg); - struct gsm48_service_request *req = - (struct gsm48_service_request *)gh->data; + struct gsm48_hdr *gh; + struct gsm48_service_request *req; /* unfortunately in Phase1 the classmark2 length is variable */ - uint8_t classmark2_len = gh->data[1]; - uint8_t *classmark2 = gh->data+2; - uint8_t *mi_p = classmark2 + classmark2_len; - uint8_t mi_len = *mi_p; - uint8_t *mi = mi_p + 1; + uint8_t classmark2_len; + uint8_t *classmark2; + uint8_t *mi_p; + uint8_t mi_len; + uint8_t *mi; struct osmo_location_area_id lai; bool is_utran; lai.plmn = conn->network->plmn; lai.lac = conn->lac; - if (msg->data_len < sizeof(struct gsm48_service_request*)) { + /* Make sure that both header and CM Service Request fit into the buffer */ + if (msgb_l3len(msg) < sizeof(*gh) + sizeof(*req)) { LOG_RAN_CONN(conn, LOGL_ERROR, "Rx CM SERVICE REQUEST: wrong message size (%u < %zu)\n", - msg->data_len, sizeof(struct gsm48_service_request*)); - return msc_gsm48_tx_mm_serv_rej(conn, - GSM48_REJECT_INCORRECT_MESSAGE); + msgb_l3len(msg), sizeof(*gh) + sizeof(*req)); + return msc_gsm48_tx_mm_serv_rej(conn, GSM48_REJECT_INCORRECT_MESSAGE); } + gh = (struct gsm48_hdr *) msgb_l3(msg); + req = (struct gsm48_service_request *) gh->data; + classmark2_len = gh->data[1]; + classmark2 = gh->data + 2; + mi_p = classmark2 + classmark2_len; + mi_len = *mi_p; + mi = mi_p + 1; + if (msg->data_len < req->mi_len + 6) { LOG_RAN_CONN(conn, LOGL_ERROR, "Rx CM SERVICE REQUEST: message does not fit in packet\n"); return msc_gsm48_tx_mm_serv_rej(conn, -- To view, visit https://gerrit.osmocom.org/13907 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I6e7454d7a6f63fd5a0e12fb90d8c58688da0951e Gerrit-Change-Number: 13907 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 10:43:12 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 8 May 2019 10:43:12 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_08.c: fix: print proper length value In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13906 to look at the new patch set (#2). Change subject: libmsc/gsm_04_08.c: fix: print proper length value ...................................................................... libmsc/gsm_04_08.c: fix: print proper length value Since in parse_umts_auth_resp() we are checking the length of GSM48_IE_AUTH_RES_EXT TLV, we need to print its length, but not the length of the whole L3. Change-Id: I2bfebce6d017be834bfe7628ffa2b341eb82c11c --- M src/libmsc/gsm_04_08.c 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/06/13906/2 -- To view, visit https://gerrit.osmocom.org/13906 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2bfebce6d017be834bfe7628ffa2b341eb82c11c Gerrit-Change-Number: 13906 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 11:12:06 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 11:12:06 +0000 Subject: =?UTF-8?Q?Change_in_osmo-sgsn=5Bpespin/release-1=2E4=2E1=5D=3A_Bump_version=3A_1=2E4=2E0=2E3-313cf_=E2=86=92_1=2E4=2E1?= Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13908 Change subject: Bump version: 1.4.0.3-313cf ? 1.4.1 ...................................................................... Bump version: 1.4.0.3-313cf ? 1.4.1 Change-Id: I726ae0be499d6823239193ab9b1ee3dc49ece563 --- M debian/changelog 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/08/13908/1 diff --git a/debian/changelog b/debian/changelog index 5461745..402e6e0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +osmo-sgsn (1.4.1) unstable; urgency=medium + + [ Max ] + * Improve 'show subscriber cache' vty command + * GMM: permit VLR_ANSWERED event in attach FSM + + [ Harald Welte ] + * gbproxy_test: Fix test expectations of gprs_ns_rcvmsg() + + -- Pau Espin Pedrol Wed, 08 May 2019 13:11:21 +0200 + osmo-sgsn (1.4.0) unstable; urgency=medium [ Alexander Couzens ] -- To view, visit https://gerrit.osmocom.org/13908 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: pespin/release-1.4.1 Gerrit-MessageType: newchange Gerrit-Change-Id: I726ae0be499d6823239193ab9b1ee3dc49ece563 Gerrit-Change-Number: 13908 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 11:23:26 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 11:23:26 +0000 Subject: =?UTF-8?Q?Change_in_osmo-sgsn=5Bpespin/release-1=2E4=2E1=5D=3A_Bump_version=3A_1=2E4=2E0=2E3-313cf_=E2=86=92_1=2E4=2E1?= In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13908 ) Change subject: Bump version: 1.4.0.3-313cf ? 1.4.1 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13908 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: pespin/release-1.4.1 Gerrit-MessageType: comment Gerrit-Change-Id: I726ae0be499d6823239193ab9b1ee3dc49ece563 Gerrit-Change-Number: 13908 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 08 May 2019 11:23:26 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 11:24:04 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 11:24:04 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_08.c: fix: print proper length value In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13906 ) Change subject: libmsc/gsm_04_08.c: fix: print proper length value ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13906 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2bfebce6d017be834bfe7628ffa2b341eb82c11c Gerrit-Change-Number: 13906 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 08 May 2019 11:24:04 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 11:24:33 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 11:24:33 +0000 Subject: =?UTF-8?Q?Change_in_osmo-sgsn=5Bpespin/release-1=2E4=2E1=5D=3A_Bump_version=3A_1=2E4=2E0=2E3-313cf_=E2=86=92_1=2E4=2E1?= In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/13908 ) Change subject: Bump version: 1.4.0.3-313cf ? 1.4.1 ...................................................................... Bump version: 1.4.0.3-313cf ? 1.4.1 Change-Id: I726ae0be499d6823239193ab9b1ee3dc49ece563 --- M debian/changelog 1 file changed, 11 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/debian/changelog b/debian/changelog index 5461745..402e6e0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +osmo-sgsn (1.4.1) unstable; urgency=medium + + [ Max ] + * Improve 'show subscriber cache' vty command + * GMM: permit VLR_ANSWERED event in attach FSM + + [ Harald Welte ] + * gbproxy_test: Fix test expectations of gprs_ns_rcvmsg() + + -- Pau Espin Pedrol Wed, 08 May 2019 13:11:21 +0200 + osmo-sgsn (1.4.0) unstable; urgency=medium [ Alexander Couzens ] -- To view, visit https://gerrit.osmocom.org/13908 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: pespin/release-1.4.1 Gerrit-MessageType: merged Gerrit-Change-Id: I726ae0be499d6823239193ab9b1ee3dc49ece563 Gerrit-Change-Number: 13908 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 11:31:38 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 11:31:38 +0000 Subject: Change in osmo-msc[master]: vlr: when setting IMEISV, also set IMEI In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13893 ) Change subject: vlr: when setting IMEISV, also set IMEI ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13893 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I02e7b66848bf7dddb31b105e2ae981432817ae1e Gerrit-Change-Number: 13893 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 11:31:38 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 11:34:55 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 11:34:55 +0000 Subject: Change in osmo-msc[master]: vlr: optionally send IMEI early to HLR In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13894 ) Change subject: vlr: optionally send IMEI early to HLR ...................................................................... Patch Set 1: (2 comments) https://gerrit.osmocom.org/#/c/13894/1/src/libvlr/vlr_lu_fsm.c File src/libvlr/vlr_lu_fsm.c: https://gerrit.osmocom.org/#/c/13894/1/src/libvlr/vlr_lu_fsm.c at 932 PS1, Line 932: LOGPFSM(fi, "%s()\n", __func__); > I've added it for consistency with related functions, that also log just their function name. [?] ok, I think there's some point to the consistency argument here. So whether you put it here or not, I don't care. But I'm generally doubtful we want to have log statement at every function invocation. That's what one can do with debuggers and tracers. But that's a general discussion. https://gerrit.osmocom.org/#/c/13894/1/src/libvlr/vlr_lu_fsm.c at 955 PS1, Line 955: event without effect > It is done like this 6 other times in the file already, so I'd keep that for consistency. let's please submit an unrelated cleanup patch to change those other locations to OSMO_ASSERT(0), too. -- To view, visit https://gerrit.osmocom.org/13894 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I88283cad23793b475445d814ff49db534cb41244 Gerrit-Change-Number: 13894 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 11:34:55 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 11:34:58 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 11:34:58 +0000 Subject: Change in osmo-msc[master]: vlr: optionally send IMEI early to HLR In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13894 ) Change subject: vlr: optionally send IMEI early to HLR ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13894 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I88283cad23793b475445d814ff49db534cb41244 Gerrit-Change-Number: 13894 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 11:34:58 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 11:38:30 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 11:38:30 +0000 Subject: Change in osmo-bsc[pespin/release-1.4.1]: handover_fsm: copy old S15_S0 to new lchan Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13909 Change subject: handover_fsm: copy old S15_S0 to new lchan ...................................................................... handover_fsm: copy old S15_S0 to new lchan When a new lchan is selected during handover, some of the properties of the old lchan are inherited by the new lchan. At the moment S15-S0 is not not inherited so that the value for those bits will always be 0x0000 for the new lchan. Since those bits also define the active set AMR codec the channel activation will fail because 0x0000 is invalid (active set with zero rates) Change-Id: Ifd470397e99985394634da1bb13ccfc5041984d2 Related: OS#3503 --- M src/osmo-bsc/handover_fsm.c M tests/handover/handover_test.c 2 files changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/09/13909/1 diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c index 35f2e55..68c3e4a 100644 --- a/src/osmo-bsc/handover_fsm.c +++ b/src/osmo-bsc/handover_fsm.c @@ -362,6 +362,7 @@ .msc_assigned_cic = conn->ho.inter_bsc_in.msc_assigned_cic, .re_use_mgw_endpoint_from_lchan = conn->lchan, .wait_before_switching_rtp = true, + .s15_s0 = conn->lchan->activate.info.s15_s0, }; lchan_activate(ho->new_lchan, &info); diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c index 6217ca3..cd3b749 100644 --- a/tests/handover/handover_test.c +++ b/tests/handover/handover_test.c @@ -276,9 +276,10 @@ lchan->tch_mode = GSM48_CMODE_SPEECH_V1; else if (!strcasecmp(codec, "EFR") && full_rate) lchan->tch_mode = GSM48_CMODE_SPEECH_EFR; - else if (!strcasecmp(codec, "AMR")) + else if (!strcasecmp(codec, "AMR")) { lchan->tch_mode = GSM48_CMODE_SPEECH_AMR; - else { + lchan->activate.info.s15_s0 = 0x0002; + } else { printf("Given codec unknown\n"); exit(EXIT_FAILURE); } -- To view, visit https://gerrit.osmocom.org/13909 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: pespin/release-1.4.1 Gerrit-MessageType: newchange Gerrit-Change-Id: Ifd470397e99985394634da1bb13ccfc5041984d2 Gerrit-Change-Number: 13909 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 11:38:30 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 11:38:30 +0000 Subject: =?UTF-8?Q?Change_in_osmo-bsc=5Bpespin/release-1=2E4=2E1=5D=3A_Bump_version=3A_1=2E4=2E0=2E1-1f6930_=E2=86=92_1=2E4=2E1?= Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13910 Change subject: Bump version: 1.4.0.1-1f6930 ? 1.4.1 ...................................................................... Bump version: 1.4.0.1-1f6930 ? 1.4.1 Change-Id: Ifd7a99f994f494afe73adcffd9fa7cc626b5143e --- M debian/changelog 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/10/13910/1 diff --git a/debian/changelog b/debian/changelog index a4f4d40..22410f9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +osmo-bsc (1.4.1) unstable; urgency=medium + + [ Philipp Maier ] + * handover_fsm: copy old S15_S0 to new lchan + + -- Pau Espin Pedrol Wed, 08 May 2019 13:36:53 +0200 + osmo-bsc (1.4.0) unstable; urgency=medium [ Neels Hofmeyr ] -- To view, visit https://gerrit.osmocom.org/13910 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: pespin/release-1.4.1 Gerrit-MessageType: newchange Gerrit-Change-Id: Ifd7a99f994f494afe73adcffd9fa7cc626b5143e Gerrit-Change-Number: 13910 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 11:52:23 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 11:52:23 +0000 Subject: Change in osmo-ci[master]: nightly-packages: add osmo-gsm-manuals-debian8-jessie In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13658 ) Change subject: nightly-packages: add osmo-gsm-manuals-debian8-jessie ...................................................................... nightly-packages: add osmo-gsm-manuals-debian8-jessie Create a compatible package for debian 8 with adjusted dependencies. While at it, refactor create_osmo_trx_debian8_jessie() into a generic checkout_copy_debian8_jessie() function. Related: OS#3899 Depends: I5b9575ceb1141961e570643a5755a2bd6b6a4254 (osmo-gsm-manuals) Change-Id: I3570599ede51b974d350064f44f77e360fafd8b0 --- M scripts/osmocom-nightly-packages.sh 1 file changed, 8 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved osmith: Verified diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh index 0d4db2d..ce532bc 100755 --- a/scripts/osmocom-nightly-packages.sh +++ b/scripts/osmocom-nightly-packages.sh @@ -148,11 +148,12 @@ git checkout "$TAG" } -create_osmo_trx_debian8_jessie() { - # The package must be already checked out via `checkout osmo-trx` +# Copy an already checked out repository dir and apply its debian 8 patch. +# $1: Osmocom repository +checkout_copy_debian8_jessie() { cd "$REPO" - cp -a osmo-trx osmo-trx-debian8-jessie - cd osmo-trx-debian8-jessie/ + cp -a "$1" "$1-debian8-jessie" + cd "$1-debian8-jessie" patch -p1 < debian/patches/build-for-debian8.patch git commit -m 'auto-commit: allow debian8 to build' debian/ cd .. @@ -201,10 +202,12 @@ checkout osmo-sysmon checkout osmo-remsim - create_osmo_trx_debian8_jessie + checkout_copy_debian8_jessie "osmo-gsm-manuals" + checkout_copy_debian8_jessie "osmo-trx" build limesuite no_commit --git-upstream-tree="357ad5dd0d71304179d476b38e67240527d917df" build osmo-gsm-manuals + build osmo-gsm-manuals-debian8-jessie build libosmocore build libosmo-sccp build libosmo-abis -- To view, visit https://gerrit.osmocom.org/13658 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I3570599ede51b974d350064f44f77e360fafd8b0 Gerrit-Change-Number: 13658 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 11:52:26 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 11:52:26 +0000 Subject: Change in osmo-gsm-manuals[master]: debian: add patch for debian 8 In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13657 ) Change subject: debian: add patch for debian 8 ...................................................................... debian: add patch for debian 8 Add a patch file that removes the asciidoc-dblatex dependency in debian/control, so the package builds for debian 8. In debian 8, the files are all in the asciidoc package, which does get installed. The jenkins scripts will copy the source package, apply the patch, and upload it separately to OBS [1]. A similar debian 8 patch exists for osmo-trx. I have also tried to do it without a patch, by changing the OBS configuration. It is possible to bypass the dependency check from OBS and get the build started, but there's an additional check by dpkg-checkbuilddepends and this one does not pass. So we really need the patch method. [1]: Change-Id I3570599ede51b974d350064f44f77e360fafd8b0 (osmo-ci) Related: OS#3899 Change-Id: I5b9575ceb1141961e570643a5755a2bd6b6a4254 --- A debian/patches/build-for-debian8.patch 1 file changed, 18 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/patches/build-for-debian8.patch b/debian/patches/build-for-debian8.patch new file mode 100644 index 0000000..58f49c3 --- /dev/null +++ b/debian/patches/build-for-debian8.patch @@ -0,0 +1,18 @@ +--- a/debian/control ++++ b/debian/control +@@ -7,7 +7,6 @@ Build-Depends: autotools-dev, + pkg-config, + # All below also need to be in Depends + asciidoc, +- asciidoc-dblatex, + dblatex, + docbook5-xml, + graphviz, +@@ -23,7 +22,6 @@ Package: osmo-gsm-manuals-dev + Architecture: all + Depends: ${misc:Depends}, + asciidoc, +- asciidoc-dblatex, + dblatex, + docbook5-xml, + graphviz, -- To view, visit https://gerrit.osmocom.org/13657 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I5b9575ceb1141961e570643a5755a2bd6b6a4254 Gerrit-Change-Number: 13657 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 12:03:46 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 12:03:46 +0000 Subject: Change in osmo-bts[master]: handle NULL return from rate_ctr_group_alloc() Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13911 Change subject: handle NULL return from rate_ctr_group_alloc() ...................................................................... handle NULL return from rate_ctr_group_alloc() Change-Id: I2170e400e47369e9171af4c7361aa2177fea1174 Related: OS#3701 --- M src/common/bts.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/11/13911/1 diff --git a/src/common/bts.c b/src/common/bts.c index 8c2b2fe..5851e9b 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -122,6 +122,10 @@ bts->agch_queue.length = 0; bts->ctrs = rate_ctr_group_alloc(bts, &bts_ctrg_desc, bts->nr); + if (!bts->ctrs) { + llist_del(&bts->list); + return -1; + } /* enable management with default levels, * raise threshold to GSM_BTS_AGCH_QUEUE_THRESH_LEVEL_DISABLE to -- To view, visit https://gerrit.osmocom.org/13911 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I2170e400e47369e9171af4c7361aa2177fea1174 Gerrit-Change-Number: 13911 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 12:04:12 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 12:04:12 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Change osmo_mgcpc_ep_fsm name to avoid collision with old o... Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13912 Change subject: mgcp-cli: Change osmo_mgcpc_ep_fsm name to avoid collision with old osmo-bsc ...................................................................... mgcp-cli: Change osmo_mgcpc_ep_fsm name to avoid collision with old osmo-bsc Recent commit moved mgw_endpoint_fsm from osmo-bsc.git here as osmo_mgcpc_ep_fsm. Some API name changes were applied to avoid collisions, but FSM was kept and it is registered during startup with __attribute__((constructor)). As a result, with old osmo-bsc (+tests) try to allocate its copy of mgw_endpoint_fsm, it fails because that name is already registered. Fixes: 538d2c53d90074267e7a70a90c773baa03d6ec04 Change-Id: I694ce58baa43f536b7e594b003edc891f029aa4a --- M src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/12/13912/1 diff --git a/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c b/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c index 0e59f58..a9bab87 100644 --- a/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c +++ b/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c @@ -862,7 +862,7 @@ } static struct osmo_fsm osmo_mgcpc_ep_fsm = { - .name = "mgw-endpoint", + .name = "mgw-endp", .states = osmo_mgcpc_ep_fsm_states, .num_states = ARRAY_SIZE(osmo_mgcpc_ep_fsm_states), .log_subsys = DLMGCP, -- To view, visit https://gerrit.osmocom.org/13912 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I694ce58baa43f536b7e594b003edc891f029aa4a Gerrit-Change-Number: 13912 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 12:04:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 12:04:16 +0000 Subject: Change in libosmocore[master]: deal with rate_ctr_group_alloc() returning NULL Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13913 Change subject: deal with rate_ctr_group_alloc() returning NULL ...................................................................... deal with rate_ctr_group_alloc() returning NULL Change-Id: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc Related: #3701 --- D doc/vty/example.xml D doc/vty/vtydoc.xsd M src/gb/gprs_bssgp.c M src/gb/gprs_ns.c 4 files changed, 8 insertions(+), 68 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/13/13913/1 diff --git a/doc/vty/example.xml b/doc/vty/example.xml deleted file mode 100644 index 400c634..0000000 --- a/doc/vty/example.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - General docs - - - - - - - General docs - - - - - - - - diff --git a/doc/vty/vtydoc.xsd b/doc/vty/vtydoc.xsd deleted file mode 100644 index 53a67a3..0000000 --- a/doc/vty/vtydoc.xsd +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c index 550757f..b695c28 100644 --- a/src/gb/gprs_bssgp.c +++ b/src/gb/gprs_bssgp.c @@ -128,6 +128,10 @@ ctx->nsei = nsei; /* FIXME: BVCI is not unique, only BVCI+NSEI ?!? */ ctx->ctrg = rate_ctr_group_alloc(ctx, &bssgp_ctrg_desc, bvci); + if (!ctx->ctrg) { + talloc_free(ctx); + return NULL; + } ctx->fc = talloc_zero(ctx, struct bssgp_flow_control); /* cofigure for 2Mbit, 30 packets in queue */ bssgp_fc_init(ctx->fc, 100000, 2*1024*1024/8, 30, &_bssgp_tx_dl_ud); diff --git a/src/gb/gprs_ns.c b/src/gb/gprs_ns.c index d72003e..3679a5b 100644 --- a/src/gb/gprs_ns.c +++ b/src/gb/gprs_ns.c @@ -333,6 +333,10 @@ nsvc->nsi = nsi; osmo_timer_setup(&nsvc->timer, gprs_ns_timer_cb, nsvc); nsvc->ctrg = rate_ctr_group_alloc(nsvc, &nsvc_ctrg_desc, nsvci); + if (!nsvc->ctrg) { + talloc_free(nsvc); + return NULL; + } nsvc->statg = osmo_stat_item_group_alloc(nsvc, &nsvc_statg_desc, nsvci); nsvc->sig_weight = sig_weight; nsvc->data_weight = data_weight; -- To view, visit https://gerrit.osmocom.org/13913 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc Gerrit-Change-Number: 13913 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 12:06:50 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 12:06:50 +0000 Subject: Change in osmo-bts[master]: handle NULL return from rate_ctr_group_alloc() In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13911 ) Change subject: handle NULL return from rate_ctr_group_alloc() ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/13911/1/src/common/bts.c File src/common/bts.c: https://gerrit.osmocom.org/#/c/13911/1/src/common/bts.c at 126 PS1, Line 126: llist_del(&bts->list); What about moving llist_add_tail to the end and then dropping this llist_del together with the one in line 180? -- To view, visit https://gerrit.osmocom.org/13911 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2170e400e47369e9171af4c7361aa2177fea1174 Gerrit-Change-Number: 13911 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 08 May 2019 12:06:50 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 12:07:46 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 12:07:46 +0000 Subject: Change in libosmocore[master]: deal with rate_ctr_group_alloc() returning NULL In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13913 ) Change subject: deal with rate_ctr_group_alloc() returning NULL ...................................................................... Patch Set 1: Code-Review-1 The doc/vty stuff in this patch doesn't seem related. -- To view, visit https://gerrit.osmocom.org/13913 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc Gerrit-Change-Number: 13913 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 12:07:46 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 12:08:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 12:08:16 +0000 Subject: Change in osmo-mgw[master]: handle NULL return of rate_ctr_group_alloc() Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13914 Change subject: handle NULL return of rate_ctr_group_alloc() ...................................................................... handle NULL return of rate_ctr_group_alloc() Change-Id: Ieadded9c088ef8f86164400a60ce542e3c868e9d Related: OS#3701 --- M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_protocol.c 2 files changed, 24 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/14/13914/1 diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index af5426f..5300351 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -81,7 +81,7 @@ } /* Initialize rtp connection struct with default values */ -static void mgcp_rtp_conn_init(struct mgcp_conn_rtp *conn_rtp, struct mgcp_conn *conn) +static int mgcp_rtp_conn_init(struct mgcp_conn_rtp *conn_rtp, struct mgcp_conn *conn) { struct mgcp_rtp_end *end = &conn_rtp->end; /* FIXME: Each new rate counter group requires an unique index. At the @@ -109,12 +109,17 @@ end->maximum_packet_time = -1; conn_rtp->rate_ctr_group = rate_ctr_group_alloc(conn, &rate_ctr_group_desc, rate_ctr_index); + if (!conn_rtp->rate_ctr_group) + return -1; + conn_rtp->state.in_stream.err_ts_ctr = &conn_rtp->rate_ctr_group->ctr[IN_STREAM_ERR_TSTMP_CTR]; conn_rtp->state.out_stream.err_ts_ctr = &conn_rtp->rate_ctr_group->ctr[OUT_STREAM_ERR_TSTMP_CTR]; rate_ctr_index++; /* Make sure codec table is reset */ mgcp_codec_reset_all(conn_rtp); + + return 0; } /* Cleanup rtp connection struct */ @@ -175,7 +180,10 @@ switch (type) { case MGCP_CONN_TYPE_RTP: - mgcp_rtp_conn_init(&conn->u.rtp, conn); + if (mgcp_rtp_conn_init(&conn->u.rtp, conn) < 0) { + talloc_free(conn); + return NULL; + } break; default: /* NOTE: This should never be called with an diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index bfb88bc..bf194b9 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -1491,7 +1491,7 @@ return 0; } -static void alloc_mgcp_rate_counters(struct mgcp_trunk_config *trunk, void *ctx) +static int alloc_mgcp_rate_counters(struct mgcp_trunk_config *trunk, void *ctx) { /* FIXME: Each new rate counter group requires a unique index. At the * moment we generate an index using a counter, but perhaps there is @@ -1503,25 +1503,34 @@ if (trunk->mgcp_crcx_ctr_group == NULL) { trunk->mgcp_crcx_ctr_group = rate_ctr_group_alloc(ctx, &mgcp_crcx_ctr_group_desc, crcx_rate_ctr_index); + if (!trunk->mgcp_crcx_ctr_group) + return -1; talloc_set_destructor(trunk->mgcp_crcx_ctr_group, free_rate_counter_group); crcx_rate_ctr_index++; } if (trunk->mgcp_mdcx_ctr_group == NULL) { trunk->mgcp_mdcx_ctr_group = rate_ctr_group_alloc(ctx, &mgcp_mdcx_ctr_group_desc, mdcx_rate_ctr_index); + if (!trunk->mgcp_mdcx_ctr_group) + return -1; talloc_set_destructor(trunk->mgcp_mdcx_ctr_group, free_rate_counter_group); mdcx_rate_ctr_index++; } if (trunk->mgcp_dlcx_ctr_group == NULL) { trunk->mgcp_dlcx_ctr_group = rate_ctr_group_alloc(ctx, &mgcp_dlcx_ctr_group_desc, dlcx_rate_ctr_index); + if (!trunk->mgcp_dlcx_ctr_group) + return -1; talloc_set_destructor(trunk->mgcp_dlcx_ctr_group, free_rate_counter_group); dlcx_rate_ctr_index++; } if (trunk->all_rtp_conn_stats == NULL) { trunk->all_rtp_conn_stats = rate_ctr_group_alloc(ctx, &all_rtp_conn_rate_ctr_group_desc, all_rtp_conn_rate_ctr_index); + if (!trunk->all_rtp_conn_stats) + return -1; talloc_set_destructor(trunk->all_rtp_conn_stats, free_rate_counter_group); all_rtp_conn_rate_ctr_index++; } + return 0; } /*! allocate configuration with default values. @@ -1561,7 +1570,10 @@ cfg->trunk.audio_send_name = 1; cfg->trunk.omit_rtcp = 0; mgcp_trunk_set_keepalive(&cfg->trunk, MGCP_KEEPALIVE_ONCE); - alloc_mgcp_rate_counters(&cfg->trunk, cfg); + if (alloc_mgcp_rate_counters(&cfg->trunk, cfg) < 0) { + talloc_free(cfg); + return NULL; + } INIT_LLIST_HEAD(&cfg->trunks); -- To view, visit https://gerrit.osmocom.org/13914 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ieadded9c088ef8f86164400a60ce542e3c868e9d Gerrit-Change-Number: 13914 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 12:08:24 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 12:08:24 +0000 Subject: Change in osmo-mgw[master]: update .gitignore Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13915 Change subject: update .gitignore ...................................................................... update .gitignore * remove tons of old cruft from openbsc.git that doesn't exist here * actually add the osmo-mgw binary and .la file that we're building Change-Id: Ic0e27c05e3ab368c195f9f9961fa70feb077a5e0 --- M .gitignore 1 file changed, 2 insertions(+), 35 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/15/13915/1 diff --git a/.gitignore b/.gitignore index 1084181..900c09c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,20 +2,13 @@ *.o *.lo *.a +*.la .deps Makefile Makefile.in bscconfig.h bscconfig.h.in -openbsc.pc -src/osmo-nitb/osmo-nitb -src/osmo-bsc_mgcp/osmo-bsc_mgcp -src/osmo-bsc/osmo-bsc -src/utils/meas_vis -src/utils/meas_json -src/utils/osmo-meas-pcap2db -src/utils/osmo-meas-udp2db -src/utils/smpp_mirror +src/osmo-mgw/osmo-mgw *.*~ *.sw? .libs @@ -46,32 +39,9 @@ .version -# apps and app data -hlr.sqlite3 -src/utils/bs11_config -src/ipaccess/ipaccess-config -src/ipaccess/abisip-find -src/ipaccess/ipaccess-firmware -src/ipaccess/ipaccess-proxy -src/utils/isdnsync -src/nat/bsc_nat -src/gprs/osmo-sgsn -src/gprs/osmo-gbproxy -src/gprs/osmo-gtphub -src/osmo-bsc_nat/osmo-bsc_nat -src/libcommon/gsup_test_client -src/osmo-msc/osmo-msc - #tests tests/testsuite.dir tests/*/*_test -# ignore compiled binaries like msc_vlr_test_foo; do not ignore -# msc_vlr_test_foo.{c,ok,err}, but do still ignore the corresponding .o object -# files: -tests/msc_vlr/msc_vlr_test_* -!tests/msc_vlr/msc_vlr_test_*.* -tests/msc_vlr/msc_vlr_test_*.o - tests/atconfig tests/atlocal @@ -79,10 +49,7 @@ tests/testsuite tests/testsuite.log -gsn_restart -src/openbsc.cfg* writtenconfig/ -gtphub_restart_count # manuals doc/manuals/*.html -- To view, visit https://gerrit.osmocom.org/13915 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ic0e27c05e3ab368c195f9f9961fa70feb077a5e0 Gerrit-Change-Number: 13915 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 12:10:20 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 12:10:20 +0000 Subject: Change in osmo-mgw[master]: handle NULL return of rate_ctr_group_alloc() In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13914 ) Change subject: handle NULL return of rate_ctr_group_alloc() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13914 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ieadded9c088ef8f86164400a60ce542e3c868e9d Gerrit-Change-Number: 13914 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 08 May 2019 12:10:20 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 12:11:08 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 12:11:08 +0000 Subject: Change in osmo-mgw[master]: update .gitignore In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13915 ) Change subject: update .gitignore ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13915 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic0e27c05e3ab368c195f9f9961fa70feb077a5e0 Gerrit-Change-Number: 13915 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 08 May 2019 12:11:08 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:00:26 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Wed, 8 May 2019 13:00:26 +0000 Subject: Change in osmo-sgsn[master]: gprs_gmm: send Service Reject when no PDP ctxs are available. In-Reply-To: References: Message-ID: lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/13744 ) Change subject: gprs_gmm: send Service Reject when no PDP ctxs are available. ...................................................................... Patch Set 7: (3 comments) https://gerrit.osmocom.org/#/c/13744/7/src/gprs/gprs_gmm.c File src/gprs/gprs_gmm.c: https://gerrit.osmocom.org/#/c/13744/7/src/gprs/gprs_gmm.c at 1618 PS7, Line 1618: : bool pdp_status_has_no_active_nsapis(const uint8_t *pdp_status, const size_t pdp_status_len) : { : size_t i; : for (i = 0; i < pdp_status_len; i++) : if (pdp_status[i] != 0) : return false; : : return true; : } Can you rename it to pdp_status_has_active_nsapis? It would also mean you have to swap the logic. A positive check is more readable as a negation check. https://gerrit.osmocom.org/#/c/13744/7/src/gprs/gprs_gmm.c at 1629 PS7, Line 1629: /* 3GPP TS 24.008 Section 4.7.13.4 Service request procedure not accepted by the : * network. Returns true if MS has active PDP contexts in pdp_status but SGSN : * has none */ : bool ms_has_active_pdp_and_sgsn_has_none(struct sgsn_mm_ctx *mmctx, : const uint8_t *pdp_status, : const size_t pdp_status_len) : { : if (!llist_empty(&mmctx->pdp_list)) : return false; : : return !pdp_status_has_no_active_nsapis(pdp_status, pdp_status_len); : } Can you remove this function. Doing another redirection of a function just for this single case seems to be confusing. Or do you plan do add this check more often? If so I would like to rename this function to check_pdp_status() https://gerrit.osmocom.org/#/c/13744/7/src/gprs/gprs_gmm.c at 1935 PS7, Line 1935: ms_has_active_pdp_and_sgsn_has_none(ctx, pdp_status, pdp_status_len) do a llist_empty(..) && pdp_status_has_active_nsapis() -- To view, visit https://gerrit.osmocom.org/13744 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If610cbef17c25ec44e65d4f1b2340d102c560437 Gerrit-Change-Number: 13744 Gerrit-PatchSet: 7 Gerrit-Owner: Mykola Shchetinin Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Mykola Shchetinin Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Wed, 08 May 2019 13:00:26 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:02:23 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 8 May 2019 13:02:23 +0000 Subject: Change in osmo-dev[master]: msc: check-imei-early Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/13916 Change subject: msc: check-imei-early ...................................................................... msc: check-imei-early Change-Id: Ib48e45637b9ad26ccbd16aee2cb93f10af16f97a --- M net/templates/osmo-msc.cfg 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/16/13916/1 diff --git a/net/templates/osmo-msc.cfg b/net/templates/osmo-msc.cfg index 00bf182..bccb621 100644 --- a/net/templates/osmo-msc.cfg +++ b/net/templates/osmo-msc.cfg @@ -12,7 +12,7 @@ mgw remote-ip ${MGW4MSC_IP} mgw remote-port ${MGW4MSC_PORT} mgw endpoint-domain msc - check-imei-rqd 1 + check-imei-rqd early # For nano3G: iu rab-assign-addr-enc x213 mncc-int -- To view, visit https://gerrit.osmocom.org/13916 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-dev Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ib48e45637b9ad26ccbd16aee2cb93f10af16f97a Gerrit-Change-Number: 13916 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:03:16 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Wed, 8 May 2019 13:03:16 +0000 Subject: Change in osmo-msc[master]: remove msc specific db counters In-Reply-To: References: Message-ID: lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/13800 ) Change subject: remove msc specific db counters ...................................................................... Patch Set 1: Code-Review-2 I would like to wait for neels branch to be merged. @laforge do you agree in removing this? -- To view, visit https://gerrit.osmocom.org/13800 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id64f1839a55b5326f74ec04b7a5dbed9d269b89c Gerrit-Change-Number: 13800 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Wed, 08 May 2019 13:03:16 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:04:04 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 8 May 2019 13:04:04 +0000 Subject: Change in osmo-dev[master]: msc: check-imei-early In-Reply-To: References: Message-ID: osmith has abandoned this change. ( https://gerrit.osmocom.org/13916 ) Change subject: msc: check-imei-early ...................................................................... Abandoned Didn't mean to submit this one. -- To view, visit https://gerrit.osmocom.org/13916 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-dev Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: Ib48e45637b9ad26ccbd16aee2cb93f10af16f97a Gerrit-Change-Number: 13916 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:04:26 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 8 May 2019 13:04:26 +0000 Subject: Change in osmo-hlr[master]: db_hlr.c: add db_subscr_exists_by_imsi() In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#2) to the change originally created by Vadim Yanitskiy. ( https://gerrit.osmocom.org/13712 ) Change subject: db_hlr.c: add db_subscr_exists_by_imsi() ...................................................................... db_hlr.c: add db_subscr_exists_by_imsi() Check if a subscriber exists without generating an error log entry if it does not. This is cheaper than db_subscr_get_by_imsi(), as it does not fetch the subscriber entry. subscriber-create-on-demand will use this function. Related: OS#2542 Change-Id: I63818c0dd4fd22b41dadeeba2a07a651b5454c54 --- M src/db.c M src/db.h M src/db_hlr.c M tests/db/db_test.c M tests/db/db_test.err 5 files changed, 40 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/12/13712/2 -- To view, visit https://gerrit.osmocom.org/13712 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I63818c0dd4fd22b41dadeeba2a07a651b5454c54 Gerrit-Change-Number: 13712 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:04:26 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 8 May 2019 13:04:26 +0000 Subject: Change in osmo-hlr[master]: db_hlr.c: add db_subscr_exists_by_msisdn() In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#2) to the change originally created by Vadim Yanitskiy. ( https://gerrit.osmocom.org/13719 ) Change subject: db_hlr.c: add db_subscr_exists_by_msisdn() ...................................................................... db_hlr.c: add db_subscr_exists_by_msisdn() Check if a subscriber exists without generating an error log entry if it does not. This is cheaper than db_subscr_get_by_msisdn(), as it does not fetch the subscriber entry. subscriber-create-on-demand will use this function to generate a random unique MSISDN for new subscribers. Related: OS#2542 Change-Id: Ibfbc408c966197682ba2b12d166ade4bfeb7abc2 --- M src/db.c M src/db.h M src/db_hlr.c M tests/db/db_test.c M tests/db/db_test.err 5 files changed, 42 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/19/13719/2 -- To view, visit https://gerrit.osmocom.org/13719 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibfbc408c966197682ba2b12d166ade4bfeb7abc2 Gerrit-Change-Number: 13719 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:04:26 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 8 May 2019 13:04:26 +0000 Subject: Change in osmo-hlr[master]: Create subscribers on demand In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#2) to the change originally created by Vadim Yanitskiy. ( https://gerrit.osmocom.org/13713 ) Change subject: Create subscribers on demand ...................................................................... Create subscribers on demand Add a new vty option and allow to optionally generate a random msisdn, as well as setting the default NAM: subscriber-create-on-demand <3-15> (none|cs|ps|both) subscriber-create-on-demand no-extension I thought about using an enum or bitfield to store nam_cs and nam_ps, but I have used booleans instead, to match how it is stored in the database. Thanks to Vadim for the random MSISDN patch [1], which was squashed into this one. [1] Change-Id: I475c71f9902950fa7498855a616e1ec231fad6ac Related: OS#2542 Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd --- M src/hlr.c M src/hlr.h M src/hlr_vty.c M tests/test_nodes.vty A tests/test_subscriber_on_demand.vty 5 files changed, 182 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/13/13713/2 -- To view, visit https://gerrit.osmocom.org/13713 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd Gerrit-Change-Number: 13713 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:04:26 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 8 May 2019 13:04:26 +0000 Subject: Change in osmo-hlr[master]: Document subscribers create on demand feature In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#2) to the change originally created by Vadim Yanitskiy. ( https://gerrit.osmocom.org/13715 ) Change subject: Document subscribers create on demand feature ...................................................................... Document subscribers create on demand feature Add a new section in the subscribers chapter, with detailed explanation of the use cases and related OsmoHLR and OsmoMSC configuration. Related: OS#2542 Change-Id: I2dd4a56f7b8be8b5d0e6fc32e04459e5e278d0a9 --- M doc/manuals/chapters/subscribers.adoc 1 file changed, 21 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/15/13715/2 -- To view, visit https://gerrit.osmocom.org/13715 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2dd4a56f7b8be8b5d0e6fc32e04459e5e278d0a9 Gerrit-Change-Number: 13715 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:05:22 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 8 May 2019 13:05:22 +0000 Subject: Change in osmo-hlr[master]: Assign random MSISDN to subscribers created on demand In-Reply-To: References: Message-ID: osmith has abandoned this change. ( https://gerrit.osmocom.org/13720 ) Change subject: Assign random MSISDN to subscribers created on demand ...................................................................... Abandoned Thanks for the patch, squashed into this one: https://gerrit.osmocom.org/#/c/osmo-hlr/+/13713/ -- To view, visit https://gerrit.osmocom.org/13720 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: I475c71f9902950fa7498855a616e1ec231fad6ac Gerrit-Change-Number: 13720 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:06:14 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 8 May 2019 13:06:14 +0000 Subject: Change in osmo-hlr[master]: src/hlr.c: fix coding style of subscr_create_on_demand() In-Reply-To: References: Message-ID: osmith has abandoned this change. ( https://gerrit.osmocom.org/13718 ) Change subject: src/hlr.c: fix coding style of subscr_create_on_demand() ...................................................................... Abandoned Thanks for the patch, squashed into this one: https://gerrit.osmocom.org/#/c/osmo-hlr/+/13713/ -- To view, visit https://gerrit.osmocom.org/13718 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: I1b9aa628e16e20d823eda2098a77c624bc934e11 Gerrit-Change-Number: 13718 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:06:52 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 8 May 2019 13:06:52 +0000 Subject: Change in osmo-hlr[master]: src/hlr.c: simplify initial check in subscr_create_on_demand() In-Reply-To: References: Message-ID: osmith has abandoned this change. ( https://gerrit.osmocom.org/13717 ) Change subject: src/hlr.c: simplify initial check in subscr_create_on_demand() ...................................................................... Abandoned Thanks for the patch, squashed into this one: https://gerrit.osmocom.org/#/c/osmo-hlr/+/13713/ -- To view, visit https://gerrit.osmocom.org/13717 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: If6b78adc236ef923e0b2e37b4e2407338a4b98b8 Gerrit-Change-Number: 13717 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:07:22 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 8 May 2019 13:07:22 +0000 Subject: Change in osmo-hlr[master]: Allow both CS and PS by default for subscribers created on demand In-Reply-To: References: Message-ID: osmith has abandoned this change. ( https://gerrit.osmocom.org/13716 ) Change subject: Allow both CS and PS by default for subscribers created on demand ...................................................................... Abandoned I've added vty options to configure the default NAM here: https://gerrit.osmocom.org/#/c/osmo-hlr/+/13713/ -- To view, visit https://gerrit.osmocom.org/13716 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: I6668171f17eeec9f483f6cdd981d5b8b81b09cb0 Gerrit-Change-Number: 13716 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:09:27 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 8 May 2019 13:09:27 +0000 Subject: Change in osmo-hlr[master]: add lu-ignore-nam-cs In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/13714 ) Change subject: add lu-ignore-nam-cs ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/13714/1/src/hlr_vty.c File src/hlr_vty.c: https://gerrit.osmocom.org/#/c/13714/1/src/hlr_vty.c at 347 PS1, Line 347: "Allow subscribers to do the LU (Location Update) for the CS domain, even if they should not have access to it." > I wonder how such long help strings are rendered in the VTY. I've never tried... FWIW it looked decent in the vty when I tested it. -- To view, visit https://gerrit.osmocom.org/13714 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I62e750faab92b142b9ca89ad2de5dc63afaeb61c Gerrit-Change-Number: 13714 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith Gerrit-CC: Harald Welte Gerrit-Comment-Date: Wed, 08 May 2019 13:09:27 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:09:37 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 8 May 2019 13:09:37 +0000 Subject: Change in osmo-hlr[master]: add lu-ignore-nam-cs In-Reply-To: References: Message-ID: osmith has abandoned this change. ( https://gerrit.osmocom.org/13714 ) Change subject: add lu-ignore-nam-cs ...................................................................... Abandoned We have a nice solution now, that doesn't need this hack :) -- To view, visit https://gerrit.osmocom.org/13714 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: I62e750faab92b142b9ca89ad2de5dc63afaeb61c Gerrit-Change-Number: 13714 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith Gerrit-CC: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:23:53 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 8 May 2019 13:23:53 +0000 Subject: Change in osmo-hlr[master]: Document subscribers create on demand feature In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#3) to the change originally created by Vadim Yanitskiy. ( https://gerrit.osmocom.org/13715 ) Change subject: Document subscribers create on demand feature ...................................................................... Document subscribers create on demand feature Add a new section in the subscribers chapter, with detailed explanation of the use cases and related OsmoHLR and OsmoMSC configuration. Related: OS#2542 Change-Id: I2dd4a56f7b8be8b5d0e6fc32e04459e5e278d0a9 --- M doc/manuals/chapters/subscribers.adoc 1 file changed, 21 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/15/13715/3 -- To view, visit https://gerrit.osmocom.org/13715 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2dd4a56f7b8be8b5d0e6fc32e04459e5e278d0a9 Gerrit-Change-Number: 13715 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:26:19 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 8 May 2019 13:26:19 +0000 Subject: Change in osmo-hlr[master]: Create subscribers on demand In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13713 ) Change subject: Create subscribers on demand ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/13713/2/src/hlr_vty.c File src/hlr_vty.c: https://gerrit.osmocom.org/#/c/13713/2/src/hlr_vty.c at 362 PS2, Line 362: both 'both' looks confusing, what about 'full'? Since this is related to 'access' => 'full access'. -- To view, visit https://gerrit.osmocom.org/13713 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd Gerrit-Change-Number: 13713 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 08 May 2019 13:26:19 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:29:10 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 13:29:10 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Change osmo_mgcpc_ep_fsm name to avoid collision with old o... In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13912 ) Change subject: mgcp-cli: Change osmo_mgcpc_ep_fsm name to avoid collision with old osmo-bsc ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13912 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I694ce58baa43f536b7e594b003edc891f029aa4a Gerrit-Change-Number: 13912 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 08 May 2019 13:29:10 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:34:57 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 13:34:57 +0000 Subject: Change in osmo-hlr[master]: db_hlr.c: add db_subscr_exists_by_imsi() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13712 ) Change subject: db_hlr.c: add db_subscr_exists_by_imsi() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13712 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I63818c0dd4fd22b41dadeeba2a07a651b5454c54 Gerrit-Change-Number: 13712 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 08 May 2019 13:34:57 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:35:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 13:35:19 +0000 Subject: Change in osmo-hlr[master]: db_hlr.c: add db_subscr_exists_by_msisdn() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13719 ) Change subject: db_hlr.c: add db_subscr_exists_by_msisdn() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13719 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibfbc408c966197682ba2b12d166ade4bfeb7abc2 Gerrit-Change-Number: 13719 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 08 May 2019 13:35:19 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:37:01 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 13:37:01 +0000 Subject: Change in osmo-mgw[master]: osmux: Document func and return different rc upon osmux init failure Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13917 Change subject: osmux: Document func and return different rc upon osmux init failure ...................................................................... osmux: Document func and return different rc upon osmux init failure Change-Id: Id8593bc374b598e63a70c60ac256273b9d99ba6e --- M src/libosmo-mgcp/mgcp_protocol.c 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/17/13917/1 diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index bfb88bc..3a4e396 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -671,12 +671,17 @@ rtp->codec->frame_duration_den; } +/*! Initializes osmux socket if not yet initialized. Parses Osmux CID from MGCP line. + * \param[in] endp Endpoint willing to initialize osmux + * \param[in] line Line X-Osmux from MGCP header msg to parse + * \returns OSMUX CID, -1 for wildcard, -2 on parse error, -3 on osmux initalize error + */ static int mgcp_osmux_setup(struct mgcp_endpoint *endp, const char *line) { if (!endp->cfg->osmux_init) { if (osmux_init(OSMUX_ROLE_BSC, endp->cfg) < 0) { LOGPENDP(endp, DLMGCP, LOGL_ERROR, "Cannot init OSMUX\n"); - return -1; + return -3; } LOGPENDP(endp, DLMGCP, LOGL_NOTICE, "OSMUX socket has been set up\n"); } -- To view, visit https://gerrit.osmocom.org/13917 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id8593bc374b598e63a70c60ac256273b9d99ba6e Gerrit-Change-Number: 13917 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:37:37 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 13:37:37 +0000 Subject: Change in osmo-hlr[master]: Create subscribers on demand In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13713 ) Change subject: Create subscribers on demand ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/13713/2/src/hlr_vty.c File src/hlr_vty.c: https://gerrit.osmocom.org/#/c/13713/2/src/hlr_vty.c at 362 PS2, Line 362: both > 'both' looks confusing, what about 'full'? Since this is related to 'access' => 'full access'. it's a bit tricky. I think 3GPP calls it "combined". You can e.g. do a "combined" LU+RAU to talk to both to the CS and PS plane. To make it more obvious, we also could ismply call it "cs+ps" or "cs-and-ps" or the like. -- To view, visit https://gerrit.osmocom.org/13713 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd Gerrit-Change-Number: 13713 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 08 May 2019 13:37:37 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:39:01 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 13:39:01 +0000 Subject: Change in osmo-mgw[master]: osmux: Document func and return different rc upon osmux init failure In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13917 ) Change subject: osmux: Document func and return different rc upon osmux init failure ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13917 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id8593bc374b598e63a70c60ac256273b9d99ba6e Gerrit-Change-Number: 13917 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 08 May 2019 13:39:01 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:42:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 13:42:16 +0000 Subject: Change in libosmocore[master]: deal with rate_ctr_group_alloc() returning NULL In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13913 to look at the new patch set (#2). Change subject: deal with rate_ctr_group_alloc() returning NULL ...................................................................... deal with rate_ctr_group_alloc() returning NULL Change-Id: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc Related: #3701 --- M src/gb/gprs_bssgp.c M src/gb/gprs_ns.c 2 files changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/13/13913/2 -- To view, visit https://gerrit.osmocom.org/13913 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc Gerrit-Change-Number: 13913 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:43:06 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 13:43:06 +0000 Subject: Change in libosmocore[master]: deal with rate_ctr_group_alloc() returning NULL In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13913 ) Change subject: deal with rate_ctr_group_alloc() returning NULL ...................................................................... Patch Set 1: > The doc/vty stuff in this patch doesn't seem related. thanks. The removal of those two files is happening virtually on every build here, and I always have to stash/revere those changes on every libosmocore commit during recent weeks/months :( -- To view, visit https://gerrit.osmocom.org/13913 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc Gerrit-Change-Number: 13913 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 13:43:06 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:43:06 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 8 May 2019 13:43:06 +0000 Subject: Change in osmo-hlr[master]: Create subscribers on demand In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13713 ) Change subject: Create subscribers on demand ...................................................................... Patch Set 2: Code-Review-1 (2 comments) I think both network access mode (PS or CS) and random MSISDN assignment should be separate independent parameters. For example, one may not want to assign MSISDNs, but still allow PS, CS, or both... At least for PS, having a valid MSISDN is not mandatory I think. https://gerrit.osmocom.org/#/c/13713/2/src/hlr.h File src/hlr.h: https://gerrit.osmocom.org/#/c/13713/2/src/hlr.h at 63 PS2, Line 63: int unsigned https://gerrit.osmocom.org/#/c/13713/2/src/hlr_vty.c File src/hlr_vty.c: https://gerrit.osmocom.org/#/c/13713/2/src/hlr_vty.c at 365 PS2, Line 365: NAM (Numeric Assignment Module) I thought it's "Network Access Mode" :D -- To view, visit https://gerrit.osmocom.org/13713 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd Gerrit-Change-Number: 13713 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 08 May 2019 13:43:06 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:46:10 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 13:46:10 +0000 Subject: Change in libosmocore[master]: gsm0808_utils: Introduce gsm0808_msgb_put_cell_id_u() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13887 ) Change subject: gsm0808_utils: Introduce gsm0808_msgb_put_cell_id_u() ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/13887/1/src/gsm/gsm0808_utils.c File src/gsm/gsm0808_utils.c: https://gerrit.osmocom.org/#/c/13887/1/src/gsm/gsm0808_utils.c at 802 PS1, Line 802: gsm0808_msgb_put_cell_id_u(msg, cil->id_discr, &cil->id_list[i]); > Can you really have different id_discr in encoding of list in CBSP? Otherwise it makes sense to keep [?] the "probelm" in CBSP is that there are two types of lists: One where there's a single global "discr" followed by a list of items of identical type. There's also other lists where each element in the list has a separate "discr" inside the element. And in order to supprot both from a single encode/decode function, we need to leave list iteration to the user and pass in the discr into the function. -- To view, visit https://gerrit.osmocom.org/13887 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6cc567798e20365e6587e6b2988e834306d8c80c Gerrit-Change-Number: 13887 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 13:46:10 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:50:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 13:50:08 +0000 Subject: Change in osmo-gsm-manuals[master]: port_numbers: Add VTY + CTRL port of upcoming OsmoCBC Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13918 Change subject: port_numbers: Add VTY + CTRL port of upcoming OsmoCBC ...................................................................... port_numbers: Add VTY + CTRL port of upcoming OsmoCBC Change-Id: I57d88f2bddedb7a97c3fc7bacfe978ed4557c4bf --- M common/chapters/port_numbers.adoc 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/18/13918/1 diff --git a/common/chapters/port_numbers.adoc b/common/chapters/port_numbers.adoc index 6309c66..355e41c 100644 --- a/common/chapters/port_numbers.adoc +++ b/common/chapters/port_numbers.adoc @@ -41,6 +41,8 @@ |TCP|4261|telnet (VTY)|osmo-hnbgw |TCP|4262|Control Interface|osmo-hnbgw |TCP|4263|Control Interface|osmo-gbproxy +|TCP|4264|telnet (VTY)|osmo-cbc +|TCP|4265|Control Interface|osmo-cbc |UDP|4729|GSMTAP|Almost every osmocom project |TCP|5000|A/IP|osmo-bsc, osmo-bsc_nat |UDP|2427|GSMTAP|osmo-pcu, osmo-bts -- To view, visit https://gerrit.osmocom.org/13918 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I57d88f2bddedb7a97c3fc7bacfe978ed4557c4bf Gerrit-Change-Number: 13918 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:50:14 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 13:50:14 +0000 Subject: Change in libosmocore[master]: Add VTY and CTRL port numbers for OsmoCBC (Cell Broadcast Centre) In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13886 ) Change subject: Add VTY and CTRL port numbers for OsmoCBC (Cell Broadcast Centre) ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13886 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2075420048b43973c800ba0fc389f4b559437233 Gerrit-Change-Number: 13886 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 13:50:14 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:50:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 13:50:16 +0000 Subject: Change in libosmocore[master]: Add VTY and CTRL port numbers for OsmoCBC (Cell Broadcast Centre) In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13886 ) Change subject: Add VTY and CTRL port numbers for OsmoCBC (Cell Broadcast Centre) ...................................................................... Add VTY and CTRL port numbers for OsmoCBC (Cell Broadcast Centre) Change-Id: I2075420048b43973c800ba0fc389f4b559437233 --- M include/osmocom/ctrl/ports.h M include/osmocom/vty/ports.h 2 files changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/ctrl/ports.h b/include/osmocom/ctrl/ports.h index b65bd00..25d2491 100644 --- a/include/osmocom/ctrl/ports.h +++ b/include/osmocom/ctrl/ports.h @@ -22,4 +22,6 @@ #define OSMO_CTRL_PORT_HLR 4259 #define OSMO_CTRL_PORT_HNBGW 4262 #define OSMO_CTRL_PORT_GBPROXY 4263 +/* 4264 used by VTY interface */ +#define OSMO_CTRL_PORT_CBC 4265 /* When adding/changing port numbers, keep docs and wiki in sync. See above. */ diff --git a/include/osmocom/vty/ports.h b/include/osmocom/vty/ports.h index 5a8faed..201e115 100644 --- a/include/osmocom/vty/ports.h +++ b/include/osmocom/vty/ports.h @@ -33,4 +33,5 @@ #define OSMO_VTY_PORT_GGSN 4260 #define OSMO_VTY_PORT_HNBGW 4261 /* 4262-4263 used by control interface */ +#define OSMO_VTY_PORT_CBC 4264 /* When adding/changing port numbers, keep docs and wiki in sync. See above. */ -- To view, visit https://gerrit.osmocom.org/13886 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I2075420048b43973c800ba0fc389f4b559437233 Gerrit-Change-Number: 13886 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:50:30 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 13:50:30 +0000 Subject: Change in osmo-gsm-manuals[master]: port_numbers: Add VTY + CTRL port of upcoming OsmoCBC In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13918 ) Change subject: port_numbers: Add VTY + CTRL port of upcoming OsmoCBC ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13918 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I57d88f2bddedb7a97c3fc7bacfe978ed4557c4bf Gerrit-Change-Number: 13918 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-CC: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 08 May 2019 13:50:30 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 13:54:16 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 8 May 2019 13:54:16 +0000 Subject: Change in osmo-hlr[master]: Create subscribers on demand In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13713 ) Change subject: Create subscribers on demand ...................................................................... Patch Set 2: (2 comments) https://gerrit.osmocom.org/#/c/13713/2/src/hlr.c File src/hlr.c: https://gerrit.osmocom.org/#/c/13713/2/src/hlr.c at 154 PS2, Line 154: 15 AFAIR, I just used a random number, because in the original patch the MSISDN length was hard-coded. Do we have any constant like MSISDN_MAX_LEN in libosmocore or wherever? In any case, we're limited by OSMO_MAX_RAND_ID_LEN (16). https://gerrit.osmocom.org/#/c/13713/2/src/hlr.c at 178 PS2, Line 178: continue I just realized that we may end up with an infinity loop here, if osmo_get_rand_id() constantly fails. Probably, we need to limit the amount of attempts somehow... -- To view, visit https://gerrit.osmocom.org/13713 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd Gerrit-Change-Number: 13713 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 08 May 2019 13:54:16 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 14:01:38 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 8 May 2019 14:01:38 +0000 Subject: Change in osmo-hlr[master]: db_hlr.c: db_subscr_create(): nam_cs, nam_ps args In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13711 ) Change subject: db_hlr.c: db_subscr_create(): nam_cs, nam_ps args ...................................................................... Patch Set 2: Code-Review-1 (3 comments) https://gerrit.osmocom.org/#/c/13711/2/src/db.h File src/db.h: https://gerrit.osmocom.org/#/c/13711/2/src/db.h at 121 PS2, Line 121: int nam_cs, int nam_ps Alternatively, we could have a bitmask here, so we would be able to extend it later on. In particular: #define SUBSCR_FLAG_NAM_CS (1 << 0) #define SUBSCR_FLAG_NAM_PS (1 << 1) ... int db_subscr_create(..., uint8_t flags); and the function call itself would look cleaner: /* Create a subscriber with both CS and PS domains allowed */ db_subscr_create(..., SUBSCR_FLAG_NAM_CS | SUBSCR_FLAG_NAM_PS); https://gerrit.osmocom.org/#/c/13711/2/src/db.h at 121 PS2, Line 121: int Since this is just yes or no, you could use bool. https://gerrit.osmocom.org/#/c/13711/2/src/db_hlr.c File src/db_hlr.c: https://gerrit.osmocom.org/#/c/13711/2/src/db_hlr.c at 47 PS2, Line 47: (1: enable, 0: disable) ... so there would be no need to clarify possible values. -- To view, visit https://gerrit.osmocom.org/13711 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1a6dd85387723dab5487c53b33d2d9ec6d05d006 Gerrit-Change-Number: 13711 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 08 May 2019 14:01:38 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 14:14:27 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 8 May 2019 14:14:27 +0000 Subject: Change in osmo-hlr[master]: db_hlr.c: add db_subscr_exists_by_imsi() In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13712 ) Change subject: db_hlr.c: add db_subscr_exists_by_imsi() ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13712 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I63818c0dd4fd22b41dadeeba2a07a651b5454c54 Gerrit-Change-Number: 13712 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 08 May 2019 14:14:27 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 14:15:16 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 8 May 2019 14:15:16 +0000 Subject: Change in osmo-hlr[master]: db_hlr.c: add db_subscr_exists_by_msisdn() In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13719 ) Change subject: db_hlr.c: add db_subscr_exists_by_msisdn() ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13719 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibfbc408c966197682ba2b12d166ade4bfeb7abc2 Gerrit-Change-Number: 13719 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 08 May 2019 14:15:16 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 14:18:15 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 8 May 2019 14:18:15 +0000 Subject: Change in osmo-hlr[master]: Document subscribers create on demand feature In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13715 ) Change subject: Document subscribers create on demand feature ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13715 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2dd4a56f7b8be8b5d0e6fc32e04459e5e278d0a9 Gerrit-Change-Number: 13715 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 08 May 2019 14:18:15 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 14:19:15 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 8 May 2019 14:19:15 +0000 Subject: Change in osmo-gsm-manuals[master]: port_numbers: Add VTY + CTRL port of upcoming OsmoCBC In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13918 ) Change subject: port_numbers: Add VTY + CTRL port of upcoming OsmoCBC ...................................................................... Patch Set 1: How about include/osmocom/vty/ports.h where we have OSMO_VTY_PORT_*? -- To view, visit https://gerrit.osmocom.org/13918 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I57d88f2bddedb7a97c3fc7bacfe978ed4557c4bf Gerrit-Change-Number: 13918 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Wed, 08 May 2019 14:19:15 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 14:21:00 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 8 May 2019 14:21:00 +0000 Subject: Change in libosmocore[master]: deal with rate_ctr_group_alloc() returning NULL In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13913 ) Change subject: deal with rate_ctr_group_alloc() returning NULL ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13913 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc Gerrit-Change-Number: 13913 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Wed, 08 May 2019 14:21:00 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 14:33:41 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 14:33:41 +0000 Subject: Change in osmo-gsm-manuals[master]: port_numbers: Add VTY + CTRL port of upcoming OsmoCBC In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13918 ) Change subject: port_numbers: Add VTY + CTRL port of upcoming OsmoCBC ...................................................................... port_numbers: Add VTY + CTRL port of upcoming OsmoCBC Change-Id: I57d88f2bddedb7a97c3fc7bacfe978ed4557c4bf --- M common/chapters/port_numbers.adoc 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/common/chapters/port_numbers.adoc b/common/chapters/port_numbers.adoc index 6309c66..355e41c 100644 --- a/common/chapters/port_numbers.adoc +++ b/common/chapters/port_numbers.adoc @@ -41,6 +41,8 @@ |TCP|4261|telnet (VTY)|osmo-hnbgw |TCP|4262|Control Interface|osmo-hnbgw |TCP|4263|Control Interface|osmo-gbproxy +|TCP|4264|telnet (VTY)|osmo-cbc +|TCP|4265|Control Interface|osmo-cbc |UDP|4729|GSMTAP|Almost every osmocom project |TCP|5000|A/IP|osmo-bsc, osmo-bsc_nat |UDP|2427|GSMTAP|osmo-pcu, osmo-bts -- To view, visit https://gerrit.osmocom.org/13918 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I57d88f2bddedb7a97c3fc7bacfe978ed4557c4bf Gerrit-Change-Number: 13918 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 14:43:25 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 14:43:25 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13137 ) Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... Patch Set 9: (2 comments) https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c File src/libmsc/call_leg.c: https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 78 PS9, Line 78: talloc_zero > > The talloc API does not provide a macro similar to talloc_zero() that names the struct [...] [?] hmm, I didn't see that! even the first on top. All I saw was talloc_size(). I apologize for being blind. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c File src/libmsc/e_link.c: https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/e_link.c at 77 PS9, Line 77: *e = (struct e_link) { > the point is that the compiler is unable to optimize away initializing the same bit of memory *twice [?] Every time micro optimisation comes up I think we should actually start some profiling effort that tells us how much time is spent where. Then we could sensibly argue about performance changes with hard data to support it. I think there are quite a few things we do far more often that are a lot worse than this, O(N) things instead of O(1). Comes to mind: iterating entire linked-lists over all items to find the conn for a received message / the vsub for a subscriber / ...; iterating value_string[] instead of using array index; copying msgb around to get enough headroom. Compared to those, I suspect that this is really not worth even commenting about. Writing about this double-zero-init likely took more time than osmo-msc would spend doing this in ten years of operation. -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 9 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 14:43:25 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 14:51:08 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 14:51:08 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13137 to look at the new patch set (#19). Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... large refactoring: support inter-BSC and inter-MSC Handover 3GPP TS 49.008 '4.3 Roles of MSC-A, MSC-I and MSC-T' defines distinct roles: - MSC-A is responsible for managing subscribers, - MSC-I is the gateway to the RAN. - MSC-T is a second transitory gateway to another RAN during Handover. After inter-MSC Handover, the MSC-I is handled by a remote MSC instance, while the original MSC-A retains the responsibility of subscriber management. MSC-T exists in this patch but is not yet used, since Handover is only prepared for, not yet implemented. Facilitate Inter-MSC and inter-BSC Handover by the same internal split of MSC roles. Compared to inter-MSC Handover, mere inter-BSC has the obvious simplifications: - all of MSC-A, MSC-I and MSC-T roles will be served by the same osmo-msc instance, - messages between MSC-A and MSC-{I,T} don't need to be routed via E-interface (GSUP), - no call routing between MSC-A and -I via MNCC necessary. This is the largest code bomb I have submitted, ever. Out of principle, I apologize to everyone trying to read this as a whole. Unfortunately, I see no sense in trying to split this patch into smaller bits. It would be a huge amount of work to introduce these changes in separate chunks, especially if each should in turn be useful and pass all test suites. So, unfortunately, we are stuck with this code bomb. The following are some details and rationale for this rather huge refactoring: * separate MSC subscriber management from ran_conn struct ran_conn is reduced from the pivotal subscriber management entity it has been so far to a mere storage for an SCCP connection ID and an MSC subscriber reference. The new pivotal subscriber management entity is struct msc_a -- struct msub lists the msc_a, msc_i, msc_t roles, the vast majority of code paths however use msc_a, since MSC-A is where all the interesting stuff happens. Before handover, msc_i is an FSM implementation that encodes to the local ran_conn. After inter-MSC Handover, msc_i is a compatible but different FSM implementation that instead forwards via/from GSUP. Same goes for the msc_a struct: if osmo-msc is the MSC-I "RAN proxy" for a remote MSC-A role, the msc_a->fi is an FSM implementation that merely forwards via/from GSUP. * New SCCP implementation for RAN access To be able to forward BSSAP and RANAP messages via the GSUP interface, the individual message layers need to be cleanly separated. The IuCS implementation used until now (iu_client from libosmo-ranap) did not provide this level of separation, and needed a complete rewrite. It was trivial to implement this in such a way that both BSSAP and RANAP can be handled by the same SCCP code, hence the new SCCP-RAN layer also replaces BSSAP handling. sccp_ran.h: struct sccp_ran_inst provides an abstract handler for incoming RAN connections. A set of callback functions provides implementation specific details. * RAN Abstraction (BSSAP vs. RANAP) The common SCCP implementation did set the theme for the remaining refactoring: make all other MSC code paths entirely RAN-implementation-agnostic. ran_infra.c provides data structures that list RAN implementation specifics, from logging to RAN de-/encoding to SCCP callbacks and timers. A ran_infra pointer hence allows complete abstraction of RAN implementations: - managing connected RAN peers (BSC, RNC) in ran_peer.c, - classifying and de-/encoding RAN PDUs, - recording connected LACs and cell IDs and sending out Paging requests to matching RAN peers. * RAN RESET now also for RANAP ran_peer.c absorbs the reset_fsm from a_reset.c; in consequence, RANAP also supports proper RESET semantics now. Hence osmo-hnbgw now also needs to provide proper RESET handling, which it so far duly ignores. (TODO) * RAN de-/encoding abstraction The RAN abstraction mentioned above serves not only to separate RANAP and BSSAP implementations transparently, but also to be able to optionally handle RAN on distinct levels. Before Handover, all RAN messages are handled by the MSC-A role. However, after an inter-MSC Handover, a standalone MSC-I will need to decode RAN PDUs, at least in order to manage Assignment of RTP streams between BSS/RNC and MNCC call forwarding. ran_msg.h provides a common API with abstraction for: - receiving events from RAN, i.e. passing RAN decode from the BSC/RNC and MS/UE: struct ran_dec_msg represents RAN messages decoded from either BSSMAP or RANAP; - sending RAN events: ran_enc_msg is the counterpart to compose RAN messages that should be encoded to either BSSMAP or RANAP and passed down to the BSC/RNC and MS/UE. The RAN-specific implementations are completely contained by ran_msg_a.c and ran_msg_iu.c. In particular, Assignment and Ciphering have so far been distinct code paths for BSSAP and RANAP, with switch(via_ran){...} statements all over the place. Using RAN_DEC_* and RAN_ENC_* abstractions, these are now completely unified. Note that SGs does not qualify for RAN abstraction: the SGs interface always remains with the MSC-A role, and SGs messages follow quite distinct semantics from the fairly similar GERAN and UTRAN. * MGW and RTP stream management So far, managing MGW endpoints via MGCP was tightly glued in-between GSM-04.08-CC on the one and MNCC on the other side. Prepare for switching RTP streams between different RAN peers by moving to object-oriented implementations: implement struct call_leg and struct rtp_stream with distinct FSMs each. For MGW communication, use the osmo_mgcpc_ep API that has originated from osmo-bsc and recently moved to libosmo-mgcp-client for this purpose. Instead of implementing a sequence of events with code duplication for the RAN and CN sides, the idea is to manage each RTP stream separately by firing and receiving events as soon as codecs and RTP ports are negotiated, and letting the individual FSMs take care of the MGW management "asynchronously". The caller provides event IDs and an FSM instance that should be notified of RTP stream setup progress. Hence it becomes possible to reconnect RTP streams from one GSM-04.08-CC to another (inter-BSC Handover) or between CC and MNCC RTP peers (inter-MSC Handover) without duplicating the MGCP code for each transition. The number of FSM implementations used for MGCP handling may seem a bit of an overkill. But in fact, the number of perspectives on RTP forwarding are far from trivial: - an MGW endpoint is an entity with N connections, and MGCP "sessions" for configuring them by talking to the MGW; - an RTP stream is a remote peer connected to one of the endpoint's connections, which is asynchronously notified of codec and RTP port choices; - a call leg is the higher level view on either an MT or MO side of a voice call, a combination of two RTP streams to forward between two remote peers. BSC MGW PBX CI CI [MGW-endpoint] [--rtp_stream--] [--rtp_stream--] [----------------call_leg----------------] * Use counts Introduce using the new osmo_use_count API added to libosmocore for this purpose. Each use token has a distinct name in the logging, which can be a globally constant name or ad-hoc, like the local __func__ string constant. Use in the new struct msc_a, as well as change vlr_subscr to the new osmo_use_count API. * FSM Timeouts Introduce using the new osmo_tdef API, which provides a common VTY implementation for all timer numbers, and FSM state transitions with the correct timeout. Originated in osmo-bsc, recently moved to libosmocore. Depends: Ife31e6798b4e728a23913179e346552a7dd338c0 (libosmocore) Ib9af67b100c4583342a2103669732dab2e577b04 (libosmocore) Id617265337f09dfb6ddfe111ef5e578cd3dc9f63 (libosmocore) Ie9e2add7bbfae651c04e230d62e37cebeb91b0f5 (libosmo-sccp) I26be5c4b06a680f25f19797407ab56a5a4880ddc (osmo-mgw) Ida0e59f9a1f2dd18efea0a51680a67b69f141efa (osmo-mgw) I9a3effd38e72841529df6c135c077116981dea36 (osmo-mgw) Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd --- M configure.ac M doc/Makefile.am A doc/sequence_charts/Makefile.am A doc/sequence_charts/inter_bsc_ho.msc A doc/sequence_charts/inter_msc_ho.msc A doc/sequence_charts/mncc_fsm.msc M include/osmocom/msc/Makefile.am D include/osmocom/msc/a_iface.h D include/osmocom/msc/a_iface_bssap.h D include/osmocom/msc/a_reset.h A include/osmocom/msc/call_leg.h A include/osmocom/msc/cell_id_list.h A include/osmocom/msc/e_link.h M include/osmocom/msc/gsm_04_08.h M include/osmocom/msc/gsm_04_11.h M include/osmocom/msc/gsm_04_11_gsup.h M include/osmocom/msc/gsm_04_14.h M include/osmocom/msc/gsm_04_80.h M include/osmocom/msc/gsm_09_11.h M include/osmocom/msc/gsm_data.h M include/osmocom/msc/gsm_data_shared.h M include/osmocom/msc/gsm_subscriber.h A include/osmocom/msc/gsup_client_mux.h D include/osmocom/msc/iu_dummy.h D include/osmocom/msc/iucs.h D include/osmocom/msc/iucs_ranap.h M include/osmocom/msc/mncc.h A include/osmocom/msc/mncc_call.h A include/osmocom/msc/msc_a.h A include/osmocom/msc/msc_a_remote.h M include/osmocom/msc/msc_common.h A include/osmocom/msc/msc_ho.h A include/osmocom/msc/msc_i.h A include/osmocom/msc/msc_i_remote.h D include/osmocom/msc/msc_ifaces.h D include/osmocom/msc/msc_mgcp.h A include/osmocom/msc/msc_roles.h A include/osmocom/msc/msc_t.h A include/osmocom/msc/msc_t_remote.h A include/osmocom/msc/msub.h A include/osmocom/msc/neighbor_ident.h A include/osmocom/msc/paging.h M include/osmocom/msc/ran_conn.h A include/osmocom/msc/ran_infra.h A include/osmocom/msc/ran_msg.h A include/osmocom/msc/ran_msg_a.h A include/osmocom/msc/ran_msg_iu.h A include/osmocom/msc/ran_peer.h A include/osmocom/msc/rtp_stream.h A include/osmocom/msc/sccp_ran.h M include/osmocom/msc/sgs_iface.h M include/osmocom/msc/signal.h M include/osmocom/msc/silent_call.h M include/osmocom/msc/sms_queue.h M include/osmocom/msc/transaction.h M include/osmocom/msc/vlr.h M include/osmocom/msc/vlr_sgs.h M src/libmsc/Makefile.am D src/libmsc/a_iface.c D src/libmsc/a_iface_bssap.c D src/libmsc/a_reset.c A src/libmsc/call_leg.c A src/libmsc/cell_id_list.c A src/libmsc/e_link.c M src/libmsc/gsm_04_08.c M src/libmsc/gsm_04_08_cc.c M src/libmsc/gsm_04_11.c M src/libmsc/gsm_04_11_gsup.c M src/libmsc/gsm_04_14.c M src/libmsc/gsm_04_80.c M src/libmsc/gsm_09_11.c D src/libmsc/gsm_subscriber.c A src/libmsc/gsup_client_mux.c D src/libmsc/iu_dummy.c D src/libmsc/iucs.c D src/libmsc/iucs_ranap.c M src/libmsc/mncc.c M src/libmsc/mncc_builtin.c A src/libmsc/mncc_call.c M src/libmsc/mncc_sock.c A src/libmsc/msc_a.c A src/libmsc/msc_a_remote.c A src/libmsc/msc_ho.c A src/libmsc/msc_i.c A src/libmsc/msc_i_remote.c D src/libmsc/msc_ifaces.c D src/libmsc/msc_mgcp.c A src/libmsc/msc_net_init.c A src/libmsc/msc_t.c A src/libmsc/msc_t_remote.c M src/libmsc/msc_vty.c A src/libmsc/msub.c A src/libmsc/neighbor_ident.c A src/libmsc/neighbor_ident_vty.c D src/libmsc/osmo_msc.c A src/libmsc/paging.c M src/libmsc/ran_conn.c A src/libmsc/ran_infra.c A src/libmsc/ran_msg.c A src/libmsc/ran_msg_a.c A src/libmsc/ran_msg_iu.c A src/libmsc/ran_peer.c A src/libmsc/ran_up_l2.c M src/libmsc/rrlp.c A src/libmsc/rtp_stream.c A src/libmsc/sccp_ran.c M src/libmsc/sgs_iface.c M src/libmsc/sgs_server.c M src/libmsc/silent_call.c M src/libmsc/smpp_openbsc.c M src/libmsc/smpp_smsc.h M src/libmsc/sms_queue.c M src/libmsc/transaction.c M src/libvlr/vlr.c M src/libvlr/vlr_access_req_fsm.c M src/libvlr/vlr_lu_fsm.c M src/libvlr/vlr_sgs.c M src/libvlr/vlr_sgs_fsm.c M src/osmo-msc/Makefile.am M src/osmo-msc/msc_main.c M tests/Makefile.am M tests/msc_vlr/Makefile.am M tests/msc_vlr/msc_vlr_test_authen_reuse.c M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_test_gsm_authen.c M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.c M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.c M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.c M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.c M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.c M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_ss.c M tests/msc_vlr/msc_vlr_test_ss.err M tests/msc_vlr/msc_vlr_test_umts_authen.c M tests/msc_vlr/msc_vlr_test_umts_authen.err M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h M tests/sms_queue/Makefile.am A tests/test_neighbor_ident.vty M tests/test_nodes.vty 151 files changed, 35,679 insertions(+), 22,995 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/13137/19 -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 19 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 15:00:16 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 15:00:16 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13137 ) Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... Patch Set 9: (4 comments) https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c File src/libmsc/call_leg.c: https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 158 PS9, Line 158: rtps = data; > > it is to clarify the type of the data argument [...] [?] The way I usually do it is define a local variable that indicates the *data type, and then use it in various switch cases. Here it happens to be only the one case... Why are we arguing about this? :) https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 178 PS9, Line 178: struct call_leg *cl = fi->priv; > Also same opinion, variable is not needed for that: [?] indeed, it's not type safety, it is merely "type safety". The way I usually do it is assign fi->priv to a local variable of the correct type and then use it in various places of that function. Here it happens to be only the one, and also happens to be passed as a void*. Nevertheless I prefer to keep that style consistent across the entire file. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c at 290 PS9, Line 290: call_leg_ensure_rtp_alloc > Well, call_leg_rtp_alloc() also would just return 0 if it was already called for a given RTP stream. [?] oh. what was I thinking. https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c File src/libmsc/gsm_04_08.c: https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 156 PS9, Line 156: DEBUGP > > This is legacy logging, not sure if we really need to change all of it now? [?] And I would rather share the work load :P -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 9 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 15:00:16 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 15:01:22 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 15:01:22 +0000 Subject: Change in libosmocore[master]: deal with rate_ctr_group_alloc() returning NULL In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Pau Espin Pedrol, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13913 to look at the new patch set (#3). Change subject: deal with rate_ctr_group_alloc() returning NULL ...................................................................... deal with rate_ctr_group_alloc() returning NULL Change-Id: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc Related: #3701 --- M src/gb/gprs_bssgp.c M src/gb/gprs_ns.c M src/rate_ctr.c 3 files changed, 9 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/13/13913/3 -- To view, visit https://gerrit.osmocom.org/13913 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc Gerrit-Change-Number: 13913 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 15:01:23 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 15:01:23 +0000 Subject: Change in libosmocore[master]: Print error message if application fails to call rate_ctr_init() Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13919 Change subject: Print error message if application fails to call rate_ctr_init() ...................................................................... Print error message if application fails to call rate_ctr_init() Change-Id: Ie8093b66b7e27cf863d2558fe21b2c6e0f3fcdfd Closes: OS#3580 --- M src/rate_ctr.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/19/13919/1 diff --git a/src/rate_ctr.c b/src/rate_ctr.c index 90e6502..99ec523 100644 --- a/src/rate_ctr.c +++ b/src/rate_ctr.c @@ -217,6 +217,10 @@ unsigned int size; struct rate_ctr_group *group; + if (!osmo_timer_pending(&rate_ctr_timer)) + LOGP(DLGLOBAL, LOGL_ERROR, "your program appears to use libosmocore rate_ctr " + "without calling rate_ctr_init() at start-up. Rate counters won't work!\n"); + if (rate_ctr_get_group_by_name_idx(desc->group_name_prefix, idx)) { unsigned int new_idx = rate_ctr_get_unused_name_idx(desc->group_name_prefix); LOGP(DLGLOBAL, LOGL_ERROR, "counter group '%s' already exists for index %u," -- To view, visit https://gerrit.osmocom.org/13919 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ie8093b66b7e27cf863d2558fe21b2c6e0f3fcdfd Gerrit-Change-Number: 13919 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 15:02:39 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 15:02:39 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13137 to look at the new patch set (#20). Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... large refactoring: support inter-BSC and inter-MSC Handover 3GPP TS 49.008 '4.3 Roles of MSC-A, MSC-I and MSC-T' defines distinct roles: - MSC-A is responsible for managing subscribers, - MSC-I is the gateway to the RAN. - MSC-T is a second transitory gateway to another RAN during Handover. After inter-MSC Handover, the MSC-I is handled by a remote MSC instance, while the original MSC-A retains the responsibility of subscriber management. MSC-T exists in this patch but is not yet used, since Handover is only prepared for, not yet implemented. Facilitate Inter-MSC and inter-BSC Handover by the same internal split of MSC roles. Compared to inter-MSC Handover, mere inter-BSC has the obvious simplifications: - all of MSC-A, MSC-I and MSC-T roles will be served by the same osmo-msc instance, - messages between MSC-A and MSC-{I,T} don't need to be routed via E-interface (GSUP), - no call routing between MSC-A and -I via MNCC necessary. This is the largest code bomb I have submitted, ever. Out of principle, I apologize to everyone trying to read this as a whole. Unfortunately, I see no sense in trying to split this patch into smaller bits. It would be a huge amount of work to introduce these changes in separate chunks, especially if each should in turn be useful and pass all test suites. So, unfortunately, we are stuck with this code bomb. The following are some details and rationale for this rather huge refactoring: * separate MSC subscriber management from ran_conn struct ran_conn is reduced from the pivotal subscriber management entity it has been so far to a mere storage for an SCCP connection ID and an MSC subscriber reference. The new pivotal subscriber management entity is struct msc_a -- struct msub lists the msc_a, msc_i, msc_t roles, the vast majority of code paths however use msc_a, since MSC-A is where all the interesting stuff happens. Before handover, msc_i is an FSM implementation that encodes to the local ran_conn. After inter-MSC Handover, msc_i is a compatible but different FSM implementation that instead forwards via/from GSUP. Same goes for the msc_a struct: if osmo-msc is the MSC-I "RAN proxy" for a remote MSC-A role, the msc_a->fi is an FSM implementation that merely forwards via/from GSUP. * New SCCP implementation for RAN access To be able to forward BSSAP and RANAP messages via the GSUP interface, the individual message layers need to be cleanly separated. The IuCS implementation used until now (iu_client from libosmo-ranap) did not provide this level of separation, and needed a complete rewrite. It was trivial to implement this in such a way that both BSSAP and RANAP can be handled by the same SCCP code, hence the new SCCP-RAN layer also replaces BSSAP handling. sccp_ran.h: struct sccp_ran_inst provides an abstract handler for incoming RAN connections. A set of callback functions provides implementation specific details. * RAN Abstraction (BSSAP vs. RANAP) The common SCCP implementation did set the theme for the remaining refactoring: make all other MSC code paths entirely RAN-implementation-agnostic. ran_infra.c provides data structures that list RAN implementation specifics, from logging to RAN de-/encoding to SCCP callbacks and timers. A ran_infra pointer hence allows complete abstraction of RAN implementations: - managing connected RAN peers (BSC, RNC) in ran_peer.c, - classifying and de-/encoding RAN PDUs, - recording connected LACs and cell IDs and sending out Paging requests to matching RAN peers. * RAN RESET now also for RANAP ran_peer.c absorbs the reset_fsm from a_reset.c; in consequence, RANAP also supports proper RESET semantics now. Hence osmo-hnbgw now also needs to provide proper RESET handling, which it so far duly ignores. (TODO) * RAN de-/encoding abstraction The RAN abstraction mentioned above serves not only to separate RANAP and BSSAP implementations transparently, but also to be able to optionally handle RAN on distinct levels. Before Handover, all RAN messages are handled by the MSC-A role. However, after an inter-MSC Handover, a standalone MSC-I will need to decode RAN PDUs, at least in order to manage Assignment of RTP streams between BSS/RNC and MNCC call forwarding. ran_msg.h provides a common API with abstraction for: - receiving events from RAN, i.e. passing RAN decode from the BSC/RNC and MS/UE: struct ran_dec_msg represents RAN messages decoded from either BSSMAP or RANAP; - sending RAN events: ran_enc_msg is the counterpart to compose RAN messages that should be encoded to either BSSMAP or RANAP and passed down to the BSC/RNC and MS/UE. The RAN-specific implementations are completely contained by ran_msg_a.c and ran_msg_iu.c. In particular, Assignment and Ciphering have so far been distinct code paths for BSSAP and RANAP, with switch(via_ran){...} statements all over the place. Using RAN_DEC_* and RAN_ENC_* abstractions, these are now completely unified. Note that SGs does not qualify for RAN abstraction: the SGs interface always remains with the MSC-A role, and SGs messages follow quite distinct semantics from the fairly similar GERAN and UTRAN. * MGW and RTP stream management So far, managing MGW endpoints via MGCP was tightly glued in-between GSM-04.08-CC on the one and MNCC on the other side. Prepare for switching RTP streams between different RAN peers by moving to object-oriented implementations: implement struct call_leg and struct rtp_stream with distinct FSMs each. For MGW communication, use the osmo_mgcpc_ep API that has originated from osmo-bsc and recently moved to libosmo-mgcp-client for this purpose. Instead of implementing a sequence of events with code duplication for the RAN and CN sides, the idea is to manage each RTP stream separately by firing and receiving events as soon as codecs and RTP ports are negotiated, and letting the individual FSMs take care of the MGW management "asynchronously". The caller provides event IDs and an FSM instance that should be notified of RTP stream setup progress. Hence it becomes possible to reconnect RTP streams from one GSM-04.08-CC to another (inter-BSC Handover) or between CC and MNCC RTP peers (inter-MSC Handover) without duplicating the MGCP code for each transition. The number of FSM implementations used for MGCP handling may seem a bit of an overkill. But in fact, the number of perspectives on RTP forwarding are far from trivial: - an MGW endpoint is an entity with N connections, and MGCP "sessions" for configuring them by talking to the MGW; - an RTP stream is a remote peer connected to one of the endpoint's connections, which is asynchronously notified of codec and RTP port choices; - a call leg is the higher level view on either an MT or MO side of a voice call, a combination of two RTP streams to forward between two remote peers. BSC MGW PBX CI CI [MGW-endpoint] [--rtp_stream--] [--rtp_stream--] [----------------call_leg----------------] * Use counts Introduce using the new osmo_use_count API added to libosmocore for this purpose. Each use token has a distinct name in the logging, which can be a globally constant name or ad-hoc, like the local __func__ string constant. Use in the new struct msc_a, as well as change vlr_subscr to the new osmo_use_count API. * FSM Timeouts Introduce using the new osmo_tdef API, which provides a common VTY implementation for all timer numbers, and FSM state transitions with the correct timeout. Originated in osmo-bsc, recently moved to libosmocore. Depends: Ife31e6798b4e728a23913179e346552a7dd338c0 (libosmocore) Ib9af67b100c4583342a2103669732dab2e577b04 (libosmocore) Id617265337f09dfb6ddfe111ef5e578cd3dc9f63 (libosmocore) Ie9e2add7bbfae651c04e230d62e37cebeb91b0f5 (libosmo-sccp) I26be5c4b06a680f25f19797407ab56a5a4880ddc (osmo-mgw) Ida0e59f9a1f2dd18efea0a51680a67b69f141efa (osmo-mgw) I9a3effd38e72841529df6c135c077116981dea36 (osmo-mgw) Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd --- M configure.ac M doc/Makefile.am A doc/sequence_charts/Makefile.am A doc/sequence_charts/inter_bsc_ho.msc A doc/sequence_charts/inter_msc_ho.msc A doc/sequence_charts/mncc_fsm.msc M include/osmocom/msc/Makefile.am D include/osmocom/msc/a_iface.h D include/osmocom/msc/a_iface_bssap.h D include/osmocom/msc/a_reset.h A include/osmocom/msc/call_leg.h A include/osmocom/msc/cell_id_list.h A include/osmocom/msc/e_link.h M include/osmocom/msc/gsm_04_08.h M include/osmocom/msc/gsm_04_11.h M include/osmocom/msc/gsm_04_11_gsup.h M include/osmocom/msc/gsm_04_14.h M include/osmocom/msc/gsm_04_80.h M include/osmocom/msc/gsm_09_11.h M include/osmocom/msc/gsm_data.h M include/osmocom/msc/gsm_data_shared.h M include/osmocom/msc/gsm_subscriber.h A include/osmocom/msc/gsup_client_mux.h D include/osmocom/msc/iu_dummy.h D include/osmocom/msc/iucs.h D include/osmocom/msc/iucs_ranap.h M include/osmocom/msc/mncc.h A include/osmocom/msc/mncc_call.h A include/osmocom/msc/msc_a.h A include/osmocom/msc/msc_a_remote.h M include/osmocom/msc/msc_common.h A include/osmocom/msc/msc_ho.h A include/osmocom/msc/msc_i.h A include/osmocom/msc/msc_i_remote.h D include/osmocom/msc/msc_ifaces.h D include/osmocom/msc/msc_mgcp.h A include/osmocom/msc/msc_roles.h A include/osmocom/msc/msc_t.h A include/osmocom/msc/msc_t_remote.h A include/osmocom/msc/msub.h A include/osmocom/msc/neighbor_ident.h A include/osmocom/msc/paging.h M include/osmocom/msc/ran_conn.h A include/osmocom/msc/ran_infra.h A include/osmocom/msc/ran_msg.h A include/osmocom/msc/ran_msg_a.h A include/osmocom/msc/ran_msg_iu.h A include/osmocom/msc/ran_peer.h A include/osmocom/msc/rtp_stream.h A include/osmocom/msc/sccp_ran.h M include/osmocom/msc/sgs_iface.h M include/osmocom/msc/signal.h M include/osmocom/msc/silent_call.h M include/osmocom/msc/sms_queue.h M include/osmocom/msc/transaction.h M include/osmocom/msc/vlr.h M include/osmocom/msc/vlr_sgs.h M src/libmsc/Makefile.am D src/libmsc/a_iface.c D src/libmsc/a_iface_bssap.c D src/libmsc/a_reset.c A src/libmsc/call_leg.c A src/libmsc/cell_id_list.c A src/libmsc/e_link.c M src/libmsc/gsm_04_08.c M src/libmsc/gsm_04_08_cc.c M src/libmsc/gsm_04_11.c M src/libmsc/gsm_04_11_gsup.c M src/libmsc/gsm_04_14.c M src/libmsc/gsm_04_80.c M src/libmsc/gsm_09_11.c D src/libmsc/gsm_subscriber.c A src/libmsc/gsup_client_mux.c D src/libmsc/iu_dummy.c D src/libmsc/iucs.c D src/libmsc/iucs_ranap.c M src/libmsc/mncc.c M src/libmsc/mncc_builtin.c A src/libmsc/mncc_call.c M src/libmsc/mncc_sock.c A src/libmsc/msc_a.c A src/libmsc/msc_a_remote.c A src/libmsc/msc_ho.c A src/libmsc/msc_i.c A src/libmsc/msc_i_remote.c D src/libmsc/msc_ifaces.c D src/libmsc/msc_mgcp.c A src/libmsc/msc_net_init.c A src/libmsc/msc_t.c A src/libmsc/msc_t_remote.c M src/libmsc/msc_vty.c A src/libmsc/msub.c A src/libmsc/neighbor_ident.c A src/libmsc/neighbor_ident_vty.c D src/libmsc/osmo_msc.c A src/libmsc/paging.c M src/libmsc/ran_conn.c A src/libmsc/ran_infra.c A src/libmsc/ran_msg.c A src/libmsc/ran_msg_a.c A src/libmsc/ran_msg_iu.c A src/libmsc/ran_peer.c A src/libmsc/ran_up_l2.c M src/libmsc/rrlp.c A src/libmsc/rtp_stream.c A src/libmsc/sccp_ran.c M src/libmsc/sgs_iface.c M src/libmsc/sgs_server.c M src/libmsc/silent_call.c M src/libmsc/smpp_openbsc.c M src/libmsc/smpp_smsc.h M src/libmsc/sms_queue.c M src/libmsc/transaction.c M src/libvlr/vlr.c M src/libvlr/vlr_access_req_fsm.c M src/libvlr/vlr_lu_fsm.c M src/libvlr/vlr_sgs.c M src/libvlr/vlr_sgs_fsm.c M src/osmo-msc/Makefile.am M src/osmo-msc/msc_main.c M tests/Makefile.am M tests/msc_vlr/Makefile.am M tests/msc_vlr/msc_vlr_test_authen_reuse.c M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_test_gsm_authen.c M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.c M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.c M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.c M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.c M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.c M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_ss.c M tests/msc_vlr/msc_vlr_test_ss.err M tests/msc_vlr/msc_vlr_test_umts_authen.c M tests/msc_vlr/msc_vlr_test_umts_authen.err M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h M tests/sms_queue/Makefile.am A tests/test_neighbor_ident.vty M tests/test_nodes.vty 151 files changed, 35,670 insertions(+), 22,995 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/13137/20 -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 20 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 15:24:13 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 15:24:13 +0000 Subject: Change in osmo-remsim[master]: doc: REST API url is /banks, not /bankds Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13920 Change subject: doc: REST API url is /banks, not /bankds ...................................................................... doc: REST API url is /banks, not /bankds The documentation didn't agree with the code. Let's fix it Change-Id: I63771c7ecc975435b8b7415ffb5e0a51fb5acef0 Closes: OS#3963 --- M doc/manuals/chapters/remsim-server.adoc 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/20/13920/1 diff --git a/doc/manuals/chapters/remsim-server.adoc b/doc/manuals/chapters/remsim-server.adoc index e5ab58d..01d24b2 100644 --- a/doc/manuals/chapters/remsim-server.adoc +++ b/doc/manuals/chapters/remsim-server.adoc @@ -40,14 +40,14 @@ No other HTTP operation is implemented. -==== /api/backend/v1/bankds +==== /api/backend/v1/banks *GET* obtains a JSON list where each element represents one currently connected `osmo-remsim-bankd`. No other HTTP operation is implemented. -==== /api/backend/v1/bankds/:bank_id +==== /api/backend/v1/banks/:bank_id *GET* obtains a single JSON object representing one specific currently connected `osmo-remsim-bankd`. -- To view, visit https://gerrit.osmocom.org/13920 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I63771c7ecc975435b8b7415ffb5e0a51fb5acef0 Gerrit-Change-Number: 13920 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 15:24:13 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 15:24:13 +0000 Subject: Change in osmo-remsim[master]: bankd: Don't read CSV file until _after_ handling options Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13921 Change subject: bankd: Don't read CSV file until _after_ handling options ...................................................................... bankd: Don't read CSV file until _after_ handling options Otherwise "--help" won't work if the CSV cannot be found/read. Change-Id: I162c40e267ea64a52baf2b5c819d9d2658daf77d --- M src/bankd/bankd_main.c 1 file changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/21/13921/1 diff --git a/src/bankd/bankd_main.c b/src/bankd/bankd_main.c index 8ac5909..268794b 100644 --- a/src/bankd/bankd_main.c +++ b/src/bankd/bankd_main.c @@ -91,11 +91,7 @@ OSMO_STRLCPY_ARRAY(bankd->comp_id.sw_version, PACKAGE_VERSION); /* FIXME: other members of app_comp_id */ - /* Np lock or mutex required for the pcsc_slot_names list, as this is only - * read once during bankd initialization, when the worker threads haven't - * started yet */ INIT_LLIST_HEAD(&bankd->pcsc_slot_names); - OSMO_ASSERT(bankd_pcsc_read_slotnames(bankd, "bankd_pcsc_slots.csv") == 0); } /* create + start a new bankd_worker thread */ @@ -309,6 +305,11 @@ signal(SIGMAPDEL, handle_sig_mapdel); signal(SIGUSR1, handle_sig_usr1); + /* Np lock or mutex required for the pcsc_slot_names list, as this is only + * read once during bankd initialization, when the worker threads haven't + * started yet */ + OSMO_ASSERT(bankd_pcsc_read_slotnames(g_bankd, "bankd_pcsc_slots.csv") == 0); + /* Connection towards remsim-server */ rc = server_conn_fsm_alloc(g_bankd, srvc); if (rc < 0) { -- To view, visit https://gerrit.osmocom.org/13921 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I162c40e267ea64a52baf2b5c819d9d2658daf77d Gerrit-Change-Number: 13921 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 15:26:51 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 15:26:51 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13137 ) Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... Patch Set 20: (1 comment) https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c File src/libmsc/gsm_04_08.c: https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c at 156 PS9, Line 156: DEBUGP > And I would rather share the work load :P https://osmocom.org/issues/3988 -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 20 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 15:26:51 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 15:28:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 15:28:19 +0000 Subject: Change in osmo-remsim[master]: doc: REST API url is /banks, not /bankds In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13920 ) Change subject: doc: REST API url is /banks, not /bankds ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13920 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I63771c7ecc975435b8b7415ffb5e0a51fb5acef0 Gerrit-Change-Number: 13920 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 08 May 2019 15:28:19 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 15:28:20 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 15:28:20 +0000 Subject: Change in osmo-remsim[master]: doc: REST API url is /banks, not /bankds In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13920 ) Change subject: doc: REST API url is /banks, not /bankds ...................................................................... doc: REST API url is /banks, not /bankds The documentation didn't agree with the code. Let's fix it Change-Id: I63771c7ecc975435b8b7415ffb5e0a51fb5acef0 Closes: OS#3963 --- M doc/manuals/chapters/remsim-server.adoc 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/doc/manuals/chapters/remsim-server.adoc b/doc/manuals/chapters/remsim-server.adoc index e5ab58d..01d24b2 100644 --- a/doc/manuals/chapters/remsim-server.adoc +++ b/doc/manuals/chapters/remsim-server.adoc @@ -40,14 +40,14 @@ No other HTTP operation is implemented. -==== /api/backend/v1/bankds +==== /api/backend/v1/banks *GET* obtains a JSON list where each element represents one currently connected `osmo-remsim-bankd`. No other HTTP operation is implemented. -==== /api/backend/v1/bankds/:bank_id +==== /api/backend/v1/banks/:bank_id *GET* obtains a single JSON object representing one specific currently connected `osmo-remsim-bankd`. -- To view, visit https://gerrit.osmocom.org/13920 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I63771c7ecc975435b8b7415ffb5e0a51fb5acef0 Gerrit-Change-Number: 13920 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 15:28:29 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 15:28:29 +0000 Subject: Change in osmo-remsim[master]: bankd: Don't read CSV file until _after_ handling options In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13921 ) Change subject: bankd: Don't read CSV file until _after_ handling options ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13921 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I162c40e267ea64a52baf2b5c819d9d2658daf77d Gerrit-Change-Number: 13921 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 08 May 2019 15:28:29 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 15:28:30 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 15:28:30 +0000 Subject: Change in osmo-remsim[master]: bankd: Don't read CSV file until _after_ handling options In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13921 ) Change subject: bankd: Don't read CSV file until _after_ handling options ...................................................................... bankd: Don't read CSV file until _after_ handling options Otherwise "--help" won't work if the CSV cannot be found/read. Change-Id: I162c40e267ea64a52baf2b5c819d9d2658daf77d --- M src/bankd/bankd_main.c 1 file changed, 5 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/bankd/bankd_main.c b/src/bankd/bankd_main.c index 8ac5909..268794b 100644 --- a/src/bankd/bankd_main.c +++ b/src/bankd/bankd_main.c @@ -91,11 +91,7 @@ OSMO_STRLCPY_ARRAY(bankd->comp_id.sw_version, PACKAGE_VERSION); /* FIXME: other members of app_comp_id */ - /* Np lock or mutex required for the pcsc_slot_names list, as this is only - * read once during bankd initialization, when the worker threads haven't - * started yet */ INIT_LLIST_HEAD(&bankd->pcsc_slot_names); - OSMO_ASSERT(bankd_pcsc_read_slotnames(bankd, "bankd_pcsc_slots.csv") == 0); } /* create + start a new bankd_worker thread */ @@ -309,6 +305,11 @@ signal(SIGMAPDEL, handle_sig_mapdel); signal(SIGUSR1, handle_sig_usr1); + /* Np lock or mutex required for the pcsc_slot_names list, as this is only + * read once during bankd initialization, when the worker threads haven't + * started yet */ + OSMO_ASSERT(bankd_pcsc_read_slotnames(g_bankd, "bankd_pcsc_slots.csv") == 0); + /* Connection towards remsim-server */ rc = server_conn_fsm_alloc(g_bankd, srvc); if (rc < 0) { -- To view, visit https://gerrit.osmocom.org/13921 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I162c40e267ea64a52baf2b5c819d9d2658daf77d Gerrit-Change-Number: 13921 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 16:27:32 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 16:27:32 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Change osmo_mgcpc_ep_fsm name to avoid collision with old o... In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/13912 ) Change subject: mgcp-cli: Change osmo_mgcpc_ep_fsm name to avoid collision with old osmo-bsc ...................................................................... mgcp-cli: Change osmo_mgcpc_ep_fsm name to avoid collision with old osmo-bsc Recent commit moved mgw_endpoint_fsm from osmo-bsc.git here as osmo_mgcpc_ep_fsm. Some API name changes were applied to avoid collisions, but FSM was kept and it is registered during startup with __attribute__((constructor)). As a result, with old osmo-bsc (+tests) try to allocate its copy of mgw_endpoint_fsm, it fails because that name is already registered. Fixes: 538d2c53d90074267e7a70a90c773baa03d6ec04 Change-Id: I694ce58baa43f536b7e594b003edc891f029aa4a --- M src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c b/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c index 0e59f58..a9bab87 100644 --- a/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c +++ b/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c @@ -862,7 +862,7 @@ } static struct osmo_fsm osmo_mgcpc_ep_fsm = { - .name = "mgw-endpoint", + .name = "mgw-endp", .states = osmo_mgcpc_ep_fsm_states, .num_states = ARRAY_SIZE(osmo_mgcpc_ep_fsm_states), .log_subsys = DLMGCP, -- To view, visit https://gerrit.osmocom.org/13912 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I694ce58baa43f536b7e594b003edc891f029aa4a Gerrit-Change-Number: 13912 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 16:28:31 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 16:28:31 +0000 Subject: Change in libosmocore[master]: gsm0808_utils: Introduce gsm0808_msgb_put_cell_id_u() In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13887 ) Change subject: gsm0808_utils: Introduce gsm0808_msgb_put_cell_id_u() ...................................................................... Patch Set 1: Code-Review+2 Thanks for the explanation. -- To view, visit https://gerrit.osmocom.org/13887 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6cc567798e20365e6587e6b2988e834306d8c80c Gerrit-Change-Number: 13887 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 16:28:31 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 16:30:12 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 16:30:12 +0000 Subject: Change in osmo-hlr[master]: db_hlr.c: db_subscr_create(): nam_cs, nam_ps args In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13711 ) Change subject: db_hlr.c: db_subscr_create(): nam_cs, nam_ps args ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/13711/2/src/db.h File src/db.h: https://gerrit.osmocom.org/#/c/13711/2/src/db.h at 121 PS2, Line 121: int nam_cs, int nam_ps > Alternatively, we could have a bitmask here, so we would be able to extend it later on. [?] a bitmask makes a lot of sense. Possibly even some larger 'struct' that we can later extend with all the various supplementary service subscriptions or whatever else the subscriber might be created with. Please note this comment is *only* relevant to the internal subscriber API. we must not use a bitmask for e.g. the VTY command, as there are ever only going to be a CS and a PS domain, there are no other domains. Any other subscription informaiton (e.g. whether or not to permit 2g, 3g or 4G ran, whether to permit SMS, MO-Calls, etc. are orthogonal to the NAM which only exists for PS and CS. -- To view, visit https://gerrit.osmocom.org/13711 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1a6dd85387723dab5487c53b33d2d9ec6d05d006 Gerrit-Change-Number: 13711 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 08 May 2019 16:30:12 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 16:31:22 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 16:31:22 +0000 Subject: Change in libosmocore[master]: deal with rate_ctr_group_alloc() returning NULL In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13913 ) Change subject: deal with rate_ctr_group_alloc() returning NULL ...................................................................... Patch Set 3: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/13913/3/src/rate_ctr.c File src/rate_ctr.c: https://gerrit.osmocom.org/#/c/13913/3/src/rate_ctr.c at 72 PS3, Line 72: static struct osmo_timer_list rate_ctr_timer; This change is again not related? -- To view, visit https://gerrit.osmocom.org/13913 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc Gerrit-Change-Number: 13913 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Wed, 08 May 2019 16:31:22 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 16:31:50 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 16:31:50 +0000 Subject: Change in libosmocore[master]: Print error message if application fails to call rate_ctr_init() In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13919 ) Change subject: Print error message if application fails to call rate_ctr_init() ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/13919/1/src/rate_ctr.c File src/rate_ctr.c: https://gerrit.osmocom.org/#/c/13919/1/src/rate_ctr.c at 220 PS1, Line 220: if (!osmo_timer_pending(&rate_ctr_timer)) I think you ended up putting some stuff from this patch into the previous one. -- To view, visit https://gerrit.osmocom.org/13919 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie8093b66b7e27cf863d2558fe21b2c6e0f3fcdfd Gerrit-Change-Number: 13919 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 16:31:50 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 16:39:13 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 16:39:13 +0000 Subject: Change in osmo-mgw[master]: osmux: Document func and return different rc upon osmux init failure In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/13917 ) Change subject: osmux: Document func and return different rc upon osmux init failure ...................................................................... osmux: Document func and return different rc upon osmux init failure Change-Id: Id8593bc374b598e63a70c60ac256273b9d99ba6e --- M src/libosmo-mgcp/mgcp_protocol.c 1 file changed, 6 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index bfb88bc..3a4e396 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -671,12 +671,17 @@ rtp->codec->frame_duration_den; } +/*! Initializes osmux socket if not yet initialized. Parses Osmux CID from MGCP line. + * \param[in] endp Endpoint willing to initialize osmux + * \param[in] line Line X-Osmux from MGCP header msg to parse + * \returns OSMUX CID, -1 for wildcard, -2 on parse error, -3 on osmux initalize error + */ static int mgcp_osmux_setup(struct mgcp_endpoint *endp, const char *line) { if (!endp->cfg->osmux_init) { if (osmux_init(OSMUX_ROLE_BSC, endp->cfg) < 0) { LOGPENDP(endp, DLMGCP, LOGL_ERROR, "Cannot init OSMUX\n"); - return -1; + return -3; } LOGPENDP(endp, DLMGCP, LOGL_NOTICE, "OSMUX socket has been set up\n"); } -- To view, visit https://gerrit.osmocom.org/13917 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id8593bc374b598e63a70c60ac256273b9d99ba6e Gerrit-Change-Number: 13917 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 16:45:29 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 16:45:29 +0000 Subject: Change in osmo-bsc[pespin/release-1.4.1]: handover_fsm: copy old S15_S0 to new lchan In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13909 ) Change subject: handover_fsm: copy old S15_S0 to new lchan ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13909 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: pespin/release-1.4.1 Gerrit-MessageType: comment Gerrit-Change-Id: Ifd470397e99985394634da1bb13ccfc5041984d2 Gerrit-Change-Number: 13909 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 16:45:29 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 16:45:30 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 16:45:30 +0000 Subject: =?UTF-8?Q?Change_in_osmo-bsc=5Bpespin/release-1=2E4=2E1=5D=3A_Bump_version=3A_1=2E4=2E0=2E1-1f6930_=E2=86=92_1=2E4=2E1?= In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13910 ) Change subject: Bump version: 1.4.0.1-1f6930 ? 1.4.1 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13910 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: pespin/release-1.4.1 Gerrit-MessageType: comment Gerrit-Change-Id: Ifd7a99f994f494afe73adcffd9fa7cc626b5143e Gerrit-Change-Number: 13910 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 16:45:30 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 16:45:32 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 16:45:32 +0000 Subject: Change in osmo-bsc[pespin/release-1.4.1]: handover_fsm: copy old S15_S0 to new lchan In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/13909 ) Change subject: handover_fsm: copy old S15_S0 to new lchan ...................................................................... handover_fsm: copy old S15_S0 to new lchan When a new lchan is selected during handover, some of the properties of the old lchan are inherited by the new lchan. At the moment S15-S0 is not not inherited so that the value for those bits will always be 0x0000 for the new lchan. Since those bits also define the active set AMR codec the channel activation will fail because 0x0000 is invalid (active set with zero rates) Change-Id: Ifd470397e99985394634da1bb13ccfc5041984d2 Related: OS#3503 --- M src/osmo-bsc/handover_fsm.c M tests/handover/handover_test.c 2 files changed, 4 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Pau Espin Pedrol: Looks good to me, approved diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c index 35f2e55..68c3e4a 100644 --- a/src/osmo-bsc/handover_fsm.c +++ b/src/osmo-bsc/handover_fsm.c @@ -362,6 +362,7 @@ .msc_assigned_cic = conn->ho.inter_bsc_in.msc_assigned_cic, .re_use_mgw_endpoint_from_lchan = conn->lchan, .wait_before_switching_rtp = true, + .s15_s0 = conn->lchan->activate.info.s15_s0, }; lchan_activate(ho->new_lchan, &info); diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c index 6217ca3..cd3b749 100644 --- a/tests/handover/handover_test.c +++ b/tests/handover/handover_test.c @@ -276,9 +276,10 @@ lchan->tch_mode = GSM48_CMODE_SPEECH_V1; else if (!strcasecmp(codec, "EFR") && full_rate) lchan->tch_mode = GSM48_CMODE_SPEECH_EFR; - else if (!strcasecmp(codec, "AMR")) + else if (!strcasecmp(codec, "AMR")) { lchan->tch_mode = GSM48_CMODE_SPEECH_AMR; - else { + lchan->activate.info.s15_s0 = 0x0002; + } else { printf("Given codec unknown\n"); exit(EXIT_FAILURE); } -- To view, visit https://gerrit.osmocom.org/13909 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: pespin/release-1.4.1 Gerrit-MessageType: merged Gerrit-Change-Id: Ifd470397e99985394634da1bb13ccfc5041984d2 Gerrit-Change-Number: 13909 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 16:45:32 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 16:45:32 +0000 Subject: =?UTF-8?Q?Change_in_osmo-bsc=5Bpespin/release-1=2E4=2E1=5D=3A_Bump_version=3A_1=2E4=2E0=2E1-1f6930_=E2=86=92_1=2E4=2E1?= In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/13910 ) Change subject: Bump version: 1.4.0.1-1f6930 ? 1.4.1 ...................................................................... Bump version: 1.4.0.1-1f6930 ? 1.4.1 Change-Id: Ifd7a99f994f494afe73adcffd9fa7cc626b5143e --- M debian/changelog 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Pau Espin Pedrol: Looks good to me, approved diff --git a/debian/changelog b/debian/changelog index a4f4d40..22410f9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +osmo-bsc (1.4.1) unstable; urgency=medium + + [ Philipp Maier ] + * handover_fsm: copy old S15_S0 to new lchan + + -- Pau Espin Pedrol Wed, 08 May 2019 13:36:53 +0200 + osmo-bsc (1.4.0) unstable; urgency=medium [ Neels Hofmeyr ] -- To view, visit https://gerrit.osmocom.org/13910 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: pespin/release-1.4.1 Gerrit-MessageType: merged Gerrit-Change-Id: Ifd7a99f994f494afe73adcffd9fa7cc626b5143e Gerrit-Change-Number: 13910 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 17:05:22 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 17:05:22 +0000 Subject: Change in osmo-bsc[master]: vty: Add option to enable osmux towards MSC Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13922 Change subject: vty: Add option to enable osmux towards MSC ...................................................................... vty: Add option to enable osmux towards MSC Change-Id: I30c485c022f2d55e0a004f69b2503da7f91ecb74 --- M include/osmocom/bsc/Makefile.am M include/osmocom/bsc/bsc_msc_data.h A include/osmocom/bsc/osmux.h M src/osmo-bsc/osmo_bsc_vty.c 4 files changed, 36 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/22/13922/1 diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 89323c0..f44e7fc 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -41,6 +41,7 @@ osmo_bsc_rf.h \ osmo_bsc_sigtran.h \ bsc_msc_data.h \ + osmux.h \ paging.h \ pcu_if.h \ pcuif_proto.h \ diff --git a/include/osmocom/bsc/bsc_msc_data.h b/include/osmocom/bsc/bsc_msc_data.h index debd240..271bdd4 100644 --- a/include/osmocom/bsc/bsc_msc_data.h +++ b/include/osmocom/bsc/bsc_msc_data.h @@ -30,6 +30,7 @@ #include "debug.h" #include "osmo_bsc_lcls.h" +#include "osmux.h" #include #include @@ -129,6 +130,9 @@ uint32_t x_osmo_ign; bool x_osmo_ign_configured; + + /* Whether we want to use Osmux against this MSC. Controlled via VTY */ + enum osmux_usage use_osmux; }; /* diff --git a/include/osmocom/bsc/osmux.h b/include/osmocom/bsc/osmux.h new file mode 100644 index 0000000..aa3d1ab --- /dev/null +++ b/include/osmocom/bsc/osmux.h @@ -0,0 +1,7 @@ +#pragma once + +enum osmux_usage { + OSMUX_USAGE_OFF = 0, + OSMUX_USAGE_ON = 1, + OSMUX_USAGE_ONLY = 2, +}; diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c index 78196cf..4591ad1 100644 --- a/src/osmo-bsc/osmo_bsc_vty.c +++ b/src/osmo-bsc/osmo_bsc_vty.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -197,6 +198,11 @@ else vty_out(vty, " mgw x-osmo-ign call-id%s", VTY_NEWLINE); } + + if (msc->use_osmux != OSMUX_USAGE_OFF) { + vty_out(vty, " osmux %s%s", msc->use_osmux == OSMUX_USAGE_ON ? "on" : "only", + VTY_NEWLINE); + } } static int config_write_msc(struct vty *vty) @@ -708,6 +714,23 @@ return CMD_SUCCESS; } +#define OSMUX_STR "RTP multiplexing\n" +DEFUN(cfg_msc_osmux, + cfg_msc_osmux_cmd, + "osmux (on|off|only)", + OSMUX_STR "Enable OSMUX\n" "Disable OSMUX\n" "Only use OSMUX\n") +{ + struct bsc_msc_data *msc = bsc_msc_data(vty); + if (strcmp(argv[0], "off") == 0) + msc->use_osmux = OSMUX_USAGE_OFF; + else if (strcmp(argv[0], "on") == 0) + msc->use_osmux = OSMUX_USAGE_ON; + else if (strcmp(argv[0], "only") == 0) + msc->use_osmux = OSMUX_USAGE_ONLY; + + return CMD_SUCCESS; +} + DEFUN(cfg_net_bsc_mid_call_text, cfg_net_bsc_mid_call_text_cmd, "mid-call-text .TEXT", @@ -1045,6 +1068,7 @@ mgcp_client_vty_init(net, MSC_NODE, net->mgw.conf); install_element(MSC_NODE, &cfg_msc_mgw_x_osmo_ign_cmd); install_element(MSC_NODE, &cfg_msc_no_mgw_x_osmo_ign_cmd); + install_element(MSC_NODE, &cfg_msc_osmux_cmd); return 0; } -- To view, visit https://gerrit.osmocom.org/13922 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I30c485c022f2d55e0a004f69b2503da7f91ecb74 Gerrit-Change-Number: 13922 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 17:05:23 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 17:05:23 +0000 Subject: Change in osmo-bsc[master]: bssap: Detect MSC Osmux support on RESET (ACK) recv Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13923 Change subject: bssap: Detect MSC Osmux support on RESET (ACK) recv ...................................................................... bssap: Detect MSC Osmux support on RESET (ACK) recv Change-Id: I830e38cc1ffb8b6ebbe299567507160f19beb528 --- M include/osmocom/bsc/bsc_msc_data.h M src/osmo-bsc/osmo_bsc_bssap.c 2 files changed, 29 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/23/13923/1 diff --git a/include/osmocom/bsc/bsc_msc_data.h b/include/osmocom/bsc/bsc_msc_data.h index 271bdd4..4720845 100644 --- a/include/osmocom/bsc/bsc_msc_data.h +++ b/include/osmocom/bsc/bsc_msc_data.h @@ -133,6 +133,8 @@ /* Whether we want to use Osmux against this MSC. Controlled via VTY */ enum osmux_usage use_osmux; + /* Whether we detected the MSC supports Osmux (during BSSMAP_RESET) */ + bool remote_supports_osmux; }; /* diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index e79a344..014a9b8 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -51,6 +51,29 @@ * helpers for the assignment command */ +/* We expect MSC to provide use with an Osmocom extension TLV in BSSMAP_RESET to + * announce Osmux support */ +static void update_msc_osmux_support(struct bsc_msc_data *msc, + struct msgb *msg, unsigned int length) +{ + struct tlv_parsed tp; + int rc; + bool old_value = msc->remote_supports_osmux; + /*TODO tlv_parse, check for GSM0808_IE_OSMO_OSMUX_CID existance. If present, set */ + rc = tlv_parse(&tp, gsm0808_att_tlvdef(), msg->l4h + 1, length - 1, 0, 0); + if (rc < 0) + LOGP(DMSC, LOGL_NOTICE, "Failed parsing TLV looking for Osmux support\n"); + + if (TLVP_PRESENT(&tp, GSM0808_IE_OSMO_OSMUX_SUPPORT)) { + msc->remote_supports_osmux = true; + } else { + msc->remote_supports_osmux = false; + } + + if (old_value != msc->remote_supports_osmux) + LOGP(DMSC, LOGL_INFO, "MSC detected AoIP Osmux support changed: %d->%d\n", + old_value, msc->remote_supports_osmux); +} static int bssmap_handle_reset_ack(struct bsc_msc_data *msc, struct msgb *msg, unsigned int length) @@ -63,6 +86,8 @@ * that we have successfully received the reset-ack message */ a_reset_ack_confirm(msc); + update_msc_osmux_support(msc, msg, length); + return 0; } @@ -81,6 +106,8 @@ /* Drop all ongoing paging requests that this MSC has created on any BTS */ paging_flush_network(msc->network, msc); + update_msc_osmux_support(msc, msg, length); + /* Inform the MSC that we have received the reset request and * that we acted accordingly */ osmo_bsc_sigtran_tx_reset_ack(msc); -- To view, visit https://gerrit.osmocom.org/13923 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I830e38cc1ffb8b6ebbe299567507160f19beb528 Gerrit-Change-Number: 13923 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 17:05:23 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 17:05:23 +0000 Subject: Change in osmo-bsc[master]: bssap: Announce Osmux support on RESET (ACK) send Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13924 Change subject: bssap: Announce Osmux support on RESET (ACK) send ...................................................................... bssap: Announce Osmux support on RESET (ACK) send Change-Id: I6b5b475b6109a2882051445762e27046d015b770 --- M src/osmo-bsc/osmo_bsc_sigtran.c 1 file changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/24/13924/1 diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index f2a6d08..5d61c32 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -82,6 +82,14 @@ return -1; } +/* Patch regular BSSMAP RESET to add extra T to announce Osmux support (osmocom extension) */ +static void _gsm0808_extend_announce_osmux(struct msgb *msg) +{ + OSMO_ASSERT(msg->l3h[1] == msgb_l3len(msg) - 2); /*TL not in len */ + msgb_put_u8(msg, GSM0808_IE_OSMO_OSMUX_SUPPORT); + msg->l3h[1] = msgb_l3len(msg) - 2; +} + /* Send reset to MSC */ static void osmo_bsc_sigtran_tx_reset(const struct bsc_msc_data *msc) { @@ -92,6 +100,10 @@ OSMO_ASSERT(ss7); LOGP(DMSC, LOGL_NOTICE, "Sending RESET to MSC: %s\n", osmo_sccp_addr_name(ss7, &msc->a.msc_addr)); msg = gsm0808_create_reset(); + + if (msc->use_osmux != OSMUX_USAGE_OFF) + _gsm0808_extend_announce_osmux(msg); + osmo_sccp_tx_unitdata_msg(msc->a.sccp_user, &msc->a.bsc_addr, &msc->a.msc_addr, msg); } @@ -107,6 +119,10 @@ OSMO_ASSERT(ss7); LOGP(DMSC, LOGL_NOTICE, "Sending RESET ACK to MSC: %s\n", osmo_sccp_addr_name(ss7, &msc->a.msc_addr)); msg = gsm0808_create_reset_ack(); + + if (msc->use_osmux != OSMUX_USAGE_OFF) + _gsm0808_extend_announce_osmux(msg); + osmo_sccp_tx_unitdata_msg(msc->a.sccp_user, &msc->a.bsc_addr, &msc->a.msc_addr, msg); } -- To view, visit https://gerrit.osmocom.org/13924 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I6b5b475b6109a2882051445762e27046d015b770 Gerrit-Change-Number: 13924 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 17:05:24 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 17:05:24 +0000 Subject: Change in osmo-bsc[master]: bssap: Parse Osmux CID on ASSIG REQ recv Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13925 Change subject: bssap: Parse Osmux CID on ASSIG REQ recv ...................................................................... bssap: Parse Osmux CID on ASSIG REQ recv Change-Id: I86e7e13fc7921e3209fb764c0e7797e7ec09b79e --- M include/osmocom/bsc/gsm_data.h M src/osmo-bsc/osmo_bsc_bssap.c 2 files changed, 31 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/25/13925/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index dc686c3..68c95e1 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -33,6 +33,7 @@ #include #include #include +#include #define GSM_T3122_DEFAULT 10 @@ -120,6 +121,8 @@ char msc_rtp_addr[INET_ADDRSTRLEN]; uint16_t msc_rtp_port; + bool use_osmux; + uint8_t osmux_cid; /* Rate/codec setting in preference order (need at least 1 !) */ int n_ch_mode_rate; diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 014a9b8..9bbd5e4 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -780,6 +780,8 @@ struct tlv_parsed tp; uint16_t cic = 0; bool aoip = false; + bool use_osmux = false; + uint8_t osmux_cid = 0; struct sockaddr_storage rtp_addr; struct gsm0808_channel_type ct; uint8_t cause; @@ -857,6 +859,30 @@ goto reject; } + if (TLVP_PRESENT(&tp, GSM0808_IE_OSMO_OSMUX_CID)) { + if (conn->sccp.msc->use_osmux == OSMUX_USAGE_OFF) { + LOGP(DMSC, LOGL_ERROR, "MSC using Osmux but we have it disabled.\n"); + cause = GSM0808_CAUSE_INCORRECT_VALUE; + goto reject; + } + use_osmux = true; + rc = gsm0808_dec_osmux_cid(&osmux_cid, + TLVP_VAL(&tp, GSM0808_IE_OSMO_OSMUX_CID), + TLVP_LEN(&tp, GSM0808_IE_OSMO_OSMUX_CID)); + if (rc < 0) { + LOGP(DMSC, LOGL_ERROR, "Unable to decode Osmux CID.\n"); + cause = GSM0808_CAUSE_INCORRECT_VALUE; + goto reject; + } + } else { + if (conn->sccp.msc->use_osmux == OSMUX_USAGE_ONLY) { + LOGP(DMSC, LOGL_ERROR, "MSC not using Osmux but we are forced to use it.\n"); + cause = GSM0808_CAUSE_INCORRECT_VALUE; + goto reject; + } else if (conn->sccp.msc->use_osmux == OSMUX_USAGE_ON) + LOGP(DMSC, LOGL_NOTICE, "MSC not using Osmux but we have Osmux enabled.\n"); + } + /* Decode speech codec list. First set len = 0. */ conn->codec_list = (struct gsm0808_speech_codec_list){}; /* Check for speech codec list element */ @@ -882,6 +908,8 @@ req = (struct assignment_request){ .aoip = aoip, .msc_assigned_cic = cic, + .use_osmux = use_osmux, + .osmux_cid = osmux_cid, }; /* Match codec information from the assignment command against the -- To view, visit https://gerrit.osmocom.org/13925 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I86e7e13fc7921e3209fb764c0e7797e7ec09b79e Gerrit-Change-Number: 13925 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 17:05:24 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 17:05:24 +0000 Subject: Change in osmo-bsc[master]: Ask mgw to use osmux when requested by MSC Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13926 Change subject: Ask mgw to use osmux when requested by MSC ...................................................................... Ask mgw to use osmux when requested by MSC Change-Id: I4156a4e2fb7ce1b896779b50e4d3481281b43e55 --- M src/osmo-bsc/bsc_subscr_conn_fsm.c 1 file changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/26/13926/1 diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c index f944431..3fc9a5c 100644 --- a/src/osmo-bsc/bsc_subscr_conn_fsm.c +++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c @@ -460,11 +460,13 @@ struct osmo_mgcpc_ep *gscon_ensure_mgw_endpoint(struct gsm_subscriber_connection *conn, uint16_t msc_assigned_cic) { + const char* name; if (conn->user_plane.mgw_endpoint) return conn->user_plane.mgw_endpoint; if (gscon_is_sccplite(conn)) { /* derive endpoint name from CIC on A interface side */ + /* TODO: implement osmux for SCCPlite */ conn->user_plane.mgw_endpoint = osmo_mgcpc_ep_alloc(conn->fi, GSCON_EV_FORGET_MGW_ENDPOINT, conn->network->mgw.client, @@ -477,12 +479,16 @@ } else if (gscon_is_aoip(conn)) { /* use dynamic RTPBRIDGE endpoint allocation in MGW */ + //if (conn->assignment.req.use_osmux) + // name = mgcp_client_osmuxbridge_wildcard(conn->network->mgw.client); + //else + name = mgcp_client_rtpbridge_wildcard(conn->network->mgw.client); conn->user_plane.mgw_endpoint = osmo_mgcpc_ep_alloc(conn->fi, GSCON_EV_FORGET_MGW_ENDPOINT, conn->network->mgw.client, conn->network->mgw.tdefs, conn->fi->id, - "%s", mgcp_client_rtpbridge_wildcard(conn->network->mgw.client)); + "%s", name); } else { LOGPFSML(conn->fi, LOGL_ERROR, "Conn is neither SCCPlite nor AoIP!?\n"); return NULL; @@ -519,6 +525,8 @@ .port = port, .call_id = conn->sccp.conn_id, .ptime = 20, + .x_osmo_osmux_use = conn->assignment.req.use_osmux, + .x_osmo_osmux_cid = conn->assignment.req.osmux_cid, }; mgcp_pick_codec(&mgw_info, for_lchan, false); -- To view, visit https://gerrit.osmocom.org/13926 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I4156a4e2fb7ce1b896779b50e4d3481281b43e55 Gerrit-Change-Number: 13926 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 17:05:24 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 17:05:24 +0000 Subject: Change in osmo-bsc[master]: bssap: Feed Assign Complete with Osmux CID retrieved from MGW Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13927 Change subject: bssap: Feed Assign Complete with Osmux CID retrieved from MGW ...................................................................... bssap: Feed Assign Complete with Osmux CID retrieved from MGW Change-Id: I77dfdd965ae828c39a9818669177aefd22bc02f2 --- M src/osmo-bsc/assignment_fsm.c 1 file changed, 24 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/27/13927/1 diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c index 834b58b..aefa4af 100644 --- a/src/osmo-bsc/assignment_fsm.c +++ b/src/osmo-bsc/assignment_fsm.c @@ -128,6 +128,13 @@ } } +static void _gsm0808_ass_compl_extend_osmux(struct msgb *msg, uint8_t cid) +{ + OSMO_ASSERT(msg->l3h[1] == msgb_l3len(msg) - 2); /*TL not in len */ + msgb_tv_put(msg, GSM0808_IE_OSMO_OSMUX_CID, cid); + msg->l3h[1] = msgb_l3len(msg) - 2; +} + static void send_assignment_complete(struct gsm_subscriber_connection *conn) { int rc; @@ -135,6 +142,7 @@ struct gsm0808_speech_codec *sc_ptr = NULL; struct sockaddr_storage addr_local; struct sockaddr_storage *addr_local_p = NULL; + uint8_t osmux_cid = 0; int perm_spch = 0; uint8_t chosen_channel; struct msgb *resp; @@ -164,6 +172,15 @@ addr_local_p = &addr_local; } + if (gscon_is_aoip(conn) && conn->assignment.req.use_osmux) { + if (!osmo_mgcpc_ep_ci_get_crcx_info_to_osmux_cid(conn->user_plane.mgw_endpoint_ci_msc, + &osmux_cid)) { + assignment_fail(GSM0808_CAUSE_EQUIPMENT_FAILURE, + "Unable to compose Osmux CID of MGW -> MSC"); + return; + } + } + /* Only AoIP networks include a speech codec (choosen) in the * assignment complete message. */ if (gscon_is_aoip(conn)) { @@ -185,6 +202,10 @@ return; } + if (gscon_is_aoip(conn) && conn->assignment.requires_voice_stream && + conn->assignment.req.use_osmux) + _gsm0808_ass_compl_extend_osmux(resp, osmux_cid); + rc = gscon_sigtran_send(conn, resp); if (rc) { assignment_fail(GSM0808_CAUSE_EQUIPMENT_FAILURE, @@ -466,10 +487,11 @@ assignment_fsm_update_id(conn); LOG_ASSIGNMENT(conn, LOGL_INFO, "Starting Assignment: chan_mode=%s, chan_type=%s," - " aoip=%s MSC-rtp=%s:%u\n", + " aoip=%s MSC-rtp=%s:%u (osmux=%s)\n", gsm48_chan_mode_name(conn->lchan->ch_mode_rate.chan_mode), rate_names[conn->lchan->ch_mode_rate.chan_rate], - req->aoip ? "yes" : "no", req->msc_rtp_addr, req->msc_rtp_port); + req->aoip ? "yes" : "no", req->msc_rtp_addr, req->msc_rtp_port, + req->use_osmux ? "yes" : "no"); assignment_fsm_state_chg(ASSIGNMENT_ST_WAIT_LCHAN_ACTIVE); info = (struct lchan_activate_info){ -- To view, visit https://gerrit.osmocom.org/13927 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I77dfdd965ae828c39a9818669177aefd22bc02f2 Gerrit-Change-Number: 13927 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 17:05:24 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 17:05:24 +0000 Subject: Change in osmo-bsc[master]: TEST Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13928 Change subject: TEST ...................................................................... TEST Change-Id: I43f2d99a91563240e7dd9c02d3e97be68c7e82f6 --- M src/osmo-bsc/osmo_bsc_bssap.c 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/28/13928/1 diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 9bbd5e4..a43a7e9 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -883,6 +883,12 @@ LOGP(DMSC, LOGL_NOTICE, "MSC not using Osmux but we have Osmux enabled.\n"); } + /* HACK TO TEST OSMUX */ + //static int next_osmux_cid_test = 3; + //use_osmux = true; + //osmux_cid = next_osmux_cid_test; + //next_osmux_cid_test++; + /* Decode speech codec list. First set len = 0. */ conn->codec_list = (struct gsm0808_speech_codec_list){}; /* Check for speech codec list element */ -- To view, visit https://gerrit.osmocom.org/13928 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I43f2d99a91563240e7dd9c02d3e97be68c7e82f6 Gerrit-Change-Number: 13928 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 17:27:10 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 17:27:10 +0000 Subject: Change in libosmocore[master]: Print error message if application fails to call rate_ctr_init() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13919 ) Change subject: Print error message if application fails to call rate_ctr_init() ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/13919/1/src/rate_ctr.c File src/rate_ctr.c: https://gerrit.osmocom.org/#/c/13919/1/src/rate_ctr.c at 220 PS1, Line 220: if (!osmo_timer_pending(&rate_ctr_timer)) > I think you ended up putting some stuff from this patch into the previous one. no, the patch is "correct" in the sense that it does what it's supposed to do, IMHO ?1? -- To view, visit https://gerrit.osmocom.org/13919 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie8093b66b7e27cf863d2558fe21b2c6e0f3fcdfd Gerrit-Change-Number: 13919 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 17:27:10 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 17:47:37 2019 From: gerrit-no-reply at lists.osmocom.org (Keith Whyte) Date: Wed, 8 May 2019 17:47:37 +0000 Subject: Change in osmo-sgsn[master]: libgtp: don't call sgsn_pdp_ctx_free() w/o MM ctx Message-ID: Keith Whyte has uploaded this change for review. ( https://gerrit.osmocom.org/13929 Change subject: libgtp: don't call sgsn_pdp_ctx_free() w/o MM ctx ...................................................................... libgtp: don't call sgsn_pdp_ctx_free() w/o MM ctx On receipt of DELETE PDP CTX CONF, don't call sgsn_pdp_ctx_free() if we don't have an MM context. Change-Id: I184dcce27b26104c61d80b2d910388d5d3323def --- M src/gprs/sgsn_libgtp.c 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/29/13929/1 diff --git a/src/gprs/sgsn_libgtp.c b/src/gprs/sgsn_libgtp.c index a8a1502..582f420 100644 --- a/src/gprs/sgsn_libgtp.c +++ b/src/gprs/sgsn_libgtp.c @@ -565,14 +565,13 @@ /* Confirm deactivation of PDP context to MS */ rc = gsm48_tx_gsm_deact_pdp_acc(pctx); + sgsn_pdp_ctx_free(pctx); } else { LOGPDPCTXP(LOGL_NOTICE, pctx, "Not deactivating SNDCP layer since the MM context " "is not available\n"); } - sgsn_pdp_ctx_free(pctx); - return rc; } -- To view, visit https://gerrit.osmocom.org/13929 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I184dcce27b26104c61d80b2d910388d5d3323def Gerrit-Change-Number: 13929 Gerrit-PatchSet: 1 Gerrit-Owner: Keith Whyte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 17:50:56 2019 From: gerrit-no-reply at lists.osmocom.org (Keith Whyte) Date: Wed, 8 May 2019 17:50:56 +0000 Subject: Change in osmo-sgsn[master]: libgtp: don't call sgsn_pdp_ctx_free() w/o MM ctx In-Reply-To: References: Message-ID: Keith Whyte has posted comments on this change. ( https://gerrit.osmocom.org/13929 ) Change subject: libgtp: don't call sgsn_pdp_ctx_free() w/o MM ctx ...................................................................... Patch Set 1: Code-Review-1 see OS#3956 I don't know if this would deal with the issue, or if there's a reason to call sgsn_pdp_ctx_free() anyway, even if !pctx->mm There's also a talloc_free(pdp) in sgsn_pdp_ctx_free() and I'm not sure if skipping that is a leak. -- To view, visit https://gerrit.osmocom.org/13929 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I184dcce27b26104c61d80b2d910388d5d3323def Gerrit-Change-Number: 13929 Gerrit-PatchSet: 1 Gerrit-Owner: Keith Whyte Gerrit-Reviewer: Keith Whyte Gerrit-Reviewer: lynxis lazus Gerrit-CC: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 08 May 2019 17:50:56 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 17:58:05 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 8 May 2019 17:58:05 +0000 Subject: Change in openbsc[master]: nat: Allocate bsc_nat_parsed on the stack instead of heap In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13843 to look at the new patch set (#4). Change subject: nat: Allocate bsc_nat_parsed on the stack instead of heap ...................................................................... nat: Allocate bsc_nat_parsed on the stack instead of heap There's no real need to allocate it using talloc. Allocating it on the stack simplifies the code, avoids mem leaks and makes it faster. Change-Id: I66c44890952339f15131081e2f629a2824b6d3ba --- M openbsc/include/openbsc/bsc_nat.h M openbsc/src/osmo-bsc_nat/bsc_filter.c M openbsc/src/osmo-bsc_nat/bsc_nat.c M openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c M openbsc/src/osmo-bsc_nat/bsc_ussd.c M openbsc/tests/bsc-nat/bsc_nat_test.c 6 files changed, 134 insertions(+), 172 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/43/13843/4 -- To view, visit https://gerrit.osmocom.org/13843 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I66c44890952339f15131081e2f629a2824b6d3ba Gerrit-Change-Number: 13843 Gerrit-PatchSet: 4 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 18:20:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 18:20:19 +0000 Subject: Change in osmo-sgsn[master]: libgtp: don't call sgsn_pdp_ctx_free() w/o MM ctx In-Reply-To: References: Message-ID: Harald Welte has uploaded a new patch set (#2) to the change originally created by Keith Whyte. ( https://gerrit.osmocom.org/13929 ) Change subject: libgtp: don't call sgsn_pdp_ctx_free() w/o MM ctx ...................................................................... libgtp: don't call sgsn_pdp_ctx_free() w/o MM ctx On receipt of DELETE PDP CTX CONF, don't call sgsn_pdp_ctx_free() if we don't have an MM context. Related: OS#3956 Change-Id: I184dcce27b26104c61d80b2d910388d5d3323def --- M src/gprs/sgsn_libgtp.c 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/29/13929/2 -- To view, visit https://gerrit.osmocom.org/13929 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I184dcce27b26104c61d80b2d910388d5d3323def Gerrit-Change-Number: 13929 Gerrit-PatchSet: 2 Gerrit-Owner: Keith Whyte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Keith Whyte Gerrit-Reviewer: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 18:43:13 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 18:43:13 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13137 ) Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... Patch Set 20: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 20 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 18:43:13 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 19:17:15 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 19:17:15 +0000 Subject: Change in osmo-msc[master]: large refactoring: support inter-BSC and inter-MSC Handover In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/13137 ) Change subject: large refactoring: support inter-BSC and inter-MSC Handover ...................................................................... large refactoring: support inter-BSC and inter-MSC Handover 3GPP TS 49.008 '4.3 Roles of MSC-A, MSC-I and MSC-T' defines distinct roles: - MSC-A is responsible for managing subscribers, - MSC-I is the gateway to the RAN. - MSC-T is a second transitory gateway to another RAN during Handover. After inter-MSC Handover, the MSC-I is handled by a remote MSC instance, while the original MSC-A retains the responsibility of subscriber management. MSC-T exists in this patch but is not yet used, since Handover is only prepared for, not yet implemented. Facilitate Inter-MSC and inter-BSC Handover by the same internal split of MSC roles. Compared to inter-MSC Handover, mere inter-BSC has the obvious simplifications: - all of MSC-A, MSC-I and MSC-T roles will be served by the same osmo-msc instance, - messages between MSC-A and MSC-{I,T} don't need to be routed via E-interface (GSUP), - no call routing between MSC-A and -I via MNCC necessary. This is the largest code bomb I have submitted, ever. Out of principle, I apologize to everyone trying to read this as a whole. Unfortunately, I see no sense in trying to split this patch into smaller bits. It would be a huge amount of work to introduce these changes in separate chunks, especially if each should in turn be useful and pass all test suites. So, unfortunately, we are stuck with this code bomb. The following are some details and rationale for this rather huge refactoring: * separate MSC subscriber management from ran_conn struct ran_conn is reduced from the pivotal subscriber management entity it has been so far to a mere storage for an SCCP connection ID and an MSC subscriber reference. The new pivotal subscriber management entity is struct msc_a -- struct msub lists the msc_a, msc_i, msc_t roles, the vast majority of code paths however use msc_a, since MSC-A is where all the interesting stuff happens. Before handover, msc_i is an FSM implementation that encodes to the local ran_conn. After inter-MSC Handover, msc_i is a compatible but different FSM implementation that instead forwards via/from GSUP. Same goes for the msc_a struct: if osmo-msc is the MSC-I "RAN proxy" for a remote MSC-A role, the msc_a->fi is an FSM implementation that merely forwards via/from GSUP. * New SCCP implementation for RAN access To be able to forward BSSAP and RANAP messages via the GSUP interface, the individual message layers need to be cleanly separated. The IuCS implementation used until now (iu_client from libosmo-ranap) did not provide this level of separation, and needed a complete rewrite. It was trivial to implement this in such a way that both BSSAP and RANAP can be handled by the same SCCP code, hence the new SCCP-RAN layer also replaces BSSAP handling. sccp_ran.h: struct sccp_ran_inst provides an abstract handler for incoming RAN connections. A set of callback functions provides implementation specific details. * RAN Abstraction (BSSAP vs. RANAP) The common SCCP implementation did set the theme for the remaining refactoring: make all other MSC code paths entirely RAN-implementation-agnostic. ran_infra.c provides data structures that list RAN implementation specifics, from logging to RAN de-/encoding to SCCP callbacks and timers. A ran_infra pointer hence allows complete abstraction of RAN implementations: - managing connected RAN peers (BSC, RNC) in ran_peer.c, - classifying and de-/encoding RAN PDUs, - recording connected LACs and cell IDs and sending out Paging requests to matching RAN peers. * RAN RESET now also for RANAP ran_peer.c absorbs the reset_fsm from a_reset.c; in consequence, RANAP also supports proper RESET semantics now. Hence osmo-hnbgw now also needs to provide proper RESET handling, which it so far duly ignores. (TODO) * RAN de-/encoding abstraction The RAN abstraction mentioned above serves not only to separate RANAP and BSSAP implementations transparently, but also to be able to optionally handle RAN on distinct levels. Before Handover, all RAN messages are handled by the MSC-A role. However, after an inter-MSC Handover, a standalone MSC-I will need to decode RAN PDUs, at least in order to manage Assignment of RTP streams between BSS/RNC and MNCC call forwarding. ran_msg.h provides a common API with abstraction for: - receiving events from RAN, i.e. passing RAN decode from the BSC/RNC and MS/UE: struct ran_dec_msg represents RAN messages decoded from either BSSMAP or RANAP; - sending RAN events: ran_enc_msg is the counterpart to compose RAN messages that should be encoded to either BSSMAP or RANAP and passed down to the BSC/RNC and MS/UE. The RAN-specific implementations are completely contained by ran_msg_a.c and ran_msg_iu.c. In particular, Assignment and Ciphering have so far been distinct code paths for BSSAP and RANAP, with switch(via_ran){...} statements all over the place. Using RAN_DEC_* and RAN_ENC_* abstractions, these are now completely unified. Note that SGs does not qualify for RAN abstraction: the SGs interface always remains with the MSC-A role, and SGs messages follow quite distinct semantics from the fairly similar GERAN and UTRAN. * MGW and RTP stream management So far, managing MGW endpoints via MGCP was tightly glued in-between GSM-04.08-CC on the one and MNCC on the other side. Prepare for switching RTP streams between different RAN peers by moving to object-oriented implementations: implement struct call_leg and struct rtp_stream with distinct FSMs each. For MGW communication, use the osmo_mgcpc_ep API that has originated from osmo-bsc and recently moved to libosmo-mgcp-client for this purpose. Instead of implementing a sequence of events with code duplication for the RAN and CN sides, the idea is to manage each RTP stream separately by firing and receiving events as soon as codecs and RTP ports are negotiated, and letting the individual FSMs take care of the MGW management "asynchronously". The caller provides event IDs and an FSM instance that should be notified of RTP stream setup progress. Hence it becomes possible to reconnect RTP streams from one GSM-04.08-CC to another (inter-BSC Handover) or between CC and MNCC RTP peers (inter-MSC Handover) without duplicating the MGCP code for each transition. The number of FSM implementations used for MGCP handling may seem a bit of an overkill. But in fact, the number of perspectives on RTP forwarding are far from trivial: - an MGW endpoint is an entity with N connections, and MGCP "sessions" for configuring them by talking to the MGW; - an RTP stream is a remote peer connected to one of the endpoint's connections, which is asynchronously notified of codec and RTP port choices; - a call leg is the higher level view on either an MT or MO side of a voice call, a combination of two RTP streams to forward between two remote peers. BSC MGW PBX CI CI [MGW-endpoint] [--rtp_stream--] [--rtp_stream--] [----------------call_leg----------------] * Use counts Introduce using the new osmo_use_count API added to libosmocore for this purpose. Each use token has a distinct name in the logging, which can be a globally constant name or ad-hoc, like the local __func__ string constant. Use in the new struct msc_a, as well as change vlr_subscr to the new osmo_use_count API. * FSM Timeouts Introduce using the new osmo_tdef API, which provides a common VTY implementation for all timer numbers, and FSM state transitions with the correct timeout. Originated in osmo-bsc, recently moved to libosmocore. Depends: Ife31e6798b4e728a23913179e346552a7dd338c0 (libosmocore) Ib9af67b100c4583342a2103669732dab2e577b04 (libosmocore) Id617265337f09dfb6ddfe111ef5e578cd3dc9f63 (libosmocore) Ie9e2add7bbfae651c04e230d62e37cebeb91b0f5 (libosmo-sccp) I26be5c4b06a680f25f19797407ab56a5a4880ddc (osmo-mgw) Ida0e59f9a1f2dd18efea0a51680a67b69f141efa (osmo-mgw) I9a3effd38e72841529df6c135c077116981dea36 (osmo-mgw) Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd --- M configure.ac M doc/Makefile.am A doc/sequence_charts/Makefile.am A doc/sequence_charts/inter_bsc_ho.msc A doc/sequence_charts/inter_msc_ho.msc A doc/sequence_charts/mncc_fsm.msc M include/osmocom/msc/Makefile.am D include/osmocom/msc/a_iface.h D include/osmocom/msc/a_iface_bssap.h D include/osmocom/msc/a_reset.h A include/osmocom/msc/call_leg.h A include/osmocom/msc/cell_id_list.h A include/osmocom/msc/e_link.h M include/osmocom/msc/gsm_04_08.h M include/osmocom/msc/gsm_04_11.h M include/osmocom/msc/gsm_04_11_gsup.h M include/osmocom/msc/gsm_04_14.h M include/osmocom/msc/gsm_04_80.h M include/osmocom/msc/gsm_09_11.h M include/osmocom/msc/gsm_data.h M include/osmocom/msc/gsm_data_shared.h M include/osmocom/msc/gsm_subscriber.h A include/osmocom/msc/gsup_client_mux.h D include/osmocom/msc/iu_dummy.h D include/osmocom/msc/iucs.h D include/osmocom/msc/iucs_ranap.h M include/osmocom/msc/mncc.h A include/osmocom/msc/mncc_call.h A include/osmocom/msc/msc_a.h A include/osmocom/msc/msc_a_remote.h M include/osmocom/msc/msc_common.h A include/osmocom/msc/msc_ho.h A include/osmocom/msc/msc_i.h A include/osmocom/msc/msc_i_remote.h D include/osmocom/msc/msc_ifaces.h D include/osmocom/msc/msc_mgcp.h A include/osmocom/msc/msc_roles.h A include/osmocom/msc/msc_t.h A include/osmocom/msc/msc_t_remote.h A include/osmocom/msc/msub.h A include/osmocom/msc/neighbor_ident.h A include/osmocom/msc/paging.h M include/osmocom/msc/ran_conn.h A include/osmocom/msc/ran_infra.h A include/osmocom/msc/ran_msg.h A include/osmocom/msc/ran_msg_a.h A include/osmocom/msc/ran_msg_iu.h A include/osmocom/msc/ran_peer.h A include/osmocom/msc/rtp_stream.h A include/osmocom/msc/sccp_ran.h M include/osmocom/msc/sgs_iface.h M include/osmocom/msc/signal.h M include/osmocom/msc/silent_call.h M include/osmocom/msc/sms_queue.h M include/osmocom/msc/transaction.h M include/osmocom/msc/vlr.h M include/osmocom/msc/vlr_sgs.h M src/libmsc/Makefile.am D src/libmsc/a_iface.c D src/libmsc/a_iface_bssap.c D src/libmsc/a_reset.c A src/libmsc/call_leg.c A src/libmsc/cell_id_list.c A src/libmsc/e_link.c M src/libmsc/gsm_04_08.c M src/libmsc/gsm_04_08_cc.c M src/libmsc/gsm_04_11.c M src/libmsc/gsm_04_11_gsup.c M src/libmsc/gsm_04_14.c M src/libmsc/gsm_04_80.c M src/libmsc/gsm_09_11.c D src/libmsc/gsm_subscriber.c A src/libmsc/gsup_client_mux.c D src/libmsc/iu_dummy.c D src/libmsc/iucs.c D src/libmsc/iucs_ranap.c M src/libmsc/mncc.c M src/libmsc/mncc_builtin.c A src/libmsc/mncc_call.c M src/libmsc/mncc_sock.c A src/libmsc/msc_a.c A src/libmsc/msc_a_remote.c A src/libmsc/msc_ho.c A src/libmsc/msc_i.c A src/libmsc/msc_i_remote.c D src/libmsc/msc_ifaces.c D src/libmsc/msc_mgcp.c A src/libmsc/msc_net_init.c A src/libmsc/msc_t.c A src/libmsc/msc_t_remote.c M src/libmsc/msc_vty.c A src/libmsc/msub.c A src/libmsc/neighbor_ident.c A src/libmsc/neighbor_ident_vty.c D src/libmsc/osmo_msc.c A src/libmsc/paging.c M src/libmsc/ran_conn.c A src/libmsc/ran_infra.c A src/libmsc/ran_msg.c A src/libmsc/ran_msg_a.c A src/libmsc/ran_msg_iu.c A src/libmsc/ran_peer.c A src/libmsc/ran_up_l2.c M src/libmsc/rrlp.c A src/libmsc/rtp_stream.c A src/libmsc/sccp_ran.c M src/libmsc/sgs_iface.c M src/libmsc/sgs_server.c M src/libmsc/silent_call.c M src/libmsc/smpp_openbsc.c M src/libmsc/smpp_smsc.h M src/libmsc/sms_queue.c M src/libmsc/transaction.c M src/libvlr/vlr.c M src/libvlr/vlr_access_req_fsm.c M src/libvlr/vlr_lu_fsm.c M src/libvlr/vlr_sgs.c M src/libvlr/vlr_sgs_fsm.c M src/osmo-msc/Makefile.am M src/osmo-msc/msc_main.c M tests/Makefile.am M tests/msc_vlr/Makefile.am M tests/msc_vlr/msc_vlr_test_authen_reuse.c M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_test_gsm_authen.c M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.c M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.c M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.c M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.c M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.c M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_ss.c M tests/msc_vlr/msc_vlr_test_ss.err M tests/msc_vlr/msc_vlr_test_umts_authen.c M tests/msc_vlr/msc_vlr_test_umts_authen.err M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h M tests/sms_queue/Makefile.am A tests/test_neighbor_ident.vty M tests/test_nodes.vty 151 files changed, 35,670 insertions(+), 22,995 deletions(-) Approvals: Jenkins Builder: Verified Neels Hofmeyr: Looks good to me, approved -- To view, visit https://gerrit.osmocom.org/13137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd Gerrit-Change-Number: 13137 Gerrit-PatchSet: 20 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 19:17:16 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 19:17:16 +0000 Subject: Change in osmo-msc[master]: GSUP: include terminating nul in inter-MSC source/destination name In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/13612 ) Change subject: GSUP: include terminating nul in inter-MSC source/destination name ...................................................................... GSUP: include terminating nul in inter-MSC source/destination name Before, I was testing with osmo-hlr patch I01a45900e14d41bcd338f50ad85d9fabf2c61405 applied, but that patch is currently in an abandoned state. This is the counterpart implemented in osmo-msc: always include the terminating nul char in the "blob" that is the MSC IPA name. The dualities in the formats of routing between MSCs is whether to handle it as a char*, or as a uint8_t* with explicit len (a blob). In the VTY config to indicate target MSCs for inter-MSC handover, we have strings. We currently even completely lack a way of configuring any blob-like data as a VTY config item. In osmo-hlr, the IPA names used for routing are currently received as a char* which *includes* the terminating nul char. So in osmo-msc, if we also always include the nul char, it works. Instead, we could just send the char* part without the nul char, and apply above mentioned osmo-hlr patch. That patch would magically match a name that lacks a nul with a name that includes one. I think it is better to agree on one format on the GSUP wire now, instead of making assumptions in osmo-hlr on the format of the source/target names for routing. This format, from the way GSUP so far transmits the IPA SERNO tag when a client attaches to osmo-hlr, happens to include the terminating nul char. Change-Id: I9ca8c9eef104519ed1ea46e2fef46dcdc0d554eb --- M src/libmsc/e_link.c 1 file changed, 14 insertions(+), 7 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libmsc/e_link.c b/src/libmsc/e_link.c index 685ca7c..0a2be79 100644 --- a/src/libmsc/e_link.c +++ b/src/libmsc/e_link.c @@ -68,6 +68,7 @@ { struct e_link *e; struct msc_role_common *c = msc_role->priv; + size_t use_len; /* use msub as talloc parent, so we can move an e_link from msc_t to msc_i when it is established. */ e = talloc_zero(c->msub, struct e_link); @@ -76,13 +77,19 @@ e->gcm = gcm; - /* Expecting all code paths to print the remote name according to remote_name_len. To be paranoid, place a nul - * character after the end. */ - e->remote_name = talloc_size(e, remote_name_len + 1); + /* FIXME: this is a braindamaged duality of char* and blob, which we can't seem to get rid of easily. + * See also osmo-hlr change I01a45900e14d41bcd338f50ad85d9fabf2c61405 which resolved this on the + * osmo-hlr side, but was abandoned. Not sure which way is the right solution. */ + /* To be able to include a terminating NUL character when sending the IPA name, append one if there is none yet. + * Current osmo-hlr needs the terminating NUL to be included. */ + use_len = remote_name_len; + if (remote_name[use_len-1] != '\0') + use_len++; + e->remote_name = talloc_size(e, use_len); OSMO_ASSERT(e->remote_name); memcpy(e->remote_name, remote_name, remote_name_len); - e->remote_name[remote_name_len] = '\0'; - e->remote_name_len = remote_name_len; + e->remote_name[use_len-1] = '\0'; + e->remote_name_len = use_len; e_link_assign(e, msc_role); return e; @@ -123,9 +130,9 @@ *gsup_msg = (struct osmo_gsup_message){ .message_class = OSMO_GSUP_MESSAGE_CLASS_INTER_MSC, .source_name = (const uint8_t*)local_msc_name, - .source_name_len = strlen(local_msc_name), + .source_name_len = strlen(local_msc_name)+1, /* include terminating nul */ .destination_name = (const uint8_t*)e->remote_name, - .destination_name_len = e->remote_name_len, + .destination_name_len = e->remote_name_len, /* the nul here is also included, from e_link_alloc() */ }; if (vsub) -- To view, visit https://gerrit.osmocom.org/13612 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I9ca8c9eef104519ed1ea46e2fef46dcdc0d554eb Gerrit-Change-Number: 13612 Gerrit-PatchSet: 10 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 19:17:16 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 19:17:16 +0000 Subject: Change in osmo-msc[master]: rename bscconfig.h to config.h, cleanup In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/13138 ) Change subject: rename bscconfig.h to config.h, cleanup ...................................................................... rename bscconfig.h to config.h, cleanup Get rid of the legacy name bscconfig.h from osmo-nitb times. Remove the #include from some of the files that aren't actually using it. Instead of '#include "../../config.h"', use plain '#include "config.h"' because we're anyway passing $top_srcdir as -I during compilation. Change-Id: Id4f683be1f36f0630c83da54e02868aae847aeec --- M .gitignore M configure.ac M src/libmsc/gsm_04_08.c M src/libmsc/gsm_04_08_cc.c M src/libmsc/gsm_04_11.c M src/libmsc/gsm_04_14.c M src/libmsc/msc_net_init.c M src/libmsc/msc_vty.c M src/libmsc/ran_infra.c M src/osmo-msc/msc_main.c 10 files changed, 9 insertions(+), 13 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved diff --git a/.gitignore b/.gitignore index 78974d7..bcd6847 100644 --- a/.gitignore +++ b/.gitignore @@ -5,8 +5,8 @@ .deps Makefile Makefile.in -bscconfig.h -bscconfig.h.in +config.h +config.h.in *.pc *.*~ diff --git a/configure.ac b/configure.ac index ae6dd6a..36ff99e 100644 --- a/configure.ac +++ b/configure.ac @@ -237,7 +237,7 @@ AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"]) dnl Generate the output -AM_CONFIG_HEADER(bscconfig.h) +AM_CONFIG_HEADER(config.h) AC_OUTPUT( include/Makefile diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 667a1c6..79488cd 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -32,7 +32,7 @@ #include #include -#include "bscconfig.h" +#include "config.h" #include #include diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c index aa97649..0624d56 100644 --- a/src/libmsc/gsm_04_08_cc.c +++ b/src/libmsc/gsm_04_08_cc.c @@ -30,8 +30,6 @@ #include #include -#include "bscconfig.h" - #include #include #include diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c index 60cdaee..ff5576f 100644 --- a/src/libmsc/gsm_04_11.c +++ b/src/libmsc/gsm_04_11.c @@ -33,7 +33,7 @@ #include #include -#include "bscconfig.h" +#include "config.h" #include #include diff --git a/src/libmsc/gsm_04_14.c b/src/libmsc/gsm_04_14.c index 044b61c..8116558 100644 --- a/src/libmsc/gsm_04_14.c +++ b/src/libmsc/gsm_04_14.c @@ -24,8 +24,6 @@ #include #include -#include "bscconfig.h" - #include #include #include diff --git a/src/libmsc/msc_net_init.c b/src/libmsc/msc_net_init.c index 51e8595..637ee74 100644 --- a/src/libmsc/msc_net_init.c +++ b/src/libmsc/msc_net_init.c @@ -21,7 +21,7 @@ * */ -#include "bscconfig.h" +#include "config.h" #include diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index bb36392..a3237cd 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -23,7 +23,7 @@ /* NOTE: I would have liked to call this the MSC_NODE instead of the MSC_NODE, * but MSC_NODE already exists to configure a remote MSC for osmo-bsc. */ -#include "../../bscconfig.h" +#include "config.h" #include #include diff --git a/src/libmsc/ran_infra.c b/src/libmsc/ran_infra.c index a3a7457..af40541 100644 --- a/src/libmsc/ran_infra.c +++ b/src/libmsc/ran_infra.c @@ -31,7 +31,7 @@ #include -#include "bscconfig.h" +#include "config.h" const struct value_string an_proto_names[] = { { OSMO_GSUP_ACCESS_NETWORK_PROTOCOL_TS3G_48006, "Ts3G-48006" }, diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c index 857a6a6..e101d89 100644 --- a/src/osmo-msc/msc_main.c +++ b/src/osmo-msc/msc_main.c @@ -36,7 +36,7 @@ #include /* build switches from the configure script */ -#include "../../bscconfig.h" +#include "config.h" #include #include -- To view, visit https://gerrit.osmocom.org/13138 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id4f683be1f36f0630c83da54e02868aae847aeec Gerrit-Change-Number: 13138 Gerrit-PatchSet: 16 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Max -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 19:23:47 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 19:23:47 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: add inter-BSC and inter-MSC Handover tests In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13617 ) Change subject: msc: add inter-BSC and inter-MSC Handover tests ...................................................................... Patch Set 5: This change is ready for review. -- To view, visit https://gerrit.osmocom.org/13617 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I7d76c982ad4e198534fa488609c41e8892b268ab Gerrit-Change-Number: 13617 Gerrit-PatchSet: 5 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Comment-Date: Wed, 08 May 2019 19:23:47 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 21:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 21:49:56 +0000 Subject: Change in osmo-msc[master]: smpp: Make libsmpp34 use talloc for its allocations In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Pau Espin Pedrol, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13562 to look at the new patch set (#5). Change subject: smpp: Make libsmpp34 use talloc for its allocations ...................................................................... smpp: Make libsmpp34 use talloc for its allocations We are just introducing smpp34_set_memory_functions() in libsmpp34 to allow applications like OsmoMSC to provide their own heap allocator callback functions. Let's used this to integrate with talloc and hence allow talloc tracking/debugging for libsmpp34 internal allocations. Depends: libsmpp34 Change-Id I3656117115e89638c093bfbcbc4369ce302f7a94 Change-Id: Ie2725ffab6a225813e65768735f01678e2022128 Related: OS#3913 --- M src/libmsc/smpp_openbsc.c 1 file changed, 27 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/62/13562/5 -- To view, visit https://gerrit.osmocom.org/13562 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie2725ffab6a225813e65768735f01678e2022128 Gerrit-Change-Number: 13562 Gerrit-PatchSet: 5 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 21:57:42 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 21:57:42 +0000 Subject: Change in osmo-msc[master]: SMPP: Don't accept password or system-id exceeding spec length Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13930 Change subject: SMPP: Don't accept password or system-id exceeding spec length ...................................................................... SMPP: Don't accept password or system-id exceeding spec length The SMPP 3.4 specification defines the password field as a "Variable-length octet string with maximum length of 9", and according to table 3-1 this means including the terminating NUL-byte. However, OsmoMSC allows to configure longer passwords in the ESME configuration. Those passwords will then never match, as libsmpp34 performs length validation and generates a parser error for anyone trying to send a longer password via SMPP. The same applies for system-id, where we have to permit only 15 characters with zero termination, but not 16 characters. Change-Id: I81ef593e84bf1e15f6746386fc145495fae29354 Closes: OS#3166 --- M src/libmsc/smpp_smsc.h 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/30/13930/1 diff --git a/src/libmsc/smpp_smsc.h b/src/libmsc/smpp_smsc.h index 1c9eae6..b26d011 100644 --- a/src/libmsc/smpp_smsc.h +++ b/src/libmsc/smpp_smsc.h @@ -13,8 +13,8 @@ #include #include -#define SMPP_SYS_ID_LEN 16 -#define SMPP_PASSWD_LEN 16 +#define SMPP_SYS_ID_LEN 15 +#define SMPP_PASSWD_LEN 8 #define MODE_7BIT 7 #define MODE_8BIT 8 -- To view, visit https://gerrit.osmocom.org/13930 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I81ef593e84bf1e15f6746386fc145495fae29354 Gerrit-Change-Number: 13930 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 22:08:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 22:08:53 +0000 Subject: Change in libosmocore[master]: deal with rate_ctr_group_alloc() returning NULL In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Vadim Yanitskiy, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13913 to look at the new patch set (#4). Change subject: deal with rate_ctr_group_alloc() returning NULL ...................................................................... deal with rate_ctr_group_alloc() returning NULL Change-Id: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc Related: #3701 --- M src/gb/gprs_bssgp.c M src/gb/gprs_ns.c 2 files changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/13/13913/4 -- To view, visit https://gerrit.osmocom.org/13913 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc Gerrit-Change-Number: 13913 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 22:08:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 22:08:53 +0000 Subject: Change in libosmocore[master]: Print error message if application fails to call rate_ctr_init() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13919 to look at the new patch set (#2). Change subject: Print error message if application fails to call rate_ctr_init() ...................................................................... Print error message if application fails to call rate_ctr_init() Change-Id: Ie8093b66b7e27cf863d2558fe21b2c6e0f3fcdfd Closes: OS#3580 --- M src/rate_ctr.c 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/19/13919/2 -- To view, visit https://gerrit.osmocom.org/13919 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie8093b66b7e27cf863d2558fe21b2c6e0f3fcdfd Gerrit-Change-Number: 13919 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 22:12:00 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 22:12:00 +0000 Subject: Change in libosmocore[master]: Fix osmo_quote_str_c() for strings larger than 32 bytes In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Jenkins Builder, Mykola Shchetinin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13901 to look at the new patch set (#5). Change subject: Fix osmo_quote_str_c() for strings larger than 32 bytes ...................................................................... Fix osmo_quote_str_c() for strings larger than 32 bytes As Neels pointed out, we shouldn't pass a constant value of 32 to osmo_quote_str_buf2(). Change-Id: Id9bde14166d6674ce4dda36fa9f4ae9217ce5cc2 --- M src/utils.c 1 file changed, 13 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/01/13901/5 -- To view, visit https://gerrit.osmocom.org/13901 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id9bde14166d6674ce4dda36fa9f4ae9217ce5cc2 Gerrit-Change-Number: 13901 Gerrit-PatchSet: 5 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Mykola Shchetinin Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 22:12:28 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 22:12:28 +0000 Subject: Change in libosmocore[master]: Fix osmo_quote_str_c() for strings larger than 32 bytes In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13901 ) Change subject: Fix osmo_quote_str_c() for strings larger than 32 bytes ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/13901/2/src/utils.c File src/utils.c: https://gerrit.osmocom.org/#/c/13901/2/src/utils.c at 816 PS2, Line 816: size_t len = in_len == -1 ? strlen(str) : in_len; > You are still missing len +=3 afterwards. [?] Done -- To view, visit https://gerrit.osmocom.org/13901 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id9bde14166d6674ce4dda36fa9f4ae9217ce5cc2 Gerrit-Change-Number: 13901 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Mykola Shchetinin Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 22:12:28 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 22:13:49 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 22:13:49 +0000 Subject: Change in osmo-msc[master]: smpp: Make libsmpp34 use talloc for its allocations In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13562 ) Change subject: smpp: Make libsmpp34 use talloc for its allocations ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13562 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie2725ffab6a225813e65768735f01678e2022128 Gerrit-Change-Number: 13562 Gerrit-PatchSet: 5 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Wed, 08 May 2019 22:13:49 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 22:13:51 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 22:13:51 +0000 Subject: Change in osmo-msc[master]: smpp: Make libsmpp34 use talloc for its allocations In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13562 ) Change subject: smpp: Make libsmpp34 use talloc for its allocations ...................................................................... smpp: Make libsmpp34 use talloc for its allocations We are just introducing smpp34_set_memory_functions() in libsmpp34 to allow applications like OsmoMSC to provide their own heap allocator callback functions. Let's used this to integrate with talloc and hence allow talloc tracking/debugging for libsmpp34 internal allocations. Depends: libsmpp34 Change-Id I3656117115e89638c093bfbcbc4369ce302f7a94 Change-Id: Ie2725ffab6a225813e65768735f01678e2022128 Related: OS#3913 --- M src/libmsc/smpp_openbsc.c 1 file changed, 27 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libmsc/smpp_openbsc.c b/src/libmsc/smpp_openbsc.c index e6eb010..bbfc500 100644 --- a/src/libmsc/smpp_openbsc.c +++ b/src/libmsc/smpp_openbsc.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -52,6 +53,31 @@ #define VSUB_USE_SMPP "SMPP" #define VSUB_USE_SMPP_CMD "SMPP-cmd" +/* talloc integration for libsmpp34 */ + +static struct smsc *g_smsc; + +static void *smpp34_talloc_malloc(size_t sz) +{ + return talloc_size(g_smsc, sz); +} + +static void *smpp34_talloc_realloc(void *ptr, size_t sz) +{ + return talloc_realloc_size(g_smsc, ptr, sz); +} + +static void smpp34_talloc_free(void *ptr) +{ + talloc_free(ptr); +} + +static const struct smpp34_memory_functions smpp34_talloc = { + .malloc_fun = smpp34_talloc_malloc, + .realloc_fun = smpp34_talloc_realloc, + .free_fun = smpp34_talloc_free, +}; + /*! \brief find vlr_subscr for a given SMPP NPI/TON/Address */ static struct vlr_subscr *subscr_by_dst(struct gsm_network *net, uint8_t npi, uint8_t ton, @@ -790,6 +816,7 @@ LOGP(DSMPP, LOGL_FATAL, "Cannot allocate smsc struct\n"); return -1; } + smpp34_set_memory_functions(&smpp34_talloc); return smpp_vty_init(); } -- To view, visit https://gerrit.osmocom.org/13562 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie2725ffab6a225813e65768735f01678e2022128 Gerrit-Change-Number: 13562 Gerrit-PatchSet: 5 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 22:15:27 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 22:15:27 +0000 Subject: Change in osmo-mgw[master]: handle NULL return of rate_ctr_group_alloc() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13914 ) Change subject: handle NULL return of rate_ctr_group_alloc() ...................................................................... handle NULL return of rate_ctr_group_alloc() Change-Id: Ieadded9c088ef8f86164400a60ce542e3c868e9d Related: OS#3701 --- M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_protocol.c 2 files changed, 24 insertions(+), 4 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index af5426f..5300351 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -81,7 +81,7 @@ } /* Initialize rtp connection struct with default values */ -static void mgcp_rtp_conn_init(struct mgcp_conn_rtp *conn_rtp, struct mgcp_conn *conn) +static int mgcp_rtp_conn_init(struct mgcp_conn_rtp *conn_rtp, struct mgcp_conn *conn) { struct mgcp_rtp_end *end = &conn_rtp->end; /* FIXME: Each new rate counter group requires an unique index. At the @@ -109,12 +109,17 @@ end->maximum_packet_time = -1; conn_rtp->rate_ctr_group = rate_ctr_group_alloc(conn, &rate_ctr_group_desc, rate_ctr_index); + if (!conn_rtp->rate_ctr_group) + return -1; + conn_rtp->state.in_stream.err_ts_ctr = &conn_rtp->rate_ctr_group->ctr[IN_STREAM_ERR_TSTMP_CTR]; conn_rtp->state.out_stream.err_ts_ctr = &conn_rtp->rate_ctr_group->ctr[OUT_STREAM_ERR_TSTMP_CTR]; rate_ctr_index++; /* Make sure codec table is reset */ mgcp_codec_reset_all(conn_rtp); + + return 0; } /* Cleanup rtp connection struct */ @@ -175,7 +180,10 @@ switch (type) { case MGCP_CONN_TYPE_RTP: - mgcp_rtp_conn_init(&conn->u.rtp, conn); + if (mgcp_rtp_conn_init(&conn->u.rtp, conn) < 0) { + talloc_free(conn); + return NULL; + } break; default: /* NOTE: This should never be called with an diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 3a4e396..807e34a 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -1496,7 +1496,7 @@ return 0; } -static void alloc_mgcp_rate_counters(struct mgcp_trunk_config *trunk, void *ctx) +static int alloc_mgcp_rate_counters(struct mgcp_trunk_config *trunk, void *ctx) { /* FIXME: Each new rate counter group requires a unique index. At the * moment we generate an index using a counter, but perhaps there is @@ -1508,25 +1508,34 @@ if (trunk->mgcp_crcx_ctr_group == NULL) { trunk->mgcp_crcx_ctr_group = rate_ctr_group_alloc(ctx, &mgcp_crcx_ctr_group_desc, crcx_rate_ctr_index); + if (!trunk->mgcp_crcx_ctr_group) + return -1; talloc_set_destructor(trunk->mgcp_crcx_ctr_group, free_rate_counter_group); crcx_rate_ctr_index++; } if (trunk->mgcp_mdcx_ctr_group == NULL) { trunk->mgcp_mdcx_ctr_group = rate_ctr_group_alloc(ctx, &mgcp_mdcx_ctr_group_desc, mdcx_rate_ctr_index); + if (!trunk->mgcp_mdcx_ctr_group) + return -1; talloc_set_destructor(trunk->mgcp_mdcx_ctr_group, free_rate_counter_group); mdcx_rate_ctr_index++; } if (trunk->mgcp_dlcx_ctr_group == NULL) { trunk->mgcp_dlcx_ctr_group = rate_ctr_group_alloc(ctx, &mgcp_dlcx_ctr_group_desc, dlcx_rate_ctr_index); + if (!trunk->mgcp_dlcx_ctr_group) + return -1; talloc_set_destructor(trunk->mgcp_dlcx_ctr_group, free_rate_counter_group); dlcx_rate_ctr_index++; } if (trunk->all_rtp_conn_stats == NULL) { trunk->all_rtp_conn_stats = rate_ctr_group_alloc(ctx, &all_rtp_conn_rate_ctr_group_desc, all_rtp_conn_rate_ctr_index); + if (!trunk->all_rtp_conn_stats) + return -1; talloc_set_destructor(trunk->all_rtp_conn_stats, free_rate_counter_group); all_rtp_conn_rate_ctr_index++; } + return 0; } /*! allocate configuration with default values. @@ -1566,7 +1575,10 @@ cfg->trunk.audio_send_name = 1; cfg->trunk.omit_rtcp = 0; mgcp_trunk_set_keepalive(&cfg->trunk, MGCP_KEEPALIVE_ONCE); - alloc_mgcp_rate_counters(&cfg->trunk, cfg); + if (alloc_mgcp_rate_counters(&cfg->trunk, cfg) < 0) { + talloc_free(cfg); + return NULL; + } INIT_LLIST_HEAD(&cfg->trunks); -- To view, visit https://gerrit.osmocom.org/13914 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ieadded9c088ef8f86164400a60ce542e3c868e9d Gerrit-Change-Number: 13914 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 22:15:27 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 22:15:27 +0000 Subject: Change in osmo-mgw[master]: update .gitignore In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13915 ) Change subject: update .gitignore ...................................................................... update .gitignore * remove tons of old cruft from openbsc.git that doesn't exist here * actually add the osmo-mgw binary and .la file that we're building Change-Id: Ic0e27c05e3ab368c195f9f9961fa70feb077a5e0 --- M .gitignore 1 file changed, 2 insertions(+), 35 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/.gitignore b/.gitignore index 1084181..900c09c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,20 +2,13 @@ *.o *.lo *.a +*.la .deps Makefile Makefile.in bscconfig.h bscconfig.h.in -openbsc.pc -src/osmo-nitb/osmo-nitb -src/osmo-bsc_mgcp/osmo-bsc_mgcp -src/osmo-bsc/osmo-bsc -src/utils/meas_vis -src/utils/meas_json -src/utils/osmo-meas-pcap2db -src/utils/osmo-meas-udp2db -src/utils/smpp_mirror +src/osmo-mgw/osmo-mgw *.*~ *.sw? .libs @@ -46,32 +39,9 @@ .version -# apps and app data -hlr.sqlite3 -src/utils/bs11_config -src/ipaccess/ipaccess-config -src/ipaccess/abisip-find -src/ipaccess/ipaccess-firmware -src/ipaccess/ipaccess-proxy -src/utils/isdnsync -src/nat/bsc_nat -src/gprs/osmo-sgsn -src/gprs/osmo-gbproxy -src/gprs/osmo-gtphub -src/osmo-bsc_nat/osmo-bsc_nat -src/libcommon/gsup_test_client -src/osmo-msc/osmo-msc - #tests tests/testsuite.dir tests/*/*_test -# ignore compiled binaries like msc_vlr_test_foo; do not ignore -# msc_vlr_test_foo.{c,ok,err}, but do still ignore the corresponding .o object -# files: -tests/msc_vlr/msc_vlr_test_* -!tests/msc_vlr/msc_vlr_test_*.* -tests/msc_vlr/msc_vlr_test_*.o - tests/atconfig tests/atlocal @@ -79,10 +49,7 @@ tests/testsuite tests/testsuite.log -gsn_restart -src/openbsc.cfg* writtenconfig/ -gtphub_restart_count # manuals doc/manuals/*.html -- To view, visit https://gerrit.osmocom.org/13915 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ic0e27c05e3ab368c195f9f9961fa70feb077a5e0 Gerrit-Change-Number: 13915 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 22:17:14 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 22:17:14 +0000 Subject: Change in osmo-bts[master]: handle NULL return from rate_ctr_group_alloc() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13911 ) Change subject: handle NULL return from rate_ctr_group_alloc() ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/13911/1/src/common/bts.c File src/common/bts.c: https://gerrit.osmocom.org/#/c/13911/1/src/common/bts.c at 126 PS1, Line 126: llist_del(&bts->list); > What about moving llist_add_tail to the end and then dropping this llist_del together with the one i [?] I'm aware of that option. However, in these kind of "trivial bug fix" changes, I try to avoid being too smart and go for the most straight-forward solution. -- To view, visit https://gerrit.osmocom.org/13911 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2170e400e47369e9171af4c7361aa2177fea1174 Gerrit-Change-Number: 13911 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 22:17:14 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 22:17:15 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 22:17:15 +0000 Subject: Change in osmo-bts[master]: handle NULL return from rate_ctr_group_alloc() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13911 ) Change subject: handle NULL return from rate_ctr_group_alloc() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13911 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2170e400e47369e9171af4c7361aa2177fea1174 Gerrit-Change-Number: 13911 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 22:17:15 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 22:17:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 22:17:19 +0000 Subject: Change in osmo-bts[master]: handle NULL return from rate_ctr_group_alloc() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13911 ) Change subject: handle NULL return from rate_ctr_group_alloc() ...................................................................... handle NULL return from rate_ctr_group_alloc() Change-Id: I2170e400e47369e9171af4c7361aa2177fea1174 Related: OS#3701 --- M src/common/bts.c 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/bts.c b/src/common/bts.c index 8c2b2fe..5851e9b 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -122,6 +122,10 @@ bts->agch_queue.length = 0; bts->ctrs = rate_ctr_group_alloc(bts, &bts_ctrg_desc, bts->nr); + if (!bts->ctrs) { + llist_del(&bts->list); + return -1; + } /* enable management with default levels, * raise threshold to GSM_BTS_AGCH_QUEUE_THRESH_LEVEL_DISABLE to -- To view, visit https://gerrit.osmocom.org/13911 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I2170e400e47369e9171af4c7361aa2177fea1174 Gerrit-Change-Number: 13911 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 22:18:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 22:18:09 +0000 Subject: Change in libosmocore[master]: deal with rate_ctr_group_alloc() returning NULL In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13913 ) Change subject: deal with rate_ctr_group_alloc() returning NULL ...................................................................... Patch Set 5: Verified+1 -- To view, visit https://gerrit.osmocom.org/13913 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc Gerrit-Change-Number: 13913 Gerrit-PatchSet: 5 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Wed, 08 May 2019 22:18:09 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 22:18:24 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 22:18:24 +0000 Subject: Change in libosmocore[master]: deal with rate_ctr_group_alloc() returning NULL In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13913 ) Change subject: deal with rate_ctr_group_alloc() returning NULL ...................................................................... Patch Set 6: Verified+1 -- To view, visit https://gerrit.osmocom.org/13913 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc Gerrit-Change-Number: 13913 Gerrit-PatchSet: 6 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Wed, 08 May 2019 22:18:24 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 22:18:25 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 8 May 2019 22:18:25 +0000 Subject: Change in libosmocore[master]: deal with rate_ctr_group_alloc() returning NULL In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13913 ) Change subject: deal with rate_ctr_group_alloc() returning NULL ...................................................................... deal with rate_ctr_group_alloc() returning NULL Change-Id: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc Related: #3701 --- M src/gb/gprs_bssgp.c M src/gb/gprs_ns.c 2 files changed, 8 insertions(+), 0 deletions(-) Approvals: Harald Welte: Verified Vadim Yanitskiy: Looks good to me, approved diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c index 550757f..b695c28 100644 --- a/src/gb/gprs_bssgp.c +++ b/src/gb/gprs_bssgp.c @@ -128,6 +128,10 @@ ctx->nsei = nsei; /* FIXME: BVCI is not unique, only BVCI+NSEI ?!? */ ctx->ctrg = rate_ctr_group_alloc(ctx, &bssgp_ctrg_desc, bvci); + if (!ctx->ctrg) { + talloc_free(ctx); + return NULL; + } ctx->fc = talloc_zero(ctx, struct bssgp_flow_control); /* cofigure for 2Mbit, 30 packets in queue */ bssgp_fc_init(ctx->fc, 100000, 2*1024*1024/8, 30, &_bssgp_tx_dl_ud); diff --git a/src/gb/gprs_ns.c b/src/gb/gprs_ns.c index d72003e..3679a5b 100644 --- a/src/gb/gprs_ns.c +++ b/src/gb/gprs_ns.c @@ -333,6 +333,10 @@ nsvc->nsi = nsi; osmo_timer_setup(&nsvc->timer, gprs_ns_timer_cb, nsvc); nsvc->ctrg = rate_ctr_group_alloc(nsvc, &nsvc_ctrg_desc, nsvci); + if (!nsvc->ctrg) { + talloc_free(nsvc); + return NULL; + } nsvc->statg = osmo_stat_item_group_alloc(nsvc, &nsvc_statg_desc, nsvci); nsvc->sig_weight = sig_weight; nsvc->data_weight = data_weight; -- To view, visit https://gerrit.osmocom.org/13913 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I47d6623b9eca704e3c2537cfb5799a4c0749a7bc Gerrit-Change-Number: 13913 Gerrit-PatchSet: 6 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 22:49:22 2019 From: gerrit-no-reply at lists.osmocom.org (Mykola Shchetinin) Date: Wed, 8 May 2019 22:49:22 +0000 Subject: Change in libosmocore[master]: Fix osmo_quote_str_c() for strings larger than 32 bytes In-Reply-To: References: Message-ID: Mykola Shchetinin has posted comments on this change. ( https://gerrit.osmocom.org/13901 ) Change subject: Fix osmo_quote_str_c() for strings larger than 32 bytes ...................................................................... Patch Set 5: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13901 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id9bde14166d6674ce4dda36fa9f4ae9217ce5cc2 Gerrit-Change-Number: 13901 Gerrit-PatchSet: 5 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Mykola Shchetinin Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 08 May 2019 22:49:22 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 22:53:43 2019 From: gerrit-no-reply at lists.osmocom.org (Keith Whyte) Date: Wed, 8 May 2019 22:53:43 +0000 Subject: Change in libosmocore[master]: Add expect script: 'vty' for easy access to all vtys In-Reply-To: References: Message-ID: Keith Whyte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13756 ) Change subject: Add expect script: 'vty' for easy access to all vtys ...................................................................... Add expect script: 'vty' for easy access to all vtys This expect script can be run as: ./vty bsc ./vty msc ./vty sip ... etc (no need to remember ports) Change-Id: Ice4532be7cb3139da29cb9d84dd4769e8d826dfa --- A contrib/vty 1 file changed, 87 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, but someone else must approve Daniel Willmann: Looks good to me, approved Pau Espin Pedrol: Looks good to me, but someone else must approve Mykola Shchetinin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/contrib/vty b/contrib/vty new file mode 100755 index 0000000..14c4336 --- /dev/null +++ b/contrib/vty @@ -0,0 +1,87 @@ +#!/usr/bin/expect -f + +# This expect script can be run as: +# ./vty bsc +# ./vty msc +# ./vty sip ... etc +# (no need to remember ports) +# +# One can edit the script itself to configure the preferred +# logging configuration for each component. +# +# The last command to be issued will be logging filter all 1 +# This allows for easy recall and issuing of +# 'logging filter all 0' to disable logging. +# As an alternative one call call this script as +# ./vty bsc 0 to disable logging on startup via the filter. +# +# Requires expect, available on most distributions. + +set host localhost +set vty [lindex $argv 0] +set lf [lindex $argv 1] +if { $lf < 0 } { set lf 1 } +set host localhost + +switch $vty { + hlr { set port 4258 } ; # Short names + bsc { set port 4242 } + mgw { set port 4243 } + mgw2 { + set host 127.0.0.2 + set port 4243 + } + sg { set port 4245 } + msc { set port 4254 } + sip { set port 4256 } + gg { set port 4260 } + ggsn { set port 4260 } + hnbgw { set port 4261 } + + osmo-hlr { set port 4258 } ; # Same but with full names of osmo-daemons: + osmo-bsc { set port 4242 } + osmo-mgw { set port 4243 } + osmo-mgw-for-bsc { set port 4243 } + osmo-mgw-for-msc { + set host 127.0.0.2 + set port 4243 + } + osmo-sgsn { set port 4245 } + osmo-msc { set port 4254 } + osmo-sip-connector { set port 4256 } + osmo-ggsn { set port 4260 } + osmo-hnbgw { set port 4262 } + default { set port 4242 } ; # Default to osmo-bsc / osmo-nitb +} + +spawn -noecho telnet localhost $port +expect ">" +send "enable\r" +expect "#" +send "logging enable\r" +expect "#" +send "logging print category 1\r" +expect "#" +send "logging print category-hex 0\r" +expect "#" +send "logging print level 1\r" +expect "#" +send "logging print file basename last\r" +expect "#" +send "logging print extended-timestamp 1\r" +expect "#" +send "logging level set-all notice\r" +expect "#" + +# Customise logging configuration per daemon here: +switch $vty { + msc { + send "logging level mm info\r" + expect "#" + send "logging level cc info\r" + expect "#" + } +} +send "logging filter all $lf\r" +expect "#" +interact -- To view, visit https://gerrit.osmocom.org/13756 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ice4532be7cb3139da29cb9d84dd4769e8d826dfa Gerrit-Change-Number: 13756 Gerrit-PatchSet: 2 Gerrit-Owner: Keith Whyte Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Keith Whyte Gerrit-Reviewer: Mykola Shchetinin Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 22:55:48 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 22:55:48 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: add inter-BSC and inter-MSC Handover tests In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13617 to look at the new patch set (#6). Change subject: msc: add inter-BSC and inter-MSC Handover tests ...................................................................... msc: add inter-BSC and inter-MSC Handover tests Change-Id: I7d76c982ad4e198534fa488609c41e8892b268ab --- M library/BSSMAP_Templates.ttcn M library/GSUP_Types.ttcn M library/L3_Templates.ttcn M library/RAN_Emulation.ttcnpp M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn 6 files changed, 1,016 insertions(+), 93 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/17/13617/6 -- To view, visit https://gerrit.osmocom.org/13617 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I7d76c982ad4e198534fa488609c41e8892b268ab Gerrit-Change-Number: 13617 Gerrit-PatchSet: 6 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 22:58:17 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 22:58:17 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: add inter-BSC and inter-MSC Handover tests In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13617 ) Change subject: msc: add inter-BSC and inter-MSC Handover tests ...................................................................... Patch Set 6: Code-Review+2 These tests are far from complete, and also not really satisfactory. I am nevertheless merging them now, in order to have *some* indication of whether inter-BSC and inter-MSC handover is still working. -- To view, visit https://gerrit.osmocom.org/13617 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I7d76c982ad4e198534fa488609c41e8892b268ab Gerrit-Change-Number: 13617 Gerrit-PatchSet: 6 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Comment-Date: Wed, 08 May 2019 22:58:17 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 23:00:54 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 23:00:54 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: add inter-BSC and inter-MSC Handover tests In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/13617 ) Change subject: msc: add inter-BSC and inter-MSC Handover tests ...................................................................... msc: add inter-BSC and inter-MSC Handover tests Change-Id: I7d76c982ad4e198534fa488609c41e8892b268ab --- M library/BSSMAP_Templates.ttcn M library/GSUP_Types.ttcn M library/L3_Templates.ttcn M library/RAN_Emulation.ttcnpp M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn 6 files changed, 1,016 insertions(+), 93 deletions(-) Approvals: Jenkins Builder: Verified Neels Hofmeyr: Looks good to me, approved diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index 4df39d4..b7230cd 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -307,7 +307,7 @@ } } -template BSSMAP_IE_CellIdentifierList ts_BSSMAP_IE_CidList(BSSMAP_FIELD_CellIdentificationList cid_list) := { +template BSSMAP_IE_CellIdentifierList ts_BSSMAP_IE_CidList(template BSSMAP_FIELD_CellIdentificationList cid_list) := { elementIdentifier := '1A'O, lengthIndicator := 0, /* overwritten */ cellIdentifierDiscriminator := '0000'B, /* overwritten */ @@ -315,31 +315,6 @@ cellIdentificationList := cid_list } -template PDU_BSSAP ts_BSSMAP_HandoReq(BssmapCause cause, BSSMAP_FIELD_CellIdentificationList cid_list) -modifies ts_BSSAP_BSSMAP := { - pdu := { - bssmap := { - handoverRequired := { - messageType := '11'O, - cause := ts_BSSMAP_IE_Cause(cause), - responseRequest := omit, - cellIdentifierList := ts_BSSMAP_IE_CidList(cid_list), - circuitPoolList := omit, - currentChannelType1 := omit, - speechVersion := omit, - queueingIndicator := omit, - oldToNewBSSInfo := omit, - sourceToTargetRNCTransparentInfo := omit, - sourceToTargetRNCTransparentInfoCDMA := omit, - gERANClassmark := omit, - talkerPriority := omit, - speechCodec := omit, - cSG_Identifier := omit - } - } - } -} - const OCT1 ChRate_ANY := '00'O; const OCT1 ChRate_TCHF := '08'O; const OCT1 ChRate_TCHH := '09'O; @@ -703,6 +678,33 @@ } } +template PDU_BSSAP ts_BSSMAP_HandoverRequired(BssmapCause cause, + template BSSMAP_FIELD_CellIdentificationList cid_list) +modifies ts_BSSAP_BSSMAP := { + pdu := { + bssmap := { + handoverRequired := { + messageType := '11'O, + cause := ts_BSSMAP_IE_Cause(cause), + responseRequest := omit, + cellIdentifierList := ts_BSSMAP_IE_CidList(cid_list), + circuitPoolList := omit, + currentChannelType1 := omit, + speechVersion := omit, + queueingIndicator := omit, + oldToNewBSSInfo := omit, + sourceToTargetRNCTransparentInfo := omit, + sourceToTargetRNCTransparentInfoCDMA := omit, + gERANClassmark := omit, + talkerPriority := omit, + speechCodec := omit, + cSG_Identifier := omit + } + } + } +} + + template PDU_BSSAP tr_BSSMAP_HandoverRequired modifies tr_BSSAP_BSSMAP := { pdu := { bssmap := { @@ -713,6 +715,38 @@ } } +template PDU_BSSAP tr_BSSMAP_HandoverRequiredReject modifies tr_BSSAP_BSSMAP := { + pdu := { + bssmap := { + handoverRequiredReject := { + messageType := '1A'O + } + } + } +} + +template PDU_BSSAP tr_BSSMAP_HandoverCommand +modifies tr_BSSAP_BSSMAP := { + pdu := { + bssmap := { + handoverCommand := { + messageType := '13'O + } + } + } +} + +template PDU_BSSAP tr_BSSMAP_HandoverSucceeded +modifies tr_BSSAP_BSSMAP := { + pdu := { + bssmap := { + handoverSucceeded := { + messageType := '15'O + } + } + } +} + template (value) PDU_BSSAP ts_BSSMAP_HandoverCommand(octetstring layer3info) modifies ts_BSSAP_BSSMAP := { pdu := { @@ -751,6 +785,16 @@ } } +template PDU_BSSAP tr_BSSMAP_HandoverRequest modifies tr_BSSAP_BSSMAP := { + pdu := { + bssmap := { + handoverRequest := { + messageType := '10'O + } + } + } +} + template PDU_BSSAP ts_BSSMAP_HandoverRequest( template BSSMAP_IE_CircuitIdentityCode cic := omit, template BSSMAP_IE_AoIP_TransportLayerAddress aoip_tla := omit, @@ -826,6 +870,41 @@ } } +template PDU_BSSAP ts_BSSMAP_HandoverRequestAcknowledge( + template octetstring layer3info, + template LIN1 layer3infoLength, + template BSSMAP_IE_AoIP_TransportLayerAddress aoIPTransportLayer := omit, + template BSSMAP_IE_SpeechCodec speechCodec := omit, + template BSSMAP_IE_ChosenChannel chosenChannel := omit, + template BSSMAP_IE_ChosenEncryptionAlgorithm chosenEncryptionAlgorithm := omit) +modifies ts_BSSAP_BSSMAP := { + pdu := { + bssmap := { + handoverRequestAck := { + messageType := '12'O, + layer3Information := { + elementIdentifier := '17'O, + lengthIndicator := layer3infoLength, + layer3info := layer3info + }, + chosenChannel := chosenChannel, + chosenEncryptionAlgorithm := chosenEncryptionAlgorithm, + circuitPool := omit, + speechVersion := omit, + circuitIdentityCode := omit, + lSAIdentifier := omit, + newBSSToOldBSSInfo := omit, + interSystemInformation := omit, + talkerPriority := omit, + aoIPTransportLayer := aoIPTransportLayer, + codecList := omit, + speechCodec := speechCodec, + lCLS_bSS_Status := omit + } + } + } +} + template PDU_BSSAP tr_BSSMAP_HandoverDetect modifies tr_BSSAP_BSSMAP := { pdu := { @@ -838,6 +917,18 @@ } } +template PDU_BSSAP ts_BSSMAP_HandoverDetect +modifies ts_BSSAP_BSSMAP := { + pdu := { + bssmap := { + handoverDetect := { + messageType := '1B'O, + talkerPriority := omit + } + } + } +} + template PDU_BSSAP tr_BSSMAP_HandoverComplete modifies tr_BSSAP_BSSMAP := { pdu := { @@ -856,6 +947,24 @@ } } +template PDU_BSSAP ts_BSSMAP_HandoverComplete +modifies ts_BSSAP_BSSMAP := { + pdu := { + bssmap := { + handoverComplete := { + messageType := '14'O, + rR_Cause := omit, + talkerPriority := omit, + speechCodec := omit, + codecList := omit, + chosenEncryptionAlgorithm := omit, + chosenChannel := omit, + lCLS_BSS_Status := omit + } + } + } +} + template PDU_BSSAP tr_BSSMAP_HandoverPerformed modifies tr_BSSAP_BSSMAP := { pdu := { @@ -975,7 +1084,7 @@ messageType := '52'O, iMSI := ts_BSSMAP_Imsi(imsi_digits), tMSI := f_tmsi_or_omit(tmsi), - cellIdentifierList := ts_BSSMAP_IE_CidList(valueof(cid_list)), + cellIdentifierList := ts_BSSMAP_IE_CidList(cid_list), channelNeeded := chneed, eMLPP_Priority := omit, pagingInformation := omit /* only VGCS/VBS flag */ diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn index c024d37..73f4562 100644 --- a/library/GSUP_Types.ttcn +++ b/library/GSUP_Types.ttcn @@ -55,7 +55,16 @@ OSMO_GSUP_SM_ALERT_RSN_IE ('46'O), OSMO_GSUP_IMEI_IE ('50'O), - OSMO_GSUP_IMEI_RESULT_IE ('51'O) + OSMO_GSUP_IMEI_RESULT_IE ('51'O), + + OSMO_GSUP_MESSAGE_CLASS_IE ('0a'O), + + OSMO_GSUP_SOURCE_NAME_IE ('60'O), + OSMO_GSUP_DESTINATION_NAME_IE ('61'O), + OSMO_GSUP_AN_APDU_IE ('62'O), + OSMO_GSUP_CAUSE_RR_IE ('63'O), + OSMO_GSUP_CAUSE_BSSAP_IE ('64'O), + OSMO_GSUP_CAUSE_SM_IE ('65'O) } with { variant "FIELDLENGTH(8)" }; type enumerated GSUP_MessageType { @@ -103,7 +112,27 @@ OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST ('00110000'B), OSMO_GSUP_MSGT_CHECK_IMEI_ERROR ('00110001'B), - OSMO_GSUP_MSGT_CHECK_IMEI_RESULT ('00110010'B) + OSMO_GSUP_MSGT_CHECK_IMEI_RESULT ('00110010'B), + + OSMO_GSUP_MSGT_E_PREPARE_HANDOVER_REQUEST ('00110100'B), + OSMO_GSUP_MSGT_E_PREPARE_HANDOVER_ERROR ('00110101'B), + OSMO_GSUP_MSGT_E_PREPARE_HANDOVER_RESULT ('00110110'B), + + OSMO_GSUP_MSGT_E_PREPARE_SUBSEQUENT_HANDOVER_REQUEST ('00111000'B), + OSMO_GSUP_MSGT_E_PREPARE_SUBSEQUENT_HANDOVER_ERROR ('00111001'B), + OSMO_GSUP_MSGT_E_PREPARE_SUBSEQUENT_HANDOVER_RESULT ('00111010'B), + + OSMO_GSUP_MSGT_E_SEND_END_SIGNAL_REQUEST ('00111100'B), + OSMO_GSUP_MSGT_E_SEND_END_SIGNAL_ERROR ('00111101'B), + OSMO_GSUP_MSGT_E_SEND_END_SIGNAL_RESULT ('00111110'B), + + OSMO_GSUP_MSGT_E_PROCESS_ACCESS_SIGNALLING_REQUEST ('01000000'B), + OSMO_GSUP_MSGT_E_FORWARD_ACCESS_SIGNALLING_REQUEST ('01000100'B), + + OSMO_GSUP_MSGT_E_CLOSE ('01000111'B), + OSMO_GSUP_MSGT_E_ABORT ('01001011'B), + + OSMO_GSUP_MSGT_E_ROUTING_ERROR ('01001110'B) } with { variant "FIELDLENGTH(8)" }; type enumerated GSUP_CancelType { @@ -128,6 +157,14 @@ OSMO_GSUP_SESSION_STATE_END (3) } with { variant "FIELDLENGTH(8)" }; +type enumerated GSUP_Message_Class { + OSMO_GSUP_MESSAGE_CLASS_UNSET (0), + OSMO_GSUP_MESSAGE_CLASS_SUBSCRIBER_MANAGEMENT (1), + OSMO_GSUP_MESSAGE_CLASS_SMS (2), + OSMO_GSUP_MESSAGE_CLASS_USSD (3), + OSMO_GSUP_MESSAGE_CLASS_INTER_MSC (4) +} with { variant "FIELDLENGTH(8)" }; + type record GSUP_MSISDN { uint8_t len, hexstring digits optional @@ -138,6 +175,16 @@ hexstring digits optional } with { variant (len) "LENGTHTO(digits)" }; +type enumerated GSUP_AN_PROTO { + OSMO_GSUP_AN_PROTO_48006 (1), + OSMO_GSUP_AN_PROTO_25413 (2) +} with { variant "FIELDLENGTH(8)" }; + +type record GSUP_AN_APDU { + GSUP_AN_PROTO proto, + octetstring pdu +}; + type record GSUP_IE { GSUP_IEI tag, uint8_t len, @@ -175,6 +222,13 @@ sm_alert_rsn, tag = OSMO_GSUP_SM_ALERT_RSN_IE; imei, tag = OSMO_GSUP_IMEI_IE; imei_result, tag = OSMO_GSUP_IMEI_RESULT_IE; + message_class, tag = OSMO_GSUP_MESSAGE_CLASS_IE; + source_name, tag = OSMO_GSUP_SOURCE_NAME_IE; + destination_name, tag = OSMO_GSUP_DESTINATION_NAME_IE; + an_apdu, tag = OSMO_GSUP_AN_APDU_IE; + cause_rr, tag = OSMO_GSUP_CAUSE_RR_IE; + cause_bssap, tag = OSMO_GSUP_CAUSE_BSSAP_IE; + cause_sm, tag = OSMO_GSUP_CAUSE_SM_IE; )" }; @@ -219,7 +273,18 @@ GSUP_SM_ALERT_RSN_Type sm_alert_rsn, GSUP_IMEI imei, - GSUP_IMEIResult imei_result + GSUP_IMEIResult imei_result, + + GSUP_Message_Class message_class, + + octetstring source_name, + octetstring destination_name, + + GSUP_AN_APDU an_apdu, + + OCT1 cause_rr, + OCT1 cause_bssap, + OCT1 cause_sm }; type record GSUP_PDU { @@ -930,6 +995,70 @@ } } +template GSUP_IE tr_GSUP_IE_Message_Class(template GSUP_Message_Class val) := { + tag := OSMO_GSUP_MESSAGE_CLASS_IE, + len := ?, + val := { + message_class := val + } +} + +template (value) GSUP_IE ts_GSUP_IE_Message_Class(GSUP_Message_Class val) := { + tag := OSMO_GSUP_MESSAGE_CLASS_IE, + len := 0, /* overwritten */ + val := { + message_class := val + } +} + +template GSUP_IE tr_GSUP_IE_Source_Name(template octetstring name) := { + tag := OSMO_GSUP_SOURCE_NAME_IE, + len := ?, + val := { + source_name := name + } +} + +template (value) GSUP_IE ts_GSUP_IE_Source_Name(octetstring name) := { + tag := OSMO_GSUP_SOURCE_NAME_IE, + len := 0, /* overwritten */ + val := { + source_name := name + } +} + +template GSUP_IE tr_GSUP_IE_Destination_Name(template octetstring name) := { + tag := OSMO_GSUP_DESTINATION_NAME_IE, + len := ?, + val := { + destination_name := name + } +} + +template (value) GSUP_IE ts_GSUP_IE_Destination_Name(octetstring name) := { + tag := OSMO_GSUP_DESTINATION_NAME_IE, + len := 0, /* overwritten */ + val := { + destination_name := name + } +} + +template GSUP_IE tr_GSUP_IE_AN_APDU(template GSUP_AN_APDU an_apdu) := { + tag := OSMO_GSUP_AN_APDU_IE, + len := ?, + val := { + an_apdu := an_apdu + } +} + +template (value) GSUP_IE ts_GSUP_IE_AN_APDU(GSUP_AN_APDU an_apdu) := { + tag := OSMO_GSUP_AN_APDU_IE, + len := 0, /* overwritten */ + val := { + an_apdu := an_apdu + } +} + private function f_gen_ts_ss_ies( hexstring imsi, OCT4 sid, @@ -962,14 +1091,20 @@ tr_GSUP_IE_SessionId(sid), tr_GSUP_IE_SessionState(state) }; + var integer last_idx := 3; /* Optional SS payload */ if (istemplatekind(ss, "*")) { ies[3] := *; + last_idx := last_idx + 1; } else if (not istemplatekind(ss, "omit")) { ies[3] := tr_GSUP_IE_SSInfo(ss); + last_idx := last_idx + 1; } + ies[last_idx] := tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_USSD); + last_idx := last_idx + 1; + return ies; } @@ -1036,7 +1171,8 @@ tr_GSUP_IE_IMSI(imsi), tr_GSUP_IE_Cause(cause), tr_GSUP_IE_SessionId(sid), - tr_GSUP_IE_SessionState(state) + tr_GSUP_IE_SessionState(state), + tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS) } ); @@ -1069,7 +1205,8 @@ tr_GSUP_IE_SM_RP_MR(sm_rp_mr), tr_GSUP_IE_SM_RP_DA(sm_rp_da), tr_GSUP_IE_SM_RP_OA(sm_rp_oa), - tr_GSUP_IE_SM_RP_UI(sm_rp_ui) + tr_GSUP_IE_SM_RP_UI(sm_rp_ui), + tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS) } ); @@ -1090,7 +1227,8 @@ OSMO_GSUP_MSGT_MO_FORWARD_SM_RESULT, { tr_GSUP_IE_IMSI(imsi), - tr_GSUP_IE_SM_RP_MR(sm_rp_mr) + tr_GSUP_IE_SM_RP_MR(sm_rp_mr), + tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS) } ); @@ -1115,7 +1253,8 @@ { tr_GSUP_IE_IMSI(imsi), tr_GSUP_IE_SM_RP_MR(sm_rp_mr), - tr_GSUP_IE_SM_RP_CAUSE(sm_rp_cause) + tr_GSUP_IE_SM_RP_CAUSE(sm_rp_cause), + tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS) } ); @@ -1162,7 +1301,8 @@ tr_GSUP_IE_SM_RP_DA(sm_rp_da), tr_GSUP_IE_SM_RP_OA(sm_rp_oa), tr_GSUP_IE_SM_RP_UI(sm_rp_ui), - tr_GSUP_IE_SM_RP_MMS(sm_rp_mms) + tr_GSUP_IE_SM_RP_MMS(sm_rp_mms), + tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS) } ); @@ -1183,7 +1323,8 @@ OSMO_GSUP_MSGT_MT_FORWARD_SM_RESULT, { tr_GSUP_IE_IMSI(imsi), - tr_GSUP_IE_SM_RP_MR(sm_rp_mr) + tr_GSUP_IE_SM_RP_MR(sm_rp_mr), + tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS) } ); @@ -1208,7 +1349,8 @@ { tr_GSUP_IE_IMSI(imsi), tr_GSUP_IE_SM_RP_MR(sm_rp_mr), - tr_GSUP_IE_SM_RP_CAUSE(sm_rp_cause) + tr_GSUP_IE_SM_RP_CAUSE(sm_rp_cause), + tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS) } ); @@ -1233,7 +1375,8 @@ { tr_GSUP_IE_IMSI(imsi), tr_GSUP_IE_SM_RP_MR(sm_rp_mr), - tr_GSUP_IE_SM_ALERT_RSN(sm_alert_rsn) + tr_GSUP_IE_SM_ALERT_RSN(sm_alert_rsn), + tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS) } ); @@ -1254,7 +1397,8 @@ OSMO_GSUP_MSGT_READY_FOR_SM_RESULT, { tr_GSUP_IE_IMSI(imsi), - tr_GSUP_IE_SM_RP_MR(sm_rp_mr) + tr_GSUP_IE_SM_RP_MR(sm_rp_mr), + tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS) } ); @@ -1279,7 +1423,8 @@ { tr_GSUP_IE_IMSI(imsi), tr_GSUP_IE_SM_RP_MR(sm_rp_mr), - tr_GSUP_IE_SM_RP_CAUSE(sm_rp_cause) + tr_GSUP_IE_SM_RP_CAUSE(sm_rp_cause), + tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS) } ); @@ -1293,5 +1438,79 @@ return false; } +template GSUP_AN_APDU t_GSUP_AN_APDU( + template GSUP_AN_PROTO an_proto := ?, + template octetstring pdu := ? +) := { + proto := an_proto, + pdu := pdu +}; + +template GSUP_PDU tr_GSUP_E_AN_APDU( + template GSUP_MessageType msgt, + template hexstring imsi := ?, + template octetstring source_name := ?, + template octetstring destination_name := ?, + template GSUP_AN_APDU an_apdu := ? +) := tr_GSUP( + msgt, + { + tr_GSUP_IE_IMSI(imsi), + tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_INTER_MSC), + tr_GSUP_IE_Source_Name(source_name), + tr_GSUP_IE_Destination_Name(destination_name), + tr_GSUP_IE_AN_APDU(an_apdu) + } +); + +template GSUP_PDU tr_GSUP_E_NO_PDU( + template GSUP_MessageType msgt, + template hexstring imsi := ?, + template octetstring source_name := ?, + template octetstring destination_name := ? +) := tr_GSUP( + msgt, + { + tr_GSUP_IE_IMSI(imsi), + tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_INTER_MSC), + tr_GSUP_IE_Source_Name(source_name), + tr_GSUP_IE_Destination_Name(destination_name) + } +); + +template (value) GSUP_PDU ts_GSUP_E_AN_APDU( + GSUP_MessageType msgt, + hexstring imsi, + octetstring source_name, + octetstring destination_name, + GSUP_AN_APDU an_apdu +) := ts_GSUP( + msgt, + { + valueof(ts_GSUP_IE_IMSI(imsi)), + valueof(ts_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_INTER_MSC)), + valueof(ts_GSUP_IE_Source_Name(source_name)), + valueof(ts_GSUP_IE_Destination_Name(destination_name)), + valueof(ts_GSUP_IE_AN_APDU(an_apdu)) + } +); + +template (value) GSUP_PDU ts_GSUP_E_PrepareHandoverResult( + hexstring imsi, + hexstring msisdn, + octetstring source_name, + octetstring destination_name, + GSUP_AN_APDU an_apdu +) := ts_GSUP( + OSMO_GSUP_MSGT_E_PREPARE_HANDOVER_RESULT, + { + valueof(ts_GSUP_IE_IMSI(imsi)), + valueof(ts_GSUP_IE_MSISDN(msisdn)), + valueof(ts_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_INTER_MSC)), + valueof(ts_GSUP_IE_Source_Name(source_name)), + valueof(ts_GSUP_IE_Destination_Name(destination_name)), + valueof(ts_GSUP_IE_AN_APDU(an_apdu)) + } +); } with { encode "RAW"; variant "FIELDORDER(msb)" } diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn index 4d71f27..cf6d64c 100644 --- a/library/L3_Templates.ttcn +++ b/library/L3_Templates.ttcn @@ -582,6 +582,59 @@ } } +template PDU_ML3_NW_MS tr_RR_HandoverCommand := { + discriminator := '0110'B, + tiOrSkip := { + skipIndicator := '0000'B + }, + msgs := { + rrm := { + handoverCommand := { + messageType := '00101011'B, + cellDescription := ?, + channelDescription2 := ?, + handoverReference := ?, + powerCommandAndAccesstype := ?, + synchronizationIndication := *, + frequencyShortListAfterTime := *, + frequencyListAfterTime := *, + cellChannelDescription := *, + multislotAllocation := *, + modeOfChannelSet1 := *, + modeOfChannelSet2 := *, + modeOfChannelSet3 := *, + modeOfChannelSet4 := *, + modeOfChannelSet5 := *, + modeOfChannelSet6 := *, + modeOfChannelSet7 := *, + modeOfChannelSet8 := *, + descrOf2ndCh_at := *, + modeOf2ndChannel := *, + frequencyChannelSequence_at := *, + mobileAllocation_at := *, + startingTime := *, + timeDifference := *, + timingAdvance := *, + frequencyShortListBeforeTime := *, + frequencyListBeforeTime := *, + descrOf1stCh_bt := *, + descrOf2ndCh_bt := *, + frequencyChannelSequence_bt := *, + mobileAllocation_bt := *, + cipherModeSetting := *, + vGCS_TargetModeIndication := *, + multiRateConfiguration := *, + dynamicARFCN_Mapping := *, + vGCS_Ciphering_Parameters := *, + dedicatedServiceInformation := *, + pLMNIndex := *, + extendedTSCSet_afterTime := *, + extendedTSCSet_beforeTime := * + } + } + } +} + function ts_CM3_TLV(template (omit) OCTN cm3) return template MobileStationClassmark3_TLV { if (not isvalue(cm3)) { return omit; diff --git a/library/RAN_Emulation.ttcnpp b/library/RAN_Emulation.ttcnpp index d6d74e2..843cc9e 100644 --- a/library/RAN_Emulation.ttcnpp +++ b/library/RAN_Emulation.ttcnpp @@ -133,6 +133,7 @@ RAN_Conn_Prim; } with { extension "internal" }; +type uint2_t N_Sd_Array[4]; /* represents a single BSSAP connection over SCCP */ type record ConnectionData { @@ -146,7 +147,7 @@ /* CIC that has been used for voice of this channel (BSC side) */ integer cic optional, /* array of N(SD) values for MO DTAP messages, indexed by discriminator */ - uint2_t n_sd[4] + N_Sd_Array n_sd } type record ImsiMapping { @@ -671,30 +672,53 @@ return false; } -/* patch N(SD) into enc_l3, according to 24.007 11.2.3.2 */ -function f_ML3_patch_seq(inout ConnectionData cd, in PDU_ML3_MS_NW dtap, inout octetstring enc_l3) { +function f_next_n_sd(inout N_Sd_Array n_sd, in integer n_sd_idx) return uint2_t { var uint2_t seq_nr; - if (ischosen(dtap.msgs.cc) or ischosen(dtap.msgs.mm) or ischosen(dtap.msgs.ss)) { - seq_nr := cd.n_sd[0]; - cd.n_sd[0] := (cd.n_sd[0] + 1) mod 4; - } else if (ischosen(dtap.msgs.gcc)) { - seq_nr := cd.n_sd[1]; - cd.n_sd[1] := (cd.n_sd[1] + 1) mod 2; - } else if (ischosen(dtap.msgs.bcc)) { - seq_nr := cd.n_sd[2]; - cd.n_sd[2] := (cd.n_sd[2] + 1) mod 2; - } else if (ischosen(dtap.msgs.loc)) { - seq_nr := cd.n_sd[3]; - cd.n_sd[3] := (cd.n_sd[3] + 1) mod 2; + if (n_sd_idx == 0) { + seq_nr := n_sd[0]; + n_sd[0] := (n_sd[0] + 1) mod 4; + } else if (n_sd_idx >= 1 and n_sd_idx <= 3) { + seq_nr := n_sd[n_sd_idx]; + n_sd[n_sd_idx] := (n_sd[n_sd_idx] + 1) mod 2; } else { /* no sequence number to patch */ - return; + seq_nr := 0; } + return seq_nr; +} + +/* patch N(SD) into enc_l3, according to 24.007 11.2.3.2 */ +function f_ML3_patch_seq_nr(in uint2_t seq_nr, inout octetstring enc_l3) { log("patching N(SD)=", seq_nr, " into dtap ", enc_l3); enc_l3[1] := (enc_l3[1] and4b '3f'O) or4b bit2oct(int2bit(seq_nr, 8) << 6); log("patched enc_l3: ", enc_l3); } +function f_ML3_n_sd_idx(in PDU_ML3_MS_NW dtap) return integer { + var uint2_t seq_nr; + if (ischosen(dtap.msgs.cc) or ischosen(dtap.msgs.mm) or ischosen(dtap.msgs.ss)) { + return 0; + } else if (ischosen(dtap.msgs.gcc)) { + return 1; + } else if (ischosen(dtap.msgs.bcc)) { + return 2; + } else if (ischosen(dtap.msgs.loc)) { + return 3; + } + /* no sequence number to patch */ + return -1; +} + +/* patch N(SD) into enc_l3, according to 24.007 11.2.3.2 */ +function f_ML3_patch_seq(inout ConnectionData cd, in PDU_ML3_MS_NW dtap, inout octetstring enc_l3) { + var integer n_sd_idx := f_ML3_n_sd_idx(dtap); + if (n_sd_idx < 0) { + return; + } + var uint2_t seq_nr := f_next_n_sd(cd.n_sd, n_sd_idx); + f_ML3_patch_seq_nr(seq_nr, enc_l3); +} + private altstep as_reset_ack() runs on RAN_Emulation_CT { #ifdef RAN_EMULATION_BSSAP var BSSAP_N_UNITDATA_ind ud_ind; @@ -732,6 +756,8 @@ var BSSAP_Conn_Req creq; var PDU_BSSAP bssap; var RAN_ConnHdlr vc_conn; + var integer targetPointCode; + var N_Sd_Array last_n_sd; /* SCCP -> Client: UNIT-DATA (connectionless SCCP) from a BSC */ [] BSSAP.receive(BSSAP_N_UNITDATA_ind:?) -> value ud_ind { @@ -823,7 +849,18 @@ ConnectionTable[idx].n_sd[0] := 1; log("patch: N(SD) for ConnIdx ", idx, " set to 1"); } + } + [] PROC.getcall(RAN_last_n_sd:{?,-}) -> param(vc_conn) { + var integer idx := f_idx_by_comp(vc_conn); + last_n_sd := ConnectionTable[idx].n_sd; + PROC.reply(RAN_last_n_sd:{vc_conn, last_n_sd}) to vc_conn; + } + + [] PROC.getcall(RAN_continue_after_n_sd:{?,?}) -> param(last_n_sd, vc_conn) { + var integer idx := f_idx_by_comp(vc_conn); + ConnectionTable[idx].n_sd := last_n_sd; + PROC.reply(RAN_continue_after_n_sd:{last_n_sd, vc_conn}) to vc_conn; } #else [false] CLIENT.receive {} @@ -1045,6 +1082,7 @@ var octetstring l3_info; var hexstring imsi; var OCT4 tmsi; + var integer targetPointCode; alt { [g_ran_ops.protocol == RAN_PROTOCOL_BSSAP] as_main_bssap(); @@ -1075,6 +1113,11 @@ PROC.reply(RAN_register:{l3_info, vc_hdlr}) to vc_hdlr; } + [] PROC.getcall(RAN_register_handoverRequest:{?,?}) -> param(targetPointCode, vc_hdlr) { + f_create_expect(omit, vc_hdlr, targetPointCode); + PROC.reply(RAN_register_handoverRequest:{targetPointCode, vc_hdlr}) to vc_hdlr; + } + [] PROC.getcall(RAN_register_imsi:{?,?,?}) -> param(imsi, tmsi, vc_hdlr) { f_create_imsi(imsi, tmsi, vc_hdlr); PROC.reply(RAN_register_imsi:{imsi, tmsi, vc_hdlr}) to vc_hdlr; @@ -1101,18 +1144,26 @@ type record ExpectData { /* L3 payload based on which we can match it */ octetstring l3_payload optional, + integer handoverRequestPointCode optional, /* component reference for this connection */ RAN_ConnHdlr vc_conn } /* procedure based port to register for incoming connections */ signature RAN_register(in octetstring l3, in RAN_ConnHdlr hdlr); +signature RAN_register_handoverRequest(in integer targetPointCode, in RAN_ConnHdlr hdlr); /* procedure based port to register for incoming IMSI/TMSI */ signature RAN_register_imsi(in hexstring imsi, in OCT4 tmsi, in RAN_ConnHdlr hdlr); +/* If DTAP happens across other channels (e.g. GSUP), provide manual advancing of the n_sd sequence number */ +signature RAN_last_n_sd(in RAN_ConnHdlr hdlr, out N_Sd_Array last_n_sd); + +/* Update conn's n_sd sequence nr after the connection was taken over from elsewhere */ +signature RAN_continue_after_n_sd(N_Sd_Array last_n_sd, in RAN_ConnHdlr hdlr); + type port RAN_PROC_PT procedure { - inout RAN_register, RAN_register_imsi; + inout RAN_register, RAN_register_imsi, RAN_register_handoverRequest, RAN_last_n_sd, RAN_continue_after_n_sd; } with { extension "internal" }; #ifdef RAN_EMULATION_BSSAP @@ -1121,16 +1172,35 @@ runs on RAN_Emulation_CT return RAN_ConnHdlr { var RAN_ConnHdlr ret := null; var octetstring l3_info; + var boolean handoverRequest := false; + var integer handoverRequestPointCode; var integer i; - if (not ischosen(conn_ind.userData.pdu.bssmap.completeLayer3Information)) { - setverdict(fail, "N-CONNECT.ind with L3 != COMPLETE L3"); + if (ischosen(conn_ind.userData.pdu.bssmap.completeLayer3Information)) { + l3_info := conn_ind.userData.pdu.bssmap.completeLayer3Information.layer3Information.layer3info; + log("ExpectedCreateCallback completeLayer3Information"); + } else if (ischosen(conn_ind.userData.pdu.bssmap.handoverRequest)) { + handoverRequest := true; + handoverRequestPointCode := bit2int(conn_ind.calledAddress.signPointCode); + log("ExpectedCreateCallback handoverRequest ", handoverRequestPointCode); + } else { + setverdict(fail, "N-CONNECT.ind with L3 != COMPLETE L3 nor a Handover Request"); mtc.stop; return ret; } - l3_info := conn_ind.userData.pdu.bssmap.completeLayer3Information.layer3Information.layer3info; for (i := 0; i < sizeof(ExpectTable); i:= i+1) { + if (handoverRequest) { + log("ExpectTable[", i, "].handoverRequestPointCode = ", ExpectTable[i].handoverRequestPointCode, + " ==? ", handoverRequestPointCode); + if (ExpectTable[i].handoverRequestPointCode == handoverRequestPointCode) { + ret := ExpectTable[i].vc_conn; + log("Found Expect[", i, "] for handoverRequest handled at ", ret); + return ret; + } else { + continue; + } + } if (not ispresent(ExpectTable[i].l3_payload)) { continue; } @@ -1185,14 +1255,26 @@ } #endif -private function f_create_expect(octetstring l3, RAN_ConnHdlr hdlr) +private function f_create_expect(template octetstring l3, RAN_ConnHdlr hdlr, + template integer handoverRequestPointCode := omit) runs on RAN_Emulation_CT { var integer i; + log("f_create_expect(l3 := ", l3, ", handoverRequest := ", handoverRequestPointCode); for (i := 0; i < sizeof(ExpectTable); i := i+1) { - if (not ispresent(ExpectTable[i].l3_payload)) { - ExpectTable[i].l3_payload := l3; + if (not ispresent(ExpectTable[i].l3_payload) + and not ispresent(ExpectTable[i].handoverRequestPointCode)) { + if (ispresent(l3)) { + ExpectTable[i].l3_payload := valueof(l3); + } + if (ispresent(handoverRequestPointCode)) { + ExpectTable[i].handoverRequestPointCode := valueof(handoverRequestPointCode); + } ExpectTable[i].vc_conn := hdlr; - log("Created Expect[", i, "] for ", l3, " to be handled at ", hdlr); + if (ispresent(handoverRequestPointCode)) { + log("Created Expect[", i, "] for handoverRequest to be handled at ", hdlr); + } else { + log("Created Expect[", i, "] for ", l3, " to be handled at ", hdlr); + } return; } } @@ -1218,6 +1300,7 @@ runs on RAN_Emulation_CT { for (var integer i := 0; i < sizeof(ExpectTable); i := i+1) { ExpectTable[i].l3_payload := omit; + ExpectTable[i].handoverRequestPointCode := omit; } } diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 44d3c6d..1cec69c 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -1133,6 +1133,27 @@ } } +function f_create_bssmap_exp_handoverRequest(integer targetPointCode) runs on BSC_ConnHdlr { + BSSAP_PROC.call(RAN_register_handoverRequest:{targetPointCode, self}) { + [] BSSAP_PROC.getreply(RAN_register_handoverRequest:{?, ?}) {}; + } +} + +function f_bssmap_last_n_sd() runs on BSC_ConnHdlr return N_Sd_Array { + var N_Sd_Array last_n_sd; + BSSAP_PROC.call(RAN_last_n_sd:{self, -}) { + [] BSSAP_PROC.getreply(RAN_last_n_sd:{self, ?}) -> param(last_n_sd) { + return last_n_sd; + }; + } +} + +function f_bssmap_continue_after_n_sd(N_Sd_Array last_n_sd) runs on BSC_ConnHdlr { + BSSAP_PROC.call(RAN_continue_after_n_sd:{last_n_sd, self}) { + [] BSSAP_PROC.getreply(RAN_continue_after_n_sd:{last_n_sd, self}); + } +} + type record SmsParametersTp { OCT1 msg_ref, TP_DA da, diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 709a73c..3a6711b 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -468,31 +468,6 @@ } } -template PDU_BSSAP ts_BSSMAP_HandoReq(BssmapCause cause, BSSMAP_IE_CellIdentifierList cid_list) -modifies ts_BSSAP_BSSMAP := { - pdu := { - bssmap := { - handoverRequired := { - messageType := '11'O, - cause := ts_BSSMAP_IE_Cause(cause), - responseRequest := omit, - cellIdentifierList := cid_list, - circuitPoolList := omit, - currentChannelType1 := omit, - speechVersion := omit, - queueingIndicator := omit, - oldToNewBSSInfo := omit, - sourceToTargetRNCTransparentInfo := omit, - sourceToTargetRNCTransparentInfoCDMA := omit, - gERANClassmark := omit, - talkerPriority := omit, - speechCodec := omit, - cSG_Identifier := omit - } - } - } -} - type function void_fn(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr; /* FIXME: move into BSC_ConnectionHandler? */ @@ -536,14 +511,14 @@ return pars; } -function f_start_handler_with_pars(void_fn fn, BSC_ConnHdlrPars pars) runs on MTC_CT return BSC_ConnHdlr { +function f_start_handler_with_pars(void_fn fn, BSC_ConnHdlrPars pars, integer bssap_idx := 0) runs on MTC_CT return BSC_ConnHdlr { var BSC_ConnHdlr vc_conn; - var charstring id := testcasename(); + var charstring id := testcasename() & int2str(bssap_idx); vc_conn := BSC_ConnHdlr.create(id); /* BSSMAP part / A interface */ - connect(vc_conn:BSSAP, g_bssap[pars.ran_idx].vc_RAN:CLIENT); - connect(vc_conn:BSSAP_PROC, g_bssap[pars.ran_idx].vc_RAN:PROC); + connect(vc_conn:BSSAP, g_bssap[pars.ran_idx + bssap_idx].vc_RAN:CLIENT); + connect(vc_conn:BSSAP_PROC, g_bssap[pars.ran_idx + bssap_idx].vc_RAN:PROC); /* MNCC part */ connect(vc_conn:MNCC, vc_MNCC:MNCC_CLIENT); connect(vc_conn:MNCC_PROC, vc_MNCC:MNCC_PROC); @@ -4776,6 +4751,464 @@ * */ +private function f_tc_ho_inter_bsc_unknown_cell(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { + f_init_handler(pars); + var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); + cpars.bss_rtp_port := 1110; + cpars.mgcp_connection_id_bss := '22222'H; + cpars.mgcp_connection_id_mss := '33333'H; + cpars.mgcp_ep := "rtpbridge/1 at mgw"; + cpars.mo_call := true; + + f_perform_lu(); + f_mo_call_establish(cpars); + + f_sleep(1.0); + + var myBSSMAP_Cause cause_val := GSM0808_CAUSE_BETTER_CELL; + var BssmapCause cause := enum2int(cause_val); + + var template BSSMAP_FIELD_CellIdentificationList cil; + cil := { cIl_LAI := { ts_BSSMAP_CI_LAI('023'H, '42'H, 999) } }; + + BSSAP.send(ts_BSSMAP_HandoverRequired(cause, cil)); + BSSAP.receive(tr_BSSMAP_HandoverRequiredReject); + + f_call_hangup(cpars, true); +} +testcase TC_ho_inter_bsc_unknown_cell() runs on MTC_CT { + var BSC_ConnHdlr vc_conn; + f_init(); + + vc_conn := f_start_handler(refers(f_tc_ho_inter_bsc_unknown_cell), 53); + vc_conn.done; +} + +private altstep as_mgcp_ack_all_mdcx(CallParameters cpars) runs on BSC_ConnHdlr { + var MgcpCommand mgcp_cmd; + [] MGCP.receive(tr_MDCX) -> value mgcp_cmd { + var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_mss, cpars.mgw_rtp_ip_mss, + hex2str(cpars.mgcp_call_id), "42", + cpars.mgw_rtp_port_mss, + { int2str(cpars.rtp_payload_type) }, + { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, + cpars.rtp_sdp_format)), + valueof(ts_SDP_ptime(20)) })); + MGCP.send(ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp)); + repeat; + } +} + +private function f_tc_ho_inter_bsc0(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { + var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); + cpars.bss_rtp_port := 1110; + cpars.mgcp_connection_id_bss := '22222'H; + cpars.mgcp_connection_id_mss := '33333'H; + cpars.mgcp_ep := "rtpbridge/1 at mgw"; + cpars.mo_call := true; + + f_init_handler(pars); + + f_vty_transceive(MSCVTY, "configure terminal"); + f_vty_transceive(MSCVTY, "msc"); + f_vty_transceive(MSCVTY, "neighbor a cgi 262 42 23 42 ran-pc 0.24.1"); + f_vty_transceive(MSCVTY, "neighbor a lac 5 ran-pc 0.24.2"); + f_vty_transceive(MSCVTY, "exit"); + f_vty_transceive(MSCVTY, "exit"); + + f_perform_lu(); + f_mo_call_establish(cpars); + + f_sleep(1.0); + + var default ack_mdcx := activate(as_mgcp_ack_all_mdcx(cpars)); + + var myBSSMAP_Cause cause_val := GSM0808_CAUSE_BETTER_CELL; + var BssmapCause cause := enum2int(cause_val); + + var template BSSMAP_FIELD_CellIdentificationList cil; + cil := { cIl_LAI := { ts_BSSMAP_CI_LAI('023'H, '42'H, 5) } }; + + /* old BSS sends Handover Required */ + BSSAP.send(ts_BSSMAP_HandoverRequired(cause, cil)); + + /* Now the action goes on in f_tc_ho_inter_bsc1() */ + + /* MSC forwards the RR Handover Command to old BSS */ + var PDU_BSSAP ho_command; + BSSAP.receive(tr_BSSMAP_HandoverCommand) -> value ho_command; + + log("GOT HandoverCommand", ho_command); + + BSSAP.receive(tr_BSSMAP_HandoverSucceeded); + + /* f_tc_ho_inter_bsc1() completes Handover, then expecting a Clear here. */ + f_expect_clear(); + + log("FIRST inter-BSC Handover done"); + + + /* ------------------------ */ + + /* Ok, that went well, now the other BSC is handovering back here -- + * from now on this here is the new BSS. */ + f_create_bssmap_exp_handoverRequest(193); + + var PDU_BSSAP ho_request; + BSSAP.receive(tr_BSSMAP_HandoverRequest) -> value ho_request; + + /* new BSS composes a RR Handover Command */ + var PDU_ML3_NW_MS rr_ho_cmd := valueof(ts_RR_HandoverCommand); + var octetstring rr_ho_cmd_enc := enc_PDU_ML3_NW_MS(rr_ho_cmd); + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + BSSAP.send(ts_BSSMAP_HandoverRequestAcknowledge(rr_ho_cmd_enc, lengthof(rr_ho_cmd_enc), + tla, ts_BSSMAP_IE_SpeechCodec({ts_CodecFR}))); + + /* Now f_tc_ho_inter_bsc1() expects HandoverCommand */ + + f_sleep(0.5); + + /* Notify that the MS is now over here */ + + BSSAP.send(ts_BSSMAP_HandoverDetect); + f_sleep(0.1); + BSSAP.send(ts_BSSMAP_HandoverComplete); + + f_sleep(3.0); + + deactivate(ack_mdcx); + + var default ccrel := activate(as_optional_cc_rel(cpars, true)); + + /* blatant cheating */ + var N_Sd_Array last_n_sd := f_bssmap_last_n_sd(); + last_n_sd[0] := 3; + f_bssmap_continue_after_n_sd(last_n_sd); + + f_call_hangup(cpars, true); + f_sleep(1.0); + deactivate(ccrel); + + setverdict(pass); +} +private function f_tc_ho_inter_bsc1(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { + f_init_handler(pars); + f_create_bssmap_exp_handoverRequest(194); + + var PDU_BSSAP ho_request; + BSSAP.receive(tr_BSSMAP_HandoverRequest) -> value ho_request; + + /* new BSS composes a RR Handover Command */ + var PDU_ML3_NW_MS rr_ho_cmd := valueof(ts_RR_HandoverCommand); + var octetstring rr_ho_cmd_enc := enc_PDU_ML3_NW_MS(rr_ho_cmd); + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + BSSAP.send(ts_BSSMAP_HandoverRequestAcknowledge(rr_ho_cmd_enc, lengthof(rr_ho_cmd_enc), + tla, ts_BSSMAP_IE_SpeechCodec({ts_CodecFR}))); + + /* Now f_tc_ho_inter_bsc0() expects HandoverCommand */ + + f_sleep(0.5); + + /* Notify that the MS is now over here */ + + BSSAP.send(ts_BSSMAP_HandoverDetect); + f_sleep(0.1); + BSSAP.send(ts_BSSMAP_HandoverComplete); + + f_sleep(3.0); + + /* Now I'd like to f_call_hangup() but we don't know any cpars here. So + * ... handover back to the first BSC :P */ + + var myBSSMAP_Cause cause_val := GSM0808_CAUSE_BETTER_CELL; + var BssmapCause cause := enum2int(cause_val); + + var template BSSMAP_FIELD_CellIdentificationList cil; + cil := { cIl_LAI := { ts_BSSMAP_CI_LAI('262'H, '42'H, 23) } }; + + /* old BSS sends Handover Required */ + BSSAP.send(ts_BSSMAP_HandoverRequired(cause, cil)); + + /* Now the action goes on in f_tc_ho_inter_bsc0() */ + + /* MSC forwards the RR Handover Command to old BSS */ + var PDU_BSSAP ho_command; + BSSAP.receive(tr_BSSMAP_HandoverCommand) -> value ho_command; + + log("GOT HandoverCommand", ho_command); + + BSSAP.receive(tr_BSSMAP_HandoverSucceeded); + + /* f_tc_ho_inter_bsc1() completes Handover, then expecting a Clear here. */ + f_expect_clear(); + setverdict(pass); +} +testcase TC_ho_inter_bsc() runs on MTC_CT { + var BSC_ConnHdlr vc_conn0; + var BSC_ConnHdlr vc_conn1; + f_init(2); + + var BSC_ConnHdlrPars pars0 := f_init_pars(53); + var BSC_ConnHdlrPars pars1 := f_init_pars(53); + + vc_conn0 := f_start_handler_with_pars(refers(f_tc_ho_inter_bsc0), pars0, 0); + vc_conn1 := f_start_handler_with_pars(refers(f_tc_ho_inter_bsc1), pars1, 1); + vc_conn0.done; + vc_conn1.done; +} + +function f_ML3_patch_seq_nr_MS_NW(in uint2_t seq_nr, inout octetstring enc_l3) { + log("MS_NW patching N(SD)=", seq_nr, " into dtap ", enc_l3); + enc_l3[2] := (enc_l3[2] and4b '3f'O) or4b bit2oct(int2bit(seq_nr, 8) << 6); + log("MS_NW patched enc_l3: ", enc_l3); +} + +private function f_tc_ho_inter_msc_out(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { + var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); + cpars.bss_rtp_port := 1110; + cpars.mgcp_connection_id_bss := '22222'H; + cpars.mgcp_connection_id_mss := '33333'H; + cpars.mgcp_ep := "rtpbridge/1 at mgw"; + cpars.mo_call := true; + var hexstring ho_number := f_gen_msisdn(99999); + + f_init_handler(pars); + + f_create_mncc_expect(hex2str(ho_number)); + + f_vty_transceive(MSCVTY, "configure terminal"); + f_vty_transceive(MSCVTY, "msc"); + f_vty_transceive(MSCVTY, "neighbor a cgi 017 017 1 1 msc-ipa-name msc-017-017-1"); + f_vty_transceive(MSCVTY, "exit"); + f_vty_transceive(MSCVTY, "exit"); + + f_perform_lu(); + f_mo_call_establish(cpars); + + f_sleep(1.0); + + var default ack_mdcx := activate(as_mgcp_ack_all_mdcx(cpars)); + + var myBSSMAP_Cause cause_val := GSM0808_CAUSE_BETTER_CELL; + var BssmapCause cause := enum2int(cause_val); + + var template BSSMAP_FIELD_CellIdentificationList cil; + cil := { cIl_LAI := { ts_BSSMAP_CI_LAI('017'H, '017'H, 1) } }; + + /* old BSS sends Handover Required */ + BSSAP.send(ts_BSSMAP_HandoverRequired(cause, cil)); + + /* The target cell 017-017 LAC 1 is configured to be a remote MSC of name "msc-017-017-1". + * This MSC tries to reach the other MSC via GSUP. */ + + var octetstring remote_msc_name := '6D73632D3031372D3031372D3100'O; /* "msc-017-017-1\0" as octetstring */ + var GSUP_PDU prep_ho_req; + GSUP.receive(tr_GSUP_E_AN_APDU(OSMO_GSUP_MSGT_E_PREPARE_HANDOVER_REQUEST, + pars.imsi, destination_name := remote_msc_name)) -> value prep_ho_req; + + var GSUP_IeValue source_name_ie; + f_gsup_find_ie(prep_ho_req, OSMO_GSUP_SOURCE_NAME_IE, source_name_ie); + var octetstring local_msc_name := source_name_ie.source_name; + + /* Remote MSC has figured out its BSC and signals success */ + var PDU_ML3_NW_MS rr_ho_cmd := valueof(ts_RR_HandoverCommand); + var octetstring rr_ho_cmd_enc := enc_PDU_ML3_NW_MS(rr_ho_cmd); + var PDU_BSSAP ho_req_ack := valueof(ts_BSSMAP_HandoverRequestAcknowledge(rr_ho_cmd_enc, lengthof(rr_ho_cmd_enc), + aoIPTransportLayer := omit, + speechCodec := ts_BSSMAP_IE_SpeechCodec({ts_CodecFR}))); + GSUP.send(ts_GSUP_E_PrepareHandoverResult( + pars.imsi, + ho_number, + remote_msc_name, local_msc_name, + valueof(t_GSUP_AN_APDU(OSMO_GSUP_AN_PROTO_48006, enc_PDU_BSSAP(ho_req_ack))))); + + /* MSC forwards the RR Handover Command to old BSS */ + BSSAP.receive(tr_BSSMAP_HandoverCommand); + + /* The MS shows up at remote new BSS */ + + GSUP.send(ts_GSUP_E_AN_APDU(OSMO_GSUP_MSGT_E_PROCESS_ACCESS_SIGNALLING_REQUEST, + pars.imsi, remote_msc_name, local_msc_name, + valueof(t_GSUP_AN_APDU(OSMO_GSUP_AN_PROTO_48006, + enc_PDU_BSSAP(valueof(ts_BSSMAP_HandoverDetect)))))); + BSSAP.receive(tr_BSSMAP_HandoverSucceeded); + f_sleep(0.1); + + /* Save the MS sequence counters for use on the other connection */ + var N_Sd_Array last_n_sd := f_bssmap_last_n_sd(); + + GSUP.send(ts_GSUP_E_AN_APDU(OSMO_GSUP_MSGT_E_SEND_END_SIGNAL_REQUEST, + pars.imsi, remote_msc_name, local_msc_name, + valueof(t_GSUP_AN_APDU(OSMO_GSUP_AN_PROTO_48006, + enc_PDU_BSSAP(valueof(ts_BSSMAP_HandoverComplete)))))); + + /* The local BSS conn clears, all communication goes via remote MSC now */ + f_expect_clear(); + + /**********************************/ + /* Play through some signalling across the inter-MSC link. + * This is a copy of f_tc_lu_and_mo_ussd_single_request() translated into GSUP AN-APDUs. */ + + if (false) { + var template OCTN facility_req := f_USSD_FACILITY_IE_INVOKE( + invoke_id := 5, /* Phone may not start from 0 or 1 */ + op_code := SS_OP_CODE_PROCESS_USS_REQ, + ussd_string := "*#100#" + ); + + var template OCTN facility_rsp := f_USSD_FACILITY_IE_RETURN_RESULT( + invoke_id := 5, /* InvokeID shall be the same for both REQ and RSP */ + op_code := SS_OP_CODE_PROCESS_USS_REQ, + ussd_string := "Your extension is " & hex2str(g_pars.msisdn) & "\r" + ) + + /* Compose a new SS/REGISTER message with request */ + var template (value) PDU_ML3_MS_NW ussd_req := ts_ML3_MO_SS_REGISTER( + tid := 1, /* We just need a single transaction */ + ti_flag := c_TIF_ORIG, /* Sent from the side that originates the TI */ + facility := valueof(facility_req) + ); + var PDU_ML3_MS_NW ussd_req_v := valueof(ussd_req); + + /* Compose SS/RELEASE_COMPLETE template with expected response */ + var template PDU_ML3_NW_MS ussd_rsp := tr_ML3_MT_SS_RELEASE_COMPLETE( + tid := 1, /* Response should arrive within the same transaction */ + ti_flag := c_TIF_REPL, /* Sent to the side that originates the TI */ + facility := valueof(facility_rsp) + ); + + /* Compose expected MSC -> HLR message */ + var template GSUP_PDU gsup_req := tr_GSUP_PROC_SS_REQ( + imsi := g_pars.imsi, + state := OSMO_GSUP_SESSION_STATE_BEGIN, + ss := valueof(facility_req) + ); + + /* To be used for sending response with correct session ID */ + var GSUP_PDU gsup_req_complete; + + /* Request own number */ + /* From remote MSC instead of BSSAP directly */ + /* Patch the correct N_SD value into the message. */ + var octetstring l3_enc := enc_PDU_ML3_MS_NW(ussd_req_v); + var RAN_Emulation.ConnectionData cd; + f_ML3_patch_seq_nr_MS_NW(f_next_n_sd(last_n_sd, f_ML3_n_sd_idx(ussd_req_v)), l3_enc); + GSUP.send(ts_GSUP_E_AN_APDU(OSMO_GSUP_MSGT_E_PROCESS_ACCESS_SIGNALLING_REQUEST, + pars.imsi, remote_msc_name, local_msc_name, + valueof(t_GSUP_AN_APDU(OSMO_GSUP_AN_PROTO_48006, + enc_PDU_BSSAP(valueof(ts_BSSAP_DTAP(l3_enc))) + )) + )); + + /* Expect GSUP message containing the SS payload */ + gsup_req_complete := f_expect_gsup_msg(gsup_req); + + /* Compose the response from HLR using received session ID */ + var template GSUP_PDU gsup_rsp := ts_GSUP_PROC_SS_REQ( + imsi := g_pars.imsi, + sid := gsup_req_complete.ies[1].val.session_id, + state := OSMO_GSUP_SESSION_STATE_END, + ss := valueof(facility_rsp) + ); + + /* Finally, HLR terminates the session */ + GSUP.send(gsup_rsp); + + /* The USSD response goes out to remote MSC, on GSUP E instead of BSSAP */ + var GSUP_PDU gsup_ussd_rsp; + GSUP.receive(tr_GSUP_E_AN_APDU(OSMO_GSUP_MSGT_E_FORWARD_ACCESS_SIGNALLING_REQUEST, + pars.imsi, destination_name := remote_msc_name)) -> value gsup_ussd_rsp; + + var GSUP_IeValue an_apdu; + if (not f_gsup_find_ie(gsup_ussd_rsp, OSMO_GSUP_AN_APDU_IE, an_apdu)) { + setverdict(fail, "No AN-APDU in received GSUP message. Expected USSD response in DTAP, got", gsup_ussd_rsp); + mtc.stop; + } + var PDU_BSSAP bssap_dtap_mt := dec_PDU_BSSAP(an_apdu.an_apdu.pdu); + var PDU_ML3_NW_MS dtap_mt := dec_PDU_ML3_NW_MS(bssap_dtap_mt.pdu.dtap); + log("Expecting", ussd_rsp); + log("Got", dtap_mt); + if (not match(dtap_mt, ussd_rsp)) { + setverdict(fail, "Unexpected GSUP message. Expected USSD response in DTAP, got", gsup_ussd_rsp); + mtc.stop; + } + } + /**********************************/ + + + /* inter-MSC handover back to the first MSC */ + f_create_bssmap_exp_handoverRequest(193); + cil := { cIl_CGI := { ts_BSSMAP_CI_CGI('262'H, '42'H, 23, 42) } }; + + /* old BSS sends Handover Required, via inter-MSC E link: like + * BSSAP.send(ts_BSSMAP_HandoverRequired(cause, cil)); + * but via GSUP */ + GSUP.send(ts_GSUP_E_AN_APDU(OSMO_GSUP_MSGT_E_PREPARE_SUBSEQUENT_HANDOVER_REQUEST, + pars.imsi, remote_msc_name, local_msc_name, + valueof(t_GSUP_AN_APDU(OSMO_GSUP_AN_PROTO_48006, + enc_PDU_BSSAP(valueof(ts_BSSMAP_HandoverRequired(cause, cil))) + )) + )); + + /* MSC asks local BSS to prepare Handover to it */ + BSSAP.receive(tr_BSSMAP_HandoverRequest); + + /* Make sure the new BSSAP conn continues with the correct N_SD sequence numbers */ + f_bssmap_continue_after_n_sd(last_n_sd); + + /* new BSS composes a RR Handover Command */ + rr_ho_cmd := valueof(ts_RR_HandoverCommand); + rr_ho_cmd_enc := enc_PDU_ML3_NW_MS(rr_ho_cmd); + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + BSSAP.send(ts_BSSMAP_HandoverRequestAcknowledge(rr_ho_cmd_enc, lengthof(rr_ho_cmd_enc), + tla, ts_BSSMAP_IE_SpeechCodec({ts_CodecFR}))); + + /* HandoverCommand goes out via remote MSC-I */ + var GSUP_PDU prep_subsq_ho_res; + GSUP.receive(tr_GSUP_E_AN_APDU(OSMO_GSUP_MSGT_E_PREPARE_SUBSEQUENT_HANDOVER_RESULT, + pars.imsi, destination_name := remote_msc_name)) -> value prep_subsq_ho_res; + + /* MS shows up at the local BSS */ + BSSAP.send(ts_BSSMAP_HandoverDetect); + f_sleep(0.1); + BSSAP.send(ts_BSSMAP_HandoverComplete); + + /* Handover Succeeded message */ + GSUP.receive(tr_GSUP_E_AN_APDU(OSMO_GSUP_MSGT_E_FORWARD_ACCESS_SIGNALLING_REQUEST, + pars.imsi, destination_name := remote_msc_name)); + + /* MS has handovered to here, Clear Command goes out via remote MSC-I -- in form of a GSUP Close. */ + GSUP.receive(tr_GSUP_E_NO_PDU(OSMO_GSUP_MSGT_E_CLOSE, + pars.imsi, destination_name := remote_msc_name)); + + /* Handover ends successfully. Call goes on for a little longer and then we hang up. */ + + f_sleep(1.0); + deactivate(ack_mdcx); + + /* FIXME: the inter-MSC call has put a number of MNCC messages in the queue, which above code should expect and + * clear out. The f_call_hangup() expects an MNCC_REL_IND, so, for the time being, just clear the MNCC messages + * before starting the call hangup. Instead of this, the individual messages should be tested for above. */ + MNCC.clear; + + var default ccrel := activate(as_optional_cc_rel(cpars, true)); + f_call_hangup(cpars, true); + f_sleep(1.0); + deactivate(ccrel); + + setverdict(pass); +} +testcase TC_ho_inter_msc_out() runs on MTC_CT { + var BSC_ConnHdlr vc_conn; + f_init(1); + + var BSC_ConnHdlrPars pars := f_init_pars(54); + + vc_conn := f_start_handler_with_pars(refers(f_tc_ho_inter_msc_out), pars, 0); + vc_conn.done; +} + + control { execute( TC_cr_before_reset() ); execute( TC_lu_imsi_noauth_tmsi() ); @@ -4870,6 +5303,11 @@ execute( TC_sgsap_lu_and_mt_call() ); execute( TC_sgsap_vlr_failure() ); + execute( TC_ho_inter_bsc_unknown_cell() ); + execute( TC_ho_inter_bsc() ); + + execute( TC_ho_inter_msc_out() ); + /* Run this last: at the time of writing this test crashes the MSC */ execute( TC_lu_imsi_auth_tmsi_encr_3_1_log_msc_debug() ); execute( TC_gsup_mt_multi_part_sms() ); -- To view, visit https://gerrit.osmocom.org/13617 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I7d76c982ad4e198534fa488609c41e8892b268ab Gerrit-Change-Number: 13617 Gerrit-PatchSet: 6 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 23:30:29 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 23:30:29 +0000 Subject: Change in osmo-msc[master]: fix regression: fix internal MNCC operation Message-ID: Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/13931 Change subject: fix regression: fix internal MNCC operation ...................................................................... fix regression: fix internal MNCC operation While developing the inter-MSC handover refactoring, I was annoyed by the fact that mncc_tx_to_cc() receives an MNCC message struct containing a msg_type, as well as a separate msg_type argument, which may deviate from each other. So, as a first step I wanted to make sure that all callers send identical values for both by inserting an OSMO_ASSERT(msg_type == msg->msg_type). Later I was going to remove the separate msg_type argument. I then forgot to - carry on to remove the argument and - to actually test with internal MNCC (it so happens that all of our ttcn3 tests also use external MNCC). As a result, the "large refactoring" patch for inter-MSC Handover breaks internal MNCC operation. Fix that: remove the separate msg_type argument and make sure that all callers of mncc_tx_to_cc() indeed pass the desired msg_type in msg->msg_type, and hence also remove the odd duality of arguments. Various functions in mncc_builtin.c also exhibit this separate msg_type argument, which are all unused and make absolutely no sense. Remove those as well. Related: OS#3989 Change-Id: I966ce764796982709ea3312e76988a95257acb8d --- M include/osmocom/msc/gsm_04_08.h M src/libmsc/gsm_04_08_cc.c M src/libmsc/mncc_builtin.c M src/libmsc/mncc_sock.c M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_tests.c 6 files changed, 57 insertions(+), 39 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/31/13931/1 diff --git a/include/osmocom/msc/gsm_04_08.h b/include/osmocom/msc/gsm_04_08.h index 47747cb..661da42 100644 --- a/include/osmocom/msc/gsm_04_08.h +++ b/include/osmocom/msc/gsm_04_08.h @@ -45,7 +45,7 @@ int gsm48_send_rr_ass_cmd(struct gsm_lchan *dest_lchan, struct gsm_lchan *lchan, uint8_t power_class); int gsm48_send_ho_cmd(struct gsm_lchan *old_lchan, struct gsm_lchan *new_lchan, uint8_t power_command, uint8_t ho_ref); -int mncc_tx_to_cc(struct gsm_network *net, int msg_type, void *arg); +int mncc_tx_to_cc(struct gsm_network *net, void *arg); /* convert a ASCII phone number to call-control BCD */ int encode_bcd_number(uint8_t *bcd_lv, uint8_t max_len, diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c index 0624d56..2869bba 100644 --- a/src/libmsc/gsm_04_08_cc.c +++ b/src/libmsc/gsm_04_08_cc.c @@ -2010,11 +2010,10 @@ } /* Demux incoming genuine calls to GSM CC from MNCC forwarding for inter-MSC handover */ -int mncc_tx_to_cc(struct gsm_network *net, int msg_type, void *arg) +int mncc_tx_to_cc(struct gsm_network *net, void *arg) { const union mncc_msg *msg = arg; struct mncc_call *mncc_call = NULL; - OSMO_ASSERT(msg_type == msg->msg_type); if (msg->msg_type == MNCC_SETUP_REQ) { /* Incoming call to forward for inter-MSC Handover? */ diff --git a/src/libmsc/mncc_builtin.c b/src/libmsc/mncc_builtin.c index 6dd7e35..5754976 100644 --- a/src/libmsc/mncc_builtin.c +++ b/src/libmsc/mncc_builtin.c @@ -67,7 +67,7 @@ } /* on incoming call, look up database and send setup to remote subscr. */ -static int mncc_setup_ind(struct gsm_call *call, int msg_type, +static int mncc_setup_ind(struct gsm_call *call, struct gsm_mncc *setup) { struct gsm_mncc mncc; @@ -116,29 +116,33 @@ /* send call proceeding */ memset(&mncc, 0, sizeof(struct gsm_mncc)); mncc.callref = call->callref; + mncc.msg_type = MNCC_CALL_PROC_REQ; DEBUGCC(call, remote, "Accepting call.\n"); - mncc_tx_to_cc(call->net, MNCC_CALL_PROC_REQ, &mncc); + mncc_tx_to_cc(call->net, &mncc); /* modify mode */ memset(&mncc, 0, sizeof(struct gsm_mncc)); mncc.callref = call->callref; + mncc.msg_type = MNCC_LCHAN_MODIFY; DEBUGCC(call, remote, "Modify channel mode.\n"); - mncc_tx_to_cc(call->net, MNCC_LCHAN_MODIFY, &mncc); + mncc_tx_to_cc(call->net, &mncc); /* send setup to remote */ // setup->fields |= MNCC_F_SIGNAL; // setup->signal = GSM48_SIGNAL_DIALTONE; setup->callref = remote->callref; + setup->msg_type = MNCC_SETUP_REQ; DEBUGCC(call, remote, "Forwarding SETUP to remote.\n"); - return mncc_tx_to_cc(remote->net, MNCC_SETUP_REQ, setup); + return mncc_tx_to_cc(remote->net, setup); out_reject: - mncc_tx_to_cc(call->net, MNCC_REJ_REQ, &mncc); + mncc.msg_type = MNCC_REJ_REQ; + mncc_tx_to_cc(call->net, &mncc); free_call(call); return 0; } -static int mncc_alert_ind(struct gsm_call *call, int msg_type, +static int mncc_alert_ind(struct gsm_call *call, struct gsm_mncc *alert) { struct gsm_call *remote; @@ -147,11 +151,12 @@ if (!(remote = get_call_ref(call->remote_ref))) return 0; alert->callref = remote->callref; + alert->msg_type = MNCC_ALERT_REQ; DEBUGCC(call, remote, "Forwarding ALERT to remote.\n"); - return mncc_tx_to_cc(remote->net, MNCC_ALERT_REQ, alert); + return mncc_tx_to_cc(remote->net, alert); } -static int mncc_notify_ind(struct gsm_call *call, int msg_type, +static int mncc_notify_ind(struct gsm_call *call, struct gsm_mncc *notify) { struct gsm_call *remote; @@ -160,11 +165,12 @@ if (!(remote = get_call_ref(call->remote_ref))) return 0; notify->callref = remote->callref; + notify->msg_type = MNCC_NOTIFY_REQ; DEBUGCC(call, remote, "Forwarding NOTIF to remote.\n"); - return mncc_tx_to_cc(remote->net, MNCC_NOTIFY_REQ, notify); + return mncc_tx_to_cc(remote->net, notify); } -static int mncc_setup_cnf(struct gsm_call *call, int msg_type, +static int mncc_setup_cnf(struct gsm_call *call, struct gsm_mncc *connect) { struct gsm_mncc connect_ack; @@ -173,26 +179,29 @@ /* acknowledge connect */ memset(&connect_ack, 0, sizeof(struct gsm_mncc)); + connect_ack.msg_type = MNCC_SETUP_COMPL_REQ; connect_ack.callref = call->callref; DEBUGP(DMNCC, "(call %x) Acknowledge SETUP.\n", call->callref); - mncc_tx_to_cc(call->net, MNCC_SETUP_COMPL_REQ, &connect_ack); + mncc_tx_to_cc(call->net, &connect_ack); /* send connect message to remote */ if (!(remote = get_call_ref(call->remote_ref))) return 0; + connect->msg_type = MNCC_SETUP_RSP; connect->callref = remote->callref; DEBUGCC(call, remote, "Sending CONNECT to remote.\n"); - mncc_tx_to_cc(remote->net, MNCC_SETUP_RSP, connect); + mncc_tx_to_cc(remote->net, connect); /* bridge tch */ + bridge.msg_type = MNCC_BRIDGE; bridge.callref[0] = call->callref; bridge.callref[1] = call->remote_ref; DEBUGCC(call, remote, "Bridging with remote.\n"); - return mncc_tx_to_cc(call->net, MNCC_BRIDGE, &bridge); + return mncc_tx_to_cc(call->net, &bridge); } -static int mncc_disc_ind(struct gsm_call *call, int msg_type, +static int mncc_disc_ind(struct gsm_call *call, struct gsm_mncc *disc) { struct gsm_call *remote; @@ -200,18 +209,20 @@ /* send release */ DEBUGP(DMNCC, "(call %x) Releasing call with cause %d\n", call->callref, disc->cause.value); - mncc_tx_to_cc(call->net, MNCC_REL_REQ, disc); + disc->msg_type = MNCC_REL_REQ; + mncc_tx_to_cc(call->net, disc); /* send disc to remote */ if (!(remote = get_call_ref(call->remote_ref))) { return 0; } + disc->msg_type = MNCC_DISC_REQ; disc->callref = remote->callref; DEBUGCC(call, remote, "Disconnecting remote with cause %d\n", disc->cause.value); - return mncc_tx_to_cc(remote->net, MNCC_DISC_REQ, disc); + return mncc_tx_to_cc(remote->net, disc); } -static int mncc_rel_ind(struct gsm_call *call, int msg_type, struct gsm_mncc *rel) +static int mncc_rel_ind(struct gsm_call *call, struct gsm_mncc *rel) { struct gsm_call *remote; @@ -221,6 +232,7 @@ return 0; } + rel->msg_type = MNCC_REL_REQ; rel->callref = remote->callref; DEBUGCC(call, remote, "Releasing remote with cause %d\n", rel->cause.value); @@ -230,12 +242,12 @@ * it and then we will end up with a double free and a crash */ free_call(call); - mncc_tx_to_cc(remote->net, MNCC_REL_REQ, rel); + mncc_tx_to_cc(remote->net, rel); return 0; } -static int mncc_rel_cnf(struct gsm_call *call, int msg_type, struct gsm_mncc *rel) +static int mncc_rel_cnf(struct gsm_call *call, struct gsm_mncc *rel) { free_call(call); return 0; @@ -273,10 +285,11 @@ struct gsm_mncc rel; memset(&rel, 0, sizeof(struct gsm_mncc)); + rel.msg_type = MNCC_REL_REQ; rel.callref = callref; mncc_set_cause(&rel, GSM48_CAUSE_LOC_PRN_S_LU, GSM48_CC_CAUSE_RESOURCE_UNAVAIL); - mncc_tx_to_cc(net, MNCC_REL_REQ, &rel); + mncc_tx_to_cc(net, &rel); goto out_free; } llist_add_tail(&call->entry, &call_list); @@ -296,47 +309,51 @@ switch(msg_type) { case MNCC_SETUP_IND: - rc = mncc_setup_ind(call, msg_type, arg); + rc = mncc_setup_ind(call, arg); break; case MNCC_SETUP_CNF: - rc = mncc_setup_cnf(call, msg_type, arg); + rc = mncc_setup_cnf(call, arg); break; case MNCC_SETUP_COMPL_IND: break; case MNCC_CALL_CONF_IND: /* we now need to MODIFY the channel */ - mncc_tx_to_cc(call->net, MNCC_LCHAN_MODIFY, data); + data->msg_type = MNCC_LCHAN_MODIFY; + mncc_tx_to_cc(call->net, data); break; case MNCC_ALERT_IND: - rc = mncc_alert_ind(call, msg_type, arg); + rc = mncc_alert_ind(call, arg); break; case MNCC_NOTIFY_IND: - rc = mncc_notify_ind(call, msg_type, arg); + rc = mncc_notify_ind(call, arg); break; case MNCC_DISC_IND: - rc = mncc_disc_ind(call, msg_type, arg); + rc = mncc_disc_ind(call, arg); break; case MNCC_REL_IND: case MNCC_REJ_IND: - rc = mncc_rel_ind(call, msg_type, arg); + rc = mncc_rel_ind(call, arg); break; case MNCC_REL_CNF: - rc = mncc_rel_cnf(call, msg_type, arg); + rc = mncc_rel_cnf(call, arg); break; case MNCC_FACILITY_IND: break; case MNCC_START_DTMF_IND: - rc = mncc_tx_to_cc(net, MNCC_START_DTMF_REJ, data); + data->msg_type = MNCC_START_DTMF_REJ; + rc = mncc_tx_to_cc(net, data); break; case MNCC_STOP_DTMF_IND: - rc = mncc_tx_to_cc(net, MNCC_STOP_DTMF_RSP, data); + data->msg_type = MNCC_STOP_DTMF_RSP; + rc = mncc_tx_to_cc(net, data); break; case MNCC_MODIFY_IND: mncc_set_cause(data, GSM48_CAUSE_LOC_PRN_S_LU, GSM48_CC_CAUSE_SERV_OPT_UNIMPL); DEBUGP(DMNCC, "(call %x) Rejecting MODIFY with cause %d\n", call->callref, data->cause.value); - rc = mncc_tx_to_cc(net, MNCC_MODIFY_REJ, data); + data->msg_type = MNCC_MODIFY_REJ; + rc = mncc_tx_to_cc(net, data); break; case MNCC_MODIFY_CNF: break; @@ -345,14 +362,16 @@ GSM48_CC_CAUSE_SERV_OPT_UNIMPL); DEBUGP(DMNCC, "(call %x) Rejecting HOLD with cause %d\n", call->callref, data->cause.value); - rc = mncc_tx_to_cc(net, MNCC_HOLD_REJ, data); + data->msg_type = MNCC_HOLD_REJ; + rc = mncc_tx_to_cc(net, data); break; case MNCC_RETRIEVE_IND: mncc_set_cause(data, GSM48_CAUSE_LOC_PRN_S_LU, GSM48_CC_CAUSE_SERV_OPT_UNIMPL); DEBUGP(DMNCC, "(call %x) Rejecting RETRIEVE with cause %d\n", call->callref, data->cause.value); - rc = mncc_tx_to_cc(net, MNCC_RETRIEVE_REJ, data); + data->msg_type = MNCC_RETRIEVE_REJ; + rc = mncc_tx_to_cc(net, data); break; default: LOGP(DMNCC, LOGL_NOTICE, "(call %x) Message unhandled\n", callref); diff --git a/src/libmsc/mncc_sock.c b/src/libmsc/mncc_sock.c index b2739e8..0a4e99b 100644 --- a/src/libmsc/mncc_sock.c +++ b/src/libmsc/mncc_sock.c @@ -118,7 +118,7 @@ rc = mncc_prim_check(mncc_prim, rc); if (rc == 0) - rc = mncc_tx_to_cc(state->net, mncc_prim->msg_type, mncc_prim); + rc = mncc_tx_to_cc(state->net, mncc_prim); /* as we always synchronously process the message in mncc_send() and * its callbacks, we can free the message here. */ diff --git a/tests/msc_vlr/msc_vlr_test_call.c b/tests/msc_vlr/msc_vlr_test_call.c index 9ca3bf1..b31239e 100644 --- a/tests/msc_vlr/msc_vlr_test_call.c +++ b/tests/msc_vlr/msc_vlr_test_call.c @@ -29,7 +29,7 @@ static void mncc_sends_to_cc(uint32_t msg_type, struct gsm_mncc *mncc) { mncc->msg_type = msg_type; - mncc_tx_to_cc(net, msg_type, mncc); + mncc_tx_to_cc(net, mncc); } /* diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 9c3ecb7..81ac3f7 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -680,7 +680,7 @@ log("MNCC: callref 0x%x: Call Release triggering %s", mncc->callref, get_mncc_name(on_call_release_mncc_sends_to_cc_data->msg_type)); - mncc_tx_to_cc(net, on_call_release_mncc_sends_to_cc_data->msg_type, + mncc_tx_to_cc(net, on_call_release_mncc_sends_to_cc_data); on_call_release_mncc_sends_to_cc_data = NULL; -- To view, visit https://gerrit.osmocom.org/13931 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I966ce764796982709ea3312e76988a95257acb8d Gerrit-Change-Number: 13931 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 23:38:54 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 23:38:54 +0000 Subject: Change in osmo-msc[master]: fix regression: fix internal MNCC operation In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13931 ) Change subject: fix regression: fix internal MNCC operation ...................................................................... Patch Set 1: Code-Review+2 I manually tested to verify that a voice call via internal MNCC works with this patch. Since this fixes a regression, I am merging this now. Nevertheless, as always, this is still open to review to be applied in a follow-up and/or revert. -- To view, visit https://gerrit.osmocom.org/13931 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I966ce764796982709ea3312e76988a95257acb8d Gerrit-Change-Number: 13931 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr Gerrit-CC: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 08 May 2019 23:38:54 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 8 23:40:29 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 8 May 2019 23:40:29 +0000 Subject: Change in osmo-msc[master]: fix regression: fix internal MNCC operation In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/13931 ) Change subject: fix regression: fix internal MNCC operation ...................................................................... fix regression: fix internal MNCC operation While developing the inter-MSC handover refactoring, I was annoyed by the fact that mncc_tx_to_cc() receives an MNCC message struct containing a msg_type, as well as a separate msg_type argument, which may deviate from each other. So, as a first step I wanted to make sure that all callers send identical values for both by inserting an OSMO_ASSERT(msg_type == msg->msg_type). Later I was going to remove the separate msg_type argument. I then forgot to - carry on to remove the argument and - to actually test with internal MNCC (it so happens that all of our ttcn3 tests also use external MNCC). As a result, the "large refactoring" patch for inter-MSC Handover breaks internal MNCC operation. Fix that: remove the separate msg_type argument and make sure that all callers of mncc_tx_to_cc() indeed pass the desired msg_type in msg->msg_type, and hence also remove the odd duality of arguments. Various functions in mncc_builtin.c also exhibit this separate msg_type argument, which are all unused and make absolutely no sense. Remove those as well. Related: OS#3989 Change-Id: I966ce764796982709ea3312e76988a95257acb8d --- M include/osmocom/msc/gsm_04_08.h M src/libmsc/gsm_04_08_cc.c M src/libmsc/mncc_builtin.c M src/libmsc/mncc_sock.c M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_tests.c 6 files changed, 57 insertions(+), 39 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/msc/gsm_04_08.h b/include/osmocom/msc/gsm_04_08.h index 47747cb..661da42 100644 --- a/include/osmocom/msc/gsm_04_08.h +++ b/include/osmocom/msc/gsm_04_08.h @@ -45,7 +45,7 @@ int gsm48_send_rr_ass_cmd(struct gsm_lchan *dest_lchan, struct gsm_lchan *lchan, uint8_t power_class); int gsm48_send_ho_cmd(struct gsm_lchan *old_lchan, struct gsm_lchan *new_lchan, uint8_t power_command, uint8_t ho_ref); -int mncc_tx_to_cc(struct gsm_network *net, int msg_type, void *arg); +int mncc_tx_to_cc(struct gsm_network *net, void *arg); /* convert a ASCII phone number to call-control BCD */ int encode_bcd_number(uint8_t *bcd_lv, uint8_t max_len, diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c index 0624d56..2869bba 100644 --- a/src/libmsc/gsm_04_08_cc.c +++ b/src/libmsc/gsm_04_08_cc.c @@ -2010,11 +2010,10 @@ } /* Demux incoming genuine calls to GSM CC from MNCC forwarding for inter-MSC handover */ -int mncc_tx_to_cc(struct gsm_network *net, int msg_type, void *arg) +int mncc_tx_to_cc(struct gsm_network *net, void *arg) { const union mncc_msg *msg = arg; struct mncc_call *mncc_call = NULL; - OSMO_ASSERT(msg_type == msg->msg_type); if (msg->msg_type == MNCC_SETUP_REQ) { /* Incoming call to forward for inter-MSC Handover? */ diff --git a/src/libmsc/mncc_builtin.c b/src/libmsc/mncc_builtin.c index 6dd7e35..5754976 100644 --- a/src/libmsc/mncc_builtin.c +++ b/src/libmsc/mncc_builtin.c @@ -67,7 +67,7 @@ } /* on incoming call, look up database and send setup to remote subscr. */ -static int mncc_setup_ind(struct gsm_call *call, int msg_type, +static int mncc_setup_ind(struct gsm_call *call, struct gsm_mncc *setup) { struct gsm_mncc mncc; @@ -116,29 +116,33 @@ /* send call proceeding */ memset(&mncc, 0, sizeof(struct gsm_mncc)); mncc.callref = call->callref; + mncc.msg_type = MNCC_CALL_PROC_REQ; DEBUGCC(call, remote, "Accepting call.\n"); - mncc_tx_to_cc(call->net, MNCC_CALL_PROC_REQ, &mncc); + mncc_tx_to_cc(call->net, &mncc); /* modify mode */ memset(&mncc, 0, sizeof(struct gsm_mncc)); mncc.callref = call->callref; + mncc.msg_type = MNCC_LCHAN_MODIFY; DEBUGCC(call, remote, "Modify channel mode.\n"); - mncc_tx_to_cc(call->net, MNCC_LCHAN_MODIFY, &mncc); + mncc_tx_to_cc(call->net, &mncc); /* send setup to remote */ // setup->fields |= MNCC_F_SIGNAL; // setup->signal = GSM48_SIGNAL_DIALTONE; setup->callref = remote->callref; + setup->msg_type = MNCC_SETUP_REQ; DEBUGCC(call, remote, "Forwarding SETUP to remote.\n"); - return mncc_tx_to_cc(remote->net, MNCC_SETUP_REQ, setup); + return mncc_tx_to_cc(remote->net, setup); out_reject: - mncc_tx_to_cc(call->net, MNCC_REJ_REQ, &mncc); + mncc.msg_type = MNCC_REJ_REQ; + mncc_tx_to_cc(call->net, &mncc); free_call(call); return 0; } -static int mncc_alert_ind(struct gsm_call *call, int msg_type, +static int mncc_alert_ind(struct gsm_call *call, struct gsm_mncc *alert) { struct gsm_call *remote; @@ -147,11 +151,12 @@ if (!(remote = get_call_ref(call->remote_ref))) return 0; alert->callref = remote->callref; + alert->msg_type = MNCC_ALERT_REQ; DEBUGCC(call, remote, "Forwarding ALERT to remote.\n"); - return mncc_tx_to_cc(remote->net, MNCC_ALERT_REQ, alert); + return mncc_tx_to_cc(remote->net, alert); } -static int mncc_notify_ind(struct gsm_call *call, int msg_type, +static int mncc_notify_ind(struct gsm_call *call, struct gsm_mncc *notify) { struct gsm_call *remote; @@ -160,11 +165,12 @@ if (!(remote = get_call_ref(call->remote_ref))) return 0; notify->callref = remote->callref; + notify->msg_type = MNCC_NOTIFY_REQ; DEBUGCC(call, remote, "Forwarding NOTIF to remote.\n"); - return mncc_tx_to_cc(remote->net, MNCC_NOTIFY_REQ, notify); + return mncc_tx_to_cc(remote->net, notify); } -static int mncc_setup_cnf(struct gsm_call *call, int msg_type, +static int mncc_setup_cnf(struct gsm_call *call, struct gsm_mncc *connect) { struct gsm_mncc connect_ack; @@ -173,26 +179,29 @@ /* acknowledge connect */ memset(&connect_ack, 0, sizeof(struct gsm_mncc)); + connect_ack.msg_type = MNCC_SETUP_COMPL_REQ; connect_ack.callref = call->callref; DEBUGP(DMNCC, "(call %x) Acknowledge SETUP.\n", call->callref); - mncc_tx_to_cc(call->net, MNCC_SETUP_COMPL_REQ, &connect_ack); + mncc_tx_to_cc(call->net, &connect_ack); /* send connect message to remote */ if (!(remote = get_call_ref(call->remote_ref))) return 0; + connect->msg_type = MNCC_SETUP_RSP; connect->callref = remote->callref; DEBUGCC(call, remote, "Sending CONNECT to remote.\n"); - mncc_tx_to_cc(remote->net, MNCC_SETUP_RSP, connect); + mncc_tx_to_cc(remote->net, connect); /* bridge tch */ + bridge.msg_type = MNCC_BRIDGE; bridge.callref[0] = call->callref; bridge.callref[1] = call->remote_ref; DEBUGCC(call, remote, "Bridging with remote.\n"); - return mncc_tx_to_cc(call->net, MNCC_BRIDGE, &bridge); + return mncc_tx_to_cc(call->net, &bridge); } -static int mncc_disc_ind(struct gsm_call *call, int msg_type, +static int mncc_disc_ind(struct gsm_call *call, struct gsm_mncc *disc) { struct gsm_call *remote; @@ -200,18 +209,20 @@ /* send release */ DEBUGP(DMNCC, "(call %x) Releasing call with cause %d\n", call->callref, disc->cause.value); - mncc_tx_to_cc(call->net, MNCC_REL_REQ, disc); + disc->msg_type = MNCC_REL_REQ; + mncc_tx_to_cc(call->net, disc); /* send disc to remote */ if (!(remote = get_call_ref(call->remote_ref))) { return 0; } + disc->msg_type = MNCC_DISC_REQ; disc->callref = remote->callref; DEBUGCC(call, remote, "Disconnecting remote with cause %d\n", disc->cause.value); - return mncc_tx_to_cc(remote->net, MNCC_DISC_REQ, disc); + return mncc_tx_to_cc(remote->net, disc); } -static int mncc_rel_ind(struct gsm_call *call, int msg_type, struct gsm_mncc *rel) +static int mncc_rel_ind(struct gsm_call *call, struct gsm_mncc *rel) { struct gsm_call *remote; @@ -221,6 +232,7 @@ return 0; } + rel->msg_type = MNCC_REL_REQ; rel->callref = remote->callref; DEBUGCC(call, remote, "Releasing remote with cause %d\n", rel->cause.value); @@ -230,12 +242,12 @@ * it and then we will end up with a double free and a crash */ free_call(call); - mncc_tx_to_cc(remote->net, MNCC_REL_REQ, rel); + mncc_tx_to_cc(remote->net, rel); return 0; } -static int mncc_rel_cnf(struct gsm_call *call, int msg_type, struct gsm_mncc *rel) +static int mncc_rel_cnf(struct gsm_call *call, struct gsm_mncc *rel) { free_call(call); return 0; @@ -273,10 +285,11 @@ struct gsm_mncc rel; memset(&rel, 0, sizeof(struct gsm_mncc)); + rel.msg_type = MNCC_REL_REQ; rel.callref = callref; mncc_set_cause(&rel, GSM48_CAUSE_LOC_PRN_S_LU, GSM48_CC_CAUSE_RESOURCE_UNAVAIL); - mncc_tx_to_cc(net, MNCC_REL_REQ, &rel); + mncc_tx_to_cc(net, &rel); goto out_free; } llist_add_tail(&call->entry, &call_list); @@ -296,47 +309,51 @@ switch(msg_type) { case MNCC_SETUP_IND: - rc = mncc_setup_ind(call, msg_type, arg); + rc = mncc_setup_ind(call, arg); break; case MNCC_SETUP_CNF: - rc = mncc_setup_cnf(call, msg_type, arg); + rc = mncc_setup_cnf(call, arg); break; case MNCC_SETUP_COMPL_IND: break; case MNCC_CALL_CONF_IND: /* we now need to MODIFY the channel */ - mncc_tx_to_cc(call->net, MNCC_LCHAN_MODIFY, data); + data->msg_type = MNCC_LCHAN_MODIFY; + mncc_tx_to_cc(call->net, data); break; case MNCC_ALERT_IND: - rc = mncc_alert_ind(call, msg_type, arg); + rc = mncc_alert_ind(call, arg); break; case MNCC_NOTIFY_IND: - rc = mncc_notify_ind(call, msg_type, arg); + rc = mncc_notify_ind(call, arg); break; case MNCC_DISC_IND: - rc = mncc_disc_ind(call, msg_type, arg); + rc = mncc_disc_ind(call, arg); break; case MNCC_REL_IND: case MNCC_REJ_IND: - rc = mncc_rel_ind(call, msg_type, arg); + rc = mncc_rel_ind(call, arg); break; case MNCC_REL_CNF: - rc = mncc_rel_cnf(call, msg_type, arg); + rc = mncc_rel_cnf(call, arg); break; case MNCC_FACILITY_IND: break; case MNCC_START_DTMF_IND: - rc = mncc_tx_to_cc(net, MNCC_START_DTMF_REJ, data); + data->msg_type = MNCC_START_DTMF_REJ; + rc = mncc_tx_to_cc(net, data); break; case MNCC_STOP_DTMF_IND: - rc = mncc_tx_to_cc(net, MNCC_STOP_DTMF_RSP, data); + data->msg_type = MNCC_STOP_DTMF_RSP; + rc = mncc_tx_to_cc(net, data); break; case MNCC_MODIFY_IND: mncc_set_cause(data, GSM48_CAUSE_LOC_PRN_S_LU, GSM48_CC_CAUSE_SERV_OPT_UNIMPL); DEBUGP(DMNCC, "(call %x) Rejecting MODIFY with cause %d\n", call->callref, data->cause.value); - rc = mncc_tx_to_cc(net, MNCC_MODIFY_REJ, data); + data->msg_type = MNCC_MODIFY_REJ; + rc = mncc_tx_to_cc(net, data); break; case MNCC_MODIFY_CNF: break; @@ -345,14 +362,16 @@ GSM48_CC_CAUSE_SERV_OPT_UNIMPL); DEBUGP(DMNCC, "(call %x) Rejecting HOLD with cause %d\n", call->callref, data->cause.value); - rc = mncc_tx_to_cc(net, MNCC_HOLD_REJ, data); + data->msg_type = MNCC_HOLD_REJ; + rc = mncc_tx_to_cc(net, data); break; case MNCC_RETRIEVE_IND: mncc_set_cause(data, GSM48_CAUSE_LOC_PRN_S_LU, GSM48_CC_CAUSE_SERV_OPT_UNIMPL); DEBUGP(DMNCC, "(call %x) Rejecting RETRIEVE with cause %d\n", call->callref, data->cause.value); - rc = mncc_tx_to_cc(net, MNCC_RETRIEVE_REJ, data); + data->msg_type = MNCC_RETRIEVE_REJ; + rc = mncc_tx_to_cc(net, data); break; default: LOGP(DMNCC, LOGL_NOTICE, "(call %x) Message unhandled\n", callref); diff --git a/src/libmsc/mncc_sock.c b/src/libmsc/mncc_sock.c index b2739e8..0a4e99b 100644 --- a/src/libmsc/mncc_sock.c +++ b/src/libmsc/mncc_sock.c @@ -118,7 +118,7 @@ rc = mncc_prim_check(mncc_prim, rc); if (rc == 0) - rc = mncc_tx_to_cc(state->net, mncc_prim->msg_type, mncc_prim); + rc = mncc_tx_to_cc(state->net, mncc_prim); /* as we always synchronously process the message in mncc_send() and * its callbacks, we can free the message here. */ diff --git a/tests/msc_vlr/msc_vlr_test_call.c b/tests/msc_vlr/msc_vlr_test_call.c index 9ca3bf1..b31239e 100644 --- a/tests/msc_vlr/msc_vlr_test_call.c +++ b/tests/msc_vlr/msc_vlr_test_call.c @@ -29,7 +29,7 @@ static void mncc_sends_to_cc(uint32_t msg_type, struct gsm_mncc *mncc) { mncc->msg_type = msg_type; - mncc_tx_to_cc(net, msg_type, mncc); + mncc_tx_to_cc(net, mncc); } /* diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 9c3ecb7..81ac3f7 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -680,7 +680,7 @@ log("MNCC: callref 0x%x: Call Release triggering %s", mncc->callref, get_mncc_name(on_call_release_mncc_sends_to_cc_data->msg_type)); - mncc_tx_to_cc(net, on_call_release_mncc_sends_to_cc_data->msg_type, + mncc_tx_to_cc(net, on_call_release_mncc_sends_to_cc_data); on_call_release_mncc_sends_to_cc_data = NULL; -- To view, visit https://gerrit.osmocom.org/13931 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I966ce764796982709ea3312e76988a95257acb8d Gerrit-Change-Number: 13931 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 08:32:03 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 08:32:03 +0000 Subject: Change in osmo-msc[master]: msub_check_for_release(): Initialize msc_role_a_c Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13932 Change subject: msub_check_for_release(): Initialize msc_role_a_c ...................................................................... msub_check_for_release(): Initialize msc_role_a_c This fixes the following compiler error: msub.c: In function ?msub_fsm_active?: msub.c:85:35: error: ?msc_role_a_c? may be used uninitialized in this function [-Werror=maybe-uninitialized] || (msc_role_a_c && msc_role_a_c->ran->type == OSMO_RAT_EUTRAN_SGS))) ~~~~~~~~~~~~^~~~~ msub.c:59:26: note: ?msc_role_a_c? was declared here struct msc_role_common *msc_role_a_c; ^~~~~~~~~~~~ Change-Id: Id518dea77d01ed0518ca7cba6b1b363f1c8e6543 --- M src/libmsc/msub.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/32/13932/1 diff --git a/src/libmsc/msub.c b/src/libmsc/msub.c index 4900732..2021ed8 100644 --- a/src/libmsc/msub.c +++ b/src/libmsc/msub.c @@ -56,7 +56,7 @@ static void msub_check_for_release(struct osmo_fsm_inst *fi) { struct msub *msub = fi->priv; - struct msc_role_common *msc_role_a_c; + struct msc_role_common *msc_role_a_c = NULL; enum msc_role role_idx; int role_present[MSC_ROLES_COUNT] = {}; struct osmo_fsm_inst *child; -- To view, visit https://gerrit.osmocom.org/13932 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id518dea77d01ed0518ca7cba6b1b363f1c8e6543 Gerrit-Change-Number: 13932 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 08:34:46 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 08:34:46 +0000 Subject: Change in libosmo-sccp[master]: stp: Ensure telnet uses STP talloc context, not NULL context Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13933 Change subject: stp: Ensure telnet uses STP talloc context, not NULL context ...................................................................... stp: Ensure telnet uses STP talloc context, not NULL context Change-Id: I38a9538dc93cdcecbeb236f0eadc3d675cf20b5d --- M stp/stp_main.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/33/13933/1 diff --git a/stp/stp_main.c b/stp/stp_main.c index 0554b4a..e7f4f38 100644 --- a/stp/stp_main.c +++ b/stp/stp_main.c @@ -190,7 +190,7 @@ osmo_ss7_bind_all_instances(); - rc = telnet_init_dynif(NULL, NULL, vty_get_bind_addr(), OSMO_VTY_PORT_STP); + rc = telnet_init_dynif(tall_stp_ctx, NULL, vty_get_bind_addr(), OSMO_VTY_PORT_STP); if (rc < 0) { perror("Error binding VTY port\n"); exit(1); -- To view, visit https://gerrit.osmocom.org/13933 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I38a9538dc93cdcecbeb236f0eadc3d675cf20b5d Gerrit-Change-Number: 13933 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 08:42:21 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 08:42:21 +0000 Subject: Change in osmo-msc[master]: msub_check_for_release(): Initialize msc_role_a_c In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13932 ) Change subject: msub_check_for_release(): Initialize msc_role_a_c ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13932 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id518dea77d01ed0518ca7cba6b1b363f1c8e6543 Gerrit-Change-Number: 13932 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Comment-Date: Thu, 09 May 2019 08:42:21 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 08:42:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 08:42:47 +0000 Subject: Change in osmo-msc[master]: msub_check_for_release(): Initialize msc_role_a_c In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13932 ) Change subject: msub_check_for_release(): Initialize msc_role_a_c ...................................................................... Patch Set 1: merging this quickly to fix our osmo-msc master build in jenkins. If the fix is wrong, please follow-up with incremental change! -- To view, visit https://gerrit.osmocom.org/13932 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id518dea77d01ed0518ca7cba6b1b363f1c8e6543 Gerrit-Change-Number: 13932 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Comment-Date: Thu, 09 May 2019 08:42:47 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 08:42:49 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 08:42:49 +0000 Subject: Change in osmo-msc[master]: msub_check_for_release(): Initialize msc_role_a_c In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13932 ) Change subject: msub_check_for_release(): Initialize msc_role_a_c ...................................................................... msub_check_for_release(): Initialize msc_role_a_c This fixes the following compiler error: msub.c: In function ?msub_fsm_active?: msub.c:85:35: error: ?msc_role_a_c? may be used uninitialized in this function [-Werror=maybe-uninitialized] || (msc_role_a_c && msc_role_a_c->ran->type == OSMO_RAT_EUTRAN_SGS))) ~~~~~~~~~~~~^~~~~ msub.c:59:26: note: ?msc_role_a_c? was declared here struct msc_role_common *msc_role_a_c; ^~~~~~~~~~~~ Change-Id: Id518dea77d01ed0518ca7cba6b1b363f1c8e6543 --- M src/libmsc/msub.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/msub.c b/src/libmsc/msub.c index 4900732..2021ed8 100644 --- a/src/libmsc/msub.c +++ b/src/libmsc/msub.c @@ -56,7 +56,7 @@ static void msub_check_for_release(struct osmo_fsm_inst *fi) { struct msub *msub = fi->priv; - struct msc_role_common *msc_role_a_c; + struct msc_role_common *msc_role_a_c = NULL; enum msc_role role_idx; int role_present[MSC_ROLES_COUNT] = {}; struct osmo_fsm_inst *child; -- To view, visit https://gerrit.osmocom.org/13932 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id518dea77d01ed0518ca7cba6b1b363f1c8e6543 Gerrit-Change-Number: 13932 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 08:43:06 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 08:43:06 +0000 Subject: Change in libosmo-sccp[master]: stp: Ensure telnet uses STP talloc context, not NULL context In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13933 ) Change subject: stp: Ensure telnet uses STP talloc context, not NULL context ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13933 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I38a9538dc93cdcecbeb236f0eadc3d675cf20b5d Gerrit-Change-Number: 13933 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 09 May 2019 08:43:06 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 08:43:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 08:43:08 +0000 Subject: Change in libosmo-sccp[master]: stp: Ensure telnet uses STP talloc context, not NULL context In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13933 ) Change subject: stp: Ensure telnet uses STP talloc context, not NULL context ...................................................................... stp: Ensure telnet uses STP talloc context, not NULL context Change-Id: I38a9538dc93cdcecbeb236f0eadc3d675cf20b5d --- M stp/stp_main.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/stp/stp_main.c b/stp/stp_main.c index 0554b4a..e7f4f38 100644 --- a/stp/stp_main.c +++ b/stp/stp_main.c @@ -190,7 +190,7 @@ osmo_ss7_bind_all_instances(); - rc = telnet_init_dynif(NULL, NULL, vty_get_bind_addr(), OSMO_VTY_PORT_STP); + rc = telnet_init_dynif(tall_stp_ctx, NULL, vty_get_bind_addr(), OSMO_VTY_PORT_STP); if (rc < 0) { perror("Error binding VTY port\n"); exit(1); -- To view, visit https://gerrit.osmocom.org/13933 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I38a9538dc93cdcecbeb236f0eadc3d675cf20b5d Gerrit-Change-Number: 13933 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 08:54:43 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 9 May 2019 08:54:43 +0000 Subject: Change in osmo-msc[master]: SMPP: Don't accept password or system-id exceeding spec length In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13930 ) Change subject: SMPP: Don't accept password or system-id exceeding spec length ...................................................................... Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/13930/1/src/libmsc/smpp_smsc.h File src/libmsc/smpp_smsc.h: https://gerrit.osmocom.org/#/c/13930/1/src/libmsc/smpp_smsc.h at 16 PS1, Line 16: #define SMPP_SYS_ID_LEN 15 Same define is defined in smpp_mirror.c, you want to fix that one too. Furthermore, smpp_mirror.c uses wrong define for password: src/utils/smpp_mirror.c 24:#define SMPP_SYS_ID_LEN 16 43: char system_id[SMPP_SYS_ID_LEN+1]; 44: char password[SMPP_SYS_ID_LEN+1]; -- To view, visit https://gerrit.osmocom.org/13930 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I81ef593e84bf1e15f6746386fc145495fae29354 Gerrit-Change-Number: 13930 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Thu, 09 May 2019 08:54:43 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 08:58:08 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 9 May 2019 08:58:08 +0000 Subject: Change in libosmocore[master]: Print error message if application fails to call rate_ctr_init() In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13919 ) Change subject: Print error message if application fails to call rate_ctr_init() ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13919 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie8093b66b7e27cf863d2558fe21b2c6e0f3fcdfd Gerrit-Change-Number: 13919 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Thu, 09 May 2019 08:58:08 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 08:59:47 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 9 May 2019 08:59:47 +0000 Subject: Change in libosmocore[master]: Fix osmo_quote_str_c() for strings larger than 32 bytes In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13901 ) Change subject: Fix osmo_quote_str_c() for strings larger than 32 bytes ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13901 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id9bde14166d6674ce4dda36fa9f4ae9217ce5cc2 Gerrit-Change-Number: 13901 Gerrit-PatchSet: 5 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Mykola Shchetinin Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Thu, 09 May 2019 08:59:47 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 10:58:02 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 9 May 2019 10:58:02 +0000 Subject: Change in osmo-msc[master]: comment: apply function renames to message cycle explanation Message-ID: Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/13934 Change subject: comment: apply function renames to message cycle explanation ...................................................................... comment: apply function renames to message cycle explanation The misnomed 'nas_decode' and 'nas_encode' APIs have been renamed to 'ran_decode' and 'ran_encode', which was forgotten in the large comment explaining the message path in sccp_ran.h. Apply the rename there. Change-Id: I742fb4844ac8a9ad76f59883ae9447eb8819b82d --- M include/osmocom/msc/sccp_ran.h 1 file changed, 12 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/34/13934/1 diff --git a/include/osmocom/msc/sccp_ran.h b/include/osmocom/msc/sccp_ran.h index b7da314..f190d91 100644 --- a/include/osmocom/msc/sccp_ran.h +++ b/include/osmocom/msc/sccp_ran.h @@ -13,17 +13,17 @@ * msc_a_up_l3() msc_a_tx_dtap_to_i(dtap_msgb) * ^ | * | v - * msc_a_nas_decode_cb(struct nas_dec_msg) msc_a_nas_enc(struct nas_enc_msg) + * msc_a_ran_decode_cb(struct ran_dec_msg) msc_a_ran_enc(struct ran_enc_msg) * ^ ^ . | * | -Decode NAS- | . NAS v - * | | . ran_infra[type]->nas_encode(struct nas_enc_msg) - * nas_a_decode_l2() nas_iu_decode_l2() . | | + * | | . ran_infra[type]->ran_encode(struct ran_enc_msg) + * ran_a_decode_l2() ran_iu_decode_l2() . | | * ^ ^ . v v - * | | . nas_a_encode() nas_iu_encode() - * ran_infra[type]->nas_dec_l2() | | + * | | . ran_a_encode() ran_iu_encode() + * ran_infra[type]->ran_dec_l2() | | * ^ | -Encode BSSAP/RANAP- | * | v v - * msc_a_nas_dec() msub_tx_an_apdu(from MSC_ROLE_A to MSC_ROLE_I) + * msc_a_ran_dec() msub_tx_an_apdu(from MSC_ROLE_A to MSC_ROLE_I) * ^ | * | MSC-A v * . msc_a FSM . . . . . . . . . . . . . . . . msc_a FSM . . . . . . . . . . @@ -78,12 +78,12 @@ * * MSC-A: * - Receives MSC_A_EV_FROM_I_COMPLETE_LAYER_3 AN-APDU, notices an_proto indicating BSSAP or RANAP. - * - Passes L2 message to ran_infra[]->nas_dec_l2(), which decodes the BSSAP or RANAP. - * - contained information is passed to msc_a_nas_decode_cb(). + * - Passes L2 message to ran_infra[]->ran_dec_l2(), which decodes the BSSAP or RANAP. + * - contained information is passed to msc_a_ran_decode_cb(). * - which msc_a starts Complete-L3 and VLR procedures, * - associates msub with a vlr_subscr, * - sends DTAP requests back down by calling msc_a_tx_dtap_to_i() (possibly other more specialized tx functions) - * - according to ran_infra[]->nas_encode(), the nas_enc_msg gets encoded as BSSAP or RANAP. + * - according to ran_infra[]->ran_encode(), the ran_enc_msg gets encoded as BSSAP or RANAP. * - passes as AN-APDU to MSC-I in MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST signal. * * MSC-I, receiving AN-APDU from local MSC-A: @@ -147,10 +147,10 @@ * * MSC-A role: * - Receives MSC_A_EV_FROM_I_PROCESS_ACCESS_SIGNALLING_REQUEST, notices an_proto indicating BSSAP or RANAP. - * - Passes L2 message to ran_infra[]->nas_dec_l2(), which decodes the BSSAP or RANAP. - * - contained information is passed to msc_a_nas_decode_cb(). + * - Passes L2 message to ran_infra[]->ran_dec_l2(), which decodes the BSSAP or RANAP. + * - contained information is passed to msc_a_ran_decode_cb(). * - sends DTAP requests back down by calling msc_a_tx_dtap_to_i() (possibly other more specialized tx functions) - * - according to ran_infra[]->nas_encode(), the nas_enc_msg gets encoded as BSSAP or RANAP. + * - according to ran_infra[]->ran_encode(), the ran_enc_msg gets encoded as BSSAP or RANAP. * - passes as AN-APDU to MSC-I in MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST signal. * * MSC-I-Remote: -- To view, visit https://gerrit.osmocom.org/13934 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I742fb4844ac8a9ad76f59883ae9447eb8819b82d Gerrit-Change-Number: 13934 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 11:41:48 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 11:41:48 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Don't require protocolExtensions in RANAP Paging Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13935 Change subject: msc: Don't require protocolExtensions in RANAP Paging ...................................................................... msc: Don't require protocolExtensions in RANAP Paging We were using '?' for the protocolExtensions in RANAP messages, which required that such extensions existed. In reality, we want to use '*' which accepts paging messages whether or not there are any protocolExtensions present. As this is the default in all our RANAP receive template, callers don't even need to specify it. This should fix all Iu paging related test failures in MSC_Tests*.ttcn Change-Id: If22e16ecb301c86b9073ffde0af9e03bc85fbcc7 --- M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/35/13935/1 diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 1cec69c..9fc0616 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -766,7 +766,7 @@ if (g_pars.ran_is_geran) { BSSAP.receive(tr_BSSMAP_Paging(g_pars.imsi)); } else { - BSSAP.receive(tr_RANAP_Paging(cs_domain, imsi_hex2oct(g_pars.imsi), ?)); + BSSAP.receive(tr_RANAP_Paging(cs_domain, imsi_hex2oct(g_pars.imsi))); } } diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 3a6711b..52aa685 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -2127,7 +2127,7 @@ setverdict(fail, "paging seems not to stop!"); mtc.stop; } - [not pars.ran_is_geran] BSSAP.receive(tr_RANAP_Paging(cs_domain, imsi_hex2oct(g_pars.imsi), ?)) { + [not pars.ran_is_geran] BSSAP.receive(tr_RANAP_Paging(cs_domain, imsi_hex2oct(g_pars.imsi))) { setverdict(fail, "paging seems not to stop!"); mtc.stop; } @@ -3070,7 +3070,7 @@ [pars.ran_is_geran] BSSAP.receive(tr_BSSMAP_Paging(g_pars.imsi)) { setverdict(pass); } - [not pars.ran_is_geran] BSSAP.receive(tr_RANAP_Paging(cs_domain, imsi_hex2oct(g_pars.imsi), ?)) { + [not pars.ran_is_geran] BSSAP.receive(tr_RANAP_Paging(cs_domain, imsi_hex2oct(g_pars.imsi))) { setverdict(pass); } /* We don't expect anything else */ @@ -3677,7 +3677,7 @@ [g_pars.ran_is_geran] BSSAP.receive(tr_BSSMAP_Paging(g_pars.imsi)); { setverdict(pass); } - [not g_pars.ran_is_geran] BSSAP.receive(tr_RANAP_Paging(cs_domain, imsi_hex2oct(g_pars.imsi), ?)) { + [not g_pars.ran_is_geran] BSSAP.receive(tr_RANAP_Paging(cs_domain, imsi_hex2oct(g_pars.imsi))) { setverdict(pass); } [] SGsAP.receive { -- To view, visit https://gerrit.osmocom.org/13935 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If22e16ecb301c86b9073ffde0af9e03bc85fbcc7 Gerrit-Change-Number: 13935 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 11:41:49 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 11:41:49 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Permit optional authentication before reject/timeout Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13936 Change subject: msc: Permit optional authentication before reject/timeout ...................................................................... msc: Permit optional authentication before reject/timeout Tests like TC_lu_imsi_reject, TC_lu_imsi_timeout_gsup and TC_cmserv_imsi_unknown all expected a reject straight in response to the LU REQ / CM SERV REQ. However, the MSC may very well decide to perform authentication beforehand. It's an implementation detail when a MSC/VLR performs authentication, so the tests should be tolerant to this. This primarily shows up in 3G/Iu/RANAP related tests, as authentication is mandatory there. Change-Id: Icdd3f34eca08092703ab2ba9a8e755e2d609a59b --- M msc/MSC_Tests.ttcn 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/36/13936/1 diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 52aa685..e1e5088 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -583,6 +583,7 @@ f_create_gsup_expect(hex2str(g_pars.imsi)); f_cl3_or_initial_ue(l3_lu); + f_mm_auth(); GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi)); GSUP.send(ts_GSUP_UL_ERR(g_pars.imsi, 23)); alt { @@ -612,6 +613,7 @@ f_create_gsup_expect(hex2str(g_pars.imsi)); f_cl3_or_initial_ue(l3_lu); + f_mm_auth(); GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi)); /* Normally the HLR would need to respond here, but we decide to force a timeout here */ alt { @@ -678,6 +680,7 @@ /* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */ f_cl3_or_initial_ue(l3_info); + f_mm_auth(); timer T := 10.0; T.start; -- To view, visit https://gerrit.osmocom.org/13936 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Icdd3f34eca08092703ab2ba9a8e755e2d609a59b Gerrit-Change-Number: 13936 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 11:41:49 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 11:41:49 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Separate as_GSUP_SAI from f_mm_auth Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13937 Change subject: msc: Separate as_GSUP_SAI from f_mm_auth ...................................................................... msc: Separate as_GSUP_SAI from f_mm_auth In some cases we might want to match on (and perform) the GSUP SEND AUTH INFO without also expecting/performing a MM authentication on the Iu/A interface. Hence it makes sense to split those two. Change-Id: I7b298d589930bab976b478ac84553a6352f25c93 --- M msc/BSC_ConnectionHandler.ttcn 1 file changed, 24 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/37/13937/1 diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 9fc0616..93a311e 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -379,34 +379,39 @@ return l3_info; } +altstep as_GSUP_SAI() runs on BSC_ConnHdlr { +var GSUP_IE auth_tuple; +[] GSUP.receive(tr_GSUP_SAI_REQ(g_pars.imsi)) { + if (g_pars.use_umts_aka) { + g_pars.vec := f_gen_auth_vec_3g(); + auth_tuple := valueof(ts_GSUP_IE_AuthTuple2G3G(g_pars.vec.rand, + g_pars.vec.sres, + g_pars.vec.kc, + g_pars.vec.ik, + g_pars.vec.ck, + g_pars.vec.autn, + g_pars.vec.res)); + GSUP.send(ts_GSUP_SAI_RES(g_pars.imsi, auth_tuple)); + } else { + g_pars.vec := f_gen_auth_vec_2g(); + auth_tuple := valueof(ts_GSUP_IE_AuthTuple2G(g_pars.vec.rand, + g_pars.vec.sres, + g_pars.vec.kc)); + GSUP.send(ts_GSUP_SAI_RES(g_pars.imsi, auth_tuple)); + } + } +} + function f_mm_auth() runs on BSC_ConnHdlr { if (g_pars.net.expect_auth) { - var GSUP_IE auth_tuple; - GSUP.receive(tr_GSUP_SAI_REQ(g_pars.imsi)); - + as_GSUP_SAI(); if (g_pars.use_umts_aka) { - g_pars.vec := f_gen_auth_vec_3g(); - auth_tuple := valueof(ts_GSUP_IE_AuthTuple2G3G(g_pars.vec.rand, - g_pars.vec.sres, - g_pars.vec.kc, - g_pars.vec.ik, - g_pars.vec.ck, - g_pars.vec.autn, - g_pars.vec.res)); - GSUP.send(ts_GSUP_SAI_RES(g_pars.imsi, auth_tuple)); - BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_MM_AUTH_REQ_3G(g_pars.vec.rand, g_pars.vec.autn))); var OCT4 res := substr(g_pars.vec.res, 0, 4); var OCT4 xres := substr(g_pars.vec.res, 4, 4); BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MT_MM_AUTH_RESP_3G(res, xres))); } else { - g_pars.vec := f_gen_auth_vec_2g(); - auth_tuple := valueof(ts_GSUP_IE_AuthTuple2G(g_pars.vec.rand, - g_pars.vec.sres, - g_pars.vec.kc)); - GSUP.send(ts_GSUP_SAI_RES(g_pars.imsi, auth_tuple)); - BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_MM_AUTH_REQ(g_pars.vec.rand))); BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MT_MM_AUTH_RESP_2G(g_pars.vec.sres))); } -- To view, visit https://gerrit.osmocom.org/13937 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I7b298d589930bab976b478ac84553a6352f25c93 Gerrit-Change-Number: 13937 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 11:45:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 11:45:19 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Don't require protocolExtensions in RANAP Paging In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13935 ) Change subject: msc: Don't require protocolExtensions in RANAP Paging ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13935 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If22e16ecb301c86b9073ffde0af9e03bc85fbcc7 Gerrit-Change-Number: 13935 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 09 May 2019 11:45:19 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 11:45:27 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 11:45:27 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Permit optional authentication before reject/timeout In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13936 ) Change subject: msc: Permit optional authentication before reject/timeout ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13936 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icdd3f34eca08092703ab2ba9a8e755e2d609a59b Gerrit-Change-Number: 13936 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 09 May 2019 11:45:27 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 11:45:34 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 11:45:34 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Don't require protocolExtensions in RANAP Paging In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13935 ) Change subject: msc: Don't require protocolExtensions in RANAP Paging ...................................................................... msc: Don't require protocolExtensions in RANAP Paging We were using '?' for the protocolExtensions in RANAP messages, which required that such extensions existed. In reality, we want to use '*' which accepts paging messages whether or not there are any protocolExtensions present. As this is the default in all our RANAP receive template, callers don't even need to specify it. This should fix all Iu paging related test failures in MSC_Tests*.ttcn Change-Id: If22e16ecb301c86b9073ffde0af9e03bc85fbcc7 --- M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 1cec69c..9fc0616 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -766,7 +766,7 @@ if (g_pars.ran_is_geran) { BSSAP.receive(tr_BSSMAP_Paging(g_pars.imsi)); } else { - BSSAP.receive(tr_RANAP_Paging(cs_domain, imsi_hex2oct(g_pars.imsi), ?)); + BSSAP.receive(tr_RANAP_Paging(cs_domain, imsi_hex2oct(g_pars.imsi))); } } diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 3a6711b..52aa685 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -2127,7 +2127,7 @@ setverdict(fail, "paging seems not to stop!"); mtc.stop; } - [not pars.ran_is_geran] BSSAP.receive(tr_RANAP_Paging(cs_domain, imsi_hex2oct(g_pars.imsi), ?)) { + [not pars.ran_is_geran] BSSAP.receive(tr_RANAP_Paging(cs_domain, imsi_hex2oct(g_pars.imsi))) { setverdict(fail, "paging seems not to stop!"); mtc.stop; } @@ -3070,7 +3070,7 @@ [pars.ran_is_geran] BSSAP.receive(tr_BSSMAP_Paging(g_pars.imsi)) { setverdict(pass); } - [not pars.ran_is_geran] BSSAP.receive(tr_RANAP_Paging(cs_domain, imsi_hex2oct(g_pars.imsi), ?)) { + [not pars.ran_is_geran] BSSAP.receive(tr_RANAP_Paging(cs_domain, imsi_hex2oct(g_pars.imsi))) { setverdict(pass); } /* We don't expect anything else */ @@ -3677,7 +3677,7 @@ [g_pars.ran_is_geran] BSSAP.receive(tr_BSSMAP_Paging(g_pars.imsi)); { setverdict(pass); } - [not g_pars.ran_is_geran] BSSAP.receive(tr_RANAP_Paging(cs_domain, imsi_hex2oct(g_pars.imsi), ?)) { + [not g_pars.ran_is_geran] BSSAP.receive(tr_RANAP_Paging(cs_domain, imsi_hex2oct(g_pars.imsi))) { setverdict(pass); } [] SGsAP.receive { -- To view, visit https://gerrit.osmocom.org/13935 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If22e16ecb301c86b9073ffde0af9e03bc85fbcc7 Gerrit-Change-Number: 13935 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 11:45:35 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 11:45:35 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Permit optional authentication before reject/timeout In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13936 ) Change subject: msc: Permit optional authentication before reject/timeout ...................................................................... msc: Permit optional authentication before reject/timeout Tests like TC_lu_imsi_reject, TC_lu_imsi_timeout_gsup and TC_cmserv_imsi_unknown all expected a reject straight in response to the LU REQ / CM SERV REQ. However, the MSC may very well decide to perform authentication beforehand. It's an implementation detail when a MSC/VLR performs authentication, so the tests should be tolerant to this. This primarily shows up in 3G/Iu/RANAP related tests, as authentication is mandatory there. Change-Id: Icdd3f34eca08092703ab2ba9a8e755e2d609a59b --- M msc/MSC_Tests.ttcn 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 52aa685..e1e5088 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -583,6 +583,7 @@ f_create_gsup_expect(hex2str(g_pars.imsi)); f_cl3_or_initial_ue(l3_lu); + f_mm_auth(); GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi)); GSUP.send(ts_GSUP_UL_ERR(g_pars.imsi, 23)); alt { @@ -612,6 +613,7 @@ f_create_gsup_expect(hex2str(g_pars.imsi)); f_cl3_or_initial_ue(l3_lu); + f_mm_auth(); GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi)); /* Normally the HLR would need to respond here, but we decide to force a timeout here */ alt { @@ -678,6 +680,7 @@ /* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */ f_cl3_or_initial_ue(l3_info); + f_mm_auth(); timer T := 10.0; T.start; -- To view, visit https://gerrit.osmocom.org/13936 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Icdd3f34eca08092703ab2ba9a8e755e2d609a59b Gerrit-Change-Number: 13936 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 11:45:57 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 11:45:57 +0000 Subject: Change in osmo-msc[master]: comment: apply function renames to message cycle explanation In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13934 ) Change subject: comment: apply function renames to message cycle explanation ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13934 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I742fb4844ac8a9ad76f59883ae9447eb8819b82d Gerrit-Change-Number: 13934 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 09 May 2019 11:45:57 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 11:45:59 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 11:45:59 +0000 Subject: Change in osmo-msc[master]: comment: apply function renames to message cycle explanation In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13934 ) Change subject: comment: apply function renames to message cycle explanation ...................................................................... comment: apply function renames to message cycle explanation The misnomed 'nas_decode' and 'nas_encode' APIs have been renamed to 'ran_decode' and 'ran_encode', which was forgotten in the large comment explaining the message path in sccp_ran.h. Apply the rename there. Change-Id: I742fb4844ac8a9ad76f59883ae9447eb8819b82d --- M include/osmocom/msc/sccp_ran.h 1 file changed, 12 insertions(+), 12 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/msc/sccp_ran.h b/include/osmocom/msc/sccp_ran.h index b7da314..f190d91 100644 --- a/include/osmocom/msc/sccp_ran.h +++ b/include/osmocom/msc/sccp_ran.h @@ -13,17 +13,17 @@ * msc_a_up_l3() msc_a_tx_dtap_to_i(dtap_msgb) * ^ | * | v - * msc_a_nas_decode_cb(struct nas_dec_msg) msc_a_nas_enc(struct nas_enc_msg) + * msc_a_ran_decode_cb(struct ran_dec_msg) msc_a_ran_enc(struct ran_enc_msg) * ^ ^ . | * | -Decode NAS- | . NAS v - * | | . ran_infra[type]->nas_encode(struct nas_enc_msg) - * nas_a_decode_l2() nas_iu_decode_l2() . | | + * | | . ran_infra[type]->ran_encode(struct ran_enc_msg) + * ran_a_decode_l2() ran_iu_decode_l2() . | | * ^ ^ . v v - * | | . nas_a_encode() nas_iu_encode() - * ran_infra[type]->nas_dec_l2() | | + * | | . ran_a_encode() ran_iu_encode() + * ran_infra[type]->ran_dec_l2() | | * ^ | -Encode BSSAP/RANAP- | * | v v - * msc_a_nas_dec() msub_tx_an_apdu(from MSC_ROLE_A to MSC_ROLE_I) + * msc_a_ran_dec() msub_tx_an_apdu(from MSC_ROLE_A to MSC_ROLE_I) * ^ | * | MSC-A v * . msc_a FSM . . . . . . . . . . . . . . . . msc_a FSM . . . . . . . . . . @@ -78,12 +78,12 @@ * * MSC-A: * - Receives MSC_A_EV_FROM_I_COMPLETE_LAYER_3 AN-APDU, notices an_proto indicating BSSAP or RANAP. - * - Passes L2 message to ran_infra[]->nas_dec_l2(), which decodes the BSSAP or RANAP. - * - contained information is passed to msc_a_nas_decode_cb(). + * - Passes L2 message to ran_infra[]->ran_dec_l2(), which decodes the BSSAP or RANAP. + * - contained information is passed to msc_a_ran_decode_cb(). * - which msc_a starts Complete-L3 and VLR procedures, * - associates msub with a vlr_subscr, * - sends DTAP requests back down by calling msc_a_tx_dtap_to_i() (possibly other more specialized tx functions) - * - according to ran_infra[]->nas_encode(), the nas_enc_msg gets encoded as BSSAP or RANAP. + * - according to ran_infra[]->ran_encode(), the ran_enc_msg gets encoded as BSSAP or RANAP. * - passes as AN-APDU to MSC-I in MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST signal. * * MSC-I, receiving AN-APDU from local MSC-A: @@ -147,10 +147,10 @@ * * MSC-A role: * - Receives MSC_A_EV_FROM_I_PROCESS_ACCESS_SIGNALLING_REQUEST, notices an_proto indicating BSSAP or RANAP. - * - Passes L2 message to ran_infra[]->nas_dec_l2(), which decodes the BSSAP or RANAP. - * - contained information is passed to msc_a_nas_decode_cb(). + * - Passes L2 message to ran_infra[]->ran_dec_l2(), which decodes the BSSAP or RANAP. + * - contained information is passed to msc_a_ran_decode_cb(). * - sends DTAP requests back down by calling msc_a_tx_dtap_to_i() (possibly other more specialized tx functions) - * - according to ran_infra[]->nas_encode(), the nas_enc_msg gets encoded as BSSAP or RANAP. + * - according to ran_infra[]->ran_encode(), the ran_enc_msg gets encoded as BSSAP or RANAP. * - passes as AN-APDU to MSC-I in MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST signal. * * MSC-I-Remote: -- To view, visit https://gerrit.osmocom.org/13934 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I742fb4844ac8a9ad76f59883ae9447eb8819b82d Gerrit-Change-Number: 13934 Gerrit-PatchSet: 2 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 12:23:38 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 9 May 2019 12:23:38 +0000 Subject: Change in osmo-msc[master]: ran_a_make_handover_request(): allow no encryption Message-ID: Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/13938 Change subject: ran_a_make_handover_request(): allow no encryption ...................................................................... ran_a_make_handover_request(): allow no encryption Fixes: coverity CID 198454 Change-Id: Ifb83ab2a8b6148b457224687ffada2dff4c3204f --- M src/libmsc/ran_msg_a.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/38/13938/1 diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c index 2e498a2..ba0990d 100644 --- a/src/libmsc/ran_msg_a.c +++ b/src/libmsc/ran_msg_a.c @@ -1068,7 +1068,8 @@ .speech_version_used = n->speech_version_used, - .chosen_encryption_algorithm_serving = n->geran.chosen_encryption->alg_id, + .chosen_encryption_algorithm_serving = + n->geran.chosen_encryption ? n->geran.chosen_encryption->alg_id : 0, .old_bss_to_new_bss_info_raw = n->old_bss_to_new_bss_info_raw, .old_bss_to_new_bss_info_raw_len = n->old_bss_to_new_bss_info_raw_len, -- To view, visit https://gerrit.osmocom.org/13938 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ifb83ab2a8b6148b457224687ffada2dff4c3204f Gerrit-Change-Number: 13938 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 12:23:39 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 9 May 2019 12:23:39 +0000 Subject: Change in osmo-msc[master]: make msc_a_vsub() and others NULL-safe Message-ID: Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/13939 Change subject: make msc_a_vsub() and others NULL-safe ...................................................................... make msc_a_vsub() and others NULL-safe Fixes: coverity CID 198451 Change-Id: Icd146ae512236a09cad080ed3eb85944e8f5cee4 --- M src/libmsc/msc_a.c M src/libmsc/msc_i.c M src/libmsc/msc_t.c 3 files changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/39/13939/1 diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c index 675f932..5baed54 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -73,16 +73,22 @@ struct vlr_subscr *msc_a_vsub(const struct msc_a *msc_a) { + if (!msc_a) + return NULL; return msub_vsub(msc_a->c.msub); } struct msc_i *msc_a_msc_i(const struct msc_a *msc_a) { + if (!msc_a) + return NULL; return msub_msc_i(msc_a->c.msub); } struct msc_t *msc_a_msc_t(const struct msc_a *msc_a) { + if (!msc_a) + return NULL; return msub_msc_t(msc_a->c.msub); } diff --git a/src/libmsc/msc_i.c b/src/libmsc/msc_i.c index 6badba6..05df9cb 100644 --- a/src/libmsc/msc_i.c +++ b/src/libmsc/msc_i.c @@ -332,6 +332,8 @@ struct vlr_subscr *msc_i_vsub(const struct msc_i *msc_i) { + if (!msc_i) + return NULL; return msub_vsub(msc_i->c.msub); } diff --git a/src/libmsc/msc_t.c b/src/libmsc/msc_t.c index ec5531f..c6bba47 100644 --- a/src/libmsc/msc_t.c +++ b/src/libmsc/msc_t.c @@ -902,6 +902,8 @@ struct vlr_subscr *msc_t_vsub(const struct msc_t *msc_t) { + if (!msc_t) + return NULL; return msub_vsub(msc_t->c.msub); } -- To view, visit https://gerrit.osmocom.org/13939 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Icd146ae512236a09cad080ed3eb85944e8f5cee4 Gerrit-Change-Number: 13939 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 12:23:39 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 9 May 2019 12:23:39 +0000 Subject: Change in osmo-msc[master]: no HO call forwarding if no RTP stream Message-ID: Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/13940 Change subject: no HO call forwarding if no RTP stream ...................................................................... no HO call forwarding if no RTP stream Fixes: coverity CID 198447 Related: OS#3992 (does not fix, just related) Change-Id: Ia223c2e20e625879ab71fc5c8afd0305fd224c58 --- M src/libmsc/msc_ho.c 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/40/13940/1 diff --git a/src/libmsc/msc_ho.c b/src/libmsc/msc_ho.c index 9d130c5..3a4258c 100644 --- a/src/libmsc/msc_ho.c +++ b/src/libmsc/msc_ho.c @@ -552,6 +552,11 @@ return -EINVAL; } + if (!rtp_to_ran) { + msc_ho_failed(msc_a, GSM0808_CAUSE_EQUIPMENT_FAILURE, "Unexpected: no RTP stream is set up\n"); + return -EINVAL; + } + /* Backup old cell's RTP IP:port and codec data */ msc_a->ho.old_cell.ran_remote_rtp = rtp_to_ran->remote; msc_a->ho.old_cell.codec = rtp_to_ran->codec; -- To view, visit https://gerrit.osmocom.org/13940 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ia223c2e20e625879ab71fc5c8afd0305fd224c58 Gerrit-Change-Number: 13940 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 12:34:42 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 12:34:42 +0000 Subject: Change in osmo-msc[master]: ran_a_make_handover_request(): allow no encryption In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13938 ) Change subject: ran_a_make_handover_request(): allow no encryption ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13938 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ifb83ab2a8b6148b457224687ffada2dff4c3204f Gerrit-Change-Number: 13938 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 09 May 2019 12:34:42 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 12:35:20 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 12:35:20 +0000 Subject: Change in osmo-msc[master]: make msc_a_vsub() and others NULL-safe In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13939 ) Change subject: make msc_a_vsub() and others NULL-safe ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13939 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icd146ae512236a09cad080ed3eb85944e8f5cee4 Gerrit-Change-Number: 13939 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 09 May 2019 12:35:20 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 12:38:22 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 12:38:22 +0000 Subject: Change in osmo-msc[master]: no HO call forwarding if no RTP stream In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13940 ) Change subject: no HO call forwarding if no RTP stream ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/13940/1/src/libmsc/msc_ho.c File src/libmsc/msc_ho.c: https://gerrit.osmocom.org/#/c/13940/1/src/libmsc/msc_ho.c at 546 PS1, Line 546: rtp_to_ran = cl ? cl->rtp[RTP_TO_RAN] : NULL; Assigning NULL to 'rtp_to_ran' doesn't make sense anymore. Maybe, we should rather check cl == NULL? -- To view, visit https://gerrit.osmocom.org/13940 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia223c2e20e625879ab71fc5c8afd0305fd224c58 Gerrit-Change-Number: 13940 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 09 May 2019 12:38:22 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 13:19:40 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 9 May 2019 13:19:40 +0000 Subject: Change in osmo-msc[master]: LOG_TRANS: store subsys in trans, unify USSD logging back to DMM Message-ID: Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/13941 Change subject: LOG_TRANS: store subsys in trans, unify USSD logging back to DMM ...................................................................... LOG_TRANS: store subsys in trans, unify USSD logging back to DMM Instead of calling trans_log_subsys() for each LOG_TRANS() log line, rather store in trans->log_subsys once on trans_alloc() and use that. Do not fall back to the RAN's own subsystem (DBSSAP / DIUCS), it makes little sense and may cause logging to switch subsystems depending on the RAN state. In trans_log_subsys(), add missing switch cases: - Log silent call transactions also on CC. - Log USSD on DMM. About USSD: we currently have no dedicated USSD logging category. As a result, after LOG_TRANS() was introduced [1], USSD logged on DBSSAP/DIUCS or DMSC, depending on whether a RAN was associated with the trans or not. Before that change, USSD always logged on DMM, so, until we have a separate logging category for USSD, consistenly use DMM again. [1] in I2e60964d7a3c06d051debd1c707051a0eb3101ba / ff7074a0c7b62025473d8f1a950905ac2cb2f31c Related: coverity CID 198453 Change-Id: I6dfe5b98fb9e884c2dde61d603832dafceb12123 --- M include/osmocom/msc/transaction.h M src/libmsc/transaction.c M tests/msc_vlr/msc_vlr_test_ss.err 3 files changed, 18 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/41/13941/1 diff --git a/include/osmocom/msc/transaction.h b/include/osmocom/msc/transaction.h index 99aca55..6b82390 100644 --- a/include/osmocom/msc/transaction.h +++ b/include/osmocom/msc/transaction.h @@ -27,7 +27,7 @@ ##args) #define LOG_TRANS(trans, level, fmt, args...) \ - LOG_TRANS_CAT(trans, trans_log_subsys(trans), level, fmt, ##args) + LOG_TRANS_CAT(trans, (trans)->log_subsys, level, fmt, ##args) enum bridge_state { BRIDGE_STATE_NONE, @@ -60,6 +60,8 @@ /* What kind of transaction */ enum trans_type type; + /* Which category to log on, for LOG_TRANS(). */ + int log_subsys; /* The current transaction ID */ uint8_t transaction_id; @@ -161,13 +163,17 @@ return DMSC; switch (trans->type) { case TRANS_CC: + case TRANS_SILENT_CALL: return DCC; case TRANS_SMS: return DLSMS; + case TRANS_USSD: + /* FIXME: traditionally (before LOG_TRANS() was added in I2e60964d7a3c06d051debd1c707051a0eb3101ba / + * ff7074a0c7b62025473d8f1a950905ac2cb2f31c), all USSD logging happened on DMM. Instead, it probably + * deserves its own logging subsystem. */ + return DMM; default: break; } - if (trans->msc_a) - return trans->msc_a->c.ran->log_subsys; return DMSC; } diff --git a/src/libmsc/transaction.c b/src/libmsc/transaction.c index b909cd8..d6f8c3b 100644 --- a/src/libmsc/transaction.c +++ b/src/libmsc/transaction.c @@ -146,6 +146,7 @@ .callref = callref, .net = net, }; + trans->log_subsys = trans_log_subsys(trans); vlr_subscr_get(vsub, trans_vsub_use(type)); llist_add_tail(&trans->entry, &net->trans_list); diff --git a/tests/msc_vlr/msc_vlr_test_ss.err b/tests/msc_vlr/msc_vlr_test_ss.err index 5592488..2030715 100644 --- a/tests/msc_vlr/msc_vlr_test_ss.err +++ b/tests/msc_vlr/msc_vlr_test_ss.err @@ -173,12 +173,12 @@ DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: RAN decode: DTAP DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: Dispatching 04.08 message: NCSS GSM0480_MTYPE_REGISTER DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + NCSS: now used by 3 (attached,active-conn,NCSS) -DMSC trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000001 tid-8) New transaction +DMM trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000001 tid-8) New transaction DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: + nc_ss: now used by 3 (cm_service_ss,rx_from_ms,nc_ss) DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: Received Event MSC_A_EV_TRANSACTION_ACCEPTED DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: state_chg to MSC_A_ST_COMMUNICATING DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: - cm_service_ss: now used by 2 (rx_from_ms,nc_ss) -DBSSAP trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ callref-0x20000001 tid-8) Received SS/USSD msg GSM0480_MTYPE_REGISTER +DMM trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ callref-0x20000001 tid-8) Received SS/USSD msg GSM0480_MTYPE_REGISTER GSUP --> HLR: OSMO_GSUP_MSGT_PROC_SS_REQUEST: 20010809710000004026f03004200000013101013515a11302010102013b300b04010f0406aa510c061b010a0103 DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: - rx_from_ms: now used by 1 (nc_ss) <-- GSUP rx OSMO_GSUP_MSGT_PROC_SS_REQUEST: 20010809710000004026f03004200000013101033527a225020101302002013b301b04010f0416d9775d0e2ae3e965f73cfd7683d27310cd06bbc51a0d0a0103 @@ -187,7 +187,7 @@ - DTAP --GERAN-A--> MS: GSM0480_MTYPE_RELEASE_COMPLETE: 8b2a1c27a225020101302002013b301b04010f0416d9775d0e2ae3e965f73cfd7683d27310cd06bbc51a0d - DTAP matches expected message DMSC dummy_msc_i(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST -DBSSAP trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ callref-0x20000001 tid-8) Freeing transaction +DMM trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ callref-0x20000001 tid-8) Freeing transaction DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - NCSS: now used by 3 (attached,active-conn,gsm0911_gsup_rx) DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: - nc_ss: now used by 0 (-) DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Received Event MSC_A_EV_UNUSED @@ -366,9 +366,9 @@ <-- GSUP rx OSMO_GSUP_MSGT_PROC_SS_REQUEST: 20010809710000004026f03004200001013101013515a11302010102013b300b04010f0406aa510c061b010a0103 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + gsm0911_gsup_rx: now used by 3 (attached,_test_ss_ussd_no,gsm0911_gsup_rx) DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + NCSS: now used by 4 (attached,_test_ss_ussd_no,gsm0911_gsup_rx,NCSS) -DMSC trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-255) New transaction -DMSC trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-255) Establishing network-originated session -DMSC trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-0) Triggering Paging Request +DMM trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-255) New transaction +DMM trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-255) Establishing network-originated session +DMM trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-0) Triggering Paging Request DPAG Paging: IMSI-901700000004620:MSISDN-46071 for GSM 09.11 SS/USSD: Starting paging paging request (SIGNALLING_HIGH_PRIO) to IMSI-901700000004620:MSISDN-46071 on GERAN-A strcmp(paging_expecting_imsi, vsub->imsi) == 0 @@ -433,7 +433,7 @@ DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: + rx_from_ms: now used by 2 (nc_ss,rx_from_ms) DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: RAN decode: DTAP DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: Dispatching 04.08 message: NCSS GSM0480_MTYPE_FACILITY -DBSSAP trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP callref-0x20000101 tid-0) Received SS/USSD msg GSM0480_MTYPE_FACILITY +DMM trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP callref-0x20000101 tid-0) Received SS/USSD msg GSM0480_MTYPE_FACILITY GSUP --> HLR: OSMO_GSUP_MSGT_PROC_SS_REQUEST: 20010809710000004026f03004200001013101023527a225020101302002013b301b04010f0416d9775d0e2ae3e965f73cfd7683d27310cd06bbc51a0d0a0103 DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: - rx_from_ms: now used by 1 (nc_ss) dtap_tx_confirmed == 1 @@ -444,7 +444,7 @@ - DTAP --GERAN-A--> MS: GSM0480_MTYPE_RELEASE_COMPLETE: 0b2a - DTAP matches expected message DMSC dummy_msc_i(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST -DBSSAP trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP callref-0x20000101 tid-0) Freeing transaction +DMM trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP callref-0x20000101 tid-0) Freeing transaction DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - NCSS: now used by 4 (attached,2*gsm0911_gsup_rx,active-conn) DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: - nc_ss: now used by 0 (-) DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: Received Event MSC_A_EV_UNUSED -- To view, visit https://gerrit.osmocom.org/13941 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I6dfe5b98fb9e884c2dde61d603832dafceb12123 Gerrit-Change-Number: 13941 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 13:27:04 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 9 May 2019 13:27:04 +0000 Subject: Change in osmo-msc[master]: add DUSSD logging category Message-ID: Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/13942 Change subject: add DUSSD logging category ...................................................................... add DUSSD logging category Change-Id: Id7e04c9f5088334cd5ec6cfdb6a9b3a2a7e7fda0 --- M include/osmocom/msc/debug.h M include/osmocom/msc/transaction.h M src/libmsc/gsm_09_11.c M src/osmo-msc/msc_main.c M tests/msc_vlr/msc_vlr_test_ss.err M tests/msc_vlr/msc_vlr_tests.c 6 files changed, 23 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/42/13942/1 diff --git a/include/osmocom/msc/debug.h b/include/osmocom/msc/debug.h index 28ba482..8802360 100644 --- a/include/osmocom/msc/debug.h +++ b/include/osmocom/msc/debug.h @@ -22,5 +22,6 @@ DIUCS, DBSSAP, DSGS, + DUSSD, Debug_LastEntry, }; diff --git a/include/osmocom/msc/transaction.h b/include/osmocom/msc/transaction.h index 6b82390..bd20153 100644 --- a/include/osmocom/msc/transaction.h +++ b/include/osmocom/msc/transaction.h @@ -168,10 +168,7 @@ case TRANS_SMS: return DLSMS; case TRANS_USSD: - /* FIXME: traditionally (before LOG_TRANS() was added in I2e60964d7a3c06d051debd1c707051a0eb3101ba / - * ff7074a0c7b62025473d8f1a950905ac2cb2f31c), all USSD logging happened on DMM. Instead, it probably - * deserves its own logging subsystem. */ - return DMM; + return DUSSD; default: break; } diff --git a/src/libmsc/gsm_09_11.c b/src/libmsc/gsm_09_11.c index 984cc53..b211641 100644 --- a/src/libmsc/gsm_09_11.c +++ b/src/libmsc/gsm_09_11.c @@ -271,7 +271,7 @@ if (msc_a) { struct gsm_network *net = msc_a_net(msc_a); - LOG_MSC_A_CAT(msc_a, DMM, LOGL_DEBUG, "Paging succeeded\n"); + LOG_MSC_A_CAT(msc_a, DUSSD, LOGL_DEBUG, "Paging succeeded\n"); /* Assign connection */ msc_a_get(msc_a, MSC_A_USE_NC_SS); @@ -297,7 +297,7 @@ /* Count established network-initiated NC SS/USSD sessions */ rate_ctr_inc(&net->msc_ctrs->ctr[MSC_CTR_NC_SS_MT_ESTABLISHED]); } else { - LOG_MSC_A_CAT(msc_a, DMM, LOGL_DEBUG, "Paging expired\n"); + LOG_MSC_A_CAT(msc_a, DUSSD, LOGL_DEBUG, "Paging expired\n"); /* TODO: inform HLR about this failure */ diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c index e101d89..2c2cc26 100644 --- a/src/osmo-msc/msc_main.c +++ b/src/osmo-msc/msc_main.c @@ -480,8 +480,11 @@ .description = "SGs Interface (SGsAP)", .enabled = 1, .loglevel = LOGL_NOTICE, }, - - + [DUSSD] = { + .name = "DUSSD", + .description = "Supplementary Services", + .enabled = 1, .loglevel = LOGL_NOTICE, + }, }; static int filter_fn(const struct log_context *ctx, struct log_target *tar) diff --git a/tests/msc_vlr/msc_vlr_test_ss.err b/tests/msc_vlr/msc_vlr_test_ss.err index 2030715..a409abf 100644 --- a/tests/msc_vlr/msc_vlr_test_ss.err +++ b/tests/msc_vlr/msc_vlr_test_ss.err @@ -173,12 +173,12 @@ DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: RAN decode: DTAP DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: Dispatching 04.08 message: NCSS GSM0480_MTYPE_REGISTER DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + NCSS: now used by 3 (attached,active-conn,NCSS) -DMM trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000001 tid-8) New transaction +DUSSD trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000001 tid-8) New transaction DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: + nc_ss: now used by 3 (cm_service_ss,rx_from_ms,nc_ss) DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: Received Event MSC_A_EV_TRANSACTION_ACCEPTED DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: state_chg to MSC_A_ST_COMMUNICATING DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: - cm_service_ss: now used by 2 (rx_from_ms,nc_ss) -DMM trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ callref-0x20000001 tid-8) Received SS/USSD msg GSM0480_MTYPE_REGISTER +DUSSD trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ callref-0x20000001 tid-8) Received SS/USSD msg GSM0480_MTYPE_REGISTER GSUP --> HLR: OSMO_GSUP_MSGT_PROC_SS_REQUEST: 20010809710000004026f03004200000013101013515a11302010102013b300b04010f0406aa510c061b010a0103 DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: - rx_from_ms: now used by 1 (nc_ss) <-- GSUP rx OSMO_GSUP_MSGT_PROC_SS_REQUEST: 20010809710000004026f03004200000013101033527a225020101302002013b301b04010f0416d9775d0e2ae3e965f73cfd7683d27310cd06bbc51a0d0a0103 @@ -187,7 +187,7 @@ - DTAP --GERAN-A--> MS: GSM0480_MTYPE_RELEASE_COMPLETE: 8b2a1c27a225020101302002013b301b04010f0416d9775d0e2ae3e965f73cfd7683d27310cd06bbc51a0d - DTAP matches expected message DMSC dummy_msc_i(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST -DMM trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ callref-0x20000001 tid-8) Freeing transaction +DUSSD trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ callref-0x20000001 tid-8) Freeing transaction DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - NCSS: now used by 3 (attached,active-conn,gsm0911_gsup_rx) DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: - nc_ss: now used by 0 (-) DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Received Event MSC_A_EV_UNUSED @@ -366,9 +366,9 @@ <-- GSUP rx OSMO_GSUP_MSGT_PROC_SS_REQUEST: 20010809710000004026f03004200001013101013515a11302010102013b300b04010f0406aa510c061b010a0103 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + gsm0911_gsup_rx: now used by 3 (attached,_test_ss_ussd_no,gsm0911_gsup_rx) DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + NCSS: now used by 4 (attached,_test_ss_ussd_no,gsm0911_gsup_rx,NCSS) -DMM trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-255) New transaction -DMM trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-255) Establishing network-originated session -DMM trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-0) Triggering Paging Request +DUSSD trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-255) New transaction +DUSSD trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-255) Establishing network-originated session +DUSSD trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-0) Triggering Paging Request DPAG Paging: IMSI-901700000004620:MSISDN-46071 for GSM 09.11 SS/USSD: Starting paging paging request (SIGNALLING_HIGH_PRIO) to IMSI-901700000004620:MSISDN-46071 on GERAN-A strcmp(paging_expecting_imsi, vsub->imsi) == 0 @@ -417,7 +417,7 @@ DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTH_CIPH}: state_chg to MSC_A_ST_AUTHENTICATED DPAG Paging: IMSI-901700000004620:MSISDN-46071 for GSM 09.11 SS/USSD: Paging Response action (success) DPAG Paging: IMSI-901700000004620:MSISDN-46071 for GSM 09.11 SS/USSD: Removing Paging Request -DMM msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: Paging succeeded +DUSSD msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: Paging succeeded DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: + nc_ss: now used by 3 (rx_from_ms,paging-response,nc_ss) DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: RAN encode: DTAP on GERAN-A - DTAP --GERAN-A--> MS: GSM0480_MTYPE_REGISTER: 0b3b1c15a11302010102013b300b04010f0406aa510c061b01 @@ -433,7 +433,7 @@ DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: + rx_from_ms: now used by 2 (nc_ss,rx_from_ms) DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: RAN decode: DTAP DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: Dispatching 04.08 message: NCSS GSM0480_MTYPE_FACILITY -DMM trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP callref-0x20000101 tid-0) Received SS/USSD msg GSM0480_MTYPE_FACILITY +DUSSD trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP callref-0x20000101 tid-0) Received SS/USSD msg GSM0480_MTYPE_FACILITY GSUP --> HLR: OSMO_GSUP_MSGT_PROC_SS_REQUEST: 20010809710000004026f03004200001013101023527a225020101302002013b301b04010f0416d9775d0e2ae3e965f73cfd7683d27310cd06bbc51a0d0a0103 DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: - rx_from_ms: now used by 1 (nc_ss) dtap_tx_confirmed == 1 @@ -444,7 +444,7 @@ - DTAP --GERAN-A--> MS: GSM0480_MTYPE_RELEASE_COMPLETE: 0b2a - DTAP matches expected message DMSC dummy_msc_i(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST -DMM trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP callref-0x20000101 tid-0) Freeing transaction +DUSSD trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP callref-0x20000101 tid-0) Freeing transaction DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - NCSS: now used by 4 (attached,2*gsm0911_gsup_rx,active-conn) DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: - nc_ss: now used by 0 (-) DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: Received Event MSC_A_EV_UNUSED diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 81ac3f7..6805d3a 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -660,6 +660,11 @@ .description = "BSSAP Protocol (A Interface)", .enabled = 1, .loglevel = LOGL_DEBUG, }, + [DUSSD] = { + .name = "DUSSD", + .description = "Supplementary Services", + .enabled = 1, .loglevel = LOGL_DEBUG, + }, }; static struct log_info info = { -- To view, visit https://gerrit.osmocom.org/13942 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id7e04c9f5088334cd5ec6cfdb6a9b3a2a7e7fda0 Gerrit-Change-Number: 13942 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 13:33:09 2019 From: gerrit-no-reply at lists.osmocom.org (=?UTF-8?Q?K=C3=A9vin_Redon?=) Date: Thu, 9 May 2019 13:33:09 +0000 Subject: Change in osmo-ccid-firmware[master]: add async library with ring on TX In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13677 to look at the new patch set (#10). Change subject: add async library with ring on TX ...................................................................... add async library with ring on TX the standard async library expected the caller to wait until the transmission was complete (by counting using the transmit callback or checking using usart_async_get_status) before freeing/reusing the memory holding the data to be transmitted. this is not practical when using stdio on top of the peripheral since printf returns directly and reuses the memory. the new USART async library has a ring buffer for the data to be transmitted (similar to the data being received). WARNING: write is blocking when the TX buffer is full. this prevents loosing data. Change-Id: Iafd5295b90ef9f428f640314c24f6c31ee82c9d6 --- M sysmoOCTSIM/gcc/Makefile A sysmoOCTSIM/hal/include/hal_usart_async_rings.h A sysmoOCTSIM/hal/src/hal_usart_async_rings.c 3 files changed, 768 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/77/13677/10 -- To view, visit https://gerrit.osmocom.org/13677 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iafd5295b90ef9f428f640314c24f6c31ee82c9d6 Gerrit-Change-Number: 13677 Gerrit-PatchSet: 10 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 13:33:10 2019 From: gerrit-no-reply at lists.osmocom.org (=?UTF-8?Q?K=C3=A9vin_Redon?=) Date: Thu, 9 May 2019 13:33:10 +0000 Subject: Change in osmo-ccid-firmware[master]: add debug command to communicate with card Message-ID: K?vin Redon has uploaded this change for review. ( https://gerrit.osmocom.org/13943 Change subject: add debug command to communicate with card ...................................................................... add debug command to communicate with card currently the read-iccid command only selects MF. this is a proof of concept for card communication. the transmission/reception must be generalized to avoid copying the code multiple times. Change-Id: Icbcde783143694afce23af6e3f26bcd7a9a13b85 --- M sysmoOCTSIM/main.c 1 file changed, 145 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/43/13943/1 diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index a895c14..11849c7 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -38,10 +38,28 @@ // TODO for now SIM7 is not present because used for debug static struct usart_async_descriptor* SIM_peripheral_descriptors[] = {&SIM0, &SIM1, &SIM2, &SIM3, &SIM4, &SIM5, &SIM6, NULL}; +/** number of bytes transmitted on the SIM peripheral */ +static volatile bool SIM_tx_count[8]; + static void SIM_rx_cb(const struct usart_async_descriptor *const io_descr) { } +/** called when the transmission is complete + * e.g. this is when the byte has been sent and there is no data to transmit anymore + */ +static void SIM_tx_cb(const struct usart_async_descriptor *const io_descr) +{ + // find slotnr for corresponding USART + uint8_t slotnr; + for (slotnr = 0; slotnr < ARRAY_SIZE(SIM_peripheral_descriptors) && SIM_peripheral_descriptors[slotnr] != io_descr; slotnr++); + + // set flag + if (slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)) { + SIM_tx_count[slotnr] = true; + } +} + /** possible clock sources for the SERCOM peripheral * warning: the definition must match the GCLK configuration */ @@ -80,6 +98,7 @@ continue; } usart_async_register_callback(SIM_peripheral_descriptors[i], USART_ASYNC_RXC_CB, SIM_rx_cb); // required for RX to work, even if the callback does nothing + usart_async_register_callback(SIM_peripheral_descriptors[i], USART_ASYNC_TXC_CB, SIM_tx_cb); // to count the number of bytes transmitted since we are using it asynchronously usart_async_enable(SIM_peripheral_descriptors[i]); } } @@ -360,7 +379,7 @@ // check if card is present (and read current settings) ncn8025_get(slotnr, &settings); if (!settings.simpres) { - printf("no card present in slot %d, aborting\r\n", slotnr); + printf("(%d) error: no card present\r\n", slotnr); return; } @@ -406,19 +425,19 @@ } // verify if one byte has been received if (!usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { - printf("card in slot %d is not responding, aborting\r\n", slotnr); + printf("(%d) error: card not responsive\r\n", slotnr); return; } // read ATR (just do it until there is no traffic anymore) - // TODO the ATR should be parsed to read the right number of bytes + // TODO the ATR should be parsed to read the right number of bytes, instead we just wait until to end of WT printf("(%d) ATR: ", slotnr); uint8_t atr_byte; while (usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { if (1 == io_read(&SIM_peripheral_descriptors[slotnr]->io, &atr_byte, 1)) { printf("%02x ", atr_byte); } - uint16_t wt = 9600; // waiting time in ETU + uint16_t wt = ISO7816_3_DEFAULT_WT; // waiting time in ETU while (wt && !usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) wt--; @@ -426,9 +445,127 @@ } printf("\r\n"); - /* disable VCC and LED, re-enable RST */ - settings.cmdvcc = false; - settings.rstin = true; + /* disable LED */ + settings.led = false; + ncn8025_set(slotnr, &settings); +} + +DEFUN(sim_iccid, cmd_sim_iccid, "sim-iccid", "Read ICCID from SIM card") +{ + struct ncn8025_settings settings; + int slotnr = validate_slotnr(argc, argv, 1); + + if (slotnr < 0 || slotnr >= ARRAY_SIZE(SIM_peripheral_descriptors) || NULL == SIM_peripheral_descriptors[slotnr]) { + return; + } + + // read current settings and check if card is present and powered + ncn8025_get(slotnr, &settings); + if (!settings.simpres) { + printf("(%d) error: no card present\r\n", slotnr); + return; + } + if (!settings.cmdvcc) { + printf("(%d) error: card not powered\r\n", slotnr); + return; + } + if (settings.rstin) { + printf("(%d) error: card under reset\r\n", slotnr); + return; + } + + // enable LED + if (!settings.led) { + settings.led = true; + ncn8025_set(slotnr, &settings); + } + + // read MF + printf("(%d) SELECT MF: ", slotnr); + struct usart_async_descriptor* sim = SIM_peripheral_descriptors[slotnr]; + ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 0; + usart_async_flush_rx_buffer(sim); // flush RX buffer to start from scratch + // write SELECT MF APDU + const uint8_t select_mf[] = {0xa0, 0xa4, 0x00, 0x00, 0x02, 0x3f, 0x00}; + SIM_tx_count[slotnr] = false; // reset TX complete + for (uint8_t i = 0; i < 5; i++) { // transmit command header + printf("%02x ", select_mf[i]); + while(!usart_async_is_tx_empty(sim)); // wait for previous byte to be transmitted (WARNING could block) + if (1 != io_write(&sim->io, &select_mf[i], 1)) { + printf("(%d) error: could not send command header\r\n", slotnr); + return; + } + } + uint16_t wt = ISO7816_3_DEFAULT_WT; // waiting time in ETU (actually it can be a lot more after the ATR, but we use the default) + while (wt && !SIM_tx_count[slotnr]) { // wait until transmission is complete + delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) + wt--; + } + if (0 == wt) { // timeout reached + printf("(%d) error: could not transmit data\r\n", slotnr); + return; + } + ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 1; + //usart_async_flush_rx_buffer(sim); // flush RX buffer to start from scratch + wt = ISO7816_3_DEFAULT_WT; // reset waiting time + while (wt && !usart_async_is_rx_not_empty(sim)) { // wait for procedure byte + delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) + wt--; + } + if (0 == wt) { // timeout reached + printf("(%d) error: card not responsive\r\n", slotnr); + return; + } + uint8_t pb; + if (1 != io_read(&sim->io, &pb, 1)) { // read procedure byte + printf("(%d) error: could not read data\r\n", slotnr); + return; + } + if (select_mf[1] != pb) { // the header is ACKed when the procedure by is equal to the instruction byte + printf("(%d) error: header NACKed\r\n", slotnr); + return; + } + SIM_tx_count[slotnr] = false; // reset TX complete + for (uint8_t i = 5; i < 7; i++) { // transmit command data + printf("%02x ", select_mf[i]); + while(!usart_async_is_tx_empty(sim)); // wait for previous byte to be transmitted (WARNING could block) + if (1 != io_write(&sim->io, &select_mf[i], 1)) { + printf("(%d) error: could not send command data\r\n", slotnr); + return; + } + } + wt = ISO7816_3_DEFAULT_WT; // waiting time in ETU (actually it can be a lot more after the ATR, but we use the default) + while (wt && !SIM_tx_count[slotnr]) { // wait until transmission is complete + delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) + wt--; + } + if (0 == wt) { // timeout reached + printf("(%d) error: could not transmit data\r\n", slotnr); + return; + } + usart_async_flush_rx_buffer(sim); // flush RX buffer to start from scratch + // read SW + uint8_t sw[2]; // to read the status words + wt = ISO7816_3_DEFAULT_WT; // waiting time in ETU (actually it can be a lot more after the ATR, but we use the default) + for (uint8_t i = 0; i < ARRAY_SIZE(sw); i++) { + while (wt && !usart_async_is_rx_not_empty(sim)) { + delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) + wt--; + } + if (0 == wt) { // timeout reached + printf("(%d) error: card not responsive\r\n", slotnr); + } else { + if (1 != io_read(&sim->io, &sw[i], 1)) { // read SW + printf("(%d) error: could not read data\r\n", slotnr); + return; + } + printf("%02x ", sw[i]); + wt = ISO7816_3_DEFAULT_WT; // reset WT + } + } + printf("\r\n"); + + // disable LED settings.led = false; ncn8025_set(slotnr, &settings); } @@ -450,6 +587,7 @@ command_register(&cmd_sim_voltage); command_register(&cmd_sim_led); command_register(&cmd_sim_atr); + command_register(&cmd_sim_iccid); testmode_init(); printf("\r\n\r\nsysmocom sysmoOCTSIM\r\n"); -- To view, visit https://gerrit.osmocom.org/13943 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Icbcde783143694afce23af6e3f26bcd7a9a13b85 Gerrit-Change-Number: 13943 Gerrit-PatchSet: 1 Gerrit-Owner: K?vin Redon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 13:39:27 2019 From: gerrit-no-reply at lists.osmocom.org (=?UTF-8?Q?K=C3=A9vin_Redon?=) Date: Thu, 9 May 2019 13:39:27 +0000 Subject: Change in osmo-ccid-firmware[master]: switch UART_debug to ASYNC In-Reply-To: References: Message-ID: K?vin Redon has posted comments on this change. ( https://gerrit.osmocom.org/13673 ) Change subject: switch UART_debug to ASYNC ...................................................................... Patch Set 9: > I still don't like the fact that this looses serial output pretty > much all the time (e.g. if you type 'help' at the command line). fixed in https://gerrit.osmocom.org/#/c/osmo-ccid-firmware/+/13677/ patchset 10. the new async lib with tx buffer is now blocking when the buffer is full. I did not implemented a warning for buffer "overflow", but the buffer is already quite large and I saw it blocking only with very large text (e.g. help). -- To view, visit https://gerrit.osmocom.org/13673 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If18883e96f336aa9f6b11607859260da5e1503c7 Gerrit-Change-Number: 13673 Gerrit-PatchSet: 9 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: K?vin Redon Gerrit-Comment-Date: Thu, 09 May 2019 13:39:27 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 13:46:18 2019 From: gerrit-no-reply at lists.osmocom.org (=?UTF-8?Q?K=C3=A9vin_Redon?=) Date: Thu, 9 May 2019 13:46:18 +0000 Subject: Change in osmo-ccid-firmware[master]: add async library with ring on TX In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13677 to look at the new patch set (#11). Change subject: add async library with ring on TX ...................................................................... add async library with ring on TX the standard async library expected the caller to wait until the transmission was complete (by counting using the transmit callback or checking using usart_async_get_status) before freeing/reusing the memory holding the data to be transmitted. this is not practical when using stdio on top of the peripheral since printf returns directly and reuses the memory. the new USART async library has a ring buffer for the data to be transmitted (similar to the data being received). WARNING: write is blocking when the TX buffer is full. this prevents loosing data. Change-Id: Iafd5295b90ef9f428f640314c24f6c31ee82c9d6 --- M sysmoOCTSIM/gcc/Makefile A sysmoOCTSIM/hal/include/hal_usart_async_rings.h A sysmoOCTSIM/hal/src/hal_usart_async_rings.c 3 files changed, 770 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/77/13677/11 -- To view, visit https://gerrit.osmocom.org/13677 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iafd5295b90ef9f428f640314c24f6c31ee82c9d6 Gerrit-Change-Number: 13677 Gerrit-PatchSet: 11 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 13:58:37 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 13:58:37 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_08.c: fix: print proper length value In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13906 to look at the new patch set (#3). Change subject: libmsc/gsm_04_08.c: fix: print proper length value ...................................................................... libmsc/gsm_04_08.c: fix: print proper length value Since in parse_umts_auth_resp() we are checking the length of GSM48_IE_AUTH_RES_EXT TLV, we need to print its length, but not the length of the whole L3. Change-Id: I2bfebce6d017be834bfe7628ffa2b341eb82c11c --- M src/libmsc/gsm_04_08.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/06/13906/3 -- To view, visit https://gerrit.osmocom.org/13906 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2bfebce6d017be834bfe7628ffa2b341eb82c11c Gerrit-Change-Number: 13906 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:05:58 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 14:05:58 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_08.c: clarify IMEI rejection in gsm48_rx_mm_serv_req() Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13944 Change subject: libmsc/gsm_04_08.c: clarify IMEI rejection in gsm48_rx_mm_serv_req() ...................................................................... libmsc/gsm_04_08.c: clarify IMEI rejection in gsm48_rx_mm_serv_req() Change-Id: I65277aee1f52a8b4fd4b970e992482bbadd94d39 --- M src/libmsc/gsm_04_08.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/44/13944/1 diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 418ee2a..68b12c0 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -765,7 +765,8 @@ case GSM_MI_TYPE_IMEI: if (req->cm_service_type == GSM48_CMSERV_EMERGENCY) { /* We don't do emergency calls by IMEI */ - LOG_MSC_A(msc_a, LOGL_NOTICE, "Tx CM SERVICE REQUEST REJECT\n"); + LOG_MSC_A(msc_a, LOGL_NOTICE, "Tx CM SERVICE REQUEST REJECT: " + "emergency services by IMEI are not supported\n"); return msc_gsm48_tx_mm_serv_rej(msc_a, GSM48_REJECT_IMEI_NOT_ACCEPTED); } /* fall-through for non-emergency setup */ -- To view, visit https://gerrit.osmocom.org/13944 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I65277aee1f52a8b4fd4b970e992482bbadd94d39 Gerrit-Change-Number: 13944 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:13:22 2019 From: gerrit-no-reply at lists.osmocom.org (=?UTF-8?Q?K=C3=A9vin_Redon?=) Date: Thu, 9 May 2019 14:13:22 +0000 Subject: Change in osmo-ccid-firmware[master]: add debug command to communicate with card In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13943 to look at the new patch set (#3). Change subject: add debug command to communicate with card ...................................................................... add debug command to communicate with card currently the sim-iccid command only selects MF. this is a proof of concept for card communication. the transmission/reception must be generalized to avoid copying the code multiple times. IMPORTANT: the sim-iccid commands only works after the sim-atr command, which sets up the cards correctly Change-Id: Icbcde783143694afce23af6e3f26bcd7a9a13b85 --- M sysmoOCTSIM/main.c 1 file changed, 145 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/43/13943/3 -- To view, visit https://gerrit.osmocom.org/13943 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Icbcde783143694afce23af6e3f26bcd7a9a13b85 Gerrit-Change-Number: 13943 Gerrit-PatchSet: 3 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:25:02 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 9 May 2019 14:25:02 +0000 Subject: Change in osmo-msc[master]: call_leg: remove unused event MSC_EV_CALL_LEG_RTP_RELEASED Message-ID: Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/13945 Change subject: call_leg: remove unused event MSC_EV_CALL_LEG_RTP_RELEASED ...................................................................... call_leg: remove unused event MSC_EV_CALL_LEG_RTP_RELEASED The event is actually never dispatched and useless, because when an RTP stream releases, the call_leg terminates directly anyway (which wasn't apparent when starting to design the call_leg FSM yet). Change-Id: I6b2fc1225c960fa2f7c46adf241520217a07821c --- M include/osmocom/msc/call_leg.h M include/osmocom/msc/msc_roles.h M src/libmsc/call_leg.c M src/libmsc/msc_a.c M src/libmsc/msc_i.c M src/libmsc/msc_t.c 6 files changed, 8 insertions(+), 45 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/45/13945/1 diff --git a/include/osmocom/msc/call_leg.h b/include/osmocom/msc/call_leg.h index b8126e8..61107ee 100644 --- a/include/osmocom/msc/call_leg.h +++ b/include/osmocom/msc/call_leg.h @@ -36,7 +36,6 @@ uint32_t parent_event_rtp_addr_available; uint32_t parent_event_rtp_complete; - uint32_t parent_event_rtp_released; /* For internal MNCC, if RTP addresses for endpoints become assigned by the MGW, implicitly notify the other * call leg's RTP_TO_CN side rtp_stream with rtp_stream_remote_addr_available(). */ @@ -58,15 +57,13 @@ struct call_leg *call_leg_alloc(struct osmo_fsm_inst *parent_fi, uint32_t parent_event_term, uint32_t parent_event_rtp_addr_available, - uint32_t parent_event_rtp_complete, - uint32_t parent_event_rtp_released); + uint32_t parent_event_rtp_complete); void call_leg_reparent(struct call_leg *cl, struct osmo_fsm_inst *parent_fi, uint32_t parent_event_term, uint32_t parent_event_rtp_addr_available, - uint32_t parent_event_rtp_complete, - uint32_t parent_event_rtp_released); + uint32_t parent_event_rtp_complete); int call_leg_local_bridge(struct call_leg *cl1, uint32_t call_id1, struct gsm_trans *trans1, struct call_leg *cl2, uint32_t call_id2, struct gsm_trans *trans2); diff --git a/include/osmocom/msc/msc_roles.h b/include/osmocom/msc/msc_roles.h index a1fab2f..b22bc7b 100644 --- a/include/osmocom/msc/msc_roles.h +++ b/include/osmocom/msc/msc_roles.h @@ -148,7 +148,6 @@ MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE, MSC_EV_CALL_LEG_RTP_COMPLETE, - MSC_EV_CALL_LEG_RTP_RELEASED, MSC_EV_CALL_LEG_TERM, /* MNCC has told us to RTP_CREATE, but local RTP port has not yet been set up. diff --git a/src/libmsc/call_leg.c b/src/libmsc/call_leg.c index cb7e6ea..1b7db2b 100644 --- a/src/libmsc/call_leg.c +++ b/src/libmsc/call_leg.c @@ -67,8 +67,7 @@ struct call_leg *call_leg_alloc(struct osmo_fsm_inst *parent_fi, uint32_t parent_event_term, uint32_t parent_event_rtp_addr_available, - uint32_t parent_event_rtp_complete, - uint32_t parent_event_rtp_released) + uint32_t parent_event_rtp_complete) { struct call_leg *cl; struct osmo_fsm_inst *fi = osmo_fsm_inst_alloc_child(&call_leg_fsm, parent_fi, parent_event_term); @@ -82,7 +81,6 @@ .fi = fi, .parent_event_rtp_addr_available = parent_event_rtp_addr_available, .parent_event_rtp_complete = parent_event_rtp_complete, - .parent_event_rtp_released = parent_event_rtp_released, }; return cl; @@ -92,8 +90,7 @@ struct osmo_fsm_inst *new_parent_fi, uint32_t parent_event_term, uint32_t parent_event_rtp_addr_available, - uint32_t parent_event_rtp_complete, - uint32_t parent_event_rtp_released) + uint32_t parent_event_rtp_complete) { LOG_CALL_LEG(cl, LOGL_DEBUG, "Reparenting from parent %s to parent %s\n", cl->fi->proc.parent->name, new_parent_fi->name); @@ -101,7 +98,6 @@ talloc_steal(new_parent_fi, cl->fi); cl->parent_event_rtp_addr_available = parent_event_rtp_addr_available; cl->parent_event_rtp_complete = parent_event_rtp_complete; - cl->parent_event_rtp_released = parent_event_rtp_released; } static int call_leg_fsm_timer_cb(struct osmo_fsm_inst *fi) diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c index 5baed54..77dd43d 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -546,28 +546,15 @@ static void msc_a_cleanup_rtp_streams(struct msc_a *msc_a, uint32_t event, void *data) { - struct rtp_stream *rtps; - switch (event) { - case MSC_EV_CALL_LEG_RTP_RELEASED: - rtps = data; - if (msc_a->cc.mncc_forwarding_to_remote_ran - && msc_a->cc.mncc_forwarding_to_remote_ran->rtps == rtps) - msc_a->cc.mncc_forwarding_to_remote_ran->rtps = NULL; - if (msc_a->ho.new_cell.mncc_forwarding_to_remote_ran - && msc_a->ho.new_cell.mncc_forwarding_to_remote_ran->rtps == rtps) - msc_a->ho.new_cell.mncc_forwarding_to_remote_ran->rtps = NULL; - return; case MSC_EV_CALL_LEG_TERM: msc_a->cc.call_leg = NULL; if (msc_a->cc.mncc_forwarding_to_remote_ran) msc_a->cc.mncc_forwarding_to_remote_ran->rtps = NULL; - if (msc_a->ho.new_cell.mncc_forwarding_to_remote_ran) { - fprintf(stderr, "FOCKEN %p\n", msc_a->ho.new_cell.mncc_forwarding_to_remote_ran->rtps); + if (msc_a->ho.new_cell.mncc_forwarding_to_remote_ran) msc_a->ho.new_cell.mncc_forwarding_to_remote_ran->rtps = NULL; - } return; case MSC_MNCC_EV_CALL_ENDED: @@ -633,7 +620,6 @@ /* Nothing to do. */ return; - case MSC_EV_CALL_LEG_RTP_RELEASED: case MSC_MNCC_EV_CALL_ENDED: /* Cleaned up above */ return; @@ -765,7 +751,6 @@ /* Already releasing */ return; - case MSC_EV_CALL_LEG_RTP_RELEASED: case MSC_EV_CALL_LEG_TERM: case MSC_MNCC_EV_CALL_ENDED: /* RTP streams cleaned up above */ @@ -819,7 +804,6 @@ OSMO_VALUE_STRING(MSC_REMOTE_EV_RX_GSUP), OSMO_VALUE_STRING(MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE), OSMO_VALUE_STRING(MSC_EV_CALL_LEG_RTP_COMPLETE), - OSMO_VALUE_STRING(MSC_EV_CALL_LEG_RTP_RELEASED), OSMO_VALUE_STRING(MSC_EV_CALL_LEG_TERM), OSMO_VALUE_STRING(MSC_MNCC_EV_NEED_LOCAL_RTP), OSMO_VALUE_STRING(MSC_MNCC_EV_CALL_PROCEEDING), @@ -934,7 +918,6 @@ | S(MSC_A_EV_UNUSED) | S(MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE) | S(MSC_EV_CALL_LEG_RTP_COMPLETE) - | S(MSC_EV_CALL_LEG_RTP_RELEASED) | S(MSC_EV_CALL_LEG_TERM) | S(MSC_MNCC_EV_CALL_ENDED) | S(MSC_A_EV_HANDOVER_REQUIRED) @@ -950,7 +933,6 @@ | S(MSC_A_EV_FROM_I_PROCESS_ACCESS_SIGNALLING_REQUEST) | S(MSC_A_EV_FROM_I_SEND_END_SIGNAL_REQUEST) | S(MSC_A_EV_UNUSED) - | S(MSC_EV_CALL_LEG_RTP_RELEASED) | S(MSC_EV_CALL_LEG_TERM) | S(MSC_MNCC_EV_CALL_ENDED) , @@ -1590,8 +1572,7 @@ cl = msc_a->cc.call_leg = call_leg_alloc(msc_a->c.fi, MSC_EV_CALL_LEG_TERM, MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE, - MSC_EV_CALL_LEG_RTP_COMPLETE, - MSC_EV_CALL_LEG_RTP_RELEASED); + MSC_EV_CALL_LEG_RTP_COMPLETE); OSMO_ASSERT(cl); /* HACK: We put the connection in loopback mode at the beginnig to diff --git a/src/libmsc/msc_i.c b/src/libmsc/msc_i.c index 05df9cb..f7aab0d 100644 --- a/src/libmsc/msc_i.c +++ b/src/libmsc/msc_i.c @@ -278,7 +278,6 @@ OSMO_VALUE_STRING(MSC_REMOTE_EV_RX_GSUP), OSMO_VALUE_STRING(MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE), OSMO_VALUE_STRING(MSC_EV_CALL_LEG_RTP_COMPLETE), - OSMO_VALUE_STRING(MSC_EV_CALL_LEG_RTP_RELEASED), OSMO_VALUE_STRING(MSC_EV_CALL_LEG_TERM), OSMO_VALUE_STRING(MSC_MNCC_EV_NEED_LOCAL_RTP), OSMO_VALUE_STRING(MSC_MNCC_EV_CALL_PROCEEDING), diff --git a/src/libmsc/msc_t.c b/src/libmsc/msc_t.c index c6bba47..8eefccc 100644 --- a/src/libmsc/msc_t.c +++ b/src/libmsc/msc_t.c @@ -359,8 +359,7 @@ msc_t->inter_msc.call_leg = call_leg_alloc(msc_t->c.fi, MSC_EV_CALL_LEG_TERM, MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE, - MSC_EV_CALL_LEG_RTP_COMPLETE, - MSC_EV_CALL_LEG_RTP_RELEASED); + MSC_EV_CALL_LEG_RTP_COMPLETE); if (!msc_t->inter_msc.call_leg || call_leg_ensure_ci(msc_t->inter_msc.call_leg, RTP_TO_RAN, msc_t->inter_msc.callref, NULL, NULL, NULL) || call_leg_ensure_ci(msc_t->inter_msc.call_leg, RTP_TO_CN, msc_t->inter_msc.callref, NULL, NULL, NULL)) { @@ -391,7 +390,6 @@ msc_t_send_stored_ho_request(msc_t); return; - case MSC_EV_CALL_LEG_RTP_RELEASED: case MSC_EV_CALL_LEG_TERM: msc_t->inter_msc.call_leg = NULL; msc_t_error("Failed to set up MGW endpoint\n"); @@ -550,7 +548,6 @@ msc_t_down_l2_co(msc_t, an_apdu, false); return; - case MSC_EV_CALL_LEG_RTP_RELEASED: case MSC_EV_CALL_LEG_TERM: msc_t->inter_msc.call_leg = NULL; msc_t_error("Failed to set up MGW endpoint\n"); @@ -609,8 +606,7 @@ msc_i->c.fi, MSC_EV_CALL_LEG_TERM, MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE, - MSC_EV_CALL_LEG_RTP_COMPLETE, - MSC_EV_CALL_LEG_RTP_RELEASED); + MSC_EV_CALL_LEG_RTP_COMPLETE); /* msc_i_set_ran_conn() properly "steals" the ran_conn from msc_t */ msc_i_set_ran_conn(msc_i, msc_t->ran_conn); @@ -657,7 +653,6 @@ msc_t_down_l2_co(msc_t, an_apdu, false); return; - case MSC_EV_CALL_LEG_RTP_RELEASED: case MSC_EV_CALL_LEG_TERM: msc_t->inter_msc.call_leg = NULL; msc_t_error("Failed to set up MGW endpoint\n"); @@ -795,7 +790,6 @@ .action = msc_t_fsm_wait_local_rtp, .in_event_mask = 0 | S(MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE) - | S(MSC_EV_CALL_LEG_RTP_RELEASED) | S(MSC_EV_CALL_LEG_TERM) | S(MSC_MNCC_EV_CALL_ENDED) | S(MSC_T_EV_CN_CLOSE) @@ -810,7 +804,6 @@ .in_event_mask = 0 | S(MSC_EV_FROM_RAN_UP_L2) | S(MSC_EV_FROM_RAN_CONN_RELEASED) - | S(MSC_EV_CALL_LEG_RTP_RELEASED) | S(MSC_EV_CALL_LEG_TERM) | S(MSC_MNCC_EV_CALL_ENDED) | S(MSC_T_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST) @@ -827,7 +820,6 @@ .in_event_mask = 0 | S(MSC_EV_FROM_RAN_UP_L2) | S(MSC_EV_FROM_RAN_CONN_RELEASED) - | S(MSC_EV_CALL_LEG_RTP_RELEASED) | S(MSC_EV_CALL_LEG_TERM) | S(MSC_MNCC_EV_CALL_ENDED) | S(MSC_T_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST) @@ -841,7 +833,6 @@ OSMO_VALUE_STRING(MSC_REMOTE_EV_RX_GSUP), OSMO_VALUE_STRING(MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE), OSMO_VALUE_STRING(MSC_EV_CALL_LEG_RTP_COMPLETE), - OSMO_VALUE_STRING(MSC_EV_CALL_LEG_RTP_RELEASED), OSMO_VALUE_STRING(MSC_EV_CALL_LEG_TERM), OSMO_VALUE_STRING(MSC_MNCC_EV_NEED_LOCAL_RTP), OSMO_VALUE_STRING(MSC_MNCC_EV_CALL_PROCEEDING), -- To view, visit https://gerrit.osmocom.org/13945 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I6b2fc1225c960fa2f7c46adf241520217a07821c Gerrit-Change-Number: 13945 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:25:02 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 9 May 2019 14:25:02 +0000 Subject: Change in osmo-msc[master]: call_leg: document the parent_event_* items Message-ID: Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/13946 Change subject: call_leg: document the parent_event_* items ...................................................................... call_leg: document the parent_event_* items Change-Id: Ib099178a0f6ab218646c67c0e7a3d360c81af684 --- M include/osmocom/msc/call_leg.h M src/libmsc/call_leg.c 2 files changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/46/13946/1 diff --git a/include/osmocom/msc/call_leg.h b/include/osmocom/msc/call_leg.h index 61107ee..d8380f5 100644 --- a/include/osmocom/msc/call_leg.h +++ b/include/osmocom/msc/call_leg.h @@ -34,6 +34,7 @@ /* Array indexed by enum rtp_direction. */ enum mgcp_connection_mode crcx_conn_mode[2]; + /* Events dispatched to the parent fi, see call_leg_alloc() doc. */ uint32_t parent_event_rtp_addr_available; uint32_t parent_event_rtp_complete; diff --git a/src/libmsc/call_leg.c b/src/libmsc/call_leg.c index 1b7db2b..46405bc 100644 --- a/src/libmsc/call_leg.c +++ b/src/libmsc/call_leg.c @@ -64,6 +64,14 @@ OSMO_ASSERT( osmo_fsm_register(&call_leg_fsm) == 0 ); } +/* Allocate a call leg FSM instance as child of an arbitrary other FSM instance. + * The call leg FSM dispatches events to its parent FSM instance on specific events: + * - parent_event_term: dispatch this to the parent FI when the call leg terminates (call ended, either planned or by + * failure). + * - parent_event_rtp_addr_available: one of the rtp_stream instances managed by the call leg has received an RTP + * address from the MGW. The struct rtp_stream instance is passed as data argument for the event dispatch. + * - parent_event_rtp_complete: one of the rtp_stream instances entered the RTP_STREAM_ST_ESTABLISHED state. + */ struct call_leg *call_leg_alloc(struct osmo_fsm_inst *parent_fi, uint32_t parent_event_term, uint32_t parent_event_rtp_addr_available, -- To view, visit https://gerrit.osmocom.org/13946 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ib099178a0f6ab218646c67c0e7a3d360c81af684 Gerrit-Change-Number: 13946 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:27:44 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 9 May 2019 14:27:44 +0000 Subject: Change in osmo-msc[master]: call_leg: document the parent_event_* items In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13946 ) Change subject: call_leg: document the parent_event_* items ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13946 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib099178a0f6ab218646c67c0e7a3d360c81af684 Gerrit-Change-Number: 13946 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 09 May 2019 14:27:44 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:29:07 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Thu, 9 May 2019 14:29:07 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Revert partial of 0ac6315212a3 ("msc: add inter-BSC and inter-MSC Han... Message-ID: lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/13947 Change subject: Revert partial of 0ac6315212a3 ("msc: add inter-BSC and inter-MSC Handover tests") ...................................................................... Revert partial of 0ac6315212a3 ("msc: add inter-BSC and inter-MSC Handover tests") Commit 0ac6315212a breaks all related GSUP SS tests because it require all GSUP SS packages to have a OSMO_GSUP_MESSAGE_CLASS_USSD IE. Change-Id: Iadbc37105fa67cf6383fb63b86ed653ccc7bddf7 --- M library/GSUP_Types.ttcn 1 file changed, 0 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/47/13947/1 diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn index 73f4562..7e26e19 100644 --- a/library/GSUP_Types.ttcn +++ b/library/GSUP_Types.ttcn @@ -1091,20 +1091,14 @@ tr_GSUP_IE_SessionId(sid), tr_GSUP_IE_SessionState(state) }; - var integer last_idx := 3; /* Optional SS payload */ if (istemplatekind(ss, "*")) { ies[3] := *; - last_idx := last_idx + 1; } else if (not istemplatekind(ss, "omit")) { ies[3] := tr_GSUP_IE_SSInfo(ss); - last_idx := last_idx + 1; } - ies[last_idx] := tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_USSD); - last_idx := last_idx + 1; - return ies; } -- To view, visit https://gerrit.osmocom.org/13947 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Iadbc37105fa67cf6383fb63b86ed653ccc7bddf7 Gerrit-Change-Number: 13947 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:31:52 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 9 May 2019 14:31:52 +0000 Subject: Change in osmo-msc[master]: no HO call forwarding if no RTP stream In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13940 ) Change subject: no HO call forwarding if no RTP stream ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/13940/1/src/libmsc/msc_ho.c File src/libmsc/msc_ho.c: https://gerrit.osmocom.org/#/c/13940/1/src/libmsc/msc_ho.c at 546 PS1, Line 546: rtp_to_ran = cl ? cl->rtp[RTP_TO_RAN] : NULL; > Assigning NULL to 'rtp_to_ran' doesn't make sense anymore. [?] makes sense to me. I could do this: if (!cl) { error... } if (!cl->rtp[RTP_TO_RAN]) { error... } instead I just rtp_to_ran = pointer or NULL if (!rtp_to_ran) { error... } so it saves one if() YMMV, but nothing wrong with this, right? -- To view, visit https://gerrit.osmocom.org/13940 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia223c2e20e625879ab71fc5c8afd0305fd224c58 Gerrit-Change-Number: 13940 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 09 May 2019 14:31:52 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:34:08 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 14:34:08 +0000 Subject: Change in osmo-msc[master]: LOG_TRANS: store subsys in trans, unify USSD logging back to DMM In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13941 ) Change subject: LOG_TRANS: store subsys in trans, unify USSD logging back to DMM ...................................................................... Patch Set 1: Code-Review+2 (2 comments) https://gerrit.osmocom.org/#/c/13941/1/include/osmocom/msc/transaction.h File include/osmocom/msc/transaction.h: https://gerrit.osmocom.org/#/c/13941/1/include/osmocom/msc/transaction.h at 173 PS1, Line 173: deserves its own logging subsystem ACK! https://gerrit.osmocom.org/#/c/13941/1/src/libmsc/transaction.c File src/libmsc/transaction.c: https://gerrit.osmocom.org/#/c/13941/1/src/libmsc/transaction.c at 149 PS1, Line 149: trans->log_subsys = trans_log_subsys(trans); Good optimization. -- To view, visit https://gerrit.osmocom.org/13941 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6dfe5b98fb9e884c2dde61d603832dafceb12123 Gerrit-Change-Number: 13941 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 09 May 2019 14:34:08 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:35:42 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 14:35:42 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Revert partial of 0ac6315212a3 ("msc: add inter-BSC and inter-MSC Han... In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13947 ) Change subject: Revert partial of 0ac6315212a3 ("msc: add inter-BSC and inter-MSC Handover tests") ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13947 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iadbc37105fa67cf6383fb63b86ed653ccc7bddf7 Gerrit-Change-Number: 13947 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Comment-Date: Thu, 09 May 2019 14:35:42 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:37:02 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 14:37:02 +0000 Subject: Change in osmo-ccid-firmware[master]: switch UART_debug to ASYNC In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13673 ) Change subject: switch UART_debug to ASYNC ...................................................................... Patch Set 9: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13673 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If18883e96f336aa9f6b11607859260da5e1503c7 Gerrit-Change-Number: 13673 Gerrit-PatchSet: 9 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: K?vin Redon Gerrit-Comment-Date: Thu, 09 May 2019 14:37:02 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:37:20 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 14:37:20 +0000 Subject: Change in osmo-ccid-firmware[master]: add async library with ring on TX In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13677 ) Change subject: add async library with ring on TX ...................................................................... Patch Set 11: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13677 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iafd5295b90ef9f428f640314c24f6c31ee82c9d6 Gerrit-Change-Number: 13677 Gerrit-PatchSet: 11 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 09 May 2019 14:37:20 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:37:23 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 14:37:23 +0000 Subject: Change in osmo-ccid-firmware[master]: UART_debug now uses the async library with tx ring In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13678 ) Change subject: UART_debug now uses the async library with tx ring ...................................................................... Patch Set 11: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13678 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4cf689a8d3dc292201f1e2ce6c013aa1686ad6bc Gerrit-Change-Number: 13678 Gerrit-PatchSet: 11 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 09 May 2019 14:37:23 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:37:31 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 14:37:31 +0000 Subject: Change in osmo-ccid-firmware[master]: switch UART_debug to ASYNC In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13673 ) Change subject: switch UART_debug to ASYNC ...................................................................... switch UART_debug to ASYNC using the synchronous HAL library causes RX overflow after 5 bytes on bulk incoming data (e.g. pasted). this mainly due to printing synchronously the character, but to further prevent congestion we switch to asynchronous (e.g. interrupt driven) communication. The RX part works great now (no overflow), but the TX part is malfunctioning because the HAL Async library does not buffer the data to be transmitted and expects it to be in memory until the transmission is complete (which printf does not do). This change will not be reflected in Atmel START since it does not allow to set the underlying STDIO redirect peripheral to async. Change-Id: If18883e96f336aa9f6b11607859260da5e1503c7 --- M sysmoOCTSIM/command.c M sysmoOCTSIM/driver_init.c M sysmoOCTSIM/driver_init.h M sysmoOCTSIM/hpl/sercom/hpl_sercom.c M sysmoOCTSIM/main.c M sysmoOCTSIM/manual_test.c M sysmoOCTSIM/stdio_start.c 7 files changed, 73 insertions(+), 22 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/sysmoOCTSIM/command.c b/sysmoOCTSIM/command.c index b0949f3..6fa25cf 100644 --- a/sysmoOCTSIM/command.c +++ b/sysmoOCTSIM/command.c @@ -81,7 +81,7 @@ unsigned int i = 0; /* yield CPU after maximum of 10 received characters */ - while (usart_sync_is_rx_not_empty(&UART_debug) && (i < 10)) { + while (usart_async_is_rx_not_empty(&UART_debug) && (i < 10)) { int c = getchar(); if (c < 0) return; diff --git a/sysmoOCTSIM/driver_init.c b/sysmoOCTSIM/driver_init.c index 726129d..8a50925 100644 --- a/sysmoOCTSIM/driver_init.c +++ b/sysmoOCTSIM/driver_init.c @@ -32,6 +32,9 @@ /*! The buffer size for USART */ #define SIM6_BUFFER_SIZE 16 +/*! The buffer size for USART */ +#define UART_DEBUG_BUFFER_SIZE 32 + struct usart_async_descriptor SIM0; struct usart_async_descriptor SIM1; struct usart_async_descriptor SIM2; @@ -48,7 +51,9 @@ static uint8_t SIM5_buffer[SIM5_BUFFER_SIZE]; static uint8_t SIM6_buffer[SIM6_BUFFER_SIZE]; -struct usart_sync_descriptor UART_debug; +struct usart_async_descriptor UART_debug; + +static uint8_t UART_DEBUG_buffer[UART_DEBUG_BUFFER_SIZE]; /** * \brief USART Clock initialization function @@ -309,7 +314,26 @@ SIM6_PORT_init(); } -void UART_debug_PORT_init(void) +/** + * \brief USART Clock initialization function + * + * Enables register interface and peripheral clock + */ +void UART_debug_CLOCK_init() +{ + + hri_gclk_write_PCHCTRL_reg(GCLK, SERCOM7_GCLK_ID_CORE, CONF_GCLK_SERCOM7_CORE_SRC | (1 << GCLK_PCHCTRL_CHEN_Pos)); + hri_gclk_write_PCHCTRL_reg(GCLK, SERCOM7_GCLK_ID_SLOW, CONF_GCLK_SERCOM7_SLOW_SRC | (1 << GCLK_PCHCTRL_CHEN_Pos)); + + hri_mclk_set_APBDMASK_SERCOM7_bit(MCLK); +} + +/** + * \brief USART pinmux initialization function + * + * Set each required pin to USART functionality + */ +void UART_debug_PORT_init() { gpio_set_pin_function(UART_TX, PINMUX_PB30C_SERCOM7_PAD0); @@ -317,18 +341,15 @@ gpio_set_pin_function(UART_RX, PINMUX_PB31C_SERCOM7_PAD1); } -void UART_debug_CLOCK_init(void) -{ - hri_gclk_write_PCHCTRL_reg(GCLK, SERCOM7_GCLK_ID_CORE, CONF_GCLK_SERCOM7_CORE_SRC | (1 << GCLK_PCHCTRL_CHEN_Pos)); - hri_gclk_write_PCHCTRL_reg(GCLK, SERCOM7_GCLK_ID_SLOW, CONF_GCLK_SERCOM7_SLOW_SRC | (1 << GCLK_PCHCTRL_CHEN_Pos)); - - hri_mclk_set_APBDMASK_SERCOM7_bit(MCLK); -} - +/** + * \brief USART initialization function + * + * Enables USART peripheral, clocks and initializes USART driver + */ void UART_debug_init(void) { UART_debug_CLOCK_init(); - usart_sync_init(&UART_debug, SERCOM7, (void *)NULL); + usart_async_init(&UART_debug, SERCOM7, UART_DEBUG_buffer, UART_DEBUG_BUFFER_SIZE, (void *)NULL); UART_debug_PORT_init(); } diff --git a/sysmoOCTSIM/driver_init.h b/sysmoOCTSIM/driver_init.h index d809db8..9d009b9 100644 --- a/sysmoOCTSIM/driver_init.h +++ b/sysmoOCTSIM/driver_init.h @@ -40,8 +40,7 @@ extern struct usart_async_descriptor SIM4; extern struct usart_async_descriptor SIM5; extern struct usart_async_descriptor SIM6; - -extern struct usart_sync_descriptor UART_debug; +extern struct usart_async_descriptor UART_debug; void SIM0_PORT_init(void); void SIM0_CLOCK_init(void); diff --git a/sysmoOCTSIM/hpl/sercom/hpl_sercom.c b/sysmoOCTSIM/hpl/sercom/hpl_sercom.c index b14e720..f235115 100644 --- a/sysmoOCTSIM/hpl/sercom/hpl_sercom.c +++ b/sysmoOCTSIM/hpl/sercom/hpl_sercom.c @@ -177,6 +177,8 @@ static struct _usart_async_device *_sercom6_dev = NULL; +static struct _usart_async_device *_sercom7_dev = NULL; + static uint8_t _get_sercom_index(const void *const hw); static uint8_t _sercom_get_irq_num(const void *const hw); static void _sercom_init_irq_param(const void *const hw, void *dev); @@ -665,6 +667,10 @@ if (hw == SERCOM6) { _sercom6_dev = (struct _usart_async_device *)dev; } + + if (hw == SERCOM7) { + _sercom7_dev = (struct _usart_async_device *)dev; + } } /** @@ -2628,6 +2634,35 @@ _sercom_usart_interrupt_handler(_sercom6_dev); } +/** + * \internal Sercom interrupt handler + */ +void SERCOM7_0_Handler(void) +{ + _sercom_usart_interrupt_handler(_sercom7_dev); +} +/** + * \internal Sercom interrupt handler + */ +void SERCOM7_1_Handler(void) +{ + _sercom_usart_interrupt_handler(_sercom7_dev); +} +/** + * \internal Sercom interrupt handler + */ +void SERCOM7_2_Handler(void) +{ + _sercom_usart_interrupt_handler(_sercom7_dev); +} +/** + * \internal Sercom interrupt handler + */ +void SERCOM7_3_Handler(void) +{ + _sercom_usart_interrupt_handler(_sercom7_dev); +} + int32_t _spi_m_sync_init(struct _spi_m_sync_dev *dev, void *const hw) { const struct sercomspi_regs_cfg *regs = _spi_get_regs((uint32_t)hw); diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 843652b..47d1cd1 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -308,8 +308,6 @@ { atmel_start_init(); - usart_sync_enable(&UART_debug); - usb_start(); board_init(); diff --git a/sysmoOCTSIM/manual_test.c b/sysmoOCTSIM/manual_test.c index 5cc9bca..526414a 100644 --- a/sysmoOCTSIM/manual_test.c +++ b/sysmoOCTSIM/manual_test.c @@ -203,7 +203,7 @@ int c; do { - } while (!usart_sync_is_rx_not_empty(&UART_debug)); + } while (!usart_async_is_rx_not_empty(&UART_debug)); c = getchar(); if (c < 0) diff --git a/sysmoOCTSIM/stdio_start.c b/sysmoOCTSIM/stdio_start.c index 7450a08..e2fb0c2 100644 --- a/sysmoOCTSIM/stdio_start.c +++ b/sysmoOCTSIM/stdio_start.c @@ -9,15 +9,13 @@ #include "atmel_start.h" #include "stdio_start.h" -void STDIO_REDIRECT_0_example(void) +static void UART_debug_rx_cb(const struct usart_async_descriptor *const io_descr) { - /* Print welcome message */ - printf("\r\nHello ATMEL World!\r\n"); } void stdio_redirect_init(void) { - - usart_sync_enable(&UART_debug); + usart_async_register_callback(&UART_debug, USART_ASYNC_RXC_CB, UART_debug_rx_cb); // if no callback function is registered receive won't work, even if the callback does nothing + usart_async_enable(&UART_debug); stdio_io_init(&UART_debug.io); } -- To view, visit https://gerrit.osmocom.org/13673 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If18883e96f336aa9f6b11607859260da5e1503c7 Gerrit-Change-Number: 13673 Gerrit-PatchSet: 9 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: K?vin Redon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:37:32 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 14:37:32 +0000 Subject: Change in osmo-ccid-firmware[master]: add async library with ring on TX In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13677 ) Change subject: add async library with ring on TX ...................................................................... add async library with ring on TX the standard async library expected the caller to wait until the transmission was complete (by counting using the transmit callback or checking using usart_async_get_status) before freeing/reusing the memory holding the data to be transmitted. this is not practical when using stdio on top of the peripheral since printf returns directly and reuses the memory. the new USART async library has a ring buffer for the data to be transmitted (similar to the data being received). WARNING: write is blocking when the TX buffer is full. this prevents loosing data. Change-Id: Iafd5295b90ef9f428f640314c24f6c31ee82c9d6 --- M sysmoOCTSIM/gcc/Makefile A sysmoOCTSIM/hal/include/hal_usart_async_rings.h A sysmoOCTSIM/hal/src/hal_usart_async_rings.c 3 files changed, 770 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index 2575c35..5d21cb0 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -86,6 +86,7 @@ hpl/osc32kctrl/hpl_osc32kctrl.o \ driver_init.o \ hal/src/hal_usart_async.o \ +hal/src/hal_usart_async_rings.o \ hpl/sercom/hpl_sercom.o \ hal/utils/src/utils_ringbuffer.o \ hal/src/hal_gpio.o \ @@ -134,6 +135,7 @@ "hpl/osc32kctrl/hpl_osc32kctrl.o" \ "driver_init.o" \ "hal/src/hal_usart_async.o" \ +"hal/src/hal_usart_async_rings.o" \ "hpl/sercom/hpl_sercom.o" \ "hal/utils/src/utils_ringbuffer.o" \ "hal/src/hal_gpio.o" \ @@ -178,6 +180,7 @@ "driver_init.d" \ "stdio_redirect/gcc/read.d" \ "hal/src/hal_usart_async.d" \ +"hal/src/hal_usart_async_rings.d" \ "hpl/osc32kctrl/hpl_osc32kctrl.d" \ "main.d" \ "manual_test.d" \ diff --git a/sysmoOCTSIM/hal/include/hal_usart_async_rings.h b/sysmoOCTSIM/hal/include/hal_usart_async_rings.h new file mode 100644 index 0000000..c66e21c --- /dev/null +++ b/sysmoOCTSIM/hal/include/hal_usart_async_rings.h @@ -0,0 +1,341 @@ +/** + * \file + * + * \brief USART related functionality declaration. + * + * Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries. + * Copyright (C) 2019 sysmocom -s.f.m.c. GmbH, Author: Kevin Redon + * + * \asf_license_start + * + * \page License + * + * Subject to your compliance with these terms, you may use Microchip + * software and any derivatives exclusively with Microchip products. + * It is your responsibility to comply with third party license terms applicable + * to your use of third party software (including open source software) that + * may accompany Microchip software. + * + * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, + * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, + * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, + * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE + * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL + * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE + * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE + * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT + * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY + * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, + * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + * \asf_license_stop + * + */ + +#ifndef _HAL_USART_ASYNC_RINGS_H_INCLUDED +#define _HAL_USART_ASYNC_RINGS_H_INCLUDED + +#include "hal_io.h" +#include +#include + +/** + * \addtogroup doc_driver_hal_usart_async + * + * @{ + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * \brief USART descriptor + * + * The USART descriptor forward declaration. + */ +struct usart_async_rings_descriptor; + +/** + * \brief USART callback type + */ +typedef void (*usart_rings_cb_t)(const struct usart_async_rings_descriptor *const descr); + +/** + * \brief USART callback types + */ +enum usart_async_rings_callback_type { USART_ASYNC_RINGS_RXC_CB, USART_ASYNC_RINGS_TXC_CB, USART_ASYNC_RINGS_ERROR_CB }; + +/** + * \brief USART callbacks + */ +struct usart_async_rings_callbacks { + usart_rings_cb_t tx_done; + usart_rings_cb_t rx_done; + usart_rings_cb_t error; +}; + +/** \brief USART status + * Status descriptor holds the current status of transfer. + */ +struct usart_async_rings_status { + /** Status flags */ + uint32_t flags; + /** Number of characters transmitted */ + uint16_t txcnt; + /** Number of characters receviced */ + uint16_t rxcnt; +}; + +/** + * \brief Asynchronous USART descriptor structure + */ +struct usart_async_rings_descriptor { + struct io_descriptor io; + struct _usart_async_device device; + struct usart_async_rings_callbacks usart_cb; + uint32_t stat; + + struct ringbuffer rx; + struct ringbuffer tx; +}; + +/** USART write busy */ +#define USART_ASYNC_RINGS_STATUS_BUSY 0x0001 + +/** + * \brief Initialize USART interface + * + * This function initializes the given I/O descriptor to be used as USART + * interface descriptor. + * It checks if the given hardware is not initialized and if the given hardware + * is permitted to be initialized. + * + * \param[out] descr A USART descriptor which is used to communicate via the USART + * \param[in] hw The pointer to the hardware instance + * \param[in] rx_buffer An RX buffer + * \param[in] rx_buffer_length The length of the buffer above + * \param[in] tx_buffer An TX buffer + * \param[in] tx_buffer_length The length of the buffer above + * \param[in] func The pointer to a set of function pointers + * + * \return Initialization status. + * \retval -1 Passed parameters were invalid or the interface is already + * initialized + * \retval 0 The initialization is completed successfully + */ +int32_t usart_async_rings_init(struct usart_async_rings_descriptor *const descr, void *const hw, uint8_t *const rx_buffer, + const uint16_t rx_buffer_length, uint8_t *const tx_buffer, + const uint16_t tx_buffer_length, void *const func); + +/** + * \brief Deinitialize USART interface + * + * This function deinitializes the given I/O descriptor. + * It checks if the given hardware is initialized and if the given hardware + * is permitted to be deinitialized. + * + * \param[in] descr A USART descriptor which is used to communicate via USART + * + * \return De-initialization status. + */ +int32_t usart_async_rings_deinit(struct usart_async_rings_descriptor *const descr); + +/** + * \brief Enable USART interface + * + * Enables the USART interface + * + * \param[in] descr A USART descriptor which is used to communicate via USART + * + * \return Enabling status. + */ +int32_t usart_async_rings_enable(struct usart_async_rings_descriptor *const descr); + +/** + * \brief Disable USART interface + * + * Disables the USART interface + * + * \param[in] descr A USART descriptor which is used to communicate via USART + * + * \return Disabling status. + */ +int32_t usart_async_rings_disable(struct usart_async_rings_descriptor *const descr); + +/** + * \brief Retrieve I/O descriptor + * + * This function retrieves the I/O descriptor of the given USART descriptor. + * + * \param[in] descr A USART descriptor which is used to communicate via USART + * \param[out] io An I/O descriptor to retrieve + * + * \return The status of I/O descriptor retrieving. + */ +int32_t usart_async_rings_get_io_descriptor(struct usart_async_rings_descriptor *const descr, struct io_descriptor **io); + +/** + * \brief Register USART callback + * + * \param[in] descr A USART descriptor which is used to communicate via USART + * \param[in] type Callback type + * \param[in] cb A callback function + * + * \return The status of callback assignment. + * \retval -1 Passed parameters were invalid or the interface is not initialized + * \retval 0 A callback is registered successfully + */ +int32_t usart_async_rings_register_callback(struct usart_async_rings_descriptor *const descr, + const enum usart_async_rings_callback_type type, usart_rings_cb_t cb); + +/** + * \brief Specify action for flow control pins + * + * This function sets action (or state) for flow control pins if + * the flow control is enabled. + * It sets state of flow control pins only if automatic support of + * the flow control is not supported by the hardware. + * + * \param[in] descr A USART descriptor which is used to communicate via USART + * \param[in] state A state to set the flow control pins + * + * \return The status of flow control action setup. + */ +int32_t usart_async_rings_set_flow_control(struct usart_async_rings_descriptor *const descr, + const union usart_flow_control_state state); + +/** + * \brief Set USART baud rate + * + * \param[in] descr A USART descriptor which is used to communicate via USART + * \param[in] baud_rate A baud rate to set + * + * \return The status of baud rate setting. + */ +int32_t usart_async_rings_set_baud_rate(struct usart_async_rings_descriptor *const descr, const uint32_t baud_rate); + +/** + * \brief Set USART data order + * + * \param[in] descr A USART descriptor which is used to communicate via USART + * \param[in] data_order A data order to set + * + * \return The status of data order setting. + */ +int32_t usart_async_rings_set_data_order(struct usart_async_rings_descriptor *const descr, const enum usart_data_order data_order); + +/** + * \brief Set USART mode + * + * \param[in] descr A USART descriptor which is used to communicate via USART + * \param[in] mode A mode to set + * + * \return The status of mode setting. + */ +int32_t usart_async_rings_set_mode(struct usart_async_rings_descriptor *const descr, const enum usart_mode mode); + +/** + * \brief Set USART parity + * + * \param[in] descr A USART descriptor which is used to communicate via USART + * \param[in] parity A parity to set + * + * \return The status of parity setting. + */ +int32_t usart_async_rings_set_parity(struct usart_async_rings_descriptor *const descr, const enum usart_parity parity); + +/** + * \brief Set USART stop bits + * + * \param[in] descr A USART descriptor which is used to communicate via USART + * \param[in] stop_bits Stop bits to set + * + * \return The status of stop bits setting. + */ +int32_t usart_async_rings_set_stopbits(struct usart_async_rings_descriptor *const descr, const enum usart_stop_bits stop_bits); + +/** + * \brief Set USART character size + * + * \param[in] descr A USART descriptor which is used to communicate via USART + * \param[in] size A character size to set + * + * \return The status of character size setting. + */ +int32_t usart_async_rings_set_character_size(struct usart_async_rings_descriptor *const descr, + const enum usart_character_size size); + +/** + * \brief Retrieve the state of flow control pins + * + * This function retrieves the flow control pins + * if the flow control is enabled. + * + * The function can return USART_FLOW_CONTROL_STATE_UNAVAILABLE in case + * if the flow control is done by the hardware + * and the pins state cannot be read out. + * + * \param[in] descr A USART descriptor which is used to communicate via USART + * \param[out] state The state of flow control pins + * + * \return The status of flow control state reading. + */ +int32_t usart_async_rings_flow_control_status(const struct usart_async_rings_descriptor *const descr, + union usart_flow_control_state *const state); + +/** + * \brief Check if the USART transmitter is empty + * + * \param[in] descr A USART descriptor which is used to communicate via USART + * + * \return The status of USART TX empty checking. + * \retval 0 The USART transmitter is not empty + * \retval 1 The USART transmitter is empty + */ +int32_t usart_async_rings_is_tx_empty(const struct usart_async_rings_descriptor *const descr); + +/** + * \brief Check if the USART receiver is not empty + * + * \param[in] descr A USART descriptor which is used to communicate via USART + * + * \return The status of the USART RX empty checking. + * \retval 1 The USART receiver is not empty + * \retval 0 The USART receiver is empty + */ +int32_t usart_async_rings_is_rx_not_empty(const struct usart_async_rings_descriptor *const descr); + +/** + * \brief Retrieve the current interface status + * + * \param[in] descr A USART descriptor which is used to communicate via USART + * \param[out] status The state of USART + * + * \return The status of USART status retrieving. + */ +int32_t usart_async_rings_get_status(struct usart_async_rings_descriptor *const descr, struct usart_async_rings_status *const status); + +/** + * \brief flush USART ringbuf + * + * This function flush USART RX ringbuf. + * + * \param[in] descr The pointer to USART descriptor + * + * \return ERR_NONE + */ +int32_t usart_async_rings_flush_rx_buffer(struct usart_async_rings_descriptor *const descr); + +/** + * \brief Retrieve the current driver version + * + * \return Current driver version. + */ +uint32_t usart_async_rings_get_version(void); + +#ifdef __cplusplus +} +#endif +/**@}*/ +#endif /* _HAL_USART_ASYNC_RINGS_H_INCLUDED */ diff --git a/sysmoOCTSIM/hal/src/hal_usart_async_rings.c b/sysmoOCTSIM/hal/src/hal_usart_async_rings.c new file mode 100644 index 0000000..38bdca4 --- /dev/null +++ b/sysmoOCTSIM/hal/src/hal_usart_async_rings.c @@ -0,0 +1,426 @@ +/** + * \file + * + * \brief I/O USART related functionality implementation. + * + * Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries. + * Copyright (C) 2019 sysmocom -s.f.m.c. GmbH, Author: Kevin Redon + * + * \asf_license_start + * + * \page License + * + * Subject to your compliance with these terms, you may use Microchip + * software and any derivatives exclusively with Microchip products. + * It is your responsibility to comply with third party license terms applicable + * to your use of third party software (including open source software) that + * may accompany Microchip software. + * + * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, + * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, + * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, + * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE + * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL + * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE + * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE + * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT + * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY + * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, + * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + * \asf_license_stop + * + */ + +#include "hal_usart_async_rings.h" +#include +#include +#include + +/** + * \brief Driver version + */ +#define DRIVER_VERSION 0x00000001u + +static int32_t usart_async_rings_write(struct io_descriptor *const io_descr, const uint8_t *const buf, const uint16_t length); +static int32_t usart_async_rings_read(struct io_descriptor *const io_descr, uint8_t *const buf, const uint16_t length); +static void usart_process_byte_sent(struct _usart_async_device *device); +static void usart_transmission_complete(struct _usart_async_device *device); +static void usart_error(struct _usart_async_device *device); +static void usart_fill_rx_buffer(struct _usart_async_device *device, uint8_t data); + +/** + * \brief Initialize usart interface + */ +int32_t usart_async_rings_init(struct usart_async_rings_descriptor *const descr, void *const hw, uint8_t *const rx_buffer, + const uint16_t rx_buffer_length, uint8_t *const tx_buffer, + const uint16_t tx_buffer_length, void *const func) +{ + int32_t init_status; + ASSERT(descr && hw && rx_buffer && rx_buffer_length && tx_buffer && tx_buffer_length); + + if (ERR_NONE != ringbuffer_init(&descr->rx, rx_buffer, rx_buffer_length)) { + return ERR_INVALID_ARG; + } + if (ERR_NONE != ringbuffer_init(&descr->tx, tx_buffer, tx_buffer_length)) { + return ERR_INVALID_ARG; + } + init_status = _usart_async_init(&descr->device, hw); + if (init_status) { + return init_status; + } + + descr->io.read = usart_async_rings_read; + descr->io.write = usart_async_rings_write; + + descr->device.usart_cb.tx_byte_sent = usart_process_byte_sent; + descr->device.usart_cb.rx_done_cb = usart_fill_rx_buffer; + descr->device.usart_cb.tx_done_cb = usart_transmission_complete; + descr->device.usart_cb.error_cb = usart_error; + + return ERR_NONE; +} + +/** + * \brief Deinitialize usart interface + */ +int32_t usart_async_rings_deinit(struct usart_async_rings_descriptor *const descr) +{ + ASSERT(descr); + _usart_async_deinit(&descr->device); + descr->io.read = NULL; + descr->io.write = NULL; + + return ERR_NONE; +} + +/** + * \brief Enable usart interface + */ +int32_t usart_async_rings_enable(struct usart_async_rings_descriptor *const descr) +{ + ASSERT(descr); + _usart_async_enable(&descr->device); + + return ERR_NONE; +} + +/** + * \brief Disable usart interface + */ +int32_t usart_async_rings_disable(struct usart_async_rings_descriptor *const descr) +{ + ASSERT(descr); + _usart_async_disable(&descr->device); + + return ERR_NONE; +} + +/** + * \brief Retrieve I/O descriptor + */ +int32_t usart_async_rings_get_io_descriptor(struct usart_async_rings_descriptor *const descr, struct io_descriptor **io) +{ + ASSERT(descr && io); + + *io = &descr->io; + return ERR_NONE; +} + +/** + * \brief Register usart callback + */ +int32_t usart_async_rings_register_callback(struct usart_async_rings_descriptor *const descr, + const enum usart_async_rings_callback_type type, usart_rings_cb_t cb) +{ + ASSERT(descr); + + switch (type) { + case USART_ASYNC_RINGS_RXC_CB: + descr->usart_cb.rx_done = cb; + _usart_async_set_irq_state(&descr->device, USART_ASYNC_RX_DONE, NULL != cb); + break; + case USART_ASYNC_RINGS_TXC_CB: + descr->usart_cb.tx_done = cb; + _usart_async_set_irq_state(&descr->device, USART_ASYNC_TX_DONE, NULL != cb); + break; + case USART_ASYNC_RINGS_ERROR_CB: + descr->usart_cb.error = cb; + _usart_async_set_irq_state(&descr->device, USART_ASYNC_ERROR, NULL != cb); + break; + default: + return ERR_INVALID_ARG; + } + + return ERR_NONE; +} + +/** + * \brief Specify action for flow control pins + */ +int32_t usart_async_rings_set_flow_control(struct usart_async_rings_descriptor *const descr, + const union usart_flow_control_state state) +{ + ASSERT(descr); + _usart_async_set_flow_control_state(&descr->device, state); + + return ERR_NONE; +} + +/** + * \brief Set usart baud rate + */ +int32_t usart_async_rings_set_baud_rate(struct usart_async_rings_descriptor *const descr, const uint32_t baud_rate) +{ + ASSERT(descr); + _usart_async_set_baud_rate(&descr->device, baud_rate); + + return ERR_NONE; +} + +/** + * \brief Set usart data order + */ +int32_t usart_async_rings_set_data_order(struct usart_async_rings_descriptor *const descr, const enum usart_data_order data_order) +{ + ASSERT(descr); + _usart_async_set_data_order(&descr->device, data_order); + + return ERR_NONE; +} + +/** + * \brief Set usart mode + */ +int32_t usart_async_rings_set_mode(struct usart_async_rings_descriptor *const descr, const enum usart_mode mode) +{ + ASSERT(descr); + _usart_async_set_mode(&descr->device, mode); + + return ERR_NONE; +} + +/** + * \brief Set usart parity + */ +int32_t usart_async_rings_set_parity(struct usart_async_rings_descriptor *const descr, const enum usart_parity parity) +{ + ASSERT(descr); + _usart_async_set_parity(&descr->device, parity); + + return ERR_NONE; +} + +/** + * \brief Set usart stop bits + */ +int32_t usart_async_rings_set_stopbits(struct usart_async_rings_descriptor *const descr, const enum usart_stop_bits stop_bits) +{ + ASSERT(descr); + _usart_async_set_stop_bits(&descr->device, stop_bits); + + return ERR_NONE; +} + +/** + * \brief Set usart character size + */ +int32_t usart_async_rings_set_character_size(struct usart_async_rings_descriptor *const descr, const enum usart_character_size size) +{ + ASSERT(descr); + _usart_async_set_character_size(&descr->device, size); + + return ERR_NONE; +} + +/** + * \brief Retrieve the state of flow control pins + */ +int32_t usart_async_rings_flow_control_status(const struct usart_async_rings_descriptor *const descr, + union usart_flow_control_state *const state) +{ + ASSERT(descr && state); + *state = _usart_async_get_flow_control_state(&descr->device); + + return ERR_NONE; +} + +/** + * \brief Check if the usart transmitter is empty + */ +int32_t usart_async_rings_is_tx_empty(const struct usart_async_rings_descriptor *const descr) +{ + ASSERT(descr); + return _usart_async_is_byte_sent(&descr->device); +} + +/** + * \brief Check if the usart receiver is not empty + */ +int32_t usart_async_rings_is_rx_not_empty(const struct usart_async_rings_descriptor *const descr) +{ + ASSERT(descr); + + return ringbuffer_num(&descr->rx) > 0; +} + +/** + * \brief Retrieve the current interface status + */ +int32_t usart_async_rings_get_status(struct usart_async_rings_descriptor *const descr, struct usart_async_rings_status *const status) +{ + ASSERT(descr); + + volatile uint32_t *tmp_stat = &(descr->stat); + + if (status) { + status->flags = *tmp_stat; + status->txcnt = ringbuffer_num(&descr->tx); + status->rxcnt = ringbuffer_num(&descr->rx); + } + if (*tmp_stat & USART_ASYNC_RINGS_STATUS_BUSY) { + return ERR_BUSY; + } + + return ERR_NONE; +} + +/** + * \brief flush usart rx ringbuf + */ +int32_t usart_async_rings_flush_rx_buffer(struct usart_async_rings_descriptor *const descr) +{ + ASSERT(descr); + + return ringbuffer_flush(&descr->rx); +} + +/** + * \brief Retrieve the current driver version + */ +uint32_t usart_async_rings_get_version(void) +{ + return DRIVER_VERSION; +} + +/* + * \internal Write the given data to usart interface + * + * \param[in] descr The pointer to an io descriptor + * \param[in] buf Data to write to usart + * \param[in] length The number of bytes to write + * + * \return The number of bytes written. + * + * \warning blocking when the transmit buffer is full + */ +static int32_t usart_async_rings_write(struct io_descriptor *const io_descr, const uint8_t *const buf, const uint16_t length) +{ + struct usart_async_rings_descriptor *descr = CONTAINER_OF(io_descr, struct usart_async_rings_descriptor, io); + + ASSERT(descr && buf && length); + + for (uint16_t i = 0; i < length; i++) { + while (ringbuffer_num(&descr->tx) > descr->tx.size); // WARNING blocking until there is space in the buffer + ringbuffer_put(&descr->tx, buf[i]); + } + descr->stat = USART_ASYNC_RINGS_STATUS_BUSY; + _usart_async_enable_byte_sent_irq(&descr->device); + + return (int32_t)length; +} + +/* + * \internal Read data from usart interface + * + * \param[in] descr The pointer to an io descriptor + * \param[in] buf A buffer to read data to + * \param[in] length The size of a buffer + * + * \return The number of bytes read. + */ +static int32_t usart_async_rings_read(struct io_descriptor *const io_descr, uint8_t *const buf, const uint16_t length) +{ + uint16_t was_read = 0; + uint32_t num; + struct usart_async_rings_descriptor *descr = CONTAINER_OF(io_descr, struct usart_async_rings_descriptor, io); + + ASSERT(descr && buf && length); + + CRITICAL_SECTION_ENTER() + num = ringbuffer_num(&descr->rx); + CRITICAL_SECTION_LEAVE() + + while ((was_read < num) && (was_read < length)) { + ringbuffer_get(&descr->rx, &buf[was_read++]); + } + + return (int32_t)was_read; +} + +/** + * \brief Process "byte is sent" interrupt + * + * \param[in] device The pointer to device structure + */ +static void usart_process_byte_sent(struct _usart_async_device *device) +{ + struct usart_async_rings_descriptor *descr = CONTAINER_OF(device, struct usart_async_rings_descriptor, device); + if (ringbuffer_num(&descr->tx)) { + uint8_t byte; + ringbuffer_get(&descr->tx, &byte); + _usart_async_write_byte(&descr->device, byte); + _usart_async_enable_byte_sent_irq(&descr->device); + } else { + _usart_async_enable_tx_done_irq(&descr->device); + } +} + +/** + * \brief Process completion of data sending + * + * \param[in] device The pointer to device structure + */ +static void usart_transmission_complete(struct _usart_async_device *device) +{ + struct usart_async_rings_descriptor *descr = CONTAINER_OF(device, struct usart_async_rings_descriptor, device); + + descr->stat = 0; + if (descr->usart_cb.tx_done) { + descr->usart_cb.tx_done(descr); + } +} + +/** + * \brief Process byte reception + * + * \param[in] device The pointer to device structure + * \param[in] data Data read + */ +static void usart_fill_rx_buffer(struct _usart_async_device *device, uint8_t data) +{ + struct usart_async_rings_descriptor *descr = CONTAINER_OF(device, struct usart_async_rings_descriptor, device); + + ringbuffer_put(&descr->rx, data); + + if (descr->usart_cb.rx_done) { + descr->usart_cb.rx_done(descr); + } +} + +/** + * \brief Process error interrupt + * + * \param[in] device The pointer to device structure + */ +static void usart_error(struct _usart_async_device *device) +{ + struct usart_async_rings_descriptor *descr = CONTAINER_OF(device, struct usart_async_rings_descriptor, device); + + descr->stat = 0; + if (descr->usart_cb.error) { + descr->usart_cb.error(descr); + } +} + +//@} -- To view, visit https://gerrit.osmocom.org/13677 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iafd5295b90ef9f428f640314c24f6c31ee82c9d6 Gerrit-Change-Number: 13677 Gerrit-PatchSet: 11 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:37:32 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 14:37:32 +0000 Subject: Change in osmo-ccid-firmware[master]: UART_debug now uses the async library with tx ring In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13678 ) Change subject: UART_debug now uses the async library with tx ring ...................................................................... UART_debug now uses the async library with tx ring Change-Id: I4cf689a8d3dc292201f1e2ce6c013aa1686ad6bc --- M sysmoOCTSIM/command.c M sysmoOCTSIM/driver_init.c M sysmoOCTSIM/driver_init.h M sysmoOCTSIM/manual_test.c M sysmoOCTSIM/stdio_start.c 5 files changed, 13 insertions(+), 18 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/sysmoOCTSIM/command.c b/sysmoOCTSIM/command.c index 6fa25cf..454cd2f 100644 --- a/sysmoOCTSIM/command.c +++ b/sysmoOCTSIM/command.c @@ -81,7 +81,7 @@ unsigned int i = 0; /* yield CPU after maximum of 10 received characters */ - while (usart_async_is_rx_not_empty(&UART_debug) && (i < 10)) { + while (usart_async_rings_is_rx_not_empty(&UART_debug) && (i < 10)) { int c = getchar(); if (c < 0) return; diff --git a/sysmoOCTSIM/driver_init.c b/sysmoOCTSIM/driver_init.c index 8a50925..0b6b190 100644 --- a/sysmoOCTSIM/driver_init.c +++ b/sysmoOCTSIM/driver_init.c @@ -33,7 +33,7 @@ #define SIM6_BUFFER_SIZE 16 /*! The buffer size for USART */ -#define UART_DEBUG_BUFFER_SIZE 32 +#define UART_DEBUG_BUFFER_SIZE 256 struct usart_async_descriptor SIM0; struct usart_async_descriptor SIM1; @@ -51,9 +51,10 @@ static uint8_t SIM5_buffer[SIM5_BUFFER_SIZE]; static uint8_t SIM6_buffer[SIM6_BUFFER_SIZE]; -struct usart_async_descriptor UART_debug; +struct usart_async_rings_descriptor UART_debug; -static uint8_t UART_DEBUG_buffer[UART_DEBUG_BUFFER_SIZE]; +static uint8_t UART_DEBUG_buffer_rx[UART_DEBUG_BUFFER_SIZE]; +static uint8_t UART_DEBUG_buffer_tx[UART_DEBUG_BUFFER_SIZE]; /** * \brief USART Clock initialization function @@ -349,7 +350,7 @@ void UART_debug_init(void) { UART_debug_CLOCK_init(); - usart_async_init(&UART_debug, SERCOM7, UART_DEBUG_buffer, UART_DEBUG_BUFFER_SIZE, (void *)NULL); + usart_async_rings_init(&UART_debug, SERCOM7, UART_DEBUG_buffer_rx, UART_DEBUG_BUFFER_SIZE, UART_DEBUG_buffer_tx, UART_DEBUG_BUFFER_SIZE, (void *)NULL); UART_debug_PORT_init(); } diff --git a/sysmoOCTSIM/driver_init.h b/sysmoOCTSIM/driver_init.h index 9d009b9..6c4f3a1 100644 --- a/sysmoOCTSIM/driver_init.h +++ b/sysmoOCTSIM/driver_init.h @@ -21,15 +21,9 @@ #include #include -#include -#include -#include -#include -#include -#include -#include - #include +#include +#include #include "hal_usb_device.h" @@ -40,7 +34,7 @@ extern struct usart_async_descriptor SIM4; extern struct usart_async_descriptor SIM5; extern struct usart_async_descriptor SIM6; -extern struct usart_async_descriptor UART_debug; +extern struct usart_async_rings_descriptor UART_debug; void SIM0_PORT_init(void); void SIM0_CLOCK_init(void); diff --git a/sysmoOCTSIM/manual_test.c b/sysmoOCTSIM/manual_test.c index 526414a..d6852bc 100644 --- a/sysmoOCTSIM/manual_test.c +++ b/sysmoOCTSIM/manual_test.c @@ -203,7 +203,7 @@ int c; do { - } while (!usart_async_is_rx_not_empty(&UART_debug)); + } while (!usart_async_rings_is_rx_not_empty(&UART_debug)); c = getchar(); if (c < 0) diff --git a/sysmoOCTSIM/stdio_start.c b/sysmoOCTSIM/stdio_start.c index e2fb0c2..8a15c88 100644 --- a/sysmoOCTSIM/stdio_start.c +++ b/sysmoOCTSIM/stdio_start.c @@ -9,13 +9,13 @@ #include "atmel_start.h" #include "stdio_start.h" -static void UART_debug_rx_cb(const struct usart_async_descriptor *const io_descr) +static void UART_debug_rx_cb(const struct usart_async_rings_descriptor *const io_descr) { } void stdio_redirect_init(void) { - usart_async_register_callback(&UART_debug, USART_ASYNC_RXC_CB, UART_debug_rx_cb); // if no callback function is registered receive won't work, even if the callback does nothing - usart_async_enable(&UART_debug); + usart_async_rings_register_callback(&UART_debug, USART_ASYNC_RXC_CB, UART_debug_rx_cb); // if no callback function is registered receive won't work, even if the callback does nothing + usart_async_rings_enable(&UART_debug); stdio_io_init(&UART_debug.io); } -- To view, visit https://gerrit.osmocom.org/13678 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I4cf689a8d3dc292201f1e2ce6c013aa1686ad6bc Gerrit-Change-Number: 13678 Gerrit-PatchSet: 11 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:37:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 14:37:33 +0000 Subject: Change in osmo-ccid-firmware[master]: output 50 MHz for RMII In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13780 ) Change subject: output 50 MHz for RMII ...................................................................... output 50 MHz for RMII in hardware revision 2 the Ethernet PHY RMII_CLOCK input clock is connected to the MCU pin PA10. GCLK4 of the MCU now outputs the required 50 MHz clock on this pin. the same clock is re-used for UART debug to generate the 921600 bps baud rate. Change-Id: Id3a3dee15c3986536b0623d0f39ca62e94acd1fd --- M sysmoOCTSIM/atmel_start_config.atstart M sysmoOCTSIM/atmel_start_pins.h M sysmoOCTSIM/config/hpl_gclk_config.h M sysmoOCTSIM/config/peripheral_clk_config.h M sysmoOCTSIM/driver_init.c 5 files changed, 63 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/sysmoOCTSIM/atmel_start_config.atstart b/sysmoOCTSIM/atmel_start_config.atstart index 4fda2f8..6357a74 100644 --- a/sysmoOCTSIM/atmel_start_config.atstart +++ b/sysmoOCTSIM/atmel_start_config.atstart @@ -702,7 +702,7 @@ gclk_arch_gen_3_runstdby: false gclk_arch_gen_4_enable: true gclk_arch_gen_4_idc: false - gclk_arch_gen_4_oe: false + gclk_arch_gen_4_oe: true gclk_arch_gen_4_oov: false gclk_arch_gen_4_runstdby: false gclk_arch_gen_5_enable: true @@ -748,7 +748,7 @@ gclk_gen_3_div: 1 gclk_gen_3_div_sel: false gclk_gen_3_oscillator: 32kHz External Crystal Oscillator (XOSC32K) - gclk_gen_4_div: 1 + gclk_gen_4_div: 2 gclk_gen_4_div_sel: false gclk_gen_4_oscillator: Digital Phase Locked Loop (DPLL1) gclk_gen_5_div: 5 @@ -1462,6 +1462,16 @@ mode: Peripheral IO user_label: SIM2_IO configuration: null + RMII_CLOCK: + name: PA10 + definition: Atmel:SAME54_Drivers:0.0.1::SAME54N19A-AF::pad::PA10 + mode: Advanced + user_label: RMII_CLOCK + configuration: + pad_direction: Out + pad_function: M + pad_initial_level: Low + pad_pull_config: 'Off' SIMCLK_20MHZ: name: PA11 definition: Atmel:SAME54_Drivers:0.0.1::SAME54N19A-AF::pad::PA11 diff --git a/sysmoOCTSIM/atmel_start_pins.h b/sysmoOCTSIM/atmel_start_pins.h index 0264736..7cbaed5 100644 --- a/sysmoOCTSIM/atmel_start_pins.h +++ b/sysmoOCTSIM/atmel_start_pins.h @@ -31,6 +31,7 @@ #define SIM5_INT GPIO(GPIO_PORTA, 3) #define SIM0_IO GPIO(GPIO_PORTA, 4) #define SIM2_IO GPIO(GPIO_PORTA, 9) +#define RMII_CLOCK GPIO(GPIO_PORTA, 10) #define SIMCLK_20MHZ GPIO(GPIO_PORTA, 11) #define SIM1_IO GPIO(GPIO_PORTA, 16) #define VB0 GPIO(GPIO_PORTA, 20) diff --git a/sysmoOCTSIM/config/hpl_gclk_config.h b/sysmoOCTSIM/config/hpl_gclk_config.h index 71c26e1..81a1f03 100644 --- a/sysmoOCTSIM/config/hpl_gclk_config.h +++ b/sysmoOCTSIM/config/hpl_gclk_config.h @@ -349,7 +349,7 @@ // Indicates whether Output Enable is enabled or not // gclk_arch_gen_4_oe #ifndef CONF_GCLK_GEN_4_OE -#define CONF_GCLK_GEN_4_OE 0 +#define CONF_GCLK_GEN_4_OE 1 #endif // Output Off Value @@ -378,7 +378,7 @@ // Generic clock generator 4 division <0x0000-0xFFFF> // gclk_gen_4_div #ifndef CONF_GCLK_GEN_4_DIV -#define CONF_GCLK_GEN_4_DIV 1 +#define CONF_GCLK_GEN_4_DIV 2 #endif // // diff --git a/sysmoOCTSIM/config/peripheral_clk_config.h b/sysmoOCTSIM/config/peripheral_clk_config.h index 4bff6ff..2ae1f63 100644 --- a/sysmoOCTSIM/config/peripheral_clk_config.h +++ b/sysmoOCTSIM/config/peripheral_clk_config.h @@ -641,7 +641,7 @@ * \brief SERCOM7's Core Clock frequency */ #ifndef CONF_GCLK_SERCOM7_CORE_FREQUENCY -#define CONF_GCLK_SERCOM7_CORE_FREQUENCY 100000000 +#define CONF_GCLK_SERCOM7_CORE_FREQUENCY 50000000 #endif /** diff --git a/sysmoOCTSIM/driver_init.c b/sysmoOCTSIM/driver_init.c index 0b6b190..1233d02 100644 --- a/sysmoOCTSIM/driver_init.c +++ b/sysmoOCTSIM/driver_init.c @@ -503,6 +503,53 @@ gpio_set_pin_function(SIM5_INT, GPIO_PIN_FUNCTION_OFF); + // GPIO on PA10 + + gpio_set_pin_direction(RMII_CLOCK, + // Pin direction + // pad_direction + // Off + // In + // Out + GPIO_DIRECTION_OUT); + + gpio_set_pin_level(RMII_CLOCK, + // Initial level + // pad_initial_level + // Low + // High + false); + + gpio_set_pin_pull_mode(RMII_CLOCK, + // Pull configuration + // pad_pull_config + // Off + // Pull-up + // Pull-down + GPIO_PULL_OFF); + + gpio_set_pin_function(RMII_CLOCK, + // Pin function + // pad_function + // Auto : use driver pinmux if signal is imported by driver, else turn off function + // Auto + // Off + // A + // B + // C + // D + // E + // F + // G + // H + // I + // J + // K + // L + // M + // N + GPIO_PIN_FUNCTION_M); + // GPIO on PA11 gpio_set_pin_direction(SIMCLK_20MHZ, -- To view, visit https://gerrit.osmocom.org/13780 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id3a3dee15c3986536b0623d0f39ca62e94acd1fd Gerrit-Change-Number: 13780 Gerrit-PatchSet: 3 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:37:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 14:37:33 +0000 Subject: Change in osmo-ccid-firmware[master]: configure GCLK for ISO baud rates In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13781 ) Change subject: configure GCLK for ISO baud rates ...................................................................... configure GCLK for ISO baud rates the SERCOMM clock triplet 0.5 MHz (100 MHz / 200), 7.0588 MHz (120 MHz / 17), and 50 MHz (100 MHz / 2) allows to generate all possible ISO 7816 baud rates (from F = 2048 / D = 1 @ f = 2.5 MHz -> 1220 bps to F = 372 / D = 64 @ f = 20 MHz -> 3.4 Mbps) with a maximum baud rate error of 2.57 %, for available SIM clocks 2.5, 5, 10, 20 MHz. 2.57% means a bit more than quarter a bit might be wrong after the 11 bits ISO transmission (still less than half a bit). This triplet is one of the optimum when 3 clocks are used. An additional clock would be required for higher accuracy. The 50 MHz clock is re-used from the RMII clock output. Change-Id: I2c69848582e49031fa6453f535a2bf1408f8e22e --- M sysmoOCTSIM/atmel_start_config.atstart M sysmoOCTSIM/config/hpl_gclk_config.h M sysmoOCTSIM/config/peripheral_clk_config.h 3 files changed, 17 insertions(+), 17 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/sysmoOCTSIM/atmel_start_config.atstart b/sysmoOCTSIM/atmel_start_config.atstart index 6357a74..3854fb5 100644 --- a/sysmoOCTSIM/atmel_start_config.atstart +++ b/sysmoOCTSIM/atmel_start_config.atstart @@ -666,7 +666,7 @@ enable_gclk_gen_3: true enable_gclk_gen_4: true enable_gclk_gen_5: true - enable_gclk_gen_6: false + enable_gclk_gen_6: true enable_gclk_gen_7: false enable_gclk_gen_8: false enable_gclk_gen_9: false @@ -710,7 +710,7 @@ gclk_arch_gen_5_oe: true gclk_arch_gen_5_oov: false gclk_arch_gen_5_runstdby: false - gclk_arch_gen_6_enable: false + gclk_arch_gen_6_enable: true gclk_arch_gen_6_idc: false gclk_arch_gen_6_oe: false gclk_arch_gen_6_oov: false @@ -742,7 +742,7 @@ gclk_gen_1_div: 1 gclk_gen_1_div_sel: false gclk_gen_1_oscillator: Digital Frequency Locked Loop (DFLL48M) - gclk_gen_2_div: 30 + gclk_gen_2_div: 200 gclk_gen_2_div_sel: false gclk_gen_2_oscillator: Digital Phase Locked Loop (DPLL1) gclk_gen_3_div: 1 @@ -754,9 +754,9 @@ gclk_gen_5_div: 5 gclk_gen_5_div_sel: false gclk_gen_5_oscillator: Digital Phase Locked Loop (DPLL1) - gclk_gen_6_div: 1 + gclk_gen_6_div: 17 gclk_gen_6_div_sel: false - gclk_gen_6_oscillator: External Crystal Oscillator 8-48MHz (XOSC1) + gclk_gen_6_oscillator: Digital Phase Locked Loop (DPLL0) gclk_gen_7_div: 1 gclk_gen_7_div_sel: false gclk_gen_7_oscillator: External Crystal Oscillator 8-48MHz (XOSC1) diff --git a/sysmoOCTSIM/config/hpl_gclk_config.h b/sysmoOCTSIM/config/hpl_gclk_config.h index 81a1f03..158fc93 100644 --- a/sysmoOCTSIM/config/hpl_gclk_config.h +++ b/sysmoOCTSIM/config/hpl_gclk_config.h @@ -226,7 +226,7 @@ // Generic clock generator 2 division <0x0000-0xFFFF> // gclk_gen_2_div #ifndef CONF_GCLK_GEN_2_DIV -#define CONF_GCLK_GEN_2_DIV 30 +#define CONF_GCLK_GEN_2_DIV 200 #endif // // @@ -463,7 +463,7 @@ // Indicates whether generic clock 6 configuration is enabled or not // enable_gclk_gen_6 #ifndef CONF_GCLK_GENERATOR_6_CONFIG -#define CONF_GCLK_GENERATOR_6_CONFIG 0 +#define CONF_GCLK_GENERATOR_6_CONFIG 1 #endif // Generic Clock Generator Control @@ -480,7 +480,7 @@ // This defines the clock source for generic clock generator 6 // gclk_gen_6_oscillator #ifndef CONF_GCLK_GEN_6_SOURCE -#define CONF_GCLK_GEN_6_SOURCE GCLK_GENCTRL_SRC_XOSC1 +#define CONF_GCLK_GEN_6_SOURCE GCLK_GENCTRL_SRC_DPLL0 #endif // Run in Standby @@ -522,7 +522,7 @@ // Indicates whether Generic Clock Generator Enable is enabled or not // gclk_arch_gen_6_enable #ifndef CONF_GCLK_GEN_6_GENEN -#define CONF_GCLK_GEN_6_GENEN 0 +#define CONF_GCLK_GEN_6_GENEN 1 #endif // @@ -530,7 +530,7 @@ // Generic clock generator 6 division <0x0000-0xFFFF> // gclk_gen_6_div #ifndef CONF_GCLK_GEN_6_DIV -#define CONF_GCLK_GEN_6_DIV 1 +#define CONF_GCLK_GEN_6_DIV 17 #endif // // diff --git a/sysmoOCTSIM/config/peripheral_clk_config.h b/sysmoOCTSIM/config/peripheral_clk_config.h index 2ae1f63..f794792 100644 --- a/sysmoOCTSIM/config/peripheral_clk_config.h +++ b/sysmoOCTSIM/config/peripheral_clk_config.h @@ -81,7 +81,7 @@ * \brief SERCOM0's Core Clock frequency */ #ifndef CONF_GCLK_SERCOM0_CORE_FREQUENCY -#define CONF_GCLK_SERCOM0_CORE_FREQUENCY 3333333 +#define CONF_GCLK_SERCOM0_CORE_FREQUENCY 500000 #endif /** @@ -161,7 +161,7 @@ * \brief SERCOM1's Core Clock frequency */ #ifndef CONF_GCLK_SERCOM1_CORE_FREQUENCY -#define CONF_GCLK_SERCOM1_CORE_FREQUENCY 3333333 +#define CONF_GCLK_SERCOM1_CORE_FREQUENCY 500000 #endif /** @@ -241,7 +241,7 @@ * \brief SERCOM2's Core Clock frequency */ #ifndef CONF_GCLK_SERCOM2_CORE_FREQUENCY -#define CONF_GCLK_SERCOM2_CORE_FREQUENCY 3333333 +#define CONF_GCLK_SERCOM2_CORE_FREQUENCY 500000 #endif /** @@ -321,7 +321,7 @@ * \brief SERCOM3's Core Clock frequency */ #ifndef CONF_GCLK_SERCOM3_CORE_FREQUENCY -#define CONF_GCLK_SERCOM3_CORE_FREQUENCY 3333333 +#define CONF_GCLK_SERCOM3_CORE_FREQUENCY 500000 #endif /** @@ -401,7 +401,7 @@ * \brief SERCOM4's Core Clock frequency */ #ifndef CONF_GCLK_SERCOM4_CORE_FREQUENCY -#define CONF_GCLK_SERCOM4_CORE_FREQUENCY 3333333 +#define CONF_GCLK_SERCOM4_CORE_FREQUENCY 500000 #endif /** @@ -481,7 +481,7 @@ * \brief SERCOM5's Core Clock frequency */ #ifndef CONF_GCLK_SERCOM5_CORE_FREQUENCY -#define CONF_GCLK_SERCOM5_CORE_FREQUENCY 3333333 +#define CONF_GCLK_SERCOM5_CORE_FREQUENCY 500000 #endif /** @@ -561,7 +561,7 @@ * \brief SERCOM6's Core Clock frequency */ #ifndef CONF_GCLK_SERCOM6_CORE_FREQUENCY -#define CONF_GCLK_SERCOM6_CORE_FREQUENCY 3333333 +#define CONF_GCLK_SERCOM6_CORE_FREQUENCY 500000 #endif /** -- To view, visit https://gerrit.osmocom.org/13781 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I2c69848582e49031fa6453f535a2bf1408f8e22e Gerrit-Change-Number: 13781 Gerrit-PatchSet: 3 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:37:34 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 14:37:34 +0000 Subject: Change in osmo-ccid-firmware[master]: add function to set baudrate In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13845 ) Change subject: add function to set baudrate ...................................................................... add function to set baudrate it will set the GCLK as SERCOM core clock with the lowest baud rate error and set the closest baud rate in the SERCOM peripheral. Change-Id: I01db273f4c8170a4942049653c575010b93296ce --- M sysmoOCTSIM/main.c 1 file changed, 78 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 47d1cd1..70099e1 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -18,12 +18,14 @@ #include #include +#include #include #include #include #include "atmel_start.h" #include "atmel_start_pins.h" +#include "config/hpl_gclk_config.h" #include "i2c_bitbang.h" #include "octsim_i2c.h" @@ -39,6 +41,21 @@ { } +/** possible clock sources for the SERCOM peripheral + * warning: the definition must match the GCLK configuration + */ +static const uint8_t sercom_glck_sources[] = {GCLK_PCHCTRL_GEN_GCLK2_Val, GCLK_PCHCTRL_GEN_GCLK4_Val, GCLK_PCHCTRL_GEN_GCLK6_Val}; + +/** possible clock frequencies in MHz for the SERCOM peripheral + * warning: the definition must match the GCLK configuration + */ +static const double sercom_glck_freqs[] = {100E6 / CONF_GCLK_GEN_2_DIV, 100E6 / CONF_GCLK_GEN_4_DIV, 120E6 / CONF_GCLK_GEN_6_DIV}; + +/** the GCLK ID for the SERCOM SIM peripherals + * @note: used as index for PCHCTRL + */ +static const uint8_t SIM_peripheral_GCLK_ID[] = {SERCOM0_GCLK_ID_CORE, SERCOM1_GCLK_ID_CORE, SERCOM2_GCLK_ID_CORE, SERCOM3_GCLK_ID_CORE, SERCOM4_GCLK_ID_CORE, SERCOM5_GCLK_ID_CORE, SERCOM6_GCLK_ID_CORE, SERCOM7_GCLK_ID_CORE}; + static void board_init() { int i; @@ -81,6 +98,66 @@ return slotnr; } +/** change baud rate of card slot + * @param[in] slotnr slot number for which the baud rate should be set + * @param[in] baudrate baud rate in bps to set + * @return if the baud rate has been set, else a parameter is out of range + */ +static bool slot_set_baudrate(uint8_t slotnr, uint32_t baudrate) +{ + ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); + + // calculate the error corresponding to the clock sources + uint16_t bauds[ARRAY_SIZE(sercom_glck_freqs)]; + double errors[ARRAY_SIZE(sercom_glck_freqs)]; + for (uint8_t i = 0; i < ARRAY_SIZE(sercom_glck_freqs); i++) { + double freq = sercom_glck_freqs[i]; // remember possible SERCOM frequency + uint32_t min = freq / (2 * (255 + 1)); // calculate the minimum baud rate for this frequency + uint32_t max = freq / (2 * (0 + 1)); // calculate the maximum baud rate for this frequency + if (baudrate < min || baudrate > max) { // baud rate it out of supported range + errors[i] = NAN; + } else { + uint16_t baud = round(freq / (2 * baudrate) - 1); + bauds[i] = baud; + double actual = freq / (2 * (baud + 1)); + errors[i] = fabs(1.0 - (actual / baudrate)); + } + } + + // find the smallest error + uint8_t best = ARRAY_SIZE(sercom_glck_freqs); + for (uint8_t i = 0; i < ARRAY_SIZE(sercom_glck_freqs); i++) { + if (isnan(errors[i])) { + continue; + } + if (best >= ARRAY_SIZE(sercom_glck_freqs)) { + best = i; + } else if (errors[i] < errors[best]) { + best = i; + } + } + if (best >= ARRAY_SIZE(sercom_glck_freqs)) { // found no clock supporting this baud rate + return false; + } + + // set clock and baud rate + struct usart_async_descriptor* slot = SIM_peripheral_descriptors[slotnr]; // get slot + if (NULL == slot) { + return false; + } + printf("(%u) switching SERCOM clock to GCLK%u (freq = %lu kHz) and baud rate to %lu bps (baud = %u)\r\n", slotnr, (best + 1) * 2, (uint32_t)(round(sercom_glck_freqs[best] / 1000)), baudrate, bauds[best]); + while (!usart_async_is_tx_empty(slot)); // wait for transmission to complete (WARNING no timeout) + usart_async_disable(slot); // disable SERCOM peripheral + hri_gclk_clear_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], (1 << GCLK_PCHCTRL_CHEN_Pos)); // disable clock for this peripheral + while (hri_gclk_get_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], (1 << GCLK_PCHCTRL_CHEN_Pos))); // wait until clock is really disabled + // it does not seem we need to completely disable the peripheral using hri_mclk_clear_APBDMASK_SERCOMn_bit + hri_gclk_write_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], sercom_glck_sources[best] | (1 << GCLK_PCHCTRL_CHEN_Pos)); // set peripheral core clock and re-enable it + usart_async_set_baud_rate(slot, bauds[best]); // set the new baud rate + usart_async_enable(slot); // re-enable SERCOM peripheral + + return true; +} + DEFUN(sim_status, cmd_sim_status, "sim-status", "Get state of specified NCN8025") { struct ncn8025_settings settings; @@ -245,7 +322,7 @@ // TODO wait some time for card to be completely deactivated usart_async_flush_rx_buffer(SIM_peripheral_descriptors[slotnr]); // flush RX buffer to start from scratch - //usart_async_set_baud_rate(SIM_peripheral_descriptors[slotnr], 2500000 / (372 / 1)); // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) + slot_set_baudrate(slotnr, 2500000 / (372 / 1)); // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) // set clock to lowest frequency (20 MHz / 8 = 2.5 MHz) // note: according to ISO/IEC 7816-3:2006 section 5.2.3 the minimum value is 1 MHz, and maximum is 5 MHz during activation settings.clkdiv = SIM_CLKDIV_8; -- To view, visit https://gerrit.osmocom.org/13845 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I01db273f4c8170a4942049653c575010b93296ce Gerrit-Change-Number: 13845 Gerrit-PatchSet: 3 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:37:34 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 14:37:34 +0000 Subject: Change in osmo-ccid-firmware[master]: add ISO 7816-3 definitions and utilities In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13846 ) Change subject: add ISO 7816-3 definitions and utilities ...................................................................... add ISO 7816-3 definitions and utilities Change-Id: Ice4eba380126ff92089b71d0ea328b0110f7ffec --- M sysmoOCTSIM/gcc/Makefile A sysmoOCTSIM/iso7816_3.c A sysmoOCTSIM/iso7816_3.h 3 files changed, 225 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index 5d21cb0..cf0484c 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -83,6 +83,7 @@ octsim_i2c.o \ ncn8025.o \ command.o \ +iso7816_3.o \ hpl/osc32kctrl/hpl_osc32kctrl.o \ driver_init.o \ hal/src/hal_usart_async.o \ @@ -132,6 +133,7 @@ "octsim_i2c.o" \ "ncn8025.o" \ "command.o" \ +"iso7816_3.o" \ "hpl/osc32kctrl/hpl_osc32kctrl.o" \ "driver_init.o" \ "hal/src/hal_usart_async.o" \ @@ -188,7 +190,8 @@ "octsim_i2c.d" \ "ncn8025.d" \ "command.d" \ -"hal/src/hal_cache.d" \ +"iso7816_3.d" \ +"hal/src/halcache.d" \ "hal/src/hal_sleep.d" \ "hal/utils/src/utils_ringbuffer.d" \ "hpl/sercom/hpl_sercom.d" \ diff --git a/sysmoOCTSIM/iso7816_3.c b/sysmoOCTSIM/iso7816_3.c new file mode 100644 index 0000000..f7262fb --- /dev/null +++ b/sysmoOCTSIM/iso7816_3.c @@ -0,0 +1,123 @@ +/* + * Copyright (C) 2019 sysmocom -s.f.m.c. GmbH, Author: Kevin Redon + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ +#include +#include + +#include "utils.h" +#include "iso7816_3.h" + +const uint16_t iso7816_3_fi_table[16] = { + 372, 372, 558, 744, 1116, 1488, 1860, 0, + 0, 512, 768, 1024, 1536, 2048, 0, 0 +}; + +const uint32_t iso7816_3_fmax_table[16] = { + 4000000, 5000000, 6000000, 8000000, 12000000, 16000000, 20000000, 0, + 0, 5000000, 7500000, 10000000, 15000000, 20000000, 0, 0 +}; + +const uint8_t iso7816_3_di_table[16] = { + 0, 1, 2, 4, 8, 16, 32, 64, + 12, 20, 0, 0, 0, 0, 0, 0, +}; + +/* all values are based on the Elementary Time Unit (ETU), defined in ISO/IEC 7816-3 section 7.1 + * this is the time required to transmit a bit, and is calculated as follows: 1 ETU = (F / D) x (1 / f) where: + * - F is the clock rate conversion integer + * - D is the baud rate adjustment factor + * - f is the clock frequency + * the possible F, f(max), and D values are defined in ISO/IEC 7816-3 table 7 and 8 + * - the initial value for F (after reset) is Fd = 372 + * - the initial value for D (after reset) is Dd = 1 + * - the initial maximum frequency f(max) is 5 MHz + * the card must measure the ETU based on the clock signal provided by the reader + * one ETU (e.g. 1 bit) takes F/D clock cycles, which the card must count + * + * the card can indicate an alternative set of supported values Fi (with corresponding f(max)) and Di for higher baud rate in TA1 in the ATR (see ISO/IEC 7816-3 section 8.3) + * these values are selected according to ISO/IEC 7816-3 section 6.3.1: + * - card in specific mode: they are enforced if TA2 is present (the reader can deactivate the card if it does not support these values) + * - card in negotiable mode: + * -- they can be selected by the reader using the Protocol and Parameters Selection (PPS) procedure + * -- the first offered protocol and default values are used when no PPS is started + * + * PPS is done with Fd and Dd (see ISO/IEC 7816-3 section 9) + * the reader can propose any F and D values between from Fd to Fi, and from Dd to Di (Fi and Di are indicated in TA1) + * the in PPS agreed values F and D are called Fn and Dn and are applied after a successful exchange, corresponding to PPS1_Response bit 5 + * + * the F and D values must be provided to the SAM3S USART peripheral (after reset and PPS) + */ + +bool iso7816_3_valid_f(uint16_t f) +{ + if (0 == f) { + return false; + } + uint8_t i = 0; + for (i = 0; i < ARRAY_SIZE(iso7816_3_fi_table) && iso7816_3_fi_table[i] != f; i++); + return (i < ARRAY_SIZE(iso7816_3_fi_table) && iso7816_3_fi_table[i] == f); +} + +bool iso7816_3_valid_d(uint8_t d) +{ + if (0 == d) { + return false; + } + uint8_t i = 0; + for (i = 0; i < ARRAY_SIZE(iso7816_3_di_table) && iso7816_3_di_table[i] != d; i++); + return (i < ARRAY_SIZE(iso7816_3_di_table) && iso7816_3_di_table[i] == d); +} + +/* + * the ETU is not only used to define the baud rate, but also the Waiting Time (WT) (see ISO/IEC 7816-3 section 8.1) + * when exceeding WT without card response, the reader flags the card as unresponsive, and resets it + * this can be used by the card to indicate errors or unsupported operations + * if the card requires more time to respond, it shall send a procedure byte to restart WT + * WT is calculated as follows (for T=0, see ISO/IEC 7816-3 section 10.2): WT = WI x 960 x (Fi / f(max)) where + * - WI is encoded in TC2 in the ATR (10 if absent) + * - WI does not depend on D/Di (used for the ETU) + * - after reset WT is 9600 ETU + * - WI (e.g. the new WT) is applied when T=0 is used (after 6.3.1), even if Fi is not Fn (this WT extension is important to know for the reader so to have the right timeout) + */ + +int32_t iso7816_3_calculate_wt(uint8_t wi, uint16_t fi, uint8_t di, uint16_t f, uint8_t d) +{ + // sanity checks + if (0 == wi) { + return -1; + } + if (!iso7816_3_valid_f(fi)) { + return -2; + } + if (!iso7816_3_valid_d(di)) { + return -3; + } + if (!iso7816_3_valid_f(f)) { + return -4; + } + if (!iso7816_3_valid_d(d)) { + return -5; + } + if (f > fi) { + return -6; + } + if (d > di) { + return -7; + } + + return wi * 960UL * (fi/f) * (di/d); // calculate timeout value in ETU +} diff --git a/sysmoOCTSIM/iso7816_3.h b/sysmoOCTSIM/iso7816_3.h new file mode 100644 index 0000000..738d2a2 --- /dev/null +++ b/sysmoOCTSIM/iso7816_3.h @@ -0,0 +1,98 @@ +/* + * Copyright (C) 2019 sysmocom -s.f.m.c. GmbH, Author: Kevin Redon + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ +/* this library provides utilities to handle the ISO-7816 part 3 communication aspects (e.g. related to F and D) */ +#pragma once + +#include +#include + +/** default clock rate conversion integer Fd + * @implements ISO/IEC 7816-3:2006(E) section 8.1 + */ +#define ISO7816_3_DEFAULT_FD 372 +/** default baud rate adjustment factor Dd + * @implements ISO/IEC 7816-3:2006(E) section 8.1 + */ +#define ISO7816_3_DEFAULT_DD 1 +/** default clock rate conversion integer Fi + * @implements ISO/IEC 7816-3:2006(E) section 8.3 + * @note non-default value is optionally specified in TA1 + */ +#define ISO7816_3_DEFAULT_FI 372 +/** default baud rate adjustment factor Di + * @implements ISO/IEC 7816-3:2006(E) section 8.3 + * @note non-default value is optionally specified in TA1 + */ +#define ISO7816_3_DEFAULT_DI 1 +/** default maximum clock frequency, in Hz + * @implements ISO/IEC 7816-3:2006(E) section 8.3 + * @note non-default value is optionally specified in TA1 + */ +#define ISO7816_3_DEFAULT_FMAX 5000000UL +/** default Waiting Integer (WI) value for T=0 + * @implements ISO/IEC 7816-3:2006(E) section 10.2 + * @note non-default value is optionally specified in TC2 + */ +#define ISO7816_3_DEFAULT_WI 10 +/** default Waiting Time (WT) value, in ETU + * @implements ISO/IEC 7816-3:2006(E) section 8.1 + * @note depends on Fi, Di, and WI if protocol T=0 is selected + */ +#define ISO7816_3_DEFAULT_WT 9600 + +/** Table encoding the clock rate conversion integer Fi + * @note Fi is indicated in TA1, but the same table is used for F and Fn during PPS + * @implements ISO/IEC 7816-3:2006(E) table 7 + */ +extern const uint16_t iso7816_3_fi_table[]; + +/** Table encoding the maximum clock frequency f_max in Hz + * @implements ISO/IEC 7816-3:2006(E) table 7 + * @note f_max is indicated in TA1, but the same table is used for F and Fn during PPS + */ +extern const uint32_t iso7816_3_fmax_table[]; + +/** Table encoding the baud rate adjust integer Di + * @implements ISO/IEC 7816-3:2006(E) table 8 + * @note Di is indicated in TA1, but the same table is used for D and Dn during PPS + */ +extern const uint8_t iso7816_3_di_table[]; + +/* verify if the clock rate conversion integer F value is valid + * @param[in] f F value to be validated + * @return if F value is valid + * @note only values in ISO/IEC 7816-3:2006(E) table 7 are valid + */ +bool iso7816_3_valid_f(uint16_t f); +/* verify if the baud rate adjustment factor D value is valid + * @param[in] d D value to be validated + * @return if D value is valid + * @note only values in ISO/IEC 7816-3:2006(E) table 8 are valid + */ +bool iso7816_3_valid_d(uint8_t d); +/** calculate Waiting Time (WT) + * @param[in] wi Waiting Integer + * @param[in] fi clock rate conversion integer Fi value + * @param[in] di baud rate adjustment factor Di value + * @param[in] f clock rate conversion integer F value + * @param[in] d baud rate adjustment factor D value + * @return Waiting Time WT, in ETU, or < 0 on error (see code for return codes) + * @note this should happen after reset and T=0 protocol select (through PPS or implicit) + * @implements ISO/IEC 7816-3:2006(E) section 8.1 and 10.2 + */ +int32_t iso7816_3_calculate_wt(uint8_t wi, uint16_t fi, uint8_t di, uint16_t f, uint8_t d); -- To view, visit https://gerrit.osmocom.org/13846 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ice4eba380126ff92089b71d0ea328b0110f7ffec Gerrit-Change-Number: 13846 Gerrit-PatchSet: 3 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:37:35 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 14:37:35 +0000 Subject: Change in osmo-ccid-firmware[master]: add slot_set_isorate to the baud rate using ISO 7816 values In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13847 ) Change subject: add slot_set_isorate to the baud rate using ISO 7816 values ...................................................................... add slot_set_isorate to the baud rate using ISO 7816 values Change-Id: I604f72bb28944962aee055e6d88a435827f79bec --- M sysmoOCTSIM/main.c 1 file changed, 55 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 70099e1..a895c14 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -30,6 +30,7 @@ #include "i2c_bitbang.h" #include "octsim_i2c.h" #include "ncn8025.h" +#include "iso7816_3.h" #include "command.h" @@ -158,6 +159,57 @@ return true; } +/** change ISO baud rate of card slot + * @param[in] slotnr slot number for which the baud rate should be set + * @param[in] clkdiv can clock divider + * @param[in] f clock rate conversion integer F + * @param[in] d baud rate adjustment factor D + * @return if the baud rate has been set, else a parameter is out of range + */ +static bool slot_set_isorate(uint8_t slotnr, enum ncn8025_sim_clkdiv clkdiv, uint16_t f, uint8_t d) +{ + // input checks + ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); + if (clkdiv != SIM_CLKDIV_1 && clkdiv != SIM_CLKDIV_2 && clkdiv != SIM_CLKDIV_4 && clkdiv != SIM_CLKDIV_8) { + return false; + } + if (!iso7816_3_valid_f(f)) { + return false; + } + if (!iso7816_3_valid_d(d)) { + return false; + } + + // set clockdiv + struct ncn8025_settings settings; + ncn8025_get(slotnr, &settings); + if (settings.clkdiv != clkdiv) { + settings.clkdiv = clkdiv; + ncn8025_set(slotnr, &settings); + } + + // calculate desired frequency + uint32_t freq = 20000000UL; // maximum frequency + switch (clkdiv) { + case SIM_CLKDIV_1: + freq /= 1; + break; + case SIM_CLKDIV_2: + freq /= 2; + break; + case SIM_CLKDIV_4: + freq /= 4; + break; + case SIM_CLKDIV_8: + freq /= 8; + break; + } + + // set baud rate + uint32_t baudrate = (freq * d) / f; // calculate actual baud rate + return slot_set_baudrate(slotnr, baudrate); // // set baud rate +} + DEFUN(sim_status, cmd_sim_status, "sim-status", "Get state of specified NCN8025") { struct ncn8025_settings settings; @@ -322,10 +374,12 @@ // TODO wait some time for card to be completely deactivated usart_async_flush_rx_buffer(SIM_peripheral_descriptors[slotnr]); // flush RX buffer to start from scratch - slot_set_baudrate(slotnr, 2500000 / (372 / 1)); // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) + // set clock to lowest frequency (20 MHz / 8 = 2.5 MHz) // note: according to ISO/IEC 7816-3:2006 section 5.2.3 the minimum value is 1 MHz, and maximum is 5 MHz during activation settings.clkdiv = SIM_CLKDIV_8; + // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) + slot_set_isorate(slotnr, settings.clkdiv, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); // set card voltage to 3.0 V (the most supported) // note: according to ISO/IEC 7816-3:2006 no voltage should damage the card, and you should cycle from low to high settings.vsel = SIM_VOLT_3V0; -- To view, visit https://gerrit.osmocom.org/13847 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I604f72bb28944962aee055e6d88a435827f79bec Gerrit-Change-Number: 13847 Gerrit-PatchSet: 4 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: K?vin Redon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:37:56 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 14:37:56 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_08.c: clarify IMEI rejection in gsm48_rx_mm_serv_req() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13944 ) Change subject: libmsc/gsm_04_08.c: clarify IMEI rejection in gsm48_rx_mm_serv_req() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13944 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I65277aee1f52a8b4fd4b970e992482bbadd94d39 Gerrit-Change-Number: 13944 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 09 May 2019 14:37:56 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:38:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 14:38:09 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_08.c: fix: print proper length value In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13906 ) Change subject: libmsc/gsm_04_08.c: fix: print proper length value ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13906 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2bfebce6d017be834bfe7628ffa2b341eb82c11c Gerrit-Change-Number: 13906 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 09 May 2019 14:38:09 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:38:26 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 14:38:26 +0000 Subject: Change in osmo-msc[master]: add DUSSD logging category In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13942 ) Change subject: add DUSSD logging category ...................................................................... Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/13942/1/include/osmocom/msc/debug.h File include/osmocom/msc/debug.h: https://gerrit.osmocom.org/#/c/13942/1/include/osmocom/msc/debug.h at 25 PS1, Line 25: DUSSD Let's rather call it DSS. We're actually dealing with Supplementary Services, and USSD is just a "structured" kind of them. -- To view, visit https://gerrit.osmocom.org/13942 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id7e04c9f5088334cd5ec6cfdb6a9b3a2a7e7fda0 Gerrit-Change-Number: 13942 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 09 May 2019 14:38:26 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:40:30 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 14:40:30 +0000 Subject: Change in osmo-msc[master]: no HO call forwarding if no RTP stream In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13940 ) Change subject: no HO call forwarding if no RTP stream ...................................................................... Patch Set 1: Code-Review+1 Fine with me in general. -- To view, visit https://gerrit.osmocom.org/13940 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia223c2e20e625879ab71fc5c8afd0305fd224c58 Gerrit-Change-Number: 13940 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 09 May 2019 14:40:30 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:45:07 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 14:45:07 +0000 Subject: Change in osmo-msc[master]: call_leg: remove unused event MSC_EV_CALL_LEG_RTP_RELEASED In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13945 ) Change subject: call_leg: remove unused event MSC_EV_CALL_LEG_RTP_RELEASED ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/13945/1/src/libmsc/msc_a.c File src/libmsc/msc_a.c: https://gerrit.osmocom.org/#/c/13945/1/src/libmsc/msc_a.c at a568 PS1, Line 568: :D -- To view, visit https://gerrit.osmocom.org/13945 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6b2fc1225c960fa2f7c46adf241520217a07821c Gerrit-Change-Number: 13945 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 09 May 2019 14:45:07 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:47:15 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 14:47:15 +0000 Subject: Change in osmo-msc[master]: call_leg: document the parent_event_* items In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13946 ) Change subject: call_leg: document the parent_event_* items ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13946 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib099178a0f6ab218646c67c0e7a3d360c81af684 Gerrit-Change-Number: 13946 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 09 May 2019 14:47:15 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:47:54 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 14:47:54 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_08.c: refactor CM Service Request parsing In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13907 ) Change subject: libmsc/gsm_04_08.c: refactor CM Service Request parsing ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/13907 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6e7454d7a6f63fd5a0e12fb90d8c58688da0951e Gerrit-Change-Number: 13907 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 09 May 2019 14:47:54 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 14:52:14 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 9 May 2019 14:52:14 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Revert partial of 0ac6315212a3 ("msc: add inter-BSC and inter-MSC Han... In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13947 ) Change subject: Revert partial of 0ac6315212a3 ("msc: add inter-BSC and inter-MSC Handover tests") ...................................................................... Patch Set 1: Code-Review-1 the problem here is that it might fix 'latest' USSD tests, but it will break tests on 'master' -- To view, visit https://gerrit.osmocom.org/13947 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iadbc37105fa67cf6383fb63b86ed653ccc7bddf7 Gerrit-Change-Number: 13947 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Comment-Date: Thu, 09 May 2019 14:52:14 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 15:11:50 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 15:11:50 +0000 Subject: Change in osmocom-bb[master]: trxcon/l1ctl.c: pass band_arfcn to l1ctl_tx_rach_conf() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/12613 to look at the new patch set (#3). Change subject: trxcon/l1ctl.c: pass band_arfcn to l1ctl_tx_rach_conf() ...................................................................... trxcon/l1ctl.c: pass band_arfcn to l1ctl_tx_rach_conf() This would allow to abstract both L1CTL and TRX interfaces from each other in the upcoming refactoring. Change-Id: I74a23c73b03bad822272b9cfe76c2501666912b7 --- M src/host/trxcon/l1ctl.c M src/host/trxcon/l1ctl.h M src/host/trxcon/sched_lchan_rach.c 3 files changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/13/12613/3 -- To view, visit https://gerrit.osmocom.org/12613 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I74a23c73b03bad822272b9cfe76c2501666912b7 Gerrit-Change-Number: 12613 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 15:11:51 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 15:11:51 +0000 Subject: Change in osmocom-bb[master]: trxcon/l1ctl.c: init DL info header in l1ctl_tx_rach_conf() Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13948 Change subject: trxcon/l1ctl.c: init DL info header in l1ctl_tx_rach_conf() ...................................................................... trxcon/l1ctl.c: init DL info header in l1ctl_tx_rach_conf() Since we only set both ARFCN and TDMA frame number of the DL info header, other fields remain uninitialized. Let's memset() them. Change-Id: Ib39c333f1724fefa5d8bd8a2315b77a5612f7fa9 --- M src/host/trxcon/l1ctl.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/48/13948/1 diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c index 9cd5fe6..e6f8f82 100644 --- a/src/host/trxcon/l1ctl.c +++ b/src/host/trxcon/l1ctl.c @@ -244,6 +244,8 @@ return -ENOMEM; dl = put_dl_info_hdr(msg, NULL); + memset(dl, 0x00, sizeof(*dl)); + dl->band_arfcn = htons(band_arfcn); dl->frame_nr = htonl(fn); -- To view, visit https://gerrit.osmocom.org/13948 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ib39c333f1724fefa5d8bd8a2315b77a5612f7fa9 Gerrit-Change-Number: 13948 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 15:14:23 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Thu, 9 May 2019 15:14:23 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Revert partial of 0ac6315212a3 ("msc: add inter-BSC and inter-MSC Han... In-Reply-To: References: Message-ID: lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/13947 ) Change subject: Revert partial of 0ac6315212a3 ("msc: add inter-BSC and inter-MSC Handover tests") ...................................................................... Patch Set 1: > the problem here is that it might fix 'latest' USSD tests, but it > will break tests on 'master' @neels let's fix all the old tests, before looking what's wrong in the new tests. -- To view, visit https://gerrit.osmocom.org/13947 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iadbc37105fa67cf6383fb63b86ed653ccc7bddf7 Gerrit-Change-Number: 13947 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Thu, 09 May 2019 15:14:23 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 15:14:35 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 15:14:35 +0000 Subject: Change in osmocom-bb[master]: trxcon/l1ctl.c: pass band_arfcn to l1ctl_tx_rach_conf() In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/12613 ) Change subject: trxcon/l1ctl.c: pass band_arfcn to l1ctl_tx_rach_conf() ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/12613 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I74a23c73b03bad822272b9cfe76c2501666912b7 Gerrit-Change-Number: 12613 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 09 May 2019 15:14:35 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 15:16:37 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 15:16:37 +0000 Subject: Change in osmocom-bb[master]: trxcon/l1ctl.c: init DL info header in l1ctl_tx_rach_conf() In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13948 ) Change subject: trxcon/l1ctl.c: init DL info header in l1ctl_tx_rach_conf() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13948 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib39c333f1724fefa5d8bd8a2315b77a5612f7fa9 Gerrit-Change-Number: 13948 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 09 May 2019 15:16:37 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 15:16:52 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 15:16:52 +0000 Subject: Change in osmocom-bb[master]: trxcon/l1ctl.c: pass band_arfcn to l1ctl_tx_rach_conf() In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/12613 ) Change subject: trxcon/l1ctl.c: pass band_arfcn to l1ctl_tx_rach_conf() ...................................................................... trxcon/l1ctl.c: pass band_arfcn to l1ctl_tx_rach_conf() This would allow to abstract both L1CTL and TRX interfaces from each other in the upcoming refactoring. Change-Id: I74a23c73b03bad822272b9cfe76c2501666912b7 --- M src/host/trxcon/l1ctl.c M src/host/trxcon/l1ctl.h M src/host/trxcon/sched_lchan_rach.c 3 files changed, 6 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, approved diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c index 653ddf3..9cd5fe6 100644 --- a/src/host/trxcon/l1ctl.c +++ b/src/host/trxcon/l1ctl.c @@ -233,7 +233,8 @@ return l1ctl_link_send(l1l, msg); } -int l1ctl_tx_rach_conf(struct l1ctl_link *l1l, uint32_t fn) +int l1ctl_tx_rach_conf(struct l1ctl_link *l1l, + uint16_t band_arfcn, uint32_t fn) { struct l1ctl_info_dl *dl; struct msgb *msg; @@ -243,8 +244,7 @@ return -ENOMEM; dl = put_dl_info_hdr(msg, NULL); - - dl->band_arfcn = htons(l1l->trx->band_arfcn); + dl->band_arfcn = htons(band_arfcn); dl->frame_nr = htonl(fn); return l1ctl_link_send(l1l, msg); diff --git a/src/host/trxcon/l1ctl.h b/src/host/trxcon/l1ctl.h index ca8c0be..48bbe09 100644 --- a/src/host/trxcon/l1ctl.h +++ b/src/host/trxcon/l1ctl.h @@ -22,4 +22,5 @@ uint8_t *l2, size_t l2_len, bool traffic); int l1ctl_tx_dt_conf(struct l1ctl_link *l1l, struct l1ctl_info_dl *data, bool traffic); -int l1ctl_tx_rach_conf(struct l1ctl_link *l1l, uint32_t fn); +int l1ctl_tx_rach_conf(struct l1ctl_link *l1l, + uint16_t band_arfcn, uint32_t fn); diff --git a/src/host/trxcon/sched_lchan_rach.c b/src/host/trxcon/sched_lchan_rach.c index 58e86ae..565d693 100644 --- a/src/host/trxcon/sched_lchan_rach.c +++ b/src/host/trxcon/sched_lchan_rach.c @@ -175,7 +175,7 @@ } /* Confirm RACH request */ - l1ctl_tx_rach_conf(trx->l1l, fn); + l1ctl_tx_rach_conf(trx->l1l, trx->band_arfcn, fn); /* Forget processed primitive */ sched_prim_drop(lchan); -- To view, visit https://gerrit.osmocom.org/12613 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I74a23c73b03bad822272b9cfe76c2501666912b7 Gerrit-Change-Number: 12613 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 15:16:52 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 15:16:52 +0000 Subject: Change in osmocom-bb[master]: trxcon/l1ctl.c: init DL info header in l1ctl_tx_rach_conf() In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/13948 ) Change subject: trxcon/l1ctl.c: init DL info header in l1ctl_tx_rach_conf() ...................................................................... trxcon/l1ctl.c: init DL info header in l1ctl_tx_rach_conf() Since we only set both ARFCN and TDMA frame number of the DL info header, other fields remain uninitialized. Let's memset() them. Change-Id: Ib39c333f1724fefa5d8bd8a2315b77a5612f7fa9 --- M src/host/trxcon/l1ctl.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, approved diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c index 9cd5fe6..e6f8f82 100644 --- a/src/host/trxcon/l1ctl.c +++ b/src/host/trxcon/l1ctl.c @@ -244,6 +244,8 @@ return -ENOMEM; dl = put_dl_info_hdr(msg, NULL); + memset(dl, 0x00, sizeof(*dl)); + dl->band_arfcn = htons(band_arfcn); dl->frame_nr = htonl(fn); -- To view, visit https://gerrit.osmocom.org/13948 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ib39c333f1724fefa5d8bd8a2315b77a5612f7fa9 Gerrit-Change-Number: 13948 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 15:32:27 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 15:32:27 +0000 Subject: Change in osmo-bts[master]: osmo-bts-trx: distinguish 11-bit Access Bursts by synch. sequence In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13723 ) Change subject: osmo-bts-trx: distinguish 11-bit Access Bursts by synch. sequence ...................................................................... Patch Set 4: Verified+1 Code-Review+2 I really appreciate all the comments, and will consider yet not addressed ones as the points of further improvements, but now I really need to move this fix forward. It's really annoying to see 11-bit Access Bursts decoded as 8-bit ones, and vice versa. Adding my CR+2 & V+1 for now, going to merge in a few hours (unless anybody has any strong objections). -- To view, visit https://gerrit.osmocom.org/13723 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibb6d27c6589965c8b59a6d2598a7c43fd860f284 Gerrit-Change-Number: 13723 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Alexander Chemeris Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Max Gerrit-Comment-Date: Thu, 09 May 2019 15:32:27 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 15:33:33 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 15:33:33 +0000 Subject: Change in osmo-bts[master]: README.md: remove OS#1865 from 'Known limitations' In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13741 ) Change subject: README.md: remove OS#1865 from 'Known limitations' ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13741 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibc9db360be1380abaa9eef4bdf6e9a6d251670da Gerrit-Change-Number: 13741 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Alexander Chemeris Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 09 May 2019 15:33:33 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 15:35:06 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Thu, 9 May 2019 15:35:06 +0000 Subject: Change in osmo-sgsn[master]: libgtp: don't call sgsn_pdp_ctx_free() w/o MM ctx In-Reply-To: References: Message-ID: lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/13929 ) Change subject: libgtp: don't call sgsn_pdp_ctx_free() w/o MM ctx ...................................................................... Patch Set 2: Code-Review-1 I think the problem lies somewhere else. IMHO: Calling free() w/o MM ctx is fine. -- To view, visit https://gerrit.osmocom.org/13929 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I184dcce27b26104c61d80b2d910388d5d3323def Gerrit-Change-Number: 13929 Gerrit-PatchSet: 2 Gerrit-Owner: Keith Whyte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Keith Whyte Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Thu, 09 May 2019 15:35:06 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 15:36:09 2019 From: gerrit-no-reply at lists.osmocom.org (=?UTF-8?Q?K=C3=A9vin_Redon?=) Date: Thu, 9 May 2019 15:36:09 +0000 Subject: Change in osmo-ccid-firmware[master]: add function to transfer TPDU Message-ID: K?vin Redon has uploaded this change for review. ( https://gerrit.osmocom.org/13949 Change subject: add function to transfer TPDU ...................................................................... add function to transfer TPDU this function takes care of reading and writing the complete TPDU to the card. note: the sim-iccid command uses this function, but still only to select MF. Change-Id: I50c90f3697580a4c93220a3e09cc33ec85889814 --- M sysmoOCTSIM/main.c 1 file changed, 184 insertions(+), 83 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/49/13949/1 diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 11849c7..327ac6d 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -226,7 +226,183 @@ // set baud rate uint32_t baudrate = (freq * d) / f; // calculate actual baud rate - return slot_set_baudrate(slotnr, baudrate); // // set baud rate + return slot_set_baudrate(slotnr, baudrate); // set baud rate +} + +/** write data to card + * @param[in] slotnr slot number on which to send data + * @param[in] data data to be transmitted + * @param[in] length length of data to be transmitted + * @return error code + */ +static int slot_card_write(uint8_t slotnr, const uint8_t* data, uint16_t length) +{ + // input checks + ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); + if (0 == length || NULL == data) { + return ERR_INVALID_ARG; + } + + struct usart_async_descriptor* sim = SIM_peripheral_descriptors[slotnr]; + ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 0; // disable receive (to avoid the echo back) + SIM_tx_count[slotnr] = false; // reset TX complete + for (uint16_t i = 0; i < length; i++) { // transmit data + while(!usart_async_is_tx_empty(sim)); // wait for previous byte to be transmitted (WARNING blocking) + if (1 != io_write(&sim->io, &data[i], 1)) { // put but in transmit buffer + return ERR_IO; + } + } + while (!SIM_tx_count[slotnr]); // wait until transmission is complete (WARNING blocking) + ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 1; // enable receive again + + return ERR_NONE; +} + +/** read data from card + * @param[in] slotnr slot number on which to send data + * @param[out] data buffer for read data to be stored + * @param[in] length length of data to be read + * @param[in] wt Waiting Time in ETU + * @return error code + * TODO fix WT/ETU duration + */ +static int slot_card_read(uint8_t slotnr, uint8_t* data, uint16_t length, uint32_t wt) +{ + // input checks + ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); + if (0 == length || NULL == data) { + return ERR_INVALID_ARG; + } + + struct usart_async_descriptor* sim = SIM_peripheral_descriptors[slotnr]; + + ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 1; // ensure RX is enabled + uint32_t timeout = wt; // reset waiting time + for (uint16_t i = 0; i < length; i++) { // read all data + while (timeout && !usart_async_is_rx_not_empty(sim)) { // verify if data is present + delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) + timeout--; + } + if (0 == timeout) { // timeout reached + return ERR_TIMEOUT; + } + timeout = wt; // reset waiting time + if (1 != io_read(&sim->io, &data[i], 1)) { // read one byte + return ERR_IO; + } + } + + return ERR_NONE; +} + +/** transfer TPDU + * @param[in] slotnr slot number on which to transfer the TPDU + * @param[in] header TPDU header to send + * @param[io] data TPDU data to transfer + * @param[in] data_length length of TPDU data to transfer + * @param[in] write if the data should be written (true) or read (false) + * TODO fix WT + * TODO the data length can be deduce from the header + */ +static int slot_tpdu_xfer(uint8_t slotnr, const uint8_t* header, uint8_t* data, uint16_t data_length, bool write) +{ + // input checks + ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); + if (NULL == header || (data_length > 0 && NULL == data)) { + return ERR_INVALID_ARG; + } + + int rc; + struct usart_async_descriptor* sim = SIM_peripheral_descriptors[slotnr]; // get USART peripheral + usart_async_flush_rx_buffer(sim); // flush RX buffer to start from scratch + + // send command header + printf("(%d) TPDU: ", slotnr); + for (uint8_t i = 0; i < 5; i++) { + printf("%02x ", header[i]); + } + rc = slot_card_write(slotnr, header, 5); // transmit header + if (ERR_NONE != rc) { + printf("error in command header transmit (errno = %d)\r\n", rc); + return rc; + } + + // read procedure byte, and handle data + uint8_t pb = 0x60; // wait more procedure byte + uint16_t data_i = 0; // progress in the data transfer + while (0x60 == pb) { // wait for SW + rc = slot_card_read(slotnr, &pb, 1, ISO7816_3_DEFAULT_WT); + if (ERR_NONE != rc) { + printf("error while receiving PB/SW1 (errno = %d)\r\n", rc); + return rc; + } + printf("%02x ", pb); + if (0x60 == pb) { // NULL byte + // just wait more time + } else if ((0x60 == (pb & 0xf0)) || (0x90 == (pb & 0xf0))) { // SW1 byte + // left the rest of the code handle it + } else if (header[1] == pb) { // ACK byte + // transfer rest of the data + if (data_i >= data_length) { + printf("error no more data to transfer\r\n"); + return ERR_INVALID_DATA; + } + if (write) { // transmit remaining command data + rc = slot_card_write(slotnr, &data[data_i], data_length - data_i); // transmit command data + if (ERR_NONE != rc) { + printf("error in command data transmit (errno = %d)\r\n", rc); + return rc; + } + } else { // receive remaining command data + rc = slot_card_read(slotnr, &data[data_i], data_length - data_i, ISO7816_3_DEFAULT_WT); + if (ERR_NONE != rc) { + printf("error in command data receive (errno = %d)\r\n", rc); + return rc; + } + } + for (uint16_t i = data_i; i < data_length; i++) { + printf("%02x ", data[i]); + } + data_i = data_length; // remember we transferred the data + pb = 0x60; // wait for SW1 + } else if (header[1] == (pb ^ 0xff)) { // ACK byte + // transfer only one byte + if (data_i >= data_length) { + printf("error no more data to transfer\r\n"); + return ERR_INVALID_DATA; + } + if (write) { // transmit command data byte + rc = slot_card_write(slotnr, &data[data_i], 1); // transmit command data + if (ERR_NONE != rc) { + printf("error in command data transmit (errno = %d)\r\n", rc); + return rc; + } + } else { // receive command data byte + rc = slot_card_read(slotnr, &data[data_i], 1, ISO7816_3_DEFAULT_WT); + if (ERR_NONE != rc) { + printf("error in command data receive (errno = %d)\r\n", rc); + return rc; + } + } + printf("%02x ", data[data_i]); + data_i += 1; // remember we transferred one data byte + pb = 0x60; // wait for SW1 + } else { // invalid byte + return ERR_INVALID_DATA; + } + } + + // read SW2 + uint8_t sw2; + rc = slot_card_read(slotnr, &sw2, 1, ISO7816_3_DEFAULT_WT); + if (ERR_NONE != rc) { + printf("error in receiving SW2 (errno = %d)\r\n", rc); + return rc; + } + printf("%02x", sw2); + + printf("\r\n"); + return ERR_NONE; } DEFUN(sim_status, cmd_sim_status, "sim-status", "Get state of specified NCN8025") @@ -480,90 +656,15 @@ ncn8025_set(slotnr, &settings); } - // read MF - printf("(%d) SELECT MF: ", slotnr); - struct usart_async_descriptor* sim = SIM_peripheral_descriptors[slotnr]; - ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 0; - usart_async_flush_rx_buffer(sim); // flush RX buffer to start from scratch + // select MF + printf("(%d) SELECT MF\r\n", slotnr); // write SELECT MF APDU - const uint8_t select_mf[] = {0xa0, 0xa4, 0x00, 0x00, 0x02, 0x3f, 0x00}; - SIM_tx_count[slotnr] = false; // reset TX complete - for (uint8_t i = 0; i < 5; i++) { // transmit command header - printf("%02x ", select_mf[i]); - while(!usart_async_is_tx_empty(sim)); // wait for previous byte to be transmitted (WARNING could block) - if (1 != io_write(&sim->io, &select_mf[i], 1)) { - printf("(%d) error: could not send command header\r\n", slotnr); - return; - } + const uint8_t select_mf_header[] = {0xa0, 0xa4, 0x00, 0x00, 0x02}; + const uint8_t select_mf_data[] = {0x3f, 0x00}; + int rc = slot_tpdu_xfer(slotnr, select_mf_header, (uint8_t*)select_mf_data, ARRAY_SIZE(select_mf_data), true); // transfer TPDU + if (ERR_NONE != rc) { + printf("error while SELECT MF (errno = %d)\r\n", rc); } - uint16_t wt = ISO7816_3_DEFAULT_WT; // waiting time in ETU (actually it can be a lot more after the ATR, but we use the default) - while (wt && !SIM_tx_count[slotnr]) { // wait until transmission is complete - delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) - wt--; - } - if (0 == wt) { // timeout reached - printf("(%d) error: could not transmit data\r\n", slotnr); - return; - } - ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 1; - //usart_async_flush_rx_buffer(sim); // flush RX buffer to start from scratch - wt = ISO7816_3_DEFAULT_WT; // reset waiting time - while (wt && !usart_async_is_rx_not_empty(sim)) { // wait for procedure byte - delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) - wt--; - } - if (0 == wt) { // timeout reached - printf("(%d) error: card not responsive\r\n", slotnr); - return; - } - uint8_t pb; - if (1 != io_read(&sim->io, &pb, 1)) { // read procedure byte - printf("(%d) error: could not read data\r\n", slotnr); - return; - } - if (select_mf[1] != pb) { // the header is ACKed when the procedure by is equal to the instruction byte - printf("(%d) error: header NACKed\r\n", slotnr); - return; - } - SIM_tx_count[slotnr] = false; // reset TX complete - for (uint8_t i = 5; i < 7; i++) { // transmit command data - printf("%02x ", select_mf[i]); - while(!usart_async_is_tx_empty(sim)); // wait for previous byte to be transmitted (WARNING could block) - if (1 != io_write(&sim->io, &select_mf[i], 1)) { - printf("(%d) error: could not send command data\r\n", slotnr); - return; - } - } - wt = ISO7816_3_DEFAULT_WT; // waiting time in ETU (actually it can be a lot more after the ATR, but we use the default) - while (wt && !SIM_tx_count[slotnr]) { // wait until transmission is complete - delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) - wt--; - } - if (0 == wt) { // timeout reached - printf("(%d) error: could not transmit data\r\n", slotnr); - return; - } - usart_async_flush_rx_buffer(sim); // flush RX buffer to start from scratch - // read SW - uint8_t sw[2]; // to read the status words - wt = ISO7816_3_DEFAULT_WT; // waiting time in ETU (actually it can be a lot more after the ATR, but we use the default) - for (uint8_t i = 0; i < ARRAY_SIZE(sw); i++) { - while (wt && !usart_async_is_rx_not_empty(sim)) { - delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) - wt--; - } - if (0 == wt) { // timeout reached - printf("(%d) error: card not responsive\r\n", slotnr); - } else { - if (1 != io_read(&sim->io, &sw[i], 1)) { // read SW - printf("(%d) error: could not read data\r\n", slotnr); - return; - } - printf("%02x ", sw[i]); - wt = ISO7816_3_DEFAULT_WT; // reset WT - } - } - printf("\r\n"); // disable LED settings.led = false; -- To view, visit https://gerrit.osmocom.org/13949 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I50c90f3697580a4c93220a3e09cc33ec85889814 Gerrit-Change-Number: 13949 Gerrit-PatchSet: 1 Gerrit-Owner: K?vin Redon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 16:03:02 2019 From: gerrit-no-reply at lists.osmocom.org (=?UTF-8?Q?K=C3=A9vin_Redon?=) Date: Thu, 9 May 2019 16:03:02 +0000 Subject: Change in osmo-ccid-firmware[master]: finish implementing sim-iccid Message-ID: K?vin Redon has uploaded this change for review. ( https://gerrit.osmocom.org/13950 Change subject: finish implementing sim-iccid ...................................................................... finish implementing sim-iccid Change-Id: I71b5832703a60c0c967fa2c6bc0eec56883962c5 --- M sysmoOCTSIM/main.c 1 file changed, 38 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/50/13950/1 diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 327ac6d..6ab8bc8 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -658,13 +658,47 @@ // select MF printf("(%d) SELECT MF\r\n", slotnr); - // write SELECT MF APDU - const uint8_t select_mf_header[] = {0xa0, 0xa4, 0x00, 0x00, 0x02}; - const uint8_t select_mf_data[] = {0x3f, 0x00}; - int rc = slot_tpdu_xfer(slotnr, select_mf_header, (uint8_t*)select_mf_data, ARRAY_SIZE(select_mf_data), true); // transfer TPDU + const uint8_t select_header[] = {0xa0, 0xa4, 0x00, 0x00, 0x02}; // see TS 102.221 sec. 11.1.1 + const uint8_t select_data_mf[] = {0x3f, 0x00}; // see TS 102.221 sec. 13.1 + int rc = slot_tpdu_xfer(slotnr, select_header, (uint8_t*)select_data_mf, ARRAY_SIZE(select_data_mf), true); // transfer TPDU if (ERR_NONE != rc) { printf("error while SELECT MF (errno = %d)\r\n", rc); } + // ignore response data + + // select EF_ICCID + printf("(%d) SELECT EF_ICCID\r\n", slotnr); + const uint8_t select_data_ef_iccid[] = {0x2f, 0xe2}; // see TS 102.221 sec. 13.2 + rc = slot_tpdu_xfer(slotnr, select_header, (uint8_t*)select_data_ef_iccid, ARRAY_SIZE(select_data_ef_iccid), true); // transfer TPDU + if (ERR_NONE != rc) { + printf("error while SELECT EF_ICCID (errno = %d)\r\n", rc); + } + // ignore response data + + // read EF_ICCID + printf("(%d) READ EF_ICCID\r\n", slotnr); + uint8_t iccid[10]; + uint8_t read_binary[] = {0xa0, 0xb0, 0x00, 0x00, ARRAY_SIZE(iccid)}; // see TS 102.221 sec. 11.1.3 + rc = slot_tpdu_xfer(slotnr, read_binary, iccid, ARRAY_SIZE(iccid), false); // transfer TPDU + if (ERR_NONE != rc) { + printf("error while READ ICCID (errno = %d)\r\n", rc); + } + // ignore response data + + printf("(%d) ICCID: ", slotnr); + for (uint8_t i = 0; i < ARRAY_SIZE(iccid); i++) { + uint8_t nibble = iccid[i] & 0xf; + if (0xf == nibble) { + break; + } + printf("%x", nibble); + nibble = iccid[i] >> 4; + if (0xf == nibble) { + break; + } + printf("%x", nibble); + } + printf("\r\n"); // disable LED settings.led = false; -- To view, visit https://gerrit.osmocom.org/13950 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I71b5832703a60c0c967fa2c6bc0eec56883962c5 Gerrit-Change-Number: 13950 Gerrit-PatchSet: 1 Gerrit-Owner: K?vin Redon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 16:22:14 2019 From: gerrit-no-reply at lists.osmocom.org (Alexander Chemeris) Date: Thu, 9 May 2019 16:22:14 +0000 Subject: Change in osmo-bts[master]: osmo-bts-trx: distinguish 11-bit Access Bursts by synch. sequence In-Reply-To: References: Message-ID: Alexander Chemeris has posted comments on this change. ( https://gerrit.osmocom.org/13723 ) Change subject: osmo-bts-trx: distinguish 11-bit Access Bursts by synch. sequence ...................................................................... Patch Set 4: > I really appreciate all the comments, and will consider yet not > addressed ones as the points of further improvements, but now I > really need to move this fix forward. It's really annoying to see > 11-bit Access Bursts decoded as 8-bit ones, and vice versa. Adding > my CR+2 & V+1 for now, going to merge in a few hours (unless > anybody has any strong objections). I would appreciate if you remove comparison from the weight calculation code as we discussed. You'd be surprised how many RACHs can a BTS get in a congested situation. -- To view, visit https://gerrit.osmocom.org/13723 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibb6d27c6589965c8b59a6d2598a7c43fd860f284 Gerrit-Change-Number: 13723 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Alexander Chemeris Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Max Gerrit-Comment-Date: Thu, 09 May 2019 16:22:14 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 16:22:20 2019 From: gerrit-no-reply at lists.osmocom.org (Alexander Chemeris) Date: Thu, 9 May 2019 16:22:20 +0000 Subject: Change in osmo-bts[master]: osmo-bts-trx: distinguish 11-bit Access Bursts by synch. sequence In-Reply-To: References: Message-ID: Alexander Chemeris has submitted this change and it was merged. ( https://gerrit.osmocom.org/13723 ) Change subject: osmo-bts-trx: distinguish 11-bit Access Bursts by synch. sequence ...................................................................... osmo-bts-trx: distinguish 11-bit Access Bursts by synch. sequence Thanks to both TC_rach_content and TC_rach_count TTCN-3 test cases, it was discovered that there are possible collisions when trying to decode a regular 8-bit Access Burst as an 11-bit one. This is exactly what we are doing in rx_rach_fn(): - calling gsm0503_rach_ext_decode_ber() first, - if it failed, falling-back to gsm0503_rach_decode_ber(). With default BSIC=63, the following 8-bit RA values are being misinterpreted as 11-bit Access Bursts: Successfully decoded 8-bit (0x00) RACH as 11-bit (0x0000): bsic=0x3f Successfully decoded 8-bit (0xbe) RACH as 11-bit (0x0388): bsic=0x3f Successfully decoded 8-bit (0xcf) RACH as 11-bit (0x0036): bsic=0x3f According to 3GPP TS 05.02, section 5.2.7, there are two alternative synch. (training) sequences for Access Bursts: TS1 & TS2. By default, TS0 synch. sequence is used, unless explicitly stated otherwise (see 3GPP TS 04.60). According to 3GPP TS 04.60, section 11.2.5a, the EGPRS capability can be indicated by the MS using one of the alternative training sequences (i.e. TS1 or TS2) and the 11-bit RACH coding scheme. In other words, knowing the synch. sequence of a received Access Burst would allow to decide whether it's extended (11-bit) or a regular (8-bit) one. As a result, we would avoid possible collisions and save some CPU power. Unfortunately, due to the limitations of the current TRXD protocol, there is no easy way to expose such information from the transceiver. A proper solution would be to extend the TRX protocol, but for now, let's do the synch. sequence detection in rx_rach_fn(). As soon as the TRX protocol is extended with info about the synch. sequence, this code would serve for the backwards-compatibility. This change makes the both TC_rach_content and TC_rach_count happy, as well as the new TC_pcu_ext_rach_content() test case aimed to verify extended (11-bit) Access Burst decoding. Related (TTCN-3) I8fe156aeac9de3dc1e71a4950821d4942ba9a253 Change-Id: Ibb6d27c6589965c8b59a6d2598a7c43fd860f284 Related: OS#1854 --- M src/osmo-bts-trx/scheduler_trx.c 1 file changed, 123 insertions(+), 42 deletions(-) Approvals: Vadim Yanitskiy: Looks good to me, approved; Verified Jenkins Builder: Verified diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index 32bdb98..ade3cff 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -22,6 +22,7 @@ */ #include #include +#include #include #include #include @@ -709,72 +710,152 @@ * RX on uplink (indication to upper layer) */ +/* 3GPP TS 05.02, section 5.2.7 */ +#define RACH_EXT_TAIL_LEN 8 +#define RACH_SYNCH_SEQ_LEN 41 + +enum rach_synch_seq_t { + RACH_SYNCH_SEQ_UNKNOWN = -1, + RACH_SYNCH_SEQ_TS0, /* GSM, GMSK (default) */ + RACH_SYNCH_SEQ_TS1, /* EGPRS, 8-PSK */ + RACH_SYNCH_SEQ_TS2, /* EGPRS, GMSK */ + RACH_SYNCH_SEQ_NUM +}; + +static struct value_string rach_synch_seq_names[] = { + { RACH_SYNCH_SEQ_UNKNOWN, "UNKNOWN" }, + { RACH_SYNCH_SEQ_TS0, "TS0: GSM, GMSK" }, + { RACH_SYNCH_SEQ_TS1, "TS1: EGPRS, 8-PSK" }, + { RACH_SYNCH_SEQ_TS2, "TS2: EGPRS, GMSK" }, + { 0, NULL }, +}; + +static enum rach_synch_seq_t rach_get_synch_seq(sbit_t *bits, int *best_score) +{ + sbit_t *synch_seq_burst = bits + RACH_EXT_TAIL_LEN; + enum rach_synch_seq_t seq = RACH_SYNCH_SEQ_TS0; + int score[RACH_SYNCH_SEQ_NUM] = { 0 }; + int max_score = INT_MIN; + int i, j; + + /* 3GPP TS 05.02, section 5.2.7 "Access burst (AB)", synch. sequence bits */ + static const char synch_seq_ref[RACH_SYNCH_SEQ_NUM][RACH_SYNCH_SEQ_LEN] = { + [RACH_SYNCH_SEQ_TS0] = "01001011011111111001100110101010001111000", + [RACH_SYNCH_SEQ_TS1] = "01010100111110001000011000101111001001101", + [RACH_SYNCH_SEQ_TS2] = "11101111001001110101011000001101101110111", + }; + + /* Get a multiplier for j-th bit of i-th synch. sequence */ +#define RACH_SYNCH_SEQ_MULT \ + (synch_seq_ref[i][j] == '1' ? -1 : 1) + + /* For each synch. sequence, count the bit match score. Since we deal with + * soft-bits (-127...127), we sum the absolute values of matching ones, + * and subtract the absolute values of different ones, so the resulting + * score is more accurate than it could be with hard-bits. */ + for (i = 0; i < RACH_SYNCH_SEQ_NUM; i++) { + for (j = 0; j < RACH_SYNCH_SEQ_LEN; j++) + score[i] += RACH_SYNCH_SEQ_MULT * synch_seq_burst[j]; + + /* Keep the maximum value updated */ + if (score[i] > max_score) { + max_score = score[i]; + seq = i; + } + } + + /* Calculate an approximate level of our confidence */ + if (best_score != NULL) + *best_score = max_score; + + /* At least 1/3 of a synch. sequence shall match */ + if (max_score < (127 * RACH_SYNCH_SEQ_LEN / 3)) + return RACH_SYNCH_SEQ_UNKNOWN; + + return seq; +} + int rx_rach_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn, enum trx_chan_type chan, uint8_t bid, sbit_t *bits, uint16_t nbits, int8_t rssi, int16_t toa256) { - uint8_t chan_nr; struct osmo_phsap_prim l1sap; int n_errors, n_bits_total; - bool is_11bit = true; uint16_t ra11; uint8_t ra; - int rc = 1; + int rc; - chan_nr = trx_chan_desc[chan].chan_nr | tn; + /* It would be great if the transceiver were doing some kind of tagging, + * whether it is extended (11-bit) RACH or not. We would not need to guess + * it here. For now, let's try to correlate the synch. sequence of a received + * Access Burst with the known ones (3GPP TS 05.02, section 5.2.7), and + * fall-back to the default TS0 if it fails. This would save some CPU + * power, and what is more important - prevent possible collisions. */ + enum rach_synch_seq_t synch_seq = RACH_SYNCH_SEQ_TS0; + int best_score = 127 * RACH_SYNCH_SEQ_LEN; - LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Received RACH toa=%d\n", toa256); + /* Handover RACH cannot be extended (11-bit) */ + if (chan == TRXC_RACH) + synch_seq = rach_get_synch_seq(bits, &best_score); - if (chan == TRXC_RACH) /* Attempt to decode as extended (11-bit) RACH first */ - rc = gsm0503_rach_ext_decode_ber(&ra11, bits + 8 + 41, + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, + "Received RACH (%s; match=%.1f%%) toa=%d\n", + get_value_string(rach_synch_seq_names, synch_seq), + best_score * 100.0 / (127 * RACH_SYNCH_SEQ_LEN), + toa256); + + /* Compose a new L1SAP primitive */ + memset(&l1sap, 0x00, sizeof(l1sap)); + osmo_prim_init(&l1sap.oph, SAP_GSM_PH, PRIM_PH_RACH, PRIM_OP_INDICATION, NULL); + l1sap.u.rach_ind.chan_nr = trx_chan_desc[chan].chan_nr | tn; + l1sap.u.rach_ind.acc_delay = (toa256 >= 0) ? toa256 / 256 : 0; + l1sap.u.rach_ind.acc_delay_256bits = toa256; + l1sap.u.rach_ind.rssi = rssi; + l1sap.u.rach_ind.fn = fn; + + /* Decode RACH depending on its synch. sequence */ + switch (synch_seq) { + case RACH_SYNCH_SEQ_TS1: + case RACH_SYNCH_SEQ_TS2: + rc = gsm0503_rach_ext_decode_ber(&ra11, bits + RACH_EXT_TAIL_LEN + RACH_SYNCH_SEQ_LEN, l1t->trx->bts->bsic, &n_errors, &n_bits_total); - if (rc) { - /* Indicate non-extended RACH */ - is_11bit = false; - - /* Fall-back to the normal RACH decoding */ - rc = gsm0503_rach_decode_ber(&ra, bits + 8 + 41, - l1t->trx->bts->bsic, &n_errors, &n_bits_total); if (rc) { - LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Received bad AB frame\n"); + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Received bad Access Burst\n"); return 0; } - } - /* compose primitive */ - /* generate prim */ - memset(&l1sap, 0, sizeof(l1sap)); - osmo_prim_init(&l1sap.oph, SAP_GSM_PH, PRIM_PH_RACH, PRIM_OP_INDICATION, - NULL); - l1sap.u.rach_ind.chan_nr = chan_nr; - l1sap.u.rach_ind.acc_delay = (toa256 >= 0) ? toa256/256 : 0; - l1sap.u.rach_ind.fn = fn; - l1sap.u.rach_ind.rssi = rssi; - l1sap.u.rach_ind.ber10k = compute_ber10k(n_bits_total, n_errors); - l1sap.u.rach_ind.acc_delay_256bits = toa256; + if (synch_seq == RACH_SYNCH_SEQ_TS1) + l1sap.u.rach_ind.burst_type = GSM_L1_BURST_TYPE_ACCESS_1; + else + l1sap.u.rach_ind.burst_type = GSM_L1_BURST_TYPE_ACCESS_2; - if (is_11bit) { l1sap.u.rach_ind.is_11bit = 1; l1sap.u.rach_ind.ra = ra11; - l1sap.u.rach_ind.burst_type = BSIC2BCC(l1t->trx->bts->bsic); - switch (l1sap.u.rach_ind.burst_type) { - case GSM_L1_BURST_TYPE_ACCESS_0: - case GSM_L1_BURST_TYPE_ACCESS_1: - case GSM_L1_BURST_TYPE_ACCESS_2: - break; - default: - LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, - "Received RACH frame with unexpected TSC %u, " - "forcing default %u\n", l1sap.u.rach_ind.burst_type, - GSM_L1_BURST_TYPE_ACCESS_0); - l1sap.u.rach_ind.burst_type = GSM_L1_BURST_TYPE_ACCESS_0; + break; + + case RACH_SYNCH_SEQ_TS0: + default: + /* Fall-back to the default TS0 if needed */ + if (synch_seq != RACH_SYNCH_SEQ_TS0) { + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Falling-back to the default TS0\n"); + synch_seq = RACH_SYNCH_SEQ_TS0; } - } else { + + rc = gsm0503_rach_decode_ber(&ra, bits + RACH_EXT_TAIL_LEN + RACH_SYNCH_SEQ_LEN, + l1t->trx->bts->bsic, &n_errors, &n_bits_total); + if (rc) { + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Received bad Access Burst\n"); + return 0; + } + + l1sap.u.rach_ind.burst_type = GSM_L1_BURST_TYPE_ACCESS_0; l1sap.u.rach_ind.is_11bit = 0; l1sap.u.rach_ind.ra = ra; - l1sap.u.rach_ind.burst_type = GSM_L1_BURST_TYPE_ACCESS_0; + break; } + l1sap.u.rach_ind.ber10k = compute_ber10k(n_bits_total, n_errors); + /* forward primitive */ l1sap_up(l1t->trx, &l1sap); -- To view, visit https://gerrit.osmocom.org/13723 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ibb6d27c6589965c8b59a6d2598a7c43fd860f284 Gerrit-Change-Number: 13723 Gerrit-PatchSet: 5 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Alexander Chemeris Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Max -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 16:32:54 2019 From: gerrit-no-reply at lists.osmocom.org (=?UTF-8?Q?K=C3=A9vin_Redon?=) Date: Thu, 9 May 2019 16:32:54 +0000 Subject: Change in libosmocore[master]: fix typo in FSM description Message-ID: K?vin Redon has uploaded this change for review. ( https://gerrit.osmocom.org/13951 Change subject: fix typo in FSM description ...................................................................... fix typo in FSM description Change-Id: I3559e9c0769b708cee0d1b221b60960c62f15bd4 --- M src/fsm.c 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/51/13951/1 diff --git a/src/fsm.c b/src/fsm.c index c32767b..882a2b4 100644 --- a/src/fsm.c +++ b/src/fsm.c @@ -47,15 +47,15 @@ * The general idea is that all actions performed within one state are * located at one position in the code (the state's action function), * as opposed to the 'message-centric' view of e.g. the existing - * state machines of the LAPD(m) coe, where there is one message for - * eahc possible event (primitive), and the function then needs to + * state machines of the LAPD(m) core, where there is one message for + * each possible event (primitive), and the function then needs to * concern itself on how to handle that event over all possible states. * * For each state, there is a bit-mask of permitted input events for * this state, as well as a bit-mask of permitted new output states to * which the state can change. Furthermore, there is a function * pointer implementing the actual handling of the input events - * occurring whilst in thta state. + * occurring whilst in that state. * * Furthermore, each state offers a function pointer that can be * executed just before leaving a state, and another one just after @@ -84,7 +84,7 @@ * NOTICE level is used for all other subscribers. * * In order to attach private state to the \ref osmo_fsm_inst, it - * offers an opaque priv pointer. + * offers an opaque private pointer. * * \file fsm.c */ -- To view, visit https://gerrit.osmocom.org/13951 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I3559e9c0769b708cee0d1b221b60960c62f15bd4 Gerrit-Change-Number: 13951 Gerrit-PatchSet: 1 Gerrit-Owner: K?vin Redon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 16:47:49 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 16:47:49 +0000 Subject: Change in osmo-bts[master]: osmo-bts-trx: distinguish 11-bit Access Bursts by synch. sequence In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13723 ) Change subject: osmo-bts-trx: distinguish 11-bit Access Bursts by synch. sequence ...................................................................... Patch Set 5: > I would appreciate if you remove comparison [...] We also discussed this at OsmoDevCon with Harald, and as it turns out, modern compilers can perfectly optimize out this comparison (i.e. the cmp instruction), since it's a static function and the synch. sequences are defined as a static array. We've compiled OsmoBTS with clang-8 and checked the results using 'objdump -d -S'. However, it doesn't mean that I'm against removing the comparison. This is simply not the main problem at the moment. Thanks again for your comments and tips, the initial version of this change was much worse from performance point of view... -- To view, visit https://gerrit.osmocom.org/13723 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibb6d27c6589965c8b59a6d2598a7c43fd860f284 Gerrit-Change-Number: 13723 Gerrit-PatchSet: 5 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Alexander Chemeris Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Max Gerrit-Comment-Date: Thu, 09 May 2019 16:47:49 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 16:57:14 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 16:57:14 +0000 Subject: Change in libosmocore[master]: fix typo in FSM description In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13951 ) Change subject: fix typo in FSM description ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13951 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I3559e9c0769b708cee0d1b221b60960c62f15bd4 Gerrit-Change-Number: 13951 Gerrit-PatchSet: 1 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 09 May 2019 16:57:14 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 16:57:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 16:57:18 +0000 Subject: Change in libosmocore[master]: fix typo in FSM description In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13951 ) Change subject: fix typo in FSM description ...................................................................... fix typo in FSM description Change-Id: I3559e9c0769b708cee0d1b221b60960c62f15bd4 --- M src/fsm.c 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/fsm.c b/src/fsm.c index c32767b..882a2b4 100644 --- a/src/fsm.c +++ b/src/fsm.c @@ -47,15 +47,15 @@ * The general idea is that all actions performed within one state are * located at one position in the code (the state's action function), * as opposed to the 'message-centric' view of e.g. the existing - * state machines of the LAPD(m) coe, where there is one message for - * eahc possible event (primitive), and the function then needs to + * state machines of the LAPD(m) core, where there is one message for + * each possible event (primitive), and the function then needs to * concern itself on how to handle that event over all possible states. * * For each state, there is a bit-mask of permitted input events for * this state, as well as a bit-mask of permitted new output states to * which the state can change. Furthermore, there is a function * pointer implementing the actual handling of the input events - * occurring whilst in thta state. + * occurring whilst in that state. * * Furthermore, each state offers a function pointer that can be * executed just before leaving a state, and another one just after @@ -84,7 +84,7 @@ * NOTICE level is used for all other subscribers. * * In order to attach private state to the \ref osmo_fsm_inst, it - * offers an opaque priv pointer. + * offers an opaque private pointer. * * \file fsm.c */ -- To view, visit https://gerrit.osmocom.org/13951 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I3559e9c0769b708cee0d1b221b60960c62f15bd4 Gerrit-Change-Number: 13951 Gerrit-PatchSet: 1 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 16:58:22 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 16:58:22 +0000 Subject: Change in osmo-msc[master]: ran_a_make_handover_request(): allow no encryption In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13938 ) Change subject: ran_a_make_handover_request(): allow no encryption ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13938 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ifb83ab2a8b6148b457224687ffada2dff4c3204f Gerrit-Change-Number: 13938 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 09 May 2019 16:58:22 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 16:58:35 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 16:58:35 +0000 Subject: Change in osmo-msc[master]: make msc_a_vsub() and others NULL-safe In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13939 ) Change subject: make msc_a_vsub() and others NULL-safe ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13939 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icd146ae512236a09cad080ed3eb85944e8f5cee4 Gerrit-Change-Number: 13939 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 09 May 2019 16:58:35 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 16:58:59 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 16:58:59 +0000 Subject: Change in osmo-msc[master]: no HO call forwarding if no RTP stream In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13940 ) Change subject: no HO call forwarding if no RTP stream ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13940 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia223c2e20e625879ab71fc5c8afd0305fd224c58 Gerrit-Change-Number: 13940 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 09 May 2019 16:58:59 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 16:59:40 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 16:59:40 +0000 Subject: Change in osmo-msc[master]: LOG_TRANS: store subsys in trans, unify USSD logging back to DMM In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13941 ) Change subject: LOG_TRANS: store subsys in trans, unify USSD logging back to DMM ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13941 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6dfe5b98fb9e884c2dde61d603832dafceb12123 Gerrit-Change-Number: 13941 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 09 May 2019 16:59:40 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 17:03:56 2019 From: gerrit-no-reply at lists.osmocom.org (Alexander Chemeris) Date: Thu, 9 May 2019 17:03:56 +0000 Subject: Change in osmo-bts[master]: osmo-bts-trx: distinguish 11-bit Access Bursts by synch. sequence In-Reply-To: References: Message-ID: Alexander Chemeris has posted comments on this change. ( https://gerrit.osmocom.org/13723 ) Change subject: osmo-bts-trx: distinguish 11-bit Access Bursts by synch. sequence ...................................................................... Patch Set 5: > > I would appreciate if you remove comparison [...] > > We also discussed this at OsmoDevCon with Harald, and as it turns > out, modern compilers can perfectly optimize out this comparison > (i.e. the cmp instruction), since it's a static function and the > synch. sequences are defined as a static array. We've compiled > OsmoBTS with clang-8 and checked the results using 'objdump -d -S'. > > However, it doesn't mean that I'm against removing the comparison. > This is simply not the main problem at the moment. Thanks again for > your comments and tips, the initial version of this change was much > worse from performance point of view... Great. I don't have much experience with modern compilers. Just curious - have you checked whether gcc is optimizing it as well? And which compiler is used to build Osmocom builds? -- To view, visit https://gerrit.osmocom.org/13723 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibb6d27c6589965c8b59a6d2598a7c43fd860f284 Gerrit-Change-Number: 13723 Gerrit-PatchSet: 5 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Alexander Chemeris Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Max Gerrit-Comment-Date: Thu, 09 May 2019 17:03:56 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 17:15:57 2019 From: gerrit-no-reply at lists.osmocom.org (Omar Ramadan) Date: Thu, 9 May 2019 17:15:57 +0000 Subject: Change in libosmocore[master]: Add MO-FALLBACK-VALUE SGsAP IE Message-ID: Omar Ramadan has uploaded this change for review. ( https://gerrit.osmocom.org/13952 Change subject: Add MO-FALLBACK-VALUE SGsAP IE ...................................................................... Add MO-FALLBACK-VALUE SGsAP IE In testing against a particular EPC, the SGsAP-SERVICE-REQUEST can contain a MO fallback value TLV with T 0xF1 Change-Id: Ia2460af9673818d375e28c67f1631b5f7eacdaeb --- M include/osmocom/gsm/protocol/gsm_29_118.h M src/gsm/gsm29118.c 2 files changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/52/13952/1 diff --git a/include/osmocom/gsm/protocol/gsm_29_118.h b/include/osmocom/gsm/protocol/gsm_29_118.h index cfe772a..9adb90f 100644 --- a/include/osmocom/gsm/protocol/gsm_29_118.h +++ b/include/osmocom/gsm/protocol/gsm_29_118.h @@ -73,6 +73,7 @@ SGSAP_IE_UE_EMM_MODE = 0x25, SGSAP_IE_ADDL_PAGING_INDICATORS = 0x26, SGSAP_IE_TMSI_BASED_NRI_CONT = 0x27, + SGSAP_IE_MO_FALLBACK_VALUE = 0xf1, }; extern const struct value_string sgsap_iei_names[]; static inline const char *sgsap_iei_name(enum sgsap_iei iei) { diff --git a/src/gsm/gsm29118.c b/src/gsm/gsm29118.c index 56e7473..2c02b2f 100644 --- a/src/gsm/gsm29118.c +++ b/src/gsm/gsm29118.c @@ -89,6 +89,7 @@ { SGSAP_IE_UE_EMM_MODE, "UE-EMM-MODE" }, { SGSAP_IE_ADDL_PAGING_INDICATORS, "ADDL-PAGING-INDICATORS" }, { SGSAP_IE_TMSI_BASED_NRI_CONT, "TMSI-BASED-NRI-CONT" }, + { SGSAP_IE_MO_FALLBACK_VALUE, "MO-FALLBACK-VALUE" }, { 0, NULL } }; @@ -179,6 +180,7 @@ [SGSAP_IE_UE_EMM_MODE] = { TLV_TYPE_TLV }, [SGSAP_IE_ADDL_PAGING_INDICATORS]={ TLV_TYPE_TLV }, [SGSAP_IE_TMSI_BASED_NRI_CONT] = { TLV_TYPE_TLV }, + [SGSAP_IE_MO_FALLBACK_VALUE] = { TLV_TYPE_TLV }, }, }; -- To view, visit https://gerrit.osmocom.org/13952 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ia2460af9673818d375e28c67f1631b5f7eacdaeb Gerrit-Change-Number: 13952 Gerrit-PatchSet: 1 Gerrit-Owner: Omar Ramadan -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 17:16:46 2019 From: gerrit-no-reply at lists.osmocom.org (Omar Ramadan) Date: Thu, 9 May 2019 17:16:46 +0000 Subject: Change in libosmocore[master]: Add MO-FALLBACK-VALUE SGsAP IE In-Reply-To: References: Message-ID: Omar Ramadan has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/13952 ) Change subject: Add MO-FALLBACK-VALUE SGsAP IE ...................................................................... Add MO-FALLBACK-VALUE SGsAP IE In testing against a particular EPC, the SGsAP-SERVICE-REQUEST can contain a MO fallback value TLV with T 0xF1 Change-Id: Ia2460af9673818d375e28c67f1631b5f7eacdaeb --- M include/osmocom/gsm/protocol/gsm_29_118.h M src/gsm/gsm29118.c 2 files changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/52/13952/2 -- To view, visit https://gerrit.osmocom.org/13952 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia2460af9673818d375e28c67f1631b5f7eacdaeb Gerrit-Change-Number: 13952 Gerrit-PatchSet: 2 Gerrit-Owner: Omar Ramadan Gerrit-CC: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 18:07:55 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 18:07:55 +0000 Subject: Change in libosmocore[master]: Add MO-FALLBACK-VALUE SGsAP IE In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13952 ) Change subject: Add MO-FALLBACK-VALUE SGsAP IE ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13952 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia2460af9673818d375e28c67f1631b5f7eacdaeb Gerrit-Change-Number: 13952 Gerrit-PatchSet: 2 Gerrit-Owner: Omar Ramadan Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 09 May 2019 18:07:55 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 19:56:18 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 19:56:18 +0000 Subject: Change in osmo-msc[master]: libmsc/ran_peer.c: fix msgb memleak in ran_peer_rx_reset() Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13953 Change subject: libmsc/ran_peer.c: fix msgb memleak in ran_peer_rx_reset() ...................................................................... libmsc/ran_peer.c: fix msgb memleak in ran_peer_rx_reset() It was noticed that SCCP_RAN_MSG_RESET_ACK message is not freed after sending. Since ran_peer_rx_reset() calls sccp_ran_down_l2_cl(), which then calls osmo_sccp_user_sap_down_nofree(), which doesn't free the message buffer (what's clear from its name). OsmoMSC# show talloc-context application full filter msgb full talloc report on 'osmo_msc' (total 20155 bytes in 88 blocks) msgb contains 4640 bytes in 5 blocks (ref 0) bssmap: reset ack contains 1160 bytes in 1 blocks (ref 0) bssmap: reset ack contains 1160 bytes in 1 blocks (ref 0) bssmap: reset ack contains 1160 bytes in 1 blocks (ref 0) Let's free it after sending (or in case of error). Change-Id: Ic174f6eecd6254af597dfbdc1c9e3d65716f0a76 --- M src/libmsc/ran_peer.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/53/13953/1 diff --git a/src/libmsc/ran_peer.c b/src/libmsc/ran_peer.c index ac2bb4f..40040a2 100644 --- a/src/libmsc/ran_peer.c +++ b/src/libmsc/ran_peer.c @@ -140,11 +140,15 @@ if (sccp_ran_down_l2_cl(rp->sri, &rp->peer_addr, reset_ack)) { LOG_RAN_PEER(rp, LOGL_ERROR, "Failed to send RESET ACKNOWLEDGE message\n"); ran_peer_state_chg(rp, RAN_PEER_ST_WAIT_RX_RESET); + msgb_free(reset_ack); return; } LOG_RAN_PEER(rp, LOGL_INFO, "Sent RESET ACKNOWLEDGE\n"); + /* sccp_ran_down_l2_cl() doesn't free msgb */ + msgb_free(reset_ack); + ran_peer_state_chg(rp, RAN_PEER_ST_READY); } -- To view, visit https://gerrit.osmocom.org/13953 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ic174f6eecd6254af597dfbdc1c9e3d65716f0a76 Gerrit-Change-Number: 13953 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 20:00:59 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 9 May 2019 20:00:59 +0000 Subject: Change in osmo-msc[master]: libmsc/ran_peer.c: fix msgb memleak in ran_peer_rx_reset() In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13953 ) Change subject: libmsc/ran_peer.c: fix msgb memleak in ran_peer_rx_reset() ...................................................................... Patch Set 1: Code-Review+2 excellent, this code is from before I started calling _nonfree(), forgot about that one... -- To view, visit https://gerrit.osmocom.org/13953 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic174f6eecd6254af597dfbdc1c9e3d65716f0a76 Gerrit-Change-Number: 13953 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Neels Hofmeyr Gerrit-CC: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 09 May 2019 20:00:59 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 20:07:14 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 20:07:14 +0000 Subject: Change in libosmo-sccp[master]: osmo-stp: register VTY commands for talloc context introspection Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13954 Change subject: osmo-stp: register VTY commands for talloc context introspection ...................................................................... osmo-stp: register VTY commands for talloc context introspection Change-Id: Id0789c4946929b783c54220de439958001f94992 --- M stp/stp_main.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/54/13954/1 diff --git a/stp/stp_main.c b/stp/stp_main.c index e7f4f38..aa77e61 100644 --- a/stp/stp_main.c +++ b/stp/stp_main.c @@ -180,6 +180,7 @@ osmo_ss7_vty_init_sg(tall_stp_ctx); osmo_sccp_vty_init(); osmo_fsm_vty_add_cmds(); + osmo_talloc_vty_add_cmds(); rc = vty_read_config_file(cmdline_config.config_file, NULL); if (rc < 0) { -- To view, visit https://gerrit.osmocom.org/13954 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id0789c4946929b783c54220de439958001f94992 Gerrit-Change-Number: 13954 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 20:08:10 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 20:08:10 +0000 Subject: Change in osmo-msc[master]: libmsc/ran_peer.c: fix msgb memleak in ran_peer_rx_reset() In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/13953 ) Change subject: libmsc/ran_peer.c: fix msgb memleak in ran_peer_rx_reset() ...................................................................... libmsc/ran_peer.c: fix msgb memleak in ran_peer_rx_reset() It was noticed that SCCP_RAN_MSG_RESET_ACK message is not freed after sending. Since ran_peer_rx_reset() calls sccp_ran_down_l2_cl(), which then calls osmo_sccp_user_sap_down_nofree(), which doesn't free the message buffer (what's clear from its name). OsmoMSC# show talloc-context application full filter msgb full talloc report on 'osmo_msc' (total 20155 bytes in 88 blocks) msgb contains 4640 bytes in 5 blocks (ref 0) bssmap: reset ack contains 1160 bytes in 1 blocks (ref 0) bssmap: reset ack contains 1160 bytes in 1 blocks (ref 0) bssmap: reset ack contains 1160 bytes in 1 blocks (ref 0) Let's free it after sending (or in case of error). Change-Id: Ic174f6eecd6254af597dfbdc1c9e3d65716f0a76 --- M src/libmsc/ran_peer.c 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/ran_peer.c b/src/libmsc/ran_peer.c index ac2bb4f..40040a2 100644 --- a/src/libmsc/ran_peer.c +++ b/src/libmsc/ran_peer.c @@ -140,11 +140,15 @@ if (sccp_ran_down_l2_cl(rp->sri, &rp->peer_addr, reset_ack)) { LOG_RAN_PEER(rp, LOGL_ERROR, "Failed to send RESET ACKNOWLEDGE message\n"); ran_peer_state_chg(rp, RAN_PEER_ST_WAIT_RX_RESET); + msgb_free(reset_ack); return; } LOG_RAN_PEER(rp, LOGL_INFO, "Sent RESET ACKNOWLEDGE\n"); + /* sccp_ran_down_l2_cl() doesn't free msgb */ + msgb_free(reset_ack); + ran_peer_state_chg(rp, RAN_PEER_ST_READY); } -- To view, visit https://gerrit.osmocom.org/13953 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ic174f6eecd6254af597dfbdc1c9e3d65716f0a76 Gerrit-Change-Number: 13953 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 20:18:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 20:18:53 +0000 Subject: Change in osmo-msc[master]: call_leg: document the parent_event_* items In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13946 ) Change subject: call_leg: document the parent_event_* items ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13946 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib099178a0f6ab218646c67c0e7a3d360c81af684 Gerrit-Change-Number: 13946 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 09 May 2019 20:18:53 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 20:27:45 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 20:27:45 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_11.c: properly handle TP-User-Data-Length In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13655 ) Change subject: libmsc/gsm_04_11.c: properly handle TP-User-Data-Length ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/13655 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4b08db7665e854a045129e7695e2bdf296df1688 Gerrit-Change-Number: 13655 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Max Gerrit-Comment-Date: Thu, 09 May 2019 20:27:45 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 20:49:28 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 20:49:28 +0000 Subject: Change in osmo-bts[master]: osmo-bts-sysmo: fix: indicate BTS_FEAT_CBCH support on OML Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13955 Change subject: osmo-bts-sysmo: fix: indicate BTS_FEAT_CBCH support on OML ...................................................................... osmo-bts-sysmo: fix: indicate BTS_FEAT_CBCH support on OML It seems osmo-bts-sysmo does support CBCH (Cell Broadcast), but for some reason it doesn't report BTS_FEAT_CBCH to the BSC. Change-Id: I42dd3f84c44c210d9255e17153372bf252f897a1 --- M src/osmo-bts-sysmo/main.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/55/13955/1 diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c index 221e8e8..ad7118a 100644 --- a/src/osmo-bts-sysmo/main.c +++ b/src/osmo-bts-sysmo/main.c @@ -76,6 +76,7 @@ exit(23); } + gsm_bts_set_feature(bts, BTS_FEAT_CBCH); gsm_bts_set_feature(bts, BTS_FEAT_GPRS); gsm_bts_set_feature(bts, BTS_FEAT_EGPRS); gsm_bts_set_feature(bts, BTS_FEAT_OML_ALERTS); -- To view, visit https://gerrit.osmocom.org/13955 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I42dd3f84c44c210d9255e17153372bf252f897a1 Gerrit-Change-Number: 13955 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 20:52:50 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 20:52:50 +0000 Subject: Change in osmo-bts[master]: osmo-bts-sysmo: fix: indicate BTS_FEAT_CBCH support on OML In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13955 ) Change subject: osmo-bts-sysmo: fix: indicate BTS_FEAT_CBCH support on OML ...................................................................... Patch Set 1: I have very limited experience with sysmoBTS, neither I can test CBCH on it. Looking at the model specific implementation, I see some CBCH related core bits, so I assume it's somehow supported... -- To view, visit https://gerrit.osmocom.org/13955 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I42dd3f84c44c210d9255e17153372bf252f897a1 Gerrit-Change-Number: 13955 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 09 May 2019 20:52:50 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 21:40:14 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 21:40:14 +0000 Subject: Change in osmocom-bb[master]: trxcon/trx_if.c: use read() call instead of recv() Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13956 Change subject: trxcon/trx_if.c: use read() call instead of recv() ...................................................................... trxcon/trx_if.c: use read() call instead of recv() According to the man page of recv(), the only difference of this call from read() is the presence of flags. With a zero flags argument, recv() is generally equivalent to read(). Change-Id: I6d43bbf8d52c5fbb8ee0592b7d1c1dfd2dd1548e --- M src/host/trxcon/trx_if.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/56/13956/1 diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c index 4c10da6..91075f4 100644 --- a/src/host/trxcon/trx_if.c +++ b/src/host/trxcon/trx_if.c @@ -443,7 +443,7 @@ int len, resp, rsp_len; char buf[1500], *p; - len = recv(ofd->fd, buf, sizeof(buf) - 1, 0); + len = read(ofd->fd, buf, sizeof(buf) - 1); if (len <= 0) return len; buf[len] = '\0'; @@ -550,7 +550,7 @@ uint32_t fn; int len; - len = recv(ofd->fd, buf, sizeof(buf), 0); + len = read(ofd->fd, buf, sizeof(buf)); if (len <= 0) return len; -- To view, visit https://gerrit.osmocom.org/13956 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I6d43bbf8d52c5fbb8ee0592b7d1c1dfd2dd1548e Gerrit-Change-Number: 13956 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 21:40:15 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 21:40:15 +0000 Subject: Change in osmocom-bb[master]: trxcon/trx_if.c: print error message if read() call fails Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13957 Change subject: trxcon/trx_if.c: print error message if read() call fails ...................................................................... trxcon/trx_if.c: print error message if read() call fails Change-Id: If3aaa730c306e703d1d430a8920284aa592c999c --- M src/host/trxcon/trx_if.c 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/57/13957/1 diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c index 91075f4..e53fab2 100644 --- a/src/host/trxcon/trx_if.c +++ b/src/host/trxcon/trx_if.c @@ -444,8 +444,10 @@ char buf[1500], *p; len = read(ofd->fd, buf, sizeof(buf) - 1); - if (len <= 0) + if (len <= 0) { + LOGP(DTRX, LOGL_ERROR, "read() failed with rc=%d\n", len); return len; + } buf[len] = '\0'; if (!!strncmp(buf, "RSP ", 4)) { @@ -551,8 +553,10 @@ int len; len = read(ofd->fd, buf, sizeof(buf)); - if (len <= 0) + if (len <= 0) { + LOGP(DTRXD, LOGL_ERROR, "read() failed with rc=%d\n", len); return len; + } if (len != 158) { LOGP(DTRXD, LOGL_ERROR, "Got data message with invalid " -- To view, visit https://gerrit.osmocom.org/13957 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If3aaa730c306e703d1d430a8920284aa592c999c Gerrit-Change-Number: 13957 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 21:40:15 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 21:40:15 +0000 Subject: Change in osmocom-bb[master]: trxcon/trx_if.c: use ssize_t for return value of read() Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13958 Change subject: trxcon/trx_if.c: use ssize_t for return value of read() ...................................................................... trxcon/trx_if.c: use ssize_t for return value of read() Change-Id: I4a489be6fafcd057c3edc4f3d5f76d645899f884 --- M src/host/trxcon/trx_if.c 1 file changed, 14 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/58/13958/1 diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c index e53fab2..35ad3c0 100644 --- a/src/host/trxcon/trx_if.c +++ b/src/host/trxcon/trx_if.c @@ -440,15 +440,16 @@ { struct trx_instance *trx = ofd->data; struct trx_ctrl_msg *tcm; - int len, resp, rsp_len; + int resp, rsp_len; char buf[1500], *p; + ssize_t read_len; - len = read(ofd->fd, buf, sizeof(buf) - 1); - if (len <= 0) { - LOGP(DTRX, LOGL_ERROR, "read() failed with rc=%d\n", len); - return len; + read_len = read(ofd->fd, buf, sizeof(buf) - 1); + if (read_len <= 0) { + LOGP(DTRX, LOGL_ERROR, "read() failed with rc=%zd\n", read_len); + return read_len; } - buf[len] = '\0'; + buf[read_len] = '\0'; if (!!strncmp(buf, "RSP ", 4)) { LOGP(DTRX, LOGL_NOTICE, "Unknown message on CTRL port: %s\n", buf); @@ -550,17 +551,17 @@ int8_t rssi, tn; int16_t toa256; uint32_t fn; - int len; + ssize_t read_len; - len = read(ofd->fd, buf, sizeof(buf)); - if (len <= 0) { - LOGP(DTRXD, LOGL_ERROR, "read() failed with rc=%d\n", len); - return len; + read_len = read(ofd->fd, buf, sizeof(buf)); + if (read_len <= 0) { + LOGP(DTRXD, LOGL_ERROR, "read() failed with rc=%zd\n", read_len); + return read_len; } - if (len != 158) { + if (read_len != 158) { LOGP(DTRXD, LOGL_ERROR, "Got data message with invalid " - "length '%d'\n", len); + "length '%zd'\n", read_len); return -EINVAL; } -- To view, visit https://gerrit.osmocom.org/13958 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I4a489be6fafcd057c3edc4f3d5f76d645899f884 Gerrit-Change-Number: 13958 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 22:45:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 22:45:47 +0000 Subject: Change in osmo-ttcn3-hacks[master]: RAN_Emulation: Fix IMSI table lookup on RANAP paging Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13959 Change subject: RAN_Emulation: Fix IMSI table lookup on RANAP paging ...................................................................... RAN_Emulation: Fix IMSI table lookup on RANAP paging We need to check explicitly for '== null'. isvalue() is of no help here, as 'null' apparently is a value in TTCN-3. Change-Id: I4b2793937a201c5535051092d871ded6cb053f5f --- M library/RAN_Emulation.ttcnpp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/59/13959/1 diff --git a/library/RAN_Emulation.ttcnpp b/library/RAN_Emulation.ttcnpp index 843cc9e..9a65eb7 100644 --- a/library/RAN_Emulation.ttcnpp +++ b/library/RAN_Emulation.ttcnpp @@ -585,7 +585,7 @@ } } client := f_imsi_table_find(oct2hex(imsi), tmsi); - if (isvalue(client)) { + if (client != null) { log("CommonRanapUnitdataCallback: IMSI/TMSI found in table, dispatching to ", client); CLIENT.send(ranap) to client; -- To view, visit https://gerrit.osmocom.org/13959 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I4b2793937a201c5535051092d871ded6cb053f5f Gerrit-Change-Number: 13959 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 22:47:24 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 22:47:24 +0000 Subject: Change in osmo-ttcn3-hacks[master]: RAN_Emulation: Fix IMSI table lookup on RANAP paging In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13959 ) Change subject: RAN_Emulation: Fix IMSI table lookup on RANAP paging ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13959 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4b2793937a201c5535051092d871ded6cb053f5f Gerrit-Change-Number: 13959 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 09 May 2019 22:47:24 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 22:47:26 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 22:47:26 +0000 Subject: Change in osmo-ttcn3-hacks[master]: RAN_Emulation: Fix IMSI table lookup on RANAP paging In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13959 ) Change subject: RAN_Emulation: Fix IMSI table lookup on RANAP paging ...................................................................... RAN_Emulation: Fix IMSI table lookup on RANAP paging We need to check explicitly for '== null'. isvalue() is of no help here, as 'null' apparently is a value in TTCN-3. Change-Id: I4b2793937a201c5535051092d871ded6cb053f5f --- M library/RAN_Emulation.ttcnpp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/library/RAN_Emulation.ttcnpp b/library/RAN_Emulation.ttcnpp index 843cc9e..9a65eb7 100644 --- a/library/RAN_Emulation.ttcnpp +++ b/library/RAN_Emulation.ttcnpp @@ -585,7 +585,7 @@ } } client := f_imsi_table_find(oct2hex(imsi), tmsi); - if (isvalue(client)) { + if (client != null) { log("CommonRanapUnitdataCallback: IMSI/TMSI found in table, dispatching to ", client); CLIENT.send(ranap) to client; -- To view, visit https://gerrit.osmocom.org/13959 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I4b2793937a201c5535051092d871ded6cb053f5f Gerrit-Change-Number: 13959 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 22:47:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 22:47:53 +0000 Subject: Change in osmo-bts[master]: osmo-bts-sysmo: fix: indicate BTS_FEAT_CBCH support on OML In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13955 ) Change subject: osmo-bts-sysmo: fix: indicate BTS_FEAT_CBCH support on OML ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13955 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I42dd3f84c44c210d9255e17153372bf252f897a1 Gerrit-Change-Number: 13955 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 09 May 2019 22:47:53 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 22:47:54 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 22:47:54 +0000 Subject: Change in osmo-bts[master]: osmo-bts-sysmo: fix: indicate BTS_FEAT_CBCH support on OML In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13955 ) Change subject: osmo-bts-sysmo: fix: indicate BTS_FEAT_CBCH support on OML ...................................................................... osmo-bts-sysmo: fix: indicate BTS_FEAT_CBCH support on OML It seems osmo-bts-sysmo does support CBCH (Cell Broadcast), but for some reason it doesn't report BTS_FEAT_CBCH to the BSC. Change-Id: I42dd3f84c44c210d9255e17153372bf252f897a1 --- M src/osmo-bts-sysmo/main.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c index 221e8e8..ad7118a 100644 --- a/src/osmo-bts-sysmo/main.c +++ b/src/osmo-bts-sysmo/main.c @@ -76,6 +76,7 @@ exit(23); } + gsm_bts_set_feature(bts, BTS_FEAT_CBCH); gsm_bts_set_feature(bts, BTS_FEAT_GPRS); gsm_bts_set_feature(bts, BTS_FEAT_EGPRS); gsm_bts_set_feature(bts, BTS_FEAT_OML_ALERTS); -- To view, visit https://gerrit.osmocom.org/13955 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I42dd3f84c44c210d9255e17153372bf252f897a1 Gerrit-Change-Number: 13955 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 22:48:12 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 22:48:12 +0000 Subject: Change in osmocom-bb[master]: trxcon/trx_if.c: use read() call instead of recv() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13956 ) Change subject: trxcon/trx_if.c: use read() call instead of recv() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13956 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6d43bbf8d52c5fbb8ee0592b7d1c1dfd2dd1548e Gerrit-Change-Number: 13956 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 09 May 2019 22:48:12 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 22:48:23 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 22:48:23 +0000 Subject: Change in osmocom-bb[master]: trxcon/trx_if.c: print error message if read() call fails In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13957 ) Change subject: trxcon/trx_if.c: print error message if read() call fails ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13957 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If3aaa730c306e703d1d430a8920284aa592c999c Gerrit-Change-Number: 13957 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 09 May 2019 22:48:23 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 22:48:30 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 9 May 2019 22:48:30 +0000 Subject: Change in osmocom-bb[master]: trxcon/trx_if.c: use ssize_t for return value of read() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13958 ) Change subject: trxcon/trx_if.c: use ssize_t for return value of read() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13958 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4a489be6fafcd057c3edc4f3d5f76d645899f884 Gerrit-Change-Number: 13958 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 09 May 2019 22:48:30 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 23:53:13 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 23:53:13 +0000 Subject: Change in osmocom-bb[master]: trxcon/trx_if.c: use read() call instead of recv() In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/13956 ) Change subject: trxcon/trx_if.c: use read() call instead of recv() ...................................................................... trxcon/trx_if.c: use read() call instead of recv() According to the man page of recv(), the only difference of this call from read() is the presence of flags. With a zero flags argument, recv() is generally equivalent to read(). Change-Id: I6d43bbf8d52c5fbb8ee0592b7d1c1dfd2dd1548e --- M src/host/trxcon/trx_if.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c index 4c10da6..91075f4 100644 --- a/src/host/trxcon/trx_if.c +++ b/src/host/trxcon/trx_if.c @@ -443,7 +443,7 @@ int len, resp, rsp_len; char buf[1500], *p; - len = recv(ofd->fd, buf, sizeof(buf) - 1, 0); + len = read(ofd->fd, buf, sizeof(buf) - 1); if (len <= 0) return len; buf[len] = '\0'; @@ -550,7 +550,7 @@ uint32_t fn; int len; - len = recv(ofd->fd, buf, sizeof(buf), 0); + len = read(ofd->fd, buf, sizeof(buf)); if (len <= 0) return len; -- To view, visit https://gerrit.osmocom.org/13956 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I6d43bbf8d52c5fbb8ee0592b7d1c1dfd2dd1548e Gerrit-Change-Number: 13956 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 23:53:14 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 23:53:14 +0000 Subject: Change in osmocom-bb[master]: trxcon/trx_if.c: print error message if read() call fails In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/13957 ) Change subject: trxcon/trx_if.c: print error message if read() call fails ...................................................................... trxcon/trx_if.c: print error message if read() call fails Change-Id: If3aaa730c306e703d1d430a8920284aa592c999c --- M src/host/trxcon/trx_if.c 1 file changed, 6 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c index 91075f4..e53fab2 100644 --- a/src/host/trxcon/trx_if.c +++ b/src/host/trxcon/trx_if.c @@ -444,8 +444,10 @@ char buf[1500], *p; len = read(ofd->fd, buf, sizeof(buf) - 1); - if (len <= 0) + if (len <= 0) { + LOGP(DTRX, LOGL_ERROR, "read() failed with rc=%d\n", len); return len; + } buf[len] = '\0'; if (!!strncmp(buf, "RSP ", 4)) { @@ -551,8 +553,10 @@ int len; len = read(ofd->fd, buf, sizeof(buf)); - if (len <= 0) + if (len <= 0) { + LOGP(DTRXD, LOGL_ERROR, "read() failed with rc=%d\n", len); return len; + } if (len != 158) { LOGP(DTRXD, LOGL_ERROR, "Got data message with invalid " -- To view, visit https://gerrit.osmocom.org/13957 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If3aaa730c306e703d1d430a8920284aa592c999c Gerrit-Change-Number: 13957 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 9 23:53:14 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 9 May 2019 23:53:14 +0000 Subject: Change in osmocom-bb[master]: trxcon/trx_if.c: use ssize_t for return value of read() In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/13958 ) Change subject: trxcon/trx_if.c: use ssize_t for return value of read() ...................................................................... trxcon/trx_if.c: use ssize_t for return value of read() Change-Id: I4a489be6fafcd057c3edc4f3d5f76d645899f884 --- M src/host/trxcon/trx_if.c 1 file changed, 14 insertions(+), 13 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c index e53fab2..35ad3c0 100644 --- a/src/host/trxcon/trx_if.c +++ b/src/host/trxcon/trx_if.c @@ -440,15 +440,16 @@ { struct trx_instance *trx = ofd->data; struct trx_ctrl_msg *tcm; - int len, resp, rsp_len; + int resp, rsp_len; char buf[1500], *p; + ssize_t read_len; - len = read(ofd->fd, buf, sizeof(buf) - 1); - if (len <= 0) { - LOGP(DTRX, LOGL_ERROR, "read() failed with rc=%d\n", len); - return len; + read_len = read(ofd->fd, buf, sizeof(buf) - 1); + if (read_len <= 0) { + LOGP(DTRX, LOGL_ERROR, "read() failed with rc=%zd\n", read_len); + return read_len; } - buf[len] = '\0'; + buf[read_len] = '\0'; if (!!strncmp(buf, "RSP ", 4)) { LOGP(DTRX, LOGL_NOTICE, "Unknown message on CTRL port: %s\n", buf); @@ -550,17 +551,17 @@ int8_t rssi, tn; int16_t toa256; uint32_t fn; - int len; + ssize_t read_len; - len = read(ofd->fd, buf, sizeof(buf)); - if (len <= 0) { - LOGP(DTRXD, LOGL_ERROR, "read() failed with rc=%d\n", len); - return len; + read_len = read(ofd->fd, buf, sizeof(buf)); + if (read_len <= 0) { + LOGP(DTRXD, LOGL_ERROR, "read() failed with rc=%zd\n", read_len); + return read_len; } - if (len != 158) { + if (read_len != 158) { LOGP(DTRXD, LOGL_ERROR, "Got data message with invalid " - "length '%d'\n", len); + "length '%zd'\n", read_len); return -EINVAL; } -- To view, visit https://gerrit.osmocom.org/13958 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I4a489be6fafcd057c3edc4f3d5f76d645899f884 Gerrit-Change-Number: 13958 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From jenkins at lists.osmocom.org Fri May 10 00:00:47 2019 From: jenkins at lists.osmocom.org (jenkins at lists.osmocom.org) Date: Fri, 10 May 2019 00:00:47 +0000 (UTC) Subject: =?UTF-8?Q?Build_failed_in_Jenkins:_master?= =?UTF-8?Q?-osmo-sip-connector_=C2=BB_a1=3Ddefaul?= =?UTF-8?Q?t,a2=3Ddefault,a3=3Ddefault,a4=3Ddefa?= =?UTF-8?Q?ult,osmocom-master-debian9_#1389?= Message-ID: <1064881690.2415.1557446447324.JavaMail.jenkins@jenkins.osmocom.org> See ------------------------------------------ [...truncated 11.08 KB...] checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for pkg-config... /usr/bin/pkg-config checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.20... yes checking for ANSI C header files... (cached) yes checking execinfo.h usability... yes checking execinfo.h presence... yes checking for execinfo.h... yes checking sys/select.h usability... yes checking sys/select.h presence... yes checking for sys/select.h... yes checking sys/socket.h usability... yes checking sys/socket.h presence... yes checking for sys/socket.h... yes checking sys/timerfd.h usability... yes checking sys/timerfd.h presence... yes checking for sys/timerfd.h... yes checking syslog.h usability... yes checking syslog.h presence... yes checking for syslog.h... yes checking ctype.h usability... yes checking ctype.h presence... yes checking for ctype.h... yes checking netinet/tcp.h usability... yes checking netinet/tcp.h presence... yes checking for netinet/tcp.h... yes checking netinet/in.h usability... yes checking netinet/in.h presence... yes checking for netinet/in.h... yes checking for size_t... yes checking for working alloca.h... yes checking for alloca... yes checking for library containing dlopen... -ldl checking for library containing dlsym... -ldl checking for backtrace in -lexecinfo... no checking for library containing clock_gettime... none required checking for doxygen... /usr/bin/doxygen checking whether SYS_getrandom is declared... yes checking if gcc supports -fvisibility=hidden... yes checking for clock_gettime... yes checking for localtime_r... yes checking whether struct tm has tm_gmtoff member... yes checking for TALLOC... yes checking for PCSC... yes checking for LIBGNUTLS... yes checking whether to enable VTY/CTRL tests... no checking whether C compiler accepts -mavx2... yes checking whether C compiler accepts -mssse3... yes checking whether C compiler accepts -msse4.1... yes checking whether gcc has __builtin_cpu_supports built-in... yes CFLAGS="-g -O2 -DBUILDING_LIBOSMOCORE -Wall" CPPFLAGS=" -DBUILDING_LIBOSMOCORE -Wall" checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating libosmocore.pc config.status: creating libosmocodec.pc config.status: creating libosmocoding.pc config.status: creating libosmovty.pc config.status: creating libosmogsm.pc config.status: creating libosmogb.pc config.status: creating libosmoctrl.pc config.status: creating libosmosim.pc config.status: creating include/Makefile config.status: creating src/Makefile config.status: creating src/vty/Makefile config.status: creating src/codec/Makefile config.status: creating src/coding/Makefile config.status: creating src/sim/Makefile config.status: creating src/gsm/Makefile config.status: creating src/gb/Makefile config.status: creating src/ctrl/Makefile config.status: creating src/pseudotalloc/Makefile config.status: creating tests/Makefile config.status: creating tests/atlocal config.status: creating utils/Makefile config.status: creating Doxyfile.core config.status: creating Doxyfile.gsm config.status: creating Doxyfile.vty config.status: creating Doxyfile.codec config.status: creating Doxyfile.coding config.status: creating Doxyfile.gb config.status: creating Doxyfile.ctrl config.status: creating Makefile config.status: creating config.h config.status: executing tests/atconfig commands config.status: executing depfiles commands config.status: executing libtool commands configure: WARNING: unrecognized options: --with-systemdsystemunitdir + [ -n ] + make -j 8 install echo 1.1.0.4-c9a2 > .version-t && mv .version-t .version make install-recursive make[1]: Entering directory ' Making install in include make[2]: Entering directory ' GEN osmocom/gsm/gsm0503.h Generating header file... Generate 'xcch' declaration Generate 'rach' declaration Generate 'rach_ext' declaration Generate 'sch' declaration Generate 'cs2' declaration Generate 'cs3' declaration Generate 'cs2_np' declaration Generate 'cs3_np' declaration Generate 'tch_afs_12_2' declaration Generate 'tch_afs_10_2' declaration Generate 'tch_afs_7_95' declaration Generate 'tch_afs_7_4' declaration Generate 'tch_afs_6_7' declaration Generate 'tch_afs_5_9' declaration Generate 'tch_afs_5_15' declaration Generate 'tch_afs_4_75' declaration Generate 'tch_fr' declaration Generate 'tch_hr' declaration Generate 'tch_ahs_7_95' declaration Generate 'tch_ahs_7_4' declaration Generate 'tch_ahs_6_7' declaration Generate 'tch_ahs_5_9' declaration Generate 'tch_ahs_5_15' declaration Generate 'tch_ahs_4_75' declaration Generate 'mcs1_dl_hdr' declaration Generate 'mcs1_ul_hdr' declaration Generate 'mcs1' declaration Generate 'mcs2' declaration Generate 'mcs3' declaration Generate 'mcs4' declaration Generate 'mcs5_dl_hdr' declaration Generate 'mcs5_ul_hdr' declaration Generate 'mcs5' declaration Generate 'mcs6' declaration Generate 'mcs7_dl_hdr' declaration Generate 'mcs7_ul_hdr' declaration Generate 'mcs7' declaration Generate 'mcs8' declaration Generate 'mcs9' declaration Generation complete. make install-am make[3]: Entering directory ' GEN osmocom/core/bit32gen.h GEN osmocom/core/bit16gen.h GEN osmocom/core/crc32gen.h GEN osmocom/core/bit64gen.h GEN osmocom/core/crc16gen.h GEN osmocom/core/bit16gen.h GEN osmocom/core/bit32gen.h GEN osmocom/core/crc8gen.h GEN osmocom/core/crc64gen.h GEN osmocom/core/bit64gen.h GEN osmocom/core/crc32gen.h GEN osmocom/core/crc64gen.h GEN osmocom/core/crc16gen.h GEN osmocom/core/crc8gen.h make[4]: Entering directory ' make[4]: Nothing to be done for 'install-exec-am'. /bin/mkdir -p ' /bin/mkdir -p ' /usr/bin/install -c -m 644 osmocom/core/application.h osmocom/core/backtrace.h osmocom/core/bit16gen.h osmocom/core/bit32gen.h osmocom/core/bit64gen.h osmocom/core/bits.h osmocom/core/bitvec.h osmocom/core/bitcomp.h osmocom/core/byteswap.h osmocom/core/conv.h osmocom/core/counter.h osmocom/core/crc16.h osmocom/core/crc16gen.h osmocom/core/crc32gen.h osmocom/core/crc64gen.h osmocom/core/crc8gen.h osmocom/core/crcgen.h osmocom/core/endian.h osmocom/core/defs.h osmocom/core/fsm.h osmocom/core/gsmtap.h osmocom/core/gsmtap_util.h osmocom/core/isdnhdlc.h osmocom/core/linuxlist.h osmocom/core/linuxrbtree.h osmocom/core/logging.h osmocom/core/loggingrb.h osmocom/core/stats.h osmocom/core/macaddr.h osmocom/core/msgb.h osmocom/core/panic.h osmocom/core/prbs.h osmocom/core/prim.h osmocom/core/process.h osmocom/core/rate_ctr.h osmocom/core/stat_item.h osmocom/core/select.h osmocom/core/sercomm.h osmocom/core/signal.h osmocom/core/socket.h ' /bin/mkdir -p ' /usr/bin/install -c -m 644 osmocom/gsm/a5.h osmocom/gsm/abis_nm.h osmocom/gsm/apn.h osmocom/gsm/bts_features.h osmocom/gsm/comp128.h osmocom/gsm/comp128v23.h osmocom/gsm/bitvec_gsm.h osmocom/gsm/gan.h osmocom/gsm/gsm0341.h osmocom/gsm/gsm0411_smc.h osmocom/gsm/gsm0411_smr.h osmocom/gsm/gsm0411_utils.h osmocom/gsm/gsm0480.h osmocom/gsm/gsm0502.h osmocom/gsm/gsm0503.h osmocom/gsm/gsm0808.h osmocom/gsm/gsm29205.h osmocom/gsm/gsm0808_utils.h osmocom/gsm/gsm23003.h osmocom/gsm/gsm29118.h osmocom/gsm/gsm48.h osmocom/gsm/gsm48_arfcn_range_encode.h osmocom/gsm/gsm48_ie.h osmocom/gsm/gsm48_rest_octets.h osmocom/gsm/gsm_utils.h osmocom/gsm/gsup.h osmocom/gsm/gsup_sms.h osmocom/gsm/ipa.h osmocom/gsm/lapd_core.h osmocom/gsm/lapdm.h osmocom/gsm/meas_rep.h osmocom/gsm/mncc.h osmocom/gsm/prim.h osmocom/gsm/l1sap.h osmocom/gsm/oap.h osmocom/gsm/oap_client.h osmocom/gsm/rsl.h osmocom/gsm/rxlev_stat.h osmocom/gsm/sysinfo.h osmocom/gsm/tlv.h ' /bin/mkdir -p ' /usr/bin/install -c -m 644 osmocom/coding/gsm0503_tables.h osmocom/coding/gsm0503_parity.h osmocom/coding/gsm0503_mapping.h osmocom/coding/gsm0503_interleaving.h osmocom/coding/gsm0503_coding.h ' /bin/mkdir -p ' /usr/bin/install -c -m 644 osmocom/core/statistics.h osmocom/core/strrb.h osmocom/core/talloc.h osmocom/core/tdef.h osmocom/core/timer.h osmocom/core/timer_compat.h osmocom/core/utils.h osmocom/core/write_queue.h osmocom/core/sockaddr_str.h osmocom/core/use_count.h osmocom/core/plugin.h osmocom/core/msgfile.h osmocom/core/serial.h ' /bin/mkdir -p ' /usr/bin/install -c -m 644 osmocom/vty/buffer.h osmocom/vty/command.h osmocom/vty/logging.h osmocom/vty/stats.h osmocom/vty/misc.h osmocom/vty/telnet_interface.h osmocom/vty/vector.h osmocom/vty/vty.h osmocom/vty/ports.h osmocom/vty/tdef_vty.h ' /bin/mkdir -p ' /usr/bin/install -c -m 644 osmocom/gsm/protocol/gsm_03_40.h osmocom/gsm/protocol/gsm_03_41.h osmocom/gsm/protocol/gsm_04_08.h osmocom/gsm/protocol/gsm_04_08_gprs.h osmocom/gsm/protocol/gsm_04_11.h osmocom/gsm/protocol/gsm_04_12.h osmocom/gsm/protocol/gsm_04_14.h osmocom/gsm/protocol/gsm_04_80.h osmocom/gsm/protocol/gsm_08_08.h osmocom/gsm/protocol/gsm_08_58.h osmocom/gsm/protocol/gsm_09_02.h osmocom/gsm/protocol/gsm_12_21.h osmocom/gsm/protocol/gsm_23_003.h osmocom/gsm/protocol/gsm_29_118.h osmocom/gsm/protocol/gsm_44_318.h osmocom/gsm/protocol/ipaccess.h osmocom/gsm/protocol/smpp34_osmocom.h ' /bin/mkdir -p ' /usr/bin/install -c -m 644 osmocom/sim/class_tables.h osmocom/sim/sim.h ' /bin/mkdir -p ' /usr/bin/install -c -m 644 osmocom/gprs/gprs_bssgp.h osmocom/gprs/gprs_bssgp_bss.h osmocom/gprs/gprs_msgb.h osmocom/gprs/gprs_ns.h osmocom/gprs/gprs_ns_frgre.h osmocom/gprs/gprs_rlc.h ' /bin/mkdir -p ' /usr/bin/install -c -m 644 osmocom/crypt/auth.h osmocom/crypt/gprs_cipher.h ' /bin/mkdir -p ' /usr/bin/install -c -m 644 osmocom/ctrl/control_cmd.h osmocom/ctrl/control_if.h osmocom/ctrl/ports.h osmocom/ctrl/control_vty.h ' /bin/mkdir -p ' /usr/bin/install -c -m 644 osmocom/gprs/protocol/gsm_04_60.h osmocom/gprs/protocol/gsm_08_16.h osmocom/gprs/protocol/gsm_08_18.h ' /bin/mkdir -p ' /usr/bin/install -c -m 644 osmocom/codec/ecu.h osmocom/codec/codec.h osmocom/codec/gsm610_bits.h ' make[4]: Leaving directory ' make[3]: Leaving directory ' make[2]: Leaving directory ' Making install in src make[2]: Entering directory ' GEN crc16gen.c GEN crc64gen.c GEN crc8gen.c GEN crc32gen.c make install-am make[3]: Entering directory ' CC timer.lo CC timer_gettimeofday.lo CC timer_clockgettime.lo CC select.lo CC signal.lo CC msgb.lo CC bits.lo CC bitvec.lo CC bitcomp.lo CC counter.lo CC fsm.lo CC write_queue.lo CC utils.lo CC socket.lo CC logging.lo CC logging_syslog.lo CC logging_gsmtap.lo CC rate_ctr.lo CC gsmtap_util.lo CC crc16.lo CC panic.lo CC backtrace.lo CC application.lo CC conv.lo CC rbtree.lo CC strrb.lo CC loggingrb.lo CC crc8gen.lo CC crc16gen.lo CC crc32gen.lo /bin/bash: line 2: 5313 Segmentation fault /bin/bash ../libtool --silent --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -DBUILDING_LIBOSMOCORE -Wall -Wall -g -O2 -DBUILDING_LIBOSMOCORE -Wall -MT strrb.lo -MD -MP -MF $depbase.Tpo -c -o strrb.lo strrb.c Makefile:565: recipe for target 'strrb.lo' failed make[3]: *** [strrb.lo] Error 139 make[3]: *** Waiting for unfinished jobs.... make[3]: Leaving directory ' Makefile:669: recipe for target 'install' failed make[2]: *** [install] Error 2 make[2]: Leaving directory ' Makefile:625: recipe for target 'install-recursive' failed make[1]: *** [install-recursive] Error 1 make[1]: Leaving directory ' Makefile:924: recipe for target 'install' failed make: *** [install] Error 2 Build step 'Execute shell' marked build as failure [WARNINGS]Skipping publisher since build result is FAILURE From jenkins at lists.osmocom.org Fri May 10 03:10:07 2019 From: jenkins at lists.osmocom.org (jenkins at lists.osmocom.org) Date: Fri, 10 May 2019 03:10:07 +0000 (UTC) Subject: =?UTF-8?Q?Jenkins_build_is_back_to_normal_:?= =?UTF-8?Q?_master-osmo-sip-connector_=C2=BB_a1=3Dde?= =?UTF-8?Q?fault,a2=3Ddefault,a3=3Ddefault,a4=3Dde?= =?UTF-8?Q?fault,osmocom-master-debian9_#1390?= In-Reply-To: <1064881690.2415.1557446447324.JavaMail.jenkins@jenkins.osmocom.org> References: <1064881690.2415.1557446447324.JavaMail.jenkins@jenkins.osmocom.org> Message-ID: <1330058916.2430.1557457807738.JavaMail.jenkins@jenkins.osmocom.org> See From gerrit-no-reply at lists.osmocom.org Fri May 10 06:50:37 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 06:50:37 +0000 Subject: Change in osmo-msc[master]: SMPP: Don't accept password or system-id exceeding spec length In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13930 ) Change subject: SMPP: Don't accept password or system-id exceeding spec length ...................................................................... Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/13930/1/src/libmsc/smpp_smsc.h File src/libmsc/smpp_smsc.h: https://gerrit.osmocom.org/#/c/13930/1/src/libmsc/smpp_smsc.h at 16 PS1, Line 16: #define SMPP_SYS_ID_LEN 15 > Same define is defined in smpp_mirror.c, you want to fix that one too. [?] stictly speaking, that's not a bug fix. SMPP_Mirror has no user-configurabe username and/or password, so unlike osmo-msc there is no situation where the user can configure something that will break in practise. Having too large buffers is not a bug there. So I think it's a separate cleanup that deserves a separate patch, at much lower priority. -- To view, visit https://gerrit.osmocom.org/13930 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I81ef593e84bf1e15f6746386fc145495fae29354 Gerrit-Change-Number: 13930 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 10 May 2019 06:50:37 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:03:44 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:03:44 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_11.c: properly handle TP-User-Data-Length In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13655 ) Change subject: libmsc/gsm_04_11.c: properly handle TP-User-Data-Length ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13655 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4b08db7665e854a045129e7695e2bdf296df1688 Gerrit-Change-Number: 13655 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Max Gerrit-Comment-Date: Fri, 10 May 2019 07:03:44 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:03:54 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:03:54 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_11.c: properly handle TP-User-Data-Length In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13655 ) Change subject: libmsc/gsm_04_11.c: properly handle TP-User-Data-Length ...................................................................... libmsc/gsm_04_11.c: properly handle TP-User-Data-Length As per 3GPP TS 03.40, section 9.2.3.16 "TP-User-Data-Length (TP-UDL)", if the TP-User-Data is coded using the GSM 7-bit default alphabet, the TP-User-Data-Length field indicates the *number of septets* within the TP-User-Data field to follow. Otherwise, i.e. in case of 8-bit or UCS-2 encoded data, the *number of octets* is indicated. Since we store the original TP-UDL value (as received), we might need to convert septets to octets before passing it to memcpy(). Otherwise this would lead to a buffer overrun. Also, as we receive TPDU from untrusted source (i.e. subscriber), the TP-UDL value needs to be checked against the corresponding maximum (160 septets or 140 octets) and truncated if needed. Please note that buffer overrun is still possible, e.g. when an indicated TP-UDL value is grather than the remaining TPDU length. Preventing this would require adding an additional check. Change-Id: I4b08db7665e854a045129e7695e2bdf296df1688 Depends-on: (core) I54f88d2908ac47228813fb8c049f4264e5145241 --- M src/libmsc/gsm_04_11.c 1 file changed, 29 insertions(+), 12 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c index ff5576f..22e55dd 100644 --- a/src/libmsc/gsm_04_11.c +++ b/src/libmsc/gsm_04_11.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -545,19 +546,35 @@ rc = GSM411_RP_CAUSE_MO_NET_OUT_OF_ORDER; goto out; } - gsms->user_data_len = *smsp++; - if (gsms->user_data_len) { - memcpy(gsms->user_data, smsp, gsms->user_data_len); - switch (sms_alphabet) { - case DCS_7BIT_DEFAULT: - gsm_7bit_decode_n(gsms->text, sizeof(gsms->text), smsp, - gsms->user_data_len); - break; - case DCS_8BIT_DATA: - case DCS_UCS2: - case DCS_NONE: - break; + /* As per 3GPP TS 03.40, section 9.2.3.16, TP-User-Data-Length (TP-UDL) + * may indicate either the number of septets, or the number of octets, + * depending on Data Coding Scheme. We store TP-UDL value as-is, + * so this should be kept in mind to avoid buffer overruns. */ + gsms->user_data_len = *smsp++; + if (gsms->user_data_len > 0) { + if (sms_alphabet == DCS_7BIT_DEFAULT) { + /* TP-UDL is indicated in septets (up to 160) */ + if (gsms->user_data_len > GSM340_UDL_SPT_MAX) { + LOG_TRANS(trans, LOGL_NOTICE, + "TP-User-Data-Length %u (septets) " + "is too big, truncating to %u\n", + gsms->user_data_len, GSM340_UDL_SPT_MAX); + gsms->user_data_len = GSM340_UDL_SPT_MAX; + } + memcpy(gsms->user_data, smsp, gsm_get_octet_len(gsms->user_data_len)); + gsm_7bit_decode_n(gsms->text, sizeof(gsms->text), + smsp, gsms->user_data_len); + } else { + /* TP-UDL is indicated in octets (up to 140) */ + if (gsms->user_data_len > GSM340_UDL_OCT_MAX) { + LOG_TRANS(trans, LOGL_NOTICE, + "TP-User-Data-Length %u (octets) " + "is too big, truncating to %u\n", + gsms->user_data_len, GSM340_UDL_OCT_MAX); + gsms->user_data_len = GSM340_UDL_OCT_MAX; + } + memcpy(gsms->user_data, smsp, gsms->user_data_len); } } -- To view, visit https://gerrit.osmocom.org/13655 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I4b08db7665e854a045129e7695e2bdf296df1688 Gerrit-Change-Number: 13655 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Max -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:04:30 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:04:30 +0000 Subject: Change in osmo-msc[master]: call_leg: remove unused event MSC_EV_CALL_LEG_RTP_RELEASED In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13945 ) Change subject: call_leg: remove unused event MSC_EV_CALL_LEG_RTP_RELEASED ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13945 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6b2fc1225c960fa2f7c46adf241520217a07821c Gerrit-Change-Number: 13945 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 10 May 2019 07:04:30 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:04:52 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:04:52 +0000 Subject: Change in osmo-msc[master]: ran_a_make_handover_request(): allow no encryption In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13938 ) Change subject: ran_a_make_handover_request(): allow no encryption ...................................................................... ran_a_make_handover_request(): allow no encryption Fixes: coverity CID 198454 Change-Id: Ifb83ab2a8b6148b457224687ffada2dff4c3204f --- M src/libmsc/ran_msg_a.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c index 2e498a2..ba0990d 100644 --- a/src/libmsc/ran_msg_a.c +++ b/src/libmsc/ran_msg_a.c @@ -1068,7 +1068,8 @@ .speech_version_used = n->speech_version_used, - .chosen_encryption_algorithm_serving = n->geran.chosen_encryption->alg_id, + .chosen_encryption_algorithm_serving = + n->geran.chosen_encryption ? n->geran.chosen_encryption->alg_id : 0, .old_bss_to_new_bss_info_raw = n->old_bss_to_new_bss_info_raw, .old_bss_to_new_bss_info_raw_len = n->old_bss_to_new_bss_info_raw_len, -- To view, visit https://gerrit.osmocom.org/13938 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ifb83ab2a8b6148b457224687ffada2dff4c3204f Gerrit-Change-Number: 13938 Gerrit-PatchSet: 2 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:04:52 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:04:52 +0000 Subject: Change in osmo-msc[master]: make msc_a_vsub() and others NULL-safe In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13939 ) Change subject: make msc_a_vsub() and others NULL-safe ...................................................................... make msc_a_vsub() and others NULL-safe Fixes: coverity CID 198451 Change-Id: Icd146ae512236a09cad080ed3eb85944e8f5cee4 --- M src/libmsc/msc_a.c M src/libmsc/msc_i.c M src/libmsc/msc_t.c 3 files changed, 10 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c index 675f932..5baed54 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -73,16 +73,22 @@ struct vlr_subscr *msc_a_vsub(const struct msc_a *msc_a) { + if (!msc_a) + return NULL; return msub_vsub(msc_a->c.msub); } struct msc_i *msc_a_msc_i(const struct msc_a *msc_a) { + if (!msc_a) + return NULL; return msub_msc_i(msc_a->c.msub); } struct msc_t *msc_a_msc_t(const struct msc_a *msc_a) { + if (!msc_a) + return NULL; return msub_msc_t(msc_a->c.msub); } diff --git a/src/libmsc/msc_i.c b/src/libmsc/msc_i.c index 6badba6..05df9cb 100644 --- a/src/libmsc/msc_i.c +++ b/src/libmsc/msc_i.c @@ -332,6 +332,8 @@ struct vlr_subscr *msc_i_vsub(const struct msc_i *msc_i) { + if (!msc_i) + return NULL; return msub_vsub(msc_i->c.msub); } diff --git a/src/libmsc/msc_t.c b/src/libmsc/msc_t.c index ec5531f..c6bba47 100644 --- a/src/libmsc/msc_t.c +++ b/src/libmsc/msc_t.c @@ -902,6 +902,8 @@ struct vlr_subscr *msc_t_vsub(const struct msc_t *msc_t) { + if (!msc_t) + return NULL; return msub_vsub(msc_t->c.msub); } -- To view, visit https://gerrit.osmocom.org/13939 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Icd146ae512236a09cad080ed3eb85944e8f5cee4 Gerrit-Change-Number: 13939 Gerrit-PatchSet: 2 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:04:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:04:53 +0000 Subject: Change in osmo-msc[master]: no HO call forwarding if no RTP stream In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13940 ) Change subject: no HO call forwarding if no RTP stream ...................................................................... no HO call forwarding if no RTP stream Fixes: coverity CID 198447 Related: OS#3992 (does not fix, just related) Change-Id: Ia223c2e20e625879ab71fc5c8afd0305fd224c58 --- M src/libmsc/msc_ho.c 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/libmsc/msc_ho.c b/src/libmsc/msc_ho.c index 9d130c5..3a4258c 100644 --- a/src/libmsc/msc_ho.c +++ b/src/libmsc/msc_ho.c @@ -552,6 +552,11 @@ return -EINVAL; } + if (!rtp_to_ran) { + msc_ho_failed(msc_a, GSM0808_CAUSE_EQUIPMENT_FAILURE, "Unexpected: no RTP stream is set up\n"); + return -EINVAL; + } + /* Backup old cell's RTP IP:port and codec data */ msc_a->ho.old_cell.ran_remote_rtp = rtp_to_ran->remote; msc_a->ho.old_cell.codec = rtp_to_ran->codec; -- To view, visit https://gerrit.osmocom.org/13940 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ia223c2e20e625879ab71fc5c8afd0305fd224c58 Gerrit-Change-Number: 13940 Gerrit-PatchSet: 2 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:04:54 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:04:54 +0000 Subject: Change in osmo-msc[master]: LOG_TRANS: store subsys in trans, unify USSD logging back to DMM In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13941 ) Change subject: LOG_TRANS: store subsys in trans, unify USSD logging back to DMM ...................................................................... LOG_TRANS: store subsys in trans, unify USSD logging back to DMM Instead of calling trans_log_subsys() for each LOG_TRANS() log line, rather store in trans->log_subsys once on trans_alloc() and use that. Do not fall back to the RAN's own subsystem (DBSSAP / DIUCS), it makes little sense and may cause logging to switch subsystems depending on the RAN state. In trans_log_subsys(), add missing switch cases: - Log silent call transactions also on CC. - Log USSD on DMM. About USSD: we currently have no dedicated USSD logging category. As a result, after LOG_TRANS() was introduced [1], USSD logged on DBSSAP/DIUCS or DMSC, depending on whether a RAN was associated with the trans or not. Before that change, USSD always logged on DMM, so, until we have a separate logging category for USSD, consistenly use DMM again. [1] in I2e60964d7a3c06d051debd1c707051a0eb3101ba / ff7074a0c7b62025473d8f1a950905ac2cb2f31c Related: coverity CID 198453 Change-Id: I6dfe5b98fb9e884c2dde61d603832dafceb12123 --- M include/osmocom/msc/transaction.h M src/libmsc/transaction.c M tests/msc_vlr/msc_vlr_test_ss.err 3 files changed, 18 insertions(+), 11 deletions(-) Approvals: Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/msc/transaction.h b/include/osmocom/msc/transaction.h index 99aca55..6b82390 100644 --- a/include/osmocom/msc/transaction.h +++ b/include/osmocom/msc/transaction.h @@ -27,7 +27,7 @@ ##args) #define LOG_TRANS(trans, level, fmt, args...) \ - LOG_TRANS_CAT(trans, trans_log_subsys(trans), level, fmt, ##args) + LOG_TRANS_CAT(trans, (trans)->log_subsys, level, fmt, ##args) enum bridge_state { BRIDGE_STATE_NONE, @@ -60,6 +60,8 @@ /* What kind of transaction */ enum trans_type type; + /* Which category to log on, for LOG_TRANS(). */ + int log_subsys; /* The current transaction ID */ uint8_t transaction_id; @@ -161,13 +163,17 @@ return DMSC; switch (trans->type) { case TRANS_CC: + case TRANS_SILENT_CALL: return DCC; case TRANS_SMS: return DLSMS; + case TRANS_USSD: + /* FIXME: traditionally (before LOG_TRANS() was added in I2e60964d7a3c06d051debd1c707051a0eb3101ba / + * ff7074a0c7b62025473d8f1a950905ac2cb2f31c), all USSD logging happened on DMM. Instead, it probably + * deserves its own logging subsystem. */ + return DMM; default: break; } - if (trans->msc_a) - return trans->msc_a->c.ran->log_subsys; return DMSC; } diff --git a/src/libmsc/transaction.c b/src/libmsc/transaction.c index b909cd8..d6f8c3b 100644 --- a/src/libmsc/transaction.c +++ b/src/libmsc/transaction.c @@ -146,6 +146,7 @@ .callref = callref, .net = net, }; + trans->log_subsys = trans_log_subsys(trans); vlr_subscr_get(vsub, trans_vsub_use(type)); llist_add_tail(&trans->entry, &net->trans_list); diff --git a/tests/msc_vlr/msc_vlr_test_ss.err b/tests/msc_vlr/msc_vlr_test_ss.err index 5592488..2030715 100644 --- a/tests/msc_vlr/msc_vlr_test_ss.err +++ b/tests/msc_vlr/msc_vlr_test_ss.err @@ -173,12 +173,12 @@ DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: RAN decode: DTAP DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: Dispatching 04.08 message: NCSS GSM0480_MTYPE_REGISTER DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + NCSS: now used by 3 (attached,active-conn,NCSS) -DMSC trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000001 tid-8) New transaction +DMM trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000001 tid-8) New transaction DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: + nc_ss: now used by 3 (cm_service_ss,rx_from_ms,nc_ss) DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: Received Event MSC_A_EV_TRANSACTION_ACCEPTED DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: state_chg to MSC_A_ST_COMMUNICATING DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: - cm_service_ss: now used by 2 (rx_from_ms,nc_ss) -DBSSAP trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ callref-0x20000001 tid-8) Received SS/USSD msg GSM0480_MTYPE_REGISTER +DMM trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ callref-0x20000001 tid-8) Received SS/USSD msg GSM0480_MTYPE_REGISTER GSUP --> HLR: OSMO_GSUP_MSGT_PROC_SS_REQUEST: 20010809710000004026f03004200000013101013515a11302010102013b300b04010f0406aa510c061b010a0103 DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: - rx_from_ms: now used by 1 (nc_ss) <-- GSUP rx OSMO_GSUP_MSGT_PROC_SS_REQUEST: 20010809710000004026f03004200000013101033527a225020101302002013b301b04010f0416d9775d0e2ae3e965f73cfd7683d27310cd06bbc51a0d0a0103 @@ -187,7 +187,7 @@ - DTAP --GERAN-A--> MS: GSM0480_MTYPE_RELEASE_COMPLETE: 8b2a1c27a225020101302002013b301b04010f0416d9775d0e2ae3e965f73cfd7683d27310cd06bbc51a0d - DTAP matches expected message DMSC dummy_msc_i(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST -DBSSAP trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ callref-0x20000001 tid-8) Freeing transaction +DMM trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ callref-0x20000001 tid-8) Freeing transaction DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - NCSS: now used by 3 (attached,active-conn,gsm0911_gsup_rx) DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: - nc_ss: now used by 0 (-) DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Received Event MSC_A_EV_UNUSED @@ -366,9 +366,9 @@ <-- GSUP rx OSMO_GSUP_MSGT_PROC_SS_REQUEST: 20010809710000004026f03004200001013101013515a11302010102013b300b04010f0406aa510c061b010a0103 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + gsm0911_gsup_rx: now used by 3 (attached,_test_ss_ussd_no,gsm0911_gsup_rx) DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + NCSS: now used by 4 (attached,_test_ss_ussd_no,gsm0911_gsup_rx,NCSS) -DMSC trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-255) New transaction -DMSC trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-255) Establishing network-originated session -DMSC trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-0) Triggering Paging Request +DMM trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-255) New transaction +DMM trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-255) Establishing network-originated session +DMM trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-0) Triggering Paging Request DPAG Paging: IMSI-901700000004620:MSISDN-46071 for GSM 09.11 SS/USSD: Starting paging paging request (SIGNALLING_HIGH_PRIO) to IMSI-901700000004620:MSISDN-46071 on GERAN-A strcmp(paging_expecting_imsi, vsub->imsi) == 0 @@ -433,7 +433,7 @@ DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: + rx_from_ms: now used by 2 (nc_ss,rx_from_ms) DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: RAN decode: DTAP DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: Dispatching 04.08 message: NCSS GSM0480_MTYPE_FACILITY -DBSSAP trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP callref-0x20000101 tid-0) Received SS/USSD msg GSM0480_MTYPE_FACILITY +DMM trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP callref-0x20000101 tid-0) Received SS/USSD msg GSM0480_MTYPE_FACILITY GSUP --> HLR: OSMO_GSUP_MSGT_PROC_SS_REQUEST: 20010809710000004026f03004200001013101023527a225020101302002013b301b04010f0416d9775d0e2ae3e965f73cfd7683d27310cd06bbc51a0d0a0103 DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: - rx_from_ms: now used by 1 (nc_ss) dtap_tx_confirmed == 1 @@ -444,7 +444,7 @@ - DTAP --GERAN-A--> MS: GSM0480_MTYPE_RELEASE_COMPLETE: 0b2a - DTAP matches expected message DMSC dummy_msc_i(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST -DBSSAP trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP callref-0x20000101 tid-0) Freeing transaction +DMM trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP callref-0x20000101 tid-0) Freeing transaction DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - NCSS: now used by 4 (attached,2*gsm0911_gsup_rx,active-conn) DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: - nc_ss: now used by 0 (-) DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: Received Event MSC_A_EV_UNUSED -- To view, visit https://gerrit.osmocom.org/13941 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I6dfe5b98fb9e884c2dde61d603832dafceb12123 Gerrit-Change-Number: 13941 Gerrit-PatchSet: 2 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:05:39 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:05:39 +0000 Subject: Change in osmo-msc[master]: add DUSSD logging category In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13942 ) Change subject: add DUSSD logging category ...................................................................... Patch Set 1: Code-Review-1 agree with vadim. It's also "DSS" in the HLR, IIRC -- To view, visit https://gerrit.osmocom.org/13942 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id7e04c9f5088334cd5ec6cfdb6a9b3a2a7e7fda0 Gerrit-Change-Number: 13942 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 10 May 2019 07:05:39 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:06:24 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:06:24 +0000 Subject: Change in libosmo-sccp[master]: osmo-stp: register VTY commands for talloc context introspection In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13954 ) Change subject: osmo-stp: register VTY commands for talloc context introspection ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13954 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id0789c4946929b783c54220de439958001f94992 Gerrit-Change-Number: 13954 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 10 May 2019 07:06:24 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:06:25 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:06:25 +0000 Subject: Change in libosmo-sccp[master]: osmo-stp: register VTY commands for talloc context introspection In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13954 ) Change subject: osmo-stp: register VTY commands for talloc context introspection ...................................................................... osmo-stp: register VTY commands for talloc context introspection Change-Id: Id0789c4946929b783c54220de439958001f94992 --- M stp/stp_main.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/stp/stp_main.c b/stp/stp_main.c index e7f4f38..aa77e61 100644 --- a/stp/stp_main.c +++ b/stp/stp_main.c @@ -180,6 +180,7 @@ osmo_ss7_vty_init_sg(tall_stp_ctx); osmo_sccp_vty_init(); osmo_fsm_vty_add_cmds(); + osmo_talloc_vty_add_cmds(); rc = vty_read_config_file(cmdline_config.config_file, NULL); if (rc < 0) { -- To view, visit https://gerrit.osmocom.org/13954 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id0789c4946929b783c54220de439958001f94992 Gerrit-Change-Number: 13954 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:07:01 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:07:01 +0000 Subject: Change in osmo-msc[master]: SMPP: Don't accept password or system-id exceeding spec length In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13930 ) Change subject: SMPP: Don't accept password or system-id exceeding spec length ...................................................................... SMPP: Don't accept password or system-id exceeding spec length The SMPP 3.4 specification defines the password field as a "Variable-length octet string with maximum length of 9", and according to table 3-1 this means including the terminating NUL-byte. However, OsmoMSC allows to configure longer passwords in the ESME configuration. Those passwords will then never match, as libsmpp34 performs length validation and generates a parser error for anyone trying to send a longer password via SMPP. The same applies for system-id, where we have to permit only 15 characters with zero termination, but not 16 characters. Change-Id: I81ef593e84bf1e15f6746386fc145495fae29354 Closes: OS#3166 --- M src/libmsc/smpp_smsc.h 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified Objections: Pau Espin Pedrol: I would prefer this is not merged as is diff --git a/src/libmsc/smpp_smsc.h b/src/libmsc/smpp_smsc.h index 1c9eae6..b26d011 100644 --- a/src/libmsc/smpp_smsc.h +++ b/src/libmsc/smpp_smsc.h @@ -13,8 +13,8 @@ #include #include -#define SMPP_SYS_ID_LEN 16 -#define SMPP_PASSWD_LEN 16 +#define SMPP_SYS_ID_LEN 15 +#define SMPP_PASSWD_LEN 8 #define MODE_7BIT 7 #define MODE_8BIT 8 -- To view, visit https://gerrit.osmocom.org/13930 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I81ef593e84bf1e15f6746386fc145495fae29354 Gerrit-Change-Number: 13930 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:07:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:07:33 +0000 Subject: Change in libosmocore[master]: Add MO-FALLBACK-VALUE SGsAP IE In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13952 ) Change subject: Add MO-FALLBACK-VALUE SGsAP IE ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13952 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia2460af9673818d375e28c67f1631b5f7eacdaeb Gerrit-Change-Number: 13952 Gerrit-PatchSet: 2 Gerrit-Owner: Omar Ramadan Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 10 May 2019 07:07:33 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:07:34 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:07:34 +0000 Subject: Change in libosmocore[master]: Add MO-FALLBACK-VALUE SGsAP IE In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13952 ) Change subject: Add MO-FALLBACK-VALUE SGsAP IE ...................................................................... Add MO-FALLBACK-VALUE SGsAP IE In testing against a particular EPC, the SGsAP-SERVICE-REQUEST can contain a MO fallback value TLV with T 0xF1 Change-Id: Ia2460af9673818d375e28c67f1631b5f7eacdaeb --- M include/osmocom/gsm/protocol/gsm_29_118.h M src/gsm/gsm29118.c 2 files changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmocom/gsm/protocol/gsm_29_118.h b/include/osmocom/gsm/protocol/gsm_29_118.h index cfe772a..9adb90f 100644 --- a/include/osmocom/gsm/protocol/gsm_29_118.h +++ b/include/osmocom/gsm/protocol/gsm_29_118.h @@ -73,6 +73,7 @@ SGSAP_IE_UE_EMM_MODE = 0x25, SGSAP_IE_ADDL_PAGING_INDICATORS = 0x26, SGSAP_IE_TMSI_BASED_NRI_CONT = 0x27, + SGSAP_IE_MO_FALLBACK_VALUE = 0xf1, }; extern const struct value_string sgsap_iei_names[]; static inline const char *sgsap_iei_name(enum sgsap_iei iei) { diff --git a/src/gsm/gsm29118.c b/src/gsm/gsm29118.c index 56e7473..2c02b2f 100644 --- a/src/gsm/gsm29118.c +++ b/src/gsm/gsm29118.c @@ -89,6 +89,7 @@ { SGSAP_IE_UE_EMM_MODE, "UE-EMM-MODE" }, { SGSAP_IE_ADDL_PAGING_INDICATORS, "ADDL-PAGING-INDICATORS" }, { SGSAP_IE_TMSI_BASED_NRI_CONT, "TMSI-BASED-NRI-CONT" }, + { SGSAP_IE_MO_FALLBACK_VALUE, "MO-FALLBACK-VALUE" }, { 0, NULL } }; @@ -179,6 +180,7 @@ [SGSAP_IE_UE_EMM_MODE] = { TLV_TYPE_TLV }, [SGSAP_IE_ADDL_PAGING_INDICATORS]={ TLV_TYPE_TLV }, [SGSAP_IE_TMSI_BASED_NRI_CONT] = { TLV_TYPE_TLV }, + [SGSAP_IE_MO_FALLBACK_VALUE] = { TLV_TYPE_TLV }, }, }; -- To view, visit https://gerrit.osmocom.org/13952 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ia2460af9673818d375e28c67f1631b5f7eacdaeb Gerrit-Change-Number: 13952 Gerrit-PatchSet: 3 Gerrit-Owner: Omar Ramadan Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:07:55 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:07:55 +0000 Subject: Change in osmo-ccid-firmware[master]: add debug command to communicate with card In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13943 ) Change subject: add debug command to communicate with card ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13943 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icbcde783143694afce23af6e3f26bcd7a9a13b85 Gerrit-Change-Number: 13943 Gerrit-PatchSet: 3 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 10 May 2019 07:07:55 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:08:03 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:08:03 +0000 Subject: Change in osmo-ccid-firmware[master]: add function to transfer TPDU In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13949 ) Change subject: add function to transfer TPDU ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13949 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I50c90f3697580a4c93220a3e09cc33ec85889814 Gerrit-Change-Number: 13949 Gerrit-PatchSet: 1 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 10 May 2019 07:08:03 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:08:06 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:08:06 +0000 Subject: Change in osmo-ccid-firmware[master]: finish implementing sim-iccid In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13950 ) Change subject: finish implementing sim-iccid ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13950 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I71b5832703a60c0c967fa2c6bc0eec56883962c5 Gerrit-Change-Number: 13950 Gerrit-PatchSet: 1 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 10 May 2019 07:08:06 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:08:07 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:08:07 +0000 Subject: Change in osmo-ccid-firmware[master]: add debug command to communicate with card In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13943 ) Change subject: add debug command to communicate with card ...................................................................... add debug command to communicate with card currently the sim-iccid command only selects MF. this is a proof of concept for card communication. the transmission/reception must be generalized to avoid copying the code multiple times. IMPORTANT: the sim-iccid commands only works after the sim-atr command, which sets up the cards correctly Change-Id: Icbcde783143694afce23af6e3f26bcd7a9a13b85 --- M sysmoOCTSIM/main.c 1 file changed, 145 insertions(+), 7 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index a895c14..11849c7 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -38,10 +38,28 @@ // TODO for now SIM7 is not present because used for debug static struct usart_async_descriptor* SIM_peripheral_descriptors[] = {&SIM0, &SIM1, &SIM2, &SIM3, &SIM4, &SIM5, &SIM6, NULL}; +/** number of bytes transmitted on the SIM peripheral */ +static volatile bool SIM_tx_count[8]; + static void SIM_rx_cb(const struct usart_async_descriptor *const io_descr) { } +/** called when the transmission is complete + * e.g. this is when the byte has been sent and there is no data to transmit anymore + */ +static void SIM_tx_cb(const struct usart_async_descriptor *const io_descr) +{ + // find slotnr for corresponding USART + uint8_t slotnr; + for (slotnr = 0; slotnr < ARRAY_SIZE(SIM_peripheral_descriptors) && SIM_peripheral_descriptors[slotnr] != io_descr; slotnr++); + + // set flag + if (slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)) { + SIM_tx_count[slotnr] = true; + } +} + /** possible clock sources for the SERCOM peripheral * warning: the definition must match the GCLK configuration */ @@ -80,6 +98,7 @@ continue; } usart_async_register_callback(SIM_peripheral_descriptors[i], USART_ASYNC_RXC_CB, SIM_rx_cb); // required for RX to work, even if the callback does nothing + usart_async_register_callback(SIM_peripheral_descriptors[i], USART_ASYNC_TXC_CB, SIM_tx_cb); // to count the number of bytes transmitted since we are using it asynchronously usart_async_enable(SIM_peripheral_descriptors[i]); } } @@ -360,7 +379,7 @@ // check if card is present (and read current settings) ncn8025_get(slotnr, &settings); if (!settings.simpres) { - printf("no card present in slot %d, aborting\r\n", slotnr); + printf("(%d) error: no card present\r\n", slotnr); return; } @@ -406,19 +425,19 @@ } // verify if one byte has been received if (!usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { - printf("card in slot %d is not responding, aborting\r\n", slotnr); + printf("(%d) error: card not responsive\r\n", slotnr); return; } // read ATR (just do it until there is no traffic anymore) - // TODO the ATR should be parsed to read the right number of bytes + // TODO the ATR should be parsed to read the right number of bytes, instead we just wait until to end of WT printf("(%d) ATR: ", slotnr); uint8_t atr_byte; while (usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { if (1 == io_read(&SIM_peripheral_descriptors[slotnr]->io, &atr_byte, 1)) { printf("%02x ", atr_byte); } - uint16_t wt = 9600; // waiting time in ETU + uint16_t wt = ISO7816_3_DEFAULT_WT; // waiting time in ETU while (wt && !usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) wt--; @@ -426,9 +445,127 @@ } printf("\r\n"); - /* disable VCC and LED, re-enable RST */ - settings.cmdvcc = false; - settings.rstin = true; + /* disable LED */ + settings.led = false; + ncn8025_set(slotnr, &settings); +} + +DEFUN(sim_iccid, cmd_sim_iccid, "sim-iccid", "Read ICCID from SIM card") +{ + struct ncn8025_settings settings; + int slotnr = validate_slotnr(argc, argv, 1); + + if (slotnr < 0 || slotnr >= ARRAY_SIZE(SIM_peripheral_descriptors) || NULL == SIM_peripheral_descriptors[slotnr]) { + return; + } + + // read current settings and check if card is present and powered + ncn8025_get(slotnr, &settings); + if (!settings.simpres) { + printf("(%d) error: no card present\r\n", slotnr); + return; + } + if (!settings.cmdvcc) { + printf("(%d) error: card not powered\r\n", slotnr); + return; + } + if (settings.rstin) { + printf("(%d) error: card under reset\r\n", slotnr); + return; + } + + // enable LED + if (!settings.led) { + settings.led = true; + ncn8025_set(slotnr, &settings); + } + + // read MF + printf("(%d) SELECT MF: ", slotnr); + struct usart_async_descriptor* sim = SIM_peripheral_descriptors[slotnr]; + ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 0; + usart_async_flush_rx_buffer(sim); // flush RX buffer to start from scratch + // write SELECT MF APDU + const uint8_t select_mf[] = {0xa0, 0xa4, 0x00, 0x00, 0x02, 0x3f, 0x00}; + SIM_tx_count[slotnr] = false; // reset TX complete + for (uint8_t i = 0; i < 5; i++) { // transmit command header + printf("%02x ", select_mf[i]); + while(!usart_async_is_tx_empty(sim)); // wait for previous byte to be transmitted (WARNING could block) + if (1 != io_write(&sim->io, &select_mf[i], 1)) { + printf("(%d) error: could not send command header\r\n", slotnr); + return; + } + } + uint16_t wt = ISO7816_3_DEFAULT_WT; // waiting time in ETU (actually it can be a lot more after the ATR, but we use the default) + while (wt && !SIM_tx_count[slotnr]) { // wait until transmission is complete + delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) + wt--; + } + if (0 == wt) { // timeout reached + printf("(%d) error: could not transmit data\r\n", slotnr); + return; + } + ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 1; + //usart_async_flush_rx_buffer(sim); // flush RX buffer to start from scratch + wt = ISO7816_3_DEFAULT_WT; // reset waiting time + while (wt && !usart_async_is_rx_not_empty(sim)) { // wait for procedure byte + delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) + wt--; + } + if (0 == wt) { // timeout reached + printf("(%d) error: card not responsive\r\n", slotnr); + return; + } + uint8_t pb; + if (1 != io_read(&sim->io, &pb, 1)) { // read procedure byte + printf("(%d) error: could not read data\r\n", slotnr); + return; + } + if (select_mf[1] != pb) { // the header is ACKed when the procedure by is equal to the instruction byte + printf("(%d) error: header NACKed\r\n", slotnr); + return; + } + SIM_tx_count[slotnr] = false; // reset TX complete + for (uint8_t i = 5; i < 7; i++) { // transmit command data + printf("%02x ", select_mf[i]); + while(!usart_async_is_tx_empty(sim)); // wait for previous byte to be transmitted (WARNING could block) + if (1 != io_write(&sim->io, &select_mf[i], 1)) { + printf("(%d) error: could not send command data\r\n", slotnr); + return; + } + } + wt = ISO7816_3_DEFAULT_WT; // waiting time in ETU (actually it can be a lot more after the ATR, but we use the default) + while (wt && !SIM_tx_count[slotnr]) { // wait until transmission is complete + delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) + wt--; + } + if (0 == wt) { // timeout reached + printf("(%d) error: could not transmit data\r\n", slotnr); + return; + } + usart_async_flush_rx_buffer(sim); // flush RX buffer to start from scratch + // read SW + uint8_t sw[2]; // to read the status words + wt = ISO7816_3_DEFAULT_WT; // waiting time in ETU (actually it can be a lot more after the ATR, but we use the default) + for (uint8_t i = 0; i < ARRAY_SIZE(sw); i++) { + while (wt && !usart_async_is_rx_not_empty(sim)) { + delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) + wt--; + } + if (0 == wt) { // timeout reached + printf("(%d) error: card not responsive\r\n", slotnr); + } else { + if (1 != io_read(&sim->io, &sw[i], 1)) { // read SW + printf("(%d) error: could not read data\r\n", slotnr); + return; + } + printf("%02x ", sw[i]); + wt = ISO7816_3_DEFAULT_WT; // reset WT + } + } + printf("\r\n"); + + // disable LED settings.led = false; ncn8025_set(slotnr, &settings); } @@ -450,6 +587,7 @@ command_register(&cmd_sim_voltage); command_register(&cmd_sim_led); command_register(&cmd_sim_atr); + command_register(&cmd_sim_iccid); testmode_init(); printf("\r\n\r\nsysmocom sysmoOCTSIM\r\n"); -- To view, visit https://gerrit.osmocom.org/13943 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Icbcde783143694afce23af6e3f26bcd7a9a13b85 Gerrit-Change-Number: 13943 Gerrit-PatchSet: 3 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:08:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:08:09 +0000 Subject: Change in osmo-ccid-firmware[master]: add function to transfer TPDU In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13949 ) Change subject: add function to transfer TPDU ...................................................................... add function to transfer TPDU this function takes care of reading and writing the complete TPDU to the card. note: the sim-iccid command uses this function, but still only to select MF. Change-Id: I50c90f3697580a4c93220a3e09cc33ec85889814 --- M sysmoOCTSIM/main.c 1 file changed, 184 insertions(+), 83 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 11849c7..327ac6d 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -226,7 +226,183 @@ // set baud rate uint32_t baudrate = (freq * d) / f; // calculate actual baud rate - return slot_set_baudrate(slotnr, baudrate); // // set baud rate + return slot_set_baudrate(slotnr, baudrate); // set baud rate +} + +/** write data to card + * @param[in] slotnr slot number on which to send data + * @param[in] data data to be transmitted + * @param[in] length length of data to be transmitted + * @return error code + */ +static int slot_card_write(uint8_t slotnr, const uint8_t* data, uint16_t length) +{ + // input checks + ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); + if (0 == length || NULL == data) { + return ERR_INVALID_ARG; + } + + struct usart_async_descriptor* sim = SIM_peripheral_descriptors[slotnr]; + ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 0; // disable receive (to avoid the echo back) + SIM_tx_count[slotnr] = false; // reset TX complete + for (uint16_t i = 0; i < length; i++) { // transmit data + while(!usart_async_is_tx_empty(sim)); // wait for previous byte to be transmitted (WARNING blocking) + if (1 != io_write(&sim->io, &data[i], 1)) { // put but in transmit buffer + return ERR_IO; + } + } + while (!SIM_tx_count[slotnr]); // wait until transmission is complete (WARNING blocking) + ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 1; // enable receive again + + return ERR_NONE; +} + +/** read data from card + * @param[in] slotnr slot number on which to send data + * @param[out] data buffer for read data to be stored + * @param[in] length length of data to be read + * @param[in] wt Waiting Time in ETU + * @return error code + * TODO fix WT/ETU duration + */ +static int slot_card_read(uint8_t slotnr, uint8_t* data, uint16_t length, uint32_t wt) +{ + // input checks + ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); + if (0 == length || NULL == data) { + return ERR_INVALID_ARG; + } + + struct usart_async_descriptor* sim = SIM_peripheral_descriptors[slotnr]; + + ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 1; // ensure RX is enabled + uint32_t timeout = wt; // reset waiting time + for (uint16_t i = 0; i < length; i++) { // read all data + while (timeout && !usart_async_is_rx_not_empty(sim)) { // verify if data is present + delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) + timeout--; + } + if (0 == timeout) { // timeout reached + return ERR_TIMEOUT; + } + timeout = wt; // reset waiting time + if (1 != io_read(&sim->io, &data[i], 1)) { // read one byte + return ERR_IO; + } + } + + return ERR_NONE; +} + +/** transfer TPDU + * @param[in] slotnr slot number on which to transfer the TPDU + * @param[in] header TPDU header to send + * @param[io] data TPDU data to transfer + * @param[in] data_length length of TPDU data to transfer + * @param[in] write if the data should be written (true) or read (false) + * TODO fix WT + * TODO the data length can be deduce from the header + */ +static int slot_tpdu_xfer(uint8_t slotnr, const uint8_t* header, uint8_t* data, uint16_t data_length, bool write) +{ + // input checks + ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); + if (NULL == header || (data_length > 0 && NULL == data)) { + return ERR_INVALID_ARG; + } + + int rc; + struct usart_async_descriptor* sim = SIM_peripheral_descriptors[slotnr]; // get USART peripheral + usart_async_flush_rx_buffer(sim); // flush RX buffer to start from scratch + + // send command header + printf("(%d) TPDU: ", slotnr); + for (uint8_t i = 0; i < 5; i++) { + printf("%02x ", header[i]); + } + rc = slot_card_write(slotnr, header, 5); // transmit header + if (ERR_NONE != rc) { + printf("error in command header transmit (errno = %d)\r\n", rc); + return rc; + } + + // read procedure byte, and handle data + uint8_t pb = 0x60; // wait more procedure byte + uint16_t data_i = 0; // progress in the data transfer + while (0x60 == pb) { // wait for SW + rc = slot_card_read(slotnr, &pb, 1, ISO7816_3_DEFAULT_WT); + if (ERR_NONE != rc) { + printf("error while receiving PB/SW1 (errno = %d)\r\n", rc); + return rc; + } + printf("%02x ", pb); + if (0x60 == pb) { // NULL byte + // just wait more time + } else if ((0x60 == (pb & 0xf0)) || (0x90 == (pb & 0xf0))) { // SW1 byte + // left the rest of the code handle it + } else if (header[1] == pb) { // ACK byte + // transfer rest of the data + if (data_i >= data_length) { + printf("error no more data to transfer\r\n"); + return ERR_INVALID_DATA; + } + if (write) { // transmit remaining command data + rc = slot_card_write(slotnr, &data[data_i], data_length - data_i); // transmit command data + if (ERR_NONE != rc) { + printf("error in command data transmit (errno = %d)\r\n", rc); + return rc; + } + } else { // receive remaining command data + rc = slot_card_read(slotnr, &data[data_i], data_length - data_i, ISO7816_3_DEFAULT_WT); + if (ERR_NONE != rc) { + printf("error in command data receive (errno = %d)\r\n", rc); + return rc; + } + } + for (uint16_t i = data_i; i < data_length; i++) { + printf("%02x ", data[i]); + } + data_i = data_length; // remember we transferred the data + pb = 0x60; // wait for SW1 + } else if (header[1] == (pb ^ 0xff)) { // ACK byte + // transfer only one byte + if (data_i >= data_length) { + printf("error no more data to transfer\r\n"); + return ERR_INVALID_DATA; + } + if (write) { // transmit command data byte + rc = slot_card_write(slotnr, &data[data_i], 1); // transmit command data + if (ERR_NONE != rc) { + printf("error in command data transmit (errno = %d)\r\n", rc); + return rc; + } + } else { // receive command data byte + rc = slot_card_read(slotnr, &data[data_i], 1, ISO7816_3_DEFAULT_WT); + if (ERR_NONE != rc) { + printf("error in command data receive (errno = %d)\r\n", rc); + return rc; + } + } + printf("%02x ", data[data_i]); + data_i += 1; // remember we transferred one data byte + pb = 0x60; // wait for SW1 + } else { // invalid byte + return ERR_INVALID_DATA; + } + } + + // read SW2 + uint8_t sw2; + rc = slot_card_read(slotnr, &sw2, 1, ISO7816_3_DEFAULT_WT); + if (ERR_NONE != rc) { + printf("error in receiving SW2 (errno = %d)\r\n", rc); + return rc; + } + printf("%02x", sw2); + + printf("\r\n"); + return ERR_NONE; } DEFUN(sim_status, cmd_sim_status, "sim-status", "Get state of specified NCN8025") @@ -480,90 +656,15 @@ ncn8025_set(slotnr, &settings); } - // read MF - printf("(%d) SELECT MF: ", slotnr); - struct usart_async_descriptor* sim = SIM_peripheral_descriptors[slotnr]; - ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 0; - usart_async_flush_rx_buffer(sim); // flush RX buffer to start from scratch + // select MF + printf("(%d) SELECT MF\r\n", slotnr); // write SELECT MF APDU - const uint8_t select_mf[] = {0xa0, 0xa4, 0x00, 0x00, 0x02, 0x3f, 0x00}; - SIM_tx_count[slotnr] = false; // reset TX complete - for (uint8_t i = 0; i < 5; i++) { // transmit command header - printf("%02x ", select_mf[i]); - while(!usart_async_is_tx_empty(sim)); // wait for previous byte to be transmitted (WARNING could block) - if (1 != io_write(&sim->io, &select_mf[i], 1)) { - printf("(%d) error: could not send command header\r\n", slotnr); - return; - } + const uint8_t select_mf_header[] = {0xa0, 0xa4, 0x00, 0x00, 0x02}; + const uint8_t select_mf_data[] = {0x3f, 0x00}; + int rc = slot_tpdu_xfer(slotnr, select_mf_header, (uint8_t*)select_mf_data, ARRAY_SIZE(select_mf_data), true); // transfer TPDU + if (ERR_NONE != rc) { + printf("error while SELECT MF (errno = %d)\r\n", rc); } - uint16_t wt = ISO7816_3_DEFAULT_WT; // waiting time in ETU (actually it can be a lot more after the ATR, but we use the default) - while (wt && !SIM_tx_count[slotnr]) { // wait until transmission is complete - delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) - wt--; - } - if (0 == wt) { // timeout reached - printf("(%d) error: could not transmit data\r\n", slotnr); - return; - } - ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 1; - //usart_async_flush_rx_buffer(sim); // flush RX buffer to start from scratch - wt = ISO7816_3_DEFAULT_WT; // reset waiting time - while (wt && !usart_async_is_rx_not_empty(sim)) { // wait for procedure byte - delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) - wt--; - } - if (0 == wt) { // timeout reached - printf("(%d) error: card not responsive\r\n", slotnr); - return; - } - uint8_t pb; - if (1 != io_read(&sim->io, &pb, 1)) { // read procedure byte - printf("(%d) error: could not read data\r\n", slotnr); - return; - } - if (select_mf[1] != pb) { // the header is ACKed when the procedure by is equal to the instruction byte - printf("(%d) error: header NACKed\r\n", slotnr); - return; - } - SIM_tx_count[slotnr] = false; // reset TX complete - for (uint8_t i = 5; i < 7; i++) { // transmit command data - printf("%02x ", select_mf[i]); - while(!usart_async_is_tx_empty(sim)); // wait for previous byte to be transmitted (WARNING could block) - if (1 != io_write(&sim->io, &select_mf[i], 1)) { - printf("(%d) error: could not send command data\r\n", slotnr); - return; - } - } - wt = ISO7816_3_DEFAULT_WT; // waiting time in ETU (actually it can be a lot more after the ATR, but we use the default) - while (wt && !SIM_tx_count[slotnr]) { // wait until transmission is complete - delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) - wt--; - } - if (0 == wt) { // timeout reached - printf("(%d) error: could not transmit data\r\n", slotnr); - return; - } - usart_async_flush_rx_buffer(sim); // flush RX buffer to start from scratch - // read SW - uint8_t sw[2]; // to read the status words - wt = ISO7816_3_DEFAULT_WT; // waiting time in ETU (actually it can be a lot more after the ATR, but we use the default) - for (uint8_t i = 0; i < ARRAY_SIZE(sw); i++) { - while (wt && !usart_async_is_rx_not_empty(sim)) { - delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) - wt--; - } - if (0 == wt) { // timeout reached - printf("(%d) error: card not responsive\r\n", slotnr); - } else { - if (1 != io_read(&sim->io, &sw[i], 1)) { // read SW - printf("(%d) error: could not read data\r\n", slotnr); - return; - } - printf("%02x ", sw[i]); - wt = ISO7816_3_DEFAULT_WT; // reset WT - } - } - printf("\r\n"); // disable LED settings.led = false; -- To view, visit https://gerrit.osmocom.org/13949 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I50c90f3697580a4c93220a3e09cc33ec85889814 Gerrit-Change-Number: 13949 Gerrit-PatchSet: 1 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:08:10 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:08:10 +0000 Subject: Change in osmo-ccid-firmware[master]: finish implementing sim-iccid In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13950 ) Change subject: finish implementing sim-iccid ...................................................................... finish implementing sim-iccid Change-Id: I71b5832703a60c0c967fa2c6bc0eec56883962c5 --- M sysmoOCTSIM/main.c 1 file changed, 38 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 327ac6d..6ab8bc8 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -658,13 +658,47 @@ // select MF printf("(%d) SELECT MF\r\n", slotnr); - // write SELECT MF APDU - const uint8_t select_mf_header[] = {0xa0, 0xa4, 0x00, 0x00, 0x02}; - const uint8_t select_mf_data[] = {0x3f, 0x00}; - int rc = slot_tpdu_xfer(slotnr, select_mf_header, (uint8_t*)select_mf_data, ARRAY_SIZE(select_mf_data), true); // transfer TPDU + const uint8_t select_header[] = {0xa0, 0xa4, 0x00, 0x00, 0x02}; // see TS 102.221 sec. 11.1.1 + const uint8_t select_data_mf[] = {0x3f, 0x00}; // see TS 102.221 sec. 13.1 + int rc = slot_tpdu_xfer(slotnr, select_header, (uint8_t*)select_data_mf, ARRAY_SIZE(select_data_mf), true); // transfer TPDU if (ERR_NONE != rc) { printf("error while SELECT MF (errno = %d)\r\n", rc); } + // ignore response data + + // select EF_ICCID + printf("(%d) SELECT EF_ICCID\r\n", slotnr); + const uint8_t select_data_ef_iccid[] = {0x2f, 0xe2}; // see TS 102.221 sec. 13.2 + rc = slot_tpdu_xfer(slotnr, select_header, (uint8_t*)select_data_ef_iccid, ARRAY_SIZE(select_data_ef_iccid), true); // transfer TPDU + if (ERR_NONE != rc) { + printf("error while SELECT EF_ICCID (errno = %d)\r\n", rc); + } + // ignore response data + + // read EF_ICCID + printf("(%d) READ EF_ICCID\r\n", slotnr); + uint8_t iccid[10]; + uint8_t read_binary[] = {0xa0, 0xb0, 0x00, 0x00, ARRAY_SIZE(iccid)}; // see TS 102.221 sec. 11.1.3 + rc = slot_tpdu_xfer(slotnr, read_binary, iccid, ARRAY_SIZE(iccid), false); // transfer TPDU + if (ERR_NONE != rc) { + printf("error while READ ICCID (errno = %d)\r\n", rc); + } + // ignore response data + + printf("(%d) ICCID: ", slotnr); + for (uint8_t i = 0; i < ARRAY_SIZE(iccid); i++) { + uint8_t nibble = iccid[i] & 0xf; + if (0xf == nibble) { + break; + } + printf("%x", nibble); + nibble = iccid[i] >> 4; + if (0xf == nibble) { + break; + } + printf("%x", nibble); + } + printf("\r\n"); // disable LED settings.led = false; -- To view, visit https://gerrit.osmocom.org/13950 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I71b5832703a60c0c967fa2c6bc0eec56883962c5 Gerrit-Change-Number: 13950 Gerrit-PatchSet: 1 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:08:58 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:08:58 +0000 Subject: Change in osmo-bts[master]: Remove 11-bit RACH support from 'Known Limitations' In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/5833 ) Change subject: Remove 11-bit RACH support from 'Known Limitations' ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/5833 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I091f4fbd52c29c7d56ca392b8a1b872609829d81 Gerrit-Change-Number: 5833 Gerrit-PatchSet: 2 Gerrit-Owner: Alexander Huemer Gerrit-Assignee: fixeria Gerrit-Reviewer: Alexander Huemer Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Alexander Chemeris Gerrit-CC: fixeria Gerrit-Comment-Date: Fri, 10 May 2019 07:08:58 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:09:02 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:09:02 +0000 Subject: Change in osmo-bts[master]: Remove 11-bit RACH support from 'Known Limitations' In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/5833 ) Change subject: Remove 11-bit RACH support from 'Known Limitations' ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5833 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I091f4fbd52c29c7d56ca392b8a1b872609829d81 Gerrit-Change-Number: 5833 Gerrit-PatchSet: 2 Gerrit-Owner: Alexander Huemer Gerrit-Assignee: fixeria Gerrit-Reviewer: Alexander Huemer Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Alexander Chemeris Gerrit-CC: fixeria Gerrit-Comment-Date: Fri, 10 May 2019 07:09:02 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:09:06 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:09:06 +0000 Subject: Change in osmo-bts[master]: README.md: remove OS#1865 from 'Known limitations' In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13741 ) Change subject: README.md: remove OS#1865 from 'Known limitations' ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13741 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibc9db360be1380abaa9eef4bdf6e9a6d251670da Gerrit-Change-Number: 13741 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Alexander Chemeris Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 10 May 2019 07:09:06 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:09:07 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:09:07 +0000 Subject: Change in osmo-bts[master]: Remove 11-bit RACH support from 'Known Limitations' In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/5833 ) Change subject: Remove 11-bit RACH support from 'Known Limitations' ...................................................................... Remove 11-bit RACH support from 'Known Limitations' Support for extended (11-bit) RACH has been implemented: - in libosmocoding: I85a34a82d5cd39a594ee89d91a2338226066ab5d, - and OsmoBTS: Ia28741603636406744e5e22ffff1fb7a9689955a. We also have a TTCN-3 test case called TC_pcu_ext_rach_content, see I8fe156aeac9de3dc1e71a4950821d4942ba9a253. Change-Id: I091f4fbd52c29c7d56ca392b8a1b872609829d81 --- M README.md 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, approved Jenkins Builder: Verified diff --git a/README.md b/README.md index 38b4bd9..01ec0ff 100644 --- a/README.md +++ b/README.md @@ -123,4 +123,3 @@ * TCH/F_PDCH cannel not working as voice (https://osmocom.org/issues/1865) * No BER value delivered to OsmoPCU (https://osmocom.org/issues/1855) - * No 11bit RACH support (https://osmocom.org/issues/1854) -- To view, visit https://gerrit.osmocom.org/5833 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I091f4fbd52c29c7d56ca392b8a1b872609829d81 Gerrit-Change-Number: 5833 Gerrit-PatchSet: 3 Gerrit-Owner: Alexander Huemer Gerrit-Assignee: fixeria Gerrit-Reviewer: Alexander Huemer Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Alexander Chemeris Gerrit-CC: fixeria -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:09:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:09:09 +0000 Subject: Change in osmo-bts[master]: README.md: remove OS#1865 from 'Known limitations' In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13741 ) Change subject: README.md: remove OS#1865 from 'Known limitations' ...................................................................... README.md: remove OS#1865 from 'Known limitations' Neither the bug has been reproduced, nor the bug reporter did respond to request for configuration files. Change-Id: Ibc9db360be1380abaa9eef4bdf6e9a6d251670da --- M README.md 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, approved Pau Espin Pedrol: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/README.md b/README.md index 01ec0ff..b1d7961 100644 --- a/README.md +++ b/README.md @@ -121,5 +121,4 @@ osmo-bts-trx ------------ - * TCH/F_PDCH cannel not working as voice (https://osmocom.org/issues/1865) * No BER value delivered to OsmoPCU (https://osmocom.org/issues/1855) -- To view, visit https://gerrit.osmocom.org/13741 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ibc9db360be1380abaa9eef4bdf6e9a6d251670da Gerrit-Change-Number: 13741 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Alexander Chemeris Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:09:14 2019 From: gerrit-no-reply at lists.osmocom.org (Mykola Shchetinin) Date: Fri, 10 May 2019 07:09:14 +0000 Subject: Change in osmo-sgsn[master]: gprs_gmm: send Service Reject when no PDP ctxs are available. In-Reply-To: References: Message-ID: Hello lynxis lazus, Pau Espin Pedrol, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13744 to look at the new patch set (#8). Change subject: gprs_gmm: send Service Reject when no PDP ctxs are available. ...................................................................... gprs_gmm: send Service Reject when no PDP ctxs are available. Look at PDP Context Status IE: if there are any PDP contexts which are ACTIVE on MS side and there are no PDP contexts which are ACTIVE on the network side, then send Service Reject with the cause "NO PDP ACTIVATED". This forces MS to reactivate the PDP contexts. 3GPP TS 24.008 Section 4.7.13.4 Service request procedure not accepted by the network. Cause # 40. Fixes: OS#3937 Change-Id: If610cbef17c25ec44e65d4f1b2340d102c560437 --- M src/gprs/gprs_gmm.c M tests/sgsn/sgsn_test.c M tests/sgsn/sgsn_test.ok 3 files changed, 42 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/44/13744/8 -- To view, visit https://gerrit.osmocom.org/13744 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: If610cbef17c25ec44e65d4f1b2340d102c560437 Gerrit-Change-Number: 13744 Gerrit-PatchSet: 8 Gerrit-Owner: Mykola Shchetinin Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Mykola Shchetinin Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:09:30 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:09:30 +0000 Subject: Change in libosmocore[master]: Fix osmo_quote_str_c() for strings larger than 32 bytes In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13901 ) Change subject: Fix osmo_quote_str_c() for strings larger than 32 bytes ...................................................................... Fix osmo_quote_str_c() for strings larger than 32 bytes As Neels pointed out, we shouldn't pass a constant value of 32 to osmo_quote_str_buf2(). Change-Id: Id9bde14166d6674ce4dda36fa9f4ae9217ce5cc2 --- M src/utils.c 1 file changed, 13 insertions(+), 2 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Mykola Shchetinin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/utils.c b/src/utils.c index b66721e..59dc816 100644 --- a/src/utils.c +++ b/src/utils.c @@ -813,10 +813,21 @@ */ char *osmo_quote_str_c(const void *ctx, const char *str, int in_len) { - char *buf = talloc_size(ctx, OSMO_MAX(in_len+2, 32)); + size_t len = in_len == -1 ? strlen(str) : in_len; + char *buf; + + /* account for two quote characters + terminating NUL */ + len += 3; + + /* some minimum length for things like "NULL" or "(error)" */ + if (len < 32) + len = 32; + + buf = talloc_size(ctx, len); if (!buf) return NULL; - return osmo_quote_str_buf2(buf, 32, str, in_len); + + return osmo_quote_str_buf2(buf, len, str, in_len); } /*! perform an integer square root operation on unsigned 32bit integer. -- To view, visit https://gerrit.osmocom.org/13901 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id9bde14166d6674ce4dda36fa9f4ae9217ce5cc2 Gerrit-Change-Number: 13901 Gerrit-PatchSet: 6 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Mykola Shchetinin Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:09:52 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:09:52 +0000 Subject: Change in libosmocore[master]: Print error message if application fails to call rate_ctr_init() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13919 ) Change subject: Print error message if application fails to call rate_ctr_init() ...................................................................... Print error message if application fails to call rate_ctr_init() Change-Id: Ie8093b66b7e27cf863d2558fe21b2c6e0f3fcdfd Closes: OS#3580 --- M src/rate_ctr.c 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/rate_ctr.c b/src/rate_ctr.c index 026670b..99ec523 100644 --- a/src/rate_ctr.c +++ b/src/rate_ctr.c @@ -69,7 +69,7 @@ #include static LLIST_HEAD(rate_ctr_groups); - +static struct osmo_timer_list rate_ctr_timer; static void *tall_rate_ctr_ctx; @@ -217,6 +217,10 @@ unsigned int size; struct rate_ctr_group *group; + if (!osmo_timer_pending(&rate_ctr_timer)) + LOGP(DLGLOBAL, LOGL_ERROR, "your program appears to use libosmocore rate_ctr " + "without calling rate_ctr_init() at start-up. Rate counters won't work!\n"); + if (rate_ctr_get_group_by_name_idx(desc->group_name_prefix, idx)) { unsigned int new_idx = rate_ctr_get_unused_name_idx(desc->group_name_prefix); LOGP(DLGLOBAL, LOGL_ERROR, "counter group '%s' already exists for index %u," @@ -294,7 +298,6 @@ ctr->intv[intv+1].rate += ctr->intv[intv].rate; } -static struct osmo_timer_list rate_ctr_timer; static uint64_t timer_ticks; /* The one-second interval has expired */ -- To view, visit https://gerrit.osmocom.org/13919 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie8093b66b7e27cf863d2558fe21b2c6e0f3fcdfd Gerrit-Change-Number: 13919 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:09:59 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:09:59 +0000 Subject: Change in libosmocore[master]: gsm0808_utils: Introduce gsm0808_msgb_put_cell_id_u() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13887 ) Change subject: gsm0808_utils: Introduce gsm0808_msgb_put_cell_id_u() ...................................................................... gsm0808_utils: Introduce gsm0808_msgb_put_cell_id_u() This function is doing the bulk work of encoding a given Cell ID List item. gsm0808_enc_cell_id_list2() is modified to be a wrapper / loop around the new function. The purpose of this is to expose Cell ID List Entry encoding so that the upcoming CBSP protocol encoder can re-use this code. Related: OS#3537 Change-Id: I6cc567798e20365e6587e6b2988e834306d8c80c --- M include/osmocom/gsm/gsm0808_utils.h M src/gsm/gsm0808_utils.c M src/gsm/libosmogsm.map 3 files changed, 44 insertions(+), 41 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/gsm/gsm0808_utils.h b/include/osmocom/gsm/gsm0808_utils.h index 47c4e95..3a7beb7 100644 --- a/include/osmocom/gsm/gsm0808_utils.h +++ b/include/osmocom/gsm/gsm0808_utils.h @@ -93,6 +93,7 @@ void gsm0808_cell_id_from_cgi(struct gsm0808_cell_id *cid, enum CELL_IDENT id_discr, const struct osmo_cell_global_id *cgi); int gsm0808_cell_id_to_cgi(struct osmo_cell_global_id *cgi, const struct gsm0808_cell_id *cid); +void gsm0808_msgb_put_cell_id_u(struct msgb *msg, enum CELL_IDENT id_discr, const union gsm0808_cell_id_u *u); uint8_t gsm0808_enc_cause(struct msgb *msg, uint16_t cause); uint8_t gsm0808_enc_aoip_trasp_addr(struct msgb *msg, diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c index 99cf188..e825930 100644 --- a/src/gsm/gsm0808_utils.c +++ b/src/gsm/gsm0808_utils.c @@ -737,6 +737,46 @@ return (int)(elem - old_elem); } +void gsm0808_msgb_put_cell_id_u(struct msgb *msg, enum CELL_IDENT id_discr, const union gsm0808_cell_id_u *u) +{ + switch (id_discr) { + case CELL_IDENT_WHOLE_GLOBAL: { + const struct osmo_cell_global_id *id = &u->global; + struct gsm48_loc_area_id lai; + gsm48_generate_lai2(&lai, &id->lai); + memcpy(msgb_put(msg, sizeof(lai)), &lai, sizeof(lai)); + msgb_put_u16(msg, id->cell_identity); + break; + } + case CELL_IDENT_LAC_AND_CI: { + const struct osmo_lac_and_ci_id *id = &u->lac_and_ci; + msgb_put_u16(msg, id->lac); + msgb_put_u16(msg, id->ci); + break; + } + case CELL_IDENT_CI: + msgb_put_u16(msg, u->ci); + break; + case CELL_IDENT_LAI_AND_LAC: { + const struct osmo_location_area_id *id = &u->lai_and_lac; + struct gsm48_loc_area_id lai; + gsm48_generate_lai2(&lai, id); + memcpy(msgb_put(msg, sizeof(lai)), &lai, sizeof(lai)); + break; + } + case CELL_IDENT_LAC: + msgb_put_u16(msg, u->lac); + break; + case CELL_IDENT_BSS: + case CELL_IDENT_NO_CELL: + /* Does not have any list items */ + break; + default: + /* Support for other identifier list types is not implemented. */ + OSMO_ASSERT(false); + } +} + /*! Encode TS 08.08 Cell Identifier List IE * \param[out] msg Message Buffer to which IE is to be appended * \param[in] cil Cell ID List to be encoded @@ -758,47 +798,8 @@ msgb_put_u8(msg, cil->id_discr & 0x0f); OSMO_ASSERT(cil->id_list_len <= GSM0808_CELL_ID_LIST2_MAXLEN) - switch (cil->id_discr) { - case CELL_IDENT_WHOLE_GLOBAL: - for (i = 0; i < cil->id_list_len; i++) { - const struct osmo_cell_global_id *id = &cil->id_list[i].global; - struct gsm48_loc_area_id lai; - gsm48_generate_lai2(&lai, &id->lai); - memcpy(msgb_put(msg, sizeof(lai)), &lai, sizeof(lai)); - msgb_put_u16(msg, id->cell_identity); - } - break; - case CELL_IDENT_LAC_AND_CI: - for (i = 0; i < cil->id_list_len; i++) { - const struct osmo_lac_and_ci_id *id = &cil->id_list[i].lac_and_ci; - msgb_put_u16(msg, id->lac); - msgb_put_u16(msg, id->ci); - } - break; - case CELL_IDENT_CI: - for (i = 0; i < cil->id_list_len; i++) - msgb_put_u16(msg, cil->id_list[i].ci); - break; - case CELL_IDENT_LAI_AND_LAC: - for (i = 0; i < cil->id_list_len; i++) { - const struct osmo_location_area_id *id = &cil->id_list[i].lai_and_lac; - struct gsm48_loc_area_id lai; - gsm48_generate_lai2(&lai, id); - memcpy(msgb_put(msg, sizeof(lai)), &lai, sizeof(lai)); - } - break; - case CELL_IDENT_LAC: - for (i = 0; i < cil->id_list_len; i++) - msgb_put_u16(msg, cil->id_list[i].lac); - break; - case CELL_IDENT_BSS: - case CELL_IDENT_NO_CELL: - /* Does not have any list items */ - break; - default: - /* Support for other identifier list types is not implemented. */ - OSMO_ASSERT(false); - } + for (i = 0; i < cil->id_list_len; i++) + gsm0808_msgb_put_cell_id_u(msg, cil->id_discr, &cil->id_list[i]); *tlv_len = (uint8_t) (msg->tail - old_tail); return *tlv_len + 2; diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index adfa096..840bac9 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -242,6 +242,7 @@ gsm0808_lcls_status_names; gsm0808_enc_lcls; gsm0808_dec_lcls; +gsm0808_msgb_put_cell_id_u; gsm29118_msgb_alloc; gsm29118_create_alert_req; -- To view, visit https://gerrit.osmocom.org/13887 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I6cc567798e20365e6587e6b2988e834306d8c80c Gerrit-Change-Number: 13887 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:10:04 2019 From: gerrit-no-reply at lists.osmocom.org (Mykola Shchetinin) Date: Fri, 10 May 2019 07:10:04 +0000 Subject: Change in osmo-sgsn[master]: gprs_gmm: send Service Reject when no PDP ctxs are available. In-Reply-To: References: Message-ID: Mykola Shchetinin has posted comments on this change. ( https://gerrit.osmocom.org/13744 ) Change subject: gprs_gmm: send Service Reject when no PDP ctxs are available. ...................................................................... Patch Set 8: (3 comments) https://gerrit.osmocom.org/#/c/13744/7/src/gprs/gprs_gmm.c File src/gprs/gprs_gmm.c: https://gerrit.osmocom.org/#/c/13744/7/src/gprs/gprs_gmm.c at 1618 PS7, Line 1618: : /* 3GPP TS 24.008 Section 4.7.13.4 Service request procedure not accepted by the : * network. Returns true if MS has active PDP contexts in pdp_status */ : bool pdp_status_has_active_nsapis(const uint8_t *pdp_status, const size_t pdp_status_len) : { : size_t i; : for (i = 0; i < pdp_status_len; i++) : if (pdp_status[i] != 0) : return true; : > Can you rename it to pdp_status_has_active_nsapis? [?] Done https://gerrit.osmocom.org/#/c/13744/7/src/gprs/gprs_gmm.c at 1629 PS7, Line 1629: } : : /* Chapter 9.4.14: Routing area update request */ : static int gsm48_rx_gmm_ra_upd_req(struct sgsn_mm_ctx *mmctx, struct msgb *msg, : struct gprs_llc_llme *llme) : { : #ifndef PTMSI_ALLOC : struct sgsn_signal_data sig_data; : #endif : struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_gmmh(msg); : uint8_t *cur = gh->data; : > Can you remove this function. [?] Done https://gerrit.osmocom.org/#/c/13744/7/src/gprs/gprs_gmm.c at 1935 PS7, Line 1935: (DMM, LOGL_INFO, "\n"); > do a llist_empty(.. [?] Done -- To view, visit https://gerrit.osmocom.org/13744 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If610cbef17c25ec44e65d4f1b2340d102c560437 Gerrit-Change-Number: 13744 Gerrit-PatchSet: 8 Gerrit-Owner: Mykola Shchetinin Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Mykola Shchetinin Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Fri, 10 May 2019 07:10:04 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:11:37 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:11:37 +0000 Subject: Change in osmo-gsm-tester[master]: virtual: Make it possible to add tests to the ms driver In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13826 ) Change subject: virtual: Make it possible to add tests to the ms driver ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13826 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia65ee53987e92b24e6b8c40e1376bc74dc260180 Gerrit-Change-Number: 13826 Gerrit-PatchSet: 3 Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 10 May 2019 07:11:37 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:13:41 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:13:41 +0000 Subject: Change in osmo-msc[master]: call_leg: remove unused event MSC_EV_CALL_LEG_RTP_RELEASED In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13945 ) Change subject: call_leg: remove unused event MSC_EV_CALL_LEG_RTP_RELEASED ...................................................................... call_leg: remove unused event MSC_EV_CALL_LEG_RTP_RELEASED The event is actually never dispatched and useless, because when an RTP stream releases, the call_leg terminates directly anyway (which wasn't apparent when starting to design the call_leg FSM yet). Change-Id: I6b2fc1225c960fa2f7c46adf241520217a07821c --- M include/osmocom/msc/call_leg.h M include/osmocom/msc/msc_roles.h M src/libmsc/call_leg.c M src/libmsc/msc_a.c M src/libmsc/msc_i.c M src/libmsc/msc_t.c 6 files changed, 8 insertions(+), 45 deletions(-) Approvals: Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmocom/msc/call_leg.h b/include/osmocom/msc/call_leg.h index b8126e8..61107ee 100644 --- a/include/osmocom/msc/call_leg.h +++ b/include/osmocom/msc/call_leg.h @@ -36,7 +36,6 @@ uint32_t parent_event_rtp_addr_available; uint32_t parent_event_rtp_complete; - uint32_t parent_event_rtp_released; /* For internal MNCC, if RTP addresses for endpoints become assigned by the MGW, implicitly notify the other * call leg's RTP_TO_CN side rtp_stream with rtp_stream_remote_addr_available(). */ @@ -58,15 +57,13 @@ struct call_leg *call_leg_alloc(struct osmo_fsm_inst *parent_fi, uint32_t parent_event_term, uint32_t parent_event_rtp_addr_available, - uint32_t parent_event_rtp_complete, - uint32_t parent_event_rtp_released); + uint32_t parent_event_rtp_complete); void call_leg_reparent(struct call_leg *cl, struct osmo_fsm_inst *parent_fi, uint32_t parent_event_term, uint32_t parent_event_rtp_addr_available, - uint32_t parent_event_rtp_complete, - uint32_t parent_event_rtp_released); + uint32_t parent_event_rtp_complete); int call_leg_local_bridge(struct call_leg *cl1, uint32_t call_id1, struct gsm_trans *trans1, struct call_leg *cl2, uint32_t call_id2, struct gsm_trans *trans2); diff --git a/include/osmocom/msc/msc_roles.h b/include/osmocom/msc/msc_roles.h index a1fab2f..b22bc7b 100644 --- a/include/osmocom/msc/msc_roles.h +++ b/include/osmocom/msc/msc_roles.h @@ -148,7 +148,6 @@ MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE, MSC_EV_CALL_LEG_RTP_COMPLETE, - MSC_EV_CALL_LEG_RTP_RELEASED, MSC_EV_CALL_LEG_TERM, /* MNCC has told us to RTP_CREATE, but local RTP port has not yet been set up. diff --git a/src/libmsc/call_leg.c b/src/libmsc/call_leg.c index cb7e6ea..1b7db2b 100644 --- a/src/libmsc/call_leg.c +++ b/src/libmsc/call_leg.c @@ -67,8 +67,7 @@ struct call_leg *call_leg_alloc(struct osmo_fsm_inst *parent_fi, uint32_t parent_event_term, uint32_t parent_event_rtp_addr_available, - uint32_t parent_event_rtp_complete, - uint32_t parent_event_rtp_released) + uint32_t parent_event_rtp_complete) { struct call_leg *cl; struct osmo_fsm_inst *fi = osmo_fsm_inst_alloc_child(&call_leg_fsm, parent_fi, parent_event_term); @@ -82,7 +81,6 @@ .fi = fi, .parent_event_rtp_addr_available = parent_event_rtp_addr_available, .parent_event_rtp_complete = parent_event_rtp_complete, - .parent_event_rtp_released = parent_event_rtp_released, }; return cl; @@ -92,8 +90,7 @@ struct osmo_fsm_inst *new_parent_fi, uint32_t parent_event_term, uint32_t parent_event_rtp_addr_available, - uint32_t parent_event_rtp_complete, - uint32_t parent_event_rtp_released) + uint32_t parent_event_rtp_complete) { LOG_CALL_LEG(cl, LOGL_DEBUG, "Reparenting from parent %s to parent %s\n", cl->fi->proc.parent->name, new_parent_fi->name); @@ -101,7 +98,6 @@ talloc_steal(new_parent_fi, cl->fi); cl->parent_event_rtp_addr_available = parent_event_rtp_addr_available; cl->parent_event_rtp_complete = parent_event_rtp_complete; - cl->parent_event_rtp_released = parent_event_rtp_released; } static int call_leg_fsm_timer_cb(struct osmo_fsm_inst *fi) diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c index 5baed54..77dd43d 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -546,28 +546,15 @@ static void msc_a_cleanup_rtp_streams(struct msc_a *msc_a, uint32_t event, void *data) { - struct rtp_stream *rtps; - switch (event) { - case MSC_EV_CALL_LEG_RTP_RELEASED: - rtps = data; - if (msc_a->cc.mncc_forwarding_to_remote_ran - && msc_a->cc.mncc_forwarding_to_remote_ran->rtps == rtps) - msc_a->cc.mncc_forwarding_to_remote_ran->rtps = NULL; - if (msc_a->ho.new_cell.mncc_forwarding_to_remote_ran - && msc_a->ho.new_cell.mncc_forwarding_to_remote_ran->rtps == rtps) - msc_a->ho.new_cell.mncc_forwarding_to_remote_ran->rtps = NULL; - return; case MSC_EV_CALL_LEG_TERM: msc_a->cc.call_leg = NULL; if (msc_a->cc.mncc_forwarding_to_remote_ran) msc_a->cc.mncc_forwarding_to_remote_ran->rtps = NULL; - if (msc_a->ho.new_cell.mncc_forwarding_to_remote_ran) { - fprintf(stderr, "FOCKEN %p\n", msc_a->ho.new_cell.mncc_forwarding_to_remote_ran->rtps); + if (msc_a->ho.new_cell.mncc_forwarding_to_remote_ran) msc_a->ho.new_cell.mncc_forwarding_to_remote_ran->rtps = NULL; - } return; case MSC_MNCC_EV_CALL_ENDED: @@ -633,7 +620,6 @@ /* Nothing to do. */ return; - case MSC_EV_CALL_LEG_RTP_RELEASED: case MSC_MNCC_EV_CALL_ENDED: /* Cleaned up above */ return; @@ -765,7 +751,6 @@ /* Already releasing */ return; - case MSC_EV_CALL_LEG_RTP_RELEASED: case MSC_EV_CALL_LEG_TERM: case MSC_MNCC_EV_CALL_ENDED: /* RTP streams cleaned up above */ @@ -819,7 +804,6 @@ OSMO_VALUE_STRING(MSC_REMOTE_EV_RX_GSUP), OSMO_VALUE_STRING(MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE), OSMO_VALUE_STRING(MSC_EV_CALL_LEG_RTP_COMPLETE), - OSMO_VALUE_STRING(MSC_EV_CALL_LEG_RTP_RELEASED), OSMO_VALUE_STRING(MSC_EV_CALL_LEG_TERM), OSMO_VALUE_STRING(MSC_MNCC_EV_NEED_LOCAL_RTP), OSMO_VALUE_STRING(MSC_MNCC_EV_CALL_PROCEEDING), @@ -934,7 +918,6 @@ | S(MSC_A_EV_UNUSED) | S(MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE) | S(MSC_EV_CALL_LEG_RTP_COMPLETE) - | S(MSC_EV_CALL_LEG_RTP_RELEASED) | S(MSC_EV_CALL_LEG_TERM) | S(MSC_MNCC_EV_CALL_ENDED) | S(MSC_A_EV_HANDOVER_REQUIRED) @@ -950,7 +933,6 @@ | S(MSC_A_EV_FROM_I_PROCESS_ACCESS_SIGNALLING_REQUEST) | S(MSC_A_EV_FROM_I_SEND_END_SIGNAL_REQUEST) | S(MSC_A_EV_UNUSED) - | S(MSC_EV_CALL_LEG_RTP_RELEASED) | S(MSC_EV_CALL_LEG_TERM) | S(MSC_MNCC_EV_CALL_ENDED) , @@ -1590,8 +1572,7 @@ cl = msc_a->cc.call_leg = call_leg_alloc(msc_a->c.fi, MSC_EV_CALL_LEG_TERM, MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE, - MSC_EV_CALL_LEG_RTP_COMPLETE, - MSC_EV_CALL_LEG_RTP_RELEASED); + MSC_EV_CALL_LEG_RTP_COMPLETE); OSMO_ASSERT(cl); /* HACK: We put the connection in loopback mode at the beginnig to diff --git a/src/libmsc/msc_i.c b/src/libmsc/msc_i.c index 05df9cb..f7aab0d 100644 --- a/src/libmsc/msc_i.c +++ b/src/libmsc/msc_i.c @@ -278,7 +278,6 @@ OSMO_VALUE_STRING(MSC_REMOTE_EV_RX_GSUP), OSMO_VALUE_STRING(MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE), OSMO_VALUE_STRING(MSC_EV_CALL_LEG_RTP_COMPLETE), - OSMO_VALUE_STRING(MSC_EV_CALL_LEG_RTP_RELEASED), OSMO_VALUE_STRING(MSC_EV_CALL_LEG_TERM), OSMO_VALUE_STRING(MSC_MNCC_EV_NEED_LOCAL_RTP), OSMO_VALUE_STRING(MSC_MNCC_EV_CALL_PROCEEDING), diff --git a/src/libmsc/msc_t.c b/src/libmsc/msc_t.c index c6bba47..8eefccc 100644 --- a/src/libmsc/msc_t.c +++ b/src/libmsc/msc_t.c @@ -359,8 +359,7 @@ msc_t->inter_msc.call_leg = call_leg_alloc(msc_t->c.fi, MSC_EV_CALL_LEG_TERM, MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE, - MSC_EV_CALL_LEG_RTP_COMPLETE, - MSC_EV_CALL_LEG_RTP_RELEASED); + MSC_EV_CALL_LEG_RTP_COMPLETE); if (!msc_t->inter_msc.call_leg || call_leg_ensure_ci(msc_t->inter_msc.call_leg, RTP_TO_RAN, msc_t->inter_msc.callref, NULL, NULL, NULL) || call_leg_ensure_ci(msc_t->inter_msc.call_leg, RTP_TO_CN, msc_t->inter_msc.callref, NULL, NULL, NULL)) { @@ -391,7 +390,6 @@ msc_t_send_stored_ho_request(msc_t); return; - case MSC_EV_CALL_LEG_RTP_RELEASED: case MSC_EV_CALL_LEG_TERM: msc_t->inter_msc.call_leg = NULL; msc_t_error("Failed to set up MGW endpoint\n"); @@ -550,7 +548,6 @@ msc_t_down_l2_co(msc_t, an_apdu, false); return; - case MSC_EV_CALL_LEG_RTP_RELEASED: case MSC_EV_CALL_LEG_TERM: msc_t->inter_msc.call_leg = NULL; msc_t_error("Failed to set up MGW endpoint\n"); @@ -609,8 +606,7 @@ msc_i->c.fi, MSC_EV_CALL_LEG_TERM, MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE, - MSC_EV_CALL_LEG_RTP_COMPLETE, - MSC_EV_CALL_LEG_RTP_RELEASED); + MSC_EV_CALL_LEG_RTP_COMPLETE); /* msc_i_set_ran_conn() properly "steals" the ran_conn from msc_t */ msc_i_set_ran_conn(msc_i, msc_t->ran_conn); @@ -657,7 +653,6 @@ msc_t_down_l2_co(msc_t, an_apdu, false); return; - case MSC_EV_CALL_LEG_RTP_RELEASED: case MSC_EV_CALL_LEG_TERM: msc_t->inter_msc.call_leg = NULL; msc_t_error("Failed to set up MGW endpoint\n"); @@ -795,7 +790,6 @@ .action = msc_t_fsm_wait_local_rtp, .in_event_mask = 0 | S(MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE) - | S(MSC_EV_CALL_LEG_RTP_RELEASED) | S(MSC_EV_CALL_LEG_TERM) | S(MSC_MNCC_EV_CALL_ENDED) | S(MSC_T_EV_CN_CLOSE) @@ -810,7 +804,6 @@ .in_event_mask = 0 | S(MSC_EV_FROM_RAN_UP_L2) | S(MSC_EV_FROM_RAN_CONN_RELEASED) - | S(MSC_EV_CALL_LEG_RTP_RELEASED) | S(MSC_EV_CALL_LEG_TERM) | S(MSC_MNCC_EV_CALL_ENDED) | S(MSC_T_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST) @@ -827,7 +820,6 @@ .in_event_mask = 0 | S(MSC_EV_FROM_RAN_UP_L2) | S(MSC_EV_FROM_RAN_CONN_RELEASED) - | S(MSC_EV_CALL_LEG_RTP_RELEASED) | S(MSC_EV_CALL_LEG_TERM) | S(MSC_MNCC_EV_CALL_ENDED) | S(MSC_T_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST) @@ -841,7 +833,6 @@ OSMO_VALUE_STRING(MSC_REMOTE_EV_RX_GSUP), OSMO_VALUE_STRING(MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE), OSMO_VALUE_STRING(MSC_EV_CALL_LEG_RTP_COMPLETE), - OSMO_VALUE_STRING(MSC_EV_CALL_LEG_RTP_RELEASED), OSMO_VALUE_STRING(MSC_EV_CALL_LEG_TERM), OSMO_VALUE_STRING(MSC_MNCC_EV_NEED_LOCAL_RTP), OSMO_VALUE_STRING(MSC_MNCC_EV_CALL_PROCEEDING), -- To view, visit https://gerrit.osmocom.org/13945 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I6b2fc1225c960fa2f7c46adf241520217a07821c Gerrit-Change-Number: 13945 Gerrit-PatchSet: 3 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From jenkins at lists.osmocom.org Fri May 10 07:17:02 2019 From: jenkins at lists.osmocom.org (jenkins at lists.osmocom.org) Date: Fri, 10 May 2019 07:17:02 +0000 (UTC) Subject: =?UTF-8?Q?Build_failed_in_Jenkins:_mas?= =?UTF-8?Q?ter-osmo-gmr_=C2=BB_a1=3Ddefault,a2=3D?= =?UTF-8?Q?default,a3=3Ddefault,a4=3Ddefault,osmocom-master-debian9_#1851?= Message-ID: <1349755487.2448.1557472622568.JavaMail.jenkins@jenkins.osmocom.org> See ------------------------------------------ [...truncated 53.96 KB...] See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- make[3]: Leaving directory ' make[2]: Leaving directory ' Making install in src/gb make[2]: Entering directory ' CC gprs_ns.lo CC gprs_ns_frgre.lo CC gprs_ns_vty.lo CC gprs_ns_sns.lo CC gprs_bssgp.lo CC gprs_bssgp_util.lo CC gprs_bssgp_vty.lo CC gprs_bssgp_bss.lo CC common_vty.lo CCLD libosmogb.la make[3]: Entering directory ' make[3]: Nothing to be done for 'install-data-am'. /bin/mkdir -p ' /bin/bash ../../libtool --mode=install /usr/bin/install -c libosmogb.la ' libtool: warning: relinking 'libosmogb.la' libtool: install: (cd /bin/bash " --silent --tag CC --mode=relink gcc -Wall -fno-strict-aliasing -g -O2 -DBUILDING_LIBOSMOCORE -Wall -Wl,--version-script=./libosmogb.map -version-info 9:0:0 -o libosmogb.la -rpath gprs_ns.lo gprs_ns_frgre.lo gprs_ns_vty.lo gprs_ns_sns.lo gprs_bssgp.lo gprs_bssgp_util.lo gprs_bssgp_vty.lo gprs_bssgp_bss.lo common_vty.lo -ltalloc ../../src/libosmocore.la ../../src/vty/libosmovty.la ../../src/gsm/libosmogsm.la ) libtool: install: /usr/bin/install -c .libs/libosmogb.so.9.0.0T libtool: install: (cd && { ln -s -f libosmogb.so.9.0.0 libosmogb.so.9 || { rm -f libosmogb.so.9 && ln -s libosmogb.so.9.0.0 libosmogb.so.9; }; }) libtool: install: (cd && { ln -s -f libosmogb.so.9.0.0 libosmogb.so || { rm -f libosmogb.so && ln -s libosmogb.so.9.0.0 libosmogb.so; }; }) libtool: install: /usr/bin/install -c .libs/libosmogb.lai libtool: finish: PATH="/usr/local/bin:/usr/bin:/bin:/usr/games:/home/osmocom-build/bin:/sbin" ldconfig -n ---------------------------------------------------------------------- Libraries have been installed in: If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the '-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the 'LD_RUN_PATH' environment variable during linking - use the '-Wl,-rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to '/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- make[3]: Leaving directory ' make[2]: Leaving directory ' Making install in src/ctrl make[2]: Entering directory ' CC control_cmd.lo CC control_if.lo CC fsm_ctrl_commands.lo CC control_vty.lo CCLD libosmoctrl.la make[3]: Entering directory ' make[3]: Nothing to be done for 'install-data-am'. /bin/mkdir -p ' /bin/bash ../../libtool --mode=install /usr/bin/install -c libosmoctrl.la ' libtool: warning: relinking 'libosmoctrl.la' libtool: install: (cd /bin/bash " --silent --tag CC --mode=relink gcc -Wall -I../../include -I../../include -g -O2 -DBUILDING_LIBOSMOCORE -Wall -Wl,--version-script=./libosmoctrl.map -version-info 3:0:3 -no-undefined -o libosmoctrl.la -rpath control_cmd.lo control_if.lo fsm_ctrl_commands.lo control_vty.lo -ltalloc ../../src/libosmocore.la ../../src/gsm/libosmogsm.la ../../src/vty/libosmovty.la ) libtool: install: /usr/bin/install -c .libs/libosmoctrl.so.0.3.0T libtool: install: (cd && { ln -s -f libosmoctrl.so.0.3.0 libosmoctrl.so.0 || { rm -f libosmoctrl.so.0 && ln -s libosmoctrl.so.0.3.0 libosmoctrl.so.0; }; }) libtool: install: (cd && { ln -s -f libosmoctrl.so.0.3.0 libosmoctrl.so || { rm -f libosmoctrl.so && ln -s libosmoctrl.so.0.3.0 libosmoctrl.so; }; }) libtool: install: /usr/bin/install -c .libs/libosmoctrl.lai libtool: finish: PATH="/usr/local/bin:/usr/bin:/bin:/usr/games:/home/osmocom-build/bin:/sbin" ldconfig -n ---------------------------------------------------------------------- Libraries have been installed in: If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the '-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the 'LD_RUN_PATH' environment variable during linking - use the '-Wl,-rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to '/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- make[3]: Leaving directory ' make[2]: Leaving directory ' Making install in src/sim make[2]: Entering directory ' CC core.lo CC reader.lo CC reader_pcsc.lo CC class_tables.lo CC card_fs_sim.lo CC card_fs_usim.lo CC card_fs_uicc.lo CC card_fs_isim.lo CC card_fs_tetra.lo CCLD libosmosim.la make[3]: Entering directory ' make[3]: Nothing to be done for 'install-data-am'. /bin/mkdir -p ' /bin/bash ../../libtool --mode=install /usr/bin/install -c libosmosim.la ' libtool: warning: relinking 'libosmosim.la' libtool: install: (cd /bin/bash " --silent --tag CC --mode=relink gcc -fPIC -Wall -I/usr/include/PCSC -pthread -g -O2 -DBUILDING_LIBOSMOCORE -Wall -version-info 1:0:1 -o libosmosim.la -rpath core.lo reader.lo reader_pcsc.lo class_tables.lo card_fs_sim.lo card_fs_usim.lo card_fs_uicc.lo card_fs_isim.lo card_fs_tetra.lo ../../src/libosmocore.la ../../src/gsm/libosmogsm.la -ltalloc -lpcsclite ) libtool: install: /usr/bin/install -c .libs/libosmosim.so.0.1.0T libtool: install: (cd && { ln -s -f libosmosim.so.0.1.0 libosmosim.so.0 || { rm -f libosmosim.so.0 && ln -s libosmosim.so.0.1.0 libosmosim.so.0; }; }) libtool: install: (cd && { ln -s -f libosmosim.so.0.1.0 libosmosim.so || { rm -f libosmosim.so && ln -s libosmosim.so.0.1.0 libosmosim.so; }; }) libtool: install: /usr/bin/install -c .libs/libosmosim.lai libtool: finish: PATH="/usr/local/bin:/usr/bin:/bin:/usr/games:/home/osmocom-build/bin:/sbin" ldconfig -n ---------------------------------------------------------------------- Libraries have been installed in: If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the '-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the 'LD_RUN_PATH' environment variable during linking - use the '-Wl,-rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to '/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- make[3]: Leaving directory ' make[2]: Leaving directory ' Making install in src/pseudotalloc make[2]: Entering directory ' make[3]: Entering directory ' make[3]: Leaving directory ' make[2]: Leaving directory ' Making install in utils make[2]: Entering directory ' CC osmo-arfcn.o CC osmo-auc-gen.o CC osmo_config_merge-osmo-config-merge.o CC osmo_sim_test-osmo-sim-test.o CCLD osmo-arfcn CCLD osmo-auc-gen CCLD osmo-config-merge CCLD osmo-sim-test make[3]: Entering directory ' make[3]: Nothing to be done for 'install-data-am'. /bin/mkdir -p ' /bin/bash ../libtool --mode=install /usr/bin/install -c osmo-arfcn osmo-auc-gen osmo-config-merge ' libtool: install: /usr/bin/install -c .libs/osmo-arfcn libtool: install: /usr/bin/install -c .libs/osmo-auc-gen libtool: install: /usr/bin/install -c .libs/osmo-config-merge make[3]: Leaving directory ' make[2]: Leaving directory ' Making install in tests make[2]: Entering directory ' GEN conv/gsm0503_test_vectors.c Generating test vectors... Generate 'xcch' test vector Generate 'rach' test vector Generate 'rach_ext' test vector Generate 'sch' test vector Generate 'cs2' test vector Generate 'cs3' test vector Generate 'cs2_np' test vector Generate 'cs3_np' test vector Generate 'tch_afs_12_2' test vector Generate 'tch_afs_10_2' test vector Generate 'tch_afs_7_95' test vector Generate 'tch_afs_7_4' test vector Generate 'tch_afs_6_7' test vector Generate 'tch_afs_5_9' test vector Generate 'tch_afs_5_15' test vector Generate 'tch_afs_4_75' test vector Generate 'tch_fr' test vector Generate 'tch_hr' test vector Generate 'tch_ahs_7_95' test vector Generate 'tch_ahs_7_4' test vector Generate 'tch_ahs_6_7' test vector Generate 'tch_ahs_5_9' test vector Generate 'tch_ahs_5_15' test vector Generate 'tch_ahs_4_75' test vector Generate 'mcs1_dl_hdr' test vector Generate 'mcs1_ul_hdr' test vector Generate 'mcs1' test vector Generate 'mcs2' test vector Generate 'mcs3' test vector Generate 'mcs4' test vector Generate 'mcs5_dl_hdr' test vector Generate 'mcs5_ul_hdr' test vector Generate 'mcs5' test vector Generate 'mcs6' test vector Generate 'mcs7_dl_hdr' test vector Generate 'mcs7_ul_hdr' test vector Generate 'mcs7' test vector Generate 'mcs8' test vector Generate 'mcs9' test vector Generation complete. make install-am make[3]: Entering directory ' make[4]: Entering directory ' make[4]: Nothing to be done for 'install-exec-am'. make[4]: Nothing to be done for 'install-data-am'. make[4]: Leaving directory ' make[3]: Leaving directory ' make[2]: Leaving directory ' make[2]: Entering directory ' make[3]: Entering directory ' /bin/mkdir -p ' /bin/mkdir -p ' /bin/mkdir -p ' /usr/bin/install -c -m 644 libosmocore.pc libosmocodec.pc libosmovty.pc libosmogsm.pc libosmogb.pc libosmoctrl.pc libosmocoding.pc libosmosim.pc ' /usr/bin/install -c osmo-release.sh ' /usr/bin/install -c -m 644 osmo-release.mk ' make install-data-hook make[4]: Entering directory ' make[4]: Nothing to be done for 'install-data-hook'. make[4]: Leaving directory ' make[3]: Leaving directory ' make[2]: Leaving directory ' make[1]: Leaving directory ' + STOW_DIR= stow --restow libosmocore + export PKG_CONFIG_PATH=: + PKG_CONFIG_PATH=: + export LD_LIBRARY_PATH= + LD_LIBRARY_PATH= + osmo-build-dep.sh libosmo-dsp =============================== libosmo-dsp =============================== + mkdir -p + cd + osmo-deps.sh libosmo-dsp + project=libosmo-dsp + branch=master + git branch -a + grep -c remotes/origin/master$ + [ x1 != x0 ] + branch=origin/master + test -d libosmo-dsp + cd libosmo-dsp + git fetch --tags origin fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. Build step 'Execute shell' marked build as failure [WARNINGS]Skipping publisher since build result is FAILURE From gerrit-no-reply at lists.osmocom.org Fri May 10 07:20:27 2019 From: gerrit-no-reply at lists.osmocom.org (Mykola Shchetinin) Date: Fri, 10 May 2019 07:20:27 +0000 Subject: Change in osmo-sgsn[master]: gprs_gmm: send Service Reject when no PDP ctxs are available. In-Reply-To: References: Message-ID: Hello lynxis lazus, Pau Espin Pedrol, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13744 to look at the new patch set (#9). Change subject: gprs_gmm: send Service Reject when no PDP ctxs are available. ...................................................................... gprs_gmm: send Service Reject when no PDP ctxs are available. Look at PDP Context Status IE: if there are any PDP contexts which are ACTIVE on MS side and there are no PDP contexts which are ACTIVE on the network side, then send Service Reject with the cause "NO PDP ACTIVATED". This forces MS to reactivate the PDP contexts. 3GPP TS 24.008 Section 4.7.13.4 Service request procedure not accepted by the network. Cause # 40. Fixes: OS#3937 Change-Id: If610cbef17c25ec44e65d4f1b2340d102c560437 --- M src/gprs/gprs_gmm.c M tests/sgsn/sgsn_test.c M tests/sgsn/sgsn_test.ok 3 files changed, 43 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/44/13744/9 -- To view, visit https://gerrit.osmocom.org/13744 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: If610cbef17c25ec44e65d4f1b2340d102c560437 Gerrit-Change-Number: 13744 Gerrit-PatchSet: 9 Gerrit-Owner: Mykola Shchetinin Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Mykola Shchetinin Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:30:52 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:30:52 +0000 Subject: Change in libosmocore[master]: osmo_sock_get_name_*: Ensure string is returned in error case Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13960 Change subject: osmo_sock_get_name_*: Ensure string is returned in error case ...................................................................... osmo_sock_get_name_*: Ensure string is returned in error case osmo_sock_get_name_buf(): In case the getsockname() call is failing for some weird reason, we shouldn't return an uninitialized, non-zero-terminated string buffer to the caller, as most callers will be too lazy to test the return value. This holds even more true for users of the internal osmo_sock_get_name2() and osmo_sock_get_name2_c() functions which indeed very much ignore the return value of osmo_sock_get_name_buf(). Change-Id: I2d56327e96b7a6783cca38b828c5ee74aed776ae --- M src/socket.c 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/60/13960/1 diff --git a/src/socket.c b/src/socket.c index 7c412b6..78c0a58 100644 --- a/src/socket.c +++ b/src/socket.c @@ -805,12 +805,16 @@ int rc; /* get local */ - if ((rc = osmo_sock_get_ip_and_port(fd, hostbuf_l, sizeof(hostbuf_l), portbuf_l, sizeof(portbuf_l), true))) + if ((rc = osmo_sock_get_ip_and_port(fd, hostbuf_l, sizeof(hostbuf_l), portbuf_l, sizeof(portbuf_l), true))) { + osmo_strlcpy(str, "", str_len); return rc; + } /* get remote */ - if (osmo_sock_get_ip_and_port(fd, hostbuf_r, sizeof(hostbuf_r), portbuf_r, sizeof(portbuf_r), false) != 0) + if (osmo_sock_get_ip_and_port(fd, hostbuf_r, sizeof(hostbuf_r), portbuf_r, sizeof(portbuf_r), false) != 0) { + osmo_strlcpy(str, "", str_len); return snprintf(str, str_len, "r=NULL<->l=%s:%s", hostbuf_l, portbuf_l); + } return snprintf(str, str_len, "r=%s:%s<->l=%s:%s", hostbuf_r, portbuf_r, hostbuf_l, portbuf_l); } -- To view, visit https://gerrit.osmocom.org/13960 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I2d56327e96b7a6783cca38b828c5ee74aed776ae Gerrit-Change-Number: 13960 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:38:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:38:16 +0000 Subject: Change in libosmocore[master]: Add basic test for llist counter and empty check In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/11875 ) Change subject: Add basic test for llist counter and empty check ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/11875 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie1c15c330213849f089032ca742e709e4349b26e Gerrit-Change-Number: 11875 Gerrit-PatchSet: 1 Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 10 May 2019 07:38:16 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:38:34 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:38:34 +0000 Subject: Change in libosmocore[master]: Add basic test for llist counter and empty check In-Reply-To: References: Message-ID: Harald Welte has abandoned this change. ( https://gerrit.osmocom.org/11875 ) Change subject: Add basic test for llist counter and empty check ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/11875 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: Ie1c15c330213849f089032ca742e709e4349b26e Gerrit-Change-Number: 11875 Gerrit-PatchSet: 1 Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:44:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:44:18 +0000 Subject: Change in libosmocore[master]: IPA: move duplicated error handling into function In-Reply-To: References: Message-ID: Harald Welte has abandoned this change. ( https://gerrit.osmocom.org/11911 ) Change subject: IPA: move duplicated error handling into function ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/11911 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: Ic0147bffaf04b0baf97e5cca22948bd0e116668f Gerrit-Change-Number: 11911 Gerrit-PatchSet: 4 Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:44:58 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:44:58 +0000 Subject: Change in osmo-pcu[master]: Remove ASAN preprocessor warning In-Reply-To: References: Message-ID: Harald Welte has abandoned this change. ( https://gerrit.osmocom.org/6001 ) Change subject: Remove ASAN preprocessor warning ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/6001 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: Idaabb4203a282be6779d7ab29de3f827b0ca6462 Gerrit-Change-Number: 6001 Gerrit-PatchSet: 6 Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:49:51 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:49:51 +0000 Subject: Change in osmo-ttcn3-hacks[master]: MGCP: fix pattern warning In-Reply-To: References: Message-ID: Harald Welte has removed a vote on this change. Change subject: MGCP: fix pattern warning ...................................................................... Removed Code-Review-1 by Harald Welte -- To view, visit https://gerrit.osmocom.org/12237 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: deleteVote Gerrit-Change-Id: I99948e4b82b5b4bd5b8f7c1a4c60a97fcab3c0eb Gerrit-Change-Number: 12237 Gerrit-PatchSet: 2 Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: dexter -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:53:31 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:53:31 +0000 Subject: Change in libosmocore[master]: utils: drop redundant _SOURCES entries In-Reply-To: References: Message-ID: Harald Welte has abandoned this change. ( https://gerrit.osmocom.org/12392 ) Change subject: utils: drop redundant _SOURCES entries ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/12392 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: Ia0374e2d38e6bdc416eec182030af94b89d65ab7 Gerrit-Change-Number: 12392 Gerrit-PatchSet: 1 Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:54:00 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:54:00 +0000 Subject: Change in osmo-msc[master]: MNCC: internalize bridge error handling In-Reply-To: References: Message-ID: Harald Welte has abandoned this change. ( https://gerrit.osmocom.org/12331 ) Change subject: MNCC: internalize bridge error handling ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/12331 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: I66f6fac254d78dcf64bcb6aa4a443b899fb378a7 Gerrit-Change-Number: 12331 Gerrit-PatchSet: 4 Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Stefan Sperling -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 07:54:25 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 07:54:25 +0000 Subject: Change in libosmocore[master]: LCLS: drop boolean status_present from HO structs In-Reply-To: References: Message-ID: Harald Welte has abandoned this change. ( https://gerrit.osmocom.org/12369 ) Change subject: LCLS: drop boolean status_present from HO structs ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/12369 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: Ib2958a8613627c4e54c004ffa3578c300ed0360b Gerrit-Change-Number: 12369 Gerrit-PatchSet: 8 Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: dexter -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 08:01:31 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 08:01:31 +0000 Subject: Change in libosmocore[master]: NS: log address:port on error In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/11636 ) Change subject: NS: log address:port on error ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/11636 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If2dc533a6dc150254f5d44b672f04bb728e7e927 Gerrit-Change-Number: 11636 Gerrit-PatchSet: 2 Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 10 May 2019 08:01:31 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 08:02:15 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 08:02:15 +0000 Subject: Change in libosmocore[master]: osmo_sock_get_name_*: Ensure string is returned in error case In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13960 ) Change subject: osmo_sock_get_name_*: Ensure string is returned in error case ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13960 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2d56327e96b7a6783cca38b828c5ee74aed776ae Gerrit-Change-Number: 13960 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 10 May 2019 08:02:15 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 08:02:17 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 08:02:17 +0000 Subject: Change in libosmocore[master]: NS: log address:port on error In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/11636 ) Change subject: NS: log address:port on error ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/11636 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If2dc533a6dc150254f5d44b672f04bb728e7e927 Gerrit-Change-Number: 11636 Gerrit-PatchSet: 2 Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 10 May 2019 08:02:17 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 08:03:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 08:03:08 +0000 Subject: Change in osmo-ttcn3-hacks[master]: MGCP: fix pattern warning In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/12237 ) Change subject: MGCP: fix pattern warning ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/12237 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I99948e4b82b5b4bd5b8f7c1a4c60a97fcab3c0eb Gerrit-Change-Number: 12237 Gerrit-PatchSet: 3 Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: dexter Gerrit-Comment-Date: Fri, 10 May 2019 08:03:08 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 08:03:17 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 08:03:17 +0000 Subject: Change in pysim[master]: Don't try to parse result if select_file() failed In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/12462 ) Change subject: Don't try to parse result if select_file() failed ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/12462 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I25b859374e33654e58d07061926bf8529eab87f3 Gerrit-Change-Number: 12462 Gerrit-PatchSet: 2 Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: K?vin Redon Gerrit-Reviewer: Max Gerrit-Comment-Date: Fri, 10 May 2019 08:03:17 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 08:03:28 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 08:03:28 +0000 Subject: Change in osmo-bts[master]: clear GPRS indicator in SI3 while PCU is disconnected In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/10170 ) Change subject: clear GPRS indicator in SI3 while PCU is disconnected ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/10170 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1a6f5c636c0fe098ee31c280d4572a3f8122b44b Gerrit-Change-Number: 10170 Gerrit-PatchSet: 2 Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Stefan Sperling Gerrit-CC: Harald Welte Gerrit-CC: Max Gerrit-Comment-Date: Fri, 10 May 2019 08:03:28 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 08:03:44 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 08:03:44 +0000 Subject: Change in osmo-sgsn[master]: Fix IMSI padding in imsi-acl In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/11838 ) Change subject: Fix IMSI padding in imsi-acl ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/11838 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I26e4aa44f159d1b5b91dda4a586fd4e809711245 Gerrit-Change-Number: 11838 Gerrit-PatchSet: 2 Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 10 May 2019 08:03:44 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 08:04:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 08:04:19 +0000 Subject: Change in osmo-sgsn[master]: Fix IMSI padding in imsi-acl In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/11838 ) Change subject: Fix IMSI padding in imsi-acl ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/11838 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I26e4aa44f159d1b5b91dda4a586fd4e809711245 Gerrit-Change-Number: 11838 Gerrit-PatchSet: 2 Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 10 May 2019 08:04:19 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 09:19:48 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 09:19:48 +0000 Subject: Change in osmo-ttcn3-hacks[master]: add a test for LU with invalid LAI In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/12380 ) Change subject: add a test for LU with invalid LAI ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/12380/2/msc/MSC_Tests.ttcn File msc/MSC_Tests.ttcn: https://gerrit.osmocom.org/#/c/12380/2/msc/MSC_Tests.ttcn at 2839 PS2, Line 2839: l3_lu.msgs.mm.locationUpdateRequest.locationAreaIdentification.mcc_mnc I think this is outright wrong. In GMM (layer3) which originates from within the phone, the LAI of the *previous* cell will be reported. So let's say you cross the border from DE to FR, then in the first LU in FR, your MS will report the LAI from DE. What you probably want to test here is that the Cell Identifier IE on the BSSMAP level in the complete layer3 info (generated by BSC) matches the MCC/MNC that's expected. so basically you would verify if the BSC MCC/MNC is configured correctly. -- To view, visit https://gerrit.osmocom.org/12380 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I676894358259b9cc0f973769ce552ba58a2a58a1 Gerrit-Change-Number: 12380 Gerrit-PatchSet: 2 Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Stefan Sperling Gerrit-CC: Harald Welte Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 10 May 2019 09:19:48 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 09:19:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 09:19:53 +0000 Subject: Change in osmo-ttcn3-hacks[master]: add a test for LU with invalid LAI In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/12380 ) Change subject: add a test for LU with invalid LAI ...................................................................... Patch Set 2: Code-Review-2 -- To view, visit https://gerrit.osmocom.org/12380 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I676894358259b9cc0f973769ce552ba58a2a58a1 Gerrit-Change-Number: 12380 Gerrit-PatchSet: 2 Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Stefan Sperling Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 10 May 2019 09:19:53 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 09:33:32 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 10 May 2019 09:33:32 +0000 Subject: Change in libosmocore[master]: gsm_23_003: add GSM23003_MSISDN_{MIN, MAX}_DIGITS Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/13961 Change subject: gsm_23_003: add GSM23003_MSISDN_{MIN,MAX}_DIGITS ...................................................................... gsm_23_003: add GSM23003_MSISDN_{MIN,MAX}_DIGITS Add the constant, so it can be used in create-subscriber-on-demand related patches. ITU-T Rec. E.164 6.1 states that maximum international number length should be 15. I did not find a source for a minimum length, but I've added the constant and set it to 1 for consistency (based on the existing osmo_msisdn_str_valid() function). Related: OS#2542 Change-Id: Idc74f4d94ad44b9fc1b6d43178f5f33d551ebfb1 --- M include/osmocom/gsm/protocol/gsm_23_003.h M src/gsm/gsm23003.c 2 files changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/61/13961/1 diff --git a/include/osmocom/gsm/protocol/gsm_23_003.h b/include/osmocom/gsm/protocol/gsm_23_003.h index be1b157..3e5c3e5 100644 --- a/include/osmocom/gsm/protocol/gsm_23_003.h +++ b/include/osmocom/gsm/protocol/gsm_23_003.h @@ -20,6 +20,9 @@ #define GSM23003_MME_CODE_NUM_BYTES 1 #define GSM23003_MME_GROUP_NUM_BYTES 2 #define GSM23003_MTMSI_NUM_BYTES 4 +/* Chapter 3.2 */ +#define GSM23003_MSISDN_MAX_DIGITS 15 /* ITU-T Rec. E.164 6.1 */ +#define GSM23003_MSISDN_MIN_DIGITS 1 /* Chapter 6.2.1 */ #define GSM23003_IMEI_TAC_NUM_DIGITS 8 #define GSM23003_IMEI_SNR_NUM_DIGITS 6 diff --git a/src/gsm/gsm23003.c b/src/gsm/gsm23003.c index 2252f70..a97ed07 100644 --- a/src/gsm/gsm23003.c +++ b/src/gsm/gsm23003.c @@ -69,7 +69,7 @@ */ bool osmo_msisdn_str_valid(const char *msisdn) { - return is_n_digits(msisdn, 1, 15); + return is_n_digits(msisdn, GSM23003_MSISDN_MIN_DIGITS, GSM23003_MSISDN_MAX_DIGITS); } /*! Determine whether the given IMEI is valid according to 3GPP TS 23.003, -- To view, visit https://gerrit.osmocom.org/13961 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Idc74f4d94ad44b9fc1b6d43178f5f33d551ebfb1 Gerrit-Change-Number: 13961 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 09:53:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 09:53:09 +0000 Subject: Change in libosmocore[master]: Revert "Print error message if application fails to call rate_ctr_ini... Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13962 Change subject: Revert "Print error message if application fails to call rate_ctr_init()" ...................................................................... Revert "Print error message if application fails to call rate_ctr_init()" This reverts commit 9685a48c7bc83b1f5ee9b51e29419164b387ade2 which has caused massive fall-out among (particularly) unit tests in osmo-{msc,bts,pcu}. Change-Id: Iede72e86451d94cf678045992cb71f6b1bf16896 --- M src/rate_ctr.c 1 file changed, 2 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/13962/1 diff --git a/src/rate_ctr.c b/src/rate_ctr.c index 99ec523..026670b 100644 --- a/src/rate_ctr.c +++ b/src/rate_ctr.c @@ -69,7 +69,7 @@ #include static LLIST_HEAD(rate_ctr_groups); -static struct osmo_timer_list rate_ctr_timer; + static void *tall_rate_ctr_ctx; @@ -217,10 +217,6 @@ unsigned int size; struct rate_ctr_group *group; - if (!osmo_timer_pending(&rate_ctr_timer)) - LOGP(DLGLOBAL, LOGL_ERROR, "your program appears to use libosmocore rate_ctr " - "without calling rate_ctr_init() at start-up. Rate counters won't work!\n"); - if (rate_ctr_get_group_by_name_idx(desc->group_name_prefix, idx)) { unsigned int new_idx = rate_ctr_get_unused_name_idx(desc->group_name_prefix); LOGP(DLGLOBAL, LOGL_ERROR, "counter group '%s' already exists for index %u," @@ -298,6 +294,7 @@ ctr->intv[intv+1].rate += ctr->intv[intv].rate; } +static struct osmo_timer_list rate_ctr_timer; static uint64_t timer_ticks; /* The one-second interval has expired */ -- To view, visit https://gerrit.osmocom.org/13962 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Iede72e86451d94cf678045992cb71f6b1bf16896 Gerrit-Change-Number: 13962 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 09:56:20 2019 From: gerrit-no-reply at lists.osmocom.org (tnt) Date: Fri, 10 May 2019 09:56:20 +0000 Subject: Change in osmo-msc[master]: libmsc: Make sure to not dereference a NULL trans Message-ID: tnt has uploaded this change for review. ( https://gerrit.osmocom.org/13963 Change subject: libmsc: Make sure to not dereference a NULL trans ...................................................................... libmsc: Make sure to not dereference a NULL trans All those were identified by gcc. At this point in the code, trans is NULL and so you can't call LOG_TRANS because it will try to access the log_subsys field. Instead call LOG_TRANS_CAT with manually specified category where applicable (or other logging primitive depending on what the surrounding code does) Change-Id: Ia14bd28e1db570c487ad8e90e29a69208e2226f2 Signed-off-by: Sylvain Munaut --- M src/libmsc/gsm_04_08_cc.c M src/libmsc/gsm_04_11.c M src/libmsc/gsm_09_11.c M src/libmsc/transaction.c 4 files changed, 12 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/63/13963/1 diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c index 2869bba..7d09e0e 100644 --- a/src/libmsc/gsm_04_08_cc.c +++ b/src/libmsc/gsm_04_08_cc.c @@ -1888,7 +1888,7 @@ trans = trans_alloc(net, vsub, TRANS_CC, TRANS_ID_UNASSIGNED, data->callref); if (!trans) { - LOG_TRANS(trans, LOGL_ERROR, "No memory for trans.\n"); + LOG_TRANS_CAT(trans, DCC, LOGL_ERROR, "No memory for trans.\n"); vlr_subscr_put(vsub, __func__); /* Ressource unavailable */ mncc_release_ind(net, NULL, data->callref, @@ -2102,12 +2102,12 @@ int i, rc = 0; if (msg_type & 0x80) { - LOG_TRANS(trans, LOGL_DEBUG, "MSG 0x%2x not defined for PD error\n", msg_type); + LOG_TRANS_CAT(trans, DCC, LOGL_DEBUG, "MSG 0x%2x not defined for PD error\n", msg_type); return -EINVAL; } if (!vsub) { - LOG_TRANS(trans, LOGL_ERROR, "Invalid conn: no subscriber\n"); + LOG_TRANS_CAT(trans, DCC, LOGL_ERROR, "Invalid conn: no subscriber\n"); return -EINVAL; } @@ -2121,7 +2121,7 @@ TRANS_CC, transaction_id, msc_cc_next_outgoing_callref()); if (!trans) { - LOG_TRANS(trans, LOGL_ERROR, "No memory for trans.\n"); + LOG_TRANS_CAT(trans, DCC, LOGL_ERROR, "No memory for trans.\n"); rc = gsm48_tx_simple(msc_a, GSM48_PDISC_CC | (transaction_id << 4), GSM48_MT_CC_RELEASE_COMPL); diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c index 22e55dd..d5c2516 100644 --- a/src/libmsc/gsm_04_11.c +++ b/src/libmsc/gsm_04_11.c @@ -1008,7 +1008,7 @@ /* Allocate a new transaction */ struct gsm_trans *trans = trans_alloc(net, vsub, TRANS_SMS, tid, new_callref++); if (!trans) { - LOG_TRANS(trans, LOGL_ERROR, "No memory for transaction\n"); + LOG_TRANS_CAT(trans, DLSMS, LOGL_ERROR, "No memory for transaction\n"); return NULL; } @@ -1072,7 +1072,7 @@ /* Generate a new transaction ID */ tid = trans_assign_trans_id(net, vsub, TRANS_SMS); if (tid == -1) { - LOG_TRANS(trans, LOGL_ERROR, "No available transaction IDs\n"); + LOG_TRANS_CAT(trans, DLSMS, LOGL_ERROR, "No available transaction IDs\n"); return NULL; } @@ -1227,7 +1227,7 @@ * A transaction we created but don't know about? */ if (!trans && (transaction_id & 0x8) == 0) { - LOG_TRANS(trans, LOGL_ERROR, "trans_id=%x allocated by us but known " + LOG_TRANS_CAT(trans, DLSMS, LOGL_ERROR, "trans_id=%x allocated by us but known " "to us anymore. We are ignoring it, maybe a CP-ERROR " "from a MS?\n", transaction_id); diff --git a/src/libmsc/gsm_09_11.c b/src/libmsc/gsm_09_11.c index 984cc53..500da3a 100644 --- a/src/libmsc/gsm_09_11.c +++ b/src/libmsc/gsm_09_11.c @@ -135,8 +135,8 @@ * a supplementary service. */ if (msg_type != GSM0480_MTYPE_REGISTER) { - LOG_TRANS(trans, LOGL_ERROR, "Rx wrong SS/USSD message type for new transaction: %s\n", - gsm48_pdisc_msgtype_name(GSM48_PDISC_NC_SS, msg_type)); + LOG_MSC_A(msc_a, LOGL_ERROR, "Rx wrong SS/USSD message type for new transaction: %s\n", + gsm48_pdisc_msgtype_name(GSM48_PDISC_NC_SS, msg_type)); gsm48_tx_simple(msc_a, GSM48_PDISC_NC_SS | (tid << 4), GSM0480_MTYPE_RELEASE_COMPLETE); @@ -145,7 +145,7 @@ trans = trans_alloc(net, vsub, TRANS_USSD, tid, new_callref++); if (!trans) { - LOG_TRANS(trans, LOGL_ERROR, " -> No memory for trans\n"); + LOG_MSC_A(msc_a, LOGL_ERROR, " -> No memory for trans\n"); gsm48_tx_simple(msc_a, GSM48_PDISC_NC_SS | (tid << 4), GSM0480_MTYPE_RELEASE_COMPLETE); @@ -322,7 +322,7 @@ TRANS_ID_UNASSIGNED, gsup_msg->session_id); if (!trans) { - LOG_TRANS(trans, LOGL_ERROR, " -> No memory for trans\n"); + LOG_TRANS_CAT(trans, DMM, LOGL_ERROR, " -> No memory for trans\n"); return NULL; } diff --git a/src/libmsc/transaction.c b/src/libmsc/transaction.c index d6f8c3b..161b180 100644 --- a/src/libmsc/transaction.c +++ b/src/libmsc/transaction.c @@ -131,7 +131,7 @@ /* a valid subscriber is indispensable */ if (vsub == NULL) { - LOG_TRANS(trans, LOGL_ERROR, "unable to alloc transaction, invalid subscriber (NULL)\n"); + LOG_TRANS_CAT(trans, DMSC, LOGL_ERROR, "unable to alloc transaction, invalid subscriber (NULL)\n"); return NULL; } -- To view, visit https://gerrit.osmocom.org/13963 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ia14bd28e1db570c487ad8e90e29a69208e2226f2 Gerrit-Change-Number: 13963 Gerrit-PatchSet: 1 Gerrit-Owner: tnt -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 09:56:30 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 09:56:30 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Add a test for LU with invalid MCC/MNC in BSSAP/RANAP In-Reply-To: References: Message-ID: Harald Welte has uploaded a new patch set (#3) to the change originally created by Stefan Sperling. ( https://gerrit.osmocom.org/12380 ) Change subject: msc: Add a test for LU with invalid MCC/MNC in BSSAP/RANAP ...................................................................... msc: Add a test for LU with invalid MCC/MNC in BSSAP/RANAP Verify that the MSC rejects a location update from a Cell/BSC that contains a PLMN which does not match the core network's PLMN. Related: OS#3162 Change-Id: I676894358259b9cc0f973769ce552ba58a2a58a1 --- M msc/MSC_Tests.ttcn M msc/MSC_Tests_Iu.ttcn 2 files changed, 43 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/80/12380/3 -- To view, visit https://gerrit.osmocom.org/12380 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I676894358259b9cc0f973769ce552ba58a2a58a1 Gerrit-Change-Number: 12380 Gerrit-PatchSet: 3 Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Stefan Sperling Gerrit-CC: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 09:58:17 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 09:58:17 +0000 Subject: Change in libosmocore[master]: Log: add stdout target In-Reply-To: References: Message-ID: Harald Welte has abandoned this change. ( https://gerrit.osmocom.org/12093 ) Change subject: Log: add stdout target ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/12093 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: Ia786361f5f687e43b27d87a45b4630bca58bcfe8 Gerrit-Change-Number: 12093 Gerrit-PatchSet: 2 Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:00:06 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:00:06 +0000 Subject: Change in osmo-msc[master]: Log: don't print CallRef prefix In-Reply-To: References: Message-ID: Harald Welte has abandoned this change. ( https://gerrit.osmocom.org/12570 ) Change subject: Log: don't print CallRef prefix ...................................................................... Abandoned osmo-msc has changed too much -- To view, visit https://gerrit.osmocom.org/12570 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: Icae21a44c7d4010145bcb570187ce9b58092e5a9 Gerrit-Change-Number: 12570 Gerrit-PatchSet: 2 Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:02:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:02:18 +0000 Subject: Change in libosmocore[master]: Change GSM48_PDISC_* to enum type In-Reply-To: References: Message-ID: Harald Welte has uploaded a new patch set (#3) to the change originally created by Max. ( https://gerrit.osmocom.org/12572 ) Change subject: Change GSM48_PDISC_* to enum type ...................................................................... Change GSM48_PDISC_* to enum type An enum is more clear than an int and #defines for passing around, also in case you have a switch () statement, the compiler will issue warnings for unhandled cases. Change-Id: Icbbe8786a776081d7643193f154e6270224399e6 --- M include/osmocom/gsm/protocol/gsm_04_08.h 1 file changed, 20 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/72/12572/3 -- To view, visit https://gerrit.osmocom.org/12572 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Icbbe8786a776081d7643193f154e6270224399e6 Gerrit-Change-Number: 12572 Gerrit-PatchSet: 3 Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-CC: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:02:41 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:02:41 +0000 Subject: Change in libosmocore[master]: Revert "Print error message if application fails to call rate_ctr_ini... In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13962 ) Change subject: Revert "Print error message if application fails to call rate_ctr_init()" ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13962 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iede72e86451d94cf678045992cb71f6b1bf16896 Gerrit-Change-Number: 13962 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 10 May 2019 10:02:41 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:02:42 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:02:42 +0000 Subject: Change in libosmocore[master]: Revert "Print error message if application fails to call rate_ctr_ini... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13962 ) Change subject: Revert "Print error message if application fails to call rate_ctr_init()" ...................................................................... Revert "Print error message if application fails to call rate_ctr_init()" This reverts commit 9685a48c7bc83b1f5ee9b51e29419164b387ade2 which has caused massive fall-out among (particularly) unit tests in osmo-{msc,bts,pcu}. Change-Id: Iede72e86451d94cf678045992cb71f6b1bf16896 --- M src/rate_ctr.c 1 file changed, 2 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/rate_ctr.c b/src/rate_ctr.c index 99ec523..026670b 100644 --- a/src/rate_ctr.c +++ b/src/rate_ctr.c @@ -69,7 +69,7 @@ #include static LLIST_HEAD(rate_ctr_groups); -static struct osmo_timer_list rate_ctr_timer; + static void *tall_rate_ctr_ctx; @@ -217,10 +217,6 @@ unsigned int size; struct rate_ctr_group *group; - if (!osmo_timer_pending(&rate_ctr_timer)) - LOGP(DLGLOBAL, LOGL_ERROR, "your program appears to use libosmocore rate_ctr " - "without calling rate_ctr_init() at start-up. Rate counters won't work!\n"); - if (rate_ctr_get_group_by_name_idx(desc->group_name_prefix, idx)) { unsigned int new_idx = rate_ctr_get_unused_name_idx(desc->group_name_prefix); LOGP(DLGLOBAL, LOGL_ERROR, "counter group '%s' already exists for index %u," @@ -298,6 +294,7 @@ ctr->intv[intv+1].rate += ctr->intv[intv].rate; } +static struct osmo_timer_list rate_ctr_timer; static uint64_t timer_ticks; /* The one-second interval has expired */ -- To view, visit https://gerrit.osmocom.org/13962 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iede72e86451d94cf678045992cb71f6b1bf16896 Gerrit-Change-Number: 13962 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:03:11 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:03:11 +0000 Subject: Change in osmo-msc[master]: Add tests for transaction routines In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/12556 ) Change subject: Add tests for transaction routines ...................................................................... Patch Set 11: I presume the MSC has changed too far to still make use of this? In that case, please aandon. -- To view, visit https://gerrit.osmocom.org/12556 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I78dfb7cd35073a305cf668beda7d9d58d5a5a713 Gerrit-Change-Number: 12556 Gerrit-PatchSet: 11 Gerrit-Owner: Max Gerrit-Assignee: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 10 May 2019 10:03:11 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:04:14 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:04:14 +0000 Subject: Change in libosmocore[master]: LCLS: don't encode incorrect values In-Reply-To: References: Message-ID: Harald Welte has abandoned this change. ( https://gerrit.osmocom.org/12375 ) Change subject: LCLS: don't encode incorrect values ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/12375 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: I9ac4bae75f5796e6e11346b8cb34d3897ae70b59 Gerrit-Change-Number: 12375 Gerrit-PatchSet: 3 Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Stefan Sperling Gerrit-CC: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:04:30 2019 From: gerrit-no-reply at lists.osmocom.org (Mykola Shchetinin) Date: Fri, 10 May 2019 10:04:30 +0000 Subject: Change in libosmocore[master]: osmo_sock_get_name_*: Ensure string is returned in error case In-Reply-To: References: Message-ID: Mykola Shchetinin has posted comments on this change. ( https://gerrit.osmocom.org/13960 ) Change subject: osmo_sock_get_name_*: Ensure string is returned in error case ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/13960/1/src/socket.c File src/socket.c: https://gerrit.osmocom.org/#/c/13960/1/src/socket.c at 815 PS1, Line 815: osmo_strlcpy(str, "", str_len); Isn't str rewritten in the following line (call to snprintf)? -- To view, visit https://gerrit.osmocom.org/13960 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2d56327e96b7a6783cca38b828c5ee74aed776ae Gerrit-Change-Number: 13960 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Mykola Shchetinin Gerrit-Comment-Date: Fri, 10 May 2019 10:04:30 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:05:01 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:05:01 +0000 Subject: Change in osmocom-bb[master]: bsic decoding of neighbour cells in dedicated mode and partially succ... In-Reply-To: References: Message-ID: Harald Welte has abandoned this change. ( https://gerrit.osmocom.org/5490 ) Change subject: bsic decoding of neighbour cells in dedicated mode and partially success in synchronized handover ...................................................................... Abandoned unfortunately the original submitter went away without adressing any of the review comments. Very sad to see :( -- To view, visit https://gerrit.osmocom.org/5490 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: Ib01460b796d2107c4599d327e184eb42340999d2 Gerrit-Change-Number: 5490 Gerrit-PatchSet: 1 Gerrit-Owner: Muhammad Awais Aslam Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:06:37 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:06:37 +0000 Subject: Change in libosmocore[master]: Add function to estimate elapsed time In-Reply-To: References: Message-ID: Harald Welte has removed a vote on this change. Change subject: Add function to estimate elapsed time ...................................................................... Removed Code-Review+2 by Harald Welte -- To view, visit https://gerrit.osmocom.org/5103 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: deleteVote Gerrit-Change-Id: I83d865ff633a7ebda2c943477205fd31aceda277 Gerrit-Change-Number: 5103 Gerrit-PatchSet: 6 Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:08:54 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:08:54 +0000 Subject: Change in libosmocore[master]: Add osmo_init_logging_std*() In-Reply-To: References: Message-ID: Harald Welte has abandoned this change. ( https://gerrit.osmocom.org/12094 ) Change subject: Add osmo_init_logging_std*() ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/12094 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: I0fe8dc4a41aba4e4509540266e229700e8ec083c Gerrit-Change-Number: 12094 Gerrit-PatchSet: 2 Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:09:38 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:09:38 +0000 Subject: Change in osmo-ttcn3-hacks[master]: add three tests for CIPHER MODE COMPLETE without algo In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/12347 ) Change subject: add three tests for CIPHER MODE COMPLETE without algo ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/12347 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1a2a126795c544613a7a87e238e1fc8c4e943885 Gerrit-Change-Number: 12347 Gerrit-PatchSet: 1 Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 10 May 2019 10:09:38 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:10:21 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 10 May 2019 10:10:21 +0000 Subject: Change in osmo-hlr[master]: db_hlr.c: db_subscr_create(): add flags argument In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#3) to the change originally created by Vadim Yanitskiy. ( https://gerrit.osmocom.org/13711 ) Change subject: db_hlr.c: db_subscr_create(): add flags argument ...................................................................... db_hlr.c: db_subscr_create(): add flags argument Allow creating new subscribers without giving them access to CS or PS. This will be used by the create-subscriber-on-demand feature. Related: OS#2542 Change-Id: I1a6dd85387723dab5487c53b33d2d9ec6d05d006 --- M src/db.c M src/db.h M src/db_hlr.c M src/hlr_db_tool.c M src/hlr_vty_subscr.c M tests/db/db_test.c M tests/db/db_test.err 7 files changed, 100 insertions(+), 37 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/11/13711/3 -- To view, visit https://gerrit.osmocom.org/13711 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1a6dd85387723dab5487c53b33d2d9ec6d05d006 Gerrit-Change-Number: 13711 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:10:21 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 10 May 2019 10:10:21 +0000 Subject: Change in osmo-hlr[master]: Create subscribers on demand In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#3) to the change originally created by Vadim Yanitskiy. ( https://gerrit.osmocom.org/13713 ) Change subject: Create subscribers on demand ...................................................................... Create subscribers on demand Add a new vty option and allow to optionally generate a random msisdn, as well as setting the default NAM: subscriber-create-on-demand (no-extension|<3-15>) (none|cs|ps|both) Thanks to Vadim for the random MSISDN patch [1], which was squashed into this one. [1] Change-Id: I475c71f9902950fa7498855a616e1ec231fad6ac Related: OS#2542 Depends on: Idc74f4d94ad44b9fc1b6d43178f5f33d551ebfb1 (libosmocore) Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd --- M src/hlr.c M src/hlr.h M src/hlr_vty.c M tests/test_nodes.vty A tests/test_subscr_create_on_demand.vty 5 files changed, 169 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/13/13713/3 -- To view, visit https://gerrit.osmocom.org/13713 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd Gerrit-Change-Number: 13713 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:10:21 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 10 May 2019 10:10:21 +0000 Subject: Change in osmo-hlr[master]: Document subscribers create on demand feature In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#4) to the change originally created by Vadim Yanitskiy. ( https://gerrit.osmocom.org/13715 ) Change subject: Document subscribers create on demand feature ...................................................................... Document subscribers create on demand feature Add a new section in the subscribers chapter, with detailed explanation of the use cases and related OsmoHLR and OsmoMSC configuration. Related: OS#2542 Change-Id: I2dd4a56f7b8be8b5d0e6fc32e04459e5e278d0a9 --- M doc/manuals/chapters/subscribers.adoc 1 file changed, 21 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/15/13715/4 -- To view, visit https://gerrit.osmocom.org/13715 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2dd4a56f7b8be8b5d0e6fc32e04459e5e278d0a9 Gerrit-Change-Number: 13715 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:11:07 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 10 May 2019 10:11:07 +0000 Subject: Change in osmo-hlr[master]: db_hlr.c: db_subscr_create(): add flags argument In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/13711 ) Change subject: db_hlr.c: db_subscr_create(): add flags argument ...................................................................... Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/13711/2/src/db.h File src/db.h: https://gerrit.osmocom.org/#/c/13711/2/src/db.h at 121 PS2, Line 121: > a bitmask makes a lot of sense. [?] Done, using a bitmask now. -- To view, visit https://gerrit.osmocom.org/13711 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1a6dd85387723dab5487c53b33d2d9ec6d05d006 Gerrit-Change-Number: 13711 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 10 May 2019 10:11:07 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From jenkins at lists.osmocom.org Fri May 10 10:11:37 2019 From: jenkins at lists.osmocom.org (jenkins at lists.osmocom.org) Date: Fri, 10 May 2019 10:11:37 +0000 (UTC) Subject: =?UTF-8?Q?Jenkins_build_is_back_to_normal?= =?UTF-8?Q?_:_master-osmo-gmr_=C2=BB_a1=3Ddefault?= =?UTF-8?Q?,a2=3Ddefault,a3=3Ddefault,a4=3Ddefau?= =?UTF-8?Q?lt,osmocom-master-debian9_#1852?= In-Reply-To: <1349755487.2448.1557472622568.JavaMail.jenkins@jenkins.osmocom.org> References: <1349755487.2448.1557472622568.JavaMail.jenkins@jenkins.osmocom.org> Message-ID: <1601680759.2490.1557483097927.JavaMail.jenkins@jenkins.osmocom.org> See From gerrit-no-reply at lists.osmocom.org Fri May 10 10:11:30 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 10 May 2019 10:11:30 +0000 Subject: Change in osmo-hlr[master]: Create subscribers on demand In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/13713 ) Change subject: Create subscribers on demand ...................................................................... Patch Set 3: (5 comments) jenkins will fail to build this, due to the libosmocore dependency. https://gerrit.osmocom.org/#/c/13713/2/src/hlr.h File src/hlr.h: https://gerrit.osmocom.org/#/c/13713/2/src/hlr.h at 63 PS2, Line 63: uin > unsigned Done https://gerrit.osmocom.org/#/c/13713/2/src/hlr.c File src/hlr.c: https://gerrit.osmocom.org/#/c/13713/2/src/hlr.c at 154 PS2, Line 154: > AFAIR, I just used a random number, because in the original patch the MSISDN length was hard-coded. [?] I've added the constant here, and use that in the next patch: https://gerrit.osmocom.org/#/c/libosmocore/+/13961 https://gerrit.osmocom.org/#/c/13713/2/src/hlr.c at 178 PS2, Line 178: if (!rc) > I just realized that we may end up with an infinity loop here, if osmo_get_rand_id() constantly fail [?] Done https://gerrit.osmocom.org/#/c/13713/2/src/hlr_vty.c File src/hlr_vty.c: https://gerrit.osmocom.org/#/c/13713/2/src/hlr_vty.c at 362 PS2, Line 362: efau > it's a bit tricky. I think 3GPP calls it "combined". You can e.g. [?] Changed to "cs+ps" https://gerrit.osmocom.org/#/c/13713/2/src/hlr_vty.c at 365 PS2, Line 365: ircuit and packet switched NAM > I thought it's "Network Access Mode" :D lol, wikipedia tricked me there ;D -- To view, visit https://gerrit.osmocom.org/13713 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd Gerrit-Change-Number: 13713 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 10 May 2019 10:11:30 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:12:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:12:19 +0000 Subject: Change in osmo-ttcn3-hacks[master]: add three tests for CIPHER MODE COMPLETE without algo In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/12347 ) Change subject: add three tests for CIPHER MODE COMPLETE without algo ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/12347/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/#/c/12347/1//COMMIT_MSG at 14 PS1, Line 14: but they should somehow verify the : cipher the MSC ends up using The MSC is not using any cipher. The BTS and the MS are implementing ciphering, under instruction from the MSC. -- To view, visit https://gerrit.osmocom.org/12347 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1a2a126795c544613a7a87e238e1fc8c4e943885 Gerrit-Change-Number: 12347 Gerrit-PatchSet: 1 Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 10 May 2019 10:12:19 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:25:10 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:25:10 +0000 Subject: Change in osmo-ttcn3-hacks[master]: add three tests for CIPHER MODE COMPLETE without algo In-Reply-To: References: Message-ID: Harald Welte has uploaded a new patch set (#2) to the change originally created by Stefan Sperling. ( https://gerrit.osmocom.org/12347 ) Change subject: add three tests for CIPHER MODE COMPLETE without algo ...................................................................... add three tests for CIPHER MODE COMPLETE without algo Add three tests which exercise MSC behaviour when a CIPHER MODE COMPLETE command lacks the optional chosenEncryptionAlgorithm IE. Check for behaviour with A5/1, A5/3, and A5/1 + A5/3 configured in the network, and expect the location update to succeed. These tests pass on master, but they should somehow verify the cipher the MSC ends up using. I am not quite sure how to do that. Would inspecting the MSC's VTY be a reasonable approach? How could his be done by code which runs on BSC_ConnectionHandler? Change-Id: I1a2a126795c544613a7a87e238e1fc8c4e943885 Related: OS#2872 --- M library/BSSMAP_Templates.ttcn M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.cfg M msc/MSC_Tests.ttcn 4 files changed, 120 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/47/12347/2 -- To view, visit https://gerrit.osmocom.org/12347 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1a2a126795c544613a7a87e238e1fc8c4e943885 Gerrit-Change-Number: 12347 Gerrit-PatchSet: 2 Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:26:36 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:26:36 +0000 Subject: Change in osmo-msc[master]: add BSC/MSC neighbor VTY commands for inter-MSC HO In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/12446 ) Change subject: add BSC/MSC neighbor VTY commands for inter-MSC HO ...................................................................... Patch Set 2: assigning to neels. I suppose this is obsolete now and can be abandoned? -- To view, visit https://gerrit.osmocom.org/12446 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia0dd08b087bfd4aa22e234917669d003150a4cd4 Gerrit-Change-Number: 12446 Gerrit-PatchSet: 2 Gerrit-Owner: Stefan Sperling Gerrit-Assignee: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Stefan Sperling Gerrit-CC: Harald Welte Gerrit-Comment-Date: Fri, 10 May 2019 10:26:36 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:27:58 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:27:58 +0000 Subject: Change in osmocom-bb[master]: firmware: implement reading of factory RF calibration values In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/12887 ) Change subject: firmware: implement reading of factory RF calibration values ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/12887 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icf2693b751d86ec1d2563412d606c13d4c91a806 Gerrit-Change-Number: 12887 Gerrit-PatchSet: 5 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-Comment-Date: Fri, 10 May 2019 10:27:58 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:28:11 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:28:11 +0000 Subject: Change in osmocom-bb[master]: firmware: implement reading of factory RF calibration values In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/12887 ) Change subject: firmware: implement reading of factory RF calibration values ...................................................................... Patch Set 5: @fixeria, what does it take to get this merged? -- To view, visit https://gerrit.osmocom.org/12887 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icf2693b751d86ec1d2563412d606c13d4c91a806 Gerrit-Change-Number: 12887 Gerrit-PatchSet: 5 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-Comment-Date: Fri, 10 May 2019 10:28:11 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:31:28 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:31:28 +0000 Subject: Change in osmo-msc[master]: build osmo-msc: add "missing" LIBASN1C_LIBS In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/7306 ) Change subject: build osmo-msc: add "missing" LIBASN1C_LIBS ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/7306 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I39ae5e3f0f7661ca9ee5c17a500be28c461d7ec7 Gerrit-Change-Number: 7306 Gerrit-PatchSet: 3 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Comment-Date: Fri, 10 May 2019 10:31:28 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:32:00 2019 From: gerrit-no-reply at lists.osmocom.org (tnt) Date: Fri, 10 May 2019 10:32:00 +0000 Subject: Change in osmo-trx[master]: transceiver: RSSI was calculated reverse. In-Reply-To: References: Message-ID: tnt has posted comments on this change. ( https://gerrit.osmocom.org/9598 ) Change subject: transceiver: RSSI was calculated reverse. ...................................................................... Patch Set 2: The 'RSSI' definitely seems to be 'opposite' logic ... not sure why. But the field in the 'TX' path is also the same, see line 360 during the scaling. Other parts seem to be as well. (see the noise math a bit below). It seems all pretty confusing and I don't really see why. My only guess would be that someone wanted a uint8_t on the wire with '0' begin the 'max' and rising value meaning smaller signals received / transmitted. But then at someother point variables are named dBm (which it's definitely not). I'm not sure if there is a document that specifies exactly what we want on the trx interface ? -- To view, visit https://gerrit.osmocom.org/9598 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iaa4eda4660dbe155ac1c782b77316ef504ef00c5 Gerrit-Change-Number: 9598 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Assignee: tnt Gerrit-Reviewer: Alexander Chemeris Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Pau Espin Pedrol Gerrit-CC: tnt Gerrit-Comment-Date: Fri, 10 May 2019 10:32:00 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:36:31 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 10:36:31 +0000 Subject: Change in libosmocore[master]: gsm_23_003: add GSM23003_MSISDN_{MIN, MAX}_DIGITS In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13961 ) Change subject: gsm_23_003: add GSM23003_MSISDN_{MIN,MAX}_DIGITS ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/13961/1/include/osmocom/gsm/protocol/gsm_23_003.h File include/osmocom/gsm/protocol/gsm_23_003.h: https://gerrit.osmocom.org/#/c/13961/1/include/osmocom/gsm/protocol/gsm_23_003.h at 24 PS1, Line 24: GSM23003_MSISDN_MAX_DIGITS Regarding random MSISDN generation, we're really lucky :) OSMO_MAX_RAND_ID_LEN is 16, so we can safely use osmo_get_rand_id() for that. -- To view, visit https://gerrit.osmocom.org/13961 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Idc74f4d94ad44b9fc1b6d43178f5f33d551ebfb1 Gerrit-Change-Number: 13961 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 10 May 2019 10:36:31 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:38:31 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 10:38:31 +0000 Subject: Change in libosmocore[master]: Change GSM48_PDISC_* to enum type In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/12572 ) Change subject: Change GSM48_PDISC_* to enum type ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/12572 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icbbe8786a776081d7643193f154e6270224399e6 Gerrit-Change-Number: 12572 Gerrit-PatchSet: 3 Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 10 May 2019 10:38:31 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:41:50 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:41:50 +0000 Subject: =?UTF-8?Q?Change_in_libosmo-netif=5Bmaster=5D=3A_Bump_version=3A_0=2E4=2E0=2E1-738f_=E2=86=92_0=2E5=2E0?= Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13964 Change subject: Bump version: 0.4.0.1-738f ? 0.5.0 ...................................................................... Bump version: 0.4.0.1-738f ? 0.5.0 Change-Id: Iea2da939e259d0a9e7c5dad14d7a961434c276ef --- M debian/changelog M src/Makefile.am 2 files changed, 38 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/64/13964/1 diff --git a/debian/changelog b/debian/changelog index 6c56148..e3b19c9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,40 @@ +libosmo-netif (0.5.0) unstable; urgency=medium + + [ Max ] + * Stream examples: filter internal logging + * Stream examples: log sent/received bytes + * Stream examples: fix server's endless loop + * Add missing include + * Cosmetic: use #pragma once as include guard + * Stream client: fix doxygen typo + * Stream examples: print accepted client address + * Stream client: update logging + * Add socket name functions to stream client/server + * Stream client: fix disconnection logic + * Stream examples: fix typos in error message + * Ignore test binaries + * Stream client: report reconnection event as INFO + * Add stream client/server test + * Stream client: add disconnect callback + * Deprecate osmo_stream_cli_open2() + + [ Philipp Maier ] + * AMR: add spec reference for AMR frame types + * AMR: add define constants for AMR payload length + * AMR: add functions to convert between bw-efficient and octet-aligned + * amr: cosmetic: correct sourcecode formatting + * amr: be sure result of osmo_amr_bwe_to_oa() fits into int buf + * amr: use sizeof(struct amr_hdr) when working with amr header length + + [ Harald Welte ] + * debian: Add BuildDepends on libpcap0.8-dev + + [ Oliver Smith ] + * gitignore: add amr_test + * tests: AM_LDFLAGS = -noinstall for all tests + + -- Harald Welte Fri, 10 May 2019 12:40:03 +0200 + libosmo-netif (0.4.0) unstable; urgency=medium [ Neels Hofmeyr ] diff --git a/src/Makefile.am b/src/Makefile.am index d92d0f6..4d8b900 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,6 @@ # This is _NOT_ the library release version, it's an API version. # Please read Chapter 6 "Library interface versions" of the libtool documentation before making any modification -LIBVERSION=6:1:0 +LIBVERSION=7:0:1 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir) AM_CFLAGS= -fPIC -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOABIS_CFLAGS) $(COVERAGE_CFLAGS) $(LIBSCTP_CFLAGS) -- To view, visit https://gerrit.osmocom.org/13964 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Iea2da939e259d0a9e7c5dad14d7a961434c276ef Gerrit-Change-Number: 13964 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:42:42 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:42:42 +0000 Subject: Change in osmo-ci[master]: coverity: add OsmocomBB (without firmware) In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13388 ) Change subject: coverity: add OsmocomBB (without firmware) ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/13388 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2a4bcca411361484e872361dfd16d46189f52f35 Gerrit-Change-Number: 13388 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 10 May 2019 10:42:42 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:42:50 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:42:50 +0000 Subject: Change in osmo-ci[master]: coverity: add OsmocomBB (without firmware) In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13388 ) Change subject: coverity: add OsmocomBB (without firmware) ...................................................................... Patch Set 1: Code-Review+2 I'd say we give it a try -- To view, visit https://gerrit.osmocom.org/13388 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2a4bcca411361484e872361dfd16d46189f52f35 Gerrit-Change-Number: 13388 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 10 May 2019 10:42:50 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:43:23 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:43:23 +0000 Subject: Change in osmo-ci[master]: coverity: add OsmocomBB (without firmware) In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13388 ) Change subject: coverity: add OsmocomBB (without firmware) ...................................................................... Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/13388 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2a4bcca411361484e872361dfd16d46189f52f35 Gerrit-Change-Number: 13388 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 10 May 2019 10:43:23 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:43:24 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:43:24 +0000 Subject: Change in osmo-ci[master]: coverity: add OsmocomBB (without firmware) In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13388 ) Change subject: coverity: add OsmocomBB (without firmware) ...................................................................... coverity: add OsmocomBB (without firmware) Change-Id: I2a4bcca411361484e872361dfd16d46189f52f35 --- M coverity/build_Osmocom.sh M coverity/prepare_source_Osmcocom.sh 2 files changed, 10 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified Pau Espin Pedrol: Looks good to me, but someone else must approve diff --git a/coverity/build_Osmocom.sh b/coverity/build_Osmocom.sh index 650fa0e..ef45b7a 100755 --- a/coverity/build_Osmocom.sh +++ b/coverity/build_Osmocom.sh @@ -61,6 +61,12 @@ popd } +build_osmocombb() { + pushd osmocom-bb/src/ + make nofirmware + popd +} + cd "$src_dir" rm -rf "$prefix" @@ -92,3 +98,6 @@ build_default osmo-sip-connector build_default osmo-trx + +# OsmocomBB (without firmware) +build_osmocombb diff --git a/coverity/prepare_source_Osmcocom.sh b/coverity/prepare_source_Osmcocom.sh index 6f32474..065630f 100755 --- a/coverity/prepare_source_Osmcocom.sh +++ b/coverity/prepare_source_Osmcocom.sh @@ -26,6 +26,7 @@ osmo-sip-connector \ osmo-trx \ osmo-hlr \ + osmocom-bb \ ; do if [ -d $proj ]; then -- To view, visit https://gerrit.osmocom.org/13388 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I2a4bcca411361484e872361dfd16d46189f52f35 Gerrit-Change-Number: 13388 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:45:18 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 10:45:18 +0000 Subject: Change in libosmocore[master]: Change GSM48_PDISC_* to osmo_gsm48_pdisc enum type In-Reply-To: References: Message-ID: Vadim Yanitskiy has uploaded a new patch set (#4) to the change originally created by Max. ( https://gerrit.osmocom.org/12572 ) Change subject: Change GSM48_PDISC_* to osmo_gsm48_pdisc enum type ...................................................................... Change GSM48_PDISC_* to osmo_gsm48_pdisc enum type An enum is more clear than an int and #defines for passing around, also in case you have a switch () statement, the compiler will issue warnings for unhandled cases. Change-Id: Icbbe8786a776081d7643193f154e6270224399e6 --- M include/osmocom/gsm/protocol/gsm_04_08.h 1 file changed, 20 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/72/12572/4 -- To view, visit https://gerrit.osmocom.org/12572 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Icbbe8786a776081d7643193f154e6270224399e6 Gerrit-Change-Number: 12572 Gerrit-PatchSet: 4 Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:46:03 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:46:03 +0000 Subject: Change in osmo-ttcn3-hacks[master]: ggsn: Verify that there are no duplicate PCO protocolIDs In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13563 ) Change subject: ggsn: Verify that there are no duplicate PCO protocolIDs ...................................................................... Patch Set 3: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/13563/3/ggsn_tests/GGSN_Tests.ttcn File ggsn_tests/GGSN_Tests.ttcn: https://gerrit.osmocom.org/#/c/13563/3/ggsn_tests/GGSN_Tests.ttcn at 773 PS3, Line 773: f_PCO_ensure_no_duplicates(ctx.pco_neg); > What about adding this kind of check inside f_pdp_ctx_act so we don't need to put it in every test? [?] I don't have time to work on this now, and I'd rather improve our test coverage with this test case than keep this out of master for another month :/ -- To view, visit https://gerrit.osmocom.org/13563 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9d439dab1696196cd125f4d7113b426f1711a405 Gerrit-Change-Number: 13563 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 10 May 2019 10:46:03 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:46:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:46:05 +0000 Subject: Change in osmo-ttcn3-hacks[master]: ggsn: Verify that there are no duplicate PCO protocolIDs In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13563 ) Change subject: ggsn: Verify that there are no duplicate PCO protocolIDs ...................................................................... ggsn: Verify that there are no duplicate PCO protocolIDs Introduce a function to verify there's no duplicate ProtocolIDs in the PCO returned from the GGSN. Change-Id: I9d439dab1696196cd125f4d7113b426f1711a405 Related: OS#3914 --- M ggsn_tests/GGSN_Tests.ttcn 1 file changed, 37 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Pau Espin Pedrol: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn index 398aed3..d793d27 100644 --- a/ggsn_tests/GGSN_Tests.ttcn +++ b/ggsn_tests/GGSN_Tests.ttcn @@ -726,6 +726,33 @@ T_default.stop; } + /* list of protocols where we don't accept duplicates */ + const OCT2List protocol_ids_nodupes := { 'C021'O, 'C023'O, 'C223'O, '8021'O }; + private function f_PCO_permits_duplicates(OCT2 id) return boolean { + var integer i; + for (i := 0; i < lengthof(protocol_ids_nodupes); i := i+1) { + if (id == protocol_ids_nodupes[i]) { + return false; + } + } + return true; + } + + /* ensure that every given protocol Identifier exist only exactly once in the PCO */ + function f_PCO_ensure_no_duplicates(ProtConfigOptions pco) { + var OCT2List protocol_ids := {}; + var integer i, j; + for (i := 0; i < lengthof(pco.protocols); i := i+1) { + var OCT2 id := pco.protocols[i].protocolID; + for (j := 0; j < lengthof(protocol_ids); j := j+1) { + if (not f_PCO_permits_duplicates(id) and id == protocol_ids[j]) { + setverdict(fail, "Duplicate ProtocolID ", id, " already present in ", pco.protocols); + } + } + protocol_ids := protocol_ids & { id }; + } + } + /* Test IPv6 context activation for dynamic IPv6 EUA without request of IPv6 DNS */ testcase TC_pdp6_act_deact() runs on GT_CT { f_init(); @@ -743,6 +770,7 @@ ctx.pco_req := valueof(ts_PCO_IPv6_DNS); f_pdp_ctx_act(ctx); + f_PCO_ensure_no_duplicates(ctx.pco_neg); /* verify PCO contains both primary and secondary DNS */ var OCT4 ggsn_ip6_dns1 := f_inet6_addr(m_ggsn_ip6_dns1); if (not match(f_PCO_extract_proto(ctx.pco_neg, '0003'O, 1), ggsn_ip6_dns1)) { @@ -765,6 +793,7 @@ ctx.pco_req := valueof(ts_PCO_IPv6_DNS); f_pdp_ctx_act(ctx); + f_PCO_ensure_no_duplicates(ctx.pco_neg); //f_send_gtpu(ctx, c_router_solicit); //f_send_gtpu(ctx, c_neigh_solicit); @@ -865,6 +894,7 @@ var PdpContext ctx := valueof(t_DefinePDP(f_rnd_imsi('26242'H), '1234'O, c_ApnInternet, valueof(t_EuaIPv4Dyn))); ctx.pco_req := valueof(ts_PCO_IPv4_DNS_IPCP); f_pdp_ctx_act(ctx); + f_PCO_ensure_no_duplicates(ctx.pco_neg); /* verify IPCP is at all contained */ if (not match(ctx.pco_neg, tr_PCO_Contains('8021'O))) { setverdict(fail, "IPCP not found in PCO"); @@ -888,6 +918,7 @@ ctx.pco_req := valueof(ts_PCO_IPv4_DNS_CONT); f_pdp_ctx_act(ctx); + f_PCO_ensure_no_duplicates(ctx.pco_neg); /* verify PCO contains both primary and secondary DNS */ var OCT4 ggsn_ip4_dns1 := f_inet_addr(m_ggsn_ip4_dns1); if (not match(f_PCO_extract_proto(ctx.pco_neg, '000d'O, 1), ggsn_ip4_dns1)) { @@ -910,6 +941,7 @@ ctx.pco_req := valueof(ts_PCO_IPv4_DNS_CONT); f_pdp_ctx_act(ctx); + f_PCO_ensure_no_duplicates(ctx.pco_neg); var OCT4 dns1_addr := f_PCO_extract_proto(ctx.pco_neg, '000d'O); /* Check if we can use valid global src addr, should work */ @@ -986,6 +1018,7 @@ /* PCO with primary DNS only */ ctx.pco_req := valueof(ts_PCO_IPv4_PRI_DNS_IPCP); f_pdp_ctx_act(ctx); + f_PCO_ensure_no_duplicates(ctx.pco_neg); pco_neg_dns := f_PCO_extract_proto(ctx.pco_neg, '8021'O, 1); pco_neg_dns_expected := '0200000A8106'O & ggsn_ip4_dns1 /* Note: The prepended hex bytes encode the following information: @@ -1063,10 +1096,12 @@ var PdpContext ctx := valueof(t_DefinePDP(f_rnd_imsi('26242'H), '1234'O, c_ApnInet46, valueof(t_EuaIPv4Dynv6Dyn))); ctx.pco_req := valueof(ts_PCO_IPv4_DNS_IPCP); f_pdp_ctx_act(ctx); + f_PCO_ensure_no_duplicates(ctx.pco_neg); /* verify IPCP is at all contained */ if (not match(ctx.pco_neg, tr_PCO_Contains('8021'O))) { setverdict(fail, "IPCP not found in PCO"); } + f_PCO_ensure_no_duplicates(ctx.pco_neg); /* verify IPCP contains both primary and secondary IPv4 DNS */ var IpcpPacket ipcp := dec_IpcpPacket(f_PCO_extract_proto(ctx.pco_neg, '8021'O)); if (not match(ipcp, tr_IPCP_Ack_DNS(0, ggsn_ip4_dns1, ggsn_ip4_dns2))) { @@ -1101,6 +1136,7 @@ ctx.pco_req := valueof(ts_PCO_IPv4_DNS_CONT); f_pdp_ctx_act(ctx); + f_PCO_ensure_no_duplicates(ctx.pco_neg); /* verify PCO contains both primary and secondary IPv4 DNS */ var OCT4 ggsn_ip4_dns1 := f_inet_addr(m_ggsn_ip4_dns1); if (not match(f_PCO_extract_proto(ctx.pco_neg, '000d'O, 1), ggsn_ip4_dns1)) { @@ -1123,6 +1159,7 @@ ctx.pco_req := valueof(ts_PCO_IPv6_DNS); f_pdp_ctx_act(ctx); + f_PCO_ensure_no_duplicates(ctx.pco_neg); /* verify PCO contains both primary and secondary IPv6 DNS */ var OCT4 ggsn_ip6_dns1 := f_inet6_addr(m_ggsn_ip6_dns1); if (not match(f_PCO_extract_proto(ctx.pco_neg, '0003'O, 1), ggsn_ip6_dns1)) { -- To view, visit https://gerrit.osmocom.org/13563 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I9d439dab1696196cd125f4d7113b426f1711a405 Gerrit-Change-Number: 13563 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:46:27 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:46:27 +0000 Subject: Change in osmo-ttcn3-hacks[master]: library: Add PAP_Types for PPP Authentication Protocol (RFC 1334) In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13607 ) Change subject: library: Add PAP_Types for PPP Authentication Protocol (RFC 1334) ...................................................................... library: Add PAP_Types for PPP Authentication Protocol (RFC 1334) Change-Id: I31cb766bb701b8107df5de978d2b0b085977045a --- A library/PAP_Types.ttcn 1 file changed, 90 insertions(+), 0 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/PAP_Types.ttcn b/library/PAP_Types.ttcn new file mode 100644 index 0000000..4e3f14f --- /dev/null +++ b/library/PAP_Types.ttcn @@ -0,0 +1,90 @@ +module PAP_Types { + +/* (C) 2019 by Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + */ + +import from Osmocom_Types all; + +/* RFC1334 */ +type enumerated PapCode { + PAP_AuthenticateReq ('01'O), + PAP_AuthenticateAck ('02'O), + PAP_AuthenticateNak ('03'O) +} with { variant "FIELDLENGTH(8)" }; + +type record PapPacket { + PapCode code, + uint8_t identifier, + uint16_t len, + PapPayloadUnion payload +} with { + variant (len) "LENGTHTO(code,identifier,len,payload)" + variant (payload) "CROSSTAG( req, code = PAP_AuthenticateReq; + ack, code = PAP_AuthenticateAck; + nak, code = PAP_AuthenticateNak)" +}; + +type union PapPayloadUnion { + PapAuthReq req, + PapAuthResp ack, + PapAuthResp nak +}; + +type record PapAuthReq { + uint8_t peer_id_len, + octetstring peer_id, + uint8_t passwd_len, + octetstring passwd +} with { + variant (peer_id_len) "LENGTHTO(peer_id)" + variant (passwd_len) "LENGTHTO(passwd)" +}; + +type record PapAuthResp { + uint8_t msg_len, + charstring msg +} with { variant (msg_len) "LENGTHTO(msg)" }; + +external function enc_PapPacket(in PapPacket inp) return octetstring +with { extension "prototype(convert)" extension "encode(RAW)" }; + +external function dec_PapPacket(in octetstring inp) return PapPacket +with { extension "prototype(convert)" extension "decode(RAW)" }; + + +template (value) PapPacket ts_PAP(template (value) PapCode code, template (value) uint8_t identifier, + template (value) PapPayloadUnion payload) := { + code := code, + identifier := identifier, + len := 0, /* overwritten */ + payload := payload +} +template PapPacket tr_PAP(template PapCode code, template uint8_t identifier, template PapPayloadUnion payload) := { + code := code, + identifier := identifier, + len := ?, + payload := payload +} + +template (value) PapPacket ts_PAP_AuthReq(uint8_t identifier := 0, octetstring peer_id, octetstring passwd) := + ts_PAP(PAP_AuthenticateReq, identifier, + { req := { peer_id_len := 0, peer_id := peer_id, + passwd_len := 0, passwd := passwd } }); +template PapPacket tr_PAP_AuthReq(template uint8_t identifier := ?, octetstring peer_id, octetstring passwd) := + tr_PAP(PAP_AuthenticateReq, identifier, + { req := { peer_id_len := ?, peer_id := peer_id, + passwd_len := ?, passwd := passwd } }); +template (value) PapPacket ts_PAP_AuthAck(uint8_t identifier := 0, charstring msg) := + ts_PAP(PAP_AuthenticateAck, identifier, { ack := { msg_len := 0, msg := msg } }); +template PapPacket tr_PAP_AuthAck(template uint8_t identifier := ?) := + tr_PAP(PAP_AuthenticateAck, identifier, { ack := ? }); +template (value) PapPacket ts_PAP_AuthNak(uint8_t identifier := 0, charstring msg) := + ts_PAP(PAP_AuthenticateNak, identifier, { nak := { msg_len := 0, msg := msg } }); +template PapPacket tr_PAP_AuthNak(template uint8_t identifier := ?) := + tr_PAP(PAP_AuthenticateNak, identifier, { nak := ? }); + +} with { encode "RAW" ; variant "FIELDORDER(msb)" } -- To view, visit https://gerrit.osmocom.org/13607 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I31cb766bb701b8107df5de978d2b0b085977045a Gerrit-Change-Number: 13607 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:46:50 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 10:46:50 +0000 Subject: Change in libosmocore[master]: NS: log address:port on error In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/11636 ) Change subject: NS: log address:port on error ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/11636 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If2dc533a6dc150254f5d44b672f04bb728e7e927 Gerrit-Change-Number: 11636 Gerrit-PatchSet: 3 Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 10 May 2019 10:46:50 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:47:26 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:47:26 +0000 Subject: Change in osmo-ci[master]: jenkins docker: Install lcov and lcov-cobertura In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13551 ) Change subject: jenkins docker: Install lcov and lcov-cobertura ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/13551 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I26896a9807e756b1f935cd3ed524d25ee22efaed Gerrit-Change-Number: 13551 Gerrit-PatchSet: 1 Gerrit-Owner: Vasil Velichkov Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-CC: Max Gerrit-Comment-Date: Fri, 10 May 2019 10:47:26 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:47:27 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:47:27 +0000 Subject: Change in osmo-ci[master]: jenkins docker: Install lcov and lcov-cobertura In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13551 ) Change subject: jenkins docker: Install lcov and lcov-cobertura ...................................................................... jenkins docker: Install lcov and lcov-cobertura They are used for generating code coverage reports Change-Id: I26896a9807e756b1f935cd3ed524d25ee22efaed --- M docker/Dockerfile_osmocom_jenkins.amd64 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/docker/Dockerfile_osmocom_jenkins.amd64 b/docker/Dockerfile_osmocom_jenkins.amd64 index f87d80d..3f499ad 100644 --- a/docker/Dockerfile_osmocom_jenkins.amd64 +++ b/docker/Dockerfile_osmocom_jenkins.amd64 @@ -66,3 +66,7 @@ dpkg-reconfigure --frontend=noninteractive locales && \ update-locale LANG=en_US.UTF-8 ENV LANG en_US.UTF-8 + +# Code coverage tools +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y lcov +RUN pip3 install git+https://github.com/eriwen/lcov-to-cobertura-xml/ -- To view, visit https://gerrit.osmocom.org/13551 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I26896a9807e756b1f935cd3ed524d25ee22efaed Gerrit-Change-Number: 13551 Gerrit-PatchSet: 2 Gerrit-Owner: Vasil Velichkov Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-CC: Max -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:50:17 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:50:17 +0000 Subject: Change in osmo-trx[master]: smpl_buf: Remove dbg log line with duplicated info In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13870 ) Change subject: smpl_buf: Remove dbg log line with duplicated info ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13870 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia2423707210a364fa6827b92cca087ced99b088b Gerrit-Change-Number: 13870 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 10 May 2019 10:50:17 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:50:45 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:50:45 +0000 Subject: Change in osmo-trx[master]: Introduce LOGCHAN macro to standarize logging channel info In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13871 ) Change subject: Introduce LOGCHAN macro to standarize logging channel info ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13871 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I67d869499aa16af58c863ca7b74c356bcd979936 Gerrit-Change-Number: 13871 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 10 May 2019 10:50:45 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:52:14 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:52:14 +0000 Subject: Change in osmo-trx[master]: smpl_buf: Move it to device/common and create libdevice_common.la In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13873 ) Change subject: smpl_buf: Move it to device/common and create libdevice_common.la ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/13873/2/Transceiver52M/device/common/Makefile.am File Transceiver52M/device/common/Makefile.am: https://gerrit.osmocom.org/#/c/13873/2/Transceiver52M/device/common/Makefile.am at 12 PS2, Line 12: > Cosmetic: tabs vs spaces? We use tabs in general. Hi Vadim, I tihnk you should tune down a bit on your cosmetic review comments. I happen to see quite many of them here in gerrit, and if it's only a line in a makefile, or only some "not perfect" alignment in a multi-line statement in C, I think we shouldn't spend too much time on it. -- To view, visit https://gerrit.osmocom.org/13873 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I465ad0f6d5569bb3006d711c8fd0df14391fcf35 Gerrit-Change-Number: 13873 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Harald Welte Gerrit-Comment-Date: Fri, 10 May 2019 10:52:14 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:52:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:52:18 +0000 Subject: Change in osmo-trx[master]: smpl_buf: Move it to device/common and create libdevice_common.la In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13873 ) Change subject: smpl_buf: Move it to device/common and create libdevice_common.la ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13873 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I465ad0f6d5569bb3006d711c8fd0df14391fcf35 Gerrit-Change-Number: 13873 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 10 May 2019 10:52:18 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:53:21 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:53:21 +0000 Subject: Change in osmo-trx[master]: lms: Use smpl_buf to recover from timestamp jumps In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13872 ) Change subject: lms: Use smpl_buf to recover from timestamp jumps ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/13872/2/Transceiver52M/device/lms/LMSDevice.cpp File Transceiver52M/device/lms/LMSDevice.cpp: https://gerrit.osmocom.org/#/c/13872/2/Transceiver52M/device/lms/LMSDevice.cpp at 61 PS2, Line 61: rx_buffers.resize(chans); > I'm reusing same naming already used in UHDDevice to simplify understanding for readers and showing [?] then let's rename to m_rx_buffers in a follow-up commit, please. Thanks! -- To view, visit https://gerrit.osmocom.org/13872 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Idfc4e69acc30afb11440b6b9cbdcfa09ff920265 Gerrit-Change-Number: 13872 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: tnt Gerrit-Comment-Date: Fri, 10 May 2019 10:53:21 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:53:27 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:53:27 +0000 Subject: Change in osmo-trx[master]: lms: Use smpl_buf to recover from timestamp jumps In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13872 ) Change subject: lms: Use smpl_buf to recover from timestamp jumps ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13872 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Idfc4e69acc30afb11440b6b9cbdcfa09ff920265 Gerrit-Change-Number: 13872 Gerrit-PatchSet: 4 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: tnt Gerrit-Comment-Date: Fri, 10 May 2019 10:53:27 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:53:28 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:53:28 +0000 Subject: Change in osmo-trx[master]: smpl_buf: Remove dbg log line with duplicated info In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13870 ) Change subject: smpl_buf: Remove dbg log line with duplicated info ...................................................................... smpl_buf: Remove dbg log line with duplicated info Change-Id: Ia2423707210a364fa6827b92cca087ced99b088b --- M Transceiver52M/device/smpl_buf.cpp 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved diff --git a/Transceiver52M/device/smpl_buf.cpp b/Transceiver52M/device/smpl_buf.cpp index e3c5af5..c21f306 100644 --- a/Transceiver52M/device/smpl_buf.cpp +++ b/Transceiver52M/device/smpl_buf.cpp @@ -99,13 +99,13 @@ return ERROR_TIMESTAMP; if (timestamp < time_end) { - LOGC(DDEV, ERR) << "Overwriting old buffer data: timestamp="<SDR interface (" + LOGCHAN(i, DMAIN, NOTICE) << "dumping STALE burst in TRX->SDR interface (" << burst->getTime() <<" vs " << nowTime << "), retrans=" << state->mRetrans; if (state->mRetrans) updateFillerTable(i, burst); @@ -725,7 +725,7 @@ /* Set command pointer */ command = buffer + 4; - LOGC(DTRXCTRL, INFO) << "chan " << chan << ": command is '" << command << "'"; + LOGCHAN(chan, DTRXCTRL, INFO) << "command is '" << command << "'"; if (match_cmd(command, "POWEROFF", NULL)) { stop(); @@ -856,7 +856,7 @@ sprintf(response,"RSP ERR 1"); } - LOGC(DTRXCTRL, INFO) << "chan " << chan << ": response is '" << response << "'"; + LOGCHAN(chan, DTRXCTRL, INFO) << "response is '" << response << "'"; mCtrlSockets[chan]->write(response, strlen(response) + 1); } diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp index be51a12..75efa1e 100644 --- a/Transceiver52M/device/lms/LMSDevice.cpp +++ b/Transceiver52M/device/lms/LMSDevice.cpp @@ -337,7 +337,7 @@ /* do rx/tx calibration - depends on gain, freq and bw */ bool LMSDevice::do_calib(size_t chan) { - LOGC(DDEV, INFO) << "Calibrating chan " << chan; + LOGCHAN(chan, DDEV, INFO) << "Calibrating"; if (LMS_Calibrate(m_lms_dev, LMS_CH_RX, chan, LMS_CALIBRATE_BW_HZ, 0) < 0) return false; if (LMS_Calibrate(m_lms_dev, LMS_CH_TX, chan, LMS_CALIBRATE_BW_HZ, 0) < 0) @@ -351,7 +351,7 @@ lms_range_t range_lpfbw_rx, range_lpfbw_tx; float_type lpfbw_rx, lpfbw_tx; - LOGC(DDEV, INFO) << "Setting filters on chan " << chan; + LOGCHAN(chan, DDEV, INFO) << "Setting filters"; if (LMS_GetLPFBWRange(m_lms_dev, LMS_CH_RX, &range_lpfbw_rx)) return false; print_range("LPFBWRange Rx", &range_lpfbw_rx); @@ -362,9 +362,9 @@ lpfbw_rx = OSMO_MIN(OSMO_MAX(1.4001e6, range_lpfbw_rx.min), range_lpfbw_rx.max); lpfbw_tx = OSMO_MIN(OSMO_MAX(5.2e6, range_lpfbw_tx.min), range_lpfbw_tx.max); - LOGC(DDEV, INFO) << "LPFBW: Rx=" << lpfbw_rx << " Tx=" << lpfbw_tx; + LOGCHAN(chan, DDEV, INFO) << "LPFBW: Rx=" << lpfbw_rx << " Tx=" << lpfbw_tx; - LOGC(DDEV, INFO) << "Setting LPFBW chan " << chan; + LOGCHAN(chan, DDEV, INFO) << "Setting LPFBW"; if (LMS_SetLPFBW(m_lms_dev, LMS_CH_RX, chan, lpfbw_rx) < 0) return false; if (LMS_SetLPFBW(m_lms_dev, LMS_CH_TX, chan, lpfbw_tx) < 0) @@ -400,10 +400,10 @@ if (dB < minTxGain()) dB = minTxGain(); - LOGC(DDEV, NOTICE) << "chan " << chan <<": Setting TX gain to " << dB << " dB"; + LOGCHAN(chan, DDEV, NOTICE) << "Setting TX gain to " << dB << " dB"; if (LMS_SetGaindB(m_lms_dev, LMS_CH_TX, chan, dB) < 0) - LOGC(DDEV, ERR) << "chan " << chan <<": Error setting TX gain to " << dB << " dB"; + LOGCHAN(chan, DDEV, ERR) << "Error setting TX gain to " << dB << " dB"; return dB; } @@ -415,10 +415,10 @@ if (dB < minRxGain()) dB = minRxGain(); - LOGC(DDEV, NOTICE) << "chan "<< chan << ": Setting RX gain to " << dB << " dB"; + LOGCHAN(chan, DDEV, NOTICE) << "Setting RX gain to " << dB << " dB"; if (LMS_SetGaindB(m_lms_dev, LMS_CH_RX, chan, dB) < 0) - LOGC(DDEV, ERR) << "chan "<< chan << ": Error setting RX gain to " << dB << " dB"; + LOGCHAN(chan, DDEV, ERR) << "Error setting RX gain to " << dB << " dB"; return dB; } @@ -476,12 +476,12 @@ idx = get_ant_idx(ant, LMS_CH_RX, chan); if (idx < 0) { - LOGC(DDEV, ERROR) << "Invalid Rx Antenna"; + LOGCHAN(chan, DDEV, ERROR) << "Invalid Rx Antenna"; return false; } if (LMS_SetAntenna(m_lms_dev, LMS_CH_RX, chan, idx) < 0) { - LOGC(DDEV, ERROR) << "Unable to set Rx Antenna"; + LOGCHAN(chan, DDEV, ERROR) << "Unable to set Rx Antenna"; } return true; @@ -499,12 +499,12 @@ idx = LMS_GetAntenna(m_lms_dev, LMS_CH_RX, chan); if (idx < 0) { - LOGC(DDEV, ERROR) << "Error getting Rx Antenna"; + LOGCHAN(chan, DDEV, ERROR) << "Error getting Rx Antenna"; return ""; } if (LMS_GetAntennaList(m_lms_dev, LMS_CH_RX, chan, name_list) < idx) { - LOGC(DDEV, ERROR) << "Error getting Rx Antenna List"; + LOGCHAN(chan, DDEV, ERROR) << "Error getting Rx Antenna List"; return ""; } @@ -522,12 +522,12 @@ idx = get_ant_idx(ant, LMS_CH_TX, chan); if (idx < 0) { - LOGC(DDEV, ERROR) << "Invalid Rx Antenna"; + LOGCHAN(chan, DDEV, ERROR) << "Invalid Rx Antenna"; return false; } if (LMS_SetAntenna(m_lms_dev, LMS_CH_TX, chan, idx) < 0) { - LOGC(DDEV, ERROR) << "Unable to set Rx Antenna"; + LOGCHAN(chan, DDEV, ERROR) << "Unable to set Rx Antenna"; } return true; @@ -545,12 +545,12 @@ idx = LMS_GetAntenna(m_lms_dev, LMS_CH_TX, chan); if (idx < 0) { - LOGC(DDEV, ERROR) << "Error getting Tx Antenna"; + LOGCHAN(chan, DDEV, ERROR) << "Error getting Tx Antenna"; return ""; } if (LMS_GetAntennaList(m_lms_dev, LMS_CH_TX, chan, name_list) < idx) { - LOGC(DDEV, ERROR) << "Error getting Tx Antenna List"; + LOGCHAN(chan, DDEV, ERROR) << "Error getting Tx Antenna List"; return ""; } @@ -573,24 +573,24 @@ if (LMS_GetStreamStatus(&m_lms_stream_rx[chan], &status) == 0) { if (status.underrun > m_last_rx_underruns[chan]) { *underrun = true; - LOGC(DDEV, ERROR) << "chan " << chan << ": recv Underrun! (" - << m_last_rx_underruns[chan] << " -> " - << status.underrun << ")"; + LOGCHAN(chan, DDEV, ERROR) << "recv Underrun! (" + << m_last_rx_underruns[chan] << " -> " + << status.underrun << ")"; } m_last_rx_underruns[chan] = status.underrun; if (status.overrun > m_last_rx_overruns[chan]) { *overrun = true; - LOGC(DDEV, ERROR) << "chan " << chan << ": recv Overrun! (" - << m_last_rx_overruns[chan] << " -> " - << status.overrun << ")"; + LOGCHAN(chan, DDEV, ERROR) << "recv Overrun! (" + << m_last_rx_overruns[chan] << " -> " + << status.overrun << ")"; } m_last_rx_overruns[chan] = status.overrun; if (status.droppedPackets > m_last_rx_dropped[chan]) { - LOGC(DDEV, ERROR) << "chan " << chan << ": recv Dropped packets by HW! (" - << m_last_rx_dropped[chan] << " -> " - << status.droppedPackets << ")"; + LOGCHAN(chan, DDEV, ERROR) << "recv Dropped packets by HW! (" + << m_last_rx_dropped[chan] << " -> " + << status.droppedPackets << ")"; } m_last_rx_dropped[chan] = m_last_rx_overruns[chan]; } @@ -619,12 +619,12 @@ rc = LMS_RecvStream(&m_lms_stream_rx[i], bufs[i], len, &rx_metadata, 100); update_stream_stats(i, underrun, overrun); if (rc != len) { - LOGC(DDEV, ERROR) << "LMS: Device receive timed out (" << rc << " vs exp " << len << ")."; + LOGCHAN(i, DDEV, ERROR) << "LMS: Device receive timed out (" << rc << " vs exp " << len << ")."; thread_enable_cancel(true); return -1; } if (timestamp != (TIMESTAMP)rx_metadata.timestamp) - LOGC(DDEV, ERROR) << "chan "<< i << " recv buffer of len " << rc << " expect " << std::hex << timestamp << " got " << std::hex << (TIMESTAMP)rx_metadata.timestamp << " (" << std::hex << rx_metadata.timestamp <<") diff=" << rx_metadata.timestamp - timestamp; + LOGCHAN(i, DDEV, ERROR) << "recv buffer of len " << rc << " expect " << std::hex << timestamp << " got " << std::hex << (TIMESTAMP)rx_metadata.timestamp << " (" << std::hex << rx_metadata.timestamp <<") diff=" << rx_metadata.timestamp - timestamp; thread_enable_cancel(true); } @@ -659,11 +659,11 @@ *underrun = false; for (i = 0; i Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:53:30 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:53:30 +0000 Subject: Change in osmo-trx[master]: smpl_buf: Move it to device/common and create libdevice_common.la In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13873 ) Change subject: smpl_buf: Move it to device/common and create libdevice_common.la ...................................................................... smpl_buf: Move it to device/common and create libdevice_common.la Since in next commit osmo-trx-lms starts using smpl_buf.cpp, it seems some automake step doesn't like including a cpp file twice from a different directory, since race conditions can occur building it. Instead we define the dependency by first building a static lib and then using it on each libdevice.la (one per device type). We already do the similar under arch/ subdir, where we have a common/ subdir and then one subdir and lib per architecture. Change-Id: I465ad0f6d5569bb3006d711c8fd0df14391fcf35 --- M Transceiver52M/Makefile.am M Transceiver52M/device/Makefile.am A Transceiver52M/device/common/Makefile.am R Transceiver52M/device/common/radioDevice.h R Transceiver52M/device/common/smpl_buf.cpp R Transceiver52M/device/common/smpl_buf.h M Transceiver52M/device/lms/Makefile.am M Transceiver52M/device/uhd/Makefile.am M Transceiver52M/device/usrp1/Makefile.am M configure.ac 10 files changed, 20 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved diff --git a/Transceiver52M/Makefile.am b/Transceiver52M/Makefile.am index 28c47ab..89ab796 100644 --- a/Transceiver52M/Makefile.am +++ b/Transceiver52M/Makefile.am @@ -23,7 +23,7 @@ SUBDIRS = arch device -AM_CPPFLAGS = -Wall $(STD_DEFINES_AND_INCLUDES) -I${srcdir}/arch/common -I${srcdir}/device +AM_CPPFLAGS = -Wall $(STD_DEFINES_AND_INCLUDES) -I${srcdir}/arch/common -I${srcdir}/device/common AM_CXXFLAGS = -lpthread $(LIBOSMOCORE_CFLAGS) $(LIBOSMOCTRL_CFLAGS) $(LIBOSMOVTY_CFLAGS) rev2dir = $(datadir)/usrp/rev2 diff --git a/Transceiver52M/device/Makefile.am b/Transceiver52M/device/Makefile.am index e653a9e..369e877 100644 --- a/Transceiver52M/device/Makefile.am +++ b/Transceiver52M/device/Makefile.am @@ -1,8 +1,6 @@ include $(top_srcdir)/Makefile.common -noinst_HEADERS = radioDevice.h smpl_buf.h - -SUBDIRS = +SUBDIRS = common if DEVICE_USRP1 SUBDIRS += usrp1 diff --git a/Transceiver52M/device/common/Makefile.am b/Transceiver52M/device/common/Makefile.am new file mode 100644 index 0000000..e14cc38 --- /dev/null +++ b/Transceiver52M/device/common/Makefile.am @@ -0,0 +1,12 @@ +include $(top_srcdir)/Makefile.common + +AM_CPPFLAGS = -Wall $(STD_DEFINES_AND_INCLUDES) +AM_CXXFLAGS = -lpthread $(LIBOSMOCORE_CFLAGS) $(LIBOSMOCTRL_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(LMS_CFLAGS) + + +noinst_HEADERS = radioDevice.h smpl_buf.h + +noinst_LTLIBRARIES = libdevice_common.la + +libdevice_common_la_SOURCES = \ + smpl_buf.cpp diff --git a/Transceiver52M/device/radioDevice.h b/Transceiver52M/device/common/radioDevice.h similarity index 100% rename from Transceiver52M/device/radioDevice.h rename to Transceiver52M/device/common/radioDevice.h diff --git a/Transceiver52M/device/smpl_buf.cpp b/Transceiver52M/device/common/smpl_buf.cpp similarity index 100% rename from Transceiver52M/device/smpl_buf.cpp rename to Transceiver52M/device/common/smpl_buf.cpp diff --git a/Transceiver52M/device/smpl_buf.h b/Transceiver52M/device/common/smpl_buf.h similarity index 100% rename from Transceiver52M/device/smpl_buf.h rename to Transceiver52M/device/common/smpl_buf.h diff --git a/Transceiver52M/device/lms/Makefile.am b/Transceiver52M/device/lms/Makefile.am index 8471074..682cf26 100644 --- a/Transceiver52M/device/lms/Makefile.am +++ b/Transceiver52M/device/lms/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/Makefile.common -AM_CPPFLAGS = -Wall $(STD_DEFINES_AND_INCLUDES) -I${srcdir}/.. +AM_CPPFLAGS = -Wall $(STD_DEFINES_AND_INCLUDES) -I${srcdir}/../common AM_CXXFLAGS = -lpthread $(LIBOSMOCORE_CFLAGS) $(LIBOSMOCTRL_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(LMS_CFLAGS) noinst_HEADERS = LMSDevice.h diff --git a/Transceiver52M/device/uhd/Makefile.am b/Transceiver52M/device/uhd/Makefile.am index 11b380e..ab63a4a 100644 --- a/Transceiver52M/device/uhd/Makefile.am +++ b/Transceiver52M/device/uhd/Makefile.am @@ -1,10 +1,11 @@ include $(top_srcdir)/Makefile.common -AM_CPPFLAGS = -Wall $(STD_DEFINES_AND_INCLUDES) -I${srcdir}/.. +AM_CPPFLAGS = -Wall $(STD_DEFINES_AND_INCLUDES) -I${srcdir}/../common AM_CXXFLAGS = -lpthread $(LIBOSMOCORE_CFLAGS) $(LIBOSMOCTRL_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(UHD_CFLAGS) noinst_HEADERS = UHDDevice.h noinst_LTLIBRARIES = libdevice.la -libdevice_la_SOURCES = UHDDevice.cpp ../smpl_buf.cpp +libdevice_la_SOURCES = UHDDevice.cpp +libdevice_la_LIBADD = $(top_builddir)/Transceiver52M/device/common/libdevice_common.la diff --git a/Transceiver52M/device/usrp1/Makefile.am b/Transceiver52M/device/usrp1/Makefile.am index d99874a..5078934 100644 --- a/Transceiver52M/device/usrp1/Makefile.am +++ b/Transceiver52M/device/usrp1/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/Makefile.common -AM_CPPFLAGS = -Wall $(STD_DEFINES_AND_INCLUDES) -I${srcdir}/.. +AM_CPPFLAGS = -Wall $(STD_DEFINES_AND_INCLUDES) -I${srcdir}/../common AM_CXXFLAGS = -lpthread $(LIBOSMOCORE_CFLAGS) $(LIBOSMOCTRL_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(USRP_CFLAGS) noinst_HEADERS = USRPDevice.h diff --git a/configure.ac b/configure.ac index bd421aa..e2a07f8 100644 --- a/configure.ac +++ b/configure.ac @@ -296,6 +296,7 @@ Transceiver52M/arch/arm/Makefile \ Transceiver52M/arch/x86/Makefile \ Transceiver52M/device/Makefile \ + Transceiver52M/device/common/Makefile \ Transceiver52M/device/uhd/Makefile \ Transceiver52M/device/usrp1/Makefile \ Transceiver52M/device/lms/Makefile \ -- To view, visit https://gerrit.osmocom.org/13873 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I465ad0f6d5569bb3006d711c8fd0df14391fcf35 Gerrit-Change-Number: 13873 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 10:53:30 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 10:53:30 +0000 Subject: Change in osmo-trx[master]: lms: Use smpl_buf to recover from timestamp jumps In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13872 ) Change subject: lms: Use smpl_buf to recover from timestamp jumps ...................................................................... lms: Use smpl_buf to recover from timestamp jumps Also take the chance to make sure we handle properly short reads (keep reading again). Both scenarios can be tested by running osmo-trx-lms and then using on a terminal: sudo kill -STOP `pidof osmo-trx-lms`; sleep 0.5; sudo kill -CONT `pidof osmo-trx-lms` Fixes: OS#3339 Change-Id: Idfc4e69acc30afb11440b6b9cbdcfa09ff920265 --- M Transceiver52M/device/lms/LMSDevice.cpp M Transceiver52M/device/lms/LMSDevice.h M Transceiver52M/device/lms/Makefile.am 3 files changed, 70 insertions(+), 16 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp index 75efa1e..c320540 100644 --- a/Transceiver52M/device/lms/LMSDevice.cpp +++ b/Transceiver52M/device/lms/LMSDevice.cpp @@ -40,6 +40,7 @@ #define GSM_CARRIER_BW 270000.0 /* 270kHz */ #define LMS_MIN_BW_SUPPORTED 2.5e6 /* 2.5mHz, minimum supported by LMS */ #define LMS_CALIBRATE_BW_HZ OSMO_MAX(GSM_CARRIER_BW, LMS_MIN_BW_SUPPORTED) +#define SAMPLE_BUF_SZ (1 << 20) /* Size of Rx timestamp based Ring buffer, in bytes */ LMSDevice::LMSDevice(size_t tx_sps, size_t rx_sps, InterfaceType iface, size_t chans, double lo_offset, const std::vector& tx_paths, @@ -56,6 +57,8 @@ m_last_rx_overruns.resize(chans, 0); m_last_rx_dropped.resize(chans, 0); m_last_tx_underruns.resize(chans, 0); + + rx_buffers.resize(chans); } LMSDevice::~LMSDevice() @@ -71,6 +74,9 @@ LMS_Close(m_lms_dev); m_lms_dev = NULL; } + + for (size_t i = 0; i < rx_buffers.size(); i++) + delete rx_buffers[i]; } static void lms_log_callback(int lvl, const char *msg) @@ -238,6 +244,10 @@ goto out_close; } + /* Set up per-channel Rx timestamp based Ring buffers */ + for (size_t i = 0; i < rx_buffers.size(); i++) + rx_buffers[i] = new smpl_buf(SAMPLE_BUF_SZ / sizeof(uint32_t)); + started = false; return NORMAL; @@ -600,7 +610,9 @@ int LMSDevice::readSamples(std::vector < short *>&bufs, int len, bool * overrun, TIMESTAMP timestamp, bool * underrun, unsigned *RSSI) { - int rc = 0; + int rc, num_smpls, expect_smpls; + ssize_t avail_smpls; + TIMESTAMP expect_timestamp; unsigned int i; lms_stream_meta_t rx_metadata = {}; rx_metadata.flushPartialPacket = false; @@ -614,24 +626,62 @@ *overrun = false; *underrun = false; - for (i = 0; i #include @@ -53,6 +54,8 @@ std::vector m_last_rx_dropped; std::vector m_last_tx_underruns; + std::vector rx_buffers; + double actualSampleRate; ///< the actual USRP sampling rate bool started; ///< flag indicates LMS has started diff --git a/Transceiver52M/device/lms/Makefile.am b/Transceiver52M/device/lms/Makefile.am index 682cf26..77fd0e9 100644 --- a/Transceiver52M/device/lms/Makefile.am +++ b/Transceiver52M/device/lms/Makefile.am @@ -8,3 +8,4 @@ noinst_LTLIBRARIES = libdevice.la libdevice_la_SOURCES = LMSDevice.cpp +libdevice_la_LIBADD = $(top_builddir)/Transceiver52M/device/common/libdevice_common.la -- To view, visit https://gerrit.osmocom.org/13872 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Idfc4e69acc30afb11440b6b9cbdcfa09ff920265 Gerrit-Change-Number: 13872 Gerrit-PatchSet: 4 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: tnt -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 11:00:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 11:00:47 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Add a test for LU with invalid MCC/MNC in BSSAP/RANAP In-Reply-To: References: Message-ID: Harald Welte has removed a vote on this change. Change subject: msc: Add a test for LU with invalid MCC/MNC in BSSAP/RANAP ...................................................................... Removed Code-Review-2 by Harald Welte -- To view, visit https://gerrit.osmocom.org/12380 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: deleteVote Gerrit-Change-Id: I676894358259b9cc0f973769ce552ba58a2a58a1 Gerrit-Change-Number: 12380 Gerrit-PatchSet: 3 Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Stefan Sperling Gerrit-CC: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 11:22:51 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 11:22:51 +0000 Subject: Change in osmocom-bb[master]: bsic decoding of neighbour cells in dedicated mode and partially succ... In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/5490 ) Change subject: bsic decoding of neighbour cells in dedicated mode and partially success in synchronized handover ...................................................................... Patch Set 1: It's sadly that the author(s) forgot about this change. I think Gerrit will remove this change since it has been abandoned, so I rebased it (very quickly, still needs clean up) and pushed to https://git.osmocom.org/osmocom-bb/log/?h=mawais/ho. -- To view, visit https://gerrit.osmocom.org/5490 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib01460b796d2107c4599d327e184eb42340999d2 Gerrit-Change-Number: 5490 Gerrit-PatchSet: 1 Gerrit-Owner: Muhammad Awais Aslam Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Fri, 10 May 2019 11:22:51 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 11:27:00 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 11:27:00 +0000 Subject: Change in gr-gsm[master]: Filter out SoapyAudio devices In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13812 ) Change subject: Filter out SoapyAudio devices ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13812 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: gr-gsm Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib84081041ca6c2bc18b9da0c32bac9d3ecef65ca Gerrit-Change-Number: 13812 Gerrit-PatchSet: 3 Gerrit-Owner: Vasil Velichkov Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Piotr Krysik Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: Vasil Velichkov Gerrit-Comment-Date: Fri, 10 May 2019 11:27:00 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 11:29:57 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 11:29:57 +0000 Subject: Change in osmo-hlr[master]: db_hlr.c: db_subscr_create(): add flags argument In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13711 ) Change subject: db_hlr.c: db_subscr_create(): add flags argument ...................................................................... Patch Set 3: (4 comments) Looks great in general, just a few final notes. https://gerrit.osmocom.org/#/c/13711/3/src/db.h File src/db.h: https://gerrit.osmocom.org/#/c/13711/3/src/db.h at 121 PS3, Line 121: DB_SUBSCR_FLAG_NONE I don't think we really need this one. https://gerrit.osmocom.org/#/c/13711/3/src/db.h at 122 PS3, Line 122: 0x01 Let's have the values in more common form for flags: (1 << 1). https://gerrit.osmocom.org/#/c/13711/3/src/db.h at 123 PS3, Line 123: 0x02 And here (1 << 2), so this is much cleaner that the new flag would be (1 << 3), and not 0x03. https://gerrit.osmocom.org/#/c/13711/3/tests/db/db_test.c File tests/db/db_test.c: https://gerrit.osmocom.org/#/c/13711/3/tests/db/db_test.c at 458 PS3, Line 458: DB_SUBSCR_FLAG_NONE We can just use 0x00 or 0 here. -- To view, visit https://gerrit.osmocom.org/13711 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1a6dd85387723dab5487c53b33d2d9ec6d05d006 Gerrit-Change-Number: 13711 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 10 May 2019 11:29:57 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 11:40:05 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 11:40:05 +0000 Subject: Change in osmo-hlr[master]: Create subscribers on demand In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13713 ) Change subject: Create subscribers on demand ...................................................................... Patch Set 3: (4 comments) https://gerrit.osmocom.org/#/c/13713/3/src/hlr.h File src/hlr.h: https://gerrit.osmocom.org/#/c/13713/3/src/hlr.h at 63 PS3, Line 63: uint8_t Unsigned int. No need to use fixed-size type here. https://gerrit.osmocom.org/#/c/13713/3/src/hlr.c File src/hlr.c: https://gerrit.osmocom.org/#/c/13713/3/src/hlr.c at 158 PS3, Line 158: int Unsigned int. https://gerrit.osmocom.org/#/c/13713/3/src/hlr.c at 173 PS3, Line 173: rand_msisdn_len Feel free to inverse this statement, so this would allow to reduce code nesting: if (!rand_msisdn_len) return 0; https://gerrit.osmocom.org/#/c/13713/3/src/hlr_vty.c File src/hlr_vty.c: https://gerrit.osmocom.org/#/c/13713/3/src/hlr_vty.c at 358 PS3, Line 358: 3 AFAIR, a single digit is also a valid MSISDN ;) -- To view, visit https://gerrit.osmocom.org/13713 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd Gerrit-Change-Number: 13713 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 10 May 2019 11:40:05 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 11:40:37 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 10 May 2019 11:40:37 +0000 Subject: =?UTF-8?Q?Change_in_libosmo-netif=5Bmaster=5D=3A_Bump_version=3A_0=2E4=2E0=2E1-738f_=E2=86=92_0=2E5=2E0?= In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13964 ) Change subject: Bump version: 0.4.0.1-738f ? 0.5.0 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13964 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iea2da939e259d0a9e7c5dad14d7a961434c276ef Gerrit-Change-Number: 13964 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 10 May 2019 11:40:37 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 11:41:54 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 11:41:54 +0000 Subject: Change in osmocom-bb[master]: firmware: implement reading of factory RF calibration values In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/12887 ) Change subject: firmware: implement reading of factory RF calibration values ...................................................................... Patch Set 5: > @fixeria, what does it take to get this merged? I just need to revisit OS#3582, and apply the recent changes from Mychaela. Let's keep WIP for now. -- To view, visit https://gerrit.osmocom.org/12887 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icf2693b751d86ec1d2563412d606c13d4c91a806 Gerrit-Change-Number: 12887 Gerrit-PatchSet: 5 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-Comment-Date: Fri, 10 May 2019 11:41:54 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 12:10:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 12:10:53 +0000 Subject: Change in libosmocore[master]: osmo_sock_get_name_*: Ensure string is returned in error case In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13960 to look at the new patch set (#3). Change subject: osmo_sock_get_name_*: Ensure string is returned in error case ...................................................................... osmo_sock_get_name_*: Ensure string is returned in error case osmo_sock_get_name_buf(): In case the getsockname() call is failing for some weird reason, we shouldn't return an uninitialized, non-zero-terminated string buffer to the caller, as most callers will be too lazy to test the return value. This holds even more true for users of the internal osmo_sock_get_name2() and osmo_sock_get_name2_c() functions which indeed very much ignore the return value of osmo_sock_get_name_buf(). Change-Id: I2d56327e96b7a6783cca38b828c5ee74aed776ae --- M src/socket.c 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/60/13960/3 -- To view, visit https://gerrit.osmocom.org/13960 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2d56327e96b7a6783cca38b828c5ee74aed776ae Gerrit-Change-Number: 13960 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Mykola Shchetinin -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 12:10:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 12:10:53 +0000 Subject: Change in libosmocore[master]: Change GSM48_PDISC_* to enum type In-Reply-To: References: Message-ID: Harald Welte has uploaded a new patch set (#5) to the change originally created by Max. ( https://gerrit.osmocom.org/12572 ) Change subject: Change GSM48_PDISC_* to enum type ...................................................................... Change GSM48_PDISC_* to enum type An enum is more clear than an int and #defines for passing around, also in case you have a switch () statement, the compiler will issue warnings for unhandled cases. Change-Id: Icbbe8786a776081d7643193f154e6270224399e6 --- M include/osmocom/gsm/protocol/gsm_04_08.h 1 file changed, 20 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/72/12572/5 -- To view, visit https://gerrit.osmocom.org/12572 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Icbbe8786a776081d7643193f154e6270224399e6 Gerrit-Change-Number: 12572 Gerrit-PatchSet: 5 Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 12:11:40 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 12:11:40 +0000 Subject: Change in libosmocore[master]: osmo_sock_get_name_*: Ensure string is returned in error case In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13960 ) Change subject: osmo_sock_get_name_*: Ensure string is returned in error case ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/13960/1/src/socket.c File src/socket.c: https://gerrit.osmocom.org/#/c/13960/1/src/socket.c at 815 PS1, Line 815: osmo_strlcpy(str, "", str_len); > Isn't str rewritten in the following line (call to snprintf)? thanks a lot! -- To view, visit https://gerrit.osmocom.org/13960 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2d56327e96b7a6783cca38b828c5ee74aed776ae Gerrit-Change-Number: 13960 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Mykola Shchetinin Gerrit-Comment-Date: Fri, 10 May 2019 12:11:40 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 12:15:34 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 12:15:34 +0000 Subject: Change in libosmocore[master]: osmo_sock_get_name_*: Ensure string is returned in error case In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13960 ) Change subject: osmo_sock_get_name_*: Ensure string is returned in error case ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13960 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2d56327e96b7a6783cca38b828c5ee74aed776ae Gerrit-Change-Number: 13960 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Mykola Shchetinin Gerrit-Comment-Date: Fri, 10 May 2019 12:15:34 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 12:18:30 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 10 May 2019 12:18:30 +0000 Subject: Change in osmo-msc[master]: vlr: fix IMEI length In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13904 to look at the new patch set (#3). Change subject: vlr: fix IMEI length ...................................................................... vlr: fix IMEI length Set the length of vlr_subscr->imei to GSM23003_IMEI_NUM_DIGITS_NO_CHK (14) instead of GSM23003_IMEISV_NUM_DIGITS (16). Note that there is also GSM23003_IMEI_NUM_DIGITS (15), which includes an additional checksum digit. This digit is not intended for digital transmission, so we don't need to store it. Also by not storing it, we can simply copy the IMEI-part from the IMEISV to the IMEI without worrying about the checksum (will be done in a follow up patch). A good overview of the IMEI/IMEISV structure is here: https://en.wikipedia.org/wiki/International_Mobile_Equipment_Identity#Structure_of_the_IMEI_and_IMEISV_(IMEI_software_version) Related: OS#2542 Change-Id: Iaf2569c099874b55acbd748b776394726cc5ce54 --- M include/osmocom/msc/vlr.h M tests/msc_vlr/msc_vlr_test_gsm_authen.c M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_no_authen.err 7 files changed, 47 insertions(+), 51 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/04/13904/3 -- To view, visit https://gerrit.osmocom.org/13904 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iaf2569c099874b55acbd748b776394726cc5ce54 Gerrit-Change-Number: 13904 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 12:18:30 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 10 May 2019 12:18:30 +0000 Subject: Change in osmo-msc[master]: vlr: when setting IMEISV, also set IMEI In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13893 to look at the new patch set (#4). Change subject: vlr: when setting IMEISV, also set IMEI ...................................................................... vlr: when setting IMEISV, also set IMEI Copy IMEISV to IMEI when IMEISV changes. The additional SV digits will get cut off then. This is needed for the subscriber on demand use case, since we can get the IMEISV early (see [1]), but need to send the IMEI to the Check IMEI procedure. While adjusting the tests, I have noticed that there are code paths where we ask the MS for the IMEISV first, and later ask the MS for the IMEI, although we already have the IMEISV. This could be improved in a future patch. [1] Change-Id I256224194c3b8caf2b58a88d11dccd32c569201f Related: OS#2542 Change-Id: I02e7b66848bf7dddb31b105e2ae981432817ae1e --- M src/libvlr/vlr.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_no_authen.err 3 files changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/93/13893/4 -- To view, visit https://gerrit.osmocom.org/13893 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I02e7b66848bf7dddb31b105e2ae981432817ae1e Gerrit-Change-Number: 13893 Gerrit-PatchSet: 4 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 12:18:30 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 10 May 2019 12:18:30 +0000 Subject: Change in osmo-msc[master]: vlr: optionally send IMEI early to HLR In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13894 to look at the new patch set (#4). Change subject: vlr: optionally send IMEI early to HLR ...................................................................... vlr: optionally send IMEI early to HLR When 'check-imei-rqd 1 early' is set in the config, send the IMEI to the HLR before doing the location update with the HLR. The OsmoHLR documentation referenced in the code will be added in osmo-hlr.git's Change-Id I2dd4a56f7b8be8b5d0e6fc32e04459e5e278d0a9. Related: OS#2542 Change-Id: I88283cad23793b475445d814ff49db534cb41244 --- M src/libvlr/vlr.c M src/libvlr/vlr_lu_fsm.c M src/libvlr/vlr_lu_fsm.h M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_ss.err M tests/msc_vlr/msc_vlr_test_umts_authen.err 16 files changed, 207 insertions(+), 169 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/94/13894/4 -- To view, visit https://gerrit.osmocom.org/13894 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I88283cad23793b475445d814ff49db534cb41244 Gerrit-Change-Number: 13894 Gerrit-PatchSet: 4 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 12:18:41 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 10 May 2019 12:18:41 +0000 Subject: Change in osmo-hlr[master]: Create subscribers on demand In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#4) to the change originally created by Vadim Yanitskiy. ( https://gerrit.osmocom.org/13713 ) Change subject: Create subscribers on demand ...................................................................... Create subscribers on demand Add a new vty option and allow to optionally generate a random msisdn, as well as setting the default NAM: subscriber-create-on-demand (no-extension|<3-15>) (none|cs|ps|both) Thanks to Vadim for the random MSISDN patch [1], which was squashed into this one. [1] Change-Id: I475c71f9902950fa7498855a616e1ec231fad6ac Related: OS#2542 Depends on: Idc74f4d94ad44b9fc1b6d43178f5f33d551ebfb1 (libosmocore) Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd --- M src/hlr.c M src/hlr.h M src/hlr_vty.c M tests/test_nodes.vty A tests/test_subscr_create_on_demand.vty 5 files changed, 170 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/13/13713/4 -- To view, visit https://gerrit.osmocom.org/13713 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd Gerrit-Change-Number: 13713 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 12:18:55 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 10 May 2019 12:18:55 +0000 Subject: Change in osmo-hlr[master]: Create subscribers on demand In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/13713 ) Change subject: Create subscribers on demand ...................................................................... Patch Set 3: (4 comments) https://gerrit.osmocom.org/#/c/13713/3/src/hlr.h File src/hlr.h: https://gerrit.osmocom.org/#/c/13713/3/src/hlr.h at 63 PS3, Line 63: uint8_t > Unsigned int. No need to use fixed-size type here. Done https://gerrit.osmocom.org/#/c/13713/3/src/hlr.c File src/hlr.c: https://gerrit.osmocom.org/#/c/13713/3/src/hlr.c at 158 PS3, Line 158: int > Unsigned int. Done https://gerrit.osmocom.org/#/c/13713/3/src/hlr.c at 173 PS3, Line 173: rand_msisdn_len > Feel free to inverse this statement, so this would allow to reduce code nesting: [?] Good idea, done. https://gerrit.osmocom.org/#/c/13713/3/src/hlr_vty.c File src/hlr_vty.c: https://gerrit.osmocom.org/#/c/13713/3/src/hlr_vty.c at 358 PS3, Line 358: 3 > AFAIR, a single digit is also a valid MSISDN ;) Yes, but then the HLR would run out of available msisdns very fast, so I don't think there's practical value in allowing less than three digits. Unless you want to set up a 'first 10 people who join the network can use it for free' type of thing ;D So I would keep the 3 there, to make it harder to misconfigure the feature, and change it only if somebody has a real world use case. -- To view, visit https://gerrit.osmocom.org/13713 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd Gerrit-Change-Number: 13713 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 10 May 2019 12:18:55 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 12:22:58 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 12:22:58 +0000 Subject: Change in osmo-hlr[master]: Create subscribers on demand In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13713 ) Change subject: Create subscribers on demand ...................................................................... Patch Set 4: (1 comment) https://gerrit.osmocom.org/#/c/13713/3/src/hlr_vty.c File src/hlr_vty.c: https://gerrit.osmocom.org/#/c/13713/3/src/hlr_vty.c at 358 PS3, Line 358: 3 > Yes, but then the HLR would run out of available msisdns very fast, so I don't think there's practic [?] ACK, makes sense. -- To view, visit https://gerrit.osmocom.org/13713 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd Gerrit-Change-Number: 13713 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 10 May 2019 12:22:58 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 12:24:49 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 10 May 2019 12:24:49 +0000 Subject: Change in libosmocore[master]: gsm_23_003: add GSM23003_MSISDN_{MIN, MAX}_DIGITS In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/13961 ) Change subject: gsm_23_003: add GSM23003_MSISDN_{MIN,MAX}_DIGITS ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/13961/1/include/osmocom/gsm/protocol/gsm_23_003.h File include/osmocom/gsm/protocol/gsm_23_003.h: https://gerrit.osmocom.org/#/c/13961/1/include/osmocom/gsm/protocol/gsm_23_003.h at 24 PS1, Line 24: GSM23003_MSISDN_MAX_DIGITS > Regarding random MSISDN generation, we're really lucky :) OSMO_MAX_RAND_ID_LEN is 16, so we can safe [?] yep :) -- To view, visit https://gerrit.osmocom.org/13961 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Idc74f4d94ad44b9fc1b6d43178f5f33d551ebfb1 Gerrit-Change-Number: 13961 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 10 May 2019 12:24:49 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 12:25:14 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 12:25:14 +0000 Subject: =?UTF-8?Q?Change_in_libosmo-netif=5Bmaster=5D=3A_Bump_version=3A_0=2E4=2E0=2E1-738f_=E2=86=92_0=2E5=2E0?= In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13964 ) Change subject: Bump version: 0.4.0.1-738f ? 0.5.0 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13964 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iea2da939e259d0a9e7c5dad14d7a961434c276ef Gerrit-Change-Number: 13964 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 10 May 2019 12:25:14 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 12:25:15 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 12:25:15 +0000 Subject: =?UTF-8?Q?Change_in_libosmo-netif=5Bmaster=5D=3A_Bump_version=3A_0=2E4=2E0=2E1-738f_=E2=86=92_0=2E5=2E0?= In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13964 ) Change subject: Bump version: 0.4.0.1-738f ? 0.5.0 ...................................................................... Bump version: 0.4.0.1-738f ? 0.5.0 Change-Id: Iea2da939e259d0a9e7c5dad14d7a961434c276ef --- M debian/changelog M src/Makefile.am 2 files changed, 38 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Pau Espin Pedrol: Looks good to me, approved Harald Welte: Looks good to me, approved diff --git a/debian/changelog b/debian/changelog index 6c56148..e3b19c9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,40 @@ +libosmo-netif (0.5.0) unstable; urgency=medium + + [ Max ] + * Stream examples: filter internal logging + * Stream examples: log sent/received bytes + * Stream examples: fix server's endless loop + * Add missing include + * Cosmetic: use #pragma once as include guard + * Stream client: fix doxygen typo + * Stream examples: print accepted client address + * Stream client: update logging + * Add socket name functions to stream client/server + * Stream client: fix disconnection logic + * Stream examples: fix typos in error message + * Ignore test binaries + * Stream client: report reconnection event as INFO + * Add stream client/server test + * Stream client: add disconnect callback + * Deprecate osmo_stream_cli_open2() + + [ Philipp Maier ] + * AMR: add spec reference for AMR frame types + * AMR: add define constants for AMR payload length + * AMR: add functions to convert between bw-efficient and octet-aligned + * amr: cosmetic: correct sourcecode formatting + * amr: be sure result of osmo_amr_bwe_to_oa() fits into int buf + * amr: use sizeof(struct amr_hdr) when working with amr header length + + [ Harald Welte ] + * debian: Add BuildDepends on libpcap0.8-dev + + [ Oliver Smith ] + * gitignore: add amr_test + * tests: AM_LDFLAGS = -noinstall for all tests + + -- Harald Welte Fri, 10 May 2019 12:40:03 +0200 + libosmo-netif (0.4.0) unstable; urgency=medium [ Neels Hofmeyr ] diff --git a/src/Makefile.am b/src/Makefile.am index d92d0f6..4d8b900 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,6 @@ # This is _NOT_ the library release version, it's an API version. # Please read Chapter 6 "Library interface versions" of the libtool documentation before making any modification -LIBVERSION=6:1:0 +LIBVERSION=7:0:1 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir) AM_CFLAGS= -fPIC -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOABIS_CFLAGS) $(COVERAGE_CFLAGS) $(LIBSCTP_CFLAGS) -- To view, visit https://gerrit.osmocom.org/13964 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iea2da939e259d0a9e7c5dad14d7a961434c276ef Gerrit-Change-Number: 13964 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 12:42:58 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 10 May 2019 12:42:58 +0000 Subject: Change in osmo-msc[master]: vlr_lu_fsm.c: assert for invalid events Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/13965 Change subject: vlr_lu_fsm.c: assert for invalid events ...................................................................... vlr_lu_fsm.c: assert for invalid events In state machine callback functions, instead of logging an error when an invalid event arrives, do OSMO_ASSERT(0). Change-Id: If5363ae37b414a0ac195e5f89664c75cbad0bb21 --- M src/libvlr/vlr_lu_fsm.c 1 file changed, 6 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/65/13965/1 diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c index 27196d8..15ab88c 100644 --- a/src/libvlr/vlr_lu_fsm.c +++ b/src/libvlr/vlr_lu_fsm.c @@ -1086,8 +1086,7 @@ _start_lu_main(fi); break; default: - LOGPFSML(fi, LOGL_ERROR, "event without effect: %s\n", - osmo_fsm_event_name(fi->fsm, event)); + OSMO_ASSERT(0); break; } } @@ -1104,8 +1103,7 @@ vlr_loc_upd_want_imsi(fi); break; default: - LOGPFSML(fi, LOGL_ERROR, "event without effect: %s\n", - osmo_fsm_event_name(fi->fsm, event)); + OSMO_ASSERT(0); break; } } @@ -1170,8 +1168,7 @@ vlr_loc_upd_node1(fi); break; default: - LOGPFSML(fi, LOGL_ERROR, "event without effect: %s\n", - osmo_fsm_event_name(fi->fsm, event)); + OSMO_ASSERT(0); break; } } @@ -1213,8 +1210,7 @@ } break; default: - LOGPFSML(fi, LOGL_ERROR, "event without effect: %s\n", - osmo_fsm_event_name(fi->fsm, event)); + OSMO_ASSERT(0); break; } } @@ -1264,8 +1260,7 @@ lu_fsm_failure(fi, cause); break; default: - LOGPFSML(fi, LOGL_ERROR, "event without effect: %s\n", - osmo_fsm_event_name(fi->fsm, event)); + OSMO_ASSERT(0); break; } } @@ -1297,8 +1292,7 @@ lu_fsm_failure(fi, cause); break; default: - LOGPFSML(fi, LOGL_ERROR, "event without effect: %s\n", - osmo_fsm_event_name(fi->fsm, event)); + OSMO_ASSERT(0); break; } } -- To view, visit https://gerrit.osmocom.org/13965 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If5363ae37b414a0ac195e5f89664c75cbad0bb21 Gerrit-Change-Number: 13965 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 12:44:51 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 10 May 2019 12:44:51 +0000 Subject: Change in osmo-msc[master]: vlr: optionally send IMEI early to HLR In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/13894 ) Change subject: vlr: optionally send IMEI early to HLR ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/13894/1/src/libvlr/vlr_lu_fsm.c File src/libvlr/vlr_lu_fsm.c: https://gerrit.osmocom.org/#/c/13894/1/src/libvlr/vlr_lu_fsm.c at 955 PS1, Line 955: event without effect > let's please submit an unrelated cleanup patch to change those > other locations to OSMO_ASSERT(0), too. https://gerrit.osmocom.org/#/c/osmo-msc/+/13965 -- To view, visit https://gerrit.osmocom.org/13894 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I88283cad23793b475445d814ff49db534cb41244 Gerrit-Change-Number: 13894 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 10 May 2019 12:44:51 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 12:45:42 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 10 May 2019 12:45:42 +0000 Subject: Change in osmo-msc[master]: vlr_lu_fsm.c: assert for invalid events In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/13965 ) Change subject: vlr_lu_fsm.c: assert for invalid events ...................................................................... Patch Set 1: Related discussion: https://gerrit.osmocom.org/#/c/osmo-msc/+/13894/1/src/libvlr/vlr_lu_fsm.c at 955 -- To view, visit https://gerrit.osmocom.org/13965 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If5363ae37b414a0ac195e5f89664c75cbad0bb21 Gerrit-Change-Number: 13965 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-CC: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 10 May 2019 12:45:42 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 13:07:01 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 13:07:01 +0000 Subject: Change in osmo-msc[master]: vlr_lu_fsm.c: assert for invalid events In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13965 ) Change subject: vlr_lu_fsm.c: assert for invalid events ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13965 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If5363ae37b414a0ac195e5f89664c75cbad0bb21 Gerrit-Change-Number: 13965 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 10 May 2019 13:07:01 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 13:09:56 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 13:09:56 +0000 Subject: Change in libosmocore[master]: Change GSM48_PDISC_* to enum type In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/12572 ) Change subject: Change GSM48_PDISC_* to enum type ...................................................................... Patch Set 6: I think we can rebase this change on top of the master branch, and submit separately. It doesn't look like it depends on other changes of this patch set... -- To view, visit https://gerrit.osmocom.org/12572 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icbbe8786a776081d7643193f154e6270224399e6 Gerrit-Change-Number: 12572 Gerrit-PatchSet: 6 Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 10 May 2019 13:09:56 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 13:10:10 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 13:10:10 +0000 Subject: Change in libosmocore[master]: Change GSM48_PDISC_* to enum type In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/12572 ) Change subject: Change GSM48_PDISC_* to enum type ...................................................................... Patch Set 6: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/12572 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icbbe8786a776081d7643193f154e6270224399e6 Gerrit-Change-Number: 12572 Gerrit-PatchSet: 6 Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 10 May 2019 13:10:10 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 13:19:39 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 May 2019 13:19:39 +0000 Subject: Change in osmo-msc[master]: call_leg: document the parent_event_* items In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13946 ) Change subject: call_leg: document the parent_event_* items ...................................................................... Patch Set 2: wth: DLGLOBAL your program appears to use libosmocore rate_ctr without calling rate_ctr_init() at start-up. Rate counters won't work! where did that come from -- To view, visit https://gerrit.osmocom.org/13946 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib099178a0f6ab218646c67c0e7a3d360c81af684 Gerrit-Change-Number: 13946 Gerrit-PatchSet: 2 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 10 May 2019 13:19:39 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 13:33:04 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 May 2019 13:33:04 +0000 Subject: Change in osmo-msc[master]: call_leg: document the parent_event_* items In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/13946 ) Change subject: call_leg: document the parent_event_* items ...................................................................... call_leg: document the parent_event_* items Change-Id: Ib099178a0f6ab218646c67c0e7a3d360c81af684 --- M include/osmocom/msc/call_leg.h M src/libmsc/call_leg.c 2 files changed, 9 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Pau Espin Pedrol: Looks good to me, but someone else must approve Vadim Yanitskiy: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved diff --git a/include/osmocom/msc/call_leg.h b/include/osmocom/msc/call_leg.h index 61107ee..d8380f5 100644 --- a/include/osmocom/msc/call_leg.h +++ b/include/osmocom/msc/call_leg.h @@ -34,6 +34,7 @@ /* Array indexed by enum rtp_direction. */ enum mgcp_connection_mode crcx_conn_mode[2]; + /* Events dispatched to the parent fi, see call_leg_alloc() doc. */ uint32_t parent_event_rtp_addr_available; uint32_t parent_event_rtp_complete; diff --git a/src/libmsc/call_leg.c b/src/libmsc/call_leg.c index 1b7db2b..46405bc 100644 --- a/src/libmsc/call_leg.c +++ b/src/libmsc/call_leg.c @@ -64,6 +64,14 @@ OSMO_ASSERT( osmo_fsm_register(&call_leg_fsm) == 0 ); } +/* Allocate a call leg FSM instance as child of an arbitrary other FSM instance. + * The call leg FSM dispatches events to its parent FSM instance on specific events: + * - parent_event_term: dispatch this to the parent FI when the call leg terminates (call ended, either planned or by + * failure). + * - parent_event_rtp_addr_available: one of the rtp_stream instances managed by the call leg has received an RTP + * address from the MGW. The struct rtp_stream instance is passed as data argument for the event dispatch. + * - parent_event_rtp_complete: one of the rtp_stream instances entered the RTP_STREAM_ST_ESTABLISHED state. + */ struct call_leg *call_leg_alloc(struct osmo_fsm_inst *parent_fi, uint32_t parent_event_term, uint32_t parent_event_rtp_addr_available, -- To view, visit https://gerrit.osmocom.org/13946 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ib099178a0f6ab218646c67c0e7a3d360c81af684 Gerrit-Change-Number: 13946 Gerrit-PatchSet: 2 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 13:43:05 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 May 2019 13:43:05 +0000 Subject: Change in osmo-msc[master]: build osmo-msc: add "missing" LIBASN1C_LIBS In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/7306 to look at the new patch set (#4). Change subject: build osmo-msc: add "missing" LIBASN1C_LIBS ...................................................................... build osmo-msc: add "missing" LIBASN1C_LIBS in osmo-msc/Makefile.am, osmo-msc was actually missing the LIBASN1C_LIBS even though it included LIBASN1C_CFLAGS. Probably libasn1c is implicitly linked from libranap.so, but doesn't hurt to name it. When building without Iu support, the LIBOSMORANAP* and LIBASN1C* vars are empty, so no need to explicitly switch on BUILD_IU, just name them. Change-Id: I39ae5e3f0f7661ca9ee5c17a500be28c461d7ec7 --- M src/osmo-msc/Makefile.am 1 file changed, 2 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/06/7306/4 -- To view, visit https://gerrit.osmocom.org/7306 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I39ae5e3f0f7661ca9ee5c17a500be28c461d7ec7 Gerrit-Change-Number: 7306 Gerrit-PatchSet: 4 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 13:44:23 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 May 2019 13:44:23 +0000 Subject: Change in osmo-msc[master]: build osmo-msc: add "missing" LIBASN1C_LIBS In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/7306 ) Change subject: build osmo-msc: add "missing" LIBASN1C_LIBS ...................................................................... Patch Set 4: Apparently this patch has been obsoleted... no use moving the conditinal libs to the non-conditional part, is there? I mean, those $LIB... vars will be empty, but it's nicer to be explicit, right? Opinons? -- To view, visit https://gerrit.osmocom.org/7306 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I39ae5e3f0f7661ca9ee5c17a500be28c461d7ec7 Gerrit-Change-Number: 7306 Gerrit-PatchSet: 4 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Comment-Date: Fri, 10 May 2019 13:44:23 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 13:45:22 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 May 2019 13:45:22 +0000 Subject: Change in osmo-msc[master]: add DUSSD logging category In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13942 ) Change subject: add DUSSD logging category ...................................................................... Patch Set 1: thanks, I never get the SS / USSD naming right... -- To view, visit https://gerrit.osmocom.org/13942 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id7e04c9f5088334cd5ec6cfdb6a9b3a2a7e7fda0 Gerrit-Change-Number: 13942 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 10 May 2019 13:45:22 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 13:48:25 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 May 2019 13:48:25 +0000 Subject: Change in osmo-msc[master]: add DSS logging category In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13942 to look at the new patch set (#2). Change subject: add DSS logging category ...................................................................... add DSS logging category Change-Id: Id7e04c9f5088334cd5ec6cfdb6a9b3a2a7e7fda0 --- M include/osmocom/msc/debug.h M include/osmocom/msc/transaction.h M src/libmsc/gsm_09_11.c M src/osmo-msc/msc_main.c M tests/msc_vlr/msc_vlr_test_ss.err M tests/msc_vlr/msc_vlr_tests.c 6 files changed, 23 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/42/13942/2 -- To view, visit https://gerrit.osmocom.org/13942 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id7e04c9f5088334cd5ec6cfdb6a9b3a2a7e7fda0 Gerrit-Change-Number: 13942 Gerrit-PatchSet: 2 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 13:58:37 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 10 May 2019 13:58:37 +0000 Subject: Change in osmo-msc[master]: silence error messages about HANDOVER_END not permitted Message-ID: Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/13966 Change subject: silence error messages about HANDOVER_END not permitted ...................................................................... silence error messages about HANDOVER_END not permitted The MSC_A_EV_HANDOVER_END exists as parent term event for the msc_ho_fsm, but it is not actually required as functional event, since all cleanup is handled in msc_ho_fsm_cleanup(). That's why I never bothered to add the event to msc_a_fsm, but of course that means we get an error message after each (successful and unsuccessful) handover, that the MSC_A_EV_HANDOVER_END is not permitted. Allow the event and ignore it to silence the error message. Explain in a comment. Change-Id: Ie8dc0c0a631b7da43111f329562007766a21b134 --- M src/libmsc/msc_a.c 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/66/13966/1 diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c index 77dd43d..5137e20 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -646,6 +646,12 @@ msc_ho_start(msc_a, (struct ran_handover_required*)data); return; + case MSC_A_EV_HANDOVER_END: + /* Termination event of the msc_ho_fsm. No action needed, it's all done in the msc_ho_fsm cleanup. This + * event only exists because osmo_fsm_inst_alloc_child() requires a parent term event; and maybe + * interesting for logging. */ + return; + case MSC_A_EV_MO_CLOSE: case MSC_A_EV_CN_CLOSE: case MSC_A_EV_UNUSED: @@ -756,6 +762,10 @@ /* RTP streams cleaned up above */ return; + case MSC_A_EV_HANDOVER_END: + /* msc_ho_fsm does cleanup. */ + return; + default: OSMO_ASSERT(false); } @@ -921,6 +931,7 @@ | S(MSC_EV_CALL_LEG_TERM) | S(MSC_MNCC_EV_CALL_ENDED) | S(MSC_A_EV_HANDOVER_REQUIRED) + | S(MSC_A_EV_HANDOVER_END) , .out_state_mask = 0 | S(MSC_A_ST_RELEASING) @@ -935,6 +946,7 @@ | S(MSC_A_EV_UNUSED) | S(MSC_EV_CALL_LEG_TERM) | S(MSC_MNCC_EV_CALL_ENDED) + | S(MSC_A_EV_HANDOVER_END) , .out_state_mask = 0 | S(MSC_A_ST_RELEASED) -- To view, visit https://gerrit.osmocom.org/13966 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ie8dc0c0a631b7da43111f329562007766a21b134 Gerrit-Change-Number: 13966 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 14:02:40 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 14:02:40 +0000 Subject: Change in osmo-msc[master]: add DSS logging category In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13942 ) Change subject: add DSS logging category ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13942 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id7e04c9f5088334cd5ec6cfdb6a9b3a2a7e7fda0 Gerrit-Change-Number: 13942 Gerrit-PatchSet: 2 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 10 May 2019 14:02:40 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 14:19:01 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 14:19:01 +0000 Subject: Change in osmo-msc[master]: libmsc/sgs_server.c: do not override rc in case of SCTP_SHUTDOWN_EVENT Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13967 Change subject: libmsc/sgs_server.c: do not override rc in case of SCTP_SHUTDOWN_EVENT ...................................................................... libmsc/sgs_server.c: do not override rc in case of SCTP_SHUTDOWN_EVENT Change-Id: I06215a7d3dc33f2e8adb77fa1b3f2ac5198dee26 Fixes: CID#190867 --- M src/libmsc/sgs_server.c 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/67/13967/1 diff --git a/src/libmsc/sgs_server.c b/src/libmsc/sgs_server.c index 28c42cb..779e12c 100644 --- a/src/libmsc/sgs_server.c +++ b/src/libmsc/sgs_server.c @@ -40,7 +40,7 @@ struct msgb *msg = gsm29118_msgb_alloc(); struct sctp_sndrcvinfo sinfo; int flags = 0; - int rc; + int rc = 0; /* we cannot use osmo_stream_srv_recv() here, as we might get some out-of-band info from * SCTP. FIXME: add something like osmo_stream_srv_recv_sctp() to libosmo-netif and use @@ -72,7 +72,6 @@ default: break; } - rc = 0; goto out; } -- To view, visit https://gerrit.osmocom.org/13967 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I06215a7d3dc33f2e8adb77fa1b3f2ac5198dee26 Gerrit-Change-Number: 13967 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 14:22:28 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 14:22:28 +0000 Subject: Change in pysim[master]: import pysim-testdata of automatic testing to this repository Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13968 Change subject: import pysim-testdata of automatic testing to this repository ...................................................................... import pysim-testdata of automatic testing to this repository This test data is used by the jenkins build verification for pySim, and it was previously located locally on the build slave. By moving the testdata to this repository, any contributor can modify both the code and the expected test results simultaneously. Change-Id: I6714b091a114035d6aab8ba750c5f2b86e438467 --- M contrib/jenkins.sh A pysim-testdata/fakemagicsim.data A pysim-testdata/fakemagicsim.ok A pysim-testdata/sysmoUSIM-SJS1.data A pysim-testdata/sysmoUSIM-SJS1.ok A pysim-testdata/sysmosim-gr1.data A pysim-testdata/sysmosim-gr1.ok 7 files changed, 56 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/68/13968/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 94da198..f17b1f8 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -13,7 +13,6 @@ . venv/bin/activate pip install pytlv -cp -a "$HOME/pysim-testdata/" pysim-testdata/ cd pysim-testdata ../tests/pysim-test.sh diff --git a/pysim-testdata/fakemagicsim.data b/pysim-testdata/fakemagicsim.data new file mode 100644 index 0000000..deab2f7 --- /dev/null +++ b/pysim-testdata/fakemagicsim.data @@ -0,0 +1,6 @@ +MCC=001 +MNC=01 +ICCID=1122334455667788990 +KI=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +OPC=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +IMSI=001010000000102 \ No newline at end of file diff --git a/pysim-testdata/fakemagicsim.ok b/pysim-testdata/fakemagicsim.ok new file mode 100644 index 0000000..876060f --- /dev/null +++ b/pysim-testdata/fakemagicsim.ok @@ -0,0 +1,12 @@ +Reading ... +ICCID: 1122334455667788990 +IMSI: 001010000000102 +SMSP: ffffffffffffffffffffffffe1ffffffffffffffffffffffff0581005155f5ffffffffffff000000 +PLMNsel: fff11fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +PLMNwAcT: Can't read file -- SW match failed! Expected 9000 and got 9404. +OPLMNwAcT: Can't read file -- SW match failed! Expected 9000 and got 9404. +HPLMNAcT: Can't read file -- SW match failed! Expected 9000 and got 9404. +ACC: ffff +MSISDN: Not available +Done ! + diff --git a/pysim-testdata/sysmoUSIM-SJS1.data b/pysim-testdata/sysmoUSIM-SJS1.data new file mode 100644 index 0000000..b7c1e81 --- /dev/null +++ b/pysim-testdata/sysmoUSIM-SJS1.data @@ -0,0 +1,7 @@ +MCC=001 +MNC=01 +ICCID=1122334455667788990 +KI=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +OPC=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +IMSI=001010000000102 +ADM=55538407 diff --git a/pysim-testdata/sysmoUSIM-SJS1.ok b/pysim-testdata/sysmoUSIM-SJS1.ok new file mode 100644 index 0000000..c530f6b --- /dev/null +++ b/pysim-testdata/sysmoUSIM-SJS1.ok @@ -0,0 +1,12 @@ +Reading ... +ICCID: 1122334455667788990 +IMSI: 001010000000102 +SMSP: ffffffffffffffffffffffffffffffffffffffffffffffffe1ffffffffffffffffffffffff0581005155f5ffffffffffff000000 +PLMNsel: fff11fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +PLMNwAcT: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +OPLMNwAcT: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +HPLMNAcT: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ACC: 0008 +MSISDN: Not available +Done ! + diff --git a/pysim-testdata/sysmosim-gr1.data b/pysim-testdata/sysmosim-gr1.data new file mode 100644 index 0000000..90d23f8 --- /dev/null +++ b/pysim-testdata/sysmosim-gr1.data @@ -0,0 +1,7 @@ +MCC=001 +MNC=01 +ICCID=1122334455667788990 +KI=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +OPC=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +IMSI=001010000000102 +ADM=DDDDDDDD diff --git a/pysim-testdata/sysmosim-gr1.ok b/pysim-testdata/sysmosim-gr1.ok new file mode 100644 index 0000000..d344c65 --- /dev/null +++ b/pysim-testdata/sysmosim-gr1.ok @@ -0,0 +1,12 @@ +Reading ... +ICCID: 1122334455667788990 +IMSI: 001010000000102 +SMSP: ffffffffffffffffffffffffe1ffffffffffffffffffffffff0581005155f5ffffffffffff000000 +PLMNsel: fff11fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +PLMNwAcT: Can't read file -- SW match failed! Expected 9000 and got 9404. +OPLMNwAcT: Can't read file -- SW match failed! Expected 9000 and got 9404. +HPLMNAcT: Can't read file -- SW match failed! Expected 9000 and got 9404. +ACC: 0008 +MSISDN: Not available +Done ! + -- To view, visit https://gerrit.osmocom.org/13968 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I6714b091a114035d6aab8ba750c5f2b86e438467 Gerrit-Change-Number: 13968 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 14:24:55 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 14:24:55 +0000 Subject: Change in pysim[master]: import pysim-testdata of automatic testing to this repository In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13968 to look at the new patch set (#2). Change subject: import pysim-testdata of automatic testing to this repository ...................................................................... import pysim-testdata of automatic testing to this repository This test data is used by the jenkins build verification for pySim, and it was previously located locally on the build slave. By moving the testdata to this repository, any contributor can modify both the code and the expected test results simultaneously. Change-Id: I6714b091a114035d6aab8ba750c5f2b86e438467 --- M contrib/jenkins.sh A pysim-testdata/fakemagicsim.data A pysim-testdata/fakemagicsim.ok A pysim-testdata/sysmoUSIM-SJS1.data A pysim-testdata/sysmoUSIM-SJS1.ok A pysim-testdata/sysmosim-gr1.data A pysim-testdata/sysmosim-gr1.ok 7 files changed, 58 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/68/13968/2 -- To view, visit https://gerrit.osmocom.org/13968 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6714b091a114035d6aab8ba750c5f2b86e438467 Gerrit-Change-Number: 13968 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 14:42:56 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 14:42:56 +0000 Subject: Change in pysim[master]: import pysim-testdata of automatic testing to this repository In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13968 to look at the new patch set (#3). Change subject: import pysim-testdata of automatic testing to this repository ...................................................................... import pysim-testdata of automatic testing to this repository This test data is used by the jenkins build verification for pySim, and it was previously located locally on the build slave. By moving the testdata to this repository, any contributor can modify both the code and the expected test results simultaneously. Change-Id: I6714b091a114035d6aab8ba750c5f2b86e438467 --- M contrib/jenkins.sh A pysim-testdata/fakemagicsim.data A pysim-testdata/fakemagicsim.ok A pysim-testdata/sysmoUSIM-SJS1.data A pysim-testdata/sysmoUSIM-SJS1.ok A pysim-testdata/sysmosim-gr1.data A pysim-testdata/sysmosim-gr1.ok 7 files changed, 59 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/68/13968/3 -- To view, visit https://gerrit.osmocom.org/13968 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6714b091a114035d6aab8ba750c5f2b86e438467 Gerrit-Change-Number: 13968 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 14:47:44 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 14:47:44 +0000 Subject: Change in pysim[master]: import pysim-testdata of automatic testing to this repository In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13968 ) Change subject: import pysim-testdata of automatic testing to this repository ...................................................................... Patch Set 3: > Build Started https://jenkins.osmocom.org/jenkins/job/gerrit-pysim/84/ somehow the cards in the tester don't match the expectations, particularly the following two lines: PLMNwAcT: fff11fffffffffff0000ffffff0000ffffff0000ffffff0000ffffff0000ffffff0000ffffff0000ffffff0000ffffff0000ffffff0000ffffff0000 OPLMNwAcT: fff11fffffffffff0000ffffff0000ffffff0000ffffff0000ffffff0000ffffff0000ffffff0000ffffff0000ffffff0000ffffff0000ffffff0000 However, the .data / .ok files in version 1+2 of this patch are taken from the actual tester, i.e. even with the existing files on the builds slave the same error would happen :/ Guess we do have to wait for pmaier to be back from sick leave -- To view, visit https://gerrit.osmocom.org/13968 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6714b091a114035d6aab8ba750c5f2b86e438467 Gerrit-Change-Number: 13968 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 10 May 2019 14:47:44 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 14:55:13 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 14:55:13 +0000 Subject: Change in pysim[master]: utils: add EF [H|O]PLMNwAcT decoding. In-Reply-To: References: Message-ID: Harald Welte has uploaded a new patch set (#3) to the change originally created by lazlo. ( https://gerrit.osmocom.org/12123 ) Change subject: utils: add EF [H|O]PLMNwAcT decoding. ...................................................................... utils: add EF [H|O]PLMNwAcT decoding. Allow decoding and pretty printing of PLMNwAcT, HPLMNwAcT and OPLMNwAct. Includes unit tests for the added functions. Change-Id: I9b8ca6ffd98f665690b84239d9a228e2c72c6ff9 --- M pySim-read.py M pySim/utils.py A pySim/utils_test.py M pysim-testdata/sysmoUSIM-SJS1.ok 4 files changed, 195 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/23/12123/3 -- To view, visit https://gerrit.osmocom.org/12123 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9b8ca6ffd98f665690b84239d9a228e2c72c6ff9 Gerrit-Change-Number: 12123 Gerrit-PatchSet: 3 Gerrit-Owner: lazlo Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: dexter Gerrit-CC: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 14:56:44 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 14:56:44 +0000 Subject: Change in pysim[master]: utils: add EF [H|O]PLMNwAcT decoding. In-Reply-To: References: Message-ID: Harald Welte has uploaded a new patch set (#4) to the change originally created by lazlo. ( https://gerrit.osmocom.org/12123 ) Change subject: utils: add EF [H|O]PLMNwAcT decoding. ...................................................................... utils: add EF [H|O]PLMNwAcT decoding. Allow decoding and pretty printing of PLMNwAcT, HPLMNwAcT and OPLMNwAct. Includes unit tests for the added functions. Change-Id: I9b8ca6ffd98f665690b84239d9a228e2c72c6ff9 --- M pySim-read.py M pySim/utils.py A pySim/utils_test.py M pysim-testdata/sysmoUSIM-SJS1.ok 4 files changed, 195 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/23/12123/4 -- To view, visit https://gerrit.osmocom.org/12123 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9b8ca6ffd98f665690b84239d9a228e2c72c6ff9 Gerrit-Change-Number: 12123 Gerrit-PatchSet: 4 Gerrit-Owner: lazlo Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: dexter Gerrit-CC: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 14:59:58 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 14:59:58 +0000 Subject: Change in pysim[master]: utils: add EF [H|O]PLMNwAcT decoding. In-Reply-To: References: Message-ID: Harald Welte has uploaded a new patch set (#5) to the change originally created by lazlo. ( https://gerrit.osmocom.org/12123 ) Change subject: utils: add EF [H|O]PLMNwAcT decoding. ...................................................................... utils: add EF [H|O]PLMNwAcT decoding. Allow decoding and pretty printing of PLMNwAcT, HPLMNwAcT and OPLMNwAct. Includes unit tests for the added functions. Change-Id: I9b8ca6ffd98f665690b84239d9a228e2c72c6ff9 --- M pySim-read.py M pySim/utils.py A pySim/utils_test.py M pysim-testdata/sysmoUSIM-SJS1.ok 4 files changed, 195 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/23/12123/5 -- To view, visit https://gerrit.osmocom.org/12123 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9b8ca6ffd98f665690b84239d9a228e2c72c6ff9 Gerrit-Change-Number: 12123 Gerrit-PatchSet: 5 Gerrit-Owner: lazlo Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: dexter Gerrit-CC: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 15:02:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 15:02:05 +0000 Subject: Change in pysim[master]: import pysim-testdata of automatic testing to this repository In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13968 to look at the new patch set (#4). Change subject: import pysim-testdata of automatic testing to this repository ...................................................................... import pysim-testdata of automatic testing to this repository This test data is used by the jenkins build verification for pySim, and it was previously located locally on the build slave. By moving the testdata to this repository, any contributor can modify both the code and the expected test results simultaneously. Change-Id: I6714b091a114035d6aab8ba750c5f2b86e438467 --- M contrib/jenkins.sh A pysim-testdata/fakemagicsim.data A pysim-testdata/fakemagicsim.ok A pysim-testdata/sysmoUSIM-SJS1.data A pysim-testdata/sysmoUSIM-SJS1.ok A pysim-testdata/sysmosim-gr1.data A pysim-testdata/sysmosim-gr1.ok 7 files changed, 60 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/68/13968/4 -- To view, visit https://gerrit.osmocom.org/13968 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6714b091a114035d6aab8ba750c5f2b86e438467 Gerrit-Change-Number: 13968 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 15:04:07 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 15:04:07 +0000 Subject: Change in pysim[master]: import pysim-testdata of automatic testing to this repository In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13968 to look at the new patch set (#5). Change subject: import pysim-testdata of automatic testing to this repository ...................................................................... import pysim-testdata of automatic testing to this repository This test data is used by the jenkins build verification for pySim, and it was previously located locally on the build slave. By moving the testdata to this repository, any contributor can modify both the code and the expected test results simultaneously. Change-Id: I6714b091a114035d6aab8ba750c5f2b86e438467 --- M contrib/jenkins.sh A pysim-testdata/fakemagicsim.data A pysim-testdata/fakemagicsim.ok A pysim-testdata/sysmoUSIM-SJS1.data A pysim-testdata/sysmoUSIM-SJS1.ok A pysim-testdata/sysmosim-gr1.data A pysim-testdata/sysmosim-gr1.ok 7 files changed, 61 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/68/13968/5 -- To view, visit https://gerrit.osmocom.org/13968 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6714b091a114035d6aab8ba750c5f2b86e438467 Gerrit-Change-Number: 13968 Gerrit-PatchSet: 5 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 15:05:37 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 15:05:37 +0000 Subject: Change in pysim[master]: import pysim-testdata of automatic testing to this repository In-Reply-To: References: Message-ID: Harald Welte has removed a vote on this change. Change subject: import pysim-testdata of automatic testing to this repository ...................................................................... Removed Verified-1 by Jenkins Builder (1000002) -- To view, visit https://gerrit.osmocom.org/13968 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: deleteVote Gerrit-Change-Id: I6714b091a114035d6aab8ba750c5f2b86e438467 Gerrit-Change-Number: 13968 Gerrit-PatchSet: 5 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 15:05:42 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 15:05:42 +0000 Subject: Change in pysim[master]: import pysim-testdata of automatic testing to this repository In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13968 ) Change subject: import pysim-testdata of automatic testing to this repository ...................................................................... Patch Set 5: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13968 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6714b091a114035d6aab8ba750c5f2b86e438467 Gerrit-Change-Number: 13968 Gerrit-PatchSet: 5 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 10 May 2019 15:05:42 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 15:05:44 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 15:05:44 +0000 Subject: Change in pysim[master]: utils: add EF [H|O]PLMNwAcT decoding. In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/12123 ) Change subject: utils: add EF [H|O]PLMNwAcT decoding. ...................................................................... Patch Set 7: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/12123 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9b8ca6ffd98f665690b84239d9a228e2c72c6ff9 Gerrit-Change-Number: 12123 Gerrit-PatchSet: 7 Gerrit-Owner: lazlo Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: dexter Gerrit-CC: Neels Hofmeyr Gerrit-Comment-Date: Fri, 10 May 2019 15:05:44 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 15:05:45 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 15:05:45 +0000 Subject: Change in pysim[master]: import pysim-testdata of automatic testing to this repository In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13968 ) Change subject: import pysim-testdata of automatic testing to this repository ...................................................................... import pysim-testdata of automatic testing to this repository This test data is used by the jenkins build verification for pySim, and it was previously located locally on the build slave. By moving the testdata to this repository, any contributor can modify both the code and the expected test results simultaneously. Change-Id: I6714b091a114035d6aab8ba750c5f2b86e438467 --- M contrib/jenkins.sh A pysim-testdata/fakemagicsim.data A pysim-testdata/fakemagicsim.ok A pysim-testdata/sysmoUSIM-SJS1.data A pysim-testdata/sysmoUSIM-SJS1.ok A pysim-testdata/sysmosim-gr1.data A pysim-testdata/sysmosim-gr1.ok 7 files changed, 61 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 94da198..fdcd0cb 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -2,9 +2,9 @@ set -e -if [ ! -d "$HOME/pysim-testdata/" ] ; then +if [ ! -d "./pysim-testdata/" ] ; then echo "###############################################" - echo "Please create testdata in $HOME/pysim-testdata!" + echo "Please call from pySim-prog top directory" echo "###############################################" exit 1 fi @@ -13,7 +13,6 @@ . venv/bin/activate pip install pytlv -cp -a "$HOME/pysim-testdata/" pysim-testdata/ cd pysim-testdata ../tests/pysim-test.sh diff --git a/pysim-testdata/fakemagicsim.data b/pysim-testdata/fakemagicsim.data new file mode 100644 index 0000000..deab2f7 --- /dev/null +++ b/pysim-testdata/fakemagicsim.data @@ -0,0 +1,6 @@ +MCC=001 +MNC=01 +ICCID=1122334455667788990 +KI=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +OPC=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +IMSI=001010000000102 \ No newline at end of file diff --git a/pysim-testdata/fakemagicsim.ok b/pysim-testdata/fakemagicsim.ok new file mode 100644 index 0000000..7de421d --- /dev/null +++ b/pysim-testdata/fakemagicsim.ok @@ -0,0 +1,13 @@ +Reading ... +ICCID: 1122334455667788990 +IMSI: 001010000000102 +SMSP: ffffffffffffffffffffffffe1ffffffffffffffffffffffff0581005155f5ffffffffffff000000 +PLMNsel: fff11fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +PLMNwAcT: Can't read file -- SW match failed! Expected 9000 and got 9404. +OPLMNwAcT: Can't read file -- SW match failed! Expected 9000 and got 9404. +HPLMNAcT: Can't read file -- SW match failed! Expected 9000 and got 9404. +ACC: ffff +MSISDN: Not available +AD: 000000 +Done ! + diff --git a/pysim-testdata/sysmoUSIM-SJS1.data b/pysim-testdata/sysmoUSIM-SJS1.data new file mode 100644 index 0000000..b7c1e81 --- /dev/null +++ b/pysim-testdata/sysmoUSIM-SJS1.data @@ -0,0 +1,7 @@ +MCC=001 +MNC=01 +ICCID=1122334455667788990 +KI=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +OPC=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +IMSI=001010000000102 +ADM=55538407 diff --git a/pysim-testdata/sysmoUSIM-SJS1.ok b/pysim-testdata/sysmoUSIM-SJS1.ok new file mode 100644 index 0000000..0b79934 --- /dev/null +++ b/pysim-testdata/sysmoUSIM-SJS1.ok @@ -0,0 +1,13 @@ +Reading ... +ICCID: 1122334455667788990 +IMSI: 001010000000102 +SMSP: ffffffffffffffffffffffffffffffffffffffffffffffffe1ffffffffffffffffffffffff0581005155f5ffffffffffff000000 +PLMNsel: fff11fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +PLMNwAcT: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +OPLMNwAcT: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +HPLMNAcT: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ACC: 0008 +MSISDN: Not available +AD: 00000002 +Done ! + diff --git a/pysim-testdata/sysmosim-gr1.data b/pysim-testdata/sysmosim-gr1.data new file mode 100644 index 0000000..90d23f8 --- /dev/null +++ b/pysim-testdata/sysmosim-gr1.data @@ -0,0 +1,7 @@ +MCC=001 +MNC=01 +ICCID=1122334455667788990 +KI=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +OPC=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +IMSI=001010000000102 +ADM=DDDDDDDD diff --git a/pysim-testdata/sysmosim-gr1.ok b/pysim-testdata/sysmosim-gr1.ok new file mode 100644 index 0000000..6a66cda --- /dev/null +++ b/pysim-testdata/sysmosim-gr1.ok @@ -0,0 +1,13 @@ +Reading ... +ICCID: 1122334455667788990 +IMSI: 001010000000102 +SMSP: ffffffffffffffffffffffffe1ffffffffffffffffffffffff0581005155f5ffffffffffff000000 +PLMNsel: fff11fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +PLMNwAcT: Can't read file -- SW match failed! Expected 9000 and got 9404. +OPLMNwAcT: Can't read file -- SW match failed! Expected 9000 and got 9404. +HPLMNAcT: Can't read file -- SW match failed! Expected 9000 and got 9404. +ACC: 0008 +MSISDN: Not available +AD: 000000 +Done ! + -- To view, visit https://gerrit.osmocom.org/13968 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I6714b091a114035d6aab8ba750c5f2b86e438467 Gerrit-Change-Number: 13968 Gerrit-PatchSet: 5 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 15:05:45 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 15:05:45 +0000 Subject: Change in pysim[master]: utils: add EF [H|O]PLMNwAcT decoding. In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/12123 ) Change subject: utils: add EF [H|O]PLMNwAcT decoding. ...................................................................... utils: add EF [H|O]PLMNwAcT decoding. Allow decoding and pretty printing of PLMNwAcT, HPLMNwAcT and OPLMNwAct. Includes unit tests for the added functions. Change-Id: I9b8ca6ffd98f665690b84239d9a228e2c72c6ff9 --- M pySim-read.py M pySim/utils.py A pySim/utils_test.py M pysim-testdata/sysmoUSIM-SJS1.ok 4 files changed, 195 insertions(+), 7 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/pySim-read.py b/pySim-read.py index bcdbca6..16607cf 100755 --- a/pySim-read.py +++ b/pySim-read.py @@ -37,7 +37,7 @@ import simplejson as json from pySim.commands import SimCardCommands -from pySim.utils import h2b, swap_nibbles, rpad, dec_imsi, dec_iccid +from pySim.utils import h2b, swap_nibbles, rpad, dec_imsi, dec_iccid, format_xplmn_w_act def parse_options(): @@ -129,7 +129,7 @@ try: (res, sw) = scc.read_binary(EF['PLMNwAcT']) if sw == '9000': - print("PLMNwAcT: %s" % (res)) + print("PLMNwAcT:\n%s" % (format_xplmn_w_act(res))) else: print("PLMNwAcT: Can't read, response code = %s" % (sw,)) except Exception as e: @@ -139,7 +139,7 @@ try: (res, sw) = scc.read_binary(EF['OPLMNwAcT']) if sw == '9000': - print("OPLMNwAcT: %s" % (res)) + print("OPLMNwAcT:\n%s" % (format_xplmn_w_act(res))) else: print("OPLMNwAcT: Can't read, response code = %s" % (sw,)) except Exception as e: @@ -149,7 +149,7 @@ try: (res, sw) = scc.read_binary(EF['HPLMNAcT']) if sw == '9000': - print("HPLMNAcT: %s" % (res)) + print("HPLMNAcT:\n%s" % (format_xplmn_w_act(res))) else: print("HPLMNAcT: Can't read, response code = %s" % (sw,)) except Exception as e: diff --git a/pySim/utils.py b/pySim/utils.py index ba94702..65f10c5 100644 --- a/pySim/utils.py +++ b/pySim/utils.py @@ -113,6 +113,79 @@ if oplmn_disp: byte1 = byte1|0x02 return i2h([byte1])+s2h(name) +def hexstr_to_fivebytearr(s): + return [s[i:i+10] for i in range(0, len(s), 10) ] + +# Accepts hex string representing three bytes +def dec_mcc_from_plmn(plmn): + ia = h2i(plmn) + digit1 = ia[0] & 0x0F # 1st byte, LSB + digit2 = (ia[0] & 0xF0) >> 4 # 1st byte, MSB + digit3 = ia[1] & 0x0F # 2nd byte, LSB + if digit3 == 0xF and digit2 == 0xF and digit1 == 0xF: + return 0xFFF # 4095 + mcc = digit1 * 100 + mcc += digit2 * 10 + mcc += digit3 + return mcc + +def dec_mnc_from_plmn(plmn): + ia = h2i(plmn) + digit1 = ia[2] & 0x0F # 3rd byte, LSB + digit2 = (ia[2] & 0xF0) >> 4 # 3rd byte, MSB + digit3 = (ia[1] & 0xF0) >> 4 # 2nd byte, MSB + if digit3 == 0xF and digit2 == 0xF and digit1 == 0xF: + return 0xFFF # 4095 + mnc = 0 + # signifies two digit MNC + if digit3 == 0xF: + mnc += digit1 * 10 + mnc += digit2 + else: + mnc += digit1 * 100 + mnc += digit2 * 10 + mnc += digit3 + return mnc + +def dec_act(twohexbytes): + act_list = [ + {'bit': 15, 'name': "UTRAN"}, + {'bit': 14, 'name': "E-UTRAN"}, + {'bit': 7, 'name': "GSM"}, + {'bit': 6, 'name': "GSM COMPACT"}, + {'bit': 5, 'name': "cdma2000 HRPD"}, + {'bit': 4, 'name': "cdma2000 1xRTT"}, + ] + ia = h2i(twohexbytes) + u16t = (ia[0] << 8)|ia[1] + sel = [] + for a in act_list: + if u16t & (1 << a['bit']): + sel.append(a['name']) + return sel + +def dec_xplmn_w_act(fivehexbytes): + res = {'mcc': 0, 'mnc': 0, 'act': []} + plmn_chars = 6 + act_chars = 4 + plmn_str = fivehexbytes[:plmn_chars] # first three bytes (six ascii hex chars) + act_str = fivehexbytes[plmn_chars:plmn_chars + act_chars] # two bytes after first three bytes + res['mcc'] = dec_mcc_from_plmn(plmn_str) + res['mnc'] = dec_mnc_from_plmn(plmn_str) + res['act'] = dec_act(act_str) + return res + +def format_xplmn_w_act(hexstr): + s = "" + for rec_data in hexstr_to_fivebytearr(hexstr): + rec_info = dec_xplmn_w_act(rec_data) + if rec_info['mcc'] == 0xFFF and rec_info['mnc'] == 0xFFF: + rec_str = "unused" + else: + rec_str = "MCC: %3s MNC: %3s AcT: %s" % (rec_info['mcc'], rec_info['mnc'], ", ".join(rec_info['act'])) + s += "\t%s # %s\n" % (rec_data, rec_str) + return s + def derive_milenage_opc(ki_hex, op_hex): """ Run the milenage algorithm to calculate OPC from Ki and OP diff --git a/pySim/utils_test.py b/pySim/utils_test.py new file mode 100644 index 0000000..ff028da --- /dev/null +++ b/pySim/utils_test.py @@ -0,0 +1,76 @@ +#!/usr/bin/pyton + +import unittest +import utils + +class DecTestCase(unittest.TestCase): + + def testSplitHexStringToListOf5ByteEntries(self): + input_str = "ffffff0003ffffff0002ffffff0001" + expected = [ + "ffffff0003", + "ffffff0002", + "ffffff0001", + ] + self.assertEqual(utils.hexstr_to_fivebytearr(input_str), expected) + + def testDecMCCfromPLMN(self): + self.assertEqual(utils.dec_mcc_from_plmn("92f501"), 295) + + def testDecMCCfromPLMN_unused(self): + self.assertEqual(utils.dec_mcc_from_plmn("ff0f00"), 4095) + + def testDecMNCfromPLMN_twoDigitMNC(self): + self.assertEqual(utils.dec_mnc_from_plmn("92f501"), 10) + + def testDecMNCfromPLMN_threeDigitMNC(self): + self.assertEqual(utils.dec_mnc_from_plmn("031263"), 361) + + def testDecMNCfromPLMN_unused(self): + self.assertEqual(utils.dec_mnc_from_plmn("00f0ff"), 4095) + + def testDecAct_noneSet(self): + self.assertEqual(utils.dec_act("0000"), []) + + def testDecAct_onlyUtran(self): + self.assertEqual(utils.dec_act("8000"), ["UTRAN"]) + + def testDecAct_onlyEUtran(self): + self.assertEqual(utils.dec_act("4000"), ["E-UTRAN"]) + + def testDecAct_onlyGsm(self): + self.assertEqual(utils.dec_act("0080"), ["GSM"]) + + def testDecAct_onlyGsmCompact(self): + self.assertEqual(utils.dec_act("0040"), ["GSM COMPACT"]) + + def testDecAct_onlyCdma2000HRPD(self): + self.assertEqual(utils.dec_act("0020"), ["cdma2000 HRPD"]) + + def testDecAct_onlyCdma20001xRTT(self): + self.assertEqual(utils.dec_act("0010"), ["cdma2000 1xRTT"]) + + def testDecAct_allSet(self): + self.assertEqual(utils.dec_act("ffff"), ["UTRAN", "E-UTRAN", "GSM", "GSM COMPACT", "cdma2000 HRPD", "cdma2000 1xRTT"]) + + def testDecxPlmn_w_act(self): + expected = {'mcc': 295, 'mnc': 10, 'act': ["UTRAN"]} + self.assertEqual(utils.dec_xplmn_w_act("92f5018000"), expected) + + def testFormatxPlmn_w_act(self): + input_str = "92f501800092f5508000ffffff0000ffffff0000ffffff0000ffffff0000ffffff0000ffffff0000ffffff0000ffffff0000" + expected = '''92f5018000 # MCC: 295 MNC: 10 AcT: UTRAN +92f5508000 # MCC: 295 MNC: 5 AcT: UTRAN +ffffff0000 # unused +ffffff0000 # unused +ffffff0000 # unused +ffffff0000 # unused +ffffff0000 # unused +ffffff0000 # unused +ffffff0000 # unused +ffffff0000 # unused +''' + self.assertEqual(utils.format_xplmn_w_act(input_str), expected) + +if __name__ == "__main__": + unittest.main() diff --git a/pysim-testdata/sysmoUSIM-SJS1.ok b/pysim-testdata/sysmoUSIM-SJS1.ok index 0b79934..275e79e 100644 --- a/pysim-testdata/sysmoUSIM-SJS1.ok +++ b/pysim-testdata/sysmoUSIM-SJS1.ok @@ -3,9 +3,48 @@ IMSI: 001010000000102 SMSP: ffffffffffffffffffffffffffffffffffffffffffffffffe1ffffffffffffffffffffffff0581005155f5ffffffffffff000000 PLMNsel: fff11fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -PLMNwAcT: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -OPLMNwAcT: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -HPLMNAcT: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +PLMNwAcT: + fff11fffff # MCC: 1651 MNC: 151 AcT: UTRAN, E-UTRAN, GSM, GSM COMPACT, cdma2000 HRPD, cdma2000 1xRTT + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + +OPLMNwAcT: + fff11fffff # MCC: 1651 MNC: 151 AcT: UTRAN, E-UTRAN, GSM, GSM COMPACT, cdma2000 HRPD, cdma2000 1xRTT + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + +HPLMNAcT: + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ACC: 0008 MSISDN: Not available AD: 00000002 -- To view, visit https://gerrit.osmocom.org/12123 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I9b8ca6ffd98f665690b84239d9a228e2c72c6ff9 Gerrit-Change-Number: 12123 Gerrit-PatchSet: 7 Gerrit-Owner: lazlo Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: dexter Gerrit-CC: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 15:05:54 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 15:05:54 +0000 Subject: Change in pysim[master]: utils: Remove call to format_xplmn_w_act() in pySim-read.py for now (... In-Reply-To: References: Message-ID: Harald Welte has abandoned this change. ( https://gerrit.osmocom.org/12124 ) Change subject: utils: Remove call to format_xplmn_w_act() in pySim-read.py for now (not to break card tests). ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/12124 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: I39d3c1fb217ef91d311e6607c0d50722576c4576 Gerrit-Change-Number: 12124 Gerrit-PatchSet: 1 Gerrit-Owner: lazlo Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 15:08:13 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 15:08:13 +0000 Subject: Change in pysim[master]: Use reference array for reading ICCID In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/12461 ) Change subject: Use reference array for reading ICCID ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/12461 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iad0a328c6f0c9a4ab678efe068801849be48d8fc Gerrit-Change-Number: 12461 Gerrit-PatchSet: 5 Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: K?vin Redon Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 10 May 2019 15:08:13 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 15:08:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 15:08:16 +0000 Subject: Change in pysim[master]: Don't try to parse result if select_file() failed In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/12462 ) Change subject: Don't try to parse result if select_file() failed ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/12462 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I25b859374e33654e58d07061926bf8529eab87f3 Gerrit-Change-Number: 12462 Gerrit-PatchSet: 5 Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: K?vin Redon Gerrit-Reviewer: Max Gerrit-Comment-Date: Fri, 10 May 2019 15:08:16 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 15:08:20 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 15:08:20 +0000 Subject: Change in pysim[master]: Use reference array for reading ICCID In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/12461 ) Change subject: Use reference array for reading ICCID ...................................................................... Use reference array for reading ICCID Change-Id: Iad0a328c6f0c9a4ab678efe068801849be48d8fc --- M pySim-read.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/pySim-read.py b/pySim-read.py index 16607cf..d4a9849 100755 --- a/pySim-read.py +++ b/pySim-read.py @@ -95,7 +95,7 @@ print("Reading ...") # EF.ICCID - (res, sw) = scc.read_binary(['3f00', '2fe2']) + (res, sw) = scc.read_binary(EF['ICCID']) if sw == '9000': print("ICCID: %s" % (dec_iccid(res),)) else: -- To view, visit https://gerrit.osmocom.org/12461 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iad0a328c6f0c9a4ab678efe068801849be48d8fc Gerrit-Change-Number: 12461 Gerrit-PatchSet: 5 Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: K?vin Redon Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 15:08:20 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 15:08:20 +0000 Subject: Change in pysim[master]: Don't try to parse result if select_file() failed In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/12462 ) Change subject: Don't try to parse result if select_file() failed ...................................................................... Don't try to parse result if select_file() failed Change-Id: I25b859374e33654e58d07061926bf8529eab87f3 --- M pySim/commands.py 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/pySim/commands.py b/pySim/commands.py index 913f394..3d17903 100644 --- a/pySim/commands.py +++ b/pySim/commands.py @@ -109,6 +109,8 @@ if not hasattr(type(ef), '__iter__'): ef = [ef] r = self.select_file(ef) + if len(r[-1]) == 0: + return (None, None) if length is None: length = self.__len(r) - offset pdu = self.cla_byte + 'b0%04x%02x' % (offset, (min(256, length) & 0xff)) -- To view, visit https://gerrit.osmocom.org/12462 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I25b859374e33654e58d07061926bf8529eab87f3 Gerrit-Change-Number: 12462 Gerrit-PatchSet: 5 Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: K?vin Redon Gerrit-Reviewer: Max -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 15:25:50 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 15:25:50 +0000 Subject: Change in pysim[master]: pySim-*.py: print info about selected reader interface In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/11491 ) Change subject: pySim-*.py: print info about selected reader interface ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/11491 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Idd791d7ef635e15915aab13274aefc15e70777b0 Gerrit-Change-Number: 11491 Gerrit-PatchSet: 7 Gerrit-Owner: Vadim Yanitskiy Gerrit-Assignee: tnt Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Harald Welte Gerrit-CC: tnt Gerrit-Comment-Date: Fri, 10 May 2019 15:25:50 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 15:26:16 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 15:26:16 +0000 Subject: Change in pysim[master]: pySim-*.py: print info about selected reader interface In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/11491 ) Change subject: pySim-*.py: print info about selected reader interface ...................................................................... Patch Set 7: Code-Review+2 > tou can now modify the .ok files accordingly and re-submit the patch. Thanks a lot, Harald! \o/ -- To view, visit https://gerrit.osmocom.org/11491 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Idd791d7ef635e15915aab13274aefc15e70777b0 Gerrit-Change-Number: 11491 Gerrit-PatchSet: 7 Gerrit-Owner: Vadim Yanitskiy Gerrit-Assignee: tnt Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Harald Welte Gerrit-CC: tnt Gerrit-Comment-Date: Fri, 10 May 2019 15:26:16 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 15:26:30 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 15:26:30 +0000 Subject: Change in pysim[master]: pySim-*.py: print info about selected reader interface In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/11491 ) Change subject: pySim-*.py: print info about selected reader interface ...................................................................... pySim-*.py: print info about selected reader interface Change-Id: Idd791d7ef635e15915aab13274aefc15e70777b0 --- M pySim-prog.py M pySim-read.py M pysim-testdata/fakemagicsim.ok M pysim-testdata/sysmoUSIM-SJS1.ok M pysim-testdata/sysmosim-gr1.ok 5 files changed, 15 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, approved diff --git a/pySim-prog.py b/pySim-prog.py index d6d7ad5..2638eef 100755 --- a/pySim-prog.py +++ b/pySim-prog.py @@ -568,12 +568,18 @@ # Init card reader driver if opts.pcsc_dev is not None: + print("Using PC/SC reader (dev=%d) interface" + % opts.pcsc_dev) from pySim.transport.pcsc import PcscSimLink sl = PcscSimLink(opts.pcsc_dev) elif opts.osmocon_sock is not None: + print("Using Calypso-based (OsmocomBB, sock=%s) reader interface" + % opts.osmocon_sock) from pySim.transport.calypso import CalypsoSimLink sl = CalypsoSimLink(sock_path=opts.osmocon_sock) else: # Serial reader is default + print("Using serial reader (port=%s, baudrate=%d) interface" + % (opts.device, opts.baudrate)) from pySim.transport.serial import SerialSimLink sl = SerialSimLink(device=opts.device, baudrate=opts.baudrate) diff --git a/pySim-read.py b/pySim-read.py index d4a9849..17fce61 100755 --- a/pySim-read.py +++ b/pySim-read.py @@ -76,12 +76,18 @@ # Init card reader driver if opts.pcsc_dev is not None: + print("Using PC/SC reader (dev=%d) interface" + % opts.pcsc_dev) from pySim.transport.pcsc import PcscSimLink sl = PcscSimLink(opts.pcsc_dev) elif opts.osmocon_sock is not None: + print("Using Calypso-based (OsmocomBB, sock=%s) reader interface" + % opts.osmocon_sock) from pySim.transport.calypso import CalypsoSimLink sl = CalypsoSimLink(sock_path=opts.osmocon_sock) else: # Serial reader is default + print("Using serial reader (port=%s, baudrate=%d) interface" + % (opts.device, opts.baudrate)) from pySim.transport.serial import SerialSimLink sl = SerialSimLink(device=opts.device, baudrate=opts.baudrate) diff --git a/pysim-testdata/fakemagicsim.ok b/pysim-testdata/fakemagicsim.ok index 7de421d..a1d9e9c 100644 --- a/pysim-testdata/fakemagicsim.ok +++ b/pysim-testdata/fakemagicsim.ok @@ -1,3 +1,4 @@ +Using PC/SC reader (dev=1) interface Reading ... ICCID: 1122334455667788990 IMSI: 001010000000102 diff --git a/pysim-testdata/sysmoUSIM-SJS1.ok b/pysim-testdata/sysmoUSIM-SJS1.ok index 275e79e..3bbdc90 100644 --- a/pysim-testdata/sysmoUSIM-SJS1.ok +++ b/pysim-testdata/sysmoUSIM-SJS1.ok @@ -1,3 +1,4 @@ +Using PC/SC reader (dev=0) interface Reading ... ICCID: 1122334455667788990 IMSI: 001010000000102 diff --git a/pysim-testdata/sysmosim-gr1.ok b/pysim-testdata/sysmosim-gr1.ok index 6a66cda..a1a49fd 100644 --- a/pysim-testdata/sysmosim-gr1.ok +++ b/pysim-testdata/sysmosim-gr1.ok @@ -1,3 +1,4 @@ +Using PC/SC reader (dev=2) interface Reading ... ICCID: 1122334455667788990 IMSI: 001010000000102 -- To view, visit https://gerrit.osmocom.org/11491 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Idd791d7ef635e15915aab13274aefc15e70777b0 Gerrit-Change-Number: 11491 Gerrit-PatchSet: 7 Gerrit-Owner: Vadim Yanitskiy Gerrit-Assignee: tnt Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Harald Welte Gerrit-CC: tnt -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 15:58:36 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 15:58:36 +0000 Subject: Change in osmo-msc[master]: Introduce initial unit test for db_sms_* API In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13629 to look at the new patch set (#2). Change subject: Introduce initial unit test for db_sms_* API ...................................................................... Introduce initial unit test for db_sms_* API Since OsmoMSC has built-in SMSC, it needs to store the messages somewhere. Currently we use libdbi and SQLite3 back-end for that. For a long time, the db_sms_* API remained uncovered by unit tests. This change aims to fix that, and does cover the following calls: - db_sms_store(), - db_sms_get(), - db_sms_get_next_unsent(), - db_sms_mark_delivered(), - db_sms_delete_sent_message_by_id(), - db_sms_delete_by_msisdn(), - db_sms_delete_oldest_expired_message(). Due to performance reasons, the test database is initialized in RAM using the magic filename ':memory:'. This is a feature of SQLite3 (and not libdbi), see: https://www.sqlite.org/inmemorydb.html Of course, this unit test helped to discover some problems: 1) Storing an SMS with empty TP-User-Data (TP-UDL=0) causes buffer overruns in both db_sms_store() and db_sms_get(). 2) TP-User-Data-Length is always being interpreted in octets, regardless of DCS (Data Coding Scheme). This results in storing garbage in the database if the default 7-bit encoding is used. Fortunately, the 'user_data' buffer in structure 'gsm_sms' is large emough, so we don't experience buffer overruns. 3) db_sms_delete_oldest_expired_message() doesn't work as expected. Instead of removing the *oldest* expired message, it tries to remove the *newest* one. The current test expectations do reflect these problems. All of them will be fixed in the follow-up patches. Change-Id: Id94ad35b6f78f839137db2e17010fbf9b40111a3 --- M configure.ac M src/libmsc/db.c M tests/Makefile.am A tests/db_sms/Makefile.am A tests/db_sms/db_sms_test.c A tests/db_sms/db_sms_test.err A tests/db_sms/db_sms_test.ok M tests/testsuite.at 8 files changed, 732 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/29/13629/2 -- To view, visit https://gerrit.osmocom.org/13629 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id94ad35b6f78f839137db2e17010fbf9b40111a3 Gerrit-Change-Number: 13629 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Max -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 16:12:04 2019 From: gerrit-no-reply at lists.osmocom.org (Keith Whyte) Date: Fri, 10 May 2019 16:12:04 +0000 Subject: Change in osmo-sgsn[master]: libgtp: don't call sgsn_pdp_ctx_free() w/o MM ctx In-Reply-To: References: Message-ID: Keith Whyte has posted comments on this change. ( https://gerrit.osmocom.org/13929 ) Change subject: libgtp: don't call sgsn_pdp_ctx_free() w/o MM ctx ...................................................................... Patch Set 2: > I think the problem lies somewhere else. Agreed. >IMHO: Calling free() w/o MM ctx is fine. Well, if you pass that pctx into sgsn_pdp_ctx_free() after the MM context has been cleared, it WILL crash with rate_ctr_group_free(pdp->ctrg); I don't see how this is fine. :-/ -- To view, visit https://gerrit.osmocom.org/13929 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I184dcce27b26104c61d80b2d910388d5d3323def Gerrit-Change-Number: 13929 Gerrit-PatchSet: 2 Gerrit-Owner: Keith Whyte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Keith Whyte Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Fri, 10 May 2019 16:12:04 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 16:34:45 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 16:34:45 +0000 Subject: Change in osmo-mgw[master]: configure.ac: drop useless check for -fvisibility=hidden Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13969 Change subject: configure.ac: drop useless check for -fvisibility=hidden ...................................................................... configure.ac: drop useless check for -fvisibility=hidden We don't use this attribute in OsmoMGW anyway. Change-Id: I61d08adbaaf938310f9474a1ea449e016a611ca3 --- M configure.ac 1 file changed, 0 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/69/13969/1 diff --git a/configure.ac b/configure.ac index 15976e6..a14c276 100644 --- a/configure.ac +++ b/configure.ac @@ -76,17 +76,6 @@ dnl Checks for typedefs, structures and compiler characteristics -# The following test is taken from WebKit's webkit.m4 -saved_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -fvisibility=hidden " -AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden]) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])], - [ AC_MSG_RESULT([yes]) - SYMBOL_VISIBILITY="-fvisibility=hidden"], - AC_MSG_RESULT([no])) -CFLAGS="$saved_CFLAGS" -AC_SUBST(SYMBOL_VISIBILITY) - AX_CHECK_COMPILE_FLAG([-Werror=implicit], [CFLAGS="$CFLAGS -Werror=implicit"]) AX_CHECK_COMPILE_FLAG([-Werror=maybe-uninitialized], [CFLAGS="$CFLAGS -Werror=maybe-uninitialized"]) AX_CHECK_COMPILE_FLAG([-Werror=memset-transposed-args], [CFLAGS="$CFLAGS -Werror=memset-transposed-args"]) -- To view, visit https://gerrit.osmocom.org/13969 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I61d08adbaaf938310f9474a1ea449e016a611ca3 Gerrit-Change-Number: 13969 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 18:05:33 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 18:05:33 +0000 Subject: Change in libosmo-sccp[master]: osmo-stp: expose root talloc context to the VTY code Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13970 Change subject: osmo-stp: expose root talloc context to the VTY code ...................................................................... osmo-stp: expose root talloc context to the VTY code In Id0789c4946929b783c54220de439958001f94992 I introduced the VTY commands for talloc-context introspection, but forgot to expose the root talloc-context. Change-Id: Id2bf6cdae112f9791c93411c1837de488cab9ee3 --- M stp/stp_main.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/70/13970/1 diff --git a/stp/stp_main.c b/stp/stp_main.c index aa77e61..6a47403 100644 --- a/stp/stp_main.c +++ b/stp/stp_main.c @@ -166,6 +166,8 @@ msgb_talloc_ctx_init(tall_stp_ctx, 0); osmo_init_logging2(tall_stp_ctx, &log_info); osmo_stats_init(tall_stp_ctx); + + vty_info.tall_ctx = tall_stp_ctx; vty_init(&vty_info); handle_options(argc, argv); -- To view, visit https://gerrit.osmocom.org/13970 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id2bf6cdae112f9791c93411c1837de488cab9ee3 Gerrit-Change-Number: 13970 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 18:05:34 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 18:05:34 +0000 Subject: Change in libosmo-sccp[master]: osmo-stp: refactor handling of both SIGINT and SIGTERM Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13971 Change subject: osmo-stp: refactor handling of both SIGINT and SIGTERM ...................................................................... osmo-stp: refactor handling of both SIGINT and SIGTERM On reception of one of the mentioned signals, we should gracefully shutdown established SIGTRAN links by sending S_L_GLOBAL_SHUTDOWN. As a bonus, let's report heap state of the root talloc-context. Change-Id: I5d8618857c5119d4acca5d65cf1276ab02889c84 --- M stp/stp_main.c 1 file changed, 18 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/71/13971/1 diff --git a/stp/stp_main.c b/stp/stp_main.c index 6a47403..3127321 100644 --- a/stp/stp_main.c +++ b/stp/stp_main.c @@ -48,6 +48,7 @@ #include static void *tall_stp_ctx; +static int quit = 0; /* we only use logging sub-systems of the various libraries so far */ static const struct log_info_cat log_info_cat[] = { @@ -136,11 +137,8 @@ switch (signal) { case SIGINT: case SIGTERM: - /* FIXME: handle the signal somewhere else and gracefully shut down - * SIGTRAN links - osmo_signal_dispatch(SS_L_GLOBAL, S_L_GLOBAL_SHUTDOWN, NULL); - sleep(1); */ - exit(0); + fprintf(stderr, "Terminating due to signal %d\n", signal); + quit++; break; case SIGABRT: osmo_generate_backtrace(); @@ -214,9 +212,23 @@ } } - while (1) { + while (!quit) { rc = osmo_select_main(0); if (rc < 0) exit(3); } + + /* Gracefully shut down SIGTRAN links */ + osmo_signal_dispatch(SS_L_GLOBAL, S_L_GLOBAL_SHUTDOWN, NULL); + sleep(1); /* FIXME: do we really need to sleep() here? */ + + /* Deinitialize logging */ + log_fini(); + + /* Report state of the root talloc-context, then free, + * so both ASAN and Valgrind are happy... */ + talloc_report_full(tall_stp_ctx, stderr); + talloc_free(tall_stp_ctx); + + return 0; } -- To view, visit https://gerrit.osmocom.org/13971 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I5d8618857c5119d4acca5d65cf1276ab02889c84 Gerrit-Change-Number: 13971 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 18:05:34 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 18:05:34 +0000 Subject: Change in libosmo-sccp[master]: osmo-stp: track the use of NULL talloc-context Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13972 Change subject: osmo-stp: track the use of NULL talloc-context ...................................................................... osmo-stp: track the use of NULL talloc-context Change-Id: I89e7faf8469f5eba9599c9cbc1fec4fe583e7a13 --- M stp/stp_main.c 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/72/13972/1 diff --git a/stp/stp_main.c b/stp/stp_main.c index 3127321..04bca7c 100644 --- a/stp/stp_main.c +++ b/stp/stp_main.c @@ -160,6 +160,9 @@ { int rc; + /* Track the use of NULL memory context */ + talloc_enable_null_tracking(); + tall_stp_ctx = talloc_named_const(NULL, 1, "osmo-stp"); msgb_talloc_ctx_init(tall_stp_ctx, 0); osmo_init_logging2(tall_stp_ctx, &log_info); @@ -230,5 +233,13 @@ talloc_report_full(tall_stp_ctx, stderr); talloc_free(tall_stp_ctx); + /* FIXME: VTY code still uses NULL-context */ + talloc_free(tall_vty_ctx); + + /* Report state of NULL talloc-context, then free, + * so both ASAN and Valgrind are happy... */ + talloc_report_full(NULL, stderr); + talloc_disable_null_tracking(); + return 0; } -- To view, visit https://gerrit.osmocom.org/13972 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I89e7faf8469f5eba9599c9cbc1fec4fe583e7a13 Gerrit-Change-Number: 13972 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 18:06:08 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 18:06:08 +0000 Subject: Change in libosmo-sccp[master]: osmo-stp: expose root talloc context to the VTY code In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13970 ) Change subject: osmo-stp: expose root talloc context to the VTY code ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13970 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id2bf6cdae112f9791c93411c1837de488cab9ee3 Gerrit-Change-Number: 13970 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 10 May 2019 18:06:08 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 18:50:44 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 18:50:44 +0000 Subject: Change in libosmocore[master]: libosmovty: deprecate vty_init(), add vty_init[_app]_ctx() Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13973 Change subject: libosmovty: deprecate vty_init(), add vty_init[_app]_ctx() ...................................................................... libosmovty: deprecate vty_init(), add vty_init[_app]_ctx() The main problem of vty_init() is that it's using NULL talloc context. We could modify it and start using the context from a given 'vty_app_info' structure, but this might cause the compatibility problems with the existing API users. Instead, let's deprecate vty_init() and introduce two new wrappers: - vty_init_ctx() - use a given talloc context, - vty_init_app_ctx() - use the application's talloc context. Change-Id: I65d71f8fc943e103b53b784f690ed56a6e373e3f --- M include/osmocom/vty/vty.h M src/vty/vty.c M tests/logging/logging_vty_test.c M tests/tdef/tdef_vty_test_config_root.c M tests/tdef/tdef_vty_test_config_subnode.c M tests/tdef/tdef_vty_test_dynamic.c M tests/vty/vty_test.c M tests/vty/vty_transcript_test.c 8 files changed, 45 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/73/13973/1 diff --git a/include/osmocom/vty/vty.h b/include/osmocom/vty/vty.h index 03a2924..7461702 100644 --- a/include/osmocom/vty/vty.h +++ b/include/osmocom/vty/vty.h @@ -5,6 +5,7 @@ #include #include +#include /*! \defgroup vty VTY (Virtual TTY) interface * @{ @@ -187,7 +188,10 @@ }; /* Prototypes. */ -void vty_init(struct vty_app_info *app_info); +void vty_init_ctx(struct vty_app_info *app_info, void *ctx); +void vty_init_app_ctx(struct vty_app_info *app_info); +void vty_init(struct vty_app_info *app_info) + OSMO_DEPRECATED("use vty_init_ctx() or vty_init_app_ctx() instead"); int vty_read_config_file(const char *file_name, void *priv); void vty_init_vtysh (void); void vty_reset (void); diff --git a/src/vty/vty.c b/src/vty/vty.c index 98b332d..2b339bb 100644 --- a/src/vty/vty.c +++ b/src/vty/vty.c @@ -1776,13 +1776,9 @@ vtyvec = vector_init(VECTOR_MIN_SIZE); } -/*! Initialize VTY layer - * \param[in] app_info application information - */ -/* Install vty's own commands like `who' command. */ -void vty_init(struct vty_app_info *app_info) +static inline void _vty_init(struct vty_app_info *app_info, void *ctx) { - tall_vty_ctx = talloc_named_const(NULL, 0, "vty"); + tall_vty_ctx = talloc_named_const(ctx, 0, "vty"); tall_vty_vec_ctx = talloc_named_const(tall_vty_ctx, 0, "vty_vector"); tall_vty_cmd_ctx = talloc_named_const(tall_vty_ctx, 0, "vty_command"); @@ -1812,6 +1808,38 @@ install_element(VTY_NODE, &vty_bind_cmd); } +/*! Initialize VTY layer using a given talloc context. + * \param[in] app_info application information. + * \param[in] ctx talloc context to use as parent. + * + * Install VTY's own commands like `who' command. + */ +void vty_init_ctx(struct vty_app_info *app_info, void *ctx) +{ + _vty_init(app_info, ctx); +} + +/*! Initialize VTY layer using application's talloc context. + * \param[in] app_info application information. + * + * Install VTY's own commands like `who' command. + */ +void vty_init_app_ctx(struct vty_app_info *app_info) +{ + _vty_init(app_info, app_info->tall_ctx); +} + +/*! Initialize VTY layer using NULL talloc context (deprecated). + * \param[in] app_info application information. + * + * Install VTY's own commands like `who' command. + * DEPRECATED: use vty_init_ctx() or vty_init_app_ctx() instead. + */ +void vty_init(struct vty_app_info *app_info) +{ + _vty_init(app_info, NULL); +} + /*! Read the configuration file using the VTY code * \param[in] file_name file name of the configuration file * \param[in] priv private data to be passed to \ref vty_read_file diff --git a/tests/logging/logging_vty_test.c b/tests/logging/logging_vty_test.c index 806a460..b190e68 100644 --- a/tests/logging/logging_vty_test.c +++ b/tests/logging/logging_vty_test.c @@ -238,7 +238,7 @@ root_ctx = talloc_named_const(NULL, 0, "logging_vty_test"); vty_info.tall_ctx = root_ctx; - vty_init(&vty_info); + vty_init_app_ctx(&vty_info); osmo_init_logging2(root_ctx, &log_info); diff --git a/tests/tdef/tdef_vty_test_config_root.c b/tests/tdef/tdef_vty_test_config_root.c index d69e028..0d6199e 100644 --- a/tests/tdef/tdef_vty_test_config_root.c +++ b/tests/tdef/tdef_vty_test_config_root.c @@ -246,7 +246,7 @@ osmo_init_logging2(root_ctx, &log_info); vty_info.tall_ctx = root_ctx; - vty_init(&vty_info); + vty_init_app_ctx(&vty_info); osmo_talloc_vty_add_cmds(); timer_init_vty(); /* <---- the only tdef relevant init */ diff --git a/tests/tdef/tdef_vty_test_config_subnode.c b/tests/tdef/tdef_vty_test_config_subnode.c index ce851f5..f2d1199 100644 --- a/tests/tdef/tdef_vty_test_config_subnode.c +++ b/tests/tdef/tdef_vty_test_config_subnode.c @@ -242,7 +242,7 @@ osmo_init_logging2(root_ctx, &log_info); vty_info.tall_ctx = root_ctx; - vty_init(&vty_info); + vty_init_app_ctx(&vty_info); osmo_talloc_vty_add_cmds(); gsmnet_init_vty(); /* <--- relevant init for this example */ diff --git a/tests/tdef/tdef_vty_test_dynamic.c b/tests/tdef/tdef_vty_test_dynamic.c index 20dae53..f5e2fe4 100644 --- a/tests/tdef/tdef_vty_test_dynamic.c +++ b/tests/tdef/tdef_vty_test_dynamic.c @@ -316,7 +316,7 @@ osmo_init_logging2(root_ctx, &log_info); vty_info.tall_ctx = root_ctx; - vty_init(&vty_info); + vty_init_app_ctx(&vty_info); osmo_talloc_vty_add_cmds(); member_init_vty(); /* <--- relevant init for this example */ diff --git a/tests/vty/vty_test.c b/tests/vty/vty_test.c index 30efb9a..b04fec3 100644 --- a/tests/vty/vty_test.c +++ b/tests/vty/vty_test.c @@ -502,7 +502,7 @@ /* Init stats */ osmo_stats_init(stats_ctx); - vty_init(&vty_info); + vty_init_ctx(&vty_info, ctx); /* Setup VTY commands */ logging_vty_add_cmds(); diff --git a/tests/vty/vty_transcript_test.c b/tests/vty/vty_transcript_test.c index 7ffe713..8418330 100644 --- a/tests/vty/vty_transcript_test.c +++ b/tests/vty/vty_transcript_test.c @@ -192,7 +192,7 @@ root_ctx = talloc_named_const(NULL, 0, "vty_transcript_test"); vty_info.tall_ctx = root_ctx; - vty_init(&vty_info); + vty_init_app_ctx(&vty_info); osmo_talloc_vty_add_cmds(); init_vty_cmds(); -- To view, visit https://gerrit.osmocom.org/13973 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I65d71f8fc943e103b53b784f690ed56a6e373e3f Gerrit-Change-Number: 13973 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 18:52:49 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 18:52:49 +0000 Subject: Change in libosmocore[master]: libosmovty: deprecate vty_init(), add vty_init[_app]_ctx() In-Reply-To: References: Message-ID: Vadim Yanitskiy has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/13973 ) Change subject: libosmovty: deprecate vty_init(), add vty_init[_app]_ctx() ...................................................................... libosmovty: deprecate vty_init(), add vty_init[_app]_ctx() The main problem of vty_init() is that it's using NULL talloc context. We could modify it and start using the context from a given 'vty_app_info' structure, but this might cause the compatibility problems with the existing API users. Instead, let's deprecate vty_init() and introduce two new wrappers: - vty_init_ctx() - use a given talloc context, - vty_init_app_ctx() - use the application's talloc context. Change-Id: I65d71f8fc943e103b53b784f690ed56a6e373e3f --- M include/osmocom/vty/vty.h M src/vty/vty.c M tests/logging/logging_vty_test.c M tests/tdef/tdef_vty_test_config_root.c M tests/tdef/tdef_vty_test_config_subnode.c M tests/tdef/tdef_vty_test_dynamic.c M tests/vty/vty_test.c M tests/vty/vty_transcript_test.c 8 files changed, 45 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/73/13973/2 -- To view, visit https://gerrit.osmocom.org/13973 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I65d71f8fc943e103b53b784f690ed56a6e373e3f Gerrit-Change-Number: 13973 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-CC: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 19:29:04 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 19:29:04 +0000 Subject: Change in osmo-msc[master]: transaction: fix NULL-pointer dereference in trans_alloc() Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13974 Change subject: transaction: fix NULL-pointer dereference in trans_alloc() ...................................................................... transaction: fix NULL-pointer dereference in trans_alloc() Unlike LOG_TRANS_CAT(), LOG_TRANS() is not NULL-safe: LOG_TRANS_CAT(trans, (trans)->log_subsys, level, fmt, ##args) ^^^^^^^^^ NULL-pointer dereference Let's rather use generic LOGP() macro with pre-calculated logging subsystem. Intentional use of LOG_TRANS_CAT() doesn't make sense anyway, because the result would be uninformative: trans(NULL NULL callref-0x0 tid-0) ... Change-Id: I3c373d20ebd6e96ebd57f84b74dc15a6b69c03ac --- M include/osmocom/msc/transaction.h M src/libmsc/transaction.c 2 files changed, 6 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/74/13974/1 diff --git a/include/osmocom/msc/transaction.h b/include/osmocom/msc/transaction.h index 6b82390..a0aeaef 100644 --- a/include/osmocom/msc/transaction.h +++ b/include/osmocom/msc/transaction.h @@ -157,11 +157,9 @@ struct gsm_trans *trans_has_conn(const struct msc_a *msc_a); void trans_conn_closed(const struct msc_a *msc_a); -static inline int trans_log_subsys(const struct gsm_trans *trans) +static inline int trans_log_subsys(enum trans_type type) { - if (!trans) - return DMSC; - switch (trans->type) { + switch (type) { case TRANS_CC: case TRANS_SILENT_CALL: return DCC; diff --git a/src/libmsc/transaction.c b/src/libmsc/transaction.c index d6f8c3b..ebdaced 100644 --- a/src/libmsc/transaction.c +++ b/src/libmsc/transaction.c @@ -127,11 +127,12 @@ enum trans_type type, uint8_t trans_id, uint32_t callref) { - struct gsm_trans *trans = NULL; /* (NULL for LOG_TRANS() before allocation) */ + int subsys = trans_log_subsys(type); + struct gsm_trans *trans; /* a valid subscriber is indispensable */ if (vsub == NULL) { - LOG_TRANS(trans, LOGL_ERROR, "unable to alloc transaction, invalid subscriber (NULL)\n"); + LOGP(subsys, LOGL_ERROR, "unable to alloc transaction, invalid subscriber (NULL)\n"); return NULL; } @@ -142,11 +143,11 @@ *trans = (struct gsm_trans){ .vsub = vsub, .type = type, + .log_subsys = subsys, .transaction_id = trans_id, .callref = callref, .net = net, }; - trans->log_subsys = trans_log_subsys(trans); vlr_subscr_get(vsub, trans_vsub_use(type)); llist_add_tail(&trans->entry, &net->trans_list); -- To view, visit https://gerrit.osmocom.org/13974 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I3c373d20ebd6e96ebd57f84b74dc15a6b69c03ac Gerrit-Change-Number: 13974 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 19:46:22 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 19:46:22 +0000 Subject: Change in osmo-msc[master]: libmsc/msc_ho.c: fix unreacheable check of MSC-T role allocation Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13975 Change subject: libmsc/msc_ho.c: fix unreacheable check of MSC-T role allocation ...................................................................... libmsc/msc_ho.c: fix unreacheable check of MSC-T role allocation Change-Id: I46fa37ff27e8a4576fdc8edad894ee16759a6e7a Fixes: CID#198413 --- M src/libmsc/msc_ho.c 1 file changed, 8 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/75/13975/1 diff --git a/src/libmsc/msc_ho.c b/src/libmsc/msc_ho.c index 3a4258c..615b8cd 100644 --- a/src/libmsc/msc_ho.c +++ b/src/libmsc/msc_ho.c @@ -463,9 +463,8 @@ msc_i->ran_conn->ran_peer->fi->id, rp->fi->id); } - msc_t_alloc(msc_a->c.msub, rp); - msc_ho_send_handover_request(msc_a); - return; + msc_t = msc_t_alloc(msc_a->c.msub, rp); + break; case MSC_NEIGHBOR_TYPE_REMOTE_MSC: ipa_name = msc_a->ho.new_cell.msc_ipa_name; @@ -482,22 +481,24 @@ osmo_quote_str(ipa_name, -1)); } - msc_t_remote_alloc(msc_a->c.msub, msc_a->c.ran, (const uint8_t*)ipa_name, strlen(ipa_name)); - msc_ho_send_handover_request(msc_a); - return; + msc_t = msc_t_remote_alloc(msc_a->c.msub, msc_a->c.ran, + (const uint8_t *) ipa_name, + strlen(ipa_name)); + break; default: msc_ho_try_next_cell(msc_a, "unknown Handover target type %d\n", msc_a->ho.new_cell.type); return; } - msc_t = msc_a_msc_t(msc_a); if (!msc_t) { /* There should definitely be one now. */ msc_ho_failed(msc_a, GSM0808_CAUSE_EQUIPMENT_FAILURE, "Cannot initiate Handover Request, failed to set up a target MSC-T\n"); return; } + + msc_ho_send_handover_request(msc_a); } static void msc_ho_rx_request_ack(struct msc_a *msc_a, struct msc_a_ran_dec_data *hra); -- To view, visit https://gerrit.osmocom.org/13975 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I46fa37ff27e8a4576fdc8edad894ee16759a6e7a Gerrit-Change-Number: 13975 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 20:01:22 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 20:01:22 +0000 Subject: Change in osmo-msc[master]: libmsc/msc_a.c: fix possible NULL-pointer dereferences Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13976 Change subject: libmsc/msc_a.c: fix possible NULL-pointer dereferences ...................................................................... libmsc/msc_a.c: fix possible NULL-pointer dereferences Change-Id: Id5c95fbf318a2e51e7ffee2e08ceab3042b26cc9 Fixes: CID#198411, CID#198414 --- M src/libmsc/msc_a.c 1 file changed, 25 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/76/13976/1 diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c index 77dd43d..e416da7 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -245,10 +245,18 @@ int msc_a_vlr_set_cipher_mode(void *_msc_a, bool umts_aka, bool retrieve_imeisv) { struct msc_a *msc_a = _msc_a; - struct vlr_subscr *vsub = msc_a_vsub(msc_a); + struct vlr_subscr *vsub; - if (!msc_a || !vsub || !vsub->last_tuple) { - LOG_MSC_A(msc_a, LOGL_ERROR, "Insufficient info to start ciphering\n"); + if (!msc_a) { + LOGP(DMSC, LOGL_ERROR, "Insufficient info to start ciphering: " + "MSC-A role is NULL?!?\n"); + return -EINVAL; + } + + vsub = msc_a_vsub(msc_a); + if (!vsub || !vsub->last_tuple) { + LOG_MSC_A(msc_a, LOGL_ERROR, "Insufficient info to start ciphering: " + "vlr_subscr is NULL?!?\n"); return -EINVAL; } @@ -280,12 +288,22 @@ static int msc_a_ran_enc_ciphering(struct msc_a *msc_a, bool umts_aka, bool retrieve_imeisv) { - struct gsm_network *net = msc_a_net(msc_a); - struct vlr_subscr *vsub = msc_a_vsub(msc_a); + struct gsm_network *net; + struct vlr_subscr *vsub; struct ran_msg msg; - if (!msc_a || !vsub || !vsub->last_tuple) { - LOG_MSC_A(msc_a, LOGL_ERROR, "Insufficient info to start ciphering\n"); + if (!msc_a) { + LOGP(DMSC, LOGL_ERROR, "Insufficient info to start ciphering: " + "MSC-A role is NULL?!?\n"); + return -EINVAL; + } + + net = msc_a_net(msc_a); + vsub = msc_a_vsub(msc_a); + + if (!net || !vsub || !vsub->last_tuple) { + LOG_MSC_A(msc_a, LOGL_ERROR, "Insufficient info to start ciphering: " + "gsm_network and/or vlr_subscr is NULL?!?\n"); return -EINVAL; } -- To view, visit https://gerrit.osmocom.org/13976 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id5c95fbf318a2e51e7ffee2e08ceab3042b26cc9 Gerrit-Change-Number: 13976 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 20:10:43 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 20:10:43 +0000 Subject: Change in osmo-msc[master]: sms_queue_test: assert return value of osmo_use_count_get_put() Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13977 Change subject: sms_queue_test: assert return value of osmo_use_count_get_put() ...................................................................... sms_queue_test: assert return value of osmo_use_count_get_put() Change-Id: I9381e88435ccd856ec619135ca9999c15c25d436 Fixes: CID#198416 --- M tests/sms_queue/sms_queue_test.c 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/77/13977/1 diff --git a/tests/sms_queue/sms_queue_test.c b/tests/sms_queue/sms_queue_test.c index 495e078..25fc312 100644 --- a/tests/sms_queue/sms_queue_test.c +++ b/tests/sms_queue/sms_queue_test.c @@ -96,7 +96,7 @@ static struct vlr_subscr arbitrary_vsub = {}; static bool arbitrary_vsub_set_up = false; struct gsm_sms *sms; - int i; + int i, rc = 0; printf(" hitting database: looking for MSISDN > '%s', failed_attempts <= %d\n", last_msisdn, max_failed); @@ -110,9 +110,10 @@ * may call vlr_subscr_put() on our arbitrary_vsub, what would * lead to a segfault if its use_count <= 0. To prevent this, * let's ensure a big enough initial value. */ - osmo_use_count_get_put(&arbitrary_vsub.use_count, VSUB_USE_SMS_RECEIVER, 1000); - osmo_use_count_get_put(&arbitrary_vsub.use_count, VSUB_USE_SMS_PENDING, 1000); + rc += osmo_use_count_get_put(&arbitrary_vsub.use_count, VSUB_USE_SMS_RECEIVER, 1000); + rc += osmo_use_count_get_put(&arbitrary_vsub.use_count, VSUB_USE_SMS_PENDING, 1000); arbitrary_vsub.lu_complete = true; + OSMO_ASSERT(rc == 0); for (i = 0; i < ARRAY_SIZE(fake_sms_db); i++) { if (!fake_sms_db[i].nr_of_sms) -- To view, visit https://gerrit.osmocom.org/13977 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I9381e88435ccd856ec619135ca9999c15c25d436 Gerrit-Change-Number: 13977 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 20:22:42 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 20:22:42 +0000 Subject: Change in osmo-msc[master]: libmsc: Make sure to not dereference a NULL trans In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13963 ) Change subject: libmsc: Make sure to not dereference a NULL trans ...................................................................... Patch Set 1: (2 comments) https://gerrit.osmocom.org/#/c/13963/1/src/libmsc/gsm_04_08_cc.c File src/libmsc/gsm_04_08_cc.c: https://gerrit.osmocom.org/#/c/13963/1/src/libmsc/gsm_04_08_cc.c at 1891 PS1, Line 1891: LOG_TRANS_CAT Alternatively, we can make LOG_TRANS() macro NULL-safe: #define LOG_TRANS(trans, level, fmt, args...) do { \ if ((trans) != NULL) \ LOG_TRANS_CAT(trans, (trans)->log_subsys, level, fmt, ##args) \ else \ LOGP(DMSC, level, fmt, args...); \ } while (0); or less elegant: #define LOG_TRANS(trans, level, fmt, args...) \ LOG_TRANS_CAT(trans, (trans) ? (trans)->log_subsys : DMSC, level, fmt, ##args) https://gerrit.osmocom.org/#/c/13963/1/src/libmsc/transaction.c File src/libmsc/transaction.c: https://gerrit.osmocom.org/#/c/13963/1/src/libmsc/transaction.c at 134 PS1, Line 134: LOG_TRANS_CAT(trans, DMSC, LOGL_ERROR Please see: https://gerrit.osmocom.org/#/c/osmo-msc/+/13974/ -- To view, visit https://gerrit.osmocom.org/13963 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia14bd28e1db570c487ad8e90e29a69208e2226f2 Gerrit-Change-Number: 13963 Gerrit-PatchSet: 1 Gerrit-Owner: tnt Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: tnt Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 10 May 2019 20:22:42 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 20:26:38 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 20:26:38 +0000 Subject: Change in osmo-msc[master]: libmsc: Make sure to not dereference a NULL trans In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13963 ) Change subject: libmsc: Make sure to not dereference a NULL trans ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/13963/1/src/libmsc/gsm_04_08_cc.c File src/libmsc/gsm_04_08_cc.c: https://gerrit.osmocom.org/#/c/13963/1/src/libmsc/gsm_04_08_cc.c at 1891 PS1, Line 1891: LOG_TRANS_CAT > Alternatively, we can make LOG_TRANS() macro NULL-safe: [?] To keep the discussion in a proper place: (03:18:04) fixeria: maybe we should rather make LOG_TRANS() NULL-safe? (03:18:39) tnt: fixeria: I thought about it, but then you basically have to give up on using the right log category. (03:19:42) tnt: (in trans_alloc you can find it out since you have the param ... but in all the other case you just have NULL ... ) -- To view, visit https://gerrit.osmocom.org/13963 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia14bd28e1db570c487ad8e90e29a69208e2226f2 Gerrit-Change-Number: 13963 Gerrit-PatchSet: 1 Gerrit-Owner: tnt Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: tnt Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 10 May 2019 20:26:38 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 20:36:11 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 20:36:11 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_11.c: fix NULL-pointer dereference in gsm340_rx_tpdu() Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13978 Change subject: libmsc/gsm_04_11.c: fix NULL-pointer dereference in gsm340_rx_tpdu() ...................................................................... libmsc/gsm_04_11.c: fix NULL-pointer dereference in gsm340_rx_tpdu() Change-Id: I1e9b351e949efe596295d18f98c8a73c8e013763 Fixes: CID#198451 --- M src/libmsc/gsm_04_11.c 1 file changed, 14 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/78/13978/1 diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c index 22e55dd..9bd0a05 100644 --- a/src/libmsc/gsm_04_11.c +++ b/src/libmsc/gsm_04_11.c @@ -459,14 +459,24 @@ uint8_t da_len_bytes; uint8_t address_lv[12]; /* according to 03.40 / 9.1.2.5 */ int rc = 0; - struct msc_a *msc_a = trans->msc_a; - struct gsm_network *net = msc_a_net(msc_a); - struct vlr_subscr *vsub = msc_a_vsub(msc_a); + struct gsm_network *net; + struct vlr_subscr *vsub; rate_ctr_inc(&net->msc_ctrs->ctr[MSC_CTR_SMS_SUBMITTED]); - if (!msc_a || !vsub) + if (!trans->msc_a) { + LOG_TRANS(trans, LOGL_ERROR, "Insufficient info to process TPDU: " + "MSC-A role is NULL?!?\n"); return GSM411_RP_CAUSE_MO_NET_OUT_OF_ORDER; + } + + net = msc_a_net(trans->msc_a); + vsub = msc_a_vsub(trans->msc_a); + if (!net || !vsub) { + LOG_TRANS(trans, LOGL_ERROR, "Insufficient info to process TPDU: " + "gsm_network and/or vlr_subscr is NULL?!?\n"); + return GSM411_RP_CAUSE_MO_NET_OUT_OF_ORDER; + } gsms = sms_alloc(); if (!gsms) -- To view, visit https://gerrit.osmocom.org/13978 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I1e9b351e949efe596295d18f98c8a73c8e013763 Gerrit-Change-Number: 13978 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 20:56:18 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 20:56:18 +0000 Subject: Change in osmo-msc[master]: libmsc/ran_msg_a.c: avoid ternary operator in struct initialization Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13979 Change subject: libmsc/ran_msg_a.c: avoid ternary operator in struct initialization ...................................................................... libmsc/ran_msg_a.c: avoid ternary operator in struct initialization For some reason, having ternary operator there makes Coverity think that 'n->geran.chosen_encryption' is dereferenced before checking against NULL. Let's make it happy, and move the assignment. Change-Id: I95051d0f02e2fdd3ec8da3a506109e7b23e99b4b Fixes: CID#198454 Dereference before null check --- M src/libmsc/ran_msg_a.c 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/79/13979/1 diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c index ba0990d..da32a84 100644 --- a/src/libmsc/ran_msg_a.c +++ b/src/libmsc/ran_msg_a.c @@ -1068,9 +1068,6 @@ .speech_version_used = n->speech_version_used, - .chosen_encryption_algorithm_serving = - n->geran.chosen_encryption ? n->geran.chosen_encryption->alg_id : 0, - .old_bss_to_new_bss_info_raw = n->old_bss_to_new_bss_info_raw, .old_bss_to_new_bss_info_raw_len = n->old_bss_to_new_bss_info_raw_len, @@ -1098,6 +1095,7 @@ memcpy(r.encryption_information.key, n->geran.chosen_encryption->key, n->geran.chosen_encryption->key_len); r.encryption_information.key_len = n->geran.chosen_encryption->key_len; + r.chosen_encryption_algorithm_serving = n->geran.chosen_encryption->alg_id; } if (n->classmark) -- To view, visit https://gerrit.osmocom.org/13979 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I95051d0f02e2fdd3ec8da3a506109e7b23e99b4b Gerrit-Change-Number: 13979 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 21:00:12 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 21:00:12 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_11.c: fix NULL-pointer dereference in gsm340_rx_tpdu() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13978 to look at the new patch set (#2). Change subject: libmsc/gsm_04_11.c: fix NULL-pointer dereference in gsm340_rx_tpdu() ...................................................................... libmsc/gsm_04_11.c: fix NULL-pointer dereference in gsm340_rx_tpdu() Change-Id: I1e9b351e949efe596295d18f98c8a73c8e013763 Fixes: CID#198451 --- M src/libmsc/gsm_04_11.c 1 file changed, 17 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/78/13978/2 -- To view, visit https://gerrit.osmocom.org/13978 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1e9b351e949efe596295d18f98c8a73c8e013763 Gerrit-Change-Number: 13978 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 21:05:23 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 21:05:23 +0000 Subject: Change in osmo-msc[master]: libmsc/rtp_stream.c: prevent potential NULL-pointer dereference Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13980 Change subject: libmsc/rtp_stream.c: prevent potential NULL-pointer dereference ...................................................................... libmsc/rtp_stream.c: prevent potential NULL-pointer dereference Change-Id: Ie80b9fae490acc9ee8de742e35b6ef59c4388f57 Fixes: CID#198432 --- M src/libmsc/rtp_stream.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/80/13980/1 diff --git a/src/libmsc/rtp_stream.c b/src/libmsc/rtp_stream.c index 6163a98..1a07b49 100644 --- a/src/libmsc/rtp_stream.c +++ b/src/libmsc/rtp_stream.c @@ -141,6 +141,8 @@ switch (event) { case RTP_STREAM_EV_CRCX_OK: crcx_info = osmo_mgcpc_ep_ci_get_rtp_info(rtps->ci); + OSMO_ASSERT(crcx_info != NULL); + osmo_sockaddr_str_from_str(&rtps->local, crcx_info->addr, crcx_info->port); rtp_stream_update_id(rtps); osmo_fsm_inst_dispatch(fi->proc.parent, CALL_LEG_EV_RTP_STREAM_ADDR_AVAILABLE, rtps); -- To view, visit https://gerrit.osmocom.org/13980 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ie80b9fae490acc9ee8de742e35b6ef59c4388f57 Gerrit-Change-Number: 13980 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 21:30:21 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 21:30:21 +0000 Subject: Change in osmo-msc[master]: libmsc/ran_msg_a.c: refactor ran_a_decode_lcls_notification() Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13981 Change subject: libmsc/ran_msg_a.c: refactor ran_a_decode_lcls_notification() ...................................................................... libmsc/ran_msg_a.c: refactor ran_a_decode_lcls_notification() We basically need to make sure that one of two possible IEs is not NULL, while another is NULL (eXclusive OR). This can be done using at least two conditional branches. Change-Id: Ie0f9b5c1bbbfb744e0615da07d76037d91b0abc8 Fixes: CID#198444 Logically dead code --- M src/libmsc/ran_msg_a.c 1 file changed, 3 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/81/13981/1 diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c index da32a84..21be896 100644 --- a/src/libmsc/ran_msg_a.c +++ b/src/libmsc/ran_msg_a.c @@ -375,13 +375,7 @@ struct ran_msg ran_dec_msg; /* Either ?3.2.2.119 LCLS-BSS-Status or ?3.2.2.120 LCLS-Break-Request shall be present */ - if ((!ie_lcls_bss_status && !ie_lcls_break_req) - || (ie_lcls_bss_status && ie_lcls_break_req)) { - LOG_RAN_A_DEC(ran_dec, LOGL_ERROR, "Ignoring broken LCLS Notification message\n"); - return -EINVAL; - } - - if (ie_lcls_bss_status) { + if (ie_lcls_bss_status && !ie_lcls_break_req) { ran_dec_msg = (struct ran_msg){ .msg_type = RAN_MSG_LCLS_STATUS, .msg_name = "BSSMAP LCLS Notification (LCLS Status)", @@ -391,9 +385,7 @@ }, }; return ran_decoded(ran_dec, &ran_dec_msg); - } - - if (ie_lcls_break_req) { + } else if (ie_lcls_break_req && !ie_lcls_bss_status) { ran_dec_msg = (struct ran_msg){ .msg_type = RAN_MSG_LCLS_BREAK_REQ, .msg_name = "BSSMAP LCLS Notification (LCLS Break Req)", @@ -404,6 +396,7 @@ return ran_decoded(ran_dec, &ran_dec_msg); } + LOG_RAN_A_DEC(ran_dec, LOGL_ERROR, "Ignoring broken LCLS Notification message\n"); return -EINVAL; } -- To view, visit https://gerrit.osmocom.org/13981 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ie0f9b5c1bbbfb744e0615da07d76037d91b0abc8 Gerrit-Change-Number: 13981 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 21:49:37 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 21:49:37 +0000 Subject: Change in osmo-msc[master]: libmsc/ran_msg_a.c: prevent chosen_encryption->key buffer overrun Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13982 Change subject: libmsc/ran_msg_a.c: prevent chosen_encryption->key buffer overrun ...................................................................... libmsc/ran_msg_a.c: prevent chosen_encryption->key buffer overrun In ran_a_make_handover_request() we do prevent destination buffer (r.encryption_information.key) overflow, but not source buffer (n->geran.chosen_encryption->key) overrun if an incorrect key length is received. Let's fix this. Change-Id: I278bb72660634c2d535e1bd3d7fce5696da23575 Fixes: CID#198450 Out-of-bounds access --- M src/libmsc/ran_msg_a.c 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/82/13982/1 diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c index 21be896..805308c 100644 --- a/src/libmsc/ran_msg_a.c +++ b/src/libmsc/ran_msg_a.c @@ -1080,7 +1080,9 @@ /* Encryption Information */ make_encrypt_info_perm_algo(log_fi, &r.encryption_information, n->geran.a5_encryption_mask, n->classmark); if (n->geran.chosen_encryption && n->geran.chosen_encryption->key_len) { - if (n->geran.chosen_encryption->key_len > sizeof(r.encryption_information.key)) { + /* Prevent both source / destination buffer overrun / overflow */ + if (n->geran.chosen_encryption->key_len > sizeof(r.encryption_information.key) + || n->geran.chosen_encryption->key_len > sizeof(n->geran.chosen_encryption->key)) { LOG_RAN_A_ENC(log_fi, LOGL_ERROR, "Handover Request: invalid chosen encryption key size %u\n", n->geran.chosen_encryption->key_len); return NULL; -- To view, visit https://gerrit.osmocom.org/13982 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I278bb72660634c2d535e1bd3d7fce5696da23575 Gerrit-Change-Number: 13982 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 21:53:49 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 21:53:49 +0000 Subject: Change in osmo-msc[master]: libmsc/mncc_call.c: fix uninitialized access of stack memory Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13983 Change subject: libmsc/mncc_call.c: fix uninitialized access of stack memory ...................................................................... libmsc/mncc_call.c: fix uninitialized access of stack memory Change-Id: I5f561d9682c9fb87e4837430063095ef2cb7bd5f Fixes: CID#198405 --- M src/libmsc/mncc_call.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/83/13983/1 diff --git a/src/libmsc/mncc_call.c b/src/libmsc/mncc_call.c index 6ea4024..5ca91d0 100644 --- a/src/libmsc/mncc_call.c +++ b/src/libmsc/mncc_call.c @@ -199,7 +199,7 @@ void mncc_call_detach_rtp_stream(struct mncc_call *mncc_call) { struct rtp_stream *rtps = mncc_call->rtps; - struct osmo_sockaddr_str clear; + struct osmo_sockaddr_str clear = { 0 }; if (!rtps) return; mncc_call->rtps = NULL; -- To view, visit https://gerrit.osmocom.org/13983 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I5f561d9682c9fb87e4837430063095ef2cb7bd5f Gerrit-Change-Number: 13983 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 21:56:57 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 21:56:57 +0000 Subject: Change in osmo-msc[master]: Iu: Send SMS over SAPI-3 Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13984 Change subject: Iu: Send SMS over SAPI-3 ...................................................................... Iu: Send SMS over SAPI-3 After neels/ho was merged, SMS over IuCS/RANAP was failing in both MO and MT direction. The reason was that all mobile-terminated SMS-CP layer messages were sent in RANAP with SAPI-0 instaed of SAPI-1. Change-Id: I98e6eddb52d5c61c4e2d34bdfcd43cf460296ad7 Closes: OS#3993 --- M src/libmsc/ran_msg_iu.c 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/84/13984/1 diff --git a/src/libmsc/ran_msg_iu.c b/src/libmsc/ran_msg_iu.c index 79b0d5c..f443944 100644 --- a/src/libmsc/ran_msg_iu.c +++ b/src/libmsc/ran_msg_iu.c @@ -322,7 +322,9 @@ static struct msgb *ran_iu_wrap_dtap(struct msgb *dtap) { struct msgb *an_apdu; - an_apdu = ranap_new_msg_dt(0, dtap->data, msgb_length(dtap)); + uint8_t sapi = OMSC_LINKID_CB(dtap); + + an_apdu = ranap_new_msg_dt(sapi, dtap->data, msgb_length(dtap)); an_apdu->l2h = an_apdu->data; msgb_free(dtap); return an_apdu; -- To view, visit https://gerrit.osmocom.org/13984 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I98e6eddb52d5c61c4e2d34bdfcd43cf460296ad7 Gerrit-Change-Number: 13984 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 21:58:26 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 21:58:26 +0000 Subject: Change in osmo-mgw[master]: configure.ac: drop useless check for -fvisibility=hidden In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13969 ) Change subject: configure.ac: drop useless check for -fvisibility=hidden ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13969 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I61d08adbaaf938310f9474a1ea449e016a611ca3 Gerrit-Change-Number: 13969 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 10 May 2019 21:58:26 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 21:59:59 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 21:59:59 +0000 Subject: Change in libosmo-sccp[master]: osmo-stp: refactor handling of both SIGINT and SIGTERM In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13971 ) Change subject: osmo-stp: refactor handling of both SIGINT and SIGTERM ...................................................................... Patch Set 1: Is there any code that listens to S_L_GLOBAL_SHUTDOWN and actually performs the graceful shutdown you are mentioning? A grep in libosmo-sccp.git doesn't actually reveal any consumer. -- To view, visit https://gerrit.osmocom.org/13971 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5d8618857c5119d4acca5d65cf1276ab02889c84 Gerrit-Change-Number: 13971 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 10 May 2019 21:59:59 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 22:00:14 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 22:00:14 +0000 Subject: Change in libosmo-sccp[master]: osmo-stp: track the use of NULL talloc-context In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13972 ) Change subject: osmo-stp: track the use of NULL talloc-context ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13972 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I89e7faf8469f5eba9599c9cbc1fec4fe583e7a13 Gerrit-Change-Number: 13972 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 10 May 2019 22:00:14 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 22:00:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 22:00:47 +0000 Subject: Change in libosmo-sccp[master]: osmo-stp: expose root talloc context to the VTY code In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13970 ) Change subject: osmo-stp: expose root talloc context to the VTY code ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13970 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id2bf6cdae112f9791c93411c1837de488cab9ee3 Gerrit-Change-Number: 13970 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 10 May 2019 22:00:47 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 22:02:42 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 22:02:42 +0000 Subject: Change in libosmocore[master]: libosmovty: deprecate vty_init(), add vty_init[_app]_ctx() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13973 ) Change subject: libosmovty: deprecate vty_init(), add vty_init[_app]_ctx() ...................................................................... Patch Set 2: we might also simply use the global talloc context if the related patches (like https://gerrit.osmocom.org/#/c/libosmocore/+/13312/) were merged. -- To view, visit https://gerrit.osmocom.org/13973 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I65d71f8fc943e103b53b784f690ed56a6e373e3f Gerrit-Change-Number: 13973 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Harald Welte Gerrit-Comment-Date: Fri, 10 May 2019 22:02:42 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 22:03:25 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 22:03:25 +0000 Subject: Change in osmo-msc[master]: libmsc/sgs_server.c: do not override rc in case of SCTP_SHUTDOWN_EVENT In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13967 ) Change subject: libmsc/sgs_server.c: do not override rc in case of SCTP_SHUTDOWN_EVENT ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13967 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I06215a7d3dc33f2e8adb77fa1b3f2ac5198dee26 Gerrit-Change-Number: 13967 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 10 May 2019 22:03:25 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 22:04:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 22:04:16 +0000 Subject: Change in osmo-msc[master]: sms_queue_test: assert return value of osmo_use_count_get_put() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13977 ) Change subject: sms_queue_test: assert return value of osmo_use_count_get_put() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13977 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9381e88435ccd856ec619135ca9999c15c25d436 Gerrit-Change-Number: 13977 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 10 May 2019 22:04:16 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 22:04:38 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 22:04:38 +0000 Subject: Change in osmo-msc[master]: libmsc/ran_msg_a.c: avoid ternary operator in struct initialization In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13979 ) Change subject: libmsc/ran_msg_a.c: avoid ternary operator in struct initialization ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13979 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I95051d0f02e2fdd3ec8da3a506109e7b23e99b4b Gerrit-Change-Number: 13979 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 10 May 2019 22:04:38 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 22:05:30 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 22:05:30 +0000 Subject: Change in libosmo-sccp[master]: osmo-stp: refactor handling of both SIGINT and SIGTERM In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13971 ) Change subject: osmo-stp: refactor handling of both SIGINT and SIGTERM ...................................................................... Patch Set 1: > Is there any code that listens to S_L_GLOBAL_SHUTDOWN and actually > performs the graceful shutdown you are mentioning? A grep in > libosmo-sccp.git doesn't actually reveal any consumer. I also couldn't find anything... In any case, this patch facilitates adding tracking of the NULL talloc-contexts, and implementing proper shutdown too. -- To view, visit https://gerrit.osmocom.org/13971 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5d8618857c5119d4acca5d65cf1276ab02889c84 Gerrit-Change-Number: 13971 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 10 May 2019 22:05:30 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 22:05:42 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 22:05:42 +0000 Subject: Change in osmo-msc[master]: libmsc/rtp_stream.c: prevent potential NULL-pointer dereference In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13980 ) Change subject: libmsc/rtp_stream.c: prevent potential NULL-pointer dereference ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/13980/1/src/libmsc/rtp_stream.c File src/libmsc/rtp_stream.c: https://gerrit.osmocom.org/#/c/13980/1/src/libmsc/rtp_stream.c at 143 PS1, Line 143: crcx_info = osmo_mgcpc_ep_ci_get_rtp_info(rtps->ci); : OSMO_ASSERT(crcx_info != NULL); I'd be careful here. ASSERT is fine for things that really should never fail in a production system. If there is a valid situation where osmo_mgcpc_ep_ci_get_rtp_info might return NULL, then we have to deal with it at runtime rather than taking the entire network down and terminating the process. -- To view, visit https://gerrit.osmocom.org/13980 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie80b9fae490acc9ee8de742e35b6ef59c4388f57 Gerrit-Change-Number: 13980 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Harald Welte Gerrit-Comment-Date: Fri, 10 May 2019 22:05:42 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 22:06:01 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 22:06:01 +0000 Subject: Change in osmo-msc[master]: libmsc/ran_msg_a.c: refactor ran_a_decode_lcls_notification() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13981 ) Change subject: libmsc/ran_msg_a.c: refactor ran_a_decode_lcls_notification() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13981 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie0f9b5c1bbbfb744e0615da07d76037d91b0abc8 Gerrit-Change-Number: 13981 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 10 May 2019 22:06:01 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 22:06:15 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 10 May 2019 22:06:15 +0000 Subject: Change in osmo-mgw[master]: configure.ac: drop useless check for -fvisibility=hidden In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/13969 ) Change subject: configure.ac: drop useless check for -fvisibility=hidden ...................................................................... configure.ac: drop useless check for -fvisibility=hidden We don't use this attribute in OsmoMGW anyway. Change-Id: I61d08adbaaf938310f9474a1ea449e016a611ca3 --- M configure.ac 1 file changed, 0 insertions(+), 11 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/configure.ac b/configure.ac index 15976e6..a14c276 100644 --- a/configure.ac +++ b/configure.ac @@ -76,17 +76,6 @@ dnl Checks for typedefs, structures and compiler characteristics -# The following test is taken from WebKit's webkit.m4 -saved_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -fvisibility=hidden " -AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden]) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])], - [ AC_MSG_RESULT([yes]) - SYMBOL_VISIBILITY="-fvisibility=hidden"], - AC_MSG_RESULT([no])) -CFLAGS="$saved_CFLAGS" -AC_SUBST(SYMBOL_VISIBILITY) - AX_CHECK_COMPILE_FLAG([-Werror=implicit], [CFLAGS="$CFLAGS -Werror=implicit"]) AX_CHECK_COMPILE_FLAG([-Werror=maybe-uninitialized], [CFLAGS="$CFLAGS -Werror=maybe-uninitialized"]) AX_CHECK_COMPILE_FLAG([-Werror=memset-transposed-args], [CFLAGS="$CFLAGS -Werror=memset-transposed-args"]) -- To view, visit https://gerrit.osmocom.org/13969 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I61d08adbaaf938310f9474a1ea449e016a611ca3 Gerrit-Change-Number: 13969 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 22:06:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 22:06:19 +0000 Subject: Change in osmo-msc[master]: libmsc/ran_msg_a.c: prevent chosen_encryption->key buffer overrun In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13982 ) Change subject: libmsc/ran_msg_a.c: prevent chosen_encryption->key buffer overrun ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13982 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I278bb72660634c2d535e1bd3d7fce5696da23575 Gerrit-Change-Number: 13982 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 10 May 2019 22:06:19 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 22:06:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 22:06:47 +0000 Subject: Change in osmo-msc[master]: libmsc/mncc_call.c: fix uninitialized access of stack memory In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13983 ) Change subject: libmsc/mncc_call.c: fix uninitialized access of stack memory ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13983 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5f561d9682c9fb87e4837430063095ef2cb7bd5f Gerrit-Change-Number: 13983 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 10 May 2019 22:06:47 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 22:07:23 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 22:07:23 +0000 Subject: Change in osmo-msc[master]: Iu: Send SMS over SAPI-3 In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13984 ) Change subject: Iu: Send SMS over SAPI-3 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13984 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I98e6eddb52d5c61c4e2d34bdfcd43cf460296ad7 Gerrit-Change-Number: 13984 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 10 May 2019 22:07:23 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 22:07:32 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 22:07:32 +0000 Subject: Change in osmo-msc[master]: Iu: Send SMS over SAPI-3 In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13984 ) Change subject: Iu: Send SMS over SAPI-3 ...................................................................... Iu: Send SMS over SAPI-3 After neels/ho was merged, SMS over IuCS/RANAP was failing in both MO and MT direction. The reason was that all mobile-terminated SMS-CP layer messages were sent in RANAP with SAPI-0 instaed of SAPI-1. Change-Id: I98e6eddb52d5c61c4e2d34bdfcd43cf460296ad7 Closes: OS#3993 --- M src/libmsc/ran_msg_iu.c 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libmsc/ran_msg_iu.c b/src/libmsc/ran_msg_iu.c index 79b0d5c..f443944 100644 --- a/src/libmsc/ran_msg_iu.c +++ b/src/libmsc/ran_msg_iu.c @@ -322,7 +322,9 @@ static struct msgb *ran_iu_wrap_dtap(struct msgb *dtap) { struct msgb *an_apdu; - an_apdu = ranap_new_msg_dt(0, dtap->data, msgb_length(dtap)); + uint8_t sapi = OMSC_LINKID_CB(dtap); + + an_apdu = ranap_new_msg_dt(sapi, dtap->data, msgb_length(dtap)); an_apdu->l2h = an_apdu->data; msgb_free(dtap); return an_apdu; -- To view, visit https://gerrit.osmocom.org/13984 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I98e6eddb52d5c61c4e2d34bdfcd43cf460296ad7 Gerrit-Change-Number: 13984 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Assignee: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 22:26:12 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 22:26:12 +0000 Subject: Change in osmo-ttcn3-hacks[master]: add three tests for CIPHER MODE COMPLETE without algo In-Reply-To: References: Message-ID: Harald Welte has uploaded a new patch set (#3) to the change originally created by Stefan Sperling. ( https://gerrit.osmocom.org/12347 ) Change subject: add three tests for CIPHER MODE COMPLETE without algo ...................................................................... add three tests for CIPHER MODE COMPLETE without algo Add three tests which exercise MSC behaviour when a CIPHER MODE COMPLETE command lacks the optional chosenEncryptionAlgorithm IE. Check for behaviour with A5/1, A5/3, and A5/1 + A5/3 configured in the network, and expect the location update to succeed. These tests pass on master, but they should somehow verify the cipher the MSC ends up using. I am not quite sure how to do that. Would inspecting the MSC's VTY be a reasonable approach? How could his be done by code which runs on BSC_ConnectionHandler? Change-Id: I1a2a126795c544613a7a87e238e1fc8c4e943885 Related: OS#2872 --- M library/BSSMAP_Templates.ttcn M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.cfg M msc/MSC_Tests.ttcn 4 files changed, 120 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/47/12347/3 -- To view, visit https://gerrit.osmocom.org/12347 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1a2a126795c544613a7a87e238e1fc8c4e943885 Gerrit-Change-Number: 12347 Gerrit-PatchSet: 3 Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 22:37:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 22:37:09 +0000 Subject: Change in osmo-ttcn3-hacks[master]: SGSN_Tests: Make f_gmm_attach() and f_gmm_auth() work on gb_idx != 0 In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13858 to look at the new patch set (#3). Change subject: SGSN_Tests: Make f_gmm_attach() and f_gmm_auth() work on gb_idx != 0 ...................................................................... SGSN_Tests: Make f_gmm_attach() and f_gmm_auth() work on gb_idx != 0 Let's make sure the related functions can be used on other gb_idx, i.e. via another Gb interface (and hence simulated RAN/PCU) than the first one. Change-Id: Ie88cbf0c70269cc3e2c2fd2a0c65c8f2130ec2b1 --- M sgsn/SGSN_Tests.ttcn 1 file changed, 31 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/58/13858/3 -- To view, visit https://gerrit.osmocom.org/13858 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie88cbf0c70269cc3e2c2fd2a0c65c8f2130ec2b1 Gerrit-Change-Number: 13858 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 22:37:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 22:37:09 +0000 Subject: Change in osmo-ttcn3-hacks[master]: BSSGP_Emulation: Abandon "BssgpDecoded" intermediate structure In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13865 to look at the new patch set (#3). Change subject: BSSGP_Emulation: Abandon "BssgpDecoded" intermediate structure ...................................................................... BSSGP_Emulation: Abandon "BssgpDecoded" intermediate structure It originally seemed like a great idea to define a custom record which aggregates the decoded BSSGP, LLC, L3 and/or SNDCP and passes it to the individual ConnHdlr. However, particularly with testcase interoperability for IuPS in mind, this seems bogus. Also, we never really took advantage of this. Let's now decode as far as we can decode any PDU, and then send the decoded version of that PDU via the ports between the BSSGP_Emulation and the ConnHdlr component. Change-Id: I8c1082880902dd9a04935945f0293895f4d0c53a --- M library/BSSGP_Emulation.ttcn M pcu/PCU_Tests.ttcn M pcu/PCU_Tests_RAW.ttcn M sgsn/SGSN_Tests.ttcn 4 files changed, 108 insertions(+), 161 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/65/13865/3 -- To view, visit https://gerrit.osmocom.org/13865 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8c1082880902dd9a04935945f0293895f4d0c53a Gerrit-Change-Number: 13865 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 22:37:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 22:37:09 +0000 Subject: Change in osmo-ttcn3-hacks[master]: sgsn: Actual first Iu test case In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13866 to look at the new patch set (#3). Change subject: sgsn: Actual first Iu test case ...................................................................... sgsn: Actual first Iu test case Change-Id: I66069e31c30d33934ad57cc2b8794f56ffd5c7d6 --- M sgsn/SGSN_Tests.ttcn A sgsn/SGSN_Tests_Iu.ttcn 2 files changed, 160 insertions(+), 48 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/66/13866/3 -- To view, visit https://gerrit.osmocom.org/13866 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I66069e31c30d33934ad57cc2b8794f56ffd5c7d6 Gerrit-Change-Number: 13866 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 22:37:34 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 22:37:34 +0000 Subject: Change in osmo-ttcn3-hacks[master]: SGSN_Tests: Make f_gmm_attach() and f_gmm_auth() work on gb_idx != 0 In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13858 ) Change subject: SGSN_Tests: Make f_gmm_attach() and f_gmm_auth() work on gb_idx != 0 ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13858 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie88cbf0c70269cc3e2c2fd2a0c65c8f2130ec2b1 Gerrit-Change-Number: 13858 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 10 May 2019 22:37:34 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 22:38:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 22:38:18 +0000 Subject: Change in osmo-ttcn3-hacks[master]: SGSN_Tests: Make f_gmm_attach() and f_gmm_auth() work on gb_idx != 0 In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13858 ) Change subject: SGSN_Tests: Make f_gmm_attach() and f_gmm_auth() work on gb_idx != 0 ...................................................................... SGSN_Tests: Make f_gmm_attach() and f_gmm_auth() work on gb_idx != 0 Let's make sure the related functions can be used on other gb_idx, i.e. via another Gb interface (and hence simulated RAN/PCU) than the first one. Change-Id: Ie88cbf0c70269cc3e2c2fd2a0c65c8f2130ec2b1 --- M sgsn/SGSN_Tests.ttcn 1 file changed, 31 insertions(+), 19 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index 9399e66..c34cf59 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -387,28 +387,40 @@ f_send_llc(ts_LLC_UI(l3_enc, sapi, '0'B, n_u)); } -altstep as_mm_identity() runs on BSSGP_ConnHdlr { +altstep as_mm_identity(integer gb_idx := 0) runs on BSSGP_ConnHdlr { var MobileL3_CommonIE_Types.MobileIdentityLV mi; - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('001'B))) { + [] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('001'B))) { mi := valueof(ts_MI_IMSI_LV(g_pars.imsi)); - f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi)); + f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi), gb_idx); repeat; } - [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('010'B))) { + [] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('010'B))) { mi := valueof(ts_MI_IMEI_LV(g_pars.imei)); - f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi)); + f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi), gb_idx); repeat; } } +/* receive a L3 (GMM/SM) message over whatever is the appropriate lower-layer bearer */ +function f_receive_l3(template PDU_L3_SGSN_MS rx_tpl := ?, integer gb_idx := 0) +runs on BSSGP_ConnHdlr return PDU_L3_SGSN_MS { + var BssgpDecoded bd; + var PDU_L3_SGSN_MS l3_mt; + alt { + [] BSSGP[gb_idx].receive(tr_BD_L3_MT(rx_tpl)) -> value bd { + l3_mt := bd.l3_mt; + } + } + return l3_mt; +} + /* perform GMM authentication (if expected). * Note, for umts_aka_challenge to work, the revisionLevelIndicatior needs to * be 1 to mark R99 capability, in the GMM Attach Request, see f_gmm_attach(). */ -function f_gmm_auth (boolean umts_aka_challenge := false, boolean force_gsm_sres := false) runs on BSSGP_ConnHdlr { - var BssgpDecoded bd; +function f_gmm_auth (boolean umts_aka_challenge := false, boolean force_gsm_sres := false, integer gb_idx := 0) runs on BSSGP_ConnHdlr { var PDU_L3_MS_SGSN l3_mo; var PDU_L3_SGSN_MS l3_mt; - var default di := activate(as_mm_identity()); + var default di := activate(as_mm_identity(gb_idx)); if (g_pars.net.expect_auth) { var GSUP_IE auth_tuple; var template AuthenticationParameterAUTNTLV autn; @@ -437,13 +449,13 @@ g_pars.vec.kc)); log("GSUP sends only 2G auth tuple", auth_tuple); } + GSUP.receive(tr_GSUP_SAI_REQ(g_pars.imsi)); GSUP.send(ts_GSUP_SAI_RES(g_pars.imsi, auth_tuple)); var template PDU_L3_SGSN_MS auth_ciph_req := tr_GMM_AUTH_REQ(g_pars.vec.rand); auth_ciph_req.msgs.gprs_mm.authenticationAndCipheringRequest.authenticationParameterAUTN := autn; - BSSGP[0].receive(tr_BD_L3_MT(auth_ciph_req)) -> value bd; - l3_mt := bd.l3_mt; + l3_mt := f_receive_l3(auth_ciph_req, gb_idx); var BIT4 ac_ref := l3_mt.msgs.gprs_mm.authenticationAndCipheringRequest.acReferenceNumber.valueField; var template PDU_L3_MS_SGSN auth_ciph_resp := ts_GMM_AUTH_RESP_2G(ac_ref, g_pars.vec.sres); @@ -465,7 +477,7 @@ l3_mo.msgs.gprs_mm.authenticationAndCipheringResponse.imeisv := valueof(ts_MI_IMEISV_TLV(g_pars.imei & '0'H)); } - f_send_l3_gmm_llc(l3_mo); + f_send_l3_gmm_llc(l3_mo, gb_idx); } else { /* wait for identity procedure */ f_sleep(1.0); @@ -559,10 +571,10 @@ GSUP.send(ts_GSUP_UL_RES(g_pars.imsi)); } -private function f_gmm_attach(boolean umts_aka_challenge, boolean force_gsm_sres) runs on BSSGP_ConnHdlr { - var BssgpDecoded bd; +friend function f_gmm_attach(boolean umts_aka_challenge, boolean force_gsm_sres, integer gb_idx := 0) runs on BSSGP_ConnHdlr { var RoutingAreaIdentificationV old_ra := f_random_RAI(); var template PDU_L3_MS_SGSN attach_req := ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit); + var PDU_L3_SGSN_MS l3_mt; /* indicate R99 capability of the MS to enable UMTS AKA in presence of * 3G auth vectors */ @@ -571,16 +583,16 @@ * revisionLevelIndicatior is at the wrong place! */ attach_req.msgs.gprs_mm.attachRequest.msNetworkCapability.msNetworkCapabilityV.solSACapability := '0'B; - f_send_l3_gmm_llc(attach_req); - f_gmm_auth(umts_aka_challenge, force_gsm_sres); + f_send_l3_gmm_llc(attach_req, gb_idx); + f_gmm_auth(umts_aka_challenge, force_gsm_sres, gb_idx); /* Expect SGSN to perform LU with HLR */ f_gmm_gsup_lu_isd(); - BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?))) -> value bd { - f_process_attach_accept(bd.l3_mt.msgs.gprs_mm.attachAccept); - } + l3_mt := f_receive_l3(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?), gb_idx); + f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept); + /* FIXME: Extract P-TMSI, if any. Only send Complete if necessary */ - f_send_l3_gmm_llc(ts_GMM_ATTACH_COMPL); + f_send_l3_gmm_llc(ts_GMM_ATTACH_COMPL, gb_idx); } private function f_TC_attach(charstring id) runs on BSSGP_ConnHdlr { -- To view, visit https://gerrit.osmocom.org/13858 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie88cbf0c70269cc3e2c2fd2a0c65c8f2130ec2b1 Gerrit-Change-Number: 13858 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 22:38:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 22:38:18 +0000 Subject: Change in osmo-ttcn3-hacks[master]: SGSN_Tests: Make more helper functions gb_index aware In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13859 ) Change subject: SGSN_Tests: Make more helper functions gb_index aware ...................................................................... SGSN_Tests: Make more helper functions gb_index aware The gb_index indicates through which Gb link (simulated RAN/PCU) a given message shall be sent. Change-Id: I3825634f581897f6951d9673984f138e977cc7ac --- M sgsn/SGSN_Tests.ttcn 1 file changed, 32 insertions(+), 23 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index c34cf59..d87c09d 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -1013,7 +1013,8 @@ f_gtp_register_teid(apars.ggsn_tei_u); } -function f_pdp_ctx_act(inout PdpActPars apars, boolean send_recovery := false) runs on BSSGP_ConnHdlr { +function f_pdp_ctx_act(inout PdpActPars apars, boolean send_recovery := false, integer gb_idx := 0) +runs on BSSGP_ConnHdlr { var boolean exp_rej := ispresent(apars.exp_rej_cause); var Gtp1cUnitdata g_ud; var template Recovery_gtpc recovery := omit; @@ -1023,7 +1024,7 @@ } f_send_l3_gmm_llc(ts_SM_ACT_PDP_REQ(apars.tid, apars.nsapi, apars.sapi, apars.qos, apars.addr, - apars.apn, apars.pco)); + apars.apn, apars.pco), gb_idx); GTP.receive(tr_GTPC_MsgType(?, createPDPContextRequest, ?)) -> value g_ud { f_process_gtp_ctx_act_req(apars, g_ud.gtpc); var integer seq_nr := oct2int(g_ud.gtpc.opt_part.sequenceNumber); @@ -1035,48 +1036,54 @@ omit, recovery)); } alt { - [exp_rej] BSSGP[0].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_REJ(apars.tid, apars.exp_rej_cause))) { + [exp_rej] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_REJ(apars.tid, apars.exp_rej_cause))) { setverdict(pass); } - [exp_rej] BSSGP[0].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_ACCEPT)) { + [exp_rej] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_ACCEPT)) { setverdict(fail, "Unexpected PDP CTX ACT ACC"); mtc.stop; } - [not exp_rej] BSSGP[0].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_REJ(apars.tid, ?))) { + [not exp_rej] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_REJ(apars.tid, ?))) { setverdict(fail, "Unexpected PDP CTX ACT FAIL"); mtc.stop; } - [not exp_rej] BSSGP[0].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_ACCEPT(apars.tid, apars.sapi))) { + [not exp_rej] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_REJ(apars.tid, ?))) { + setverdict(fail, "Unexpected PDP CTX ACT FAIL"); + mtc.stop; + } + [not exp_rej] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_ACCEPT(apars.tid, apars.sapi))) { setverdict(pass); } - [] as_xid(apars); + [] as_xid(apars, gb_idx); } } -function f_pdp_ctx_deact_mo(inout PdpActPars apars, OCT1 cause) runs on BSSGP_ConnHdlr { +function f_pdp_ctx_deact_mo(inout PdpActPars apars, OCT1 cause, integer gb_idx := 0) +runs on BSSGP_ConnHdlr { var boolean exp_rej := ispresent(apars.exp_rej_cause); var Gtp1cUnitdata g_ud; - f_send_l3_gmm_llc(ts_SM_DEACT_PDP_REQ_MO(apars.tid, cause, false, omit)); + f_send_l3_gmm_llc(ts_SM_DEACT_PDP_REQ_MO(apars.tid, cause, false, omit), gb_idx); GTP.receive(tr_GTPC_MsgType(?, deletePDPContextRequest, apars.ggsn_tei_c)) -> value g_ud { var integer seq_nr := oct2int(g_ud.gtpc.opt_part.sequenceNumber); - BSSGP[0].clear; + BSSGP[gb_idx].clear; GTP.send(ts_GTPC_DeletePdpResp(g_ud.peer, seq_nr, apars.sgsn_tei_c, '7F'O)); } alt { - [] BSSGP[0].receive(tr_BD_L3_MT(tr_SM_DEACT_PDP_ACCEPT_MT(apars.tid))) { + [] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_DEACT_PDP_ACCEPT_MT(apars.tid))) { setverdict(pass); } - [] as_xid(apars); + [] as_xid(apars, gb_idx); } } -function f_pdp_ctx_deact_mt(inout PdpActPars apars, boolean error_ind := false) runs on BSSGP_ConnHdlr { +function f_pdp_ctx_deact_mt(inout PdpActPars apars, boolean error_ind := false, integer gb_idx := 0) +runs on BSSGP_ConnHdlr { var Gtp1cUnitdata g_ud; var integer seq_nr := 23; var GtpPeer peer := valueof(ts_GtpPeerC(apars.sgsn_ip_c)); - BSSGP[0].clear; + BSSGP[gb_idx].clear; if (error_ind) { GTP.send(ts_GTPU_ErrorIndication(peer, 0 /* seq */, apars.ggsn_tei_u, apars.ggsn_ip_u)); } else { @@ -1087,8 +1094,8 @@ T.start; alt { - [] BSSGP[0].receive(tr_BD_L3_MT(tr_SM_DEACT_PDP_REQ_MT(apars.tid, ?, true))) { - f_send_l3_gmm_llc(ts_SM_DEACT_PDP_ACCEPT_MO(apars.tid)); + [] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_DEACT_PDP_REQ_MT(apars.tid, ?, true))) { + f_send_l3_gmm_llc(ts_SM_DEACT_PDP_ACCEPT_MO(apars.tid), gb_idx); } [not error_ind] GTP.receive(tr_GTPC_MsgType(?, deletePDPContextResponse, apars.ggsn_tei_c)) { repeat; @@ -1191,8 +1198,8 @@ GTP.send(ts_GTP1U_GPDU(peer, 0 /*seq*/, apars.sgsn_tei_u, payload)); } -private altstep as_xid(PdpActPars apars) runs on BSSGP_ConnHdlr { - [] BSSGP[0].receive(tr_BD_LLC(tr_LLC_XID_MT_CMD(?, apars.sapi))) { +private altstep as_xid(PdpActPars apars, integer gb_idx := 0) runs on BSSGP_ConnHdlr { + [] BSSGP[gb_idx].receive(tr_BD_LLC(tr_LLC_XID_MT_CMD(?, apars.sapi))) { repeat; } } @@ -1231,22 +1238,24 @@ } /* Transceive given 'payload' as MT message from GTP -> OsmoSGSN -> Gb */ -private function f_gtpu_xceive_mt(inout PdpActPars apars, octetstring payload) runs on BSSGP_ConnHdlr { +private function f_gtpu_xceive_mt(inout PdpActPars apars, octetstring payload, integer gb_idx := 0) +runs on BSSGP_ConnHdlr { /* Send PDU via GTP from our simulated GGSN to the SGSN */ f_gtpu_send(apars, payload); /* Expect PDU via BSSGP/LLC on simulated PCU from SGSN */ alt { - [] as_xid(apars); - [] BSSGP[0].receive(tr_BD_SNDCP(apars.sapi, tr_SN_UD(apars.nsapi, payload))); + [] as_xid(apars, gb_idx); + [] BSSGP[gb_idx].receive(tr_BD_SNDCP(apars.sapi, tr_SN_UD(apars.nsapi, payload))); } } /* Transceive given 'payload' as MT message from Gb -> OsmoSGSN -> GTP */ -private function f_gtpu_xceive_mo(inout PdpActPars apars, octetstring payload) runs on BSSGP_ConnHdlr { +private function f_gtpu_xceive_mo(inout PdpActPars apars, octetstring payload, integer gb_idx := 0) +runs on BSSGP_ConnHdlr { /* Send PDU via SNDCP/LLC/BSSGP/NS via simulated MS/PCU to the SGSN */ var GtpPeer peer := valueof(ts_GtpPeerU(apars.sgsn_ip_u)); var PDU_SN sndcp := valueof(ts_SN_UD(apars.nsapi, payload)); - BSSGP[0].send(ts_LLC_UI(enc_PDU_SN(sndcp), apars.sapi, '0'B, 0)); + BSSGP[gb_idx].send(ts_LLC_UI(enc_PDU_SN(sndcp), apars.sapi, '0'B, 0)); /* Expect PDU via GTP from SGSN on simulated GGSN */ alt { [] GTP.receive(tr_GTPU_GPDU(peer, apars.ggsn_tei_u, payload)); -- To view, visit https://gerrit.osmocom.org/13859 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I3825634f581897f6951d9673984f138e977cc7ac Gerrit-Change-Number: 13859 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 22:38:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 22:38:18 +0000 Subject: Change in osmo-ttcn3-hacks[master]: SGSN_Tests: Introduce NUM_GB to avoid '3' as magic value In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13860 ) Change subject: SGSN_Tests: Introduce NUM_GB to avoid '3' as magic value ...................................................................... SGSN_Tests: Introduce NUM_GB to avoid '3' as magic value Change-Id: I28b7dd26c5c129ec41c6349de9ddc9ef0ffee8ac --- M sgsn/SGSN_Tests.ttcn 1 file changed, 4 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index d87c09d..6665dc0 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -84,9 +84,10 @@ BssgpConfig cfg }; -type record length(3) of GbInstance GbInstances; -type record length(3) of NSConfiguration NSConfigurations; -type record length(3) of BssgpCellId BssgpCellIds; +const integer NUM_GB := 3; +type record length(NUM_GB) of GbInstance GbInstances; +type record length(NUM_GB) of NSConfiguration NSConfigurations; +type record length(NUM_GB) of BssgpCellId BssgpCellIds; type component test_CT { var GbInstances g_gb; -- To view, visit https://gerrit.osmocom.org/13860 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I28b7dd26c5c129ec41c6349de9ddc9ef0ffee8ac Gerrit-Change-Number: 13860 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 22:39:02 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 22:39:02 +0000 Subject: Change in osmo-ttcn3-hacks[master]: BSSGP_Emulation: Fix transmission of MT L3 in LLC/BSSGP In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13861 ) Change subject: BSSGP_Emulation: Fix transmission of MT L3 in LLC/BSSGP ...................................................................... BSSGP_Emulation: Fix transmission of MT L3 in LLC/BSSGP it seems that some part of the code was commented out, breaking the path where a ConnHdlr is sending a L3 MT message. Change-Id: Ie652598292f2fbd2e1e0c4aa679ff0d68d78c88c --- M library/BSSGP_Emulation.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn index 8988926..9021f08 100644 --- a/library/BSSGP_Emulation.ttcn +++ b/library/BSSGP_Emulation.ttcn @@ -586,7 +586,7 @@ var BIT4 sapi := f_llc_sapi_by_l3_mt(l3_mt); var integer n_u := f_llc_get_n_u_tx(ClientTable[idx].llc[bit2int(sapi)]); var octetstring llc_enc := enc_PDU_LLC(valueof(ts_LLC_UI(l3_enc, sapi, '1'B, n_u))); - //BSCP.send(f_BnsUdReq(ts_BSSGP_DL_UD(ClientTable[idx].tlli, ClientTable[idx].cell_id, llc_enc)), g_cfg.bvci); + BSCP.send(f_BnsUdReq(ts_BSSGP_DL_UD(ClientTable[idx].tlli, llc_enc), g_cfg.bvci)); } [] BSSGP_SP.receive(PDU_LLC:?) -> value llc sender vc_conn { -- To view, visit https://gerrit.osmocom.org/13861 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie652598292f2fbd2e1e0c4aa679ff0d68d78c88c Gerrit-Change-Number: 13861 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 22:39:03 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 22:39:03 +0000 Subject: Change in osmo-ttcn3-hacks[master]: BSSGP_Emulation: Pass uplink L3 to BSSGP Uplink Unitdata In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13862 ) Change subject: BSSGP_Emulation: Pass uplink L3 to BSSGP Uplink Unitdata ...................................................................... BSSGP_Emulation: Pass uplink L3 to BSSGP Uplink Unitdata Change-Id: I71c19cd0f11927eb70667210a4ba1ee5873fd534 --- M library/BSSGP_Emulation.ttcn 1 file changed, 8 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn index 9021f08..849e147 100644 --- a/library/BSSGP_Emulation.ttcn +++ b/library/BSSGP_Emulation.ttcn @@ -588,6 +588,14 @@ var octetstring llc_enc := enc_PDU_LLC(valueof(ts_LLC_UI(l3_enc, sapi, '1'B, n_u))); BSCP.send(f_BnsUdReq(ts_BSSGP_DL_UD(ClientTable[idx].tlli, llc_enc), g_cfg.bvci)); } + [not g_cfg.sgsn_role] BSSGP_SP.receive(PDU_L3_MS_SGSN:?) -> value l3_mo sender vc_conn { + var integer idx := f_tbl_idx_by_comp(vc_conn); + var octetstring l3_enc := enc_PDU_L3_MS_SGSN(l3_mo); + var BIT4 sapi := f_llc_sapi_by_l3_mo(l3_mo); + var integer n_u := f_llc_get_n_u_tx(ClientTable[idx].llc[bit2int(sapi)]); + var octetstring llc_enc := enc_PDU_LLC(valueof(ts_LLC_UI(l3_enc, sapi, '1'B, n_u))); + BSCP.send(f_BnsUdReq(ts_BSSGP_UL_UD(ClientTable[idx].tlli, ClientTable[idx].cell_id, llc_enc), g_cfg.bvci)); + } [] BSSGP_SP.receive(PDU_LLC:?) -> value llc sender vc_conn { var integer idx := f_tbl_idx_by_comp(vc_conn); -- To view, visit https://gerrit.osmocom.org/13862 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I71c19cd0f11927eb70667210a4ba1ee5873fd534 Gerrit-Change-Number: 13862 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 22:39:03 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 10 May 2019 22:39:03 +0000 Subject: Change in osmo-ttcn3-hacks[master]: BSSGP_Emulation: Implement LLC sending also for SGSN-role In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13863 ) Change subject: BSSGP_Emulation: Implement LLC sending also for SGSN-role ...................................................................... BSSGP_Emulation: Implement LLC sending also for SGSN-role We used to support sending of LLC messages only for the MS role, where we generated BSSGP UL UNITDATA. Let's also support the SGSN role, where we have to generate BSSGP DL UNITDATA Change-Id: If86f4b7c9e7c3c799c274f37a350dec4a788f124 --- M library/BSSGP_Emulation.ttcn 1 file changed, 8 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn index 849e147..c60868e 100644 --- a/library/BSSGP_Emulation.ttcn +++ b/library/BSSGP_Emulation.ttcn @@ -597,11 +597,18 @@ BSCP.send(f_BnsUdReq(ts_BSSGP_UL_UD(ClientTable[idx].tlli, ClientTable[idx].cell_id, llc_enc), g_cfg.bvci)); } - [] BSSGP_SP.receive(PDU_LLC:?) -> value llc sender vc_conn { + /* ConnHdlr sends raw LLC: Encode and send as UL_UD / DL_UD */ + [not g_cfg.sgsn_role] BSSGP_SP.receive(PDU_LLC:?) -> value llc sender vc_conn { var integer idx := f_tbl_idx_by_comp(vc_conn); var octetstring llc_enc := enc_PDU_LLC(llc); BSCP.send(f_BnsUdReq(ts_BSSGP_UL_UD(ClientTable[idx].tlli, ClientTable[idx].cell_id, llc_enc), g_cfg.bvci)); } + [g_cfg.sgsn_role] BSSGP_SP.receive(PDU_LLC:?) -> value llc sender vc_conn { + var integer idx := f_tbl_idx_by_comp(vc_conn); + var octetstring llc_enc := enc_PDU_LLC(llc); + BSCP.send(f_BnsUdReq(ts_BSSGP_DL_UD(ClientTable[idx].tlli, llc_enc), g_cfg.bvci)); + } + } function f_llc_get_n_u_tx(inout LLC_Entity llc) return uint9_t { -- To view, visit https://gerrit.osmocom.org/13863 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If86f4b7c9e7c3c799c274f37a350dec4a788f124 Gerrit-Change-Number: 13863 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 10 23:23:53 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Fri, 10 May 2019 23:23:53 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Revert partial of 0ac6315212a3 ("msc: add inter-BSC and inter-MSC Han... In-Reply-To: References: Message-ID: lynxis lazus has submitted this change and it was merged. ( https://gerrit.osmocom.org/13947 ) Change subject: Revert partial of 0ac6315212a3 ("msc: add inter-BSC and inter-MSC Handover tests") ...................................................................... Revert partial of 0ac6315212a3 ("msc: add inter-BSC and inter-MSC Handover tests") Commit 0ac6315212a breaks all related GSUP SS tests because it require all GSUP SS packages to have a OSMO_GSUP_MESSAGE_CLASS_USSD IE. Change-Id: Iadbc37105fa67cf6383fb63b86ed653ccc7bddf7 --- M library/GSUP_Types.ttcn 1 file changed, 0 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified Objections: Neels Hofmeyr: I would prefer this is not merged as is diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn index 73f4562..7e26e19 100644 --- a/library/GSUP_Types.ttcn +++ b/library/GSUP_Types.ttcn @@ -1091,20 +1091,14 @@ tr_GSUP_IE_SessionId(sid), tr_GSUP_IE_SessionState(state) }; - var integer last_idx := 3; /* Optional SS payload */ if (istemplatekind(ss, "*")) { ies[3] := *; - last_idx := last_idx + 1; } else if (not istemplatekind(ss, "omit")) { ies[3] := tr_GSUP_IE_SSInfo(ss); - last_idx := last_idx + 1; } - ies[last_idx] := tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_USSD); - last_idx := last_idx + 1; - return ies; } -- To view, visit https://gerrit.osmocom.org/13947 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iadbc37105fa67cf6383fb63b86ed653ccc7bddf7 Gerrit-Change-Number: 13947 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 00:33:41 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sat, 11 May 2019 00:33:41 +0000 Subject: Change in osmo-ttcn3-hacks[master]: SGSN_Tests: fix regression in f_send_l3_gmm_llc() which breaks TC_att... Message-ID: lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/13985 Change subject: SGSN_Tests: fix regression in f_send_l3_gmm_llc() which breaks TC_attach_rau_a_b ...................................................................... SGSN_Tests: fix regression in f_send_l3_gmm_llc() which breaks TC_attach_rau_a_b The gb_index was forgotten to given to the new function f_send_l3(). All testcases which only used the default BSSGB connection #0 continued to work, but the TC_attach_rau_a_b is the only testcase which uses #0 and #1 at the same time. Fixes: a05b80792266 ("sgsn: Add TC_llc_null to test if SGSN survives a LLC NULL packet") Change-Id: Ie3dd8c613d3b3440447a282dc4545078cb927274 --- M sgsn/SGSN_Tests.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/85/13985/1 diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index 9399e66..07f5b0d 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -384,7 +384,7 @@ var octetstring l3_enc := enc_PDU_L3_MS_SGSN(valueof(l3_mo)); var BIT4 sapi := f_llc_sapi_by_l3_mo(valueof(l3_mo)); var integer n_u := f_llc_get_n_u_tx(llc[bit2int(sapi)]); - f_send_llc(ts_LLC_UI(l3_enc, sapi, '0'B, n_u)); + f_send_llc(ts_LLC_UI(l3_enc, sapi, '0'B, n_u), gb_index); } altstep as_mm_identity() runs on BSSGP_ConnHdlr { -- To view, visit https://gerrit.osmocom.org/13985 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ie3dd8c613d3b3440447a282dc4545078cb927274 Gerrit-Change-Number: 13985 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 00:38:48 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sat, 11 May 2019 00:38:48 +0000 Subject: Change in osmo-msc[master]: remove msc specific db counters In-Reply-To: References: Message-ID: lynxis lazus has removed a vote on this change. Change subject: remove msc specific db counters ...................................................................... Removed Code-Review-2 by lynxis lazus -- To view, visit https://gerrit.osmocom.org/13800 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: deleteVote Gerrit-Change-Id: Id64f1839a55b5326f74ec04b7a5dbed9d269b89c Gerrit-Change-Number: 13800 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 00:49:05 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sat, 11 May 2019 00:49:05 +0000 Subject: Change in osmo-msc[master]: replace osmo_counter with stat_items In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Daniel Willmann, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13802 to look at the new patch set (#5). Change subject: replace osmo_counter with stat_items ...................................................................... replace osmo_counter with stat_items osmo_counter will be soon deprecated. Use the newer and more flexible osmo_stat_item instead. Depends on: Id2462c4866bd22bc2338c9c8f69b775f88ae7511 (libosmocore) Change-Id: I6a20123b263f4f808153794ee8a735092deb399e --- M include/osmocom/msc/gsm_data.h M src/libmsc/gsm_04_08_cc.c M src/libmsc/gsm_09_11.c M src/libmsc/msc_net_init.c 4 files changed, 29 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/02/13802/5 -- To view, visit https://gerrit.osmocom.org/13802 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6a20123b263f4f808153794ee8a735092deb399e Gerrit-Change-Number: 13802 Gerrit-PatchSet: 5 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 00:50:19 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sat, 11 May 2019 00:50:19 +0000 Subject: Change in osmo-sgsn[master]: gprs_gmm: send Service Reject when no PDP ctxs are available. In-Reply-To: References: Message-ID: lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/13744 ) Change subject: gprs_gmm: send Service Reject when no PDP ctxs are available. ...................................................................... Patch Set 9: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13744 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If610cbef17c25ec44e65d4f1b2340d102c560437 Gerrit-Change-Number: 13744 Gerrit-PatchSet: 9 Gerrit-Owner: Mykola Shchetinin Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Mykola Shchetinin Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Sat, 11 May 2019 00:50:19 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 00:50:25 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sat, 11 May 2019 00:50:25 +0000 Subject: Change in osmo-sgsn[master]: gprs_gmm: send Service Reject when no PDP ctxs are available. In-Reply-To: References: Message-ID: lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/13744 ) Change subject: gprs_gmm: send Service Reject when no PDP ctxs are available. ...................................................................... Patch Set 9: Great. Thanks! -- To view, visit https://gerrit.osmocom.org/13744 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If610cbef17c25ec44e65d4f1b2340d102c560437 Gerrit-Change-Number: 13744 Gerrit-PatchSet: 9 Gerrit-Owner: Mykola Shchetinin Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Mykola Shchetinin Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Sat, 11 May 2019 00:50:25 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 01:02:55 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sat, 11 May 2019 01:02:55 +0000 Subject: Change in osmo-ttcn3-hacks[master]: SGSN_Tests: correct verdict failure message in f_detach_mo() Message-ID: lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/13986 Change subject: SGSN_Tests: correct verdict failure message in f_detach_mo() ...................................................................... SGSN_Tests: correct verdict failure message in f_detach_mo() Change-Id: I5c03ef7dd7486025d35d4482a7fe150dd36de907 --- M sgsn/SGSN_Tests.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/86/13986/1 diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index 9399e66..150c0b6 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -896,7 +896,7 @@ } [power_off] BSSGP[bssgp_index].receive(tr_BD_L3_MT(tr_GMM_DET_ACCEPT_MT)) -> value bd { g_pars.ra := omit; - setverdict(fail, "Unexpected ATTACH ACCEPT in no-power-off DETACH"); + setverdict(fail, "Unexpected DETACH ACCEPT in power-off DETACH"); mtc.stop; /* TODO: check if any PDP contexts are deactivated on network side? */ } -- To view, visit https://gerrit.osmocom.org/13986 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I5c03ef7dd7486025d35d4482a7fe150dd36de907 Gerrit-Change-Number: 13986 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 01:02:55 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sat, 11 May 2019 01:02:55 +0000 Subject: Change in osmo-ttcn3-hacks[master]: SGSN_Tests: fail when receiving any layer 3 package for a power off s... Message-ID: lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/13987 Change subject: SGSN_Tests: fail when receiving any layer 3 package for a power off station ...................................................................... SGSN_Tests: fail when receiving any layer 3 package for a power off station Change-Id: I27d798c1866ed7ae9b03b9c0ffdd7400431551f9 --- M sgsn/SGSN_Tests.ttcn 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/87/13987/1 diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index 150c0b6..7c8567c 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -900,6 +900,10 @@ mtc.stop; /* TODO: check if any PDP contexts are deactivated on network side? */ } + [power_off] BSSGP[bssgp_index].receive(tr_BD_L3_MT(?)) -> value bd { + setverdict(fail, "Unexpected Layer 3 package received in power-off DETACH"); + mtc.stop; + } [power_off] T.timeout { setverdict(pass); } -- To view, visit https://gerrit.osmocom.org/13987 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I27d798c1866ed7ae9b03b9c0ffdd7400431551f9 Gerrit-Change-Number: 13987 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 01:02:55 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sat, 11 May 2019 01:02:55 +0000 Subject: Change in osmo-ttcn3-hacks[master]: SGSN_Tests: add test case TC_attach_pdp_act_gmm_detach Message-ID: lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/13988 Change subject: SGSN_Tests: add test case TC_attach_pdp_act_gmm_detach ...................................................................... SGSN_Tests: add test case TC_attach_pdp_act_gmm_detach MS -> SGSN: Attach Request MS <-> SGSN: [..] MS -> SGSN: Attach Complete MS -> SGSN: PDP Activate Request MS <- SGSN: PDP Activate Accept MS -> SGSN: GMM Detach Request MS <- SGSN: GMM Detach Accept Related-to: OS#1881 Change-Id: Ibafbbb8ed99357d1e2e13d576b2624939388e85b --- M sgsn/SGSN_Tests.ttcn 1 file changed, 26 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/88/13988/1 diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index 7c8567c..a3dbed1 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -2267,6 +2267,31 @@ vc_conn.done; } +private function f_TC_attach_pdp_act_gmm_detach(charstring id) runs on BSSGP_ConnHdlr { + var PdpActPars apars := valueof(t_PdpActPars(mp_ggsn_ip)); + + /* first perform regular attach */ + f_TC_attach(id); + /* then activate PDP context */ + f_pdp_ctx_act(apars); + /* do a normal detach */ + f_detach_mo(c_GMM_DTT_MO_GPRS, false, true); +} + +testcase TC_attach_pdp_act_gmm_detach() runs on test_CT { + /* MS -> SGSN: Attach Request + * MS <-> SGSN: [..] + * MS -> SGSN: Attach Complete + * MS -> SGSN: PDP Activate Request + * MS <- SGSN: PDP Activate Accept + * MS -> SGSN: GMM Detach Request + * MS <- SGSN: GMM Detach Accept + */ + var BSSGP_ConnHdlr vc_conn; + f_init(); + vc_conn := f_start_handler(refers(f_TC_attach_pdp_act_gmm_detach), testcasename(), g_gb, 26); + vc_conn.done; +} control { @@ -2312,6 +2337,7 @@ execute( TC_attach_restart_ctr_create() ); execute( TC_attach_pdp_act_deact_mt_t3395_expire() ); execute( TC_attach_pdp_act_user_error_ind_ggsn() ); + execute( TC_attach_pdp_act_gmm_detach() ); execute( TC_attach_gmm_attach_req_while_gmm_attach() ); execute( TC_xid_empty_l3() ); -- To view, visit https://gerrit.osmocom.org/13988 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ibafbbb8ed99357d1e2e13d576b2624939388e85b Gerrit-Change-Number: 13988 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 01:02:56 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sat, 11 May 2019 01:02:56 +0000 Subject: Change in osmo-ttcn3-hacks[master]: SGSN_Tests: f_detach_mo(): fail when receiving any unhandled layer 3 ... Message-ID: lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/13989 Change subject: SGSN_Tests: f_detach_mo(): fail when receiving any unhandled layer 3 message for normal detach ...................................................................... SGSN_Tests: f_detach_mo(): fail when receiving any unhandled layer 3 message for normal detach Change-Id: I957994376583959758417dccf419a55c43a0c61b --- M sgsn/SGSN_Tests.ttcn 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/89/13989/1 diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index a3dbed1..5e04246 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -912,6 +912,10 @@ setverdict(pass); /* TODO: check if any PDP contexts are deactivated on network side? */ } + [not power_off] BSSGP[bssgp_index].receive(tr_BD_L3_MT(?)) -> value bd { + setverdict(fail, "Unexpected Layer 3 package received in normal DETACH"); + mtc.stop; + } [] BSSGP[bssgp_index].receive { repeat; } } } -- To view, visit https://gerrit.osmocom.org/13989 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I957994376583959758417dccf419a55c43a0c61b Gerrit-Change-Number: 13989 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 05:28:41 2019 From: gerrit-no-reply at lists.osmocom.org (Mykola Shchetinin) Date: Sat, 11 May 2019 05:28:41 +0000 Subject: Change in osmo-sgsn[master]: gprs_gmm: send Service Reject when no PDP ctxs are available. In-Reply-To: References: Message-ID: Mykola Shchetinin has posted comments on this change. ( https://gerrit.osmocom.org/13744 ) Change subject: gprs_gmm: send Service Reject when no PDP ctxs are available. ...................................................................... Patch Set 9: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13744 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If610cbef17c25ec44e65d4f1b2340d102c560437 Gerrit-Change-Number: 13744 Gerrit-PatchSet: 9 Gerrit-Owner: Mykola Shchetinin Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Mykola Shchetinin Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Sat, 11 May 2019 05:28:41 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 05:28:50 2019 From: gerrit-no-reply at lists.osmocom.org (Mykola Shchetinin) Date: Sat, 11 May 2019 05:28:50 +0000 Subject: Change in osmo-sgsn[master]: gprs_gmm: send Service Reject when no PDP ctxs are available. In-Reply-To: References: Message-ID: Mykola Shchetinin has submitted this change and it was merged. ( https://gerrit.osmocom.org/13744 ) Change subject: gprs_gmm: send Service Reject when no PDP ctxs are available. ...................................................................... gprs_gmm: send Service Reject when no PDP ctxs are available. Look at PDP Context Status IE: if there are any PDP contexts which are ACTIVE on MS side and there are no PDP contexts which are ACTIVE on the network side, then send Service Reject with the cause "NO PDP ACTIVATED". This forces MS to reactivate the PDP contexts. 3GPP TS 24.008 Section 4.7.13.4 Service request procedure not accepted by the network. Cause # 40. Fixes: OS#3937 Change-Id: If610cbef17c25ec44e65d4f1b2340d102c560437 --- M src/gprs/gprs_gmm.c M tests/sgsn/sgsn_test.c M tests/sgsn/sgsn_test.ok 3 files changed, 43 insertions(+), 1 deletion(-) Approvals: lynxis lazus: Looks good to me, approved Mykola Shchetinin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c index 358bff9..a18a54e 100644 --- a/src/gprs/gprs_gmm.c +++ b/src/gprs/gprs_gmm.c @@ -1616,6 +1616,19 @@ } } +/* 3GPP TS 24.008 Section 4.7.13.4 Service request procedure not accepted by the + * network. Returns true if MS has active PDP contexts in pdp_status */ +bool pdp_status_has_active_nsapis(const uint8_t *pdp_status, const size_t pdp_status_len) +{ + size_t i; + + for (i = 0; i < pdp_status_len; i++) + if (pdp_status[i] != 0) + return true; + + return false; +} + /* Chapter 9.4.14: Routing area update request */ static int gsm48_rx_gmm_ra_upd_req(struct sgsn_mm_ctx *mmctx, struct msgb *msg, struct gprs_llc_llme *llme) @@ -1896,12 +1909,23 @@ ctx->iu.service.type = service_type; - /* TODO: Handle those only in case of accept? */ /* Look at PDP Context Status IE and see if MS's view of * activated/deactivated NSAPIs agrees with our view */ if (TLVP_PRESENT(&tp, GSM48_IE_GMM_PDP_CTX_STATUS)) { const uint8_t *pdp_status = TLVP_VAL(&tp, GSM48_IE_GMM_PDP_CTX_STATUS); + const size_t pdp_status_len = TLVP_LEN(&tp, GSM48_IE_GMM_PDP_CTX_STATUS); + process_ms_ctx_status(ctx, pdp_status); + + /* 3GPP TS 24.008 Section 4.7.13.4 Service request procedure not + * accepted by the network. Cause #40. If MS has PDP Contexts in + * Active state in pdp_status but there is no PDP contexts on + * SGSN side then Reject with the cause will force the mobile to + * reset PDP contexts */ + if (llist_empty(&ctx->pdp_list) && pdp_status_has_active_nsapis(pdp_status, pdp_status_len)) { + reject_cause = GMM_CAUSE_NO_PDP_ACTIVATED; + goto rejected; + } } diff --git a/tests/sgsn/sgsn_test.c b/tests/sgsn/sgsn_test.c index 6145206..23cb4fb 100644 --- a/tests/sgsn/sgsn_test.c +++ b/tests/sgsn/sgsn_test.c @@ -1575,6 +1575,22 @@ cleanup_test(); } +bool pdp_status_has_active_nsapis(const uint8_t *pdp_status, const size_t pdp_status_len); + +static void test_pdp_status_has_active_nsapis(void) +{ + const size_t pdp_status_len = 2; + const uint8_t pdp_status1[] = { 0b00100000, 0b00000000 }; /* PDP NSAPI 5 active */ + const uint8_t pdp_status2[] = { 0b00000000, 0b00000000 }; /* no active PDP NSAPI */ + const uint8_t pdp_status3[] = { 0b00000000, 0b00000001 }; /* PDP NSAPI 8 active */ + + printf("Testing pdp_status_has_active_nsapis\n"); + + OSMO_ASSERT(pdp_status_has_active_nsapis(pdp_status1, pdp_status_len)); + OSMO_ASSERT(!pdp_status_has_active_nsapis(pdp_status2, pdp_status_len)); + OSMO_ASSERT(pdp_status_has_active_nsapis(pdp_status3, pdp_status_len)); +} + static struct log_info_cat gprs_categories[] = { [DMM] = { .name = "DMM", @@ -1657,6 +1673,7 @@ test_gmm_cancel(); test_apn_matching(); test_ggsn_selection(); + test_pdp_status_has_active_nsapis(); printf("Done\n"); talloc_report_full(osmo_sgsn_ctx, stderr); diff --git a/tests/sgsn/sgsn_test.ok b/tests/sgsn/sgsn_test.ok index e7e7cf6..35b1d7b 100644 --- a/tests/sgsn/sgsn_test.ok +++ b/tests/sgsn/sgsn_test.ok @@ -24,4 +24,5 @@ Testing cancellation Testing APN matching Testing GGSN selection +Testing pdp_status_has_active_nsapis Done -- To view, visit https://gerrit.osmocom.org/13744 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If610cbef17c25ec44e65d4f1b2340d102c560437 Gerrit-Change-Number: 13744 Gerrit-PatchSet: 10 Gerrit-Owner: Mykola Shchetinin Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Mykola Shchetinin Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 05:57:37 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 05:57:37 +0000 Subject: Change in osmo-ttcn3-hacks[master]: SGSN_Tests: fix regression in f_send_l3_gmm_llc() which breaks TC_att... In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13985 ) Change subject: SGSN_Tests: fix regression in f_send_l3_gmm_llc() which breaks TC_attach_rau_a_b ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13985 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie3dd8c613d3b3440447a282dc4545078cb927274 Gerrit-Change-Number: 13985 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sat, 11 May 2019 05:57:37 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 05:57:39 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 05:57:39 +0000 Subject: Change in osmo-ttcn3-hacks[master]: SGSN_Tests: fix regression in f_send_l3_gmm_llc() which breaks TC_att... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13985 ) Change subject: SGSN_Tests: fix regression in f_send_l3_gmm_llc() which breaks TC_attach_rau_a_b ...................................................................... SGSN_Tests: fix regression in f_send_l3_gmm_llc() which breaks TC_attach_rau_a_b The gb_index was forgotten to given to the new function f_send_l3(). All testcases which only used the default BSSGB connection #0 continued to work, but the TC_attach_rau_a_b is the only testcase which uses #0 and #1 at the same time. Fixes: a05b80792266 ("sgsn: Add TC_llc_null to test if SGSN survives a LLC NULL packet") Change-Id: Ie3dd8c613d3b3440447a282dc4545078cb927274 --- M sgsn/SGSN_Tests.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index 6665dc0..d081360 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -385,7 +385,7 @@ var octetstring l3_enc := enc_PDU_L3_MS_SGSN(valueof(l3_mo)); var BIT4 sapi := f_llc_sapi_by_l3_mo(valueof(l3_mo)); var integer n_u := f_llc_get_n_u_tx(llc[bit2int(sapi)]); - f_send_llc(ts_LLC_UI(l3_enc, sapi, '0'B, n_u)); + f_send_llc(ts_LLC_UI(l3_enc, sapi, '0'B, n_u), gb_index); } altstep as_mm_identity(integer gb_idx := 0) runs on BSSGP_ConnHdlr { -- To view, visit https://gerrit.osmocom.org/13985 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie3dd8c613d3b3440447a282dc4545078cb927274 Gerrit-Change-Number: 13985 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 05:58:56 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 05:58:56 +0000 Subject: Change in osmo-ttcn3-hacks[master]: SGSN_Tests: correct verdict failure message in f_detach_mo() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13986 ) Change subject: SGSN_Tests: correct verdict failure message in f_detach_mo() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13986 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5c03ef7dd7486025d35d4482a7fe150dd36de907 Gerrit-Change-Number: 13986 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sat, 11 May 2019 05:58:56 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 05:59:00 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 05:59:00 +0000 Subject: Change in osmo-ttcn3-hacks[master]: SGSN_Tests: correct verdict failure message in f_detach_mo() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13986 ) Change subject: SGSN_Tests: correct verdict failure message in f_detach_mo() ...................................................................... SGSN_Tests: correct verdict failure message in f_detach_mo() Change-Id: I5c03ef7dd7486025d35d4482a7fe150dd36de907 --- M sgsn/SGSN_Tests.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index d081360..f5fb21b 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -909,7 +909,7 @@ } [power_off] BSSGP[bssgp_index].receive(tr_BD_L3_MT(tr_GMM_DET_ACCEPT_MT)) -> value bd { g_pars.ra := omit; - setverdict(fail, "Unexpected ATTACH ACCEPT in no-power-off DETACH"); + setverdict(fail, "Unexpected DETACH ACCEPT in power-off DETACH"); mtc.stop; /* TODO: check if any PDP contexts are deactivated on network side? */ } -- To view, visit https://gerrit.osmocom.org/13986 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I5c03ef7dd7486025d35d4482a7fe150dd36de907 Gerrit-Change-Number: 13986 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 05:59:59 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 05:59:59 +0000 Subject: Change in osmo-ttcn3-hacks[master]: SGSN_Tests: fail when receiving any layer 3 package for a power off s... In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13987 ) Change subject: SGSN_Tests: fail when receiving any layer 3 package for a power off station ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13987 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I27d798c1866ed7ae9b03b9c0ffdd7400431551f9 Gerrit-Change-Number: 13987 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sat, 11 May 2019 05:59:59 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 06:00:01 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 06:00:01 +0000 Subject: Change in osmo-ttcn3-hacks[master]: SGSN_Tests: fail when receiving any layer 3 package for a power off s... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13987 ) Change subject: SGSN_Tests: fail when receiving any layer 3 package for a power off station ...................................................................... SGSN_Tests: fail when receiving any layer 3 package for a power off station Change-Id: I27d798c1866ed7ae9b03b9c0ffdd7400431551f9 --- M sgsn/SGSN_Tests.ttcn 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index f5fb21b..89401f4 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -913,6 +913,10 @@ mtc.stop; /* TODO: check if any PDP contexts are deactivated on network side? */ } + [power_off] BSSGP[bssgp_index].receive(tr_BD_L3_MT(?)) -> value bd { + setverdict(fail, "Unexpected Layer 3 package received in power-off DETACH"); + mtc.stop; + } [power_off] T.timeout { setverdict(pass); } -- To view, visit https://gerrit.osmocom.org/13987 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I27d798c1866ed7ae9b03b9c0ffdd7400431551f9 Gerrit-Change-Number: 13987 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 06:00:41 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 06:00:41 +0000 Subject: Change in osmo-ttcn3-hacks[master]: SGSN_Tests: add test case TC_attach_pdp_act_gmm_detach In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13988 ) Change subject: SGSN_Tests: add test case TC_attach_pdp_act_gmm_detach ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13988 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibafbbb8ed99357d1e2e13d576b2624939388e85b Gerrit-Change-Number: 13988 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sat, 11 May 2019 06:00:41 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 06:00:44 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 06:00:44 +0000 Subject: Change in osmo-ttcn3-hacks[master]: SGSN_Tests: add test case TC_attach_pdp_act_gmm_detach In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13988 ) Change subject: SGSN_Tests: add test case TC_attach_pdp_act_gmm_detach ...................................................................... SGSN_Tests: add test case TC_attach_pdp_act_gmm_detach MS -> SGSN: Attach Request MS <-> SGSN: [..] MS -> SGSN: Attach Complete MS -> SGSN: PDP Activate Request MS <- SGSN: PDP Activate Accept MS -> SGSN: GMM Detach Request MS <- SGSN: GMM Detach Accept Related-to: OS#1881 Change-Id: Ibafbbb8ed99357d1e2e13d576b2624939388e85b --- M sgsn/SGSN_Tests.ttcn 1 file changed, 26 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index 89401f4..2bdbfb9 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -2289,6 +2289,31 @@ vc_conn.done; } +private function f_TC_attach_pdp_act_gmm_detach(charstring id) runs on BSSGP_ConnHdlr { + var PdpActPars apars := valueof(t_PdpActPars(mp_ggsn_ip)); + + /* first perform regular attach */ + f_TC_attach(id); + /* then activate PDP context */ + f_pdp_ctx_act(apars); + /* do a normal detach */ + f_detach_mo(c_GMM_DTT_MO_GPRS, false, true); +} + +testcase TC_attach_pdp_act_gmm_detach() runs on test_CT { + /* MS -> SGSN: Attach Request + * MS <-> SGSN: [..] + * MS -> SGSN: Attach Complete + * MS -> SGSN: PDP Activate Request + * MS <- SGSN: PDP Activate Accept + * MS -> SGSN: GMM Detach Request + * MS <- SGSN: GMM Detach Accept + */ + var BSSGP_ConnHdlr vc_conn; + f_init(); + vc_conn := f_start_handler(refers(f_TC_attach_pdp_act_gmm_detach), testcasename(), g_gb, 26); + vc_conn.done; +} control { @@ -2334,6 +2359,7 @@ execute( TC_attach_restart_ctr_create() ); execute( TC_attach_pdp_act_deact_mt_t3395_expire() ); execute( TC_attach_pdp_act_user_error_ind_ggsn() ); + execute( TC_attach_pdp_act_gmm_detach() ); execute( TC_attach_gmm_attach_req_while_gmm_attach() ); execute( TC_xid_empty_l3() ); -- To view, visit https://gerrit.osmocom.org/13988 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ibafbbb8ed99357d1e2e13d576b2624939388e85b Gerrit-Change-Number: 13988 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 06:02:06 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 06:02:06 +0000 Subject: Change in osmo-ttcn3-hacks[master]: SGSN_Tests: f_detach_mo(): fail when receiving any unhandled layer 3 ... In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13989 ) Change subject: SGSN_Tests: f_detach_mo(): fail when receiving any unhandled layer 3 message for normal detach ...................................................................... Patch Set 1: Code-Review-1 This can be merged with the identical Claude for the power-offf case that you added two patches earlier. -- To view, visit https://gerrit.osmocom.org/13989 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I957994376583959758417dccf419a55c43a0c61b Gerrit-Change-Number: 13989 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sat, 11 May 2019 06:02:06 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 06:03:12 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 06:03:12 +0000 Subject: Change in osmo-ttcn3-hacks[master]: BSSGP_Emulation: More/improved comments In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13864 ) Change subject: BSSGP_Emulation: More/improved comments ...................................................................... BSSGP_Emulation: More/improved comments Change-Id: I04250667a498f3f00d4fbb4cd22a4f7b71e2bba1 --- M library/BSSGP_Emulation.ttcn 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn index c60868e..22c2f09 100644 --- a/library/BSSGP_Emulation.ttcn +++ b/library/BSSGP_Emulation.ttcn @@ -571,15 +571,17 @@ } + /* ConnHdlr sends BSSGP on BVCI=0 port: forward it to BSSGP Codec Port */ [] BSSGP_SP_SIG.receive(PDU_BSSGP:?)-> value bs_pdu sender vc_conn { BSCP.send(f_BnsUdReq(bs_pdu, 0)); } - /* pass virtually any PDU from user to NS-UNITDATA PDU on network */ + /* ConnHdlr sends BSSGP on BVCI=PTP port: forward it to BSSGP Codec Port */ [] BSSGP_SP.receive(PDU_BSSGP:?) -> value bs_pdu sender vc_conn { BSCP.send(f_BnsUdReq(bs_pdu, g_cfg.bvci)); } + /* ConnHdlr sends L3: Encode and send as UL_UD / DL_UD */ [g_cfg.sgsn_role] BSSGP_SP.receive(PDU_L3_SGSN_MS:?) -> value l3_mt sender vc_conn { var integer idx := f_tbl_idx_by_comp(vc_conn); var octetstring l3_enc := enc_PDU_L3_SGSN_MS(l3_mt); -- To view, visit https://gerrit.osmocom.org/13864 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I04250667a498f3f00d4fbb4cd22a4f7b71e2bba1 Gerrit-Change-Number: 13864 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 06:04:46 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 06:04:46 +0000 Subject: Change in osmo-msc[master]: remove msc specific db counters In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13800 ) Change subject: remove msc specific db counters ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13800 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id64f1839a55b5326f74ec04b7a5dbed9d269b89c Gerrit-Change-Number: 13800 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Sat, 11 May 2019 06:04:46 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 06:05:40 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 06:05:40 +0000 Subject: Change in osmo-msc[master]: remove msc specific db counters In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13800 ) Change subject: remove msc specific db counters ...................................................................... Patch Set 2: Code-Review+1 It nicht male sense to check the manuals in terms of removing this feature. -- To view, visit https://gerrit.osmocom.org/13800 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id64f1839a55b5326f74ec04b7a5dbed9d269b89c Gerrit-Change-Number: 13800 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Sat, 11 May 2019 06:05:40 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 06:06:51 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 06:06:51 +0000 Subject: Change in osmo-msc[master]: vlr: fix IMEI length In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13904 ) Change subject: vlr: fix IMEI length ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13904 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iaf2569c099874b55acbd748b776394726cc5ce54 Gerrit-Change-Number: 13904 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sat, 11 May 2019 06:06:51 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 06:07:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 06:07:33 +0000 Subject: Change in osmo-msc[master]: vlr: when setting IMEISV, also set IMEI In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13893 ) Change subject: vlr: when setting IMEISV, also set IMEI ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13893 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I02e7b66848bf7dddb31b105e2ae981432817ae1e Gerrit-Change-Number: 13893 Gerrit-PatchSet: 4 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Sat, 11 May 2019 06:07:33 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 06:09:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 06:09:08 +0000 Subject: Change in osmo-msc[master]: vlr: optionally send IMEI early to HLR In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13894 ) Change subject: vlr: optionally send IMEI early to HLR ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13894 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I88283cad23793b475445d814ff49db534cb41244 Gerrit-Change-Number: 13894 Gerrit-PatchSet: 4 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Sat, 11 May 2019 06:09:08 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 06:11:50 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 06:11:50 +0000 Subject: Change in libosmo-sccp[master]: osmo-stp: refactor handling of both SIGINT and SIGTERM In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13971 ) Change subject: osmo-stp: refactor handling of both SIGINT and SIGTERM ...................................................................... Patch Set 1: Code-Review-1 If these is no graceful shutdown implemented, then stating it in the commitlog is misleading. Lets male it clear that this actual Function is not implemented, thanks. -- To view, visit https://gerrit.osmocom.org/13971 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5d8618857c5119d4acca5d65cf1276ab02889c84 Gerrit-Change-Number: 13971 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sat, 11 May 2019 06:11:50 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 06:12:15 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 06:12:15 +0000 Subject: Change in libosmo-sccp[master]: osmo-stp: expose root talloc context to the VTY code In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13970 ) Change subject: osmo-stp: expose root talloc context to the VTY code ...................................................................... osmo-stp: expose root talloc context to the VTY code In Id0789c4946929b783c54220de439958001f94992 I introduced the VTY commands for talloc-context introspection, but forgot to expose the root talloc-context. Change-Id: Id2bf6cdae112f9791c93411c1837de488cab9ee3 --- M stp/stp_main.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Vadim Yanitskiy: Looks good to me, approved Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/stp/stp_main.c b/stp/stp_main.c index aa77e61..6a47403 100644 --- a/stp/stp_main.c +++ b/stp/stp_main.c @@ -166,6 +166,8 @@ msgb_talloc_ctx_init(tall_stp_ctx, 0); osmo_init_logging2(tall_stp_ctx, &log_info); osmo_stats_init(tall_stp_ctx); + + vty_info.tall_ctx = tall_stp_ctx; vty_init(&vty_info); handle_options(argc, argv); -- To view, visit https://gerrit.osmocom.org/13970 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id2bf6cdae112f9791c93411c1837de488cab9ee3 Gerrit-Change-Number: 13970 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 06:13:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 06:13:47 +0000 Subject: Change in osmo-ci[master]: osmocom-latest-packages: Enable osmo-sysmon In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13500 ) Change subject: osmocom-latest-packages: Enable osmo-sysmon ...................................................................... Patch Set 2: This change is ready for review. -- To view, visit https://gerrit.osmocom.org/13500 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I48bd5aff2ae315b6f462facea70222eb2cdd2d58 Gerrit-Change-Number: 13500 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Sat, 11 May 2019 06:13:47 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 06:14:00 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 06:14:00 +0000 Subject: Change in osmo-ci[master]: osmocom-latest-packages: Enable osmo-sysmon In-Reply-To: References: Message-ID: Harald Welte has removed a vote on this change. Change subject: osmocom-latest-packages: Enable osmo-sysmon ...................................................................... Removed Code-Review-2 by Harald Welte -- To view, visit https://gerrit.osmocom.org/13500 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: deleteVote Gerrit-Change-Id: I48bd5aff2ae315b6f462facea70222eb2cdd2d58 Gerrit-Change-Number: 13500 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 06:14:22 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 06:14:22 +0000 Subject: Change in osmo-ci[master]: osmocom-latest-packages: Enable osmo-sysmon In-Reply-To: References: Message-ID: Harald Welte has uploaded a new patch set (#3). ( https://gerrit.osmocom.org/13500 ) Change subject: osmocom-latest-packages: Enable osmo-sysmon ...................................................................... osmocom-latest-packages: Enable osmo-sysmon Since libosmocore 1.1.0 and libosmo-netif 0.5.0 are released, we can address the TOOD and build osmo-sysmon also in our latest feed. Change-Id: I48bd5aff2ae315b6f462facea70222eb2cdd2d58 --- M scripts/osmocom-latest-packages.sh 1 file changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/00/13500/3 -- To view, visit https://gerrit.osmocom.org/13500 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I48bd5aff2ae315b6f462facea70222eb2cdd2d58 Gerrit-Change-Number: 13500 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 06:15:24 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 06:15:24 +0000 Subject: Change in osmo-ci[master]: osmocom-latest-packages: Enable osmo-sysmon In-Reply-To: References: Message-ID: Harald Welte has uploaded a new patch set (#5). ( https://gerrit.osmocom.org/13500 ) Change subject: osmocom-latest-packages: Enable osmo-sysmon ...................................................................... osmocom-latest-packages: Enable osmo-sysmon Since libosmocore 1.1.0 and libosmo-netif 0.5.0 are released, we can address the TODO and build osmo-sysmon also in our latest feed. Change-Id: I48bd5aff2ae315b6f462facea70222eb2cdd2d58 --- M scripts/osmocom-latest-packages.sh 1 file changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/00/13500/5 -- To view, visit https://gerrit.osmocom.org/13500 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I48bd5aff2ae315b6f462facea70222eb2cdd2d58 Gerrit-Change-Number: 13500 Gerrit-PatchSet: 5 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 06:15:55 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 06:15:55 +0000 Subject: Change in osmo-ci[master]: osmocom-latest-packages: Enable osmo-sysmon In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13500 ) Change subject: osmocom-latest-packages: Enable osmo-sysmon ...................................................................... Patch Set 5: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13500 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I48bd5aff2ae315b6f462facea70222eb2cdd2d58 Gerrit-Change-Number: 13500 Gerrit-PatchSet: 5 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Sat, 11 May 2019 06:15:55 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 06:15:58 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 06:15:58 +0000 Subject: Change in osmo-ci[master]: osmocom-latest-packages: Enable osmo-sysmon In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13500 ) Change subject: osmocom-latest-packages: Enable osmo-sysmon ...................................................................... osmocom-latest-packages: Enable osmo-sysmon Since libosmocore 1.1.0 and libosmo-netif 0.5.0 are released, we can address the TODO and build osmo-sysmon also in our latest feed. Change-Id: I48bd5aff2ae315b6f462facea70222eb2cdd2d58 --- M scripts/osmocom-latest-packages.sh 1 file changed, 2 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index 05efb90..020efaa 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -131,8 +131,7 @@ checkout osmo-bsc checkout simtrace2 checkout libosmo-dsp - # TODO: enable once release after libosmocore 1.0.1 and libosmo-netif 0.4.0 are available - # checkout osmo-sysmon + checkout osmo-sysmon # TODO: enable once libosmo-abis > 0.6.0 is available (IPA keepalive FSM) # checkout osmo-remsim @@ -160,8 +159,7 @@ build osmo-bsc build simtrace2 build libosmo-dsp - # TODO: enable once release after libosmocore 1.0.1 and libosmo-netif 0.4.0 are available - # build osmo-sysmon + build osmo-sysmon # TODO: enable once libosmo-abis > 0.6.0 is available (IPA keepalive FSM) # build osmo-remsim -- To view, visit https://gerrit.osmocom.org/13500 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I48bd5aff2ae315b6f462facea70222eb2cdd2d58 Gerrit-Change-Number: 13500 Gerrit-PatchSet: 5 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 09:09:23 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 09:09:23 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Make f_gen_tr_ss_ies() work for both 'latest' and 'master' Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13990 Change subject: Make f_gen_tr_ss_ies() work for both 'latest' and 'master' ...................................................................... Make f_gen_tr_ss_ies() work for both 'latest' and 'master' This fixes the partial revert of c43c8cd275b4f71b0bc6a50fc81564c812d5b406 to work for both situtions: Messages that have the OSMO_GSUP_MESSAGE_CLASS_USSD and messages that don't. The particular implementation is rather ugly, but we're waiting for a response to https://www.eclipse.org/forums/index.php/t/1098847/ on how to solve this kind of problem in a more elegant way. Meanwile, we make it work first. Change-Id: Ibf137de6a41aaa43894cc0b6da8341ceb88b0756 --- M library/GSUP_Types.ttcn 1 file changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/90/13990/1 diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn index 7e26e19..44b9f26 100644 --- a/library/GSUP_Types.ttcn +++ b/library/GSUP_Types.ttcn @@ -1091,15 +1091,23 @@ tr_GSUP_IE_SessionId(sid), tr_GSUP_IE_SessionState(state) }; + var integer last_idx := 3; /* Optional SS payload */ if (istemplatekind(ss, "*")) { ies[3] := *; + last_idx := last_idx + 1; } else if (not istemplatekind(ss, "omit")) { ies[3] := tr_GSUP_IE_SSInfo(ss); + last_idx := last_idx + 1; } - return ies; + /* the GSUP Message Class IE is optional, as old implementations don't have it yet */ + var template GSUP_IEs ies2 := ies; + ies2[last_idx] := tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_USSD); + last_idx := last_idx + 1; + + return (ies, ies2); } template (value) GSUP_PDU ts_GSUP_PROC_SS_REQ( -- To view, visit https://gerrit.osmocom.org/13990 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ibf137de6a41aaa43894cc0b6da8341ceb88b0756 Gerrit-Change-Number: 13990 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 09:13:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 09:13:33 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Make f_gen_tr_ss_ies() work for both 'latest' and 'master' In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13990 ) Change subject: Make f_gen_tr_ss_ies() work for both 'latest' and 'master' ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13990 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibf137de6a41aaa43894cc0b6da8341ceb88b0756 Gerrit-Change-Number: 13990 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sat, 11 May 2019 09:13:33 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 09:13:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 09:13:53 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Make f_gen_tr_ss_ies() work for both 'latest' and 'master' In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13990 ) Change subject: Make f_gen_tr_ss_ies() work for both 'latest' and 'master' ...................................................................... Make f_gen_tr_ss_ies() work for both 'latest' and 'master' This fixes the partial revert of c43c8cd275b4f71b0bc6a50fc81564c812d5b406 to work for both situtions: Messages that have the OSMO_GSUP_MESSAGE_CLASS_USSD and messages that don't. The particular implementation is rather ugly, but we're waiting for a response to https://www.eclipse.org/forums/index.php/t/1098847/ on how to solve this kind of problem in a more elegant way. Meanwile, we make it work first. Change-Id: Ibf137de6a41aaa43894cc0b6da8341ceb88b0756 --- M library/GSUP_Types.ttcn 1 file changed, 9 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn index 7e26e19..44b9f26 100644 --- a/library/GSUP_Types.ttcn +++ b/library/GSUP_Types.ttcn @@ -1091,15 +1091,23 @@ tr_GSUP_IE_SessionId(sid), tr_GSUP_IE_SessionState(state) }; + var integer last_idx := 3; /* Optional SS payload */ if (istemplatekind(ss, "*")) { ies[3] := *; + last_idx := last_idx + 1; } else if (not istemplatekind(ss, "omit")) { ies[3] := tr_GSUP_IE_SSInfo(ss); + last_idx := last_idx + 1; } - return ies; + /* the GSUP Message Class IE is optional, as old implementations don't have it yet */ + var template GSUP_IEs ies2 := ies; + ies2[last_idx] := tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_USSD); + last_idx := last_idx + 1; + + return (ies, ies2); } template (value) GSUP_PDU ts_GSUP_PROC_SS_REQ( -- To view, visit https://gerrit.osmocom.org/13990 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ibf137de6a41aaa43894cc0b6da8341ceb88b0756 Gerrit-Change-Number: 13990 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: fixeria Gerrit-Reviewer: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 10:27:07 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 10:27:07 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Fix regression in tr_GSUP_PROC_SS_ERR during inter-MSC-ho Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13991 Change subject: Fix regression in tr_GSUP_PROC_SS_ERR during inter-MSC-ho ...................................................................... Fix regression in tr_GSUP_PROC_SS_ERR during inter-MSC-ho In Change-Id I7d76c982ad4e198534fa488609c41e8892b268ab we merged various changes to GSUP_Templates.ttcn, mostly related to adding the tr_GSUP_IE_Message_Class IE. In most caes, the specified MessageClass is correct. However in tr_GSUP_PROC_SS_ERR we accidentially used OSMO_GSUP_MESSAGE_CLASS_SMS instead of OSMO_GSUP_MESSAGE_CLASS_USSD. This makes TC_lu_and_ss_session_timeout pass again. Change-Id: I04fa1be24ec63ed1eb767a33de0297722b4366f1 --- M library/GSUP_Types.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/91/13991/1 diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn index 44b9f26..df1d7a9 100644 --- a/library/GSUP_Types.ttcn +++ b/library/GSUP_Types.ttcn @@ -1174,7 +1174,7 @@ tr_GSUP_IE_Cause(cause), tr_GSUP_IE_SessionId(sid), tr_GSUP_IE_SessionState(state), - tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS) + tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_USSD) } ); -- To view, visit https://gerrit.osmocom.org/13991 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I04fa1be24ec63ed1eb767a33de0297722b4366f1 Gerrit-Change-Number: 13991 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 10:27:32 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 10:27:32 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Fix regression in tr_GSUP_PROC_SS_ERR during inter-MSC-ho In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13991 ) Change subject: Fix regression in tr_GSUP_PROC_SS_ERR during inter-MSC-ho ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13991 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I04fa1be24ec63ed1eb767a33de0297722b4366f1 Gerrit-Change-Number: 13991 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Sat, 11 May 2019 10:27:32 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 10:27:50 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 10:27:50 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Fix regression in tr_GSUP_PROC_SS_ERR during inter-MSC-ho In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13991 ) Change subject: Fix regression in tr_GSUP_PROC_SS_ERR during inter-MSC-ho ...................................................................... Fix regression in tr_GSUP_PROC_SS_ERR during inter-MSC-ho In Change-Id I7d76c982ad4e198534fa488609c41e8892b268ab we merged various changes to GSUP_Templates.ttcn, mostly related to adding the tr_GSUP_IE_Message_Class IE. In most caes, the specified MessageClass is correct. However in tr_GSUP_PROC_SS_ERR we accidentially used OSMO_GSUP_MESSAGE_CLASS_SMS instead of OSMO_GSUP_MESSAGE_CLASS_USSD. This makes TC_lu_and_ss_session_timeout pass again. Change-Id: I04fa1be24ec63ed1eb767a33de0297722b4366f1 --- M library/GSUP_Types.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn index 44b9f26..df1d7a9 100644 --- a/library/GSUP_Types.ttcn +++ b/library/GSUP_Types.ttcn @@ -1174,7 +1174,7 @@ tr_GSUP_IE_Cause(cause), tr_GSUP_IE_SessionId(sid), tr_GSUP_IE_SessionState(state), - tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS) + tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_USSD) } ); -- To view, visit https://gerrit.osmocom.org/13991 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I04fa1be24ec63ed1eb767a33de0297722b4366f1 Gerrit-Change-Number: 13991 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: fixeria -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 14:22:13 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 11 May 2019 14:22:13 +0000 Subject: Change in osmo-msc[master]: make LOG_TRANS() NULL-safe again Message-ID: Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/13992 Change subject: make LOG_TRANS() NULL-safe again ...................................................................... make LOG_TRANS() NULL-safe again Previous patch [1] removed NULL-safety from LOG_TRANS(). Fix that. In case a trans is NULL, it is fine to log in the DMSC category, since the context should still be general (erratic message or other initial problems). Change-Id: I6e36c47bf828dd073b36c6301bbeabcc28e101e6 --- M include/osmocom/msc/transaction.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/92/13992/1 diff --git a/include/osmocom/msc/transaction.h b/include/osmocom/msc/transaction.h index 6b82390..a95cdbb 100644 --- a/include/osmocom/msc/transaction.h +++ b/include/osmocom/msc/transaction.h @@ -27,7 +27,7 @@ ##args) #define LOG_TRANS(trans, level, fmt, args...) \ - LOG_TRANS_CAT(trans, (trans)->log_subsys, level, fmt, ##args) + LOG_TRANS_CAT(trans, (trans) ? (trans)->log_subsys : DMSC, level, fmt, ##args) enum bridge_state { BRIDGE_STATE_NONE, -- To view, visit https://gerrit.osmocom.org/13992 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I6e36c47bf828dd073b36c6301bbeabcc28e101e6 Gerrit-Change-Number: 13992 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: tnt -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 14:22:39 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 11 May 2019 14:22:39 +0000 Subject: Change in osmo-msc[master]: libmsc: Make sure to not dereference a NULL trans In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13963 ) Change subject: libmsc: Make sure to not dereference a NULL trans ...................................................................... Patch Set 1: Instead I suggest https://gerrit.osmocom.org/#/c/osmo-msc/+/13992 -- To view, visit https://gerrit.osmocom.org/13963 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia14bd28e1db570c487ad8e90e29a69208e2226f2 Gerrit-Change-Number: 13963 Gerrit-PatchSet: 1 Gerrit-Owner: tnt Gerrit-Assignee: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: tnt Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Sat, 11 May 2019 14:22:39 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 14:23:33 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 11 May 2019 14:23:33 +0000 Subject: Change in osmo-msc[master]: make LOG_TRANS() NULL-safe again In-Reply-To: References: Message-ID: Hello tnt, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13992 to look at the new patch set (#2). Change subject: make LOG_TRANS() NULL-safe again ...................................................................... make LOG_TRANS() NULL-safe again Previous patch [1] removed NULL-safety from LOG_TRANS(). Fix that. In case a trans is NULL, it is fine to log in the DMSC category, since the context should still be general (erratic message or other initial problems). [1] 7f85acea9bb9f80e208820958f4cae63625f3689 / I6dfe5b98fb9e884c2dde61d603832dafceb12123 "LOG_TRANS: store subsys in trans, unify USSD logging back to DMM" Change-Id: I6e36c47bf828dd073b36c6301bbeabcc28e101e6 --- M include/osmocom/msc/transaction.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/92/13992/2 -- To view, visit https://gerrit.osmocom.org/13992 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6e36c47bf828dd073b36c6301bbeabcc28e101e6 Gerrit-Change-Number: 13992 Gerrit-PatchSet: 2 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: tnt Gerrit-CC: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 14:26:38 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 11 May 2019 14:26:38 +0000 Subject: Change in osmo-msc[master]: libmsc: Make sure to not dereference a NULL trans In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13963 ) Change subject: libmsc: Make sure to not dereference a NULL trans ...................................................................... Patch Set 1: Code-Review+2 In fact this patch is slightly nicer in that it puts the right logging category for the file in LOG_TRANS_CAT(). The other patch will also catches all future NULL trans in LOG_TRANS(). So now I think we should actually merge both. -- To view, visit https://gerrit.osmocom.org/13963 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia14bd28e1db570c487ad8e90e29a69208e2226f2 Gerrit-Change-Number: 13963 Gerrit-PatchSet: 1 Gerrit-Owner: tnt Gerrit-Assignee: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: tnt Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Sat, 11 May 2019 14:26:38 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 14:37:52 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 11 May 2019 14:37:52 +0000 Subject: Change in osmo-msc[master]: libmsc: Make sure to not dereference a NULL trans In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13963 ) Change subject: libmsc: Make sure to not dereference a NULL trans ...................................................................... Patch Set 1: (3 comments) https://gerrit.osmocom.org/#/c/13963/1/src/libmsc/gsm_04_08_cc.c File src/libmsc/gsm_04_08_cc.c: https://gerrit.osmocom.org/#/c/13963/1/src/libmsc/gsm_04_08_cc.c at 1891 PS1, Line 1891: LOG_TRANS_CAT I still think that it makes more sense to use generic LOGP(ss, cat, ...) if we 100% sure that trans is NULL. Neither LOG_TRANS_CAT(), not NULL-safe LOG_TRANS() would give us any useful information in such cases... https://gerrit.osmocom.org/#/c/13963/1/src/libmsc/gsm_04_08_cc.c at 2124 PS1, Line 2124: LOG_TRANS_CAT Same here. https://gerrit.osmocom.org/#/c/13963/1/src/libmsc/gsm_09_11.c File src/libmsc/gsm_09_11.c: https://gerrit.osmocom.org/#/c/13963/1/src/libmsc/gsm_09_11.c at 148 PS1, Line 148: LOG_MSC_A Neels has submitted a change that adds DSS logging category, please see: https://gerrit.osmocom.org/#/c/osmo-msc/+/13942/. -- To view, visit https://gerrit.osmocom.org/13963 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia14bd28e1db570c487ad8e90e29a69208e2226f2 Gerrit-Change-Number: 13963 Gerrit-PatchSet: 1 Gerrit-Owner: tnt Gerrit-Assignee: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: tnt Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Sat, 11 May 2019 14:37:52 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 14:41:22 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 11 May 2019 14:41:22 +0000 Subject: Change in osmo-msc[master]: make LOG_TRANS() NULL-safe again In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13992 ) Change subject: make LOG_TRANS() NULL-safe again ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13992 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6e36c47bf828dd073b36c6301bbeabcc28e101e6 Gerrit-Change-Number: 13992 Gerrit-PatchSet: 2 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-Comment-Date: Sat, 11 May 2019 14:41:22 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 14:57:03 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 11 May 2019 14:57:03 +0000 Subject: Change in osmo-msc[master]: libmsc: Make sure to not dereference a NULL trans In-Reply-To: References: Message-ID: Neels Hofmeyr has uploaded a new patch set (#2) to the change originally created by tnt. ( https://gerrit.osmocom.org/13963 ) Change subject: libmsc: Make sure to not dereference a NULL trans ...................................................................... libmsc: Make sure to not dereference a NULL trans All those were identified by gcc. At this point in the code, trans is NULL and so you can't call LOG_TRANS because it will try to access the log_subsys field. Instead call LOG_TRANS_CAT with manually specified category where applicable (or other logging primitive depending on what the surrounding code does) Change-Id: Ia14bd28e1db570c487ad8e90e29a69208e2226f2 Signed-off-by: Sylvain Munaut Tweaked-by: neels --- M src/libmsc/gsm_04_08_cc.c M src/libmsc/gsm_04_11.c M src/libmsc/gsm_09_11.c M src/libmsc/transaction.c 4 files changed, 15 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/63/13963/2 -- To view, visit https://gerrit.osmocom.org/13963 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia14bd28e1db570c487ad8e90e29a69208e2226f2 Gerrit-Change-Number: 13963 Gerrit-PatchSet: 2 Gerrit-Owner: tnt Gerrit-Assignee: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: tnt Gerrit-CC: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 14:57:28 2019 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 11 May 2019 14:57:28 +0000 Subject: Change in osmo-msc[master]: libmsc: Make sure to not dereference a NULL trans In-Reply-To: References: Message-ID: Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13963 ) Change subject: libmsc: Make sure to not dereference a NULL trans ...................................................................... Patch Set 2: Code-Review+1 I tweaked some places to rather use LOG_MSC_A_CAT() if an msc_a is available... -- To view, visit https://gerrit.osmocom.org/13963 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia14bd28e1db570c487ad8e90e29a69208e2226f2 Gerrit-Change-Number: 13963 Gerrit-PatchSet: 2 Gerrit-Owner: tnt Gerrit-Assignee: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: tnt Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Sat, 11 May 2019 14:57:28 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 18:19:46 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 18:19:46 +0000 Subject: Change in osmo-ccid-firmware[master]: Import libtalloc-2.1.14 into the tree Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13993 Change subject: Import libtalloc-2.1.14 into the tree ...................................................................... Import libtalloc-2.1.14 into the tree talloc is a hirearchical memory allocator which Osmocom uses a lot for its userspace programs on Linux. Experiments show that it's actually very much possible to use it inside of microcontroller firmware projects, particularly the small subset which we generally use. Change-Id: Ibd31b40d5b75b3fc1783a6b02b0e97da430e0f60 --- M sysmoOCTSIM/gcc/Makefile A sysmoOCTSIM/replace.h A sysmoOCTSIM/talloc.c A sysmoOCTSIM/talloc.h 4 files changed, 4,989 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/93/13993/1 diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index cf0484c..2dba3e3 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -79,6 +79,7 @@ hal/src/hal_usb_device.o \ main.o \ manual_test.o \ +talloc.o \ i2c_bitbang.o \ octsim_i2c.o \ ncn8025.o \ @@ -129,6 +130,7 @@ "hal/src/hal_usb_device.o" \ "main.o" \ "manual_test.o" \ +"talloc.o" \ "i2c_bitbang.o" \ "octsim_i2c.o" \ "ncn8025.o" \ @@ -186,6 +188,7 @@ "hpl/osc32kctrl/hpl_osc32kctrl.d" \ "main.d" \ "manual_test.d" \ +"talloc.d" \ "i2c_bitbang.d" \ "octsim_i2c.d" \ "ncn8025.d" \ diff --git a/sysmoOCTSIM/replace.h b/sysmoOCTSIM/replace.h new file mode 100644 index 0000000..711f3a5 --- /dev/null +++ b/sysmoOCTSIM/replace.h @@ -0,0 +1,27 @@ +#pragma once +/* whatever talloc 2.1.14 (from Debian talloc-2.1.14-2) required to build it + * with gcc-arm-none-eabi on a Debian unstable system */ + +#include +#include +#include +#include + +#ifndef _PUBLIC_ +#define _PUBLIC_ __attribute__((visibility("default"))) +#endif + +#ifndef MIN +#define MIN(a,b) ((a)<(b)?(a):(b)) +#endif + +#ifndef MAX +#define MAX(a,b) ((a)>(b)?(a):(b)) +#endif + +#define TALLOC_BUILD_VERSION_MAJOR 2 +#define TALLOC_BUILD_VERSION_MINOR 1 +#define TALLOC_BUILD_VERSION_RELEASE 14 + +#define HAVE_VA_COPY +#define HAVE_CONSTRUCTOR_ATTRIBUTE diff --git a/sysmoOCTSIM/talloc.c b/sysmoOCTSIM/talloc.c new file mode 100644 index 0000000..54be634 --- /dev/null +++ b/sysmoOCTSIM/talloc.c @@ -0,0 +1,3025 @@ +/* + Samba Unix SMB/CIFS implementation. + + Samba trivial allocation library - new interface + + NOTE: Please read talloc_guide.txt for full documentation + + Copyright (C) Andrew Tridgell 2004 + Copyright (C) Stefan Metzmacher 2006 + + ** NOTE! The following LGPL license applies to the talloc + ** library. This does NOT imply that all of Samba is released + ** under the LGPL + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, see . +*/ + +/* + inspired by http://swapped.cc/halloc/ +*/ + +#include "replace.h" +#include "talloc.h" + +#ifdef HAVE_SYS_AUXV_H +#include +#endif + +#if (TALLOC_VERSION_MAJOR != TALLOC_BUILD_VERSION_MAJOR) +#error "TALLOC_VERSION_MAJOR != TALLOC_BUILD_VERSION_MAJOR" +#endif + +#if (TALLOC_VERSION_MINOR != TALLOC_BUILD_VERSION_MINOR) +#error "TALLOC_VERSION_MINOR != TALLOC_BUILD_VERSION_MINOR" +#endif + +/* Special macros that are no-ops except when run under Valgrind on + * x86. They've moved a little bit from valgrind 1.0.4 to 1.9.4 */ +#ifdef HAVE_VALGRIND_MEMCHECK_H + /* memcheck.h includes valgrind.h */ +#include +#elif defined(HAVE_VALGRIND_H) +#include +#endif + +/* use this to force every realloc to change the pointer, to stress test + code that might not cope */ +#define ALWAYS_REALLOC 0 + + +#define MAX_TALLOC_SIZE 0x10000000 + +#define TALLOC_FLAG_FREE 0x01 +#define TALLOC_FLAG_LOOP 0x02 +#define TALLOC_FLAG_POOL 0x04 /* This is a talloc pool */ +#define TALLOC_FLAG_POOLMEM 0x08 /* This is allocated in a pool */ + +/* + * Bits above this are random, used to make it harder to fake talloc + * headers during an attack. Try not to change this without good reason. + */ +#define TALLOC_FLAG_MASK 0x0F + +#define TALLOC_MAGIC_REFERENCE ((const char *)1) + +#define TALLOC_MAGIC_BASE 0xe814ec70 +#define TALLOC_MAGIC_NON_RANDOM ( \ + ~TALLOC_FLAG_MASK & ( \ + TALLOC_MAGIC_BASE + \ + (TALLOC_BUILD_VERSION_MAJOR << 24) + \ + (TALLOC_BUILD_VERSION_MINOR << 16) + \ + (TALLOC_BUILD_VERSION_RELEASE << 8))) +static unsigned int talloc_magic = TALLOC_MAGIC_NON_RANDOM; + +/* by default we abort when given a bad pointer (such as when talloc_free() is called + on a pointer that came from malloc() */ +#ifndef TALLOC_ABORT +#define TALLOC_ABORT(reason) abort() +#endif + +#ifndef discard_const_p +#if defined(__intptr_t_defined) || defined(HAVE_INTPTR_T) +# define discard_const_p(type, ptr) ((type *)((intptr_t)(ptr))) +#else +# define discard_const_p(type, ptr) ((type *)(ptr)) +#endif +#endif + +/* these macros gain us a few percent of speed on gcc */ +#if (__GNUC__ >= 3) +/* the strange !! is to ensure that __builtin_expect() takes either 0 or 1 + as its first argument */ +#ifndef likely +#define likely(x) __builtin_expect(!!(x), 1) +#endif +#ifndef unlikely +#define unlikely(x) __builtin_expect(!!(x), 0) +#endif +#else +#ifndef likely +#define likely(x) (x) +#endif +#ifndef unlikely +#define unlikely(x) (x) +#endif +#endif + +/* this null_context is only used if talloc_enable_leak_report() or + talloc_enable_leak_report_full() is called, otherwise it remains + NULL +*/ +static void *null_context; +static bool talloc_report_null; +static bool talloc_report_null_full; +static void *autofree_context; + +static void talloc_setup_atexit(void); + +/* used to enable fill of memory on free, which can be useful for + * catching use after free errors when valgrind is too slow + */ +static struct { + bool initialised; + bool enabled; + uint8_t fill_value; +} talloc_fill; + +#define TALLOC_FILL_ENV "TALLOC_FREE_FILL" + +/* + * do not wipe the header, to allow the + * double-free logic to still work + */ +#define TC_INVALIDATE_FULL_FILL_CHUNK(_tc) do { \ + if (unlikely(talloc_fill.enabled)) { \ + size_t _flen = (_tc)->size; \ + char *_fptr = (char *)TC_PTR_FROM_CHUNK(_tc); \ + memset(_fptr, talloc_fill.fill_value, _flen); \ + } \ +} while (0) + +#if defined(DEVELOPER) && defined(VALGRIND_MAKE_MEM_NOACCESS) +/* Mark the whole chunk as not accessable */ +#define TC_INVALIDATE_FULL_VALGRIND_CHUNK(_tc) do { \ + size_t _flen = TC_HDR_SIZE + (_tc)->size; \ + char *_fptr = (char *)(_tc); \ + VALGRIND_MAKE_MEM_NOACCESS(_fptr, _flen); \ +} while(0) +#else +#define TC_INVALIDATE_FULL_VALGRIND_CHUNK(_tc) do { } while (0) +#endif + +#define TC_INVALIDATE_FULL_CHUNK(_tc) do { \ + TC_INVALIDATE_FULL_FILL_CHUNK(_tc); \ + TC_INVALIDATE_FULL_VALGRIND_CHUNK(_tc); \ +} while (0) + +#define TC_INVALIDATE_SHRINK_FILL_CHUNK(_tc, _new_size) do { \ + if (unlikely(talloc_fill.enabled)) { \ + size_t _flen = (_tc)->size - (_new_size); \ + char *_fptr = (char *)TC_PTR_FROM_CHUNK(_tc); \ + _fptr += (_new_size); \ + memset(_fptr, talloc_fill.fill_value, _flen); \ + } \ +} while (0) + +#if defined(DEVELOPER) && defined(VALGRIND_MAKE_MEM_NOACCESS) +/* Mark the unused bytes not accessable */ +#define TC_INVALIDATE_SHRINK_VALGRIND_CHUNK(_tc, _new_size) do { \ + size_t _flen = (_tc)->size - (_new_size); \ + char *_fptr = (char *)TC_PTR_FROM_CHUNK(_tc); \ + _fptr += (_new_size); \ + VALGRIND_MAKE_MEM_NOACCESS(_fptr, _flen); \ +} while (0) +#else +#define TC_INVALIDATE_SHRINK_VALGRIND_CHUNK(_tc, _new_size) do { } while (0) +#endif + +#define TC_INVALIDATE_SHRINK_CHUNK(_tc, _new_size) do { \ + TC_INVALIDATE_SHRINK_FILL_CHUNK(_tc, _new_size); \ + TC_INVALIDATE_SHRINK_VALGRIND_CHUNK(_tc, _new_size); \ +} while (0) + +#define TC_UNDEFINE_SHRINK_FILL_CHUNK(_tc, _new_size) do { \ + if (unlikely(talloc_fill.enabled)) { \ + size_t _flen = (_tc)->size - (_new_size); \ + char *_fptr = (char *)TC_PTR_FROM_CHUNK(_tc); \ + _fptr += (_new_size); \ + memset(_fptr, talloc_fill.fill_value, _flen); \ + } \ +} while (0) + +#if defined(DEVELOPER) && defined(VALGRIND_MAKE_MEM_UNDEFINED) +/* Mark the unused bytes as undefined */ +#define TC_UNDEFINE_SHRINK_VALGRIND_CHUNK(_tc, _new_size) do { \ + size_t _flen = (_tc)->size - (_new_size); \ + char *_fptr = (char *)TC_PTR_FROM_CHUNK(_tc); \ + _fptr += (_new_size); \ + VALGRIND_MAKE_MEM_UNDEFINED(_fptr, _flen); \ +} while (0) +#else +#define TC_UNDEFINE_SHRINK_VALGRIND_CHUNK(_tc, _new_size) do { } while (0) +#endif + +#define TC_UNDEFINE_SHRINK_CHUNK(_tc, _new_size) do { \ + TC_UNDEFINE_SHRINK_FILL_CHUNK(_tc, _new_size); \ + TC_UNDEFINE_SHRINK_VALGRIND_CHUNK(_tc, _new_size); \ +} while (0) + +#if defined(DEVELOPER) && defined(VALGRIND_MAKE_MEM_UNDEFINED) +/* Mark the new bytes as undefined */ +#define TC_UNDEFINE_GROW_VALGRIND_CHUNK(_tc, _new_size) do { \ + size_t _old_used = TC_HDR_SIZE + (_tc)->size; \ + size_t _new_used = TC_HDR_SIZE + (_new_size); \ + size_t _flen = _new_used - _old_used; \ + char *_fptr = _old_used + (char *)(_tc); \ + VALGRIND_MAKE_MEM_UNDEFINED(_fptr, _flen); \ +} while (0) +#else +#define TC_UNDEFINE_GROW_VALGRIND_CHUNK(_tc, _new_size) do { } while (0) +#endif + +#define TC_UNDEFINE_GROW_CHUNK(_tc, _new_size) do { \ + TC_UNDEFINE_GROW_VALGRIND_CHUNK(_tc, _new_size); \ +} while (0) + +struct talloc_reference_handle { + struct talloc_reference_handle *next, *prev; + void *ptr; + const char *location; +}; + +struct talloc_memlimit { + struct talloc_chunk *parent; + struct talloc_memlimit *upper; + size_t max_size; + size_t cur_size; +}; + +static inline bool talloc_memlimit_check(struct talloc_memlimit *limit, size_t size); +static inline void talloc_memlimit_grow(struct talloc_memlimit *limit, + size_t size); +static inline void talloc_memlimit_shrink(struct talloc_memlimit *limit, + size_t size); +static inline void tc_memlimit_update_on_free(struct talloc_chunk *tc); + +static inline void _tc_set_name_const(struct talloc_chunk *tc, + const char *name); +static struct talloc_chunk *_vasprintf_tc(const void *t, + const char *fmt, + va_list ap); + +typedef int (*talloc_destructor_t)(void *); + +struct talloc_pool_hdr; + +struct talloc_chunk { + /* + * flags includes the talloc magic, which is randomised to + * make overwrite attacks harder + */ + unsigned flags; + + /* + * If you have a logical tree like: + * + * + * / | \ + * / | \ + * / | \ + * + * + * The actual talloc tree is: + * + * + * | + * - - + * + * The children are linked with next/prev pointers, and + * child 1 is linked to the parent with parent/child + * pointers. + */ + + struct talloc_chunk *next, *prev; + struct talloc_chunk *parent, *child; + struct talloc_reference_handle *refs; + talloc_destructor_t destructor; + const char *name; + size_t size; + + /* + * limit semantics: + * if 'limit' is set it means all *new* children of the context will + * be limited to a total aggregate size ox max_size for memory + * allocations. + * cur_size is used to keep track of the current use + */ + struct talloc_memlimit *limit; + + /* + * For members of a pool (i.e. TALLOC_FLAG_POOLMEM is set), "pool" + * is a pointer to the struct talloc_chunk of the pool that it was + * allocated from. This way children can quickly find the pool to chew + * from. + */ + struct talloc_pool_hdr *pool; +}; + +/* 16 byte alignment seems to keep everyone happy */ +#define TC_ALIGN16(s) (((s)+15)&~15) +#define TC_HDR_SIZE TC_ALIGN16(sizeof(struct talloc_chunk)) +#define TC_PTR_FROM_CHUNK(tc) ((void *)(TC_HDR_SIZE + (char*)tc)) + +_PUBLIC_ int talloc_version_major(void) +{ + return TALLOC_VERSION_MAJOR; +} + +_PUBLIC_ int talloc_version_minor(void) +{ + return TALLOC_VERSION_MINOR; +} + +_PUBLIC_ int talloc_test_get_magic(void) +{ + return talloc_magic; +} + +static inline void _talloc_chunk_set_free(struct talloc_chunk *tc, + const char *location) +{ + /* + * Mark this memory as free, and also over-stamp the talloc + * magic with the old-style magic. + * + * Why? This tries to avoid a memory read use-after-free from + * disclosing our talloc magic, which would then allow an + * attacker to prepare a valid header and so run a destructor. + * + */ + tc->flags = TALLOC_MAGIC_NON_RANDOM | TALLOC_FLAG_FREE + | (tc->flags & TALLOC_FLAG_MASK); + + /* we mark the freed memory with where we called the free + * from. This means on a double free error we can report where + * the first free came from + */ + if (location) { + tc->name = location; + } +} + +static inline void _talloc_chunk_set_not_free(struct talloc_chunk *tc) +{ + /* + * Mark this memory as not free. + * + * Why? This is memory either in a pool (and so available for + * talloc's re-use or after the realloc(). We need to mark + * the memory as free() before any realloc() call as we can't + * write to the memory after that. + * + * We put back the normal magic instead of the 'not random' + * magic. + */ + + tc->flags = talloc_magic | + ((tc->flags & TALLOC_FLAG_MASK) & ~TALLOC_FLAG_FREE); +} + +static void (*talloc_log_fn)(const char *message); + +_PUBLIC_ void talloc_set_log_fn(void (*log_fn)(const char *message)) +{ + talloc_log_fn = log_fn; +} + +#ifdef HAVE_CONSTRUCTOR_ATTRIBUTE +void talloc_lib_init(void) __attribute__((constructor)); +void talloc_lib_init(void) +{ + uint32_t random_value; +#if defined(HAVE_GETAUXVAL) && defined(AT_RANDOM) + uint8_t *p; + /* + * Use the kernel-provided random values used for + * ASLR. This won't change per-exec, which is ideal for us + */ + p = (uint8_t *) getauxval(AT_RANDOM); + if (p) { + /* + * We get 16 bytes from getauxval. By calling rand(), + * a totally insecure PRNG, but one that will + * deterministically have a different value when called + * twice, we ensure that if two talloc-like libraries + * are somehow loaded in the same address space, that + * because we choose different bytes, we will keep the + * protection against collision of multiple talloc + * libs. + * + * This protection is important because the effects of + * passing a talloc pointer from one to the other may + * be very hard to determine. + */ + int offset = rand() % (16 - sizeof(random_value)); + memcpy(&random_value, p + offset, sizeof(random_value)); + } else +#endif + { + /* + * Otherwise, hope the location we are loaded in + * memory is randomised by someone else + */ + random_value = ((uintptr_t)talloc_lib_init & 0xFFFFFFFF); + } + talloc_magic = random_value & ~TALLOC_FLAG_MASK; +} +#else +#warning "No __attribute__((constructor)) support found on this platform, additional talloc security measures not available" +#endif + +static void talloc_lib_atexit(void) +{ + TALLOC_FREE(autofree_context); + + if (talloc_total_size(null_context) == 0) { + return; + } + + if (talloc_report_null_full) { + talloc_report_full(null_context, stderr); + } else if (talloc_report_null) { + talloc_report(null_context, stderr); + } +} + +static void talloc_setup_atexit(void) +{ + static bool done; + + if (done) { + return; + } + + atexit(talloc_lib_atexit); + done = true; +} + +static void talloc_log(const char *fmt, ...) PRINTF_ATTRIBUTE(1,2); +static void talloc_log(const char *fmt, ...) +{ + va_list ap; + char *message; + + if (!talloc_log_fn) { + return; + } + + va_start(ap, fmt); + message = talloc_vasprintf(NULL, fmt, ap); + va_end(ap); + + talloc_log_fn(message); + talloc_free(message); +} + +static void talloc_log_stderr(const char *message) +{ + fprintf(stderr, "%s", message); +} + +_PUBLIC_ void talloc_set_log_stderr(void) +{ + talloc_set_log_fn(talloc_log_stderr); +} + +static void (*talloc_abort_fn)(const char *reason); + +_PUBLIC_ void talloc_set_abort_fn(void (*abort_fn)(const char *reason)) +{ + talloc_abort_fn = abort_fn; +} + +static void talloc_abort(const char *reason) +{ + talloc_log("%s\n", reason); + + if (!talloc_abort_fn) { + TALLOC_ABORT(reason); + } + + talloc_abort_fn(reason); +} + +static void talloc_abort_access_after_free(void) +{ + talloc_abort("Bad talloc magic value - access after free"); +} + +static void talloc_abort_unknown_value(void) +{ + talloc_abort("Bad talloc magic value - unknown value"); +} + +/* panic if we get a bad magic value */ +static inline struct talloc_chunk *talloc_chunk_from_ptr(const void *ptr) +{ + const char *pp = (const char *)ptr; + struct talloc_chunk *tc = discard_const_p(struct talloc_chunk, pp - TC_HDR_SIZE); + if (unlikely((tc->flags & (TALLOC_FLAG_FREE | ~TALLOC_FLAG_MASK)) != talloc_magic)) { + if ((tc->flags & (TALLOC_FLAG_FREE | ~TALLOC_FLAG_MASK)) + == (TALLOC_MAGIC_NON_RANDOM | TALLOC_FLAG_FREE)) { + talloc_log("talloc: access after free error - first free may be at %s\n", tc->name); + talloc_abort_access_after_free(); + return NULL; + } + + talloc_abort_unknown_value(); + return NULL; + } + return tc; +} + +/* hook into the front of the list */ +#define _TLIST_ADD(list, p) \ +do { \ + if (!(list)) { \ + (list) = (p); \ + (p)->next = (p)->prev = NULL; \ + } else { \ + (list)->prev = (p); \ + (p)->next = (list); \ + (p)->prev = NULL; \ + (list) = (p); \ + }\ +} while (0) + +/* remove an element from a list - element doesn't have to be in list. */ +#define _TLIST_REMOVE(list, p) \ +do { \ + if ((p) == (list)) { \ + (list) = (p)->next; \ + if (list) (list)->prev = NULL; \ + } else { \ + if ((p)->prev) (p)->prev->next = (p)->next; \ + if ((p)->next) (p)->next->prev = (p)->prev; \ + } \ + if ((p) && ((p) != (list))) (p)->next = (p)->prev = NULL; \ +} while (0) + + +/* + return the parent chunk of a pointer +*/ +static inline struct talloc_chunk *talloc_parent_chunk(const void *ptr) +{ + struct talloc_chunk *tc; + + if (unlikely(ptr == NULL)) { + return NULL; + } + + tc = talloc_chunk_from_ptr(ptr); + while (tc->prev) tc=tc->prev; + + return tc->parent; +} + +_PUBLIC_ void *talloc_parent(const void *ptr) +{ + struct talloc_chunk *tc = talloc_parent_chunk(ptr); + return tc? TC_PTR_FROM_CHUNK(tc) : NULL; +} + +/* + find parents name +*/ +_PUBLIC_ const char *talloc_parent_name(const void *ptr) +{ + struct talloc_chunk *tc = talloc_parent_chunk(ptr); + return tc? tc->name : NULL; +} + +/* + A pool carries an in-pool object count count in the first 16 bytes. + bytes. This is done to support talloc_steal() to a parent outside of the + pool. The count includes the pool itself, so a talloc_free() on a pool will + only destroy the pool if the count has dropped to zero. A talloc_free() of a + pool member will reduce the count, and eventually also call free(3) on the + pool memory. + + The object count is not put into "struct talloc_chunk" because it is only + relevant for talloc pools and the alignment to 16 bytes would increase the + memory footprint of each talloc chunk by those 16 bytes. +*/ + +struct talloc_pool_hdr { + void *end; + unsigned int object_count; + size_t poolsize; +}; + +#define TP_HDR_SIZE TC_ALIGN16(sizeof(struct talloc_pool_hdr)) + +static inline struct talloc_pool_hdr *talloc_pool_from_chunk(struct talloc_chunk *c) +{ + return (struct talloc_pool_hdr *)((char *)c - TP_HDR_SIZE); +} + +static inline struct talloc_chunk *talloc_chunk_from_pool(struct talloc_pool_hdr *h) +{ + return (struct talloc_chunk *)((char *)h + TP_HDR_SIZE); +} + +static inline void *tc_pool_end(struct talloc_pool_hdr *pool_hdr) +{ + struct talloc_chunk *tc = talloc_chunk_from_pool(pool_hdr); + return (char *)tc + TC_HDR_SIZE + pool_hdr->poolsize; +} + +static inline size_t tc_pool_space_left(struct talloc_pool_hdr *pool_hdr) +{ + return (char *)tc_pool_end(pool_hdr) - (char *)pool_hdr->end; +} + +/* If tc is inside a pool, this gives the next neighbour. */ +static inline void *tc_next_chunk(struct talloc_chunk *tc) +{ + return (char *)tc + TC_ALIGN16(TC_HDR_SIZE + tc->size); +} + +static inline void *tc_pool_first_chunk(struct talloc_pool_hdr *pool_hdr) +{ + struct talloc_chunk *tc = talloc_chunk_from_pool(pool_hdr); + return tc_next_chunk(tc); +} + +/* Mark the whole remaining pool as not accessable */ +static inline void tc_invalidate_pool(struct talloc_pool_hdr *pool_hdr) +{ + size_t flen = tc_pool_space_left(pool_hdr); + + if (unlikely(talloc_fill.enabled)) { + memset(pool_hdr->end, talloc_fill.fill_value, flen); + } + +#if defined(DEVELOPER) && defined(VALGRIND_MAKE_MEM_NOACCESS) + VALGRIND_MAKE_MEM_NOACCESS(pool_hdr->end, flen); +#endif +} + +/* + Allocate from a pool +*/ + +static inline struct talloc_chunk *tc_alloc_pool(struct talloc_chunk *parent, + size_t size, size_t prefix_len) +{ + struct talloc_pool_hdr *pool_hdr = NULL; + size_t space_left; + struct talloc_chunk *result; + size_t chunk_size; + + if (parent == NULL) { + return NULL; + } + + if (parent->flags & TALLOC_FLAG_POOL) { + pool_hdr = talloc_pool_from_chunk(parent); + } + else if (parent->flags & TALLOC_FLAG_POOLMEM) { + pool_hdr = parent->pool; + } + + if (pool_hdr == NULL) { + return NULL; + } + + space_left = tc_pool_space_left(pool_hdr); + + /* + * Align size to 16 bytes + */ + chunk_size = TC_ALIGN16(size + prefix_len); + + if (space_left < chunk_size) { + return NULL; + } + + result = (struct talloc_chunk *)((char *)pool_hdr->end + prefix_len); + +#if defined(DEVELOPER) && defined(VALGRIND_MAKE_MEM_UNDEFINED) + VALGRIND_MAKE_MEM_UNDEFINED(pool_hdr->end, chunk_size); +#endif + + pool_hdr->end = (void *)((char *)pool_hdr->end + chunk_size); + + result->flags = talloc_magic | TALLOC_FLAG_POOLMEM; + result->pool = pool_hdr; + + pool_hdr->object_count++; + + return result; +} + +/* + Allocate a bit of memory as a child of an existing pointer +*/ +static inline void *__talloc_with_prefix(const void *context, + size_t size, + size_t prefix_len, + struct talloc_chunk **tc_ret) +{ + struct talloc_chunk *tc = NULL; + struct talloc_memlimit *limit = NULL; + size_t total_len = TC_HDR_SIZE + size + prefix_len; + struct talloc_chunk *parent = NULL; + + if (unlikely(context == NULL)) { + context = null_context; + } + + if (unlikely(size >= MAX_TALLOC_SIZE)) { + return NULL; + } + + if (unlikely(total_len < TC_HDR_SIZE)) { + return NULL; + } + + if (likely(context != NULL)) { + parent = talloc_chunk_from_ptr(context); + + if (parent->limit != NULL) { + limit = parent->limit; + } + + tc = tc_alloc_pool(parent, TC_HDR_SIZE+size, prefix_len); + } + + if (tc == NULL) { + char *ptr; + + /* + * Only do the memlimit check/update on actual allocation. + */ + if (!talloc_memlimit_check(limit, total_len)) { + errno = ENOMEM; + return NULL; + } + + ptr = malloc(total_len); + if (unlikely(ptr == NULL)) { + return NULL; + } + tc = (struct talloc_chunk *)(ptr + prefix_len); + tc->flags = talloc_magic; + tc->pool = NULL; + + talloc_memlimit_grow(limit, total_len); + } + + tc->limit = limit; + tc->size = size; + tc->destructor = NULL; + tc->child = NULL; + tc->name = NULL; + tc->refs = NULL; + + if (likely(context != NULL)) { + if (parent->child) { + parent->child->parent = NULL; + tc->next = parent->child; + tc->next->prev = tc; + } else { + tc->next = NULL; + } + tc->parent = parent; + tc->prev = NULL; + parent->child = tc; + } else { + tc->next = tc->prev = tc->parent = NULL; + } + + *tc_ret = tc; + return TC_PTR_FROM_CHUNK(tc); +} + +static inline void *__talloc(const void *context, + size_t size, + struct talloc_chunk **tc) +{ + return __talloc_with_prefix(context, size, 0, tc); +} + +/* + * Create a talloc pool + */ + +static inline void *_talloc_pool(const void *context, size_t size) +{ + struct talloc_chunk *tc; + struct talloc_pool_hdr *pool_hdr; + void *result; + + result = __talloc_with_prefix(context, size, TP_HDR_SIZE, &tc); + + if (unlikely(result == NULL)) { + return NULL; + } + + pool_hdr = talloc_pool_from_chunk(tc); + + tc->flags |= TALLOC_FLAG_POOL; + tc->size = 0; + + pool_hdr->object_count = 1; + pool_hdr->end = result; + pool_hdr->poolsize = size; + + tc_invalidate_pool(pool_hdr); + + return result; +} + +_PUBLIC_ void *talloc_pool(const void *context, size_t size) +{ + return _talloc_pool(context, size); +} + +/* + * Create a talloc pool correctly sized for a basic size plus + * a number of subobjects whose total size is given. Essentially + * a custom allocator for talloc to reduce fragmentation. + */ + +_PUBLIC_ void *_talloc_pooled_object(const void *ctx, + size_t type_size, + const char *type_name, + unsigned num_subobjects, + size_t total_subobjects_size) +{ + size_t poolsize, subobjects_slack, tmp; + struct talloc_chunk *tc; + struct talloc_pool_hdr *pool_hdr; + void *ret; + + poolsize = type_size + total_subobjects_size; + + if ((poolsize < type_size) || (poolsize < total_subobjects_size)) { + goto overflow; + } + + if (num_subobjects == UINT_MAX) { + goto overflow; + } + num_subobjects += 1; /* the object body itself */ + + /* + * Alignment can increase the pool size by at most 15 bytes per object + * plus alignment for the object itself + */ + subobjects_slack = (TC_HDR_SIZE + TP_HDR_SIZE + 15) * num_subobjects; + if (subobjects_slack < num_subobjects) { + goto overflow; + } + + tmp = poolsize + subobjects_slack; + if ((tmp < poolsize) || (tmp < subobjects_slack)) { + goto overflow; + } + poolsize = tmp; + + ret = _talloc_pool(ctx, poolsize); + if (ret == NULL) { + return NULL; + } + + tc = talloc_chunk_from_ptr(ret); + tc->size = type_size; + + pool_hdr = talloc_pool_from_chunk(tc); + +#if defined(DEVELOPER) && defined(VALGRIND_MAKE_MEM_UNDEFINED) + VALGRIND_MAKE_MEM_UNDEFINED(pool_hdr->end, type_size); +#endif + + pool_hdr->end = ((char *)pool_hdr->end + TC_ALIGN16(type_size)); + + _tc_set_name_const(tc, type_name); + return ret; + +overflow: + return NULL; +} + +/* + setup a destructor to be called on free of a pointer + the destructor should return 0 on success, or -1 on failure. + if the destructor fails then the free is failed, and the memory can + be continued to be used +*/ +_PUBLIC_ void _talloc_set_destructor(const void *ptr, int (*destructor)(void *)) +{ + struct talloc_chunk *tc = talloc_chunk_from_ptr(ptr); + tc->destructor = destructor; +} + +/* + increase the reference count on a piece of memory. +*/ +_PUBLIC_ int talloc_increase_ref_count(const void *ptr) +{ + if (unlikely(!talloc_reference(null_context, ptr))) { + return -1; + } + return 0; +} + +/* + helper for talloc_reference() + + this is referenced by a function pointer and should not be inline +*/ +static int talloc_reference_destructor(struct talloc_reference_handle *handle) +{ + struct talloc_chunk *ptr_tc = talloc_chunk_from_ptr(handle->ptr); + _TLIST_REMOVE(ptr_tc->refs, handle); + return 0; +} + +/* + more efficient way to add a name to a pointer - the name must point to a + true string constant +*/ +static inline void _tc_set_name_const(struct talloc_chunk *tc, + const char *name) +{ + tc->name = name; +} + +/* + internal talloc_named_const() +*/ +static inline void *_talloc_named_const(const void *context, size_t size, const char *name) +{ + void *ptr; + struct talloc_chunk *tc; + + ptr = __talloc(context, size, &tc); + if (unlikely(ptr == NULL)) { + return NULL; + } + + _tc_set_name_const(tc, name); + + return ptr; +} + +/* + make a secondary reference to a pointer, hanging off the given context. + the pointer remains valid until both the original caller and this given + context are freed. + + the major use for this is when two different structures need to reference the + same underlying data, and you want to be able to free the two instances separately, + and in either order +*/ +_PUBLIC_ void *_talloc_reference_loc(const void *context, const void *ptr, const char *location) +{ + struct talloc_chunk *tc; + struct talloc_reference_handle *handle; + if (unlikely(ptr == NULL)) return NULL; + + tc = talloc_chunk_from_ptr(ptr); + handle = (struct talloc_reference_handle *)_talloc_named_const(context, + sizeof(struct talloc_reference_handle), + TALLOC_MAGIC_REFERENCE); + if (unlikely(handle == NULL)) return NULL; + + /* note that we hang the destructor off the handle, not the + main context as that allows the caller to still setup their + own destructor on the context if they want to */ + talloc_set_destructor(handle, talloc_reference_destructor); + handle->ptr = discard_const_p(void, ptr); + handle->location = location; + _TLIST_ADD(tc->refs, handle); + return handle->ptr; +} + +static void *_talloc_steal_internal(const void *new_ctx, const void *ptr); + +static inline void _tc_free_poolmem(struct talloc_chunk *tc, + const char *location) +{ + struct talloc_pool_hdr *pool; + struct talloc_chunk *pool_tc; + void *next_tc; + + pool = tc->pool; + pool_tc = talloc_chunk_from_pool(pool); + next_tc = tc_next_chunk(tc); + + _talloc_chunk_set_free(tc, location); + + TC_INVALIDATE_FULL_CHUNK(tc); + + if (unlikely(pool->object_count == 0)) { + talloc_abort("Pool object count zero!"); + return; + } + + pool->object_count--; + + if (unlikely(pool->object_count == 1 + && !(pool_tc->flags & TALLOC_FLAG_FREE))) { + /* + * if there is just one object left in the pool + * and pool->flags does not have TALLOC_FLAG_FREE, + * it means this is the pool itself and + * the rest is available for new objects + * again. + */ + pool->end = tc_pool_first_chunk(pool); + tc_invalidate_pool(pool); + return; + } + + if (unlikely(pool->object_count == 0)) { + /* + * we mark the freed memory with where we called the free + * from. This means on a double free error we can report where + * the first free came from + */ + pool_tc->name = location; + + if (pool_tc->flags & TALLOC_FLAG_POOLMEM) { + _tc_free_poolmem(pool_tc, location); + } else { + /* + * The tc_memlimit_update_on_free() + * call takes into account the + * prefix TP_HDR_SIZE allocated before + * the pool talloc_chunk. + */ + tc_memlimit_update_on_free(pool_tc); + TC_INVALIDATE_FULL_CHUNK(pool_tc); + free(pool); + } + return; + } + + if (pool->end == next_tc) { + /* + * if pool->pool still points to end of + * 'tc' (which is stored in the 'next_tc' variable), + * we can reclaim the memory of 'tc'. + */ + pool->end = tc; + return; + } + + /* + * Do nothing. The memory is just "wasted", waiting for the pool + * itself to be freed. + */ +} + +static inline void _tc_free_children_internal(struct talloc_chunk *tc, + void *ptr, + const char *location); + +static inline int _talloc_free_internal(void *ptr, const char *location); + +/* + internal free call that takes a struct talloc_chunk *. +*/ +static inline int _tc_free_internal(struct talloc_chunk *tc, + const char *location) +{ + void *ptr_to_free; + void *ptr = TC_PTR_FROM_CHUNK(tc); + + if (unlikely(tc->refs)) { + int is_child; + /* check if this is a reference from a child or + * grandchild back to it's parent or grandparent + * + * in that case we need to remove the reference and + * call another instance of talloc_free() on the current + * pointer. + */ + is_child = talloc_is_parent(tc->refs, ptr); + _talloc_free_internal(tc->refs, location); + if (is_child) { + return _talloc_free_internal(ptr, location); + } + return -1; + } + + if (unlikely(tc->flags & TALLOC_FLAG_LOOP)) { + /* we have a free loop - stop looping */ + return 0; + } + + if (unlikely(tc->destructor)) { + talloc_destructor_t d = tc->destructor; + + /* + * Protect the destructor against some overwrite + * attacks, by explicitly checking it has the right + * magic here. + */ + if (talloc_chunk_from_ptr(ptr) != tc) { + /* + * This can't actually happen, the + * call itself will panic. + */ + TALLOC_ABORT("talloc_chunk_from_ptr failed!"); + } + + if (d == (talloc_destructor_t)-1) { + return -1; + } + tc->destructor = (talloc_destructor_t)-1; + if (d(ptr) == -1) { + /* + * Only replace the destructor pointer if + * calling the destructor didn't modify it. + */ + if (tc->destructor == (talloc_destructor_t)-1) { + tc->destructor = d; + } + return -1; + } + tc->destructor = NULL; + } + + if (tc->parent) { + _TLIST_REMOVE(tc->parent->child, tc); + if (tc->parent->child) { + tc->parent->child->parent = tc->parent; + } + } else { + if (tc->prev) tc->prev->next = tc->next; + if (tc->next) tc->next->prev = tc->prev; + tc->prev = tc->next = NULL; + } + + tc->flags |= TALLOC_FLAG_LOOP; + + _tc_free_children_internal(tc, ptr, location); + + _talloc_chunk_set_free(tc, location); + + if (tc->flags & TALLOC_FLAG_POOL) { + struct talloc_pool_hdr *pool; + + pool = talloc_pool_from_chunk(tc); + + if (unlikely(pool->object_count == 0)) { + talloc_abort("Pool object count zero!"); + return 0; + } + + pool->object_count--; + + if (likely(pool->object_count != 0)) { + return 0; + } + + /* + * With object_count==0, a pool becomes a normal piece of + * memory to free. If it's allocated inside a pool, it needs + * to be freed as poolmem, else it needs to be just freed. + */ + ptr_to_free = pool; + } else { + ptr_to_free = tc; + } + + if (tc->flags & TALLOC_FLAG_POOLMEM) { + _tc_free_poolmem(tc, location); + return 0; + } + + tc_memlimit_update_on_free(tc); + + TC_INVALIDATE_FULL_CHUNK(tc); + free(ptr_to_free); + return 0; +} + +/* + internal talloc_free call +*/ +static inline int _talloc_free_internal(void *ptr, const char *location) +{ + struct talloc_chunk *tc; + + if (unlikely(ptr == NULL)) { + return -1; + } + + /* possibly initialised the talloc fill value */ + if (unlikely(!talloc_fill.initialised)) { + const char *fill = getenv(TALLOC_FILL_ENV); + if (fill != NULL) { + talloc_fill.enabled = true; + talloc_fill.fill_value = strtoul(fill, NULL, 0); + } + talloc_fill.initialised = true; + } + + tc = talloc_chunk_from_ptr(ptr); + return _tc_free_internal(tc, location); +} + +static inline size_t _talloc_total_limit_size(const void *ptr, + struct talloc_memlimit *old_limit, + struct talloc_memlimit *new_limit); + +/* + move a lump of memory from one talloc context to another return the + ptr on success, or NULL if it could not be transferred. + passing NULL as ptr will always return NULL with no side effects. +*/ +static void *_talloc_steal_internal(const void *new_ctx, const void *ptr) +{ + struct talloc_chunk *tc, *new_tc; + size_t ctx_size = 0; + + if (unlikely(!ptr)) { + return NULL; + } + + if (unlikely(new_ctx == NULL)) { + new_ctx = null_context; + } + + tc = talloc_chunk_from_ptr(ptr); + + if (tc->limit != NULL) { + + ctx_size = _talloc_total_limit_size(ptr, NULL, NULL); + + /* Decrement the memory limit from the source .. */ + talloc_memlimit_shrink(tc->limit->upper, ctx_size); + + if (tc->limit->parent == tc) { + tc->limit->upper = NULL; + } else { + tc->limit = NULL; + } + } + + if (unlikely(new_ctx == NULL)) { + if (tc->parent) { + _TLIST_REMOVE(tc->parent->child, tc); + if (tc->parent->child) { + tc->parent->child->parent = tc->parent; + } + } else { + if (tc->prev) tc->prev->next = tc->next; + if (tc->next) tc->next->prev = tc->prev; + } + + tc->parent = tc->next = tc->prev = NULL; + return discard_const_p(void, ptr); + } + + new_tc = talloc_chunk_from_ptr(new_ctx); + + if (unlikely(tc == new_tc || tc->parent == new_tc)) { + return discard_const_p(void, ptr); + } + + if (tc->parent) { + _TLIST_REMOVE(tc->parent->child, tc); + if (tc->parent->child) { + tc->parent->child->parent = tc->parent; + } + } else { + if (tc->prev) tc->prev->next = tc->next; + if (tc->next) tc->next->prev = tc->prev; + tc->prev = tc->next = NULL; + } + + tc->parent = new_tc; + if (new_tc->child) new_tc->child->parent = NULL; + _TLIST_ADD(new_tc->child, tc); + + if (tc->limit || new_tc->limit) { + ctx_size = _talloc_total_limit_size(ptr, tc->limit, + new_tc->limit); + /* .. and increment it in the destination. */ + if (new_tc->limit) { + talloc_memlimit_grow(new_tc->limit, ctx_size); + } + } + + return discard_const_p(void, ptr); +} + +/* + move a lump of memory from one talloc context to another return the + ptr on success, or NULL if it could not be transferred. + passing NULL as ptr will always return NULL with no side effects. +*/ +_PUBLIC_ void *_talloc_steal_loc(const void *new_ctx, const void *ptr, const char *location) +{ + struct talloc_chunk *tc; + + if (unlikely(ptr == NULL)) { + return NULL; + } + + tc = talloc_chunk_from_ptr(ptr); + + if (unlikely(tc->refs != NULL) && talloc_parent(ptr) != new_ctx) { + struct talloc_reference_handle *h; + + talloc_log("WARNING: talloc_steal with references at %s\n", + location); + + for (h=tc->refs; h; h=h->next) { + talloc_log("\treference at %s\n", + h->location); + } + } + +#if 0 + /* this test is probably too expensive to have on in the + normal build, but it useful for debugging */ + if (talloc_is_parent(new_ctx, ptr)) { + talloc_log("WARNING: stealing into talloc child at %s\n", location); + } +#endif + + return _talloc_steal_internal(new_ctx, ptr); +} + +/* + this is like a talloc_steal(), but you must supply the old + parent. This resolves the ambiguity in a talloc_steal() which is + called on a context that has more than one parent (via references) + + The old parent can be either a reference or a parent +*/ +_PUBLIC_ void *talloc_reparent(const void *old_parent, const void *new_parent, const void *ptr) +{ + struct talloc_chunk *tc; + struct talloc_reference_handle *h; + + if (unlikely(ptr == NULL)) { + return NULL; + } + + if (old_parent == talloc_parent(ptr)) { + return _talloc_steal_internal(new_parent, ptr); + } + + tc = talloc_chunk_from_ptr(ptr); + for (h=tc->refs;h;h=h->next) { + if (talloc_parent(h) == old_parent) { + if (_talloc_steal_internal(new_parent, h) != h) { + return NULL; + } + return discard_const_p(void, ptr); + } + } + + /* it wasn't a parent */ + return NULL; +} + +/* + remove a secondary reference to a pointer. This undo's what + talloc_reference() has done. The context and pointer arguments + must match those given to a talloc_reference() +*/ +static inline int talloc_unreference(const void *context, const void *ptr) +{ + struct talloc_chunk *tc = talloc_chunk_from_ptr(ptr); + struct talloc_reference_handle *h; + + if (unlikely(context == NULL)) { + context = null_context; + } + + for (h=tc->refs;h;h=h->next) { + struct talloc_chunk *p = talloc_parent_chunk(h); + if (p == NULL) { + if (context == NULL) break; + } else if (TC_PTR_FROM_CHUNK(p) == context) { + break; + } + } + if (h == NULL) { + return -1; + } + + return _talloc_free_internal(h, __location__); +} + +/* + remove a specific parent context from a pointer. This is a more + controlled variant of talloc_free() +*/ +_PUBLIC_ int talloc_unlink(const void *context, void *ptr) +{ + struct talloc_chunk *tc_p, *new_p, *tc_c; + void *new_parent; + + if (ptr == NULL) { + return -1; + } + + if (context == NULL) { + context = null_context; + } + + if (talloc_unreference(context, ptr) == 0) { + return 0; + } + + if (context != NULL) { + tc_c = talloc_chunk_from_ptr(context); + } else { + tc_c = NULL; + } + if (tc_c != talloc_parent_chunk(ptr)) { + return -1; + } + + tc_p = talloc_chunk_from_ptr(ptr); + + if (tc_p->refs == NULL) { + return _talloc_free_internal(ptr, __location__); + } + + new_p = talloc_parent_chunk(tc_p->refs); + if (new_p) { + new_parent = TC_PTR_FROM_CHUNK(new_p); + } else { + new_parent = NULL; + } + + if (talloc_unreference(new_parent, ptr) != 0) { + return -1; + } + + _talloc_steal_internal(new_parent, ptr); + + return 0; +} + +/* + add a name to an existing pointer - va_list version +*/ +static inline const char *tc_set_name_v(struct talloc_chunk *tc, + const char *fmt, + va_list ap) PRINTF_ATTRIBUTE(2,0); + +static inline const char *tc_set_name_v(struct talloc_chunk *tc, + const char *fmt, + va_list ap) +{ + struct talloc_chunk *name_tc = _vasprintf_tc(TC_PTR_FROM_CHUNK(tc), + fmt, + ap); + if (likely(name_tc)) { + tc->name = TC_PTR_FROM_CHUNK(name_tc); + _tc_set_name_const(name_tc, ".name"); + } else { + tc->name = NULL; + } + return tc->name; +} + +/* + add a name to an existing pointer +*/ +_PUBLIC_ const char *talloc_set_name(const void *ptr, const char *fmt, ...) +{ + struct talloc_chunk *tc = talloc_chunk_from_ptr(ptr); + const char *name; + va_list ap; + va_start(ap, fmt); + name = tc_set_name_v(tc, fmt, ap); + va_end(ap); + return name; +} + + +/* + create a named talloc pointer. Any talloc pointer can be named, and + talloc_named() operates just like talloc() except that it allows you + to name the pointer. +*/ +_PUBLIC_ void *talloc_named(const void *context, size_t size, const char *fmt, ...) +{ + va_list ap; + void *ptr; + const char *name; + struct talloc_chunk *tc; + + ptr = __talloc(context, size, &tc); + if (unlikely(ptr == NULL)) return NULL; + + va_start(ap, fmt); + name = tc_set_name_v(tc, fmt, ap); + va_end(ap); + + if (unlikely(name == NULL)) { + _talloc_free_internal(ptr, __location__); + return NULL; + } + + return ptr; +} + +/* + return the name of a talloc ptr, or "UNNAMED" +*/ +static inline const char *__talloc_get_name(const void *ptr) +{ + struct talloc_chunk *tc = talloc_chunk_from_ptr(ptr); + if (unlikely(tc->name == TALLOC_MAGIC_REFERENCE)) { + return ".reference"; + } + if (likely(tc->name)) { + return tc->name; + } + return "UNNAMED"; +} + +_PUBLIC_ const char *talloc_get_name(const void *ptr) +{ + return __talloc_get_name(ptr); +} + +/* + check if a pointer has the given name. If it does, return the pointer, + otherwise return NULL +*/ +_PUBLIC_ void *talloc_check_name(const void *ptr, const char *name) +{ + const char *pname; + if (unlikely(ptr == NULL)) return NULL; + pname = __talloc_get_name(ptr); + if (likely(pname == name || strcmp(pname, name) == 0)) { + return discard_const_p(void, ptr); + } + return NULL; +} + +static void talloc_abort_type_mismatch(const char *location, + const char *name, + const char *expected) +{ + const char *reason; + + reason = talloc_asprintf(NULL, + "%s: Type mismatch: name[%s] expected[%s]", + location, + name?name:"NULL", + expected); + if (!reason) { + reason = "Type mismatch"; + } + + talloc_abort(reason); +} + +_PUBLIC_ void *_talloc_get_type_abort(const void *ptr, const char *name, const char *location) +{ + const char *pname; + + if (unlikely(ptr == NULL)) { + talloc_abort_type_mismatch(location, NULL, name); + return NULL; + } + + pname = __talloc_get_name(ptr); + if (likely(pname == name || strcmp(pname, name) == 0)) { + return discard_const_p(void, ptr); + } + + talloc_abort_type_mismatch(location, pname, name); + return NULL; +} + +/* + this is for compatibility with older versions of talloc +*/ +_PUBLIC_ void *talloc_init(const char *fmt, ...) +{ + va_list ap; + void *ptr; + const char *name; + struct talloc_chunk *tc; + + ptr = __talloc(NULL, 0, &tc); + if (unlikely(ptr == NULL)) return NULL; + + va_start(ap, fmt); + name = tc_set_name_v(tc, fmt, ap); + va_end(ap); + + if (unlikely(name == NULL)) { + _talloc_free_internal(ptr, __location__); + return NULL; + } + + return ptr; +} + +static inline void _tc_free_children_internal(struct talloc_chunk *tc, + void *ptr, + const char *location) +{ + while (tc->child) { + /* we need to work out who will own an abandoned child + if it cannot be freed. In priority order, the first + choice is owner of any remaining reference to this + pointer, the second choice is our parent, and the + final choice is the null context. */ + void *child = TC_PTR_FROM_CHUNK(tc->child); + const void *new_parent = null_context; + if (unlikely(tc->child->refs)) { + struct talloc_chunk *p = talloc_parent_chunk(tc->child->refs); + if (p) new_parent = TC_PTR_FROM_CHUNK(p); + } + if (unlikely(_tc_free_internal(tc->child, location) == -1)) { + if (talloc_parent_chunk(child) != tc) { + /* + * Destructor already reparented this child. + * No further reparenting needed. + */ + continue; + } + if (new_parent == null_context) { + struct talloc_chunk *p = talloc_parent_chunk(ptr); + if (p) new_parent = TC_PTR_FROM_CHUNK(p); + } + _talloc_steal_internal(new_parent, child); + } + } +} + +/* + this is a replacement for the Samba3 talloc_destroy_pool functionality. It + should probably not be used in new code. It's in here to keep the talloc + code consistent across Samba 3 and 4. +*/ +_PUBLIC_ void talloc_free_children(void *ptr) +{ + struct talloc_chunk *tc_name = NULL; + struct talloc_chunk *tc; + + if (unlikely(ptr == NULL)) { + return; + } + + tc = talloc_chunk_from_ptr(ptr); + + /* we do not want to free the context name if it is a child .. */ + if (likely(tc->child)) { + for (tc_name = tc->child; tc_name; tc_name = tc_name->next) { + if (tc->name == TC_PTR_FROM_CHUNK(tc_name)) break; + } + if (tc_name) { + _TLIST_REMOVE(tc->child, tc_name); + if (tc->child) { + tc->child->parent = tc; + } + } + } + + _tc_free_children_internal(tc, ptr, __location__); + + /* .. so we put it back after all other children have been freed */ + if (tc_name) { + if (tc->child) { + tc->child->parent = NULL; + } + tc_name->parent = tc; + _TLIST_ADD(tc->child, tc_name); + } +} + +/* + Allocate a bit of memory as a child of an existing pointer +*/ +_PUBLIC_ void *_talloc(const void *context, size_t size) +{ + struct talloc_chunk *tc; + return __talloc(context, size, &tc); +} + +/* + externally callable talloc_set_name_const() +*/ +_PUBLIC_ void talloc_set_name_const(const void *ptr, const char *name) +{ + _tc_set_name_const(talloc_chunk_from_ptr(ptr), name); +} + +/* + create a named talloc pointer. Any talloc pointer can be named, and + talloc_named() operates just like talloc() except that it allows you + to name the pointer. +*/ +_PUBLIC_ void *talloc_named_const(const void *context, size_t size, const char *name) +{ + return _talloc_named_const(context, size, name); +} + +/* + free a talloc pointer. This also frees all child pointers of this + pointer recursively + + return 0 if the memory is actually freed, otherwise -1. The memory + will not be freed if the ref_count is > 1 or the destructor (if + any) returns non-zero +*/ +_PUBLIC_ int _talloc_free(void *ptr, const char *location) +{ + struct talloc_chunk *tc; + + if (unlikely(ptr == NULL)) { + return -1; + } + + tc = talloc_chunk_from_ptr(ptr); + + if (unlikely(tc->refs != NULL)) { + struct talloc_reference_handle *h; + + if (talloc_parent(ptr) == null_context && tc->refs->next == NULL) { + /* in this case we do know which parent should + get this pointer, as there is really only + one parent */ + return talloc_unlink(null_context, ptr); + } + + talloc_log("ERROR: talloc_free with references at %s\n", + location); + + for (h=tc->refs; h; h=h->next) { + talloc_log("\treference at %s\n", + h->location); + } + return -1; + } + + return _talloc_free_internal(ptr, location); +} + + + +/* + A talloc version of realloc. The context argument is only used if + ptr is NULL +*/ +_PUBLIC_ void *_talloc_realloc(const void *context, void *ptr, size_t size, const char *name) +{ + struct talloc_chunk *tc; + void *new_ptr; + bool malloced = false; + struct talloc_pool_hdr *pool_hdr = NULL; + size_t old_size = 0; + size_t new_size = 0; + + /* size zero is equivalent to free() */ + if (unlikely(size == 0)) { + talloc_unlink(context, ptr); + return NULL; + } + + if (unlikely(size >= MAX_TALLOC_SIZE)) { + return NULL; + } + + /* realloc(NULL) is equivalent to malloc() */ + if (ptr == NULL) { + return _talloc_named_const(context, size, name); + } + + tc = talloc_chunk_from_ptr(ptr); + + /* don't allow realloc on referenced pointers */ + if (unlikely(tc->refs)) { + return NULL; + } + + /* don't let anybody try to realloc a talloc_pool */ + if (unlikely(tc->flags & TALLOC_FLAG_POOL)) { + return NULL; + } + + if (tc->limit && (size > tc->size)) { + if (!talloc_memlimit_check(tc->limit, (size - tc->size))) { + errno = ENOMEM; + return NULL; + } + } + + /* handle realloc inside a talloc_pool */ + if (unlikely(tc->flags & TALLOC_FLAG_POOLMEM)) { + pool_hdr = tc->pool; + } + +#if (ALWAYS_REALLOC == 0) + /* don't shrink if we have less than 1k to gain */ + if (size < tc->size && tc->limit == NULL) { + if (pool_hdr) { + void *next_tc = tc_next_chunk(tc); + TC_INVALIDATE_SHRINK_CHUNK(tc, size); + tc->size = size; + if (next_tc == pool_hdr->end) { + /* note: tc->size has changed, so this works */ + pool_hdr->end = tc_next_chunk(tc); + } + return ptr; + } else if ((tc->size - size) < 1024) { + /* + * if we call TC_INVALIDATE_SHRINK_CHUNK() here + * we would need to call TC_UNDEFINE_GROW_CHUNK() + * after each realloc call, which slows down + * testing a lot :-(. + * + * That is why we only mark memory as undefined here. + */ + TC_UNDEFINE_SHRINK_CHUNK(tc, size); + + /* do not shrink if we have less than 1k to gain */ + tc->size = size; + return ptr; + } + } else if (tc->size == size) { + /* + * do not change the pointer if it is exactly + * the same size. + */ + return ptr; + } +#endif + + /* + * by resetting magic we catch users of the old memory + * + * We mark this memory as free, and also over-stamp the talloc + * magic with the old-style magic. + * + * Why? This tries to avoid a memory read use-after-free from + * disclosing our talloc magic, which would then allow an + * attacker to prepare a valid header and so run a destructor. + * + * What else? We have to re-stamp back a valid normal magic + * on this memory once realloc() is done, as it will have done + * a memcpy() into the new valid memory. We can't do this in + * reverse as that would be a real use-after-free. + */ + _talloc_chunk_set_free(tc, NULL); + +#if ALWAYS_REALLOC + if (pool_hdr) { + new_ptr = tc_alloc_pool(tc, size + TC_HDR_SIZE, 0); + pool_hdr->object_count--; + + if (new_ptr == NULL) { + new_ptr = malloc(TC_HDR_SIZE+size); + malloced = true; + new_size = size; + } + + if (new_ptr) { + memcpy(new_ptr, tc, MIN(tc->size,size) + TC_HDR_SIZE); + TC_INVALIDATE_FULL_CHUNK(tc); + } + } else { + /* We're doing malloc then free here, so record the difference. */ + old_size = tc->size; + new_size = size; + new_ptr = malloc(size + TC_HDR_SIZE); + if (new_ptr) { + memcpy(new_ptr, tc, MIN(tc->size, size) + TC_HDR_SIZE); + free(tc); + } + } +#else + if (pool_hdr) { + struct talloc_chunk *pool_tc; + void *next_tc = tc_next_chunk(tc); + size_t old_chunk_size = TC_ALIGN16(TC_HDR_SIZE + tc->size); + size_t new_chunk_size = TC_ALIGN16(TC_HDR_SIZE + size); + size_t space_needed; + size_t space_left; + unsigned int chunk_count = pool_hdr->object_count; + + pool_tc = talloc_chunk_from_pool(pool_hdr); + if (!(pool_tc->flags & TALLOC_FLAG_FREE)) { + chunk_count -= 1; + } + + if (chunk_count == 1) { + /* + * optimize for the case where 'tc' is the only + * chunk in the pool. + */ + char *start = tc_pool_first_chunk(pool_hdr); + space_needed = new_chunk_size; + space_left = (char *)tc_pool_end(pool_hdr) - start; + + if (space_left >= space_needed) { + size_t old_used = TC_HDR_SIZE + tc->size; + size_t new_used = TC_HDR_SIZE + size; + new_ptr = start; + +#if defined(DEVELOPER) && defined(VALGRIND_MAKE_MEM_UNDEFINED) + { + /* + * The area from + * start -> tc may have + * been freed and thus been marked as + * VALGRIND_MEM_NOACCESS. Set it to + * VALGRIND_MEM_UNDEFINED so we can + * copy into it without valgrind errors. + * We can't just mark + * new_ptr -> new_ptr + old_used + * as this may overlap on top of tc, + * (which is why we use memmove, not + * memcpy below) hence the MIN. + */ + size_t undef_len = MIN((((char *)tc) - ((char *)new_ptr)),old_used); + VALGRIND_MAKE_MEM_UNDEFINED(new_ptr, undef_len); + } +#endif + + memmove(new_ptr, tc, old_used); + + tc = (struct talloc_chunk *)new_ptr; + TC_UNDEFINE_GROW_CHUNK(tc, size); + + /* + * first we do not align the pool pointer + * because we want to invalidate the padding + * too. + */ + pool_hdr->end = new_used + (char *)new_ptr; + tc_invalidate_pool(pool_hdr); + + /* now the aligned pointer */ + pool_hdr->end = new_chunk_size + (char *)new_ptr; + goto got_new_ptr; + } + + next_tc = NULL; + } + + if (new_chunk_size == old_chunk_size) { + TC_UNDEFINE_GROW_CHUNK(tc, size); + _talloc_chunk_set_not_free(tc); + tc->size = size; + return ptr; + } + + if (next_tc == pool_hdr->end) { + /* + * optimize for the case where 'tc' is the last + * chunk in the pool. + */ + space_needed = new_chunk_size - old_chunk_size; + space_left = tc_pool_space_left(pool_hdr); + + if (space_left >= space_needed) { + TC_UNDEFINE_GROW_CHUNK(tc, size); + _talloc_chunk_set_not_free(tc); + tc->size = size; + pool_hdr->end = tc_next_chunk(tc); + return ptr; + } + } + + new_ptr = tc_alloc_pool(tc, size + TC_HDR_SIZE, 0); + + if (new_ptr == NULL) { + new_ptr = malloc(TC_HDR_SIZE+size); + malloced = true; + new_size = size; + } + + if (new_ptr) { + memcpy(new_ptr, tc, MIN(tc->size,size) + TC_HDR_SIZE); + + _tc_free_poolmem(tc, __location__ "_talloc_realloc"); + } + } + else { + /* We're doing realloc here, so record the difference. */ + old_size = tc->size; + new_size = size; + new_ptr = realloc(tc, size + TC_HDR_SIZE); + } +got_new_ptr: +#endif + if (unlikely(!new_ptr)) { + /* + * Ok, this is a strange spot. We have to put back + * the old talloc_magic and any flags, except the + * TALLOC_FLAG_FREE as this was not free'ed by the + * realloc() call after all + */ + _talloc_chunk_set_not_free(tc); + return NULL; + } + + /* + * tc is now the new value from realloc(), the old memory we + * can't access any more and was preemptively marked as + * TALLOC_FLAG_FREE before the call. Now we mark it as not + * free again + */ + tc = (struct talloc_chunk *)new_ptr; + _talloc_chunk_set_not_free(tc); + if (malloced) { + tc->flags &= ~TALLOC_FLAG_POOLMEM; + } + if (tc->parent) { + tc->parent->child = tc; + } + if (tc->child) { + tc->child->parent = tc; + } + + if (tc->prev) { + tc->prev->next = tc; + } + if (tc->next) { + tc->next->prev = tc; + } + + if (new_size > old_size) { + talloc_memlimit_grow(tc->limit, new_size - old_size); + } else if (new_size < old_size) { + talloc_memlimit_shrink(tc->limit, old_size - new_size); + } + + tc->size = size; + _tc_set_name_const(tc, name); + + return TC_PTR_FROM_CHUNK(tc); +} + +/* + a wrapper around talloc_steal() for situations where you are moving a pointer + between two structures, and want the old pointer to be set to NULL +*/ +_PUBLIC_ void *_talloc_move(const void *new_ctx, const void *_pptr) +{ + const void **pptr = discard_const_p(const void *,_pptr); + void *ret = talloc_steal(new_ctx, discard_const_p(void, *pptr)); + (*pptr) = NULL; + return ret; +} + +enum talloc_mem_count_type { + TOTAL_MEM_SIZE, + TOTAL_MEM_BLOCKS, + TOTAL_MEM_LIMIT, +}; + +static inline size_t _talloc_total_mem_internal(const void *ptr, + enum talloc_mem_count_type type, + struct talloc_memlimit *old_limit, + struct talloc_memlimit *new_limit) +{ + size_t total = 0; + struct talloc_chunk *c, *tc; + + if (ptr == NULL) { + ptr = null_context; + } + if (ptr == NULL) { + return 0; + } + + tc = talloc_chunk_from_ptr(ptr); + + if (old_limit || new_limit) { + if (tc->limit && tc->limit->upper == old_limit) { + tc->limit->upper = new_limit; + } + } + + /* optimize in the memlimits case */ + if (type == TOTAL_MEM_LIMIT && + tc->limit != NULL && + tc->limit != old_limit && + tc->limit->parent == tc) { + return tc->limit->cur_size; + } + + if (tc->flags & TALLOC_FLAG_LOOP) { + return 0; + } + + tc->flags |= TALLOC_FLAG_LOOP; + + if (old_limit || new_limit) { + if (old_limit == tc->limit) { + tc->limit = new_limit; + } + } + + switch (type) { + case TOTAL_MEM_SIZE: + if (likely(tc->name != TALLOC_MAGIC_REFERENCE)) { + total = tc->size; + } + break; + case TOTAL_MEM_BLOCKS: + total++; + break; + case TOTAL_MEM_LIMIT: + if (likely(tc->name != TALLOC_MAGIC_REFERENCE)) { + /* + * Don't count memory allocated from a pool + * when calculating limits. Only count the + * pool itself. + */ + if (!(tc->flags & TALLOC_FLAG_POOLMEM)) { + if (tc->flags & TALLOC_FLAG_POOL) { + /* + * If this is a pool, the allocated + * size is in the pool header, and + * remember to add in the prefix + * length. + */ + struct talloc_pool_hdr *pool_hdr + = talloc_pool_from_chunk(tc); + total = pool_hdr->poolsize + + TC_HDR_SIZE + + TP_HDR_SIZE; + } else { + total = tc->size + TC_HDR_SIZE; + } + } + } + break; + } + for (c = tc->child; c; c = c->next) { + total += _talloc_total_mem_internal(TC_PTR_FROM_CHUNK(c), type, + old_limit, new_limit); + } + + tc->flags &= ~TALLOC_FLAG_LOOP; + + return total; +} + +/* + return the total size of a talloc pool (subtree) +*/ +_PUBLIC_ size_t talloc_total_size(const void *ptr) +{ + return _talloc_total_mem_internal(ptr, TOTAL_MEM_SIZE, NULL, NULL); +} + +/* + return the total number of blocks in a talloc pool (subtree) +*/ +_PUBLIC_ size_t talloc_total_blocks(const void *ptr) +{ + return _talloc_total_mem_internal(ptr, TOTAL_MEM_BLOCKS, NULL, NULL); +} + +/* + return the number of external references to a pointer +*/ +_PUBLIC_ size_t talloc_reference_count(const void *ptr) +{ + struct talloc_chunk *tc = talloc_chunk_from_ptr(ptr); + struct talloc_reference_handle *h; + size_t ret = 0; + + for (h=tc->refs;h;h=h->next) { + ret++; + } + return ret; +} + +/* + report on memory usage by all children of a pointer, giving a full tree view +*/ +_PUBLIC_ void talloc_report_depth_cb(const void *ptr, int depth, int max_depth, + void (*callback)(const void *ptr, + int depth, int max_depth, + int is_ref, + void *private_data), + void *private_data) +{ + struct talloc_chunk *c, *tc; + + if (ptr == NULL) { + ptr = null_context; + } + if (ptr == NULL) return; + + tc = talloc_chunk_from_ptr(ptr); + + if (tc->flags & TALLOC_FLAG_LOOP) { + return; + } + + callback(ptr, depth, max_depth, 0, private_data); + + if (max_depth >= 0 && depth >= max_depth) { + return; + } + + tc->flags |= TALLOC_FLAG_LOOP; + for (c=tc->child;c;c=c->next) { + if (c->name == TALLOC_MAGIC_REFERENCE) { + struct talloc_reference_handle *h = (struct talloc_reference_handle *)TC_PTR_FROM_CHUNK(c); + callback(h->ptr, depth + 1, max_depth, 1, private_data); + } else { + talloc_report_depth_cb(TC_PTR_FROM_CHUNK(c), depth + 1, max_depth, callback, private_data); + } + } + tc->flags &= ~TALLOC_FLAG_LOOP; +} + +static void talloc_report_depth_FILE_helper(const void *ptr, int depth, int max_depth, int is_ref, void *_f) +{ + const char *name = __talloc_get_name(ptr); + struct talloc_chunk *tc; + FILE *f = (FILE *)_f; + + if (is_ref) { + fprintf(f, "%*sreference to: %s\n", depth*4, "", name); + return; + } + + tc = talloc_chunk_from_ptr(ptr); + if (tc->limit && tc->limit->parent == tc) { + fprintf(f, "%*s%-30s is a memlimit context" + " (max_size = %lu bytes, cur_size = %lu bytes)\n", + depth*4, "", + name, + (unsigned long)tc->limit->max_size, + (unsigned long)tc->limit->cur_size); + } + + if (depth == 0) { + fprintf(f,"%stalloc report on '%s' (total %6lu bytes in %3lu blocks)\n", + (max_depth < 0 ? "full " :""), name, + (unsigned long)talloc_total_size(ptr), + (unsigned long)talloc_total_blocks(ptr)); + return; + } + + fprintf(f, "%*s%-30s contains %6lu bytes in %3lu blocks (ref %d) %p\n", + depth*4, "", + name, + (unsigned long)talloc_total_size(ptr), + (unsigned long)talloc_total_blocks(ptr), + (int)talloc_reference_count(ptr), ptr); + +#if 0 + fprintf(f, "content: "); + if (talloc_total_size(ptr)) { + int tot = talloc_total_size(ptr); + int i; + + for (i = 0; i < tot; i++) { + if ((((char *)ptr)[i] > 31) && (((char *)ptr)[i] < 126)) { + fprintf(f, "%c", ((char *)ptr)[i]); + } else { + fprintf(f, "~%02x", ((char *)ptr)[i]); + } + } + } + fprintf(f, "\n"); +#endif +} + +/* + report on memory usage by all children of a pointer, giving a full tree view +*/ +_PUBLIC_ void talloc_report_depth_file(const void *ptr, int depth, int max_depth, FILE *f) +{ + if (f) { + talloc_report_depth_cb(ptr, depth, max_depth, talloc_report_depth_FILE_helper, f); + fflush(f); + } +} + +/* + report on memory usage by all children of a pointer, giving a full tree view +*/ +_PUBLIC_ void talloc_report_full(const void *ptr, FILE *f) +{ + talloc_report_depth_file(ptr, 0, -1, f); +} + +/* + report on memory usage by all children of a pointer +*/ +_PUBLIC_ void talloc_report(const void *ptr, FILE *f) +{ + talloc_report_depth_file(ptr, 0, 1, f); +} + +/* + enable tracking of the NULL context +*/ +_PUBLIC_ void talloc_enable_null_tracking(void) +{ + if (null_context == NULL) { + null_context = _talloc_named_const(NULL, 0, "null_context"); + if (autofree_context != NULL) { + talloc_reparent(NULL, null_context, autofree_context); + } + } +} + +/* + enable tracking of the NULL context, not moving the autofree context + into the NULL context. This is needed for the talloc testsuite +*/ +_PUBLIC_ void talloc_enable_null_tracking_no_autofree(void) +{ + if (null_context == NULL) { + null_context = _talloc_named_const(NULL, 0, "null_context"); + } +} + +/* + disable tracking of the NULL context +*/ +_PUBLIC_ void talloc_disable_null_tracking(void) +{ + if (null_context != NULL) { + /* we have to move any children onto the real NULL + context */ + struct talloc_chunk *tc, *tc2; + tc = talloc_chunk_from_ptr(null_context); + for (tc2 = tc->child; tc2; tc2=tc2->next) { + if (tc2->parent == tc) tc2->parent = NULL; + if (tc2->prev == tc) tc2->prev = NULL; + } + for (tc2 = tc->next; tc2; tc2=tc2->next) { + if (tc2->parent == tc) tc2->parent = NULL; + if (tc2->prev == tc) tc2->prev = NULL; + } + tc->child = NULL; + tc->next = NULL; + } + talloc_free(null_context); + null_context = NULL; +} + +/* + enable leak reporting on exit +*/ +_PUBLIC_ void talloc_enable_leak_report(void) +{ + talloc_enable_null_tracking(); + talloc_report_null = true; + talloc_setup_atexit(); +} + +/* + enable full leak reporting on exit +*/ +_PUBLIC_ void talloc_enable_leak_report_full(void) +{ + talloc_enable_null_tracking(); + talloc_report_null_full = true; + talloc_setup_atexit(); +} + +/* + talloc and zero memory. +*/ +_PUBLIC_ void *_talloc_zero(const void *ctx, size_t size, const char *name) +{ + void *p = _talloc_named_const(ctx, size, name); + + if (p) { + memset(p, '\0', size); + } + + return p; +} + +/* + memdup with a talloc. +*/ +_PUBLIC_ void *_talloc_memdup(const void *t, const void *p, size_t size, const char *name) +{ + void *newp = _talloc_named_const(t, size, name); + + if (likely(newp)) { + memcpy(newp, p, size); + } + + return newp; +} + +static inline char *__talloc_strlendup(const void *t, const char *p, size_t len) +{ + char *ret; + struct talloc_chunk *tc; + + ret = (char *)__talloc(t, len + 1, &tc); + if (unlikely(!ret)) return NULL; + + memcpy(ret, p, len); + ret[len] = 0; + + _tc_set_name_const(tc, ret); + return ret; +} + +/* + strdup with a talloc +*/ +_PUBLIC_ char *talloc_strdup(const void *t, const char *p) +{ + if (unlikely(!p)) return NULL; + return __talloc_strlendup(t, p, strlen(p)); +} + +/* + strndup with a talloc +*/ +_PUBLIC_ char *talloc_strndup(const void *t, const char *p, size_t n) +{ + if (unlikely(!p)) return NULL; + return __talloc_strlendup(t, p, strnlen(p, n)); +} + +static inline char *__talloc_strlendup_append(char *s, size_t slen, + const char *a, size_t alen) +{ + char *ret; + + ret = talloc_realloc(NULL, s, char, slen + alen + 1); + if (unlikely(!ret)) return NULL; + + /* append the string and the trailing \0 */ + memcpy(&ret[slen], a, alen); + ret[slen+alen] = 0; + + _tc_set_name_const(talloc_chunk_from_ptr(ret), ret); + return ret; +} + +/* + * Appends at the end of the string. + */ +_PUBLIC_ char *talloc_strdup_append(char *s, const char *a) +{ + if (unlikely(!s)) { + return talloc_strdup(NULL, a); + } + + if (unlikely(!a)) { + return s; + } + + return __talloc_strlendup_append(s, strlen(s), a, strlen(a)); +} + +/* + * Appends at the end of the talloc'ed buffer, + * not the end of the string. + */ +_PUBLIC_ char *talloc_strdup_append_buffer(char *s, const char *a) +{ + size_t slen; + + if (unlikely(!s)) { + return talloc_strdup(NULL, a); + } + + if (unlikely(!a)) { + return s; + } + + slen = talloc_get_size(s); + if (likely(slen > 0)) { + slen--; + } + + return __talloc_strlendup_append(s, slen, a, strlen(a)); +} + +/* + * Appends at the end of the string. + */ +_PUBLIC_ char *talloc_strndup_append(char *s, const char *a, size_t n) +{ + if (unlikely(!s)) { + return talloc_strndup(NULL, a, n); + } + + if (unlikely(!a)) { + return s; + } + + return __talloc_strlendup_append(s, strlen(s), a, strnlen(a, n)); +} + +/* + * Appends at the end of the talloc'ed buffer, + * not the end of the string. + */ +_PUBLIC_ char *talloc_strndup_append_buffer(char *s, const char *a, size_t n) +{ + size_t slen; + + if (unlikely(!s)) { + return talloc_strndup(NULL, a, n); + } + + if (unlikely(!a)) { + return s; + } + + slen = talloc_get_size(s); + if (likely(slen > 0)) { + slen--; + } + + return __talloc_strlendup_append(s, slen, a, strnlen(a, n)); +} + +#ifndef HAVE_VA_COPY +#ifdef HAVE___VA_COPY +#define va_copy(dest, src) __va_copy(dest, src) +#else +#define va_copy(dest, src) (dest) = (src) +#endif +#endif + +static struct talloc_chunk *_vasprintf_tc(const void *t, + const char *fmt, + va_list ap) PRINTF_ATTRIBUTE(2,0); + +static struct talloc_chunk *_vasprintf_tc(const void *t, + const char *fmt, + va_list ap) +{ + int vlen; + size_t len; + char *ret; + va_list ap2; + struct talloc_chunk *tc; + char buf[1024]; + + /* this call looks strange, but it makes it work on older solaris boxes */ + va_copy(ap2, ap); + vlen = vsnprintf(buf, sizeof(buf), fmt, ap2); + va_end(ap2); + if (unlikely(vlen < 0)) { + return NULL; + } + len = vlen; + if (unlikely(len + 1 < len)) { + return NULL; + } + + ret = (char *)__talloc(t, len+1, &tc); + if (unlikely(!ret)) return NULL; + + if (len < sizeof(buf)) { + memcpy(ret, buf, len+1); + } else { + va_copy(ap2, ap); + vsnprintf(ret, len+1, fmt, ap2); + va_end(ap2); + } + + _tc_set_name_const(tc, ret); + return tc; +} + +_PUBLIC_ char *talloc_vasprintf(const void *t, const char *fmt, va_list ap) +{ + struct talloc_chunk *tc = _vasprintf_tc(t, fmt, ap); + if (tc == NULL) { + return NULL; + } + return TC_PTR_FROM_CHUNK(tc); +} + + +/* + Perform string formatting, and return a pointer to newly allocated + memory holding the result, inside a memory pool. + */ +_PUBLIC_ char *talloc_asprintf(const void *t, const char *fmt, ...) +{ + va_list ap; + char *ret; + + va_start(ap, fmt); + ret = talloc_vasprintf(t, fmt, ap); + va_end(ap); + return ret; +} + +static inline char *__talloc_vaslenprintf_append(char *s, size_t slen, + const char *fmt, va_list ap) + PRINTF_ATTRIBUTE(3,0); + +static inline char *__talloc_vaslenprintf_append(char *s, size_t slen, + const char *fmt, va_list ap) +{ + ssize_t alen; + va_list ap2; + char c; + + va_copy(ap2, ap); + alen = vsnprintf(&c, 1, fmt, ap2); + va_end(ap2); + + if (alen <= 0) { + /* Either the vsnprintf failed or the format resulted in + * no characters being formatted. In the former case, we + * ought to return NULL, in the latter we ought to return + * the original string. Most current callers of this + * function expect it to never return NULL. + */ + return s; + } + + s = talloc_realloc(NULL, s, char, slen + alen + 1); + if (!s) return NULL; + + va_copy(ap2, ap); + vsnprintf(s + slen, alen + 1, fmt, ap2); + va_end(ap2); + + _tc_set_name_const(talloc_chunk_from_ptr(s), s); + return s; +} + +/** + * Realloc @p s to append the formatted result of @p fmt and @p ap, + * and return @p s, which may have moved. Good for gradually + * accumulating output into a string buffer. Appends at the end + * of the string. + **/ +_PUBLIC_ char *talloc_vasprintf_append(char *s, const char *fmt, va_list ap) +{ + if (unlikely(!s)) { + return talloc_vasprintf(NULL, fmt, ap); + } + + return __talloc_vaslenprintf_append(s, strlen(s), fmt, ap); +} + +/** + * Realloc @p s to append the formatted result of @p fmt and @p ap, + * and return @p s, which may have moved. Always appends at the + * end of the talloc'ed buffer, not the end of the string. + **/ +_PUBLIC_ char *talloc_vasprintf_append_buffer(char *s, const char *fmt, va_list ap) +{ + size_t slen; + + if (unlikely(!s)) { + return talloc_vasprintf(NULL, fmt, ap); + } + + slen = talloc_get_size(s); + if (likely(slen > 0)) { + slen--; + } + + return __talloc_vaslenprintf_append(s, slen, fmt, ap); +} + +/* + Realloc @p s to append the formatted result of @p fmt and return @p + s, which may have moved. Good for gradually accumulating output + into a string buffer. + */ +_PUBLIC_ char *talloc_asprintf_append(char *s, const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + s = talloc_vasprintf_append(s, fmt, ap); + va_end(ap); + return s; +} + +/* + Realloc @p s to append the formatted result of @p fmt and return @p + s, which may have moved. Good for gradually accumulating output + into a buffer. + */ +_PUBLIC_ char *talloc_asprintf_append_buffer(char *s, const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + s = talloc_vasprintf_append_buffer(s, fmt, ap); + va_end(ap); + return s; +} + +/* + alloc an array, checking for integer overflow in the array size +*/ +_PUBLIC_ void *_talloc_array(const void *ctx, size_t el_size, unsigned count, const char *name) +{ + if (count >= MAX_TALLOC_SIZE/el_size) { + return NULL; + } + return _talloc_named_const(ctx, el_size * count, name); +} + +/* + alloc an zero array, checking for integer overflow in the array size +*/ +_PUBLIC_ void *_talloc_zero_array(const void *ctx, size_t el_size, unsigned count, const char *name) +{ + if (count >= MAX_TALLOC_SIZE/el_size) { + return NULL; + } + return _talloc_zero(ctx, el_size * count, name); +} + +/* + realloc an array, checking for integer overflow in the array size +*/ +_PUBLIC_ void *_talloc_realloc_array(const void *ctx, void *ptr, size_t el_size, unsigned count, const char *name) +{ + if (count >= MAX_TALLOC_SIZE/el_size) { + return NULL; + } + return _talloc_realloc(ctx, ptr, el_size * count, name); +} + +/* + a function version of talloc_realloc(), so it can be passed as a function pointer + to libraries that want a realloc function (a realloc function encapsulates + all the basic capabilities of an allocation library, which is why this is useful) +*/ +_PUBLIC_ void *talloc_realloc_fn(const void *context, void *ptr, size_t size) +{ + return _talloc_realloc(context, ptr, size, NULL); +} + + +static int talloc_autofree_destructor(void *ptr) +{ + autofree_context = NULL; + return 0; +} + +/* + return a context which will be auto-freed on exit + this is useful for reducing the noise in leak reports +*/ +_PUBLIC_ void *talloc_autofree_context(void) +{ + if (autofree_context == NULL) { + autofree_context = _talloc_named_const(NULL, 0, "autofree_context"); + talloc_set_destructor(autofree_context, talloc_autofree_destructor); + talloc_setup_atexit(); + } + return autofree_context; +} + +_PUBLIC_ size_t talloc_get_size(const void *context) +{ + struct talloc_chunk *tc; + + if (context == NULL) { + return 0; + } + + tc = talloc_chunk_from_ptr(context); + + return tc->size; +} + +/* + find a parent of this context that has the given name, if any +*/ +_PUBLIC_ void *talloc_find_parent_byname(const void *context, const char *name) +{ + struct talloc_chunk *tc; + + if (context == NULL) { + return NULL; + } + + tc = talloc_chunk_from_ptr(context); + while (tc) { + if (tc->name && strcmp(tc->name, name) == 0) { + return TC_PTR_FROM_CHUNK(tc); + } + while (tc && tc->prev) tc = tc->prev; + if (tc) { + tc = tc->parent; + } + } + return NULL; +} + +/* + show the parentage of a context +*/ +_PUBLIC_ void talloc_show_parents(const void *context, FILE *file) +{ + struct talloc_chunk *tc; + + if (context == NULL) { + fprintf(file, "talloc no parents for NULL\n"); + return; + } + + tc = talloc_chunk_from_ptr(context); + fprintf(file, "talloc parents of '%s'\n", __talloc_get_name(context)); + while (tc) { + fprintf(file, "\t'%s'\n", __talloc_get_name(TC_PTR_FROM_CHUNK(tc))); + while (tc && tc->prev) tc = tc->prev; + if (tc) { + tc = tc->parent; + } + } + fflush(file); +} + +/* + return 1 if ptr is a parent of context +*/ +static int _talloc_is_parent(const void *context, const void *ptr, int depth) +{ + struct talloc_chunk *tc; + + if (context == NULL) { + return 0; + } + + tc = talloc_chunk_from_ptr(context); + while (tc) { + if (depth <= 0) { + return 0; + } + if (TC_PTR_FROM_CHUNK(tc) == ptr) return 1; + while (tc && tc->prev) tc = tc->prev; + if (tc) { + tc = tc->parent; + depth--; + } + } + return 0; +} + +/* + return 1 if ptr is a parent of context +*/ +_PUBLIC_ int talloc_is_parent(const void *context, const void *ptr) +{ + return _talloc_is_parent(context, ptr, TALLOC_MAX_DEPTH); +} + +/* + return the total size of memory used by this context and all children +*/ +static inline size_t _talloc_total_limit_size(const void *ptr, + struct talloc_memlimit *old_limit, + struct talloc_memlimit *new_limit) +{ + return _talloc_total_mem_internal(ptr, TOTAL_MEM_LIMIT, + old_limit, new_limit); +} + +static inline bool talloc_memlimit_check(struct talloc_memlimit *limit, size_t size) +{ + struct talloc_memlimit *l; + + for (l = limit; l != NULL; l = l->upper) { + if (l->max_size != 0 && + ((l->max_size <= l->cur_size) || + (l->max_size - l->cur_size < size))) { + return false; + } + } + + return true; +} + +/* + Update memory limits when freeing a talloc_chunk. +*/ +static void tc_memlimit_update_on_free(struct talloc_chunk *tc) +{ + size_t limit_shrink_size; + + if (!tc->limit) { + return; + } + + /* + * Pool entries don't count. Only the pools + * themselves are counted as part of the memory + * limits. Note that this also takes care of + * nested pools which have both flags + * TALLOC_FLAG_POOLMEM|TALLOC_FLAG_POOL set. + */ + if (tc->flags & TALLOC_FLAG_POOLMEM) { + return; + } + + /* + * If we are part of a memory limited context hierarchy + * we need to subtract the memory used from the counters + */ + + limit_shrink_size = tc->size+TC_HDR_SIZE; + + /* + * If we're deallocating a pool, take into + * account the prefix size added for the pool. + */ + + if (tc->flags & TALLOC_FLAG_POOL) { + limit_shrink_size += TP_HDR_SIZE; + } + + talloc_memlimit_shrink(tc->limit, limit_shrink_size); + + if (tc->limit->parent == tc) { + free(tc->limit); + } + + tc->limit = NULL; +} + +/* + Increase memory limit accounting after a malloc/realloc. +*/ +static void talloc_memlimit_grow(struct talloc_memlimit *limit, + size_t size) +{ + struct talloc_memlimit *l; + + for (l = limit; l != NULL; l = l->upper) { + size_t new_cur_size = l->cur_size + size; + if (new_cur_size < l->cur_size) { + talloc_abort("logic error in talloc_memlimit_grow\n"); + return; + } + l->cur_size = new_cur_size; + } +} + +/* + Decrease memory limit accounting after a free/realloc. +*/ +static void talloc_memlimit_shrink(struct talloc_memlimit *limit, + size_t size) +{ + struct talloc_memlimit *l; + + for (l = limit; l != NULL; l = l->upper) { + if (l->cur_size < size) { + talloc_abort("logic error in talloc_memlimit_shrink\n"); + return; + } + l->cur_size = l->cur_size - size; + } +} + +_PUBLIC_ int talloc_set_memlimit(const void *ctx, size_t max_size) +{ + struct talloc_chunk *tc = talloc_chunk_from_ptr(ctx); + struct talloc_memlimit *orig_limit; + struct talloc_memlimit *limit = NULL; + + if (tc->limit && tc->limit->parent == tc) { + tc->limit->max_size = max_size; + return 0; + } + orig_limit = tc->limit; + + limit = malloc(sizeof(struct talloc_memlimit)); + if (limit == NULL) { + return 1; + } + limit->parent = tc; + limit->max_size = max_size; + limit->cur_size = _talloc_total_limit_size(ctx, tc->limit, limit); + + if (orig_limit) { + limit->upper = orig_limit; + } else { + limit->upper = NULL; + } + + return 0; +} diff --git a/sysmoOCTSIM/talloc.h b/sysmoOCTSIM/talloc.h new file mode 100644 index 0000000..7372df1 --- /dev/null +++ b/sysmoOCTSIM/talloc.h @@ -0,0 +1,1934 @@ +#ifndef _TALLOC_H_ +#define _TALLOC_H_ +/* + Unix SMB/CIFS implementation. + Samba temporary memory allocation functions + + Copyright (C) Andrew Tridgell 2004-2005 + Copyright (C) Stefan Metzmacher 2006 + + ** NOTE! The following LGPL license applies to the talloc + ** library. This does NOT imply that all of Samba is released + ** under the LGPL + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, see . +*/ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @defgroup talloc The talloc API + * + * talloc is a hierarchical, reference counted memory pool system with + * destructors. It is the core memory allocator used in Samba. + * + * @{ + */ + +#define TALLOC_VERSION_MAJOR 2 +#define TALLOC_VERSION_MINOR 1 + +int talloc_version_major(void); +int talloc_version_minor(void); +/* This is mostly useful only for testing */ +int talloc_test_get_magic(void); + +/** + * @brief Define a talloc parent type + * + * As talloc is a hierarchial memory allocator, every talloc chunk is a + * potential parent to other talloc chunks. So defining a separate type for a + * talloc chunk is not strictly necessary. TALLOC_CTX is defined nevertheless, + * as it provides an indicator for function arguments. You will frequently + * write code like + * + * @code + * struct foo *foo_create(TALLOC_CTX *mem_ctx) + * { + * struct foo *result; + * result = talloc(mem_ctx, struct foo); + * if (result == NULL) return NULL; + * ... initialize foo ... + * return result; + * } + * @endcode + * + * In this type of allocating functions it is handy to have a general + * TALLOC_CTX type to indicate which parent to put allocated structures on. + */ +typedef void TALLOC_CTX; + +/* + this uses a little trick to allow __LINE__ to be stringified +*/ +#ifndef __location__ +#define __TALLOC_STRING_LINE1__(s) #s +#define __TALLOC_STRING_LINE2__(s) __TALLOC_STRING_LINE1__(s) +#define __TALLOC_STRING_LINE3__ __TALLOC_STRING_LINE2__(__LINE__) +#define __location__ __FILE__ ":" __TALLOC_STRING_LINE3__ +#endif + +#ifndef TALLOC_DEPRECATED +#define TALLOC_DEPRECATED 0 +#endif + +#ifndef PRINTF_ATTRIBUTE +#if (__GNUC__ >= 3) +/** Use gcc attribute to check printf fns. a1 is the 1-based index of + * the parameter containing the format, and a2 the index of the first + * argument. Note that some gcc 2.x versions don't handle this + * properly **/ +#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2))) +#else +#define PRINTF_ATTRIBUTE(a1, a2) +#endif +#endif + +#ifdef DOXYGEN +/** + * @brief Create a new talloc context. + * + * The talloc() macro is the core of the talloc library. It takes a memory + * context and a type, and returns a pointer to a new area of memory of the + * given type. + * + * The returned pointer is itself a talloc context, so you can use it as the + * context argument to more calls to talloc if you wish. + * + * The returned pointer is a "child" of the supplied context. This means that if + * you talloc_free() the context then the new child disappears as well. + * Alternatively you can free just the child. + * + * @param[in] ctx A talloc context to create a new reference on or NULL to + * create a new top level context. + * + * @param[in] type The type of memory to allocate. + * + * @return A type casted talloc context or NULL on error. + * + * @code + * unsigned int *a, *b; + * + * a = talloc(NULL, unsigned int); + * b = talloc(a, unsigned int); + * @endcode + * + * @see talloc_zero + * @see talloc_array + * @see talloc_steal + * @see talloc_free + */ +void *talloc(const void *ctx, #type); +#else +#define talloc(ctx, type) (type *)talloc_named_const(ctx, sizeof(type), #type) +void *_talloc(const void *context, size_t size); +#endif + +/** + * @brief Create a new top level talloc context. + * + * This function creates a zero length named talloc context as a top level + * context. It is equivalent to: + * + * @code + * talloc_named(NULL, 0, fmt, ...); + * @endcode + * @param[in] fmt Format string for the name. + * + * @param[in] ... Additional printf-style arguments. + * + * @return The allocated memory chunk, NULL on error. + * + * @see talloc_named() + */ +void *talloc_init(const char *fmt, ...) PRINTF_ATTRIBUTE(1,2); + +#ifdef DOXYGEN +/** + * @brief Free a chunk of talloc memory. + * + * The talloc_free() function frees a piece of talloc memory, and all its + * children. You can call talloc_free() on any pointer returned by + * talloc(). + * + * The return value of talloc_free() indicates success or failure, with 0 + * returned for success and -1 for failure. A possible failure condition + * is if the pointer had a destructor attached to it and the destructor + * returned -1. See talloc_set_destructor() for details on + * destructors. Likewise, if "ptr" is NULL, then the function will make + * no modifications and return -1. + * + * From version 2.0 and onwards, as a special case, talloc_free() is + * refused on pointers that have more than one parent associated, as talloc + * would have no way of knowing which parent should be removed. This is + * different from older versions in the sense that always the reference to + * the most recently established parent has been destroyed. Hence to free a + * pointer that has more than one parent please use talloc_unlink(). + * + * To help you find problems in your code caused by this behaviour, if + * you do try and free a pointer with more than one parent then the + * talloc logging function will be called to give output like this: + * + * @code + * ERROR: talloc_free with references at some_dir/source/foo.c:123 + * reference at some_dir/source/other.c:325 + * reference at some_dir/source/third.c:121 + * @endcode + * + * Please see the documentation for talloc_set_log_fn() and + * talloc_set_log_stderr() for more information on talloc logging + * functions. + * + * If TALLOC_FREE_FILL environment variable is set, + * the memory occupied by the context is filled with the value of this variable. + * The value should be a numeric representation of the character you want to + * use. + * + * talloc_free() operates recursively on its children. + * + * @param[in] ptr The chunk to be freed. + * + * @return Returns 0 on success and -1 on error. A possible + * failure condition is if the pointer had a destructor + * attached to it and the destructor returned -1. Likewise, + * if "ptr" is NULL, then the function will make no + * modifications and returns -1. + * + * Example: + * @code + * unsigned int *a, *b; + * a = talloc(NULL, unsigned int); + * b = talloc(a, unsigned int); + * + * talloc_free(a); // Frees a and b + * @endcode + * + * @see talloc_set_destructor() + * @see talloc_unlink() + */ +int talloc_free(void *ptr); +#else +#define talloc_free(ctx) _talloc_free(ctx, __location__) +int _talloc_free(void *ptr, const char *location); +#endif + +/** + * @brief Free a talloc chunk's children. + * + * The function walks along the list of all children of a talloc context and + * talloc_free()s only the children, not the context itself. + * + * A NULL argument is handled as no-op. + * + * @param[in] ptr The chunk that you want to free the children of + * (NULL is allowed too) + */ +void talloc_free_children(void *ptr); + +#ifdef DOXYGEN +/** + * @brief Assign a destructor function to be called when a chunk is freed. + * + * The function talloc_set_destructor() sets the "destructor" for the pointer + * "ptr". A destructor is a function that is called when the memory used by a + * pointer is about to be released. The destructor receives the pointer as an + * argument, and should return 0 for success and -1 for failure. + * + * The destructor can do anything it wants to, including freeing other pieces + * of memory. A common use for destructors is to clean up operating system + * resources (such as open file descriptors) contained in the structure the + * destructor is placed on. + * + * You can only place one destructor on a pointer. If you need more than one + * destructor then you can create a zero-length child of the pointer and place + * an additional destructor on that. + * + * To remove a destructor call talloc_set_destructor() with NULL for the + * destructor. + * + * If your destructor attempts to talloc_free() the pointer that it is the + * destructor for then talloc_free() will return -1 and the free will be + * ignored. This would be a pointless operation anyway, as the destructor is + * only called when the memory is just about to go away. + * + * @param[in] ptr The talloc chunk to add a destructor to. + * + * @param[in] destructor The destructor function to be called. NULL to remove + * it. + * + * Example: + * @code + * static int destroy_fd(int *fd) { + * close(*fd); + * return 0; + * } + * + * int *open_file(const char *filename) { + * int *fd = talloc(NULL, int); + * *fd = open(filename, O_RDONLY); + * if (*fd < 0) { + * talloc_free(fd); + * return NULL; + * } + * // Whenever they free this, we close the file. + * talloc_set_destructor(fd, destroy_fd); + * return fd; + * } + * @endcode + * + * @see talloc() + * @see talloc_free() + */ +void talloc_set_destructor(const void *ptr, int (*destructor)(void *)); + +/** + * @brief Change a talloc chunk's parent. + * + * The talloc_steal() function changes the parent context of a talloc + * pointer. It is typically used when the context that the pointer is + * currently a child of is going to be freed and you wish to keep the + * memory for a longer time. + * + * To make the changed hierarchy less error-prone, you might consider to use + * talloc_move(). + * + * If you try and call talloc_steal() on a pointer that has more than one + * parent then the result is ambiguous. Talloc will choose to remove the + * parent that is currently indicated by talloc_parent() and replace it with + * the chosen parent. You will also get a message like this via the talloc + * logging functions: + * + * @code + * WARNING: talloc_steal with references at some_dir/source/foo.c:123 + * reference at some_dir/source/other.c:325 + * reference at some_dir/source/third.c:121 + * @endcode + * + * To unambiguously change the parent of a pointer please see the function + * talloc_reparent(). See the talloc_set_log_fn() documentation for more + * information on talloc logging. + * + * @param[in] new_ctx The new parent context. + * + * @param[in] ptr The talloc chunk to move. + * + * @return Returns the pointer that you pass it. It does not have + * any failure modes. + * + * @note It is possible to produce loops in the parent/child relationship + * if you are not careful with talloc_steal(). No guarantees are provided + * as to your sanity or the safety of your data if you do this. + */ +void *talloc_steal(const void *new_ctx, const void *ptr); +#else /* DOXYGEN */ +/* try to make talloc_set_destructor() and talloc_steal() type safe, + if we have a recent gcc */ +#if (__GNUC__ >= 3) +#define _TALLOC_TYPEOF(ptr) __typeof__(ptr) +#define talloc_set_destructor(ptr, function) \ + do { \ + int (*_talloc_destructor_fn)(_TALLOC_TYPEOF(ptr)) = (function); \ + _talloc_set_destructor((ptr), (int (*)(void *))_talloc_destructor_fn); \ + } while(0) +/* this extremely strange macro is to avoid some braindamaged warning + stupidity in gcc 4.1.x */ +#define talloc_steal(ctx, ptr) ({ _TALLOC_TYPEOF(ptr) __talloc_steal_ret = (_TALLOC_TYPEOF(ptr))_talloc_steal_loc((ctx),(ptr), __location__); __talloc_steal_ret; }) +#else /* __GNUC__ >= 3 */ +#define talloc_set_destructor(ptr, function) \ + _talloc_set_destructor((ptr), (int (*)(void *))(function)) +#define _TALLOC_TYPEOF(ptr) void * +#define talloc_steal(ctx, ptr) (_TALLOC_TYPEOF(ptr))_talloc_steal_loc((ctx),(ptr), __location__) +#endif /* __GNUC__ >= 3 */ +void _talloc_set_destructor(const void *ptr, int (*_destructor)(void *)); +void *_talloc_steal_loc(const void *new_ctx, const void *ptr, const char *location); +#endif /* DOXYGEN */ + +/** + * @brief Assign a name to a talloc chunk. + * + * Each talloc pointer has a "name". The name is used principally for + * debugging purposes, although it is also possible to set and get the name on + * a pointer in as a way of "marking" pointers in your code. + * + * The main use for names on pointer is for "talloc reports". See + * talloc_report() and talloc_report_full() for details. Also see + * talloc_enable_leak_report() and talloc_enable_leak_report_full(). + * + * The talloc_set_name() function allocates memory as a child of the + * pointer. It is logically equivalent to: + * + * @code + * talloc_set_name_const(ptr, talloc_asprintf(ptr, fmt, ...)); + * @endcode + * + * @param[in] ptr The talloc chunk to assign a name to. + * + * @param[in] fmt Format string for the name. + * + * @param[in] ... Add printf-style additional arguments. + * + * @return The assigned name, NULL on error. + * + * @note Multiple calls to talloc_set_name() will allocate more memory without + * releasing the name. All of the memory is released when the ptr is freed + * using talloc_free(). + */ +const char *talloc_set_name(const void *ptr, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3); + +#ifdef DOXYGEN +/** + * @brief Change a talloc chunk's parent. + * + * This function has the same effect as talloc_steal(), and additionally sets + * the source pointer to NULL. You would use it like this: + * + * @code + * struct foo *X = talloc(tmp_ctx, struct foo); + * struct foo *Y; + * Y = talloc_move(new_ctx, &X); + * @endcode + * + * @param[in] new_ctx The new parent context. + * + * @param[in] pptr Pointer to a pointer to the talloc chunk to move. + * + * @return The pointer to the talloc chunk that moved. + * It does not have any failure modes. + * + */ +void *talloc_move(const void *new_ctx, void **pptr); +#else +#define talloc_move(ctx, pptr) (_TALLOC_TYPEOF(*(pptr)))_talloc_move((ctx),(void *)(pptr)) +void *_talloc_move(const void *new_ctx, const void *pptr); +#endif + +/** + * @brief Assign a name to a talloc chunk. + * + * The function is just like talloc_set_name(), but it takes a string constant, + * and is much faster. It is extensively used by the "auto naming" macros, such + * as talloc_p(). + * + * This function does not allocate any memory. It just copies the supplied + * pointer into the internal representation of the talloc ptr. This means you + * must not pass a name pointer to memory that will disappear before the ptr + * is freed with talloc_free(). + * + * @param[in] ptr The talloc chunk to assign a name to. + * + * @param[in] name Format string for the name. + */ +void talloc_set_name_const(const void *ptr, const char *name); + +/** + * @brief Create a named talloc chunk. + * + * The talloc_named() function creates a named talloc pointer. It is + * equivalent to: + * + * @code + * ptr = talloc_size(context, size); + * talloc_set_name(ptr, fmt, ....); + * @endcode + * + * @param[in] context The talloc context to hang the result off. + * + * @param[in] size Number of char's that you want to allocate. + * + * @param[in] fmt Format string for the name. + * + * @param[in] ... Additional printf-style arguments. + * + * @return The allocated memory chunk, NULL on error. + * + * @see talloc_set_name() + */ +void *talloc_named(const void *context, size_t size, + const char *fmt, ...) PRINTF_ATTRIBUTE(3,4); + +/** + * @brief Basic routine to allocate a chunk of memory. + * + * This is equivalent to: + * + * @code + * ptr = talloc_size(context, size); + * talloc_set_name_const(ptr, name); + * @endcode + * + * @param[in] context The parent context. + * + * @param[in] size The number of char's that we want to allocate. + * + * @param[in] name The name the talloc block has. + * + * @return The allocated memory chunk, NULL on error. + */ +void *talloc_named_const(const void *context, size_t size, const char *name); + +#ifdef DOXYGEN +/** + * @brief Untyped allocation. + * + * The function should be used when you don't have a convenient type to pass to + * talloc(). Unlike talloc(), it is not type safe (as it returns a void *), so + * you are on your own for type checking. + * + * Best to use talloc() or talloc_array() instead. + * + * @param[in] ctx The talloc context to hang the result off. + * + * @param[in] size Number of char's that you want to allocate. + * + * @return The allocated memory chunk, NULL on error. + * + * Example: + * @code + * void *mem = talloc_size(NULL, 100); + * @endcode + */ +void *talloc_size(const void *ctx, size_t size); +#else +#define talloc_size(ctx, size) talloc_named_const(ctx, size, __location__) +#endif + +#ifdef DOXYGEN +/** + * @brief Allocate into a typed pointer. + * + * The talloc_ptrtype() macro should be used when you have a pointer and want + * to allocate memory to point at with this pointer. When compiling with + * gcc >= 3 it is typesafe. Note this is a wrapper of talloc_size() and + * talloc_get_name() will return the current location in the source file and + * not the type. + * + * @param[in] ctx The talloc context to hang the result off. + * + * @param[in] type The pointer you want to assign the result to. + * + * @return The properly casted allocated memory chunk, NULL on + * error. + * + * Example: + * @code + * unsigned int *a = talloc_ptrtype(NULL, a); + * @endcode + */ +void *talloc_ptrtype(const void *ctx, #type); +#else +#define talloc_ptrtype(ctx, ptr) (_TALLOC_TYPEOF(ptr))talloc_size(ctx, sizeof(*(ptr))) +#endif + +#ifdef DOXYGEN +/** + * @brief Allocate a new 0-sized talloc chunk. + * + * This is a utility macro that creates a new memory context hanging off an + * existing context, automatically naming it "talloc_new: __location__" where + * __location__ is the source line it is called from. It is particularly + * useful for creating a new temporary working context. + * + * @param[in] ctx The talloc parent context. + * + * @return A new talloc chunk, NULL on error. + */ +void *talloc_new(const void *ctx); +#else +#define talloc_new(ctx) talloc_named_const(ctx, 0, "talloc_new: " __location__) +#endif + +#ifdef DOXYGEN +/** + * @brief Allocate a 0-initizialized structure. + * + * The macro is equivalent to: + * + * @code + * ptr = talloc(ctx, type); + * if (ptr) memset(ptr, 0, sizeof(type)); + * @endcode + * + * @param[in] ctx The talloc context to hang the result off. + * + * @param[in] type The type that we want to allocate. + * + * @return Pointer to a piece of memory, properly cast to 'type *', + * NULL on error. + * + * Example: + * @code + * unsigned int *a, *b; + * a = talloc_zero(NULL, unsigned int); + * b = talloc_zero(a, unsigned int); + * @endcode + * + * @see talloc() + * @see talloc_zero_size() + * @see talloc_zero_array() + */ +void *talloc_zero(const void *ctx, #type); + +/** + * @brief Allocate untyped, 0-initialized memory. + * + * @param[in] ctx The talloc context to hang the result off. + * + * @param[in] size Number of char's that you want to allocate. + * + * @return The allocated memory chunk. + */ +void *talloc_zero_size(const void *ctx, size_t size); +#else +#define talloc_zero(ctx, type) (type *)_talloc_zero(ctx, sizeof(type), #type) +#define talloc_zero_size(ctx, size) _talloc_zero(ctx, size, __location__) +void *_talloc_zero(const void *ctx, size_t size, const char *name); +#endif + +/** + * @brief Return the name of a talloc chunk. + * + * @param[in] ptr The talloc chunk. + * + * @return The current name for the given talloc pointer. + * + * @see talloc_set_name() + */ +const char *talloc_get_name(const void *ptr); + +/** + * @brief Verify that a talloc chunk carries a specified name. + * + * This function checks if a pointer has the specified name. If it does + * then the pointer is returned. + * + * @param[in] ptr The talloc chunk to check. + * + * @param[in] name The name to check against. + * + * @return The pointer if the name matches, NULL if it doesn't. + */ +void *talloc_check_name(const void *ptr, const char *name); + +/** + * @brief Get the parent chunk of a pointer. + * + * @param[in] ptr The talloc pointer to inspect. + * + * @return The talloc parent of ptr, NULL on error. + */ +void *talloc_parent(const void *ptr); + +/** + * @brief Get a talloc chunk's parent name. + * + * @param[in] ptr The talloc pointer to inspect. + * + * @return The name of ptr's parent chunk. + */ +const char *talloc_parent_name(const void *ptr); + +/** + * @brief Get the total size of a talloc chunk including its children. + * + * The function returns the total size in bytes used by this pointer and all + * child pointers. Mostly useful for debugging. + * + * Passing NULL is allowed, but it will only give a meaningful result if + * talloc_enable_leak_report() or talloc_enable_leak_report_full() has + * been called. + * + * @param[in] ptr The talloc chunk. + * + * @return The total size. + */ +size_t talloc_total_size(const void *ptr); + +/** + * @brief Get the number of talloc chunks hanging off a chunk. + * + * The talloc_total_blocks() function returns the total memory block + * count used by this pointer and all child pointers. Mostly useful for + * debugging. + * + * Passing NULL is allowed, but it will only give a meaningful result if + * talloc_enable_leak_report() or talloc_enable_leak_report_full() has + * been called. + * + * @param[in] ptr The talloc chunk. + * + * @return The total size. + */ +size_t talloc_total_blocks(const void *ptr); + +#ifdef DOXYGEN +/** + * @brief Duplicate a memory area into a talloc chunk. + * + * The function is equivalent to: + * + * @code + * ptr = talloc_size(ctx, size); + * if (ptr) memcpy(ptr, p, size); + * @endcode + * + * @param[in] t The talloc context to hang the result off. + * + * @param[in] p The memory chunk you want to duplicate. + * + * @param[in] size Number of char's that you want copy. + * + * @return The allocated memory chunk. + * + * @see talloc_size() + */ +void *talloc_memdup(const void *t, const void *p, size_t size); +#else +#define talloc_memdup(t, p, size) _talloc_memdup(t, p, size, __location__) +void *_talloc_memdup(const void *t, const void *p, size_t size, const char *name); +#endif + +#ifdef DOXYGEN +/** + * @brief Assign a type to a talloc chunk. + * + * This macro allows you to force the name of a pointer to be of a particular + * type. This can be used in conjunction with talloc_get_type() to do type + * checking on void* pointers. + * + * It is equivalent to this: + * + * @code + * talloc_set_name_const(ptr, #type) + * @endcode + * + * @param[in] ptr The talloc chunk to assign the type to. + * + * @param[in] type The type to assign. + */ +void talloc_set_type(const char *ptr, #type); + +/** + * @brief Get a typed pointer out of a talloc pointer. + * + * This macro allows you to do type checking on talloc pointers. It is + * particularly useful for void* private pointers. It is equivalent to + * this: + * + * @code + * (type *)talloc_check_name(ptr, #type) + * @endcode + * + * @param[in] ptr The talloc pointer to check. + * + * @param[in] type The type to check against. + * + * @return The properly casted pointer given by ptr, NULL on error. + */ +type *talloc_get_type(const void *ptr, #type); +#else +#define talloc_set_type(ptr, type) talloc_set_name_const(ptr, #type) +#define talloc_get_type(ptr, type) (type *)talloc_check_name(ptr, #type) +#endif + +#ifdef DOXYGEN +/** + * @brief Safely turn a void pointer into a typed pointer. + * + * This macro is used together with talloc(mem_ctx, struct foo). If you had to + * assign the talloc chunk pointer to some void pointer variable, + * talloc_get_type_abort() is the recommended way to get the convert the void + * pointer back to a typed pointer. + * + * @param[in] ptr The void pointer to convert. + * + * @param[in] type The type that this chunk contains + * + * @return The same value as ptr, type-checked and properly cast. + */ +void *talloc_get_type_abort(const void *ptr, #type); +#else +#ifdef TALLOC_GET_TYPE_ABORT_NOOP +#define talloc_get_type_abort(ptr, type) (type *)(ptr) +#else +#define talloc_get_type_abort(ptr, type) (type *)_talloc_get_type_abort(ptr, #type, __location__) +#endif +void *_talloc_get_type_abort(const void *ptr, const char *name, const char *location); +#endif + +/** + * @brief Find a parent context by name. + * + * Find a parent memory context of the current context that has the given + * name. This can be very useful in complex programs where it may be + * difficult to pass all information down to the level you need, but you + * know the structure you want is a parent of another context. + * + * @param[in] ctx The talloc chunk to start from. + * + * @param[in] name The name of the parent we look for. + * + * @return The memory context we are looking for, NULL if not + * found. + */ +void *talloc_find_parent_byname(const void *ctx, const char *name); + +#ifdef DOXYGEN +/** + * @brief Find a parent context by type. + * + * Find a parent memory context of the current context that has the given + * name. This can be very useful in complex programs where it may be + * difficult to pass all information down to the level you need, but you + * know the structure you want is a parent of another context. + * + * Like talloc_find_parent_byname() but takes a type, making it typesafe. + * + * @param[in] ptr The talloc chunk to start from. + * + * @param[in] type The type of the parent to look for. + * + * @return The memory context we are looking for, NULL if not + * found. + */ +void *talloc_find_parent_bytype(const void *ptr, #type); +#else +#define talloc_find_parent_bytype(ptr, type) (type *)talloc_find_parent_byname(ptr, #type) +#endif + +/** + * @brief Allocate a talloc pool. + * + * A talloc pool is a pure optimization for specific situations. In the + * release process for Samba 3.2 we found out that we had become considerably + * slower than Samba 3.0 was. Profiling showed that malloc(3) was a large CPU + * consumer in benchmarks. For Samba 3.2 we have internally converted many + * static buffers to dynamically allocated ones, so malloc(3) being beaten + * more was no surprise. But it made us slower. + * + * talloc_pool() is an optimization to call malloc(3) a lot less for the use + * pattern Samba has: The SMB protocol is mainly a request/response protocol + * where we have to allocate a certain amount of memory per request and free + * that after the SMB reply is sent to the client. + * + * talloc_pool() creates a talloc chunk that you can use as a talloc parent + * exactly as you would use any other ::TALLOC_CTX. The difference is that + * when you talloc a child of this pool, no malloc(3) is done. Instead, talloc + * just increments a pointer inside the talloc_pool. This also works + * recursively. If you use the child of the talloc pool as a parent for + * grand-children, their memory is also taken from the talloc pool. + * + * If there is not enough memory in the pool to allocate the new child, + * it will create a new talloc chunk as if the parent was a normal talloc + * context. + * + * If you talloc_free() children of a talloc pool, the memory is not given + * back to the system. Instead, free(3) is only called if the talloc_pool() + * itself is released with talloc_free(). + * + * The downside of a talloc pool is that if you talloc_move() a child of a + * talloc pool to a talloc parent outside the pool, the whole pool memory is + * not free(3)'ed until that moved chunk is also talloc_free()ed. + * + * @param[in] context The talloc context to hang the result off. + * + * @param[in] size Size of the talloc pool. + * + * @return The allocated talloc pool, NULL on error. + */ +void *talloc_pool(const void *context, size_t size); + +#ifdef DOXYGEN +/** + * @brief Allocate a talloc object as/with an additional pool. + * + * This is like talloc_pool(), but's it's more flexible + * and allows an object to be a pool for its children. + * + * @param[in] ctx The talloc context to hang the result off. + * + * @param[in] type The type that we want to allocate. + * + * @param[in] num_subobjects The expected number of subobjects, which will + * be allocated within the pool. This allocates + * space for talloc_chunk headers. + * + * @param[in] total_subobjects_size The size that all subobjects can use in total. + * + * + * @return The allocated talloc object, NULL on error. + */ +void *talloc_pooled_object(const void *ctx, #type, + unsigned num_subobjects, + size_t total_subobjects_size); +#else +#define talloc_pooled_object(_ctx, _type, \ + _num_subobjects, \ + _total_subobjects_size) \ + (_type *)_talloc_pooled_object((_ctx), sizeof(_type), #_type, \ + (_num_subobjects), \ + (_total_subobjects_size)) +void *_talloc_pooled_object(const void *ctx, + size_t type_size, + const char *type_name, + unsigned num_subobjects, + size_t total_subobjects_size); +#endif + +/** + * @brief Free a talloc chunk and NULL out the pointer. + * + * TALLOC_FREE() frees a pointer and sets it to NULL. Use this if you want + * immediate feedback (i.e. crash) if you use a pointer after having free'ed + * it. + * + * @param[in] ctx The chunk to be freed. + */ +#define TALLOC_FREE(ctx) do { if (ctx != NULL) { talloc_free(ctx); ctx=NULL; } } while(0) + +/* @} ******************************************************************/ + +/** + * \defgroup talloc_ref The talloc reference function. + * @ingroup talloc + * + * This module contains the definitions around talloc references + * + * @{ + */ + +/** + * @brief Increase the reference count of a talloc chunk. + * + * The talloc_increase_ref_count(ptr) function is exactly equivalent to: + * + * @code + * talloc_reference(NULL, ptr); + * @endcode + * + * You can use either syntax, depending on which you think is clearer in + * your code. + * + * @param[in] ptr The pointer to increase the reference count. + * + * @return 0 on success, -1 on error. + */ +int talloc_increase_ref_count(const void *ptr); + +/** + * @brief Get the number of references to a talloc chunk. + * + * @param[in] ptr The pointer to retrieve the reference count from. + * + * @return The number of references. + */ +size_t talloc_reference_count(const void *ptr); + +#ifdef DOXYGEN +/** + * @brief Create an additional talloc parent to a pointer. + * + * The talloc_reference() function makes "context" an additional parent of + * ptr. Each additional reference consumes around 48 bytes of memory on intel + * x86 platforms. + * + * If ptr is NULL, then the function is a no-op, and simply returns NULL. + * + * After creating a reference you can free it in one of the following ways: + * + * - you can talloc_free() any parent of the original pointer. That + * will reduce the number of parents of this pointer by 1, and will + * cause this pointer to be freed if it runs out of parents. + * + * - you can talloc_free() the pointer itself if it has at maximum one + * parent. This behaviour has been changed since the release of version + * 2.0. Further informations in the description of "talloc_free". + * + * For more control on which parent to remove, see talloc_unlink() + * @param[in] ctx The additional parent. + * + * @param[in] ptr The pointer you want to create an additional parent for. + * + * @return The original pointer 'ptr', NULL if talloc ran out of + * memory in creating the reference. + * + * @warning You should try to avoid using this interface. It turns a beautiful + * talloc-tree into a graph. It is often really hard to debug if you + * screw something up by accident. + * + * Example: + * @code + * unsigned int *a, *b, *c; + * a = talloc(NULL, unsigned int); + * b = talloc(NULL, unsigned int); + * c = talloc(a, unsigned int); + * // b also serves as a parent of c. + * talloc_reference(b, c); + * @endcode + * + * @see talloc_unlink() + */ +void *talloc_reference(const void *ctx, const void *ptr); +#else +#define talloc_reference(ctx, ptr) (_TALLOC_TYPEOF(ptr))_talloc_reference_loc((ctx),(ptr), __location__) +void *_talloc_reference_loc(const void *context, const void *ptr, const char *location); +#endif + +/** + * @brief Remove a specific parent from a talloc chunk. + * + * The function removes a specific parent from ptr. The context passed must + * either be a context used in talloc_reference() with this pointer, or must be + * a direct parent of ptr. + * + * You can just use talloc_free() instead of talloc_unlink() if there + * is at maximum one parent. This behaviour has been changed since the + * release of version 2.0. Further informations in the description of + * "talloc_free". + * + * @param[in] context The talloc parent to remove. + * + * @param[in] ptr The talloc ptr you want to remove the parent from. + * + * @return 0 on success, -1 on error. + * + * @note If the parent has already been removed using talloc_free() then + * this function will fail and will return -1. Likewise, if ptr is NULL, + * then the function will make no modifications and return -1. + * + * @warning You should try to avoid using this interface. It turns a beautiful + * talloc-tree into a graph. It is often really hard to debug if you + * screw something up by accident. + * + * Example: + * @code + * unsigned int *a, *b, *c; + * a = talloc(NULL, unsigned int); + * b = talloc(NULL, unsigned int); + * c = talloc(a, unsigned int); + * // b also serves as a parent of c. + * talloc_reference(b, c); + * talloc_unlink(b, c); + * @endcode + */ +int talloc_unlink(const void *context, void *ptr); + +/** + * @brief Provide a talloc context that is freed at program exit. + * + * This is a handy utility function that returns a talloc context + * which will be automatically freed on program exit. This can be used + * to reduce the noise in memory leak reports. + * + * Never use this in code that might be used in objects loaded with + * dlopen and unloaded with dlclose. talloc_autofree_context() + * internally uses atexit(3). Some platforms like modern Linux handles + * this fine, but for example FreeBSD does not deal well with dlopen() + * and atexit() used simultaneously: dlclose() does not clean up the + * list of atexit-handlers, so when the program exits the code that + * was registered from within talloc_autofree_context() is gone, the + * program crashes at exit. + * + * @return A talloc context, NULL on error. + */ +void *talloc_autofree_context(void); + +/** + * @brief Get the size of a talloc chunk. + * + * This function lets you know the amount of memory allocated so far by + * this context. It does NOT account for subcontext memory. + * This can be used to calculate the size of an array. + * + * @param[in] ctx The talloc chunk. + * + * @return The size of the talloc chunk. + */ +size_t talloc_get_size(const void *ctx); + +/** + * @brief Show the parentage of a context. + * + * @param[in] context The talloc context to look at. + * + * @param[in] file The output to use, a file, stdout or stderr. + */ +void talloc_show_parents(const void *context, FILE *file); + +/** + * @brief Check if a context is parent of a talloc chunk. + * + * This checks if context is referenced in the talloc hierarchy above ptr. + * + * @param[in] context The assumed talloc context. + * + * @param[in] ptr The talloc chunk to check. + * + * @return Return 1 if this is the case, 0 if not. + */ +int talloc_is_parent(const void *context, const void *ptr); + +/** + * @brief Change the parent context of a talloc pointer. + * + * The function changes the parent context of a talloc pointer. It is typically + * used when the context that the pointer is currently a child of is going to be + * freed and you wish to keep the memory for a longer time. + * + * The difference between talloc_reparent() and talloc_steal() is that + * talloc_reparent() can specify which parent you wish to change. This is + * useful when a pointer has multiple parents via references. + * + * @param[in] old_parent + * @param[in] new_parent + * @param[in] ptr + * + * @return Return the pointer you passed. It does not have any + * failure modes. + */ +void *talloc_reparent(const void *old_parent, const void *new_parent, const void *ptr); + +/* @} ******************************************************************/ + +/** + * @defgroup talloc_array The talloc array functions + * @ingroup talloc + * + * Talloc contains some handy helpers for handling Arrays conveniently + * + * @{ + */ + +#ifdef DOXYGEN +/** + * @brief Allocate an array. + * + * The macro is equivalent to: + * + * @code + * (type *)talloc_size(ctx, sizeof(type) * count); + * @endcode + * + * except that it provides integer overflow protection for the multiply, + * returning NULL if the multiply overflows. + * + * @param[in] ctx The talloc context to hang the result off. + * + * @param[in] type The type that we want to allocate. + * + * @param[in] count The number of 'type' elements you want to allocate. + * + * @return The allocated result, properly cast to 'type *', NULL on + * error. + * + * Example: + * @code + * unsigned int *a, *b; + * a = talloc_zero(NULL, unsigned int); + * b = talloc_array(a, unsigned int, 100); + * @endcode + * + * @see talloc() + * @see talloc_zero_array() + */ +void *talloc_array(const void *ctx, #type, unsigned count); +#else +#define talloc_array(ctx, type, count) (type *)_talloc_array(ctx, sizeof(type), count, #type) +void *_talloc_array(const void *ctx, size_t el_size, unsigned count, const char *name); +#endif + +#ifdef DOXYGEN +/** + * @brief Allocate an array. + * + * @param[in] ctx The talloc context to hang the result off. + * + * @param[in] size The size of an array element. + * + * @param[in] count The number of elements you want to allocate. + * + * @return The allocated result, NULL on error. + */ +void *talloc_array_size(const void *ctx, size_t size, unsigned count); +#else +#define talloc_array_size(ctx, size, count) _talloc_array(ctx, size, count, __location__) +#endif + +#ifdef DOXYGEN +/** + * @brief Allocate an array into a typed pointer. + * + * The macro should be used when you have a pointer to an array and want to + * allocate memory of an array to point at with this pointer. When compiling + * with gcc >= 3 it is typesafe. Note this is a wrapper of talloc_array_size() + * and talloc_get_name() will return the current location in the source file + * and not the type. + * + * @param[in] ctx The talloc context to hang the result off. + * + * @param[in] ptr The pointer you want to assign the result to. + * + * @param[in] count The number of elements you want to allocate. + * + * @return The allocated memory chunk, properly casted. NULL on + * error. + */ +void *talloc_array_ptrtype(const void *ctx, const void *ptr, unsigned count); +#else +#define talloc_array_ptrtype(ctx, ptr, count) (_TALLOC_TYPEOF(ptr))talloc_array_size(ctx, sizeof(*(ptr)), count) +#endif + +#ifdef DOXYGEN +/** + * @brief Get the number of elements in a talloc'ed array. + * + * A talloc chunk carries its own size, so for talloc'ed arrays it is not + * necessary to store the number of elements explicitly. + * + * @param[in] ctx The allocated array. + * + * @return The number of elements in ctx. + */ +size_t talloc_array_length(const void *ctx); +#else +#define talloc_array_length(ctx) (talloc_get_size(ctx)/sizeof(*ctx)) +#endif + +#ifdef DOXYGEN +/** + * @brief Allocate a zero-initialized array + * + * @param[in] ctx The talloc context to hang the result off. + * + * @param[in] type The type that we want to allocate. + * + * @param[in] count The number of "type" elements you want to allocate. + * + * @return The allocated result casted to "type *", NULL on error. + * + * The talloc_zero_array() macro is equivalent to: + * + * @code + * ptr = talloc_array(ctx, type, count); + * if (ptr) memset(ptr, 0, sizeof(type) * count); + * @endcode + */ +void *talloc_zero_array(const void *ctx, #type, unsigned count); +#else +#define talloc_zero_array(ctx, type, count) (type *)_talloc_zero_array(ctx, sizeof(type), count, #type) +void *_talloc_zero_array(const void *ctx, + size_t el_size, + unsigned count, + const char *name); +#endif + +#ifdef DOXYGEN +/** + * @brief Change the size of a talloc array. + * + * The macro changes the size of a talloc pointer. The 'count' argument is the + * number of elements of type 'type' that you want the resulting pointer to + * hold. + * + * talloc_realloc() has the following equivalences: + * + * @code + * talloc_realloc(ctx, NULL, type, 1) ==> talloc(ctx, type); + * talloc_realloc(ctx, NULL, type, N) ==> talloc_array(ctx, type, N); + * talloc_realloc(ctx, ptr, type, 0) ==> talloc_free(ptr); + * @endcode + * + * The "context" argument is only used if "ptr" is NULL, otherwise it is + * ignored. + * + * @param[in] ctx The parent context used if ptr is NULL. + * + * @param[in] ptr The chunk to be resized. + * + * @param[in] type The type of the array element inside ptr. + * + * @param[in] count The intended number of array elements. + * + * @return The new array, NULL on error. The call will fail either + * due to a lack of memory, or because the pointer has more + * than one parent (see talloc_reference()). + */ +void *talloc_realloc(const void *ctx, void *ptr, #type, size_t count); +#else +#define talloc_realloc(ctx, p, type, count) (type *)_talloc_realloc_array(ctx, p, sizeof(type), count, #type) +void *_talloc_realloc_array(const void *ctx, void *ptr, size_t el_size, unsigned count, const char *name); +#endif + +#ifdef DOXYGEN +/** + * @brief Untyped realloc to change the size of a talloc array. + * + * The macro is useful when the type is not known so the typesafe + * talloc_realloc() cannot be used. + * + * @param[in] ctx The parent context used if 'ptr' is NULL. + * + * @param[in] ptr The chunk to be resized. + * + * @param[in] size The new chunk size. + * + * @return The new array, NULL on error. + */ +void *talloc_realloc_size(const void *ctx, void *ptr, size_t size); +#else +#define talloc_realloc_size(ctx, ptr, size) _talloc_realloc(ctx, ptr, size, __location__) +void *_talloc_realloc(const void *context, void *ptr, size_t size, const char *name); +#endif + +/** + * @brief Provide a function version of talloc_realloc_size. + * + * This is a non-macro version of talloc_realloc(), which is useful as + * libraries sometimes want a ralloc function pointer. A realloc() + * implementation encapsulates the functionality of malloc(), free() and + * realloc() in one call, which is why it is useful to be able to pass around + * a single function pointer. + * + * @param[in] context The parent context used if ptr is NULL. + * + * @param[in] ptr The chunk to be resized. + * + * @param[in] size The new chunk size. + * + * @return The new chunk, NULL on error. + */ +void *talloc_realloc_fn(const void *context, void *ptr, size_t size); + +/* @} ******************************************************************/ + +/** + * @defgroup talloc_string The talloc string functions. + * @ingroup talloc + * + * talloc string allocation and manipulation functions. + * @{ + */ + +/** + * @brief Duplicate a string into a talloc chunk. + * + * This function is equivalent to: + * + * @code + * ptr = talloc_size(ctx, strlen(p)+1); + * if (ptr) memcpy(ptr, p, strlen(p)+1); + * @endcode + * + * This functions sets the name of the new pointer to the passed + * string. This is equivalent to: + * + * @code + * talloc_set_name_const(ptr, ptr) + * @endcode + * + * @param[in] t The talloc context to hang the result off. + * + * @param[in] p The string you want to duplicate. + * + * @return The duplicated string, NULL on error. + */ +char *talloc_strdup(const void *t, const char *p); + +/** + * @brief Append a string to given string. + * + * The destination string is reallocated to take + * strlen(s) + strlen(a) + 1 characters. + * + * This functions sets the name of the new pointer to the new + * string. This is equivalent to: + * + * @code + * talloc_set_name_const(ptr, ptr) + * @endcode + * + * If s == NULL then new context is created. + * + * @param[in] s The destination to append to. + * + * @param[in] a The string you want to append. + * + * @return The concatenated strings, NULL on error. + * + * @see talloc_strdup() + * @see talloc_strdup_append_buffer() + */ +char *talloc_strdup_append(char *s, const char *a); + +/** + * @brief Append a string to a given buffer. + * + * This is a more efficient version of talloc_strdup_append(). It determines the + * length of the destination string by the size of the talloc context. + * + * Use this very carefully as it produces a different result than + * talloc_strdup_append() when a zero character is in the middle of the + * destination string. + * + * @code + * char *str_a = talloc_strdup(NULL, "hello world"); + * char *str_b = talloc_strdup(NULL, "hello world"); + * str_a[5] = str_b[5] = '\0' + * + * char *app = talloc_strdup_append(str_a, ", hello"); + * char *buf = talloc_strdup_append_buffer(str_b, ", hello"); + * + * printf("%s\n", app); // hello, hello (app = "hello, hello") + * printf("%s\n", buf); // hello (buf = "hello\0world, hello") + * @endcode + * + * If s == NULL then new context is created. + * + * @param[in] s The destination buffer to append to. + * + * @param[in] a The string you want to append. + * + * @return The concatenated strings, NULL on error. + * + * @see talloc_strdup() + * @see talloc_strdup_append() + * @see talloc_array_length() + */ +char *talloc_strdup_append_buffer(char *s, const char *a); + +/** + * @brief Duplicate a length-limited string into a talloc chunk. + * + * This function is the talloc equivalent of the C library function strndup(3). + * + * This functions sets the name of the new pointer to the passed string. This is + * equivalent to: + * + * @code + * talloc_set_name_const(ptr, ptr) + * @endcode + * + * @param[in] t The talloc context to hang the result off. + * + * @param[in] p The string you want to duplicate. + * + * @param[in] n The maximum string length to duplicate. + * + * @return The duplicated string, NULL on error. + */ +char *talloc_strndup(const void *t, const char *p, size_t n); + +/** + * @brief Append at most n characters of a string to given string. + * + * The destination string is reallocated to take + * strlen(s) + strnlen(a, n) + 1 characters. + * + * This functions sets the name of the new pointer to the new + * string. This is equivalent to: + * + * @code + * talloc_set_name_const(ptr, ptr) + * @endcode + * + * If s == NULL then new context is created. + * + * @param[in] s The destination string to append to. + * + * @param[in] a The source string you want to append. + * + * @param[in] n The number of characters you want to append from the + * string. + * + * @return The concatenated strings, NULL on error. + * + * @see talloc_strndup() + * @see talloc_strndup_append_buffer() + */ +char *talloc_strndup_append(char *s, const char *a, size_t n); + +/** + * @brief Append at most n characters of a string to given buffer + * + * This is a more efficient version of talloc_strndup_append(). It determines + * the length of the destination string by the size of the talloc context. + * + * Use this very carefully as it produces a different result than + * talloc_strndup_append() when a zero character is in the middle of the + * destination string. + * + * @code + * char *str_a = talloc_strdup(NULL, "hello world"); + * char *str_b = talloc_strdup(NULL, "hello world"); + * str_a[5] = str_b[5] = '\0' + * + * char *app = talloc_strndup_append(str_a, ", hello", 7); + * char *buf = talloc_strndup_append_buffer(str_b, ", hello", 7); + * + * printf("%s\n", app); // hello, hello (app = "hello, hello") + * printf("%s\n", buf); // hello (buf = "hello\0world, hello") + * @endcode + * + * If s == NULL then new context is created. + * + * @param[in] s The destination buffer to append to. + * + * @param[in] a The source string you want to append. + * + * @param[in] n The number of characters you want to append from the + * string. + * + * @return The concatenated strings, NULL on error. + * + * @see talloc_strndup() + * @see talloc_strndup_append() + * @see talloc_array_length() + */ +char *talloc_strndup_append_buffer(char *s, const char *a, size_t n); + +/** + * @brief Format a string given a va_list. + * + * This function is the talloc equivalent of the C library function + * vasprintf(3). + * + * This functions sets the name of the new pointer to the new string. This is + * equivalent to: + * + * @code + * talloc_set_name_const(ptr, ptr) + * @endcode + * + * @param[in] t The talloc context to hang the result off. + * + * @param[in] fmt The format string. + * + * @param[in] ap The parameters used to fill fmt. + * + * @return The formatted string, NULL on error. + */ +char *talloc_vasprintf(const void *t, const char *fmt, va_list ap) PRINTF_ATTRIBUTE(2,0); + +/** + * @brief Format a string given a va_list and append it to the given destination + * string. + * + * @param[in] s The destination string to append to. + * + * @param[in] fmt The format string. + * + * @param[in] ap The parameters used to fill fmt. + * + * @return The formatted string, NULL on error. + * + * @see talloc_vasprintf() + */ +char *talloc_vasprintf_append(char *s, const char *fmt, va_list ap) PRINTF_ATTRIBUTE(2,0); + +/** + * @brief Format a string given a va_list and append it to the given destination + * buffer. + * + * @param[in] s The destination buffer to append to. + * + * @param[in] fmt The format string. + * + * @param[in] ap The parameters used to fill fmt. + * + * @return The formatted string, NULL on error. + * + * @see talloc_vasprintf() + */ +char *talloc_vasprintf_append_buffer(char *s, const char *fmt, va_list ap) PRINTF_ATTRIBUTE(2,0); + +/** + * @brief Format a string. + * + * This function is the talloc equivalent of the C library function asprintf(3). + * + * This functions sets the name of the new pointer to the new string. This is + * equivalent to: + * + * @code + * talloc_set_name_const(ptr, ptr) + * @endcode + * + * @param[in] t The talloc context to hang the result off. + * + * @param[in] fmt The format string. + * + * @param[in] ... The parameters used to fill fmt. + * + * @return The formatted string, NULL on error. + */ +char *talloc_asprintf(const void *t, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3); + +/** + * @brief Append a formatted string to another string. + * + * This function appends the given formatted string to the given string. Use + * this variant when the string in the current talloc buffer may have been + * truncated in length. + * + * This functions sets the name of the new pointer to the new + * string. This is equivalent to: + * + * @code + * talloc_set_name_const(ptr, ptr) + * @endcode + * + * If s == NULL then new context is created. + * + * @param[in] s The string to append to. + * + * @param[in] fmt The format string. + * + * @param[in] ... The parameters used to fill fmt. + * + * @return The formatted string, NULL on error. + */ +char *talloc_asprintf_append(char *s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3); + +/** + * @brief Append a formatted string to another string. + * + * This is a more efficient version of talloc_asprintf_append(). It determines + * the length of the destination string by the size of the talloc context. + * + * Use this very carefully as it produces a different result than + * talloc_asprintf_append() when a zero character is in the middle of the + * destination string. + * + * @code + * char *str_a = talloc_strdup(NULL, "hello world"); + * char *str_b = talloc_strdup(NULL, "hello world"); + * str_a[5] = str_b[5] = '\0' + * + * char *app = talloc_asprintf_append(str_a, "%s", ", hello"); + * char *buf = talloc_strdup_append_buffer(str_b, "%s", ", hello"); + * + * printf("%s\n", app); // hello, hello (app = "hello, hello") + * printf("%s\n", buf); // hello (buf = "hello\0world, hello") + * @endcode + * + * If s == NULL then new context is created. + * + * @param[in] s The string to append to + * + * @param[in] fmt The format string. + * + * @param[in] ... The parameters used to fill fmt. + * + * @return The formatted string, NULL on error. + * + * @see talloc_asprintf() + * @see talloc_asprintf_append() + */ +char *talloc_asprintf_append_buffer(char *s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3); + +/* @} ******************************************************************/ + +/** + * @defgroup talloc_debug The talloc debugging support functions + * @ingroup talloc + * + * To aid memory debugging, talloc contains routines to inspect the currently + * allocated memory hierarchy. + * + * @{ + */ + +/** + * @brief Walk a complete talloc hierarchy. + * + * This provides a more flexible reports than talloc_report(). It + * will recursively call the callback for the entire tree of memory + * referenced by the pointer. References in the tree are passed with + * is_ref = 1 and the pointer that is referenced. + * + * You can pass NULL for the pointer, in which case a report is + * printed for the top level memory context, but only if + * talloc_enable_leak_report() or talloc_enable_leak_report_full() + * has been called. + * + * The recursion is stopped when depth >= max_depth. + * max_depth = -1 means only stop at leaf nodes. + * + * @param[in] ptr The talloc chunk. + * + * @param[in] depth Internal parameter to control recursion. Call with 0. + * + * @param[in] max_depth Maximum recursion level. + * + * @param[in] callback Function to be called on every chunk. + * + * @param[in] private_data Private pointer passed to callback. + */ +void talloc_report_depth_cb(const void *ptr, int depth, int max_depth, + void (*callback)(const void *ptr, + int depth, int max_depth, + int is_ref, + void *private_data), + void *private_data); + +/** + * @brief Print a talloc hierarchy. + * + * This provides a more flexible reports than talloc_report(). It + * will let you specify the depth and max_depth. + * + * @param[in] ptr The talloc chunk. + * + * @param[in] depth Internal parameter to control recursion. Call with 0. + * + * @param[in] max_depth Maximum recursion level. + * + * @param[in] f The file handle to print to. + */ +void talloc_report_depth_file(const void *ptr, int depth, int max_depth, FILE *f); + +/** + * @brief Print a summary report of all memory used by ptr. + * + * This provides a more detailed report than talloc_report(). It will + * recursively print the entire tree of memory referenced by the + * pointer. References in the tree are shown by giving the name of the + * pointer that is referenced. + * + * You can pass NULL for the pointer, in which case a report is printed + * for the top level memory context, but only if + * talloc_enable_leak_report() or talloc_enable_leak_report_full() has + * been called. + * + * @param[in] ptr The talloc chunk. + * + * @param[in] f The file handle to print to. + * + * Example: + * @code + * unsigned int *a, *b; + * a = talloc(NULL, unsigned int); + * b = talloc(a, unsigned int); + * fprintf(stderr, "Dumping memory tree for a:\n"); + * talloc_report_full(a, stderr); + * @endcode + * + * @see talloc_report() + */ +void talloc_report_full(const void *ptr, FILE *f); + +/** + * @brief Print a summary report of all memory used by ptr. + * + * This function prints a summary report of all memory used by ptr. One line of + * report is printed for each immediate child of ptr, showing the total memory + * and number of blocks used by that child. + * + * You can pass NULL for the pointer, in which case a report is printed + * for the top level memory context, but only if talloc_enable_leak_report() + * or talloc_enable_leak_report_full() has been called. + * + * @param[in] ptr The talloc chunk. + * + * @param[in] f The file handle to print to. + * + * Example: + * @code + * unsigned int *a, *b; + * a = talloc(NULL, unsigned int); + * b = talloc(a, unsigned int); + * fprintf(stderr, "Summary of memory tree for a:\n"); + * talloc_report(a, stderr); + * @endcode + * + * @see talloc_report_full() + */ +void talloc_report(const void *ptr, FILE *f); + +/** + * @brief Enable tracking the use of NULL memory contexts. + * + * This enables tracking of the NULL memory context without enabling leak + * reporting on exit. Useful for when you want to do your own leak + * reporting call via talloc_report_null_full(); + */ +void talloc_enable_null_tracking(void); + +/** + * @brief Enable tracking the use of NULL memory contexts. + * + * This enables tracking of the NULL memory context without enabling leak + * reporting on exit. Useful for when you want to do your own leak + * reporting call via talloc_report_null_full(); + */ +void talloc_enable_null_tracking_no_autofree(void); + +/** + * @brief Disable tracking of the NULL memory context. + * + * This disables tracking of the NULL memory context. + */ +void talloc_disable_null_tracking(void); + +/** + * @brief Enable leak report when a program exits. + * + * This enables calling of talloc_report(NULL, stderr) when the program + * exits. In Samba4 this is enabled by using the --leak-report command + * line option. + * + * For it to be useful, this function must be called before any other + * talloc function as it establishes a "null context" that acts as the + * top of the tree. If you don't call this function first then passing + * NULL to talloc_report() or talloc_report_full() won't give you the + * full tree printout. + * + * Here is a typical talloc report: + * + * @code + * talloc report on 'null_context' (total 267 bytes in 15 blocks) + * libcli/auth/spnego_parse.c:55 contains 31 bytes in 2 blocks + * libcli/auth/spnego_parse.c:55 contains 31 bytes in 2 blocks + * iconv(UTF8,CP850) contains 42 bytes in 2 blocks + * libcli/auth/spnego_parse.c:55 contains 31 bytes in 2 blocks + * iconv(CP850,UTF8) contains 42 bytes in 2 blocks + * iconv(UTF8,UTF-16LE) contains 45 bytes in 2 blocks + * iconv(UTF-16LE,UTF8) contains 45 bytes in 2 blocks + * @endcode + */ +void talloc_enable_leak_report(void); + +/** + * @brief Enable full leak report when a program exits. + * + * This enables calling of talloc_report_full(NULL, stderr) when the + * program exits. In Samba4 this is enabled by using the + * --leak-report-full command line option. + * + * For it to be useful, this function must be called before any other + * talloc function as it establishes a "null context" that acts as the + * top of the tree. If you don't call this function first then passing + * NULL to talloc_report() or talloc_report_full() won't give you the + * full tree printout. + * + * Here is a typical full report: + * + * @code + * full talloc report on 'root' (total 18 bytes in 8 blocks) + * p1 contains 18 bytes in 7 blocks (ref 0) + * r1 contains 13 bytes in 2 blocks (ref 0) + * reference to: p2 + * p2 contains 1 bytes in 1 blocks (ref 1) + * x3 contains 1 bytes in 1 blocks (ref 0) + * x2 contains 1 bytes in 1 blocks (ref 0) + * x1 contains 1 bytes in 1 blocks (ref 0) + * @endcode + */ +void talloc_enable_leak_report_full(void); + +/** + * @brief Set a custom "abort" function that is called on serious error. + * + * The default "abort" function is abort(). + * + * The "abort" function is called when: + * + *
    + *
  • talloc_get_type_abort() fails
  • + *
  • the provided pointer is not a valid talloc context
  • + *
  • when the context meta data are invalid
  • + *
  • when access after free is detected
  • + *
+ * + * Example: + * + * @code + * void my_abort(const char *reason) + * { + * fprintf(stderr, "talloc abort: %s\n", reason); + * abort(); + * } + * + * talloc_set_abort_fn(my_abort); + * @endcode + * + * @param[in] abort_fn The new "abort" function. + * + * @see talloc_set_log_fn() + * @see talloc_get_type() + */ +void talloc_set_abort_fn(void (*abort_fn)(const char *reason)); + +/** + * @brief Set a logging function. + * + * @param[in] log_fn The logging function. + * + * @see talloc_set_log_stderr() + * @see talloc_set_abort_fn() + */ +void talloc_set_log_fn(void (*log_fn)(const char *message)); + +/** + * @brief Set stderr as the output for logs. + * + * @see talloc_set_log_fn() + * @see talloc_set_abort_fn() + */ +void talloc_set_log_stderr(void); + +/** + * @brief Set a max memory limit for the current context hierarchy + * This affects all children of this context and constrain any + * allocation in the hierarchy to never exceed the limit set. + * The limit can be removed by setting 0 (unlimited) as the + * max_size by calling the function again on the same context. + * Memory limits can also be nested, meaning a child can have + * a stricter memory limit than a parent. + * Memory limits are enforced only at memory allocation time. + * Stealing a context into a 'limited' hierarchy properly + * updates memory usage but does *not* cause failure if the + * move causes the new parent to exceed its limits. However + * any further allocation on that hierarchy will then fail. + * + * @param[in] ctx The talloc context to set the limit on + * @param[in] max_size The (new) max_size + */ +int talloc_set_memlimit(const void *ctx, size_t max_size); + +/* @} ******************************************************************/ + +#if TALLOC_DEPRECATED +#define talloc_zero_p(ctx, type) talloc_zero(ctx, type) +#define talloc_p(ctx, type) talloc(ctx, type) +#define talloc_array_p(ctx, type, count) talloc_array(ctx, type, count) +#define talloc_realloc_p(ctx, p, type, count) talloc_realloc(ctx, p, type, count) +#define talloc_destroy(ctx) talloc_free(ctx) +#define talloc_append_string(c, s, a) (s?talloc_strdup_append(s,a):talloc_strdup(c, a)) +#endif + +#ifndef TALLOC_MAX_DEPTH +#define TALLOC_MAX_DEPTH 10000 +#endif + +#ifdef __cplusplus +} /* end of extern "C" */ +#endif + +#endif -- To view, visit https://gerrit.osmocom.org/13993 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ibd31b40d5b75b3fc1783a6b02b0e97da430e0f60 Gerrit-Change-Number: 13993 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 18:19:46 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 18:19:46 +0000 Subject: Change in osmo-ccid-firmware[master]: talloc: \n -> \r\n for serial output Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13994 Change subject: talloc: \n -> \r\n for serial output ...................................................................... talloc: \n -> \r\n for serial output Change-Id: Ieeb6a93c2dc9578220c73771136e2df7476f5e45 --- M sysmoOCTSIM/talloc.c 1 file changed, 17 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/94/13994/1 diff --git a/sysmoOCTSIM/talloc.c b/sysmoOCTSIM/talloc.c index 54be634..c5c9062 100644 --- a/sysmoOCTSIM/talloc.c +++ b/sysmoOCTSIM/talloc.c @@ -494,7 +494,7 @@ static void talloc_abort(const char *reason) { - talloc_log("%s\n", reason); + talloc_log("%s\r\n", reason); if (!talloc_abort_fn) { TALLOC_ABORT(reason); @@ -521,7 +521,7 @@ if (unlikely((tc->flags & (TALLOC_FLAG_FREE | ~TALLOC_FLAG_MASK)) != talloc_magic)) { if ((tc->flags & (TALLOC_FLAG_FREE | ~TALLOC_FLAG_MASK)) == (TALLOC_MAGIC_NON_RANDOM | TALLOC_FLAG_FREE)) { - talloc_log("talloc: access after free error - first free may be at %s\n", tc->name); + talloc_log("talloc: access after free error - first free may be at %s\r\n", tc->name); talloc_abort_access_after_free(); return NULL; } @@ -1331,11 +1331,11 @@ if (unlikely(tc->refs != NULL) && talloc_parent(ptr) != new_ctx) { struct talloc_reference_handle *h; - talloc_log("WARNING: talloc_steal with references at %s\n", + talloc_log("WARNING: talloc_steal with references at %s\r\n", location); for (h=tc->refs; h; h=h->next) { - talloc_log("\treference at %s\n", + talloc_log("\treference at %s\r\n", h->location); } } @@ -1344,7 +1344,7 @@ /* this test is probably too expensive to have on in the normal build, but it useful for debugging */ if (talloc_is_parent(new_ctx, ptr)) { - talloc_log("WARNING: stealing into talloc child at %s\n", location); + talloc_log("WARNING: stealing into talloc child at %s\r\n", location); } #endif @@ -1756,11 +1756,11 @@ return talloc_unlink(null_context, ptr); } - talloc_log("ERROR: talloc_free with references at %s\n", + talloc_log("ERROR: talloc_free with references at %s\r\n", location); for (h=tc->refs; h; h=h->next) { - talloc_log("\treference at %s\n", + talloc_log("\treference at %s\r\n", h->location); } return -1; @@ -2251,14 +2251,14 @@ FILE *f = (FILE *)_f; if (is_ref) { - fprintf(f, "%*sreference to: %s\n", depth*4, "", name); + fprintf(f, "%*sreference to: %s\r\n", depth*4, "", name); return; } tc = talloc_chunk_from_ptr(ptr); if (tc->limit && tc->limit->parent == tc) { fprintf(f, "%*s%-30s is a memlimit context" - " (max_size = %lu bytes, cur_size = %lu bytes)\n", + " (max_size = %lu bytes, cur_size = %lu bytes)\r\n", depth*4, "", name, (unsigned long)tc->limit->max_size, @@ -2266,14 +2266,14 @@ } if (depth == 0) { - fprintf(f,"%stalloc report on '%s' (total %6lu bytes in %3lu blocks)\n", + fprintf(f,"%stalloc report on '%s' (total %6lu bytes in %3lu blocks)\r", (max_depth < 0 ? "full " :""), name, (unsigned long)talloc_total_size(ptr), (unsigned long)talloc_total_blocks(ptr)); return; } - fprintf(f, "%*s%-30s contains %6lu bytes in %3lu blocks (ref %d) %p\n", + fprintf(f, "%*s%-30s contains %6lu bytes in %3lu blocks (ref %d) %p\r\n", depth*4, "", name, (unsigned long)talloc_total_size(ptr), @@ -2294,7 +2294,7 @@ } } } - fprintf(f, "\n"); + fprintf(f, "\r\n"); #endif } @@ -2837,14 +2837,14 @@ struct talloc_chunk *tc; if (context == NULL) { - fprintf(file, "talloc no parents for NULL\n"); + fprintf(file, "talloc no parents for NULL\r\n"); return; } tc = talloc_chunk_from_ptr(context); - fprintf(file, "talloc parents of '%s'\n", __talloc_get_name(context)); + fprintf(file, "talloc parents of '%s'\r\n", __talloc_get_name(context)); while (tc) { - fprintf(file, "\t'%s'\n", __talloc_get_name(TC_PTR_FROM_CHUNK(tc))); + fprintf(file, "\t'%s'\r\n", __talloc_get_name(TC_PTR_FROM_CHUNK(tc))); while (tc && tc->prev) tc = tc->prev; if (tc) { tc = tc->parent; @@ -2971,7 +2971,7 @@ for (l = limit; l != NULL; l = l->upper) { size_t new_cur_size = l->cur_size + size; if (new_cur_size < l->cur_size) { - talloc_abort("logic error in talloc_memlimit_grow\n"); + talloc_abort("logic error in talloc_memlimit_grow\r\n"); return; } l->cur_size = new_cur_size; @@ -2988,7 +2988,7 @@ for (l = limit; l != NULL; l = l->upper) { if (l->cur_size < size) { - talloc_abort("logic error in talloc_memlimit_shrink\n"); + talloc_abort("logic error in talloc_memlimit_shrink\r\n"); return; } l->cur_size = l->cur_size - size; -- To view, visit https://gerrit.osmocom.org/13994 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ieeb6a93c2dc9578220c73771136e2df7476f5e45 Gerrit-Change-Number: 13994 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 18:19:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 18:19:47 +0000 Subject: Change in osmo-ccid-firmware[master]: some basic talloc related vty commands Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13995 Change subject: some basic talloc related vty commands ...................................................................... some basic talloc related vty commands Change-Id: Id7c99e0c1d6b7421667425d38b512ad959142132 --- M sysmoOCTSIM/main.c 1 file changed, 27 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/95/13995/1 diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 6178f50..c2a959b 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -708,6 +708,26 @@ extern void testmode_init(void); +#include "talloc.h" +void *g_tall_ctx; + +DEFUN(_talloc_report, cmd_talloc_report, "talloc-report", "Generate a talloc report") +{ + talloc_report_full(g_tall_ctx, stdout); +} + +DEFUN(talloc_test, cmd_talloc_test, "talloc-test", "Test the talloc allocator") +{ + for (int i = 0; i < 10; i++) + talloc_named_const(g_tall_ctx, 10, "sibling"); +} + +DEFUN(v_talloc_free, cmd_talloc_free, "talloc-free", "Release all memory") +{ + talloc_free(g_tall_ctx); + g_tall_ctx = NULL; +} + /* Section 9.6 of SAMD5x/E5x Family Data Sheet */ static int get_chip_unique_serial(uint8_t *out, size_t len) { @@ -759,10 +779,17 @@ command_register(&cmd_sim_atr); command_register(&cmd_sim_iccid); testmode_init(); + command_register(&cmd_talloc_test); + command_register(&cmd_talloc_report); + command_register(&cmd_talloc_free); printf("\r\n\r\nsysmocom sysmoOCTSIM\r\n"); printf("Chip-Id %s\r\n", sernr_buf); + talloc_enable_null_tracking(); + g_tall_ctx = talloc_named_const(NULL, 0, "global"); + printf("g_tall_ctx=%p\r\n", g_tall_ctx); + command_print_prompt(); while (true) { // main loop command_try_recv(); -- To view, visit https://gerrit.osmocom.org/13995 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id7c99e0c1d6b7421667425d38b512ad959142132 Gerrit-Change-Number: 13995 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 18:19:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 18:19:47 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid_proto.h: Add enum ccid_class_spec_req Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13996 Change subject: ccid_proto.h: Add enum ccid_class_spec_req ...................................................................... ccid_proto.h: Add enum ccid_class_spec_req This list the three class specific control requests specified in the CCID spec. Change-Id: I361f1674355384a97e51374f50f4346313191a7d --- M ccid/ccid_proto.h 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/96/13996/1 diff --git a/ccid/ccid_proto.h b/ccid/ccid_proto.h index c3c740c..470416c 100644 --- a/ccid/ccid_proto.h +++ b/ccid/ccid_proto.h @@ -66,6 +66,13 @@ uint8_t bSeq; } __attribute__ ((packed)); +/* CCID Class-Specific Control Request (Section 5.3 / Table 5.3-1) */ +enum ccid_class_spec_req { + CLASS_SPEC_CCID_ABORT = 0x01, + CLASS_SPEC_CCID_GET_CLOCK_FREQ = 0x02, + CLASS_SPEC_CCID_GET_DATA_RATES = 0x03 +}; + /*********************************************************************** * Bulk OUT ***********************************************************************/ -- To view, visit https://gerrit.osmocom.org/13996 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I361f1674355384a97e51374f50f4346313191a7d Gerrit-Change-Number: 13996 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 18:19:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 18:19:47 +0000 Subject: Change in osmo-ccid-firmware[master]: Add a new (skeleton of a) USB CCID class driver Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13997 Change subject: Add a new (skeleton of a) USB CCID class driver ...................................................................... Add a new (skeleton of a) USB CCID class driver This tries to implement a USB CCID (Chip Card Interface Device) Class core driver in "ASF4 style". Code is currently mainly untested. Change-Id: Ia4d8a6cdc3de26fdc83dcbf89db894b513915a9a --- M sysmoOCTSIM/gcc/Makefile A sysmoOCTSIM/usb/class/ccid/device/ccid_df.c A sysmoOCTSIM/usb/class/ccid/device/ccid_df.h 3 files changed, 314 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/97/13997/1 diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index 2dba3e3..080aa41 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -2,6 +2,8 @@ # Automatically-generated file. Do not edit! ################################################################################ +EXTRA_CFLAGS=-I/usr/local/arm-none-eabi/include -I../../ccid + ifdef SystemRoot SHELL = cmd.exe MK_DIR = mkdir @@ -35,6 +37,7 @@ usb \ hpl/dmac \ usb/class/cdc/device \ +usb/class/ccid/device \ stdio_redirect \ hal/utils/src \ hpl/usb \ @@ -56,6 +59,7 @@ hpl/core/hpl_core_m4.o \ hal/src/hal_cache.o \ usb/class/cdc/device/cdcdf_acm.o \ +usb/class/ccid/device/ccid_df.o \ hal/utils/src/utils_syscalls.o \ stdio_redirect/gcc/read.o \ gcc/system_same54.o \ @@ -107,6 +111,7 @@ "hpl/core/hpl_core_m4.o" \ "hal/src/hal_cache.o" \ "usb/class/cdc/device/cdcdf_acm.o" \ +"usb/class/ccid/device/ccid_df.o" \ "hal/utils/src/utils_syscalls.o" \ "stdio_redirect/gcc/read.o" \ "gcc/system_same54.o" \ @@ -250,7 +255,7 @@ @echo ARM/GNU C Compiler $(QUOTE)arm-none-eabi-gcc$(QUOTE) -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54N19A__ -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ --I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/sercom" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/cdc" -I"../usb/class/cdc/device" -I"../usb/device" -I"../" -I"../config" -I"../stdio_redirect" -I"../" -I"../dma_m2m" -I"../" -I"../CMSIS/Core/Include" -I"../include" \ +-I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/sercom" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/cdc" -I"../usb/class/cdc/device" -I"../usb/class/ccid" -I"../usb/class/ccid/device" -I"../usb/device" -I"../" -I"../config" -I"../stdio_redirect" -I"../" -I"../dma_m2m" -I"../" -I"../CMSIS/Core/Include" -I"../include" \ -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<" @echo Finished building: $< @@ -259,7 +264,7 @@ @echo ARM/GNU Assembler $(QUOTE)arm-none-eabi-as$(QUOTE) -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54N19A__ -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ --I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/sercom" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/cdc" -I"../usb/class/cdc/device" -I"../usb/device" -I"../" -I"../config" -I"../stdio_redirect" -I"../" -I"../dma_m2m" -I"../" -I"../CMSIS/Core/Include" -I"../include" \ +-I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/sercom" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/cdc" -I"../usb/class/cdc/device" -I"../usb/class/ccid" -I"../usb/class/ccid/device" -I"../usb/device" -I"../" -I"../config" -I"../stdio_redirect" -I"../" -I"../dma_m2m" -I"../" -I"../CMSIS/Core/Include" -I"../include" \ -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<" @echo Finished building: $< @@ -268,7 +273,7 @@ @echo ARM/GNU Preprocessing Assembler $(QUOTE)arm-none-eabi-gcc$(QUOTE) -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54N19A__ -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ --I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/sercom" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/cdc" -I"../usb/class/cdc/device" -I"../usb/device" -I"../" -I"../config" -I"../stdio_redirect" -I"../" -I"../dma_m2m" -I"../" -I"../CMSIS/Core/Include" -I"../include" \ +-I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/sercom" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/cdc" -I"../usb/class/cdc/device" -I"../usb/class/ccid" -I"../usb/class/ccid/device" -I"../usb/device" -I"../" -I"../config" -I"../stdio_redirect" -I"../" -I"../dma_m2m" -I"../" -I"../CMSIS/Core/Include" -I"../include" \ -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<" @echo Finished building: $< diff --git a/sysmoOCTSIM/usb/class/ccid/device/ccid_df.c b/sysmoOCTSIM/usb/class/ccid/device/ccid_df.c new file mode 100644 index 0000000..018208a --- /dev/null +++ b/sysmoOCTSIM/usb/class/ccid/device/ccid_df.c @@ -0,0 +1,289 @@ +/** + * \file + * + * \brief USB Device Stack CCID Function Implementation. + * + * Copyroght (c) 2019 by Harald Welte + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "ccid_df.h" +#include "ccid_proto.h" +#include "usb_includes.h" + +#ifndef USB_CLASS_CCID +#define USB_CLASS_CCID 11 +#endif + +struct ccid_df_func_data { + uint8_t func_iface; /*!< interface number */ + uint8_t func_ep_in; /*!< IN endpoint number */ + uint8_t func_ep_out; /*!< OUT endpoint number */ + uint8_t func_ep_irq; /*!< IRQ endpoint number */ + bool enabled; /*!< is this driver/function enabled? */ + const struct usb_ccid_class_descriptor *ccid_cd; +}; + +static struct usbdf_driver _ccid_df; +static struct ccid_df_func_data _ccid_df_funcd; + +/* FIXME: make those configurable, ensure they're sized according to + * bNumClockSupported / bNumDataRatesSupported */ +static uint32_t ccid_clock_frequencies[] = { LE32(20000) }; +static uint32_t ccid_baud_rates[] = { LE32(9600) }; + +static int32_t ccid_df_enable(struct usbdf_driver *drv, struct usbd_descriptors *desc) +{ + struct ccid_df_func_data *func_data = (struct ccid_df_func_data *)(drv->func_data); + usb_iface_desc_t ifc_desc; + uint8_t *ifc, *ep; + + ifc = desc->sod; + /* FIXME: iterate over multiple interfaces? */ + + if (!ifc) + return ERR_NOT_FOUND; + + ifc_desc.bInterfaceNumber = ifc[2]; + ifc_desc.bInterfaceClass = ifc[5]; + + if (ifc_desc.bInterfaceClass != USB_CLASS_CCID) + return ERR_NOT_FOUND; + + if (func_data->func_iface == ifc_desc.bInterfaceNumber) + return ERR_ALREADY_INITIALIZED; + else if (func_data->func_iface != 0xff) + return ERR_NO_RESOURCE; + + func_data->func_iface = ifc_desc.bInterfaceNumber; + + ep = usb_find_desc(ifc, desc->eod, USB_DT_ENDPOINT); + while (NULL != ep) { + usb_ep_desc_t ep_desc; + ep_desc.bEndpointAddress = ep[2]; + ep_desc.bmAttributes = ep[3]; + ep_desc.wMaxPacketSize = usb_get_u16(ep + 4); + if (usb_d_ep_init(ep_desc.bEndpointAddress, ep_desc.bmAttributes, ep_desc.wMaxPacketSize)) + return ERR_NOT_INITIALIZED; + if (ep_desc.bEndpointAddress & USB_EP_DIR_IN) { + if ((ep_desc.bmAttributes & USB_EP_XTYPE_MASK) == USB_EP_XTYPE_INTERRUPT) + func_data->func_ep_irq = ep_desc.bEndpointAddress; + else + func_data->func_ep_in = ep_desc.bEndpointAddress; + } else { + func_data->func_ep_out = ep_desc.bEndpointAddress; + } + usb_d_ep_enable(ep_desc.bEndpointAddress); + desc->sod = ep; + ep = usb_find_ep_desc(usb_desc_next(desc->sod), desc->eod); + } + + ASSERT(func_data->func_ep_irq); + ASSERT(func_data->func_ep_in); + ASSERT(func_data->func_ep_out); + + _ccid_df_funcd.enabled = true; + return ERR_NONE; +} + +static int32_t ccid_df_disable(struct usbdf_driver *drv, struct usbd_descriptors *desc) +{ + struct ccid_df_func_data *func_data = (struct ccid_df_func_data *)(drv->func_data); + usb_iface_desc_t ifc_desc; + + if (desc) { + ifc_desc.bInterfaceClass = desc->sod[5]; + if (ifc_desc.bInterfaceClass != USB_CLASS_CCID) + return ERR_NOT_FOUND; + } + + func_data->func_iface = 0xff; + if (func_data->func_ep_in != 0xff) { + func_data->func_ep_in = 0xff; + usb_d_ep_deinit(func_data->func_ep_in); + } + if (func_data->func_ep_out != 0xff) { + func_data->func_ep_out = 0xff; + usb_d_ep_deinit(func_data->func_ep_out); + } + if (func_data->func_ep_irq != 0xff) { + func_data->func_ep_irq = 0xff; + usb_d_ep_deinit(func_data->func_ep_irq); + } + + _ccid_df_funcd.enabled = true; + return ERR_NONE; +} + +/*! \brief CCID Control Function (callback with USB core) */ +static int32_t ccid_df_ctrl(struct usbdf_driver *drv, enum usbdf_control ctrl, void *param) +{ + switch (ctrl) { + case USBDF_ENABLE: + return ccid_df_enable(drv, (struct usbd_descriptors *)param); + case USBDF_DISABLE: + return ccid_df_disable(drv, (struct usbd_descriptors *)param); + case USBDF_GET_IFACE: + return ERR_UNSUPPORTED_OP; + default: + return ERR_INVALID_ARG; + } +} + +/* Section 5.3.1: ABORT */ +static int32_t ccid_df_ctrl_req_ccid_abort(uint8_t ep, struct usb_req *req, + enum usb_ctrl_stage stage) +{ + const struct usb_ccid_class_descriptor *ccid_cd = _ccid_df_funcd.ccid_cd; + uint8_t slot_nr = req->wValue & 0xff; + + if (slot_nr > ccid_cd->bMaxSlotIndex) + return ERR_INVALID_ARG; + slot_nr = req->wValue; + + /* FIXME: Implement Abort handling, particularly in combination with + * the PC_to_RDR_Abort on the OUT EP */ + return ERR_NONE; +} + +/* Section 5.3.2: return array of DWORD containing clock frequencies in kHz */ +static int32_t ccid_df_ctrl_req_ccid_get_clock_freq(uint8_t ep, struct usb_req *req, + enum usb_ctrl_stage stage) +{ + const struct usb_ccid_class_descriptor *ccid_cd = _ccid_df_funcd.ccid_cd; + + if (stage != USB_DATA_STAGE) + return ERR_NONE; + + if (req->wLength != ccid_cd->bNumClockSupported * sizeof(uint32_t)) + return ERR_INVALID_DATA; + + return usbdc_xfer(ep, (uint8_t *)ccid_clock_frequencies, req->wLength, false); +} + +/* Section 5.3.3: return array of DWORD containing data rates in bps */ +static int32_t ccid_df_ctrl_req_ccid_get_data_rates(uint8_t ep, struct usb_req *req, + enum usb_ctrl_stage stage) +{ + const struct usb_ccid_class_descriptor *ccid_cd = _ccid_df_funcd.ccid_cd; + + if (stage != USB_DATA_STAGE) + return ERR_NONE; + + if (req->wLength != ccid_cd->bNumDataRatesSupported * sizeof(uint32_t)) + return ERR_INVALID_DATA; + + return usbdc_xfer(ep, (uint8_t *)ccid_baud_rates, req->wLength, false); +} + + +/* process a control endpoint request */ +static int32_t ccid_df_ctrl_req(uint8_t ep, struct usb_req *req, enum usb_ctrl_stage stage) +{ + /* verify this is a class-specific request */ + if (0x01 != ((req->bmRequestType >> 5) & 0x03)) + return ERR_NOT_FOUND; + + /* Verify req->wIndex == interface */ + if (req->wIndex != _ccid_df_funcd.func_iface) + return ERR_NOT_FOUND; + + switch (req->bRequest) { + case CLASS_SPEC_CCID_ABORT: + if (req->bmRequestType & USB_EP_DIR_IN) + return ERR_INVALID_ARG; + return ccid_df_ctrl_req_ccid_abort(ep, req, stage); + case CLASS_SPEC_CCID_GET_CLOCK_FREQ: + if (!(req->bmRequestType & USB_EP_DIR_IN)) + return ERR_INVALID_ARG; + return ccid_df_ctrl_req_ccid_get_clock_freq(ep, req, stage); + case CLASS_SPEC_CCID_GET_DATA_RATES: + if (!(req->bmRequestType & USB_EP_DIR_IN)) + return ERR_INVALID_ARG; + return ccid_df_ctrl_req_ccid_get_data_rates(ep, req, stage); + default: + return ERR_NOT_FOUND; + } +} + +static struct usbdc_handler ccid_df_req_h = { NULL, (FUNC_PTR) ccid_df_ctrl_req }; + +int32_t ccid_df_init(void) +{ + if (usbdc_get_state() > USBD_S_POWER) + return ERR_DENIED; + + _ccid_df.ctrl = ccid_df_ctrl; + _ccid_df.func_data = &_ccid_df_funcd; + + /* register the actual USB Function */ + usbdc_register_function(&_ccid_df); + /* register the call-back for control endpoint handling */ + usbdc_register_handler(USBDC_HDL_REQ, &ccid_df_req_h); + + return ERR_NONE; +} + +void ccid_df_deinit(void) +{ + usb_d_ep_deinit(_ccid_df_funcd.func_ep_in); + usb_d_ep_deinit(_ccid_df_funcd.func_ep_out); + usb_d_ep_deinit(_ccid_df_funcd.func_ep_irq); +} + +int32_t ccid_df_read_out(uint8_t *buf, uint32_t size) +{ + if (!ccid_df_is_enabled()) + return ERR_DENIED; + return usbdc_xfer(_ccid_df_funcd.func_ep_out, buf, size, false); +} + +int32_t ccid_df_write_in(uint8_t *buf, uint32_t size) +{ + if (!ccid_df_is_enabled()) + return ERR_DENIED; + return usbdc_xfer(_ccid_df_funcd.func_ep_in, buf, size, true); +} + +int32_t ccid_df_write_irq(uint8_t *buf, uint32_t size) +{ + if (!ccid_df_is_enabled()) + return ERR_DENIED; + return usbdc_xfer(_ccid_df_funcd.func_ep_irq, buf, size, true); +} + +int32_t ccid_df_register_callback(enum ccid_df_cb_type cb_type, FUNC_PTR func) +{ + switch (cb_type) { + case CCID_DF_CB_READ_OUT: + usb_d_ep_register_callback(_ccid_df_funcd.func_ep_out, USB_D_EP_CB_XFER, func); + break; + case CCID_DF_CB_WRITE_IN: + usb_d_ep_register_callback(_ccid_df_funcd.func_ep_in, USB_D_EP_CB_XFER, func); + break; + case CCID_DF_CB_WRITE_IRQ: + usb_d_ep_register_callback(_ccid_df_funcd.func_ep_irq, USB_D_EP_CB_XFER, func); + break; + default: + return ERR_INVALID_ARG; + } + return ERR_NONE; +} + +bool ccid_df_is_enabled(void) +{ + return _ccid_df_funcd.enabled; +} diff --git a/sysmoOCTSIM/usb/class/ccid/device/ccid_df.h b/sysmoOCTSIM/usb/class/ccid/device/ccid_df.h new file mode 100644 index 0000000..21fa99e --- /dev/null +++ b/sysmoOCTSIM/usb/class/ccid/device/ccid_df.h @@ -0,0 +1,17 @@ +#pragma once + +#include "usbdc.h" + +enum ccid_df_cb_type { + CCID_DF_CB_READ_OUT, + CCID_DF_CB_WRITE_IN, + CCID_DF_CB_WRITE_IRQ, +}; + +int32_t ccid_df_init(void); +void ccid_df_deinit(void); +int32_t ccid_df_read_out(uint8_t *buf, uint32_t size); +int32_t ccid_df_write_in(uint8_t *buf, uint32_t size); +int32_t ccid_df_write_irq(uint8_t *buf, uint32_t size); +int32_t ccid_df_register_callback(enum ccid_df_cb_type cb_type, FUNC_PTR ptr); +bool ccid_df_is_enabled(void); -- To view, visit https://gerrit.osmocom.org/13997 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ia4d8a6cdc3de26fdc83dcbf89db894b513915a9a Gerrit-Change-Number: 13997 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 18:19:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 18:19:47 +0000 Subject: Change in osmo-ccid-firmware[master]: Re-structure USB descriptors Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13998 Change subject: Re-structure USB descriptors ...................................................................... Re-structure USB descriptors Use structures to define the USB descriptors of the sysmoOCTSIM device. While at it, turn it from a pure CDC-ACM to a CDC-ACM + CCID interface, so we can expose a virtual UART at the same time as the chip card reader device. Change-Id: I0423d733476f37c16bdb6abc651b7ad5ca7ac63e --- M sysmoOCTSIM/atmel_start.c M sysmoOCTSIM/config/hpl_usb_config.h M sysmoOCTSIM/gcc/Makefile A sysmoOCTSIM/usb_descriptors.c M sysmoOCTSIM/usb_start.c 5 files changed, 250 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/98/13998/1 diff --git a/sysmoOCTSIM/atmel_start.c b/sysmoOCTSIM/atmel_start.c index fd566dd..bee1ed2 100644 --- a/sysmoOCTSIM/atmel_start.c +++ b/sysmoOCTSIM/atmel_start.c @@ -12,8 +12,8 @@ void atmel_start_init(void) { system_init(); - usb_init(); dma_memory_init(); dma_memory_register_callback(DMA_MEMORY_COMPLETE_CB, M2M_DMA_complete_cb); stdio_redirect_init(); + usb_init(); } diff --git a/sysmoOCTSIM/config/hpl_usb_config.h b/sysmoOCTSIM/config/hpl_usb_config.h index 73a9fea..bbfd99d 100644 --- a/sysmoOCTSIM/config/hpl_usb_config.h +++ b/sysmoOCTSIM/config/hpl_usb_config.h @@ -39,7 +39,7 @@ // Max possible (by "Max Endpoint Number" config) // usbd_num_ep_sp #ifndef CONF_USB_D_NUM_EP_SP -#define CONF_USB_D_NUM_EP_SP CONF_USB_N_4 +#define CONF_USB_D_NUM_EP_SP CONF_USB_N_6 #endif // @@ -60,7 +60,7 @@ // The number of physical endpoints - 1 // usbd_arch_max_ep_n #ifndef CONF_USB_D_MAX_EP_N -#define CONF_USB_D_MAX_EP_N CONF_USB_N_2 +#define CONF_USB_D_MAX_EP_N CONF_USB_N_4 #endif // USB Speed Limit diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index 080aa41..7684204 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -84,6 +84,7 @@ main.o \ manual_test.o \ talloc.o \ +usb_descriptors.o \ i2c_bitbang.o \ octsim_i2c.o \ ncn8025.o \ @@ -136,6 +137,7 @@ "main.o" \ "manual_test.o" \ "talloc.o" \ +"usb_descriptors.o" \ "i2c_bitbang.o" \ "octsim_i2c.o" \ "ncn8025.o" \ @@ -194,6 +196,7 @@ "main.d" \ "manual_test.d" \ "talloc.d" \ +"usb_descriptors.d" \ "i2c_bitbang.d" \ "octsim_i2c.d" \ "ncn8025.d" \ diff --git a/sysmoOCTSIM/usb_descriptors.c b/sysmoOCTSIM/usb_descriptors.c new file mode 100644 index 0000000..429e8c2 --- /dev/null +++ b/sysmoOCTSIM/usb_descriptors.c @@ -0,0 +1,241 @@ +#include "usbd_config.h" +#include "usbdc.h" +#include "usb_protocol.h" +#include "usb_protocol_cdc.h" +#include "ccid_proto.h" +#include "cdcdf_acm_desc.h" + +/* aggregate descriptors for the combined CDC-ACM + CCID device that we expose + * from sysmoQMOD */ + +enum str_desc_num { + STR_DESC_MANUF = 1, + STR_DESC_PRODUCT, + STR_DESC_CONFIG, + STR_DESC_INTF_ACM_COMM, + STR_DESC_INTF_ACM_DATA, + STR_DESC_INTF_CCID, + STR_DESC_SERIAL, +}; + +/* a struct of structs representing the concatenated collection of USB descriptors */ +struct usb_desc_collection { + struct usb_dev_desc dev; + struct usb_config_desc cfg; + + /* CDC-ACM: Two interfaces, one with IRQ EP and one with BULK IN + OUT */ + struct { + struct { + struct usb_iface_desc iface; + struct usb_cdc_hdr_desc cdc_hdr; + struct usb_cdc_call_mgmt_desc cdc_call_mgmt; + struct usb_cdc_acm_desc cdc_acm; + struct usb_cdc_union_desc cdc_union; + struct usb_ep_desc ep[1]; + } comm; + struct { + struct usb_iface_desc iface; + struct usb_ep_desc ep[2]; + } data; + } cdc; + + /* CCID: One interface with CCID class descriptor and three endpoints */ + struct { + struct usb_iface_desc iface; + struct usb_ccid_class_descriptor class; + struct usb_ep_desc ep[3]; + } ccid; + uint8_t str[116]; +} __attribute__((packed)); + +static const struct usb_desc_collection usb_fs_descs = { + .dev = { + .bLength = sizeof(struct usb_dev_desc), + .bDescriptorType = USB_DT_DEVICE, + .bcdUSB = USB_V2_0, + .bDeviceClass = 0x02, + .bDeviceSubClass = 0, + .bDeviceProtocol = 0, + .bMaxPacketSize0 = CONF_USB_CDCD_ACM_BMAXPKSZ0, + .idVendor = CONF_USB_CDCD_ACM_IDVENDER, + .idProduct = CONF_USB_CDCD_ACM_IDPRODUCT, + .iManufacturer = STR_DESC_MANUF, + .iProduct = STR_DESC_PRODUCT, + .iSerialNumber = STR_DESC_SERIAL, + .bNumConfigurations = 1, + }, + .cfg = { + .bLength = sizeof(struct usb_config_desc), + .bDescriptorType = USB_DT_CONFIG, + .wTotalLength = sizeof(usb_fs_descs.cfg) + + sizeof(usb_fs_descs.cdc) + + sizeof(usb_fs_descs.ccid), + .bNumInterfaces = 3, + .bConfigurationValue = CONF_USB_CDCD_ACM_BCONFIGVAL, + .iConfiguration = STR_DESC_CONFIG, + .bmAttributes = CONF_USB_CDCD_ACM_BMATTRI, + .bMaxPower = CONF_USB_CDCD_ACM_BMAXPOWER, + }, + .cdc = { + .comm = { + .iface = { + .bLength = sizeof(struct usb_iface_desc), + .bDescriptorType = USB_DT_INTERFACE, + .bInterfaceNumber = CONF_USB_CDCD_ACM_COMM_BIFCNUM, + .bAlternateSetting = CONF_USB_CDCD_ACM_COMM_BALTSET, + .bNumEndpoints = 1, + .bInterfaceClass = CDC_CLASS_COMM, + .bInterfaceSubClass = CDC_SUBCLASS_ACM, + .bInterfaceProtocol = 0x00, + .iInterface = STR_DESC_INTF_ACM_COMM, + }, + .cdc_hdr = { + .bFunctionLength = sizeof(struct usb_cdc_hdr_desc), + .bDescriptorType = CDC_CS_INTERFACE, + .bDescriptorSubtype = CDC_SCS_HEADER, + .bcdCDC = LE16(0x1001), + }, + .cdc_call_mgmt = { + .bFunctionLength = sizeof(struct usb_cdc_call_mgmt_desc), + .bDescriptorType = CDC_CS_INTERFACE, + .bDescriptorSubtype = CDC_SCS_CALL_MGMT, + .bmCapabilities = 0x01, + .bDataInterface = 0x00, + }, + .cdc_acm = { + .bFunctionLength = sizeof(struct usb_cdc_acm_desc), + .bDescriptorType = CDC_CS_INTERFACE, + .bDescriptorSubtype = CDC_SCS_ACM, + .bmCapabilities = 0x02, + }, + .cdc_union = { + .bFunctionLength = sizeof(struct usb_cdc_union_desc), + .bDescriptorType = CDC_CS_INTERFACE, + .bDescriptorSubtype = CDC_SCS_UNION, + .bMasterInterface = CONF_USB_CDCD_ACM_COMM_BIFCNUM, + .bSlaveInterface0 = 0x01, + }, + .ep = { + { + .bLength = sizeof(struct usb_ep_desc), + .bDescriptorType = USB_DT_ENDPOINT, + .bEndpointAddress = CONF_USB_CDCD_ACM_COMM_INT_EPADDR, + .bmAttributes = USB_EP_TYPE_INTERRUPT, + .wMaxPacketSize = CONF_USB_CDCD_ACM_COMM_INT_MAXPKSZ, + .bInterval = CONF_USB_CDCD_ACM_COMM_INT_INTERVAL, + }, + }, + }, + .data = { + .iface = { + .bLength = sizeof(struct usb_iface_desc), + .bDescriptorType = USB_DT_INTERFACE, + .bInterfaceNumber = CONF_USB_CDCD_ACM_DATA_BIFCNUM, + .bAlternateSetting = CONF_USB_CDCD_ACM_DATA_BALTSET, + .bNumEndpoints = 2, + .bInterfaceClass = CDC_CLASS_DATA, + .bInterfaceSubClass = 0x00, + .bInterfaceProtocol = 0x00, + .iInterface = STR_DESC_INTF_ACM_DATA, + }, + .ep = { + { + .bLength = sizeof(struct usb_ep_desc), + .bDescriptorType = USB_DT_ENDPOINT, + .bEndpointAddress = CONF_USB_CDCD_ACM_DATA_BULKOUT_EPADDR, + .bmAttributes = USB_EP_TYPE_BULK, + .wMaxPacketSize = CONF_USB_CDCD_ACM_DATA_BULKOUT_MAXPKSZ, + .bInterval = 0, + }, + { + .bLength = sizeof(struct usb_ep_desc), + .bDescriptorType = USB_DT_ENDPOINT, + .bEndpointAddress = CONF_USB_CDCD_ACM_DATA_BULKIN_EPADDR, + .bmAttributes = USB_EP_TYPE_BULK, + .wMaxPacketSize = CONF_USB_CDCD_ACM_DATA_BULKIN_MAXPKSZ, + .bInterval = 0, + }, + }, + }, + }, + .ccid = { + .iface = { + .bLength = sizeof(struct usb_iface_desc), + .bDescriptorType = USB_DT_INTERFACE, + .bInterfaceNumber = 2, + .bAlternateSetting = 0, + .bNumEndpoints = 3, + .bInterfaceClass = 11, + .bInterfaceSubClass = 0, + .bInterfaceProtocol = 0, + .iInterface = STR_DESC_INTF_CCID, + }, + .class = { + .bLength = sizeof(struct usb_ccid_class_descriptor), + .bDescriptorType = 33, + .bcdCCID = LE16(0x0110), + .bMaxSlotIndex = 7, + .dwProtocols = 0x07, /* 5/3/1.8V */ + .dwDefaultClock = LE32(2500), + .dwMaximumClock = LE32(20000), + .bNumClockSupported = 4, + .dwDataRate = LE32(9600), + .dwMaxDataRate = LE32(921600), + .bNumDataRatesSupported = 0, + .dwMaxIFSD = LE32(0), + .dwSynchProtocols = LE32(0), + .dwMechanical = LE32(0), + .dwFeatures = LE32(0x10), + .dwMaxCCIDMessageLength = 272, + .bClassGetResponse = 0xff, + .bClassEnvelope = 0xff, + .wLcdLayout = LE16(0), + .bPINSupport = 0, + .bMaxCCIDBusySlots = 8, + }, + .ep = { + { /* Bulk-OUT descriptor */ + .bLength = sizeof(struct usb_ep_desc), + .bDescriptorType = USB_DT_ENDPOINT, + .bEndpointAddress = 0x02, + .bmAttributes = USB_EP_TYPE_BULK, + .wMaxPacketSize = 64, + .bInterval = 0, + }, + { /* Bulk-IN descriptor */ + .bLength = sizeof(struct usb_ep_desc), + .bDescriptorType = USB_DT_ENDPOINT, + .bEndpointAddress = 0x83, + .bmAttributes = USB_EP_TYPE_BULK, + .wMaxPacketSize = 64, + .bInterval = 0, + }, + { /* Interrupt dscriptor */ + .bLength = sizeof(struct usb_ep_desc), + .bDescriptorType = USB_DT_ENDPOINT, + .bEndpointAddress = 0x84, + .bmAttributes = USB_EP_TYPE_INTERRUPT, + .wMaxPacketSize = 64, + .bInterval = 0x10, + }, + }, + }, + //DFURT_IF_DESCRIPTOR, + .str = { +#if 0 + CDCD_ACM_STR_DESCES +#else + 4, 3, 0x09, 0x04, + 18, 3, 's',0, 'y',0, 's',0, 'm',0, 'o',0, 'c',0, 'o',0, 'm',0, + 24, 3, 's',0, 'y',0, 's',0, 'm',0, 'o',0, 'O',0, 'C',0, 'T',0, 'S',0, 'I',0, 'M',0, + 4, 3, 'A', 0, + 22, 3, 'd',0, 'e',0, 'b',0, 'u',0, 'g',0, ' ',0, 'U',0, 'A',0, 'R',0, 'T',0, + 22, 3, 'd',0, 'e',0, 'b',0, 'u',0, 'g',0, ' ',0, 'U',0, 'A',0, 'R',0, 'T',0, + 10, 3, 'C',0, 'C',0, 'I',0, 'D',0, + 12, 3, 'F',0, 'I',0, 'X',0, 'M',0, 'E',0, +#endif + } +}; + +const struct usbd_descriptors usb_descs[] + = {{ (uint8_t *)&usb_fs_descs, (uint8_t *)&usb_fs_descs + sizeof(usb_fs_descs) }}; diff --git a/sysmoOCTSIM/usb_start.c b/sysmoOCTSIM/usb_start.c index d02edc0..83fac81 100644 --- a/sysmoOCTSIM/usb_start.c +++ b/sysmoOCTSIM/usb_start.c @@ -8,28 +8,7 @@ #include "atmel_start.h" #include "usb_start.h" -#if CONF_USBD_HS_SP -static uint8_t single_desc_bytes[] = { - /* Device descriptors and Configuration descriptors list. */ - CDCD_ACM_HS_DESCES_LS_FS}; -static uint8_t single_desc_bytes_hs[] = { - /* Device descriptors and Configuration descriptors list. */ - CDCD_ACM_HS_DESCES_HS}; -#define CDCD_ECHO_BUF_SIZ CONF_USB_CDCD_ACM_DATA_BULKIN_MAXPKSZ_HS -#else -static uint8_t single_desc_bytes[] = { - /* Device descriptors and Configuration descriptors list. */ - CDCD_ACM_DESCES_LS_FS}; #define CDCD_ECHO_BUF_SIZ CONF_USB_CDCD_ACM_DATA_BULKIN_MAXPKSZ -#endif - -static struct usbd_descriptors single_desc[] - = {{single_desc_bytes, single_desc_bytes + sizeof(single_desc_bytes)} -#if CONF_USBD_HS_SP - , - {single_desc_bytes_hs, single_desc_bytes_hs + sizeof(single_desc_bytes_hs)} -#endif -}; /** Buffers to receive and echo the communication bytes. */ static uint32_t usbd_cdc_buffer[CDCD_ECHO_BUF_SIZ / 4]; @@ -77,6 +56,8 @@ return false; } +extern const struct usbd_descriptors usb_descs[]; + /** * \brief CDC ACM Init */ @@ -88,7 +69,7 @@ /* usbdc_register_funcion inside */ cdcdf_acm_init(); - usbdc_start(single_desc); + usbdc_start((struct usbd_descriptors *) usb_descs); usbdc_attach(); } -- To view, visit https://gerrit.osmocom.org/13998 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I0423d733476f37c16bdb6abc651b7ad5ca7ac63e Gerrit-Change-Number: 13998 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 18:23:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 18:23:47 +0000 Subject: Change in osmo-ccid-firmware[master]: some basic talloc related vty commands In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13995 to look at the new patch set (#2). Change subject: some basic talloc related vty commands ...................................................................... some basic talloc related vty commands Change-Id: Id7c99e0c1d6b7421667425d38b512ad959142132 --- M sysmoOCTSIM/main.c 1 file changed, 27 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/95/13995/2 -- To view, visit https://gerrit.osmocom.org/13995 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id7c99e0c1d6b7421667425d38b512ad959142132 Gerrit-Change-Number: 13995 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 18:24:28 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 18:24:28 +0000 Subject: Change in osmo-ccid-firmware[master]: Import libtalloc-2.1.14 into the tree In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13993 ) Change subject: Import libtalloc-2.1.14 into the tree ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13993 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibd31b40d5b75b3fc1783a6b02b0e97da430e0f60 Gerrit-Change-Number: 13993 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sat, 11 May 2019 18:24:28 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 18:24:34 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 18:24:34 +0000 Subject: Change in osmo-ccid-firmware[master]: talloc: \n -> \r\n for serial output In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13994 ) Change subject: talloc: \n -> \r\n for serial output ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13994 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ieeb6a93c2dc9578220c73771136e2df7476f5e45 Gerrit-Change-Number: 13994 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sat, 11 May 2019 18:24:34 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 18:24:36 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 18:24:36 +0000 Subject: Change in osmo-ccid-firmware[master]: some basic talloc related vty commands In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13995 ) Change subject: some basic talloc related vty commands ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13995 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id7c99e0c1d6b7421667425d38b512ad959142132 Gerrit-Change-Number: 13995 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sat, 11 May 2019 18:24:36 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 18:24:39 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 18:24:39 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid_proto.h: Add enum ccid_class_spec_req In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13996 ) Change subject: ccid_proto.h: Add enum ccid_class_spec_req ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13996 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I361f1674355384a97e51374f50f4346313191a7d Gerrit-Change-Number: 13996 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sat, 11 May 2019 18:24:39 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 18:24:44 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 18:24:44 +0000 Subject: Change in osmo-ccid-firmware[master]: Import libtalloc-2.1.14 into the tree In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13993 ) Change subject: Import libtalloc-2.1.14 into the tree ...................................................................... Import libtalloc-2.1.14 into the tree talloc is a hirearchical memory allocator which Osmocom uses a lot for its userspace programs on Linux. Experiments show that it's actually very much possible to use it inside of microcontroller firmware projects, particularly the small subset which we generally use. Change-Id: Ibd31b40d5b75b3fc1783a6b02b0e97da430e0f60 --- M sysmoOCTSIM/gcc/Makefile A sysmoOCTSIM/replace.h A sysmoOCTSIM/talloc.c A sysmoOCTSIM/talloc.h 4 files changed, 4,989 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index cf0484c..2dba3e3 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -79,6 +79,7 @@ hal/src/hal_usb_device.o \ main.o \ manual_test.o \ +talloc.o \ i2c_bitbang.o \ octsim_i2c.o \ ncn8025.o \ @@ -129,6 +130,7 @@ "hal/src/hal_usb_device.o" \ "main.o" \ "manual_test.o" \ +"talloc.o" \ "i2c_bitbang.o" \ "octsim_i2c.o" \ "ncn8025.o" \ @@ -186,6 +188,7 @@ "hpl/osc32kctrl/hpl_osc32kctrl.d" \ "main.d" \ "manual_test.d" \ +"talloc.d" \ "i2c_bitbang.d" \ "octsim_i2c.d" \ "ncn8025.d" \ diff --git a/sysmoOCTSIM/replace.h b/sysmoOCTSIM/replace.h new file mode 100644 index 0000000..711f3a5 --- /dev/null +++ b/sysmoOCTSIM/replace.h @@ -0,0 +1,27 @@ +#pragma once +/* whatever talloc 2.1.14 (from Debian talloc-2.1.14-2) required to build it + * with gcc-arm-none-eabi on a Debian unstable system */ + +#include +#include +#include +#include + +#ifndef _PUBLIC_ +#define _PUBLIC_ __attribute__((visibility("default"))) +#endif + +#ifndef MIN +#define MIN(a,b) ((a)<(b)?(a):(b)) +#endif + +#ifndef MAX +#define MAX(a,b) ((a)>(b)?(a):(b)) +#endif + +#define TALLOC_BUILD_VERSION_MAJOR 2 +#define TALLOC_BUILD_VERSION_MINOR 1 +#define TALLOC_BUILD_VERSION_RELEASE 14 + +#define HAVE_VA_COPY +#define HAVE_CONSTRUCTOR_ATTRIBUTE diff --git a/sysmoOCTSIM/talloc.c b/sysmoOCTSIM/talloc.c new file mode 100644 index 0000000..54be634 --- /dev/null +++ b/sysmoOCTSIM/talloc.c @@ -0,0 +1,3025 @@ +/* + Samba Unix SMB/CIFS implementation. + + Samba trivial allocation library - new interface + + NOTE: Please read talloc_guide.txt for full documentation + + Copyright (C) Andrew Tridgell 2004 + Copyright (C) Stefan Metzmacher 2006 + + ** NOTE! The following LGPL license applies to the talloc + ** library. This does NOT imply that all of Samba is released + ** under the LGPL + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, see . +*/ + +/* + inspired by http://swapped.cc/halloc/ +*/ + +#include "replace.h" +#include "talloc.h" + +#ifdef HAVE_SYS_AUXV_H +#include +#endif + +#if (TALLOC_VERSION_MAJOR != TALLOC_BUILD_VERSION_MAJOR) +#error "TALLOC_VERSION_MAJOR != TALLOC_BUILD_VERSION_MAJOR" +#endif + +#if (TALLOC_VERSION_MINOR != TALLOC_BUILD_VERSION_MINOR) +#error "TALLOC_VERSION_MINOR != TALLOC_BUILD_VERSION_MINOR" +#endif + +/* Special macros that are no-ops except when run under Valgrind on + * x86. They've moved a little bit from valgrind 1.0.4 to 1.9.4 */ +#ifdef HAVE_VALGRIND_MEMCHECK_H + /* memcheck.h includes valgrind.h */ +#include +#elif defined(HAVE_VALGRIND_H) +#include +#endif + +/* use this to force every realloc to change the pointer, to stress test + code that might not cope */ +#define ALWAYS_REALLOC 0 + + +#define MAX_TALLOC_SIZE 0x10000000 + +#define TALLOC_FLAG_FREE 0x01 +#define TALLOC_FLAG_LOOP 0x02 +#define TALLOC_FLAG_POOL 0x04 /* This is a talloc pool */ +#define TALLOC_FLAG_POOLMEM 0x08 /* This is allocated in a pool */ + +/* + * Bits above this are random, used to make it harder to fake talloc + * headers during an attack. Try not to change this without good reason. + */ +#define TALLOC_FLAG_MASK 0x0F + +#define TALLOC_MAGIC_REFERENCE ((const char *)1) + +#define TALLOC_MAGIC_BASE 0xe814ec70 +#define TALLOC_MAGIC_NON_RANDOM ( \ + ~TALLOC_FLAG_MASK & ( \ + TALLOC_MAGIC_BASE + \ + (TALLOC_BUILD_VERSION_MAJOR << 24) + \ + (TALLOC_BUILD_VERSION_MINOR << 16) + \ + (TALLOC_BUILD_VERSION_RELEASE << 8))) +static unsigned int talloc_magic = TALLOC_MAGIC_NON_RANDOM; + +/* by default we abort when given a bad pointer (such as when talloc_free() is called + on a pointer that came from malloc() */ +#ifndef TALLOC_ABORT +#define TALLOC_ABORT(reason) abort() +#endif + +#ifndef discard_const_p +#if defined(__intptr_t_defined) || defined(HAVE_INTPTR_T) +# define discard_const_p(type, ptr) ((type *)((intptr_t)(ptr))) +#else +# define discard_const_p(type, ptr) ((type *)(ptr)) +#endif +#endif + +/* these macros gain us a few percent of speed on gcc */ +#if (__GNUC__ >= 3) +/* the strange !! is to ensure that __builtin_expect() takes either 0 or 1 + as its first argument */ +#ifndef likely +#define likely(x) __builtin_expect(!!(x), 1) +#endif +#ifndef unlikely +#define unlikely(x) __builtin_expect(!!(x), 0) +#endif +#else +#ifndef likely +#define likely(x) (x) +#endif +#ifndef unlikely +#define unlikely(x) (x) +#endif +#endif + +/* this null_context is only used if talloc_enable_leak_report() or + talloc_enable_leak_report_full() is called, otherwise it remains + NULL +*/ +static void *null_context; +static bool talloc_report_null; +static bool talloc_report_null_full; +static void *autofree_context; + +static void talloc_setup_atexit(void); + +/* used to enable fill of memory on free, which can be useful for + * catching use after free errors when valgrind is too slow + */ +static struct { + bool initialised; + bool enabled; + uint8_t fill_value; +} talloc_fill; + +#define TALLOC_FILL_ENV "TALLOC_FREE_FILL" + +/* + * do not wipe the header, to allow the + * double-free logic to still work + */ +#define TC_INVALIDATE_FULL_FILL_CHUNK(_tc) do { \ + if (unlikely(talloc_fill.enabled)) { \ + size_t _flen = (_tc)->size; \ + char *_fptr = (char *)TC_PTR_FROM_CHUNK(_tc); \ + memset(_fptr, talloc_fill.fill_value, _flen); \ + } \ +} while (0) + +#if defined(DEVELOPER) && defined(VALGRIND_MAKE_MEM_NOACCESS) +/* Mark the whole chunk as not accessable */ +#define TC_INVALIDATE_FULL_VALGRIND_CHUNK(_tc) do { \ + size_t _flen = TC_HDR_SIZE + (_tc)->size; \ + char *_fptr = (char *)(_tc); \ + VALGRIND_MAKE_MEM_NOACCESS(_fptr, _flen); \ +} while(0) +#else +#define TC_INVALIDATE_FULL_VALGRIND_CHUNK(_tc) do { } while (0) +#endif + +#define TC_INVALIDATE_FULL_CHUNK(_tc) do { \ + TC_INVALIDATE_FULL_FILL_CHUNK(_tc); \ + TC_INVALIDATE_FULL_VALGRIND_CHUNK(_tc); \ +} while (0) + +#define TC_INVALIDATE_SHRINK_FILL_CHUNK(_tc, _new_size) do { \ + if (unlikely(talloc_fill.enabled)) { \ + size_t _flen = (_tc)->size - (_new_size); \ + char *_fptr = (char *)TC_PTR_FROM_CHUNK(_tc); \ + _fptr += (_new_size); \ + memset(_fptr, talloc_fill.fill_value, _flen); \ + } \ +} while (0) + +#if defined(DEVELOPER) && defined(VALGRIND_MAKE_MEM_NOACCESS) +/* Mark the unused bytes not accessable */ +#define TC_INVALIDATE_SHRINK_VALGRIND_CHUNK(_tc, _new_size) do { \ + size_t _flen = (_tc)->size - (_new_size); \ + char *_fptr = (char *)TC_PTR_FROM_CHUNK(_tc); \ + _fptr += (_new_size); \ + VALGRIND_MAKE_MEM_NOACCESS(_fptr, _flen); \ +} while (0) +#else +#define TC_INVALIDATE_SHRINK_VALGRIND_CHUNK(_tc, _new_size) do { } while (0) +#endif + +#define TC_INVALIDATE_SHRINK_CHUNK(_tc, _new_size) do { \ + TC_INVALIDATE_SHRINK_FILL_CHUNK(_tc, _new_size); \ + TC_INVALIDATE_SHRINK_VALGRIND_CHUNK(_tc, _new_size); \ +} while (0) + +#define TC_UNDEFINE_SHRINK_FILL_CHUNK(_tc, _new_size) do { \ + if (unlikely(talloc_fill.enabled)) { \ + size_t _flen = (_tc)->size - (_new_size); \ + char *_fptr = (char *)TC_PTR_FROM_CHUNK(_tc); \ + _fptr += (_new_size); \ + memset(_fptr, talloc_fill.fill_value, _flen); \ + } \ +} while (0) + +#if defined(DEVELOPER) && defined(VALGRIND_MAKE_MEM_UNDEFINED) +/* Mark the unused bytes as undefined */ +#define TC_UNDEFINE_SHRINK_VALGRIND_CHUNK(_tc, _new_size) do { \ + size_t _flen = (_tc)->size - (_new_size); \ + char *_fptr = (char *)TC_PTR_FROM_CHUNK(_tc); \ + _fptr += (_new_size); \ + VALGRIND_MAKE_MEM_UNDEFINED(_fptr, _flen); \ +} while (0) +#else +#define TC_UNDEFINE_SHRINK_VALGRIND_CHUNK(_tc, _new_size) do { } while (0) +#endif + +#define TC_UNDEFINE_SHRINK_CHUNK(_tc, _new_size) do { \ + TC_UNDEFINE_SHRINK_FILL_CHUNK(_tc, _new_size); \ + TC_UNDEFINE_SHRINK_VALGRIND_CHUNK(_tc, _new_size); \ +} while (0) + +#if defined(DEVELOPER) && defined(VALGRIND_MAKE_MEM_UNDEFINED) +/* Mark the new bytes as undefined */ +#define TC_UNDEFINE_GROW_VALGRIND_CHUNK(_tc, _new_size) do { \ + size_t _old_used = TC_HDR_SIZE + (_tc)->size; \ + size_t _new_used = TC_HDR_SIZE + (_new_size); \ + size_t _flen = _new_used - _old_used; \ + char *_fptr = _old_used + (char *)(_tc); \ + VALGRIND_MAKE_MEM_UNDEFINED(_fptr, _flen); \ +} while (0) +#else +#define TC_UNDEFINE_GROW_VALGRIND_CHUNK(_tc, _new_size) do { } while (0) +#endif + +#define TC_UNDEFINE_GROW_CHUNK(_tc, _new_size) do { \ + TC_UNDEFINE_GROW_VALGRIND_CHUNK(_tc, _new_size); \ +} while (0) + +struct talloc_reference_handle { + struct talloc_reference_handle *next, *prev; + void *ptr; + const char *location; +}; + +struct talloc_memlimit { + struct talloc_chunk *parent; + struct talloc_memlimit *upper; + size_t max_size; + size_t cur_size; +}; + +static inline bool talloc_memlimit_check(struct talloc_memlimit *limit, size_t size); +static inline void talloc_memlimit_grow(struct talloc_memlimit *limit, + size_t size); +static inline void talloc_memlimit_shrink(struct talloc_memlimit *limit, + size_t size); +static inline void tc_memlimit_update_on_free(struct talloc_chunk *tc); + +static inline void _tc_set_name_const(struct talloc_chunk *tc, + const char *name); +static struct talloc_chunk *_vasprintf_tc(const void *t, + const char *fmt, + va_list ap); + +typedef int (*talloc_destructor_t)(void *); + +struct talloc_pool_hdr; + +struct talloc_chunk { + /* + * flags includes the talloc magic, which is randomised to + * make overwrite attacks harder + */ + unsigned flags; + + /* + * If you have a logical tree like: + * + * + * / | \ + * / | \ + * / | \ + * + * + * The actual talloc tree is: + * + * + * | + * - - + * + * The children are linked with next/prev pointers, and + * child 1 is linked to the parent with parent/child + * pointers. + */ + + struct talloc_chunk *next, *prev; + struct talloc_chunk *parent, *child; + struct talloc_reference_handle *refs; + talloc_destructor_t destructor; + const char *name; + size_t size; + + /* + * limit semantics: + * if 'limit' is set it means all *new* children of the context will + * be limited to a total aggregate size ox max_size for memory + * allocations. + * cur_size is used to keep track of the current use + */ + struct talloc_memlimit *limit; + + /* + * For members of a pool (i.e. TALLOC_FLAG_POOLMEM is set), "pool" + * is a pointer to the struct talloc_chunk of the pool that it was + * allocated from. This way children can quickly find the pool to chew + * from. + */ + struct talloc_pool_hdr *pool; +}; + +/* 16 byte alignment seems to keep everyone happy */ +#define TC_ALIGN16(s) (((s)+15)&~15) +#define TC_HDR_SIZE TC_ALIGN16(sizeof(struct talloc_chunk)) +#define TC_PTR_FROM_CHUNK(tc) ((void *)(TC_HDR_SIZE + (char*)tc)) + +_PUBLIC_ int talloc_version_major(void) +{ + return TALLOC_VERSION_MAJOR; +} + +_PUBLIC_ int talloc_version_minor(void) +{ + return TALLOC_VERSION_MINOR; +} + +_PUBLIC_ int talloc_test_get_magic(void) +{ + return talloc_magic; +} + +static inline void _talloc_chunk_set_free(struct talloc_chunk *tc, + const char *location) +{ + /* + * Mark this memory as free, and also over-stamp the talloc + * magic with the old-style magic. + * + * Why? This tries to avoid a memory read use-after-free from + * disclosing our talloc magic, which would then allow an + * attacker to prepare a valid header and so run a destructor. + * + */ + tc->flags = TALLOC_MAGIC_NON_RANDOM | TALLOC_FLAG_FREE + | (tc->flags & TALLOC_FLAG_MASK); + + /* we mark the freed memory with where we called the free + * from. This means on a double free error we can report where + * the first free came from + */ + if (location) { + tc->name = location; + } +} + +static inline void _talloc_chunk_set_not_free(struct talloc_chunk *tc) +{ + /* + * Mark this memory as not free. + * + * Why? This is memory either in a pool (and so available for + * talloc's re-use or after the realloc(). We need to mark + * the memory as free() before any realloc() call as we can't + * write to the memory after that. + * + * We put back the normal magic instead of the 'not random' + * magic. + */ + + tc->flags = talloc_magic | + ((tc->flags & TALLOC_FLAG_MASK) & ~TALLOC_FLAG_FREE); +} + +static void (*talloc_log_fn)(const char *message); + +_PUBLIC_ void talloc_set_log_fn(void (*log_fn)(const char *message)) +{ + talloc_log_fn = log_fn; +} + +#ifdef HAVE_CONSTRUCTOR_ATTRIBUTE +void talloc_lib_init(void) __attribute__((constructor)); +void talloc_lib_init(void) +{ + uint32_t random_value; +#if defined(HAVE_GETAUXVAL) && defined(AT_RANDOM) + uint8_t *p; + /* + * Use the kernel-provided random values used for + * ASLR. This won't change per-exec, which is ideal for us + */ + p = (uint8_t *) getauxval(AT_RANDOM); + if (p) { + /* + * We get 16 bytes from getauxval. By calling rand(), + * a totally insecure PRNG, but one that will + * deterministically have a different value when called + * twice, we ensure that if two talloc-like libraries + * are somehow loaded in the same address space, that + * because we choose different bytes, we will keep the + * protection against collision of multiple talloc + * libs. + * + * This protection is important because the effects of + * passing a talloc pointer from one to the other may + * be very hard to determine. + */ + int offset = rand() % (16 - sizeof(random_value)); + memcpy(&random_value, p + offset, sizeof(random_value)); + } else +#endif + { + /* + * Otherwise, hope the location we are loaded in + * memory is randomised by someone else + */ + random_value = ((uintptr_t)talloc_lib_init & 0xFFFFFFFF); + } + talloc_magic = random_value & ~TALLOC_FLAG_MASK; +} +#else +#warning "No __attribute__((constructor)) support found on this platform, additional talloc security measures not available" +#endif + +static void talloc_lib_atexit(void) +{ + TALLOC_FREE(autofree_context); + + if (talloc_total_size(null_context) == 0) { + return; + } + + if (talloc_report_null_full) { + talloc_report_full(null_context, stderr); + } else if (talloc_report_null) { + talloc_report(null_context, stderr); + } +} + +static void talloc_setup_atexit(void) +{ + static bool done; + + if (done) { + return; + } + + atexit(talloc_lib_atexit); + done = true; +} + +static void talloc_log(const char *fmt, ...) PRINTF_ATTRIBUTE(1,2); +static void talloc_log(const char *fmt, ...) +{ + va_list ap; + char *message; + + if (!talloc_log_fn) { + return; + } + + va_start(ap, fmt); + message = talloc_vasprintf(NULL, fmt, ap); + va_end(ap); + + talloc_log_fn(message); + talloc_free(message); +} + +static void talloc_log_stderr(const char *message) +{ + fprintf(stderr, "%s", message); +} + +_PUBLIC_ void talloc_set_log_stderr(void) +{ + talloc_set_log_fn(talloc_log_stderr); +} + +static void (*talloc_abort_fn)(const char *reason); + +_PUBLIC_ void talloc_set_abort_fn(void (*abort_fn)(const char *reason)) +{ + talloc_abort_fn = abort_fn; +} + +static void talloc_abort(const char *reason) +{ + talloc_log("%s\n", reason); + + if (!talloc_abort_fn) { + TALLOC_ABORT(reason); + } + + talloc_abort_fn(reason); +} + +static void talloc_abort_access_after_free(void) +{ + talloc_abort("Bad talloc magic value - access after free"); +} + +static void talloc_abort_unknown_value(void) +{ + talloc_abort("Bad talloc magic value - unknown value"); +} + +/* panic if we get a bad magic value */ +static inline struct talloc_chunk *talloc_chunk_from_ptr(const void *ptr) +{ + const char *pp = (const char *)ptr; + struct talloc_chunk *tc = discard_const_p(struct talloc_chunk, pp - TC_HDR_SIZE); + if (unlikely((tc->flags & (TALLOC_FLAG_FREE | ~TALLOC_FLAG_MASK)) != talloc_magic)) { + if ((tc->flags & (TALLOC_FLAG_FREE | ~TALLOC_FLAG_MASK)) + == (TALLOC_MAGIC_NON_RANDOM | TALLOC_FLAG_FREE)) { + talloc_log("talloc: access after free error - first free may be at %s\n", tc->name); + talloc_abort_access_after_free(); + return NULL; + } + + talloc_abort_unknown_value(); + return NULL; + } + return tc; +} + +/* hook into the front of the list */ +#define _TLIST_ADD(list, p) \ +do { \ + if (!(list)) { \ + (list) = (p); \ + (p)->next = (p)->prev = NULL; \ + } else { \ + (list)->prev = (p); \ + (p)->next = (list); \ + (p)->prev = NULL; \ + (list) = (p); \ + }\ +} while (0) + +/* remove an element from a list - element doesn't have to be in list. */ +#define _TLIST_REMOVE(list, p) \ +do { \ + if ((p) == (list)) { \ + (list) = (p)->next; \ + if (list) (list)->prev = NULL; \ + } else { \ + if ((p)->prev) (p)->prev->next = (p)->next; \ + if ((p)->next) (p)->next->prev = (p)->prev; \ + } \ + if ((p) && ((p) != (list))) (p)->next = (p)->prev = NULL; \ +} while (0) + + +/* + return the parent chunk of a pointer +*/ +static inline struct talloc_chunk *talloc_parent_chunk(const void *ptr) +{ + struct talloc_chunk *tc; + + if (unlikely(ptr == NULL)) { + return NULL; + } + + tc = talloc_chunk_from_ptr(ptr); + while (tc->prev) tc=tc->prev; + + return tc->parent; +} + +_PUBLIC_ void *talloc_parent(const void *ptr) +{ + struct talloc_chunk *tc = talloc_parent_chunk(ptr); + return tc? TC_PTR_FROM_CHUNK(tc) : NULL; +} + +/* + find parents name +*/ +_PUBLIC_ const char *talloc_parent_name(const void *ptr) +{ + struct talloc_chunk *tc = talloc_parent_chunk(ptr); + return tc? tc->name : NULL; +} + +/* + A pool carries an in-pool object count count in the first 16 bytes. + bytes. This is done to support talloc_steal() to a parent outside of the + pool. The count includes the pool itself, so a talloc_free() on a pool will + only destroy the pool if the count has dropped to zero. A talloc_free() of a + pool member will reduce the count, and eventually also call free(3) on the + pool memory. + + The object count is not put into "struct talloc_chunk" because it is only + relevant for talloc pools and the alignment to 16 bytes would increase the + memory footprint of each talloc chunk by those 16 bytes. +*/ + +struct talloc_pool_hdr { + void *end; + unsigned int object_count; + size_t poolsize; +}; + +#define TP_HDR_SIZE TC_ALIGN16(sizeof(struct talloc_pool_hdr)) + +static inline struct talloc_pool_hdr *talloc_pool_from_chunk(struct talloc_chunk *c) +{ + return (struct talloc_pool_hdr *)((char *)c - TP_HDR_SIZE); +} + +static inline struct talloc_chunk *talloc_chunk_from_pool(struct talloc_pool_hdr *h) +{ + return (struct talloc_chunk *)((char *)h + TP_HDR_SIZE); +} + +static inline void *tc_pool_end(struct talloc_pool_hdr *pool_hdr) +{ + struct talloc_chunk *tc = talloc_chunk_from_pool(pool_hdr); + return (char *)tc + TC_HDR_SIZE + pool_hdr->poolsize; +} + +static inline size_t tc_pool_space_left(struct talloc_pool_hdr *pool_hdr) +{ + return (char *)tc_pool_end(pool_hdr) - (char *)pool_hdr->end; +} + +/* If tc is inside a pool, this gives the next neighbour. */ +static inline void *tc_next_chunk(struct talloc_chunk *tc) +{ + return (char *)tc + TC_ALIGN16(TC_HDR_SIZE + tc->size); +} + +static inline void *tc_pool_first_chunk(struct talloc_pool_hdr *pool_hdr) +{ + struct talloc_chunk *tc = talloc_chunk_from_pool(pool_hdr); + return tc_next_chunk(tc); +} + +/* Mark the whole remaining pool as not accessable */ +static inline void tc_invalidate_pool(struct talloc_pool_hdr *pool_hdr) +{ + size_t flen = tc_pool_space_left(pool_hdr); + + if (unlikely(talloc_fill.enabled)) { + memset(pool_hdr->end, talloc_fill.fill_value, flen); + } + +#if defined(DEVELOPER) && defined(VALGRIND_MAKE_MEM_NOACCESS) + VALGRIND_MAKE_MEM_NOACCESS(pool_hdr->end, flen); +#endif +} + +/* + Allocate from a pool +*/ + +static inline struct talloc_chunk *tc_alloc_pool(struct talloc_chunk *parent, + size_t size, size_t prefix_len) +{ + struct talloc_pool_hdr *pool_hdr = NULL; + size_t space_left; + struct talloc_chunk *result; + size_t chunk_size; + + if (parent == NULL) { + return NULL; + } + + if (parent->flags & TALLOC_FLAG_POOL) { + pool_hdr = talloc_pool_from_chunk(parent); + } + else if (parent->flags & TALLOC_FLAG_POOLMEM) { + pool_hdr = parent->pool; + } + + if (pool_hdr == NULL) { + return NULL; + } + + space_left = tc_pool_space_left(pool_hdr); + + /* + * Align size to 16 bytes + */ + chunk_size = TC_ALIGN16(size + prefix_len); + + if (space_left < chunk_size) { + return NULL; + } + + result = (struct talloc_chunk *)((char *)pool_hdr->end + prefix_len); + +#if defined(DEVELOPER) && defined(VALGRIND_MAKE_MEM_UNDEFINED) + VALGRIND_MAKE_MEM_UNDEFINED(pool_hdr->end, chunk_size); +#endif + + pool_hdr->end = (void *)((char *)pool_hdr->end + chunk_size); + + result->flags = talloc_magic | TALLOC_FLAG_POOLMEM; + result->pool = pool_hdr; + + pool_hdr->object_count++; + + return result; +} + +/* + Allocate a bit of memory as a child of an existing pointer +*/ +static inline void *__talloc_with_prefix(const void *context, + size_t size, + size_t prefix_len, + struct talloc_chunk **tc_ret) +{ + struct talloc_chunk *tc = NULL; + struct talloc_memlimit *limit = NULL; + size_t total_len = TC_HDR_SIZE + size + prefix_len; + struct talloc_chunk *parent = NULL; + + if (unlikely(context == NULL)) { + context = null_context; + } + + if (unlikely(size >= MAX_TALLOC_SIZE)) { + return NULL; + } + + if (unlikely(total_len < TC_HDR_SIZE)) { + return NULL; + } + + if (likely(context != NULL)) { + parent = talloc_chunk_from_ptr(context); + + if (parent->limit != NULL) { + limit = parent->limit; + } + + tc = tc_alloc_pool(parent, TC_HDR_SIZE+size, prefix_len); + } + + if (tc == NULL) { + char *ptr; + + /* + * Only do the memlimit check/update on actual allocation. + */ + if (!talloc_memlimit_check(limit, total_len)) { + errno = ENOMEM; + return NULL; + } + + ptr = malloc(total_len); + if (unlikely(ptr == NULL)) { + return NULL; + } + tc = (struct talloc_chunk *)(ptr + prefix_len); + tc->flags = talloc_magic; + tc->pool = NULL; + + talloc_memlimit_grow(limit, total_len); + } + + tc->limit = limit; + tc->size = size; + tc->destructor = NULL; + tc->child = NULL; + tc->name = NULL; + tc->refs = NULL; + + if (likely(context != NULL)) { + if (parent->child) { + parent->child->parent = NULL; + tc->next = parent->child; + tc->next->prev = tc; + } else { + tc->next = NULL; + } + tc->parent = parent; + tc->prev = NULL; + parent->child = tc; + } else { + tc->next = tc->prev = tc->parent = NULL; + } + + *tc_ret = tc; + return TC_PTR_FROM_CHUNK(tc); +} + +static inline void *__talloc(const void *context, + size_t size, + struct talloc_chunk **tc) +{ + return __talloc_with_prefix(context, size, 0, tc); +} + +/* + * Create a talloc pool + */ + +static inline void *_talloc_pool(const void *context, size_t size) +{ + struct talloc_chunk *tc; + struct talloc_pool_hdr *pool_hdr; + void *result; + + result = __talloc_with_prefix(context, size, TP_HDR_SIZE, &tc); + + if (unlikely(result == NULL)) { + return NULL; + } + + pool_hdr = talloc_pool_from_chunk(tc); + + tc->flags |= TALLOC_FLAG_POOL; + tc->size = 0; + + pool_hdr->object_count = 1; + pool_hdr->end = result; + pool_hdr->poolsize = size; + + tc_invalidate_pool(pool_hdr); + + return result; +} + +_PUBLIC_ void *talloc_pool(const void *context, size_t size) +{ + return _talloc_pool(context, size); +} + +/* + * Create a talloc pool correctly sized for a basic size plus + * a number of subobjects whose total size is given. Essentially + * a custom allocator for talloc to reduce fragmentation. + */ + +_PUBLIC_ void *_talloc_pooled_object(const void *ctx, + size_t type_size, + const char *type_name, + unsigned num_subobjects, + size_t total_subobjects_size) +{ + size_t poolsize, subobjects_slack, tmp; + struct talloc_chunk *tc; + struct talloc_pool_hdr *pool_hdr; + void *ret; + + poolsize = type_size + total_subobjects_size; + + if ((poolsize < type_size) || (poolsize < total_subobjects_size)) { + goto overflow; + } + + if (num_subobjects == UINT_MAX) { + goto overflow; + } + num_subobjects += 1; /* the object body itself */ + + /* + * Alignment can increase the pool size by at most 15 bytes per object + * plus alignment for the object itself + */ + subobjects_slack = (TC_HDR_SIZE + TP_HDR_SIZE + 15) * num_subobjects; + if (subobjects_slack < num_subobjects) { + goto overflow; + } + + tmp = poolsize + subobjects_slack; + if ((tmp < poolsize) || (tmp < subobjects_slack)) { + goto overflow; + } + poolsize = tmp; + + ret = _talloc_pool(ctx, poolsize); + if (ret == NULL) { + return NULL; + } + + tc = talloc_chunk_from_ptr(ret); + tc->size = type_size; + + pool_hdr = talloc_pool_from_chunk(tc); + +#if defined(DEVELOPER) && defined(VALGRIND_MAKE_MEM_UNDEFINED) + VALGRIND_MAKE_MEM_UNDEFINED(pool_hdr->end, type_size); +#endif + + pool_hdr->end = ((char *)pool_hdr->end + TC_ALIGN16(type_size)); + + _tc_set_name_const(tc, type_name); + return ret; + +overflow: + return NULL; +} + +/* + setup a destructor to be called on free of a pointer + the destructor should return 0 on success, or -1 on failure. + if the destructor fails then the free is failed, and the memory can + be continued to be used +*/ +_PUBLIC_ void _talloc_set_destructor(const void *ptr, int (*destructor)(void *)) +{ + struct talloc_chunk *tc = talloc_chunk_from_ptr(ptr); + tc->destructor = destructor; +} + +/* + increase the reference count on a piece of memory. +*/ +_PUBLIC_ int talloc_increase_ref_count(const void *ptr) +{ + if (unlikely(!talloc_reference(null_context, ptr))) { + return -1; + } + return 0; +} + +/* + helper for talloc_reference() + + this is referenced by a function pointer and should not be inline +*/ +static int talloc_reference_destructor(struct talloc_reference_handle *handle) +{ + struct talloc_chunk *ptr_tc = talloc_chunk_from_ptr(handle->ptr); + _TLIST_REMOVE(ptr_tc->refs, handle); + return 0; +} + +/* + more efficient way to add a name to a pointer - the name must point to a + true string constant +*/ +static inline void _tc_set_name_const(struct talloc_chunk *tc, + const char *name) +{ + tc->name = name; +} + +/* + internal talloc_named_const() +*/ +static inline void *_talloc_named_const(const void *context, size_t size, const char *name) +{ + void *ptr; + struct talloc_chunk *tc; + + ptr = __talloc(context, size, &tc); + if (unlikely(ptr == NULL)) { + return NULL; + } + + _tc_set_name_const(tc, name); + + return ptr; +} + +/* + make a secondary reference to a pointer, hanging off the given context. + the pointer remains valid until both the original caller and this given + context are freed. + + the major use for this is when two different structures need to reference the + same underlying data, and you want to be able to free the two instances separately, + and in either order +*/ +_PUBLIC_ void *_talloc_reference_loc(const void *context, const void *ptr, const char *location) +{ + struct talloc_chunk *tc; + struct talloc_reference_handle *handle; + if (unlikely(ptr == NULL)) return NULL; + + tc = talloc_chunk_from_ptr(ptr); + handle = (struct talloc_reference_handle *)_talloc_named_const(context, + sizeof(struct talloc_reference_handle), + TALLOC_MAGIC_REFERENCE); + if (unlikely(handle == NULL)) return NULL; + + /* note that we hang the destructor off the handle, not the + main context as that allows the caller to still setup their + own destructor on the context if they want to */ + talloc_set_destructor(handle, talloc_reference_destructor); + handle->ptr = discard_const_p(void, ptr); + handle->location = location; + _TLIST_ADD(tc->refs, handle); + return handle->ptr; +} + +static void *_talloc_steal_internal(const void *new_ctx, const void *ptr); + +static inline void _tc_free_poolmem(struct talloc_chunk *tc, + const char *location) +{ + struct talloc_pool_hdr *pool; + struct talloc_chunk *pool_tc; + void *next_tc; + + pool = tc->pool; + pool_tc = talloc_chunk_from_pool(pool); + next_tc = tc_next_chunk(tc); + + _talloc_chunk_set_free(tc, location); + + TC_INVALIDATE_FULL_CHUNK(tc); + + if (unlikely(pool->object_count == 0)) { + talloc_abort("Pool object count zero!"); + return; + } + + pool->object_count--; + + if (unlikely(pool->object_count == 1 + && !(pool_tc->flags & TALLOC_FLAG_FREE))) { + /* + * if there is just one object left in the pool + * and pool->flags does not have TALLOC_FLAG_FREE, + * it means this is the pool itself and + * the rest is available for new objects + * again. + */ + pool->end = tc_pool_first_chunk(pool); + tc_invalidate_pool(pool); + return; + } + + if (unlikely(pool->object_count == 0)) { + /* + * we mark the freed memory with where we called the free + * from. This means on a double free error we can report where + * the first free came from + */ + pool_tc->name = location; + + if (pool_tc->flags & TALLOC_FLAG_POOLMEM) { + _tc_free_poolmem(pool_tc, location); + } else { + /* + * The tc_memlimit_update_on_free() + * call takes into account the + * prefix TP_HDR_SIZE allocated before + * the pool talloc_chunk. + */ + tc_memlimit_update_on_free(pool_tc); + TC_INVALIDATE_FULL_CHUNK(pool_tc); + free(pool); + } + return; + } + + if (pool->end == next_tc) { + /* + * if pool->pool still points to end of + * 'tc' (which is stored in the 'next_tc' variable), + * we can reclaim the memory of 'tc'. + */ + pool->end = tc; + return; + } + + /* + * Do nothing. The memory is just "wasted", waiting for the pool + * itself to be freed. + */ +} + +static inline void _tc_free_children_internal(struct talloc_chunk *tc, + void *ptr, + const char *location); + +static inline int _talloc_free_internal(void *ptr, const char *location); + +/* + internal free call that takes a struct talloc_chunk *. +*/ +static inline int _tc_free_internal(struct talloc_chunk *tc, + const char *location) +{ + void *ptr_to_free; + void *ptr = TC_PTR_FROM_CHUNK(tc); + + if (unlikely(tc->refs)) { + int is_child; + /* check if this is a reference from a child or + * grandchild back to it's parent or grandparent + * + * in that case we need to remove the reference and + * call another instance of talloc_free() on the current + * pointer. + */ + is_child = talloc_is_parent(tc->refs, ptr); + _talloc_free_internal(tc->refs, location); + if (is_child) { + return _talloc_free_internal(ptr, location); + } + return -1; + } + + if (unlikely(tc->flags & TALLOC_FLAG_LOOP)) { + /* we have a free loop - stop looping */ + return 0; + } + + if (unlikely(tc->destructor)) { + talloc_destructor_t d = tc->destructor; + + /* + * Protect the destructor against some overwrite + * attacks, by explicitly checking it has the right + * magic here. + */ + if (talloc_chunk_from_ptr(ptr) != tc) { + /* + * This can't actually happen, the + * call itself will panic. + */ + TALLOC_ABORT("talloc_chunk_from_ptr failed!"); + } + + if (d == (talloc_destructor_t)-1) { + return -1; + } + tc->destructor = (talloc_destructor_t)-1; + if (d(ptr) == -1) { + /* + * Only replace the destructor pointer if + * calling the destructor didn't modify it. + */ + if (tc->destructor == (talloc_destructor_t)-1) { + tc->destructor = d; + } + return -1; + } + tc->destructor = NULL; + } + + if (tc->parent) { + _TLIST_REMOVE(tc->parent->child, tc); + if (tc->parent->child) { + tc->parent->child->parent = tc->parent; + } + } else { + if (tc->prev) tc->prev->next = tc->next; + if (tc->next) tc->next->prev = tc->prev; + tc->prev = tc->next = NULL; + } + + tc->flags |= TALLOC_FLAG_LOOP; + + _tc_free_children_internal(tc, ptr, location); + + _talloc_chunk_set_free(tc, location); + + if (tc->flags & TALLOC_FLAG_POOL) { + struct talloc_pool_hdr *pool; + + pool = talloc_pool_from_chunk(tc); + + if (unlikely(pool->object_count == 0)) { + talloc_abort("Pool object count zero!"); + return 0; + } + + pool->object_count--; + + if (likely(pool->object_count != 0)) { + return 0; + } + + /* + * With object_count==0, a pool becomes a normal piece of + * memory to free. If it's allocated inside a pool, it needs + * to be freed as poolmem, else it needs to be just freed. + */ + ptr_to_free = pool; + } else { + ptr_to_free = tc; + } + + if (tc->flags & TALLOC_FLAG_POOLMEM) { + _tc_free_poolmem(tc, location); + return 0; + } + + tc_memlimit_update_on_free(tc); + + TC_INVALIDATE_FULL_CHUNK(tc); + free(ptr_to_free); + return 0; +} + +/* + internal talloc_free call +*/ +static inline int _talloc_free_internal(void *ptr, const char *location) +{ + struct talloc_chunk *tc; + + if (unlikely(ptr == NULL)) { + return -1; + } + + /* possibly initialised the talloc fill value */ + if (unlikely(!talloc_fill.initialised)) { + const char *fill = getenv(TALLOC_FILL_ENV); + if (fill != NULL) { + talloc_fill.enabled = true; + talloc_fill.fill_value = strtoul(fill, NULL, 0); + } + talloc_fill.initialised = true; + } + + tc = talloc_chunk_from_ptr(ptr); + return _tc_free_internal(tc, location); +} + +static inline size_t _talloc_total_limit_size(const void *ptr, + struct talloc_memlimit *old_limit, + struct talloc_memlimit *new_limit); + +/* + move a lump of memory from one talloc context to another return the + ptr on success, or NULL if it could not be transferred. + passing NULL as ptr will always return NULL with no side effects. +*/ +static void *_talloc_steal_internal(const void *new_ctx, const void *ptr) +{ + struct talloc_chunk *tc, *new_tc; + size_t ctx_size = 0; + + if (unlikely(!ptr)) { + return NULL; + } + + if (unlikely(new_ctx == NULL)) { + new_ctx = null_context; + } + + tc = talloc_chunk_from_ptr(ptr); + + if (tc->limit != NULL) { + + ctx_size = _talloc_total_limit_size(ptr, NULL, NULL); + + /* Decrement the memory limit from the source .. */ + talloc_memlimit_shrink(tc->limit->upper, ctx_size); + + if (tc->limit->parent == tc) { + tc->limit->upper = NULL; + } else { + tc->limit = NULL; + } + } + + if (unlikely(new_ctx == NULL)) { + if (tc->parent) { + _TLIST_REMOVE(tc->parent->child, tc); + if (tc->parent->child) { + tc->parent->child->parent = tc->parent; + } + } else { + if (tc->prev) tc->prev->next = tc->next; + if (tc->next) tc->next->prev = tc->prev; + } + + tc->parent = tc->next = tc->prev = NULL; + return discard_const_p(void, ptr); + } + + new_tc = talloc_chunk_from_ptr(new_ctx); + + if (unlikely(tc == new_tc || tc->parent == new_tc)) { + return discard_const_p(void, ptr); + } + + if (tc->parent) { + _TLIST_REMOVE(tc->parent->child, tc); + if (tc->parent->child) { + tc->parent->child->parent = tc->parent; + } + } else { + if (tc->prev) tc->prev->next = tc->next; + if (tc->next) tc->next->prev = tc->prev; + tc->prev = tc->next = NULL; + } + + tc->parent = new_tc; + if (new_tc->child) new_tc->child->parent = NULL; + _TLIST_ADD(new_tc->child, tc); + + if (tc->limit || new_tc->limit) { + ctx_size = _talloc_total_limit_size(ptr, tc->limit, + new_tc->limit); + /* .. and increment it in the destination. */ + if (new_tc->limit) { + talloc_memlimit_grow(new_tc->limit, ctx_size); + } + } + + return discard_const_p(void, ptr); +} + +/* + move a lump of memory from one talloc context to another return the + ptr on success, or NULL if it could not be transferred. + passing NULL as ptr will always return NULL with no side effects. +*/ +_PUBLIC_ void *_talloc_steal_loc(const void *new_ctx, const void *ptr, const char *location) +{ + struct talloc_chunk *tc; + + if (unlikely(ptr == NULL)) { + return NULL; + } + + tc = talloc_chunk_from_ptr(ptr); + + if (unlikely(tc->refs != NULL) && talloc_parent(ptr) != new_ctx) { + struct talloc_reference_handle *h; + + talloc_log("WARNING: talloc_steal with references at %s\n", + location); + + for (h=tc->refs; h; h=h->next) { + talloc_log("\treference at %s\n", + h->location); + } + } + +#if 0 + /* this test is probably too expensive to have on in the + normal build, but it useful for debugging */ + if (talloc_is_parent(new_ctx, ptr)) { + talloc_log("WARNING: stealing into talloc child at %s\n", location); + } +#endif + + return _talloc_steal_internal(new_ctx, ptr); +} + +/* + this is like a talloc_steal(), but you must supply the old + parent. This resolves the ambiguity in a talloc_steal() which is + called on a context that has more than one parent (via references) + + The old parent can be either a reference or a parent +*/ +_PUBLIC_ void *talloc_reparent(const void *old_parent, const void *new_parent, const void *ptr) +{ + struct talloc_chunk *tc; + struct talloc_reference_handle *h; + + if (unlikely(ptr == NULL)) { + return NULL; + } + + if (old_parent == talloc_parent(ptr)) { + return _talloc_steal_internal(new_parent, ptr); + } + + tc = talloc_chunk_from_ptr(ptr); + for (h=tc->refs;h;h=h->next) { + if (talloc_parent(h) == old_parent) { + if (_talloc_steal_internal(new_parent, h) != h) { + return NULL; + } + return discard_const_p(void, ptr); + } + } + + /* it wasn't a parent */ + return NULL; +} + +/* + remove a secondary reference to a pointer. This undo's what + talloc_reference() has done. The context and pointer arguments + must match those given to a talloc_reference() +*/ +static inline int talloc_unreference(const void *context, const void *ptr) +{ + struct talloc_chunk *tc = talloc_chunk_from_ptr(ptr); + struct talloc_reference_handle *h; + + if (unlikely(context == NULL)) { + context = null_context; + } + + for (h=tc->refs;h;h=h->next) { + struct talloc_chunk *p = talloc_parent_chunk(h); + if (p == NULL) { + if (context == NULL) break; + } else if (TC_PTR_FROM_CHUNK(p) == context) { + break; + } + } + if (h == NULL) { + return -1; + } + + return _talloc_free_internal(h, __location__); +} + +/* + remove a specific parent context from a pointer. This is a more + controlled variant of talloc_free() +*/ +_PUBLIC_ int talloc_unlink(const void *context, void *ptr) +{ + struct talloc_chunk *tc_p, *new_p, *tc_c; + void *new_parent; + + if (ptr == NULL) { + return -1; + } + + if (context == NULL) { + context = null_context; + } + + if (talloc_unreference(context, ptr) == 0) { + return 0; + } + + if (context != NULL) { + tc_c = talloc_chunk_from_ptr(context); + } else { + tc_c = NULL; + } + if (tc_c != talloc_parent_chunk(ptr)) { + return -1; + } + + tc_p = talloc_chunk_from_ptr(ptr); + + if (tc_p->refs == NULL) { + return _talloc_free_internal(ptr, __location__); + } + + new_p = talloc_parent_chunk(tc_p->refs); + if (new_p) { + new_parent = TC_PTR_FROM_CHUNK(new_p); + } else { + new_parent = NULL; + } + + if (talloc_unreference(new_parent, ptr) != 0) { + return -1; + } + + _talloc_steal_internal(new_parent, ptr); + + return 0; +} + +/* + add a name to an existing pointer - va_list version +*/ +static inline const char *tc_set_name_v(struct talloc_chunk *tc, + const char *fmt, + va_list ap) PRINTF_ATTRIBUTE(2,0); + +static inline const char *tc_set_name_v(struct talloc_chunk *tc, + const char *fmt, + va_list ap) +{ + struct talloc_chunk *name_tc = _vasprintf_tc(TC_PTR_FROM_CHUNK(tc), + fmt, + ap); + if (likely(name_tc)) { + tc->name = TC_PTR_FROM_CHUNK(name_tc); + _tc_set_name_const(name_tc, ".name"); + } else { + tc->name = NULL; + } + return tc->name; +} + +/* + add a name to an existing pointer +*/ +_PUBLIC_ const char *talloc_set_name(const void *ptr, const char *fmt, ...) +{ + struct talloc_chunk *tc = talloc_chunk_from_ptr(ptr); + const char *name; + va_list ap; + va_start(ap, fmt); + name = tc_set_name_v(tc, fmt, ap); + va_end(ap); + return name; +} + + +/* + create a named talloc pointer. Any talloc pointer can be named, and + talloc_named() operates just like talloc() except that it allows you + to name the pointer. +*/ +_PUBLIC_ void *talloc_named(const void *context, size_t size, const char *fmt, ...) +{ + va_list ap; + void *ptr; + const char *name; + struct talloc_chunk *tc; + + ptr = __talloc(context, size, &tc); + if (unlikely(ptr == NULL)) return NULL; + + va_start(ap, fmt); + name = tc_set_name_v(tc, fmt, ap); + va_end(ap); + + if (unlikely(name == NULL)) { + _talloc_free_internal(ptr, __location__); + return NULL; + } + + return ptr; +} + +/* + return the name of a talloc ptr, or "UNNAMED" +*/ +static inline const char *__talloc_get_name(const void *ptr) +{ + struct talloc_chunk *tc = talloc_chunk_from_ptr(ptr); + if (unlikely(tc->name == TALLOC_MAGIC_REFERENCE)) { + return ".reference"; + } + if (likely(tc->name)) { + return tc->name; + } + return "UNNAMED"; +} + +_PUBLIC_ const char *talloc_get_name(const void *ptr) +{ + return __talloc_get_name(ptr); +} + +/* + check if a pointer has the given name. If it does, return the pointer, + otherwise return NULL +*/ +_PUBLIC_ void *talloc_check_name(const void *ptr, const char *name) +{ + const char *pname; + if (unlikely(ptr == NULL)) return NULL; + pname = __talloc_get_name(ptr); + if (likely(pname == name || strcmp(pname, name) == 0)) { + return discard_const_p(void, ptr); + } + return NULL; +} + +static void talloc_abort_type_mismatch(const char *location, + const char *name, + const char *expected) +{ + const char *reason; + + reason = talloc_asprintf(NULL, + "%s: Type mismatch: name[%s] expected[%s]", + location, + name?name:"NULL", + expected); + if (!reason) { + reason = "Type mismatch"; + } + + talloc_abort(reason); +} + +_PUBLIC_ void *_talloc_get_type_abort(const void *ptr, const char *name, const char *location) +{ + const char *pname; + + if (unlikely(ptr == NULL)) { + talloc_abort_type_mismatch(location, NULL, name); + return NULL; + } + + pname = __talloc_get_name(ptr); + if (likely(pname == name || strcmp(pname, name) == 0)) { + return discard_const_p(void, ptr); + } + + talloc_abort_type_mismatch(location, pname, name); + return NULL; +} + +/* + this is for compatibility with older versions of talloc +*/ +_PUBLIC_ void *talloc_init(const char *fmt, ...) +{ + va_list ap; + void *ptr; + const char *name; + struct talloc_chunk *tc; + + ptr = __talloc(NULL, 0, &tc); + if (unlikely(ptr == NULL)) return NULL; + + va_start(ap, fmt); + name = tc_set_name_v(tc, fmt, ap); + va_end(ap); + + if (unlikely(name == NULL)) { + _talloc_free_internal(ptr, __location__); + return NULL; + } + + return ptr; +} + +static inline void _tc_free_children_internal(struct talloc_chunk *tc, + void *ptr, + const char *location) +{ + while (tc->child) { + /* we need to work out who will own an abandoned child + if it cannot be freed. In priority order, the first + choice is owner of any remaining reference to this + pointer, the second choice is our parent, and the + final choice is the null context. */ + void *child = TC_PTR_FROM_CHUNK(tc->child); + const void *new_parent = null_context; + if (unlikely(tc->child->refs)) { + struct talloc_chunk *p = talloc_parent_chunk(tc->child->refs); + if (p) new_parent = TC_PTR_FROM_CHUNK(p); + } + if (unlikely(_tc_free_internal(tc->child, location) == -1)) { + if (talloc_parent_chunk(child) != tc) { + /* + * Destructor already reparented this child. + * No further reparenting needed. + */ + continue; + } + if (new_parent == null_context) { + struct talloc_chunk *p = talloc_parent_chunk(ptr); + if (p) new_parent = TC_PTR_FROM_CHUNK(p); + } + _talloc_steal_internal(new_parent, child); + } + } +} + +/* + this is a replacement for the Samba3 talloc_destroy_pool functionality. It + should probably not be used in new code. It's in here to keep the talloc + code consistent across Samba 3 and 4. +*/ +_PUBLIC_ void talloc_free_children(void *ptr) +{ + struct talloc_chunk *tc_name = NULL; + struct talloc_chunk *tc; + + if (unlikely(ptr == NULL)) { + return; + } + + tc = talloc_chunk_from_ptr(ptr); + + /* we do not want to free the context name if it is a child .. */ + if (likely(tc->child)) { + for (tc_name = tc->child; tc_name; tc_name = tc_name->next) { + if (tc->name == TC_PTR_FROM_CHUNK(tc_name)) break; + } + if (tc_name) { + _TLIST_REMOVE(tc->child, tc_name); + if (tc->child) { + tc->child->parent = tc; + } + } + } + + _tc_free_children_internal(tc, ptr, __location__); + + /* .. so we put it back after all other children have been freed */ + if (tc_name) { + if (tc->child) { + tc->child->parent = NULL; + } + tc_name->parent = tc; + _TLIST_ADD(tc->child, tc_name); + } +} + +/* + Allocate a bit of memory as a child of an existing pointer +*/ +_PUBLIC_ void *_talloc(const void *context, size_t size) +{ + struct talloc_chunk *tc; + return __talloc(context, size, &tc); +} + +/* + externally callable talloc_set_name_const() +*/ +_PUBLIC_ void talloc_set_name_const(const void *ptr, const char *name) +{ + _tc_set_name_const(talloc_chunk_from_ptr(ptr), name); +} + +/* + create a named talloc pointer. Any talloc pointer can be named, and + talloc_named() operates just like talloc() except that it allows you + to name the pointer. +*/ +_PUBLIC_ void *talloc_named_const(const void *context, size_t size, const char *name) +{ + return _talloc_named_const(context, size, name); +} + +/* + free a talloc pointer. This also frees all child pointers of this + pointer recursively + + return 0 if the memory is actually freed, otherwise -1. The memory + will not be freed if the ref_count is > 1 or the destructor (if + any) returns non-zero +*/ +_PUBLIC_ int _talloc_free(void *ptr, const char *location) +{ + struct talloc_chunk *tc; + + if (unlikely(ptr == NULL)) { + return -1; + } + + tc = talloc_chunk_from_ptr(ptr); + + if (unlikely(tc->refs != NULL)) { + struct talloc_reference_handle *h; + + if (talloc_parent(ptr) == null_context && tc->refs->next == NULL) { + /* in this case we do know which parent should + get this pointer, as there is really only + one parent */ + return talloc_unlink(null_context, ptr); + } + + talloc_log("ERROR: talloc_free with references at %s\n", + location); + + for (h=tc->refs; h; h=h->next) { + talloc_log("\treference at %s\n", + h->location); + } + return -1; + } + + return _talloc_free_internal(ptr, location); +} + + + +/* + A talloc version of realloc. The context argument is only used if + ptr is NULL +*/ +_PUBLIC_ void *_talloc_realloc(const void *context, void *ptr, size_t size, const char *name) +{ + struct talloc_chunk *tc; + void *new_ptr; + bool malloced = false; + struct talloc_pool_hdr *pool_hdr = NULL; + size_t old_size = 0; + size_t new_size = 0; + + /* size zero is equivalent to free() */ + if (unlikely(size == 0)) { + talloc_unlink(context, ptr); + return NULL; + } + + if (unlikely(size >= MAX_TALLOC_SIZE)) { + return NULL; + } + + /* realloc(NULL) is equivalent to malloc() */ + if (ptr == NULL) { + return _talloc_named_const(context, size, name); + } + + tc = talloc_chunk_from_ptr(ptr); + + /* don't allow realloc on referenced pointers */ + if (unlikely(tc->refs)) { + return NULL; + } + + /* don't let anybody try to realloc a talloc_pool */ + if (unlikely(tc->flags & TALLOC_FLAG_POOL)) { + return NULL; + } + + if (tc->limit && (size > tc->size)) { + if (!talloc_memlimit_check(tc->limit, (size - tc->size))) { + errno = ENOMEM; + return NULL; + } + } + + /* handle realloc inside a talloc_pool */ + if (unlikely(tc->flags & TALLOC_FLAG_POOLMEM)) { + pool_hdr = tc->pool; + } + +#if (ALWAYS_REALLOC == 0) + /* don't shrink if we have less than 1k to gain */ + if (size < tc->size && tc->limit == NULL) { + if (pool_hdr) { + void *next_tc = tc_next_chunk(tc); + TC_INVALIDATE_SHRINK_CHUNK(tc, size); + tc->size = size; + if (next_tc == pool_hdr->end) { + /* note: tc->size has changed, so this works */ + pool_hdr->end = tc_next_chunk(tc); + } + return ptr; + } else if ((tc->size - size) < 1024) { + /* + * if we call TC_INVALIDATE_SHRINK_CHUNK() here + * we would need to call TC_UNDEFINE_GROW_CHUNK() + * after each realloc call, which slows down + * testing a lot :-(. + * + * That is why we only mark memory as undefined here. + */ + TC_UNDEFINE_SHRINK_CHUNK(tc, size); + + /* do not shrink if we have less than 1k to gain */ + tc->size = size; + return ptr; + } + } else if (tc->size == size) { + /* + * do not change the pointer if it is exactly + * the same size. + */ + return ptr; + } +#endif + + /* + * by resetting magic we catch users of the old memory + * + * We mark this memory as free, and also over-stamp the talloc + * magic with the old-style magic. + * + * Why? This tries to avoid a memory read use-after-free from + * disclosing our talloc magic, which would then allow an + * attacker to prepare a valid header and so run a destructor. + * + * What else? We have to re-stamp back a valid normal magic + * on this memory once realloc() is done, as it will have done + * a memcpy() into the new valid memory. We can't do this in + * reverse as that would be a real use-after-free. + */ + _talloc_chunk_set_free(tc, NULL); + +#if ALWAYS_REALLOC + if (pool_hdr) { + new_ptr = tc_alloc_pool(tc, size + TC_HDR_SIZE, 0); + pool_hdr->object_count--; + + if (new_ptr == NULL) { + new_ptr = malloc(TC_HDR_SIZE+size); + malloced = true; + new_size = size; + } + + if (new_ptr) { + memcpy(new_ptr, tc, MIN(tc->size,size) + TC_HDR_SIZE); + TC_INVALIDATE_FULL_CHUNK(tc); + } + } else { + /* We're doing malloc then free here, so record the difference. */ + old_size = tc->size; + new_size = size; + new_ptr = malloc(size + TC_HDR_SIZE); + if (new_ptr) { + memcpy(new_ptr, tc, MIN(tc->size, size) + TC_HDR_SIZE); + free(tc); + } + } +#else + if (pool_hdr) { + struct talloc_chunk *pool_tc; + void *next_tc = tc_next_chunk(tc); + size_t old_chunk_size = TC_ALIGN16(TC_HDR_SIZE + tc->size); + size_t new_chunk_size = TC_ALIGN16(TC_HDR_SIZE + size); + size_t space_needed; + size_t space_left; + unsigned int chunk_count = pool_hdr->object_count; + + pool_tc = talloc_chunk_from_pool(pool_hdr); + if (!(pool_tc->flags & TALLOC_FLAG_FREE)) { + chunk_count -= 1; + } + + if (chunk_count == 1) { + /* + * optimize for the case where 'tc' is the only + * chunk in the pool. + */ + char *start = tc_pool_first_chunk(pool_hdr); + space_needed = new_chunk_size; + space_left = (char *)tc_pool_end(pool_hdr) - start; + + if (space_left >= space_needed) { + size_t old_used = TC_HDR_SIZE + tc->size; + size_t new_used = TC_HDR_SIZE + size; + new_ptr = start; + +#if defined(DEVELOPER) && defined(VALGRIND_MAKE_MEM_UNDEFINED) + { + /* + * The area from + * start -> tc may have + * been freed and thus been marked as + * VALGRIND_MEM_NOACCESS. Set it to + * VALGRIND_MEM_UNDEFINED so we can + * copy into it without valgrind errors. + * We can't just mark + * new_ptr -> new_ptr + old_used + * as this may overlap on top of tc, + * (which is why we use memmove, not + * memcpy below) hence the MIN. + */ + size_t undef_len = MIN((((char *)tc) - ((char *)new_ptr)),old_used); + VALGRIND_MAKE_MEM_UNDEFINED(new_ptr, undef_len); + } +#endif + + memmove(new_ptr, tc, old_used); + + tc = (struct talloc_chunk *)new_ptr; + TC_UNDEFINE_GROW_CHUNK(tc, size); + + /* + * first we do not align the pool pointer + * because we want to invalidate the padding + * too. + */ + pool_hdr->end = new_used + (char *)new_ptr; + tc_invalidate_pool(pool_hdr); + + /* now the aligned pointer */ + pool_hdr->end = new_chunk_size + (char *)new_ptr; + goto got_new_ptr; + } + + next_tc = NULL; + } + + if (new_chunk_size == old_chunk_size) { + TC_UNDEFINE_GROW_CHUNK(tc, size); + _talloc_chunk_set_not_free(tc); + tc->size = size; + return ptr; + } + + if (next_tc == pool_hdr->end) { + /* + * optimize for the case where 'tc' is the last + * chunk in the pool. + */ + space_needed = new_chunk_size - old_chunk_size; + space_left = tc_pool_space_left(pool_hdr); + + if (space_left >= space_needed) { + TC_UNDEFINE_GROW_CHUNK(tc, size); + _talloc_chunk_set_not_free(tc); + tc->size = size; + pool_hdr->end = tc_next_chunk(tc); + return ptr; + } + } + + new_ptr = tc_alloc_pool(tc, size + TC_HDR_SIZE, 0); + + if (new_ptr == NULL) { + new_ptr = malloc(TC_HDR_SIZE+size); + malloced = true; + new_size = size; + } + + if (new_ptr) { + memcpy(new_ptr, tc, MIN(tc->size,size) + TC_HDR_SIZE); + + _tc_free_poolmem(tc, __location__ "_talloc_realloc"); + } + } + else { + /* We're doing realloc here, so record the difference. */ + old_size = tc->size; + new_size = size; + new_ptr = realloc(tc, size + TC_HDR_SIZE); + } +got_new_ptr: +#endif + if (unlikely(!new_ptr)) { + /* + * Ok, this is a strange spot. We have to put back + * the old talloc_magic and any flags, except the + * TALLOC_FLAG_FREE as this was not free'ed by the + * realloc() call after all + */ + _talloc_chunk_set_not_free(tc); + return NULL; + } + + /* + * tc is now the new value from realloc(), the old memory we + * can't access any more and was preemptively marked as + * TALLOC_FLAG_FREE before the call. Now we mark it as not + * free again + */ + tc = (struct talloc_chunk *)new_ptr; + _talloc_chunk_set_not_free(tc); + if (malloced) { + tc->flags &= ~TALLOC_FLAG_POOLMEM; + } + if (tc->parent) { + tc->parent->child = tc; + } + if (tc->child) { + tc->child->parent = tc; + } + + if (tc->prev) { + tc->prev->next = tc; + } + if (tc->next) { + tc->next->prev = tc; + } + + if (new_size > old_size) { + talloc_memlimit_grow(tc->limit, new_size - old_size); + } else if (new_size < old_size) { + talloc_memlimit_shrink(tc->limit, old_size - new_size); + } + + tc->size = size; + _tc_set_name_const(tc, name); + + return TC_PTR_FROM_CHUNK(tc); +} + +/* + a wrapper around talloc_steal() for situations where you are moving a pointer + between two structures, and want the old pointer to be set to NULL +*/ +_PUBLIC_ void *_talloc_move(const void *new_ctx, const void *_pptr) +{ + const void **pptr = discard_const_p(const void *,_pptr); + void *ret = talloc_steal(new_ctx, discard_const_p(void, *pptr)); + (*pptr) = NULL; + return ret; +} + +enum talloc_mem_count_type { + TOTAL_MEM_SIZE, + TOTAL_MEM_BLOCKS, + TOTAL_MEM_LIMIT, +}; + +static inline size_t _talloc_total_mem_internal(const void *ptr, + enum talloc_mem_count_type type, + struct talloc_memlimit *old_limit, + struct talloc_memlimit *new_limit) +{ + size_t total = 0; + struct talloc_chunk *c, *tc; + + if (ptr == NULL) { + ptr = null_context; + } + if (ptr == NULL) { + return 0; + } + + tc = talloc_chunk_from_ptr(ptr); + + if (old_limit || new_limit) { + if (tc->limit && tc->limit->upper == old_limit) { + tc->limit->upper = new_limit; + } + } + + /* optimize in the memlimits case */ + if (type == TOTAL_MEM_LIMIT && + tc->limit != NULL && + tc->limit != old_limit && + tc->limit->parent == tc) { + return tc->limit->cur_size; + } + + if (tc->flags & TALLOC_FLAG_LOOP) { + return 0; + } + + tc->flags |= TALLOC_FLAG_LOOP; + + if (old_limit || new_limit) { + if (old_limit == tc->limit) { + tc->limit = new_limit; + } + } + + switch (type) { + case TOTAL_MEM_SIZE: + if (likely(tc->name != TALLOC_MAGIC_REFERENCE)) { + total = tc->size; + } + break; + case TOTAL_MEM_BLOCKS: + total++; + break; + case TOTAL_MEM_LIMIT: + if (likely(tc->name != TALLOC_MAGIC_REFERENCE)) { + /* + * Don't count memory allocated from a pool + * when calculating limits. Only count the + * pool itself. + */ + if (!(tc->flags & TALLOC_FLAG_POOLMEM)) { + if (tc->flags & TALLOC_FLAG_POOL) { + /* + * If this is a pool, the allocated + * size is in the pool header, and + * remember to add in the prefix + * length. + */ + struct talloc_pool_hdr *pool_hdr + = talloc_pool_from_chunk(tc); + total = pool_hdr->poolsize + + TC_HDR_SIZE + + TP_HDR_SIZE; + } else { + total = tc->size + TC_HDR_SIZE; + } + } + } + break; + } + for (c = tc->child; c; c = c->next) { + total += _talloc_total_mem_internal(TC_PTR_FROM_CHUNK(c), type, + old_limit, new_limit); + } + + tc->flags &= ~TALLOC_FLAG_LOOP; + + return total; +} + +/* + return the total size of a talloc pool (subtree) +*/ +_PUBLIC_ size_t talloc_total_size(const void *ptr) +{ + return _talloc_total_mem_internal(ptr, TOTAL_MEM_SIZE, NULL, NULL); +} + +/* + return the total number of blocks in a talloc pool (subtree) +*/ +_PUBLIC_ size_t talloc_total_blocks(const void *ptr) +{ + return _talloc_total_mem_internal(ptr, TOTAL_MEM_BLOCKS, NULL, NULL); +} + +/* + return the number of external references to a pointer +*/ +_PUBLIC_ size_t talloc_reference_count(const void *ptr) +{ + struct talloc_chunk *tc = talloc_chunk_from_ptr(ptr); + struct talloc_reference_handle *h; + size_t ret = 0; + + for (h=tc->refs;h;h=h->next) { + ret++; + } + return ret; +} + +/* + report on memory usage by all children of a pointer, giving a full tree view +*/ +_PUBLIC_ void talloc_report_depth_cb(const void *ptr, int depth, int max_depth, + void (*callback)(const void *ptr, + int depth, int max_depth, + int is_ref, + void *private_data), + void *private_data) +{ + struct talloc_chunk *c, *tc; + + if (ptr == NULL) { + ptr = null_context; + } + if (ptr == NULL) return; + + tc = talloc_chunk_from_ptr(ptr); + + if (tc->flags & TALLOC_FLAG_LOOP) { + return; + } + + callback(ptr, depth, max_depth, 0, private_data); + + if (max_depth >= 0 && depth >= max_depth) { + return; + } + + tc->flags |= TALLOC_FLAG_LOOP; + for (c=tc->child;c;c=c->next) { + if (c->name == TALLOC_MAGIC_REFERENCE) { + struct talloc_reference_handle *h = (struct talloc_reference_handle *)TC_PTR_FROM_CHUNK(c); + callback(h->ptr, depth + 1, max_depth, 1, private_data); + } else { + talloc_report_depth_cb(TC_PTR_FROM_CHUNK(c), depth + 1, max_depth, callback, private_data); + } + } + tc->flags &= ~TALLOC_FLAG_LOOP; +} + +static void talloc_report_depth_FILE_helper(const void *ptr, int depth, int max_depth, int is_ref, void *_f) +{ + const char *name = __talloc_get_name(ptr); + struct talloc_chunk *tc; + FILE *f = (FILE *)_f; + + if (is_ref) { + fprintf(f, "%*sreference to: %s\n", depth*4, "", name); + return; + } + + tc = talloc_chunk_from_ptr(ptr); + if (tc->limit && tc->limit->parent == tc) { + fprintf(f, "%*s%-30s is a memlimit context" + " (max_size = %lu bytes, cur_size = %lu bytes)\n", + depth*4, "", + name, + (unsigned long)tc->limit->max_size, + (unsigned long)tc->limit->cur_size); + } + + if (depth == 0) { + fprintf(f,"%stalloc report on '%s' (total %6lu bytes in %3lu blocks)\n", + (max_depth < 0 ? "full " :""), name, + (unsigned long)talloc_total_size(ptr), + (unsigned long)talloc_total_blocks(ptr)); + return; + } + + fprintf(f, "%*s%-30s contains %6lu bytes in %3lu blocks (ref %d) %p\n", + depth*4, "", + name, + (unsigned long)talloc_total_size(ptr), + (unsigned long)talloc_total_blocks(ptr), + (int)talloc_reference_count(ptr), ptr); + +#if 0 + fprintf(f, "content: "); + if (talloc_total_size(ptr)) { + int tot = talloc_total_size(ptr); + int i; + + for (i = 0; i < tot; i++) { + if ((((char *)ptr)[i] > 31) && (((char *)ptr)[i] < 126)) { + fprintf(f, "%c", ((char *)ptr)[i]); + } else { + fprintf(f, "~%02x", ((char *)ptr)[i]); + } + } + } + fprintf(f, "\n"); +#endif +} + +/* + report on memory usage by all children of a pointer, giving a full tree view +*/ +_PUBLIC_ void talloc_report_depth_file(const void *ptr, int depth, int max_depth, FILE *f) +{ + if (f) { + talloc_report_depth_cb(ptr, depth, max_depth, talloc_report_depth_FILE_helper, f); + fflush(f); + } +} + +/* + report on memory usage by all children of a pointer, giving a full tree view +*/ +_PUBLIC_ void talloc_report_full(const void *ptr, FILE *f) +{ + talloc_report_depth_file(ptr, 0, -1, f); +} + +/* + report on memory usage by all children of a pointer +*/ +_PUBLIC_ void talloc_report(const void *ptr, FILE *f) +{ + talloc_report_depth_file(ptr, 0, 1, f); +} + +/* + enable tracking of the NULL context +*/ +_PUBLIC_ void talloc_enable_null_tracking(void) +{ + if (null_context == NULL) { + null_context = _talloc_named_const(NULL, 0, "null_context"); + if (autofree_context != NULL) { + talloc_reparent(NULL, null_context, autofree_context); + } + } +} + +/* + enable tracking of the NULL context, not moving the autofree context + into the NULL context. This is needed for the talloc testsuite +*/ +_PUBLIC_ void talloc_enable_null_tracking_no_autofree(void) +{ + if (null_context == NULL) { + null_context = _talloc_named_const(NULL, 0, "null_context"); + } +} + +/* + disable tracking of the NULL context +*/ +_PUBLIC_ void talloc_disable_null_tracking(void) +{ + if (null_context != NULL) { + /* we have to move any children onto the real NULL + context */ + struct talloc_chunk *tc, *tc2; + tc = talloc_chunk_from_ptr(null_context); + for (tc2 = tc->child; tc2; tc2=tc2->next) { + if (tc2->parent == tc) tc2->parent = NULL; + if (tc2->prev == tc) tc2->prev = NULL; + } + for (tc2 = tc->next; tc2; tc2=tc2->next) { + if (tc2->parent == tc) tc2->parent = NULL; + if (tc2->prev == tc) tc2->prev = NULL; + } + tc->child = NULL; + tc->next = NULL; + } + talloc_free(null_context); + null_context = NULL; +} + +/* + enable leak reporting on exit +*/ +_PUBLIC_ void talloc_enable_leak_report(void) +{ + talloc_enable_null_tracking(); + talloc_report_null = true; + talloc_setup_atexit(); +} + +/* + enable full leak reporting on exit +*/ +_PUBLIC_ void talloc_enable_leak_report_full(void) +{ + talloc_enable_null_tracking(); + talloc_report_null_full = true; + talloc_setup_atexit(); +} + +/* + talloc and zero memory. +*/ +_PUBLIC_ void *_talloc_zero(const void *ctx, size_t size, const char *name) +{ + void *p = _talloc_named_const(ctx, size, name); + + if (p) { + memset(p, '\0', size); + } + + return p; +} + +/* + memdup with a talloc. +*/ +_PUBLIC_ void *_talloc_memdup(const void *t, const void *p, size_t size, const char *name) +{ + void *newp = _talloc_named_const(t, size, name); + + if (likely(newp)) { + memcpy(newp, p, size); + } + + return newp; +} + +static inline char *__talloc_strlendup(const void *t, const char *p, size_t len) +{ + char *ret; + struct talloc_chunk *tc; + + ret = (char *)__talloc(t, len + 1, &tc); + if (unlikely(!ret)) return NULL; + + memcpy(ret, p, len); + ret[len] = 0; + + _tc_set_name_const(tc, ret); + return ret; +} + +/* + strdup with a talloc +*/ +_PUBLIC_ char *talloc_strdup(const void *t, const char *p) +{ + if (unlikely(!p)) return NULL; + return __talloc_strlendup(t, p, strlen(p)); +} + +/* + strndup with a talloc +*/ +_PUBLIC_ char *talloc_strndup(const void *t, const char *p, size_t n) +{ + if (unlikely(!p)) return NULL; + return __talloc_strlendup(t, p, strnlen(p, n)); +} + +static inline char *__talloc_strlendup_append(char *s, size_t slen, + const char *a, size_t alen) +{ + char *ret; + + ret = talloc_realloc(NULL, s, char, slen + alen + 1); + if (unlikely(!ret)) return NULL; + + /* append the string and the trailing \0 */ + memcpy(&ret[slen], a, alen); + ret[slen+alen] = 0; + + _tc_set_name_const(talloc_chunk_from_ptr(ret), ret); + return ret; +} + +/* + * Appends at the end of the string. + */ +_PUBLIC_ char *talloc_strdup_append(char *s, const char *a) +{ + if (unlikely(!s)) { + return talloc_strdup(NULL, a); + } + + if (unlikely(!a)) { + return s; + } + + return __talloc_strlendup_append(s, strlen(s), a, strlen(a)); +} + +/* + * Appends at the end of the talloc'ed buffer, + * not the end of the string. + */ +_PUBLIC_ char *talloc_strdup_append_buffer(char *s, const char *a) +{ + size_t slen; + + if (unlikely(!s)) { + return talloc_strdup(NULL, a); + } + + if (unlikely(!a)) { + return s; + } + + slen = talloc_get_size(s); + if (likely(slen > 0)) { + slen--; + } + + return __talloc_strlendup_append(s, slen, a, strlen(a)); +} + +/* + * Appends at the end of the string. + */ +_PUBLIC_ char *talloc_strndup_append(char *s, const char *a, size_t n) +{ + if (unlikely(!s)) { + return talloc_strndup(NULL, a, n); + } + + if (unlikely(!a)) { + return s; + } + + return __talloc_strlendup_append(s, strlen(s), a, strnlen(a, n)); +} + +/* + * Appends at the end of the talloc'ed buffer, + * not the end of the string. + */ +_PUBLIC_ char *talloc_strndup_append_buffer(char *s, const char *a, size_t n) +{ + size_t slen; + + if (unlikely(!s)) { + return talloc_strndup(NULL, a, n); + } + + if (unlikely(!a)) { + return s; + } + + slen = talloc_get_size(s); + if (likely(slen > 0)) { + slen--; + } + + return __talloc_strlendup_append(s, slen, a, strnlen(a, n)); +} + +#ifndef HAVE_VA_COPY +#ifdef HAVE___VA_COPY +#define va_copy(dest, src) __va_copy(dest, src) +#else +#define va_copy(dest, src) (dest) = (src) +#endif +#endif + +static struct talloc_chunk *_vasprintf_tc(const void *t, + const char *fmt, + va_list ap) PRINTF_ATTRIBUTE(2,0); + +static struct talloc_chunk *_vasprintf_tc(const void *t, + const char *fmt, + va_list ap) +{ + int vlen; + size_t len; + char *ret; + va_list ap2; + struct talloc_chunk *tc; + char buf[1024]; + + /* this call looks strange, but it makes it work on older solaris boxes */ + va_copy(ap2, ap); + vlen = vsnprintf(buf, sizeof(buf), fmt, ap2); + va_end(ap2); + if (unlikely(vlen < 0)) { + return NULL; + } + len = vlen; + if (unlikely(len + 1 < len)) { + return NULL; + } + + ret = (char *)__talloc(t, len+1, &tc); + if (unlikely(!ret)) return NULL; + + if (len < sizeof(buf)) { + memcpy(ret, buf, len+1); + } else { + va_copy(ap2, ap); + vsnprintf(ret, len+1, fmt, ap2); + va_end(ap2); + } + + _tc_set_name_const(tc, ret); + return tc; +} + +_PUBLIC_ char *talloc_vasprintf(const void *t, const char *fmt, va_list ap) +{ + struct talloc_chunk *tc = _vasprintf_tc(t, fmt, ap); + if (tc == NULL) { + return NULL; + } + return TC_PTR_FROM_CHUNK(tc); +} + + +/* + Perform string formatting, and return a pointer to newly allocated + memory holding the result, inside a memory pool. + */ +_PUBLIC_ char *talloc_asprintf(const void *t, const char *fmt, ...) +{ + va_list ap; + char *ret; + + va_start(ap, fmt); + ret = talloc_vasprintf(t, fmt, ap); + va_end(ap); + return ret; +} + +static inline char *__talloc_vaslenprintf_append(char *s, size_t slen, + const char *fmt, va_list ap) + PRINTF_ATTRIBUTE(3,0); + +static inline char *__talloc_vaslenprintf_append(char *s, size_t slen, + const char *fmt, va_list ap) +{ + ssize_t alen; + va_list ap2; + char c; + + va_copy(ap2, ap); + alen = vsnprintf(&c, 1, fmt, ap2); + va_end(ap2); + + if (alen <= 0) { + /* Either the vsnprintf failed or the format resulted in + * no characters being formatted. In the former case, we + * ought to return NULL, in the latter we ought to return + * the original string. Most current callers of this + * function expect it to never return NULL. + */ + return s; + } + + s = talloc_realloc(NULL, s, char, slen + alen + 1); + if (!s) return NULL; + + va_copy(ap2, ap); + vsnprintf(s + slen, alen + 1, fmt, ap2); + va_end(ap2); + + _tc_set_name_const(talloc_chunk_from_ptr(s), s); + return s; +} + +/** + * Realloc @p s to append the formatted result of @p fmt and @p ap, + * and return @p s, which may have moved. Good for gradually + * accumulating output into a string buffer. Appends at the end + * of the string. + **/ +_PUBLIC_ char *talloc_vasprintf_append(char *s, const char *fmt, va_list ap) +{ + if (unlikely(!s)) { + return talloc_vasprintf(NULL, fmt, ap); + } + + return __talloc_vaslenprintf_append(s, strlen(s), fmt, ap); +} + +/** + * Realloc @p s to append the formatted result of @p fmt and @p ap, + * and return @p s, which may have moved. Always appends at the + * end of the talloc'ed buffer, not the end of the string. + **/ +_PUBLIC_ char *talloc_vasprintf_append_buffer(char *s, const char *fmt, va_list ap) +{ + size_t slen; + + if (unlikely(!s)) { + return talloc_vasprintf(NULL, fmt, ap); + } + + slen = talloc_get_size(s); + if (likely(slen > 0)) { + slen--; + } + + return __talloc_vaslenprintf_append(s, slen, fmt, ap); +} + +/* + Realloc @p s to append the formatted result of @p fmt and return @p + s, which may have moved. Good for gradually accumulating output + into a string buffer. + */ +_PUBLIC_ char *talloc_asprintf_append(char *s, const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + s = talloc_vasprintf_append(s, fmt, ap); + va_end(ap); + return s; +} + +/* + Realloc @p s to append the formatted result of @p fmt and return @p + s, which may have moved. Good for gradually accumulating output + into a buffer. + */ +_PUBLIC_ char *talloc_asprintf_append_buffer(char *s, const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + s = talloc_vasprintf_append_buffer(s, fmt, ap); + va_end(ap); + return s; +} + +/* + alloc an array, checking for integer overflow in the array size +*/ +_PUBLIC_ void *_talloc_array(const void *ctx, size_t el_size, unsigned count, const char *name) +{ + if (count >= MAX_TALLOC_SIZE/el_size) { + return NULL; + } + return _talloc_named_const(ctx, el_size * count, name); +} + +/* + alloc an zero array, checking for integer overflow in the array size +*/ +_PUBLIC_ void *_talloc_zero_array(const void *ctx, size_t el_size, unsigned count, const char *name) +{ + if (count >= MAX_TALLOC_SIZE/el_size) { + return NULL; + } + return _talloc_zero(ctx, el_size * count, name); +} + +/* + realloc an array, checking for integer overflow in the array size +*/ +_PUBLIC_ void *_talloc_realloc_array(const void *ctx, void *ptr, size_t el_size, unsigned count, const char *name) +{ + if (count >= MAX_TALLOC_SIZE/el_size) { + return NULL; + } + return _talloc_realloc(ctx, ptr, el_size * count, name); +} + +/* + a function version of talloc_realloc(), so it can be passed as a function pointer + to libraries that want a realloc function (a realloc function encapsulates + all the basic capabilities of an allocation library, which is why this is useful) +*/ +_PUBLIC_ void *talloc_realloc_fn(const void *context, void *ptr, size_t size) +{ + return _talloc_realloc(context, ptr, size, NULL); +} + + +static int talloc_autofree_destructor(void *ptr) +{ + autofree_context = NULL; + return 0; +} + +/* + return a context which will be auto-freed on exit + this is useful for reducing the noise in leak reports +*/ +_PUBLIC_ void *talloc_autofree_context(void) +{ + if (autofree_context == NULL) { + autofree_context = _talloc_named_const(NULL, 0, "autofree_context"); + talloc_set_destructor(autofree_context, talloc_autofree_destructor); + talloc_setup_atexit(); + } + return autofree_context; +} + +_PUBLIC_ size_t talloc_get_size(const void *context) +{ + struct talloc_chunk *tc; + + if (context == NULL) { + return 0; + } + + tc = talloc_chunk_from_ptr(context); + + return tc->size; +} + +/* + find a parent of this context that has the given name, if any +*/ +_PUBLIC_ void *talloc_find_parent_byname(const void *context, const char *name) +{ + struct talloc_chunk *tc; + + if (context == NULL) { + return NULL; + } + + tc = talloc_chunk_from_ptr(context); + while (tc) { + if (tc->name && strcmp(tc->name, name) == 0) { + return TC_PTR_FROM_CHUNK(tc); + } + while (tc && tc->prev) tc = tc->prev; + if (tc) { + tc = tc->parent; + } + } + return NULL; +} + +/* + show the parentage of a context +*/ +_PUBLIC_ void talloc_show_parents(const void *context, FILE *file) +{ + struct talloc_chunk *tc; + + if (context == NULL) { + fprintf(file, "talloc no parents for NULL\n"); + return; + } + + tc = talloc_chunk_from_ptr(context); + fprintf(file, "talloc parents of '%s'\n", __talloc_get_name(context)); + while (tc) { + fprintf(file, "\t'%s'\n", __talloc_get_name(TC_PTR_FROM_CHUNK(tc))); + while (tc && tc->prev) tc = tc->prev; + if (tc) { + tc = tc->parent; + } + } + fflush(file); +} + +/* + return 1 if ptr is a parent of context +*/ +static int _talloc_is_parent(const void *context, const void *ptr, int depth) +{ + struct talloc_chunk *tc; + + if (context == NULL) { + return 0; + } + + tc = talloc_chunk_from_ptr(context); + while (tc) { + if (depth <= 0) { + return 0; + } + if (TC_PTR_FROM_CHUNK(tc) == ptr) return 1; + while (tc && tc->prev) tc = tc->prev; + if (tc) { + tc = tc->parent; + depth--; + } + } + return 0; +} + +/* + return 1 if ptr is a parent of context +*/ +_PUBLIC_ int talloc_is_parent(const void *context, const void *ptr) +{ + return _talloc_is_parent(context, ptr, TALLOC_MAX_DEPTH); +} + +/* + return the total size of memory used by this context and all children +*/ +static inline size_t _talloc_total_limit_size(const void *ptr, + struct talloc_memlimit *old_limit, + struct talloc_memlimit *new_limit) +{ + return _talloc_total_mem_internal(ptr, TOTAL_MEM_LIMIT, + old_limit, new_limit); +} + +static inline bool talloc_memlimit_check(struct talloc_memlimit *limit, size_t size) +{ + struct talloc_memlimit *l; + + for (l = limit; l != NULL; l = l->upper) { + if (l->max_size != 0 && + ((l->max_size <= l->cur_size) || + (l->max_size - l->cur_size < size))) { + return false; + } + } + + return true; +} + +/* + Update memory limits when freeing a talloc_chunk. +*/ +static void tc_memlimit_update_on_free(struct talloc_chunk *tc) +{ + size_t limit_shrink_size; + + if (!tc->limit) { + return; + } + + /* + * Pool entries don't count. Only the pools + * themselves are counted as part of the memory + * limits. Note that this also takes care of + * nested pools which have both flags + * TALLOC_FLAG_POOLMEM|TALLOC_FLAG_POOL set. + */ + if (tc->flags & TALLOC_FLAG_POOLMEM) { + return; + } + + /* + * If we are part of a memory limited context hierarchy + * we need to subtract the memory used from the counters + */ + + limit_shrink_size = tc->size+TC_HDR_SIZE; + + /* + * If we're deallocating a pool, take into + * account the prefix size added for the pool. + */ + + if (tc->flags & TALLOC_FLAG_POOL) { + limit_shrink_size += TP_HDR_SIZE; + } + + talloc_memlimit_shrink(tc->limit, limit_shrink_size); + + if (tc->limit->parent == tc) { + free(tc->limit); + } + + tc->limit = NULL; +} + +/* + Increase memory limit accounting after a malloc/realloc. +*/ +static void talloc_memlimit_grow(struct talloc_memlimit *limit, + size_t size) +{ + struct talloc_memlimit *l; + + for (l = limit; l != NULL; l = l->upper) { + size_t new_cur_size = l->cur_size + size; + if (new_cur_size < l->cur_size) { + talloc_abort("logic error in talloc_memlimit_grow\n"); + return; + } + l->cur_size = new_cur_size; + } +} + +/* + Decrease memory limit accounting after a free/realloc. +*/ +static void talloc_memlimit_shrink(struct talloc_memlimit *limit, + size_t size) +{ + struct talloc_memlimit *l; + + for (l = limit; l != NULL; l = l->upper) { + if (l->cur_size < size) { + talloc_abort("logic error in talloc_memlimit_shrink\n"); + return; + } + l->cur_size = l->cur_size - size; + } +} + +_PUBLIC_ int talloc_set_memlimit(const void *ctx, size_t max_size) +{ + struct talloc_chunk *tc = talloc_chunk_from_ptr(ctx); + struct talloc_memlimit *orig_limit; + struct talloc_memlimit *limit = NULL; + + if (tc->limit && tc->limit->parent == tc) { + tc->limit->max_size = max_size; + return 0; + } + orig_limit = tc->limit; + + limit = malloc(sizeof(struct talloc_memlimit)); + if (limit == NULL) { + return 1; + } + limit->parent = tc; + limit->max_size = max_size; + limit->cur_size = _talloc_total_limit_size(ctx, tc->limit, limit); + + if (orig_limit) { + limit->upper = orig_limit; + } else { + limit->upper = NULL; + } + + return 0; +} diff --git a/sysmoOCTSIM/talloc.h b/sysmoOCTSIM/talloc.h new file mode 100644 index 0000000..7372df1 --- /dev/null +++ b/sysmoOCTSIM/talloc.h @@ -0,0 +1,1934 @@ +#ifndef _TALLOC_H_ +#define _TALLOC_H_ +/* + Unix SMB/CIFS implementation. + Samba temporary memory allocation functions + + Copyright (C) Andrew Tridgell 2004-2005 + Copyright (C) Stefan Metzmacher 2006 + + ** NOTE! The following LGPL license applies to the talloc + ** library. This does NOT imply that all of Samba is released + ** under the LGPL + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, see . +*/ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @defgroup talloc The talloc API + * + * talloc is a hierarchical, reference counted memory pool system with + * destructors. It is the core memory allocator used in Samba. + * + * @{ + */ + +#define TALLOC_VERSION_MAJOR 2 +#define TALLOC_VERSION_MINOR 1 + +int talloc_version_major(void); +int talloc_version_minor(void); +/* This is mostly useful only for testing */ +int talloc_test_get_magic(void); + +/** + * @brief Define a talloc parent type + * + * As talloc is a hierarchial memory allocator, every talloc chunk is a + * potential parent to other talloc chunks. So defining a separate type for a + * talloc chunk is not strictly necessary. TALLOC_CTX is defined nevertheless, + * as it provides an indicator for function arguments. You will frequently + * write code like + * + * @code + * struct foo *foo_create(TALLOC_CTX *mem_ctx) + * { + * struct foo *result; + * result = talloc(mem_ctx, struct foo); + * if (result == NULL) return NULL; + * ... initialize foo ... + * return result; + * } + * @endcode + * + * In this type of allocating functions it is handy to have a general + * TALLOC_CTX type to indicate which parent to put allocated structures on. + */ +typedef void TALLOC_CTX; + +/* + this uses a little trick to allow __LINE__ to be stringified +*/ +#ifndef __location__ +#define __TALLOC_STRING_LINE1__(s) #s +#define __TALLOC_STRING_LINE2__(s) __TALLOC_STRING_LINE1__(s) +#define __TALLOC_STRING_LINE3__ __TALLOC_STRING_LINE2__(__LINE__) +#define __location__ __FILE__ ":" __TALLOC_STRING_LINE3__ +#endif + +#ifndef TALLOC_DEPRECATED +#define TALLOC_DEPRECATED 0 +#endif + +#ifndef PRINTF_ATTRIBUTE +#if (__GNUC__ >= 3) +/** Use gcc attribute to check printf fns. a1 is the 1-based index of + * the parameter containing the format, and a2 the index of the first + * argument. Note that some gcc 2.x versions don't handle this + * properly **/ +#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2))) +#else +#define PRINTF_ATTRIBUTE(a1, a2) +#endif +#endif + +#ifdef DOXYGEN +/** + * @brief Create a new talloc context. + * + * The talloc() macro is the core of the talloc library. It takes a memory + * context and a type, and returns a pointer to a new area of memory of the + * given type. + * + * The returned pointer is itself a talloc context, so you can use it as the + * context argument to more calls to talloc if you wish. + * + * The returned pointer is a "child" of the supplied context. This means that if + * you talloc_free() the context then the new child disappears as well. + * Alternatively you can free just the child. + * + * @param[in] ctx A talloc context to create a new reference on or NULL to + * create a new top level context. + * + * @param[in] type The type of memory to allocate. + * + * @return A type casted talloc context or NULL on error. + * + * @code + * unsigned int *a, *b; + * + * a = talloc(NULL, unsigned int); + * b = talloc(a, unsigned int); + * @endcode + * + * @see talloc_zero + * @see talloc_array + * @see talloc_steal + * @see talloc_free + */ +void *talloc(const void *ctx, #type); +#else +#define talloc(ctx, type) (type *)talloc_named_const(ctx, sizeof(type), #type) +void *_talloc(const void *context, size_t size); +#endif + +/** + * @brief Create a new top level talloc context. + * + * This function creates a zero length named talloc context as a top level + * context. It is equivalent to: + * + * @code + * talloc_named(NULL, 0, fmt, ...); + * @endcode + * @param[in] fmt Format string for the name. + * + * @param[in] ... Additional printf-style arguments. + * + * @return The allocated memory chunk, NULL on error. + * + * @see talloc_named() + */ +void *talloc_init(const char *fmt, ...) PRINTF_ATTRIBUTE(1,2); + +#ifdef DOXYGEN +/** + * @brief Free a chunk of talloc memory. + * + * The talloc_free() function frees a piece of talloc memory, and all its + * children. You can call talloc_free() on any pointer returned by + * talloc(). + * + * The return value of talloc_free() indicates success or failure, with 0 + * returned for success and -1 for failure. A possible failure condition + * is if the pointer had a destructor attached to it and the destructor + * returned -1. See talloc_set_destructor() for details on + * destructors. Likewise, if "ptr" is NULL, then the function will make + * no modifications and return -1. + * + * From version 2.0 and onwards, as a special case, talloc_free() is + * refused on pointers that have more than one parent associated, as talloc + * would have no way of knowing which parent should be removed. This is + * different from older versions in the sense that always the reference to + * the most recently established parent has been destroyed. Hence to free a + * pointer that has more than one parent please use talloc_unlink(). + * + * To help you find problems in your code caused by this behaviour, if + * you do try and free a pointer with more than one parent then the + * talloc logging function will be called to give output like this: + * + * @code + * ERROR: talloc_free with references at some_dir/source/foo.c:123 + * reference at some_dir/source/other.c:325 + * reference at some_dir/source/third.c:121 + * @endcode + * + * Please see the documentation for talloc_set_log_fn() and + * talloc_set_log_stderr() for more information on talloc logging + * functions. + * + * If TALLOC_FREE_FILL environment variable is set, + * the memory occupied by the context is filled with the value of this variable. + * The value should be a numeric representation of the character you want to + * use. + * + * talloc_free() operates recursively on its children. + * + * @param[in] ptr The chunk to be freed. + * + * @return Returns 0 on success and -1 on error. A possible + * failure condition is if the pointer had a destructor + * attached to it and the destructor returned -1. Likewise, + * if "ptr" is NULL, then the function will make no + * modifications and returns -1. + * + * Example: + * @code + * unsigned int *a, *b; + * a = talloc(NULL, unsigned int); + * b = talloc(a, unsigned int); + * + * talloc_free(a); // Frees a and b + * @endcode + * + * @see talloc_set_destructor() + * @see talloc_unlink() + */ +int talloc_free(void *ptr); +#else +#define talloc_free(ctx) _talloc_free(ctx, __location__) +int _talloc_free(void *ptr, const char *location); +#endif + +/** + * @brief Free a talloc chunk's children. + * + * The function walks along the list of all children of a talloc context and + * talloc_free()s only the children, not the context itself. + * + * A NULL argument is handled as no-op. + * + * @param[in] ptr The chunk that you want to free the children of + * (NULL is allowed too) + */ +void talloc_free_children(void *ptr); + +#ifdef DOXYGEN +/** + * @brief Assign a destructor function to be called when a chunk is freed. + * + * The function talloc_set_destructor() sets the "destructor" for the pointer + * "ptr". A destructor is a function that is called when the memory used by a + * pointer is about to be released. The destructor receives the pointer as an + * argument, and should return 0 for success and -1 for failure. + * + * The destructor can do anything it wants to, including freeing other pieces + * of memory. A common use for destructors is to clean up operating system + * resources (such as open file descriptors) contained in the structure the + * destructor is placed on. + * + * You can only place one destructor on a pointer. If you need more than one + * destructor then you can create a zero-length child of the pointer and place + * an additional destructor on that. + * + * To remove a destructor call talloc_set_destructor() with NULL for the + * destructor. + * + * If your destructor attempts to talloc_free() the pointer that it is the + * destructor for then talloc_free() will return -1 and the free will be + * ignored. This would be a pointless operation anyway, as the destructor is + * only called when the memory is just about to go away. + * + * @param[in] ptr The talloc chunk to add a destructor to. + * + * @param[in] destructor The destructor function to be called. NULL to remove + * it. + * + * Example: + * @code + * static int destroy_fd(int *fd) { + * close(*fd); + * return 0; + * } + * + * int *open_file(const char *filename) { + * int *fd = talloc(NULL, int); + * *fd = open(filename, O_RDONLY); + * if (*fd < 0) { + * talloc_free(fd); + * return NULL; + * } + * // Whenever they free this, we close the file. + * talloc_set_destructor(fd, destroy_fd); + * return fd; + * } + * @endcode + * + * @see talloc() + * @see talloc_free() + */ +void talloc_set_destructor(const void *ptr, int (*destructor)(void *)); + +/** + * @brief Change a talloc chunk's parent. + * + * The talloc_steal() function changes the parent context of a talloc + * pointer. It is typically used when the context that the pointer is + * currently a child of is going to be freed and you wish to keep the + * memory for a longer time. + * + * To make the changed hierarchy less error-prone, you might consider to use + * talloc_move(). + * + * If you try and call talloc_steal() on a pointer that has more than one + * parent then the result is ambiguous. Talloc will choose to remove the + * parent that is currently indicated by talloc_parent() and replace it with + * the chosen parent. You will also get a message like this via the talloc + * logging functions: + * + * @code + * WARNING: talloc_steal with references at some_dir/source/foo.c:123 + * reference at some_dir/source/other.c:325 + * reference at some_dir/source/third.c:121 + * @endcode + * + * To unambiguously change the parent of a pointer please see the function + * talloc_reparent(). See the talloc_set_log_fn() documentation for more + * information on talloc logging. + * + * @param[in] new_ctx The new parent context. + * + * @param[in] ptr The talloc chunk to move. + * + * @return Returns the pointer that you pass it. It does not have + * any failure modes. + * + * @note It is possible to produce loops in the parent/child relationship + * if you are not careful with talloc_steal(). No guarantees are provided + * as to your sanity or the safety of your data if you do this. + */ +void *talloc_steal(const void *new_ctx, const void *ptr); +#else /* DOXYGEN */ +/* try to make talloc_set_destructor() and talloc_steal() type safe, + if we have a recent gcc */ +#if (__GNUC__ >= 3) +#define _TALLOC_TYPEOF(ptr) __typeof__(ptr) +#define talloc_set_destructor(ptr, function) \ + do { \ + int (*_talloc_destructor_fn)(_TALLOC_TYPEOF(ptr)) = (function); \ + _talloc_set_destructor((ptr), (int (*)(void *))_talloc_destructor_fn); \ + } while(0) +/* this extremely strange macro is to avoid some braindamaged warning + stupidity in gcc 4.1.x */ +#define talloc_steal(ctx, ptr) ({ _TALLOC_TYPEOF(ptr) __talloc_steal_ret = (_TALLOC_TYPEOF(ptr))_talloc_steal_loc((ctx),(ptr), __location__); __talloc_steal_ret; }) +#else /* __GNUC__ >= 3 */ +#define talloc_set_destructor(ptr, function) \ + _talloc_set_destructor((ptr), (int (*)(void *))(function)) +#define _TALLOC_TYPEOF(ptr) void * +#define talloc_steal(ctx, ptr) (_TALLOC_TYPEOF(ptr))_talloc_steal_loc((ctx),(ptr), __location__) +#endif /* __GNUC__ >= 3 */ +void _talloc_set_destructor(const void *ptr, int (*_destructor)(void *)); +void *_talloc_steal_loc(const void *new_ctx, const void *ptr, const char *location); +#endif /* DOXYGEN */ + +/** + * @brief Assign a name to a talloc chunk. + * + * Each talloc pointer has a "name". The name is used principally for + * debugging purposes, although it is also possible to set and get the name on + * a pointer in as a way of "marking" pointers in your code. + * + * The main use for names on pointer is for "talloc reports". See + * talloc_report() and talloc_report_full() for details. Also see + * talloc_enable_leak_report() and talloc_enable_leak_report_full(). + * + * The talloc_set_name() function allocates memory as a child of the + * pointer. It is logically equivalent to: + * + * @code + * talloc_set_name_const(ptr, talloc_asprintf(ptr, fmt, ...)); + * @endcode + * + * @param[in] ptr The talloc chunk to assign a name to. + * + * @param[in] fmt Format string for the name. + * + * @param[in] ... Add printf-style additional arguments. + * + * @return The assigned name, NULL on error. + * + * @note Multiple calls to talloc_set_name() will allocate more memory without + * releasing the name. All of the memory is released when the ptr is freed + * using talloc_free(). + */ +const char *talloc_set_name(const void *ptr, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3); + +#ifdef DOXYGEN +/** + * @brief Change a talloc chunk's parent. + * + * This function has the same effect as talloc_steal(), and additionally sets + * the source pointer to NULL. You would use it like this: + * + * @code + * struct foo *X = talloc(tmp_ctx, struct foo); + * struct foo *Y; + * Y = talloc_move(new_ctx, &X); + * @endcode + * + * @param[in] new_ctx The new parent context. + * + * @param[in] pptr Pointer to a pointer to the talloc chunk to move. + * + * @return The pointer to the talloc chunk that moved. + * It does not have any failure modes. + * + */ +void *talloc_move(const void *new_ctx, void **pptr); +#else +#define talloc_move(ctx, pptr) (_TALLOC_TYPEOF(*(pptr)))_talloc_move((ctx),(void *)(pptr)) +void *_talloc_move(const void *new_ctx, const void *pptr); +#endif + +/** + * @brief Assign a name to a talloc chunk. + * + * The function is just like talloc_set_name(), but it takes a string constant, + * and is much faster. It is extensively used by the "auto naming" macros, such + * as talloc_p(). + * + * This function does not allocate any memory. It just copies the supplied + * pointer into the internal representation of the talloc ptr. This means you + * must not pass a name pointer to memory that will disappear before the ptr + * is freed with talloc_free(). + * + * @param[in] ptr The talloc chunk to assign a name to. + * + * @param[in] name Format string for the name. + */ +void talloc_set_name_const(const void *ptr, const char *name); + +/** + * @brief Create a named talloc chunk. + * + * The talloc_named() function creates a named talloc pointer. It is + * equivalent to: + * + * @code + * ptr = talloc_size(context, size); + * talloc_set_name(ptr, fmt, ....); + * @endcode + * + * @param[in] context The talloc context to hang the result off. + * + * @param[in] size Number of char's that you want to allocate. + * + * @param[in] fmt Format string for the name. + * + * @param[in] ... Additional printf-style arguments. + * + * @return The allocated memory chunk, NULL on error. + * + * @see talloc_set_name() + */ +void *talloc_named(const void *context, size_t size, + const char *fmt, ...) PRINTF_ATTRIBUTE(3,4); + +/** + * @brief Basic routine to allocate a chunk of memory. + * + * This is equivalent to: + * + * @code + * ptr = talloc_size(context, size); + * talloc_set_name_const(ptr, name); + * @endcode + * + * @param[in] context The parent context. + * + * @param[in] size The number of char's that we want to allocate. + * + * @param[in] name The name the talloc block has. + * + * @return The allocated memory chunk, NULL on error. + */ +void *talloc_named_const(const void *context, size_t size, const char *name); + +#ifdef DOXYGEN +/** + * @brief Untyped allocation. + * + * The function should be used when you don't have a convenient type to pass to + * talloc(). Unlike talloc(), it is not type safe (as it returns a void *), so + * you are on your own for type checking. + * + * Best to use talloc() or talloc_array() instead. + * + * @param[in] ctx The talloc context to hang the result off. + * + * @param[in] size Number of char's that you want to allocate. + * + * @return The allocated memory chunk, NULL on error. + * + * Example: + * @code + * void *mem = talloc_size(NULL, 100); + * @endcode + */ +void *talloc_size(const void *ctx, size_t size); +#else +#define talloc_size(ctx, size) talloc_named_const(ctx, size, __location__) +#endif + +#ifdef DOXYGEN +/** + * @brief Allocate into a typed pointer. + * + * The talloc_ptrtype() macro should be used when you have a pointer and want + * to allocate memory to point at with this pointer. When compiling with + * gcc >= 3 it is typesafe. Note this is a wrapper of talloc_size() and + * talloc_get_name() will return the current location in the source file and + * not the type. + * + * @param[in] ctx The talloc context to hang the result off. + * + * @param[in] type The pointer you want to assign the result to. + * + * @return The properly casted allocated memory chunk, NULL on + * error. + * + * Example: + * @code + * unsigned int *a = talloc_ptrtype(NULL, a); + * @endcode + */ +void *talloc_ptrtype(const void *ctx, #type); +#else +#define talloc_ptrtype(ctx, ptr) (_TALLOC_TYPEOF(ptr))talloc_size(ctx, sizeof(*(ptr))) +#endif + +#ifdef DOXYGEN +/** + * @brief Allocate a new 0-sized talloc chunk. + * + * This is a utility macro that creates a new memory context hanging off an + * existing context, automatically naming it "talloc_new: __location__" where + * __location__ is the source line it is called from. It is particularly + * useful for creating a new temporary working context. + * + * @param[in] ctx The talloc parent context. + * + * @return A new talloc chunk, NULL on error. + */ +void *talloc_new(const void *ctx); +#else +#define talloc_new(ctx) talloc_named_const(ctx, 0, "talloc_new: " __location__) +#endif + +#ifdef DOXYGEN +/** + * @brief Allocate a 0-initizialized structure. + * + * The macro is equivalent to: + * + * @code + * ptr = talloc(ctx, type); + * if (ptr) memset(ptr, 0, sizeof(type)); + * @endcode + * + * @param[in] ctx The talloc context to hang the result off. + * + * @param[in] type The type that we want to allocate. + * + * @return Pointer to a piece of memory, properly cast to 'type *', + * NULL on error. + * + * Example: + * @code + * unsigned int *a, *b; + * a = talloc_zero(NULL, unsigned int); + * b = talloc_zero(a, unsigned int); + * @endcode + * + * @see talloc() + * @see talloc_zero_size() + * @see talloc_zero_array() + */ +void *talloc_zero(const void *ctx, #type); + +/** + * @brief Allocate untyped, 0-initialized memory. + * + * @param[in] ctx The talloc context to hang the result off. + * + * @param[in] size Number of char's that you want to allocate. + * + * @return The allocated memory chunk. + */ +void *talloc_zero_size(const void *ctx, size_t size); +#else +#define talloc_zero(ctx, type) (type *)_talloc_zero(ctx, sizeof(type), #type) +#define talloc_zero_size(ctx, size) _talloc_zero(ctx, size, __location__) +void *_talloc_zero(const void *ctx, size_t size, const char *name); +#endif + +/** + * @brief Return the name of a talloc chunk. + * + * @param[in] ptr The talloc chunk. + * + * @return The current name for the given talloc pointer. + * + * @see talloc_set_name() + */ +const char *talloc_get_name(const void *ptr); + +/** + * @brief Verify that a talloc chunk carries a specified name. + * + * This function checks if a pointer has the specified name. If it does + * then the pointer is returned. + * + * @param[in] ptr The talloc chunk to check. + * + * @param[in] name The name to check against. + * + * @return The pointer if the name matches, NULL if it doesn't. + */ +void *talloc_check_name(const void *ptr, const char *name); + +/** + * @brief Get the parent chunk of a pointer. + * + * @param[in] ptr The talloc pointer to inspect. + * + * @return The talloc parent of ptr, NULL on error. + */ +void *talloc_parent(const void *ptr); + +/** + * @brief Get a talloc chunk's parent name. + * + * @param[in] ptr The talloc pointer to inspect. + * + * @return The name of ptr's parent chunk. + */ +const char *talloc_parent_name(const void *ptr); + +/** + * @brief Get the total size of a talloc chunk including its children. + * + * The function returns the total size in bytes used by this pointer and all + * child pointers. Mostly useful for debugging. + * + * Passing NULL is allowed, but it will only give a meaningful result if + * talloc_enable_leak_report() or talloc_enable_leak_report_full() has + * been called. + * + * @param[in] ptr The talloc chunk. + * + * @return The total size. + */ +size_t talloc_total_size(const void *ptr); + +/** + * @brief Get the number of talloc chunks hanging off a chunk. + * + * The talloc_total_blocks() function returns the total memory block + * count used by this pointer and all child pointers. Mostly useful for + * debugging. + * + * Passing NULL is allowed, but it will only give a meaningful result if + * talloc_enable_leak_report() or talloc_enable_leak_report_full() has + * been called. + * + * @param[in] ptr The talloc chunk. + * + * @return The total size. + */ +size_t talloc_total_blocks(const void *ptr); + +#ifdef DOXYGEN +/** + * @brief Duplicate a memory area into a talloc chunk. + * + * The function is equivalent to: + * + * @code + * ptr = talloc_size(ctx, size); + * if (ptr) memcpy(ptr, p, size); + * @endcode + * + * @param[in] t The talloc context to hang the result off. + * + * @param[in] p The memory chunk you want to duplicate. + * + * @param[in] size Number of char's that you want copy. + * + * @return The allocated memory chunk. + * + * @see talloc_size() + */ +void *talloc_memdup(const void *t, const void *p, size_t size); +#else +#define talloc_memdup(t, p, size) _talloc_memdup(t, p, size, __location__) +void *_talloc_memdup(const void *t, const void *p, size_t size, const char *name); +#endif + +#ifdef DOXYGEN +/** + * @brief Assign a type to a talloc chunk. + * + * This macro allows you to force the name of a pointer to be of a particular + * type. This can be used in conjunction with talloc_get_type() to do type + * checking on void* pointers. + * + * It is equivalent to this: + * + * @code + * talloc_set_name_const(ptr, #type) + * @endcode + * + * @param[in] ptr The talloc chunk to assign the type to. + * + * @param[in] type The type to assign. + */ +void talloc_set_type(const char *ptr, #type); + +/** + * @brief Get a typed pointer out of a talloc pointer. + * + * This macro allows you to do type checking on talloc pointers. It is + * particularly useful for void* private pointers. It is equivalent to + * this: + * + * @code + * (type *)talloc_check_name(ptr, #type) + * @endcode + * + * @param[in] ptr The talloc pointer to check. + * + * @param[in] type The type to check against. + * + * @return The properly casted pointer given by ptr, NULL on error. + */ +type *talloc_get_type(const void *ptr, #type); +#else +#define talloc_set_type(ptr, type) talloc_set_name_const(ptr, #type) +#define talloc_get_type(ptr, type) (type *)talloc_check_name(ptr, #type) +#endif + +#ifdef DOXYGEN +/** + * @brief Safely turn a void pointer into a typed pointer. + * + * This macro is used together with talloc(mem_ctx, struct foo). If you had to + * assign the talloc chunk pointer to some void pointer variable, + * talloc_get_type_abort() is the recommended way to get the convert the void + * pointer back to a typed pointer. + * + * @param[in] ptr The void pointer to convert. + * + * @param[in] type The type that this chunk contains + * + * @return The same value as ptr, type-checked and properly cast. + */ +void *talloc_get_type_abort(const void *ptr, #type); +#else +#ifdef TALLOC_GET_TYPE_ABORT_NOOP +#define talloc_get_type_abort(ptr, type) (type *)(ptr) +#else +#define talloc_get_type_abort(ptr, type) (type *)_talloc_get_type_abort(ptr, #type, __location__) +#endif +void *_talloc_get_type_abort(const void *ptr, const char *name, const char *location); +#endif + +/** + * @brief Find a parent context by name. + * + * Find a parent memory context of the current context that has the given + * name. This can be very useful in complex programs where it may be + * difficult to pass all information down to the level you need, but you + * know the structure you want is a parent of another context. + * + * @param[in] ctx The talloc chunk to start from. + * + * @param[in] name The name of the parent we look for. + * + * @return The memory context we are looking for, NULL if not + * found. + */ +void *talloc_find_parent_byname(const void *ctx, const char *name); + +#ifdef DOXYGEN +/** + * @brief Find a parent context by type. + * + * Find a parent memory context of the current context that has the given + * name. This can be very useful in complex programs where it may be + * difficult to pass all information down to the level you need, but you + * know the structure you want is a parent of another context. + * + * Like talloc_find_parent_byname() but takes a type, making it typesafe. + * + * @param[in] ptr The talloc chunk to start from. + * + * @param[in] type The type of the parent to look for. + * + * @return The memory context we are looking for, NULL if not + * found. + */ +void *talloc_find_parent_bytype(const void *ptr, #type); +#else +#define talloc_find_parent_bytype(ptr, type) (type *)talloc_find_parent_byname(ptr, #type) +#endif + +/** + * @brief Allocate a talloc pool. + * + * A talloc pool is a pure optimization for specific situations. In the + * release process for Samba 3.2 we found out that we had become considerably + * slower than Samba 3.0 was. Profiling showed that malloc(3) was a large CPU + * consumer in benchmarks. For Samba 3.2 we have internally converted many + * static buffers to dynamically allocated ones, so malloc(3) being beaten + * more was no surprise. But it made us slower. + * + * talloc_pool() is an optimization to call malloc(3) a lot less for the use + * pattern Samba has: The SMB protocol is mainly a request/response protocol + * where we have to allocate a certain amount of memory per request and free + * that after the SMB reply is sent to the client. + * + * talloc_pool() creates a talloc chunk that you can use as a talloc parent + * exactly as you would use any other ::TALLOC_CTX. The difference is that + * when you talloc a child of this pool, no malloc(3) is done. Instead, talloc + * just increments a pointer inside the talloc_pool. This also works + * recursively. If you use the child of the talloc pool as a parent for + * grand-children, their memory is also taken from the talloc pool. + * + * If there is not enough memory in the pool to allocate the new child, + * it will create a new talloc chunk as if the parent was a normal talloc + * context. + * + * If you talloc_free() children of a talloc pool, the memory is not given + * back to the system. Instead, free(3) is only called if the talloc_pool() + * itself is released with talloc_free(). + * + * The downside of a talloc pool is that if you talloc_move() a child of a + * talloc pool to a talloc parent outside the pool, the whole pool memory is + * not free(3)'ed until that moved chunk is also talloc_free()ed. + * + * @param[in] context The talloc context to hang the result off. + * + * @param[in] size Size of the talloc pool. + * + * @return The allocated talloc pool, NULL on error. + */ +void *talloc_pool(const void *context, size_t size); + +#ifdef DOXYGEN +/** + * @brief Allocate a talloc object as/with an additional pool. + * + * This is like talloc_pool(), but's it's more flexible + * and allows an object to be a pool for its children. + * + * @param[in] ctx The talloc context to hang the result off. + * + * @param[in] type The type that we want to allocate. + * + * @param[in] num_subobjects The expected number of subobjects, which will + * be allocated within the pool. This allocates + * space for talloc_chunk headers. + * + * @param[in] total_subobjects_size The size that all subobjects can use in total. + * + * + * @return The allocated talloc object, NULL on error. + */ +void *talloc_pooled_object(const void *ctx, #type, + unsigned num_subobjects, + size_t total_subobjects_size); +#else +#define talloc_pooled_object(_ctx, _type, \ + _num_subobjects, \ + _total_subobjects_size) \ + (_type *)_talloc_pooled_object((_ctx), sizeof(_type), #_type, \ + (_num_subobjects), \ + (_total_subobjects_size)) +void *_talloc_pooled_object(const void *ctx, + size_t type_size, + const char *type_name, + unsigned num_subobjects, + size_t total_subobjects_size); +#endif + +/** + * @brief Free a talloc chunk and NULL out the pointer. + * + * TALLOC_FREE() frees a pointer and sets it to NULL. Use this if you want + * immediate feedback (i.e. crash) if you use a pointer after having free'ed + * it. + * + * @param[in] ctx The chunk to be freed. + */ +#define TALLOC_FREE(ctx) do { if (ctx != NULL) { talloc_free(ctx); ctx=NULL; } } while(0) + +/* @} ******************************************************************/ + +/** + * \defgroup talloc_ref The talloc reference function. + * @ingroup talloc + * + * This module contains the definitions around talloc references + * + * @{ + */ + +/** + * @brief Increase the reference count of a talloc chunk. + * + * The talloc_increase_ref_count(ptr) function is exactly equivalent to: + * + * @code + * talloc_reference(NULL, ptr); + * @endcode + * + * You can use either syntax, depending on which you think is clearer in + * your code. + * + * @param[in] ptr The pointer to increase the reference count. + * + * @return 0 on success, -1 on error. + */ +int talloc_increase_ref_count(const void *ptr); + +/** + * @brief Get the number of references to a talloc chunk. + * + * @param[in] ptr The pointer to retrieve the reference count from. + * + * @return The number of references. + */ +size_t talloc_reference_count(const void *ptr); + +#ifdef DOXYGEN +/** + * @brief Create an additional talloc parent to a pointer. + * + * The talloc_reference() function makes "context" an additional parent of + * ptr. Each additional reference consumes around 48 bytes of memory on intel + * x86 platforms. + * + * If ptr is NULL, then the function is a no-op, and simply returns NULL. + * + * After creating a reference you can free it in one of the following ways: + * + * - you can talloc_free() any parent of the original pointer. That + * will reduce the number of parents of this pointer by 1, and will + * cause this pointer to be freed if it runs out of parents. + * + * - you can talloc_free() the pointer itself if it has at maximum one + * parent. This behaviour has been changed since the release of version + * 2.0. Further informations in the description of "talloc_free". + * + * For more control on which parent to remove, see talloc_unlink() + * @param[in] ctx The additional parent. + * + * @param[in] ptr The pointer you want to create an additional parent for. + * + * @return The original pointer 'ptr', NULL if talloc ran out of + * memory in creating the reference. + * + * @warning You should try to avoid using this interface. It turns a beautiful + * talloc-tree into a graph. It is often really hard to debug if you + * screw something up by accident. + * + * Example: + * @code + * unsigned int *a, *b, *c; + * a = talloc(NULL, unsigned int); + * b = talloc(NULL, unsigned int); + * c = talloc(a, unsigned int); + * // b also serves as a parent of c. + * talloc_reference(b, c); + * @endcode + * + * @see talloc_unlink() + */ +void *talloc_reference(const void *ctx, const void *ptr); +#else +#define talloc_reference(ctx, ptr) (_TALLOC_TYPEOF(ptr))_talloc_reference_loc((ctx),(ptr), __location__) +void *_talloc_reference_loc(const void *context, const void *ptr, const char *location); +#endif + +/** + * @brief Remove a specific parent from a talloc chunk. + * + * The function removes a specific parent from ptr. The context passed must + * either be a context used in talloc_reference() with this pointer, or must be + * a direct parent of ptr. + * + * You can just use talloc_free() instead of talloc_unlink() if there + * is at maximum one parent. This behaviour has been changed since the + * release of version 2.0. Further informations in the description of + * "talloc_free". + * + * @param[in] context The talloc parent to remove. + * + * @param[in] ptr The talloc ptr you want to remove the parent from. + * + * @return 0 on success, -1 on error. + * + * @note If the parent has already been removed using talloc_free() then + * this function will fail and will return -1. Likewise, if ptr is NULL, + * then the function will make no modifications and return -1. + * + * @warning You should try to avoid using this interface. It turns a beautiful + * talloc-tree into a graph. It is often really hard to debug if you + * screw something up by accident. + * + * Example: + * @code + * unsigned int *a, *b, *c; + * a = talloc(NULL, unsigned int); + * b = talloc(NULL, unsigned int); + * c = talloc(a, unsigned int); + * // b also serves as a parent of c. + * talloc_reference(b, c); + * talloc_unlink(b, c); + * @endcode + */ +int talloc_unlink(const void *context, void *ptr); + +/** + * @brief Provide a talloc context that is freed at program exit. + * + * This is a handy utility function that returns a talloc context + * which will be automatically freed on program exit. This can be used + * to reduce the noise in memory leak reports. + * + * Never use this in code that might be used in objects loaded with + * dlopen and unloaded with dlclose. talloc_autofree_context() + * internally uses atexit(3). Some platforms like modern Linux handles + * this fine, but for example FreeBSD does not deal well with dlopen() + * and atexit() used simultaneously: dlclose() does not clean up the + * list of atexit-handlers, so when the program exits the code that + * was registered from within talloc_autofree_context() is gone, the + * program crashes at exit. + * + * @return A talloc context, NULL on error. + */ +void *talloc_autofree_context(void); + +/** + * @brief Get the size of a talloc chunk. + * + * This function lets you know the amount of memory allocated so far by + * this context. It does NOT account for subcontext memory. + * This can be used to calculate the size of an array. + * + * @param[in] ctx The talloc chunk. + * + * @return The size of the talloc chunk. + */ +size_t talloc_get_size(const void *ctx); + +/** + * @brief Show the parentage of a context. + * + * @param[in] context The talloc context to look at. + * + * @param[in] file The output to use, a file, stdout or stderr. + */ +void talloc_show_parents(const void *context, FILE *file); + +/** + * @brief Check if a context is parent of a talloc chunk. + * + * This checks if context is referenced in the talloc hierarchy above ptr. + * + * @param[in] context The assumed talloc context. + * + * @param[in] ptr The talloc chunk to check. + * + * @return Return 1 if this is the case, 0 if not. + */ +int talloc_is_parent(const void *context, const void *ptr); + +/** + * @brief Change the parent context of a talloc pointer. + * + * The function changes the parent context of a talloc pointer. It is typically + * used when the context that the pointer is currently a child of is going to be + * freed and you wish to keep the memory for a longer time. + * + * The difference between talloc_reparent() and talloc_steal() is that + * talloc_reparent() can specify which parent you wish to change. This is + * useful when a pointer has multiple parents via references. + * + * @param[in] old_parent + * @param[in] new_parent + * @param[in] ptr + * + * @return Return the pointer you passed. It does not have any + * failure modes. + */ +void *talloc_reparent(const void *old_parent, const void *new_parent, const void *ptr); + +/* @} ******************************************************************/ + +/** + * @defgroup talloc_array The talloc array functions + * @ingroup talloc + * + * Talloc contains some handy helpers for handling Arrays conveniently + * + * @{ + */ + +#ifdef DOXYGEN +/** + * @brief Allocate an array. + * + * The macro is equivalent to: + * + * @code + * (type *)talloc_size(ctx, sizeof(type) * count); + * @endcode + * + * except that it provides integer overflow protection for the multiply, + * returning NULL if the multiply overflows. + * + * @param[in] ctx The talloc context to hang the result off. + * + * @param[in] type The type that we want to allocate. + * + * @param[in] count The number of 'type' elements you want to allocate. + * + * @return The allocated result, properly cast to 'type *', NULL on + * error. + * + * Example: + * @code + * unsigned int *a, *b; + * a = talloc_zero(NULL, unsigned int); + * b = talloc_array(a, unsigned int, 100); + * @endcode + * + * @see talloc() + * @see talloc_zero_array() + */ +void *talloc_array(const void *ctx, #type, unsigned count); +#else +#define talloc_array(ctx, type, count) (type *)_talloc_array(ctx, sizeof(type), count, #type) +void *_talloc_array(const void *ctx, size_t el_size, unsigned count, const char *name); +#endif + +#ifdef DOXYGEN +/** + * @brief Allocate an array. + * + * @param[in] ctx The talloc context to hang the result off. + * + * @param[in] size The size of an array element. + * + * @param[in] count The number of elements you want to allocate. + * + * @return The allocated result, NULL on error. + */ +void *talloc_array_size(const void *ctx, size_t size, unsigned count); +#else +#define talloc_array_size(ctx, size, count) _talloc_array(ctx, size, count, __location__) +#endif + +#ifdef DOXYGEN +/** + * @brief Allocate an array into a typed pointer. + * + * The macro should be used when you have a pointer to an array and want to + * allocate memory of an array to point at with this pointer. When compiling + * with gcc >= 3 it is typesafe. Note this is a wrapper of talloc_array_size() + * and talloc_get_name() will return the current location in the source file + * and not the type. + * + * @param[in] ctx The talloc context to hang the result off. + * + * @param[in] ptr The pointer you want to assign the result to. + * + * @param[in] count The number of elements you want to allocate. + * + * @return The allocated memory chunk, properly casted. NULL on + * error. + */ +void *talloc_array_ptrtype(const void *ctx, const void *ptr, unsigned count); +#else +#define talloc_array_ptrtype(ctx, ptr, count) (_TALLOC_TYPEOF(ptr))talloc_array_size(ctx, sizeof(*(ptr)), count) +#endif + +#ifdef DOXYGEN +/** + * @brief Get the number of elements in a talloc'ed array. + * + * A talloc chunk carries its own size, so for talloc'ed arrays it is not + * necessary to store the number of elements explicitly. + * + * @param[in] ctx The allocated array. + * + * @return The number of elements in ctx. + */ +size_t talloc_array_length(const void *ctx); +#else +#define talloc_array_length(ctx) (talloc_get_size(ctx)/sizeof(*ctx)) +#endif + +#ifdef DOXYGEN +/** + * @brief Allocate a zero-initialized array + * + * @param[in] ctx The talloc context to hang the result off. + * + * @param[in] type The type that we want to allocate. + * + * @param[in] count The number of "type" elements you want to allocate. + * + * @return The allocated result casted to "type *", NULL on error. + * + * The talloc_zero_array() macro is equivalent to: + * + * @code + * ptr = talloc_array(ctx, type, count); + * if (ptr) memset(ptr, 0, sizeof(type) * count); + * @endcode + */ +void *talloc_zero_array(const void *ctx, #type, unsigned count); +#else +#define talloc_zero_array(ctx, type, count) (type *)_talloc_zero_array(ctx, sizeof(type), count, #type) +void *_talloc_zero_array(const void *ctx, + size_t el_size, + unsigned count, + const char *name); +#endif + +#ifdef DOXYGEN +/** + * @brief Change the size of a talloc array. + * + * The macro changes the size of a talloc pointer. The 'count' argument is the + * number of elements of type 'type' that you want the resulting pointer to + * hold. + * + * talloc_realloc() has the following equivalences: + * + * @code + * talloc_realloc(ctx, NULL, type, 1) ==> talloc(ctx, type); + * talloc_realloc(ctx, NULL, type, N) ==> talloc_array(ctx, type, N); + * talloc_realloc(ctx, ptr, type, 0) ==> talloc_free(ptr); + * @endcode + * + * The "context" argument is only used if "ptr" is NULL, otherwise it is + * ignored. + * + * @param[in] ctx The parent context used if ptr is NULL. + * + * @param[in] ptr The chunk to be resized. + * + * @param[in] type The type of the array element inside ptr. + * + * @param[in] count The intended number of array elements. + * + * @return The new array, NULL on error. The call will fail either + * due to a lack of memory, or because the pointer has more + * than one parent (see talloc_reference()). + */ +void *talloc_realloc(const void *ctx, void *ptr, #type, size_t count); +#else +#define talloc_realloc(ctx, p, type, count) (type *)_talloc_realloc_array(ctx, p, sizeof(type), count, #type) +void *_talloc_realloc_array(const void *ctx, void *ptr, size_t el_size, unsigned count, const char *name); +#endif + +#ifdef DOXYGEN +/** + * @brief Untyped realloc to change the size of a talloc array. + * + * The macro is useful when the type is not known so the typesafe + * talloc_realloc() cannot be used. + * + * @param[in] ctx The parent context used if 'ptr' is NULL. + * + * @param[in] ptr The chunk to be resized. + * + * @param[in] size The new chunk size. + * + * @return The new array, NULL on error. + */ +void *talloc_realloc_size(const void *ctx, void *ptr, size_t size); +#else +#define talloc_realloc_size(ctx, ptr, size) _talloc_realloc(ctx, ptr, size, __location__) +void *_talloc_realloc(const void *context, void *ptr, size_t size, const char *name); +#endif + +/** + * @brief Provide a function version of talloc_realloc_size. + * + * This is a non-macro version of talloc_realloc(), which is useful as + * libraries sometimes want a ralloc function pointer. A realloc() + * implementation encapsulates the functionality of malloc(), free() and + * realloc() in one call, which is why it is useful to be able to pass around + * a single function pointer. + * + * @param[in] context The parent context used if ptr is NULL. + * + * @param[in] ptr The chunk to be resized. + * + * @param[in] size The new chunk size. + * + * @return The new chunk, NULL on error. + */ +void *talloc_realloc_fn(const void *context, void *ptr, size_t size); + +/* @} ******************************************************************/ + +/** + * @defgroup talloc_string The talloc string functions. + * @ingroup talloc + * + * talloc string allocation and manipulation functions. + * @{ + */ + +/** + * @brief Duplicate a string into a talloc chunk. + * + * This function is equivalent to: + * + * @code + * ptr = talloc_size(ctx, strlen(p)+1); + * if (ptr) memcpy(ptr, p, strlen(p)+1); + * @endcode + * + * This functions sets the name of the new pointer to the passed + * string. This is equivalent to: + * + * @code + * talloc_set_name_const(ptr, ptr) + * @endcode + * + * @param[in] t The talloc context to hang the result off. + * + * @param[in] p The string you want to duplicate. + * + * @return The duplicated string, NULL on error. + */ +char *talloc_strdup(const void *t, const char *p); + +/** + * @brief Append a string to given string. + * + * The destination string is reallocated to take + * strlen(s) + strlen(a) + 1 characters. + * + * This functions sets the name of the new pointer to the new + * string. This is equivalent to: + * + * @code + * talloc_set_name_const(ptr, ptr) + * @endcode + * + * If s == NULL then new context is created. + * + * @param[in] s The destination to append to. + * + * @param[in] a The string you want to append. + * + * @return The concatenated strings, NULL on error. + * + * @see talloc_strdup() + * @see talloc_strdup_append_buffer() + */ +char *talloc_strdup_append(char *s, const char *a); + +/** + * @brief Append a string to a given buffer. + * + * This is a more efficient version of talloc_strdup_append(). It determines the + * length of the destination string by the size of the talloc context. + * + * Use this very carefully as it produces a different result than + * talloc_strdup_append() when a zero character is in the middle of the + * destination string. + * + * @code + * char *str_a = talloc_strdup(NULL, "hello world"); + * char *str_b = talloc_strdup(NULL, "hello world"); + * str_a[5] = str_b[5] = '\0' + * + * char *app = talloc_strdup_append(str_a, ", hello"); + * char *buf = talloc_strdup_append_buffer(str_b, ", hello"); + * + * printf("%s\n", app); // hello, hello (app = "hello, hello") + * printf("%s\n", buf); // hello (buf = "hello\0world, hello") + * @endcode + * + * If s == NULL then new context is created. + * + * @param[in] s The destination buffer to append to. + * + * @param[in] a The string you want to append. + * + * @return The concatenated strings, NULL on error. + * + * @see talloc_strdup() + * @see talloc_strdup_append() + * @see talloc_array_length() + */ +char *talloc_strdup_append_buffer(char *s, const char *a); + +/** + * @brief Duplicate a length-limited string into a talloc chunk. + * + * This function is the talloc equivalent of the C library function strndup(3). + * + * This functions sets the name of the new pointer to the passed string. This is + * equivalent to: + * + * @code + * talloc_set_name_const(ptr, ptr) + * @endcode + * + * @param[in] t The talloc context to hang the result off. + * + * @param[in] p The string you want to duplicate. + * + * @param[in] n The maximum string length to duplicate. + * + * @return The duplicated string, NULL on error. + */ +char *talloc_strndup(const void *t, const char *p, size_t n); + +/** + * @brief Append at most n characters of a string to given string. + * + * The destination string is reallocated to take + * strlen(s) + strnlen(a, n) + 1 characters. + * + * This functions sets the name of the new pointer to the new + * string. This is equivalent to: + * + * @code + * talloc_set_name_const(ptr, ptr) + * @endcode + * + * If s == NULL then new context is created. + * + * @param[in] s The destination string to append to. + * + * @param[in] a The source string you want to append. + * + * @param[in] n The number of characters you want to append from the + * string. + * + * @return The concatenated strings, NULL on error. + * + * @see talloc_strndup() + * @see talloc_strndup_append_buffer() + */ +char *talloc_strndup_append(char *s, const char *a, size_t n); + +/** + * @brief Append at most n characters of a string to given buffer + * + * This is a more efficient version of talloc_strndup_append(). It determines + * the length of the destination string by the size of the talloc context. + * + * Use this very carefully as it produces a different result than + * talloc_strndup_append() when a zero character is in the middle of the + * destination string. + * + * @code + * char *str_a = talloc_strdup(NULL, "hello world"); + * char *str_b = talloc_strdup(NULL, "hello world"); + * str_a[5] = str_b[5] = '\0' + * + * char *app = talloc_strndup_append(str_a, ", hello", 7); + * char *buf = talloc_strndup_append_buffer(str_b, ", hello", 7); + * + * printf("%s\n", app); // hello, hello (app = "hello, hello") + * printf("%s\n", buf); // hello (buf = "hello\0world, hello") + * @endcode + * + * If s == NULL then new context is created. + * + * @param[in] s The destination buffer to append to. + * + * @param[in] a The source string you want to append. + * + * @param[in] n The number of characters you want to append from the + * string. + * + * @return The concatenated strings, NULL on error. + * + * @see talloc_strndup() + * @see talloc_strndup_append() + * @see talloc_array_length() + */ +char *talloc_strndup_append_buffer(char *s, const char *a, size_t n); + +/** + * @brief Format a string given a va_list. + * + * This function is the talloc equivalent of the C library function + * vasprintf(3). + * + * This functions sets the name of the new pointer to the new string. This is + * equivalent to: + * + * @code + * talloc_set_name_const(ptr, ptr) + * @endcode + * + * @param[in] t The talloc context to hang the result off. + * + * @param[in] fmt The format string. + * + * @param[in] ap The parameters used to fill fmt. + * + * @return The formatted string, NULL on error. + */ +char *talloc_vasprintf(const void *t, const char *fmt, va_list ap) PRINTF_ATTRIBUTE(2,0); + +/** + * @brief Format a string given a va_list and append it to the given destination + * string. + * + * @param[in] s The destination string to append to. + * + * @param[in] fmt The format string. + * + * @param[in] ap The parameters used to fill fmt. + * + * @return The formatted string, NULL on error. + * + * @see talloc_vasprintf() + */ +char *talloc_vasprintf_append(char *s, const char *fmt, va_list ap) PRINTF_ATTRIBUTE(2,0); + +/** + * @brief Format a string given a va_list and append it to the given destination + * buffer. + * + * @param[in] s The destination buffer to append to. + * + * @param[in] fmt The format string. + * + * @param[in] ap The parameters used to fill fmt. + * + * @return The formatted string, NULL on error. + * + * @see talloc_vasprintf() + */ +char *talloc_vasprintf_append_buffer(char *s, const char *fmt, va_list ap) PRINTF_ATTRIBUTE(2,0); + +/** + * @brief Format a string. + * + * This function is the talloc equivalent of the C library function asprintf(3). + * + * This functions sets the name of the new pointer to the new string. This is + * equivalent to: + * + * @code + * talloc_set_name_const(ptr, ptr) + * @endcode + * + * @param[in] t The talloc context to hang the result off. + * + * @param[in] fmt The format string. + * + * @param[in] ... The parameters used to fill fmt. + * + * @return The formatted string, NULL on error. + */ +char *talloc_asprintf(const void *t, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3); + +/** + * @brief Append a formatted string to another string. + * + * This function appends the given formatted string to the given string. Use + * this variant when the string in the current talloc buffer may have been + * truncated in length. + * + * This functions sets the name of the new pointer to the new + * string. This is equivalent to: + * + * @code + * talloc_set_name_const(ptr, ptr) + * @endcode + * + * If s == NULL then new context is created. + * + * @param[in] s The string to append to. + * + * @param[in] fmt The format string. + * + * @param[in] ... The parameters used to fill fmt. + * + * @return The formatted string, NULL on error. + */ +char *talloc_asprintf_append(char *s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3); + +/** + * @brief Append a formatted string to another string. + * + * This is a more efficient version of talloc_asprintf_append(). It determines + * the length of the destination string by the size of the talloc context. + * + * Use this very carefully as it produces a different result than + * talloc_asprintf_append() when a zero character is in the middle of the + * destination string. + * + * @code + * char *str_a = talloc_strdup(NULL, "hello world"); + * char *str_b = talloc_strdup(NULL, "hello world"); + * str_a[5] = str_b[5] = '\0' + * + * char *app = talloc_asprintf_append(str_a, "%s", ", hello"); + * char *buf = talloc_strdup_append_buffer(str_b, "%s", ", hello"); + * + * printf("%s\n", app); // hello, hello (app = "hello, hello") + * printf("%s\n", buf); // hello (buf = "hello\0world, hello") + * @endcode + * + * If s == NULL then new context is created. + * + * @param[in] s The string to append to + * + * @param[in] fmt The format string. + * + * @param[in] ... The parameters used to fill fmt. + * + * @return The formatted string, NULL on error. + * + * @see talloc_asprintf() + * @see talloc_asprintf_append() + */ +char *talloc_asprintf_append_buffer(char *s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3); + +/* @} ******************************************************************/ + +/** + * @defgroup talloc_debug The talloc debugging support functions + * @ingroup talloc + * + * To aid memory debugging, talloc contains routines to inspect the currently + * allocated memory hierarchy. + * + * @{ + */ + +/** + * @brief Walk a complete talloc hierarchy. + * + * This provides a more flexible reports than talloc_report(). It + * will recursively call the callback for the entire tree of memory + * referenced by the pointer. References in the tree are passed with + * is_ref = 1 and the pointer that is referenced. + * + * You can pass NULL for the pointer, in which case a report is + * printed for the top level memory context, but only if + * talloc_enable_leak_report() or talloc_enable_leak_report_full() + * has been called. + * + * The recursion is stopped when depth >= max_depth. + * max_depth = -1 means only stop at leaf nodes. + * + * @param[in] ptr The talloc chunk. + * + * @param[in] depth Internal parameter to control recursion. Call with 0. + * + * @param[in] max_depth Maximum recursion level. + * + * @param[in] callback Function to be called on every chunk. + * + * @param[in] private_data Private pointer passed to callback. + */ +void talloc_report_depth_cb(const void *ptr, int depth, int max_depth, + void (*callback)(const void *ptr, + int depth, int max_depth, + int is_ref, + void *private_data), + void *private_data); + +/** + * @brief Print a talloc hierarchy. + * + * This provides a more flexible reports than talloc_report(). It + * will let you specify the depth and max_depth. + * + * @param[in] ptr The talloc chunk. + * + * @param[in] depth Internal parameter to control recursion. Call with 0. + * + * @param[in] max_depth Maximum recursion level. + * + * @param[in] f The file handle to print to. + */ +void talloc_report_depth_file(const void *ptr, int depth, int max_depth, FILE *f); + +/** + * @brief Print a summary report of all memory used by ptr. + * + * This provides a more detailed report than talloc_report(). It will + * recursively print the entire tree of memory referenced by the + * pointer. References in the tree are shown by giving the name of the + * pointer that is referenced. + * + * You can pass NULL for the pointer, in which case a report is printed + * for the top level memory context, but only if + * talloc_enable_leak_report() or talloc_enable_leak_report_full() has + * been called. + * + * @param[in] ptr The talloc chunk. + * + * @param[in] f The file handle to print to. + * + * Example: + * @code + * unsigned int *a, *b; + * a = talloc(NULL, unsigned int); + * b = talloc(a, unsigned int); + * fprintf(stderr, "Dumping memory tree for a:\n"); + * talloc_report_full(a, stderr); + * @endcode + * + * @see talloc_report() + */ +void talloc_report_full(const void *ptr, FILE *f); + +/** + * @brief Print a summary report of all memory used by ptr. + * + * This function prints a summary report of all memory used by ptr. One line of + * report is printed for each immediate child of ptr, showing the total memory + * and number of blocks used by that child. + * + * You can pass NULL for the pointer, in which case a report is printed + * for the top level memory context, but only if talloc_enable_leak_report() + * or talloc_enable_leak_report_full() has been called. + * + * @param[in] ptr The talloc chunk. + * + * @param[in] f The file handle to print to. + * + * Example: + * @code + * unsigned int *a, *b; + * a = talloc(NULL, unsigned int); + * b = talloc(a, unsigned int); + * fprintf(stderr, "Summary of memory tree for a:\n"); + * talloc_report(a, stderr); + * @endcode + * + * @see talloc_report_full() + */ +void talloc_report(const void *ptr, FILE *f); + +/** + * @brief Enable tracking the use of NULL memory contexts. + * + * This enables tracking of the NULL memory context without enabling leak + * reporting on exit. Useful for when you want to do your own leak + * reporting call via talloc_report_null_full(); + */ +void talloc_enable_null_tracking(void); + +/** + * @brief Enable tracking the use of NULL memory contexts. + * + * This enables tracking of the NULL memory context without enabling leak + * reporting on exit. Useful for when you want to do your own leak + * reporting call via talloc_report_null_full(); + */ +void talloc_enable_null_tracking_no_autofree(void); + +/** + * @brief Disable tracking of the NULL memory context. + * + * This disables tracking of the NULL memory context. + */ +void talloc_disable_null_tracking(void); + +/** + * @brief Enable leak report when a program exits. + * + * This enables calling of talloc_report(NULL, stderr) when the program + * exits. In Samba4 this is enabled by using the --leak-report command + * line option. + * + * For it to be useful, this function must be called before any other + * talloc function as it establishes a "null context" that acts as the + * top of the tree. If you don't call this function first then passing + * NULL to talloc_report() or talloc_report_full() won't give you the + * full tree printout. + * + * Here is a typical talloc report: + * + * @code + * talloc report on 'null_context' (total 267 bytes in 15 blocks) + * libcli/auth/spnego_parse.c:55 contains 31 bytes in 2 blocks + * libcli/auth/spnego_parse.c:55 contains 31 bytes in 2 blocks + * iconv(UTF8,CP850) contains 42 bytes in 2 blocks + * libcli/auth/spnego_parse.c:55 contains 31 bytes in 2 blocks + * iconv(CP850,UTF8) contains 42 bytes in 2 blocks + * iconv(UTF8,UTF-16LE) contains 45 bytes in 2 blocks + * iconv(UTF-16LE,UTF8) contains 45 bytes in 2 blocks + * @endcode + */ +void talloc_enable_leak_report(void); + +/** + * @brief Enable full leak report when a program exits. + * + * This enables calling of talloc_report_full(NULL, stderr) when the + * program exits. In Samba4 this is enabled by using the + * --leak-report-full command line option. + * + * For it to be useful, this function must be called before any other + * talloc function as it establishes a "null context" that acts as the + * top of the tree. If you don't call this function first then passing + * NULL to talloc_report() or talloc_report_full() won't give you the + * full tree printout. + * + * Here is a typical full report: + * + * @code + * full talloc report on 'root' (total 18 bytes in 8 blocks) + * p1 contains 18 bytes in 7 blocks (ref 0) + * r1 contains 13 bytes in 2 blocks (ref 0) + * reference to: p2 + * p2 contains 1 bytes in 1 blocks (ref 1) + * x3 contains 1 bytes in 1 blocks (ref 0) + * x2 contains 1 bytes in 1 blocks (ref 0) + * x1 contains 1 bytes in 1 blocks (ref 0) + * @endcode + */ +void talloc_enable_leak_report_full(void); + +/** + * @brief Set a custom "abort" function that is called on serious error. + * + * The default "abort" function is abort(). + * + * The "abort" function is called when: + * + *
    + *
  • talloc_get_type_abort() fails
  • + *
  • the provided pointer is not a valid talloc context
  • + *
  • when the context meta data are invalid
  • + *
  • when access after free is detected
  • + *
+ * + * Example: + * + * @code + * void my_abort(const char *reason) + * { + * fprintf(stderr, "talloc abort: %s\n", reason); + * abort(); + * } + * + * talloc_set_abort_fn(my_abort); + * @endcode + * + * @param[in] abort_fn The new "abort" function. + * + * @see talloc_set_log_fn() + * @see talloc_get_type() + */ +void talloc_set_abort_fn(void (*abort_fn)(const char *reason)); + +/** + * @brief Set a logging function. + * + * @param[in] log_fn The logging function. + * + * @see talloc_set_log_stderr() + * @see talloc_set_abort_fn() + */ +void talloc_set_log_fn(void (*log_fn)(const char *message)); + +/** + * @brief Set stderr as the output for logs. + * + * @see talloc_set_log_fn() + * @see talloc_set_abort_fn() + */ +void talloc_set_log_stderr(void); + +/** + * @brief Set a max memory limit for the current context hierarchy + * This affects all children of this context and constrain any + * allocation in the hierarchy to never exceed the limit set. + * The limit can be removed by setting 0 (unlimited) as the + * max_size by calling the function again on the same context. + * Memory limits can also be nested, meaning a child can have + * a stricter memory limit than a parent. + * Memory limits are enforced only at memory allocation time. + * Stealing a context into a 'limited' hierarchy properly + * updates memory usage but does *not* cause failure if the + * move causes the new parent to exceed its limits. However + * any further allocation on that hierarchy will then fail. + * + * @param[in] ctx The talloc context to set the limit on + * @param[in] max_size The (new) max_size + */ +int talloc_set_memlimit(const void *ctx, size_t max_size); + +/* @} ******************************************************************/ + +#if TALLOC_DEPRECATED +#define talloc_zero_p(ctx, type) talloc_zero(ctx, type) +#define talloc_p(ctx, type) talloc(ctx, type) +#define talloc_array_p(ctx, type, count) talloc_array(ctx, type, count) +#define talloc_realloc_p(ctx, p, type, count) talloc_realloc(ctx, p, type, count) +#define talloc_destroy(ctx) talloc_free(ctx) +#define talloc_append_string(c, s, a) (s?talloc_strdup_append(s,a):talloc_strdup(c, a)) +#endif + +#ifndef TALLOC_MAX_DEPTH +#define TALLOC_MAX_DEPTH 10000 +#endif + +#ifdef __cplusplus +} /* end of extern "C" */ +#endif + +#endif -- To view, visit https://gerrit.osmocom.org/13993 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ibd31b40d5b75b3fc1783a6b02b0e97da430e0f60 Gerrit-Change-Number: 13993 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 18:24:44 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 18:24:44 +0000 Subject: Change in osmo-ccid-firmware[master]: talloc: \n -> \r\n for serial output In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13994 ) Change subject: talloc: \n -> \r\n for serial output ...................................................................... talloc: \n -> \r\n for serial output Change-Id: Ieeb6a93c2dc9578220c73771136e2df7476f5e45 --- M sysmoOCTSIM/talloc.c 1 file changed, 17 insertions(+), 17 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/sysmoOCTSIM/talloc.c b/sysmoOCTSIM/talloc.c index 54be634..c5c9062 100644 --- a/sysmoOCTSIM/talloc.c +++ b/sysmoOCTSIM/talloc.c @@ -494,7 +494,7 @@ static void talloc_abort(const char *reason) { - talloc_log("%s\n", reason); + talloc_log("%s\r\n", reason); if (!talloc_abort_fn) { TALLOC_ABORT(reason); @@ -521,7 +521,7 @@ if (unlikely((tc->flags & (TALLOC_FLAG_FREE | ~TALLOC_FLAG_MASK)) != talloc_magic)) { if ((tc->flags & (TALLOC_FLAG_FREE | ~TALLOC_FLAG_MASK)) == (TALLOC_MAGIC_NON_RANDOM | TALLOC_FLAG_FREE)) { - talloc_log("talloc: access after free error - first free may be at %s\n", tc->name); + talloc_log("talloc: access after free error - first free may be at %s\r\n", tc->name); talloc_abort_access_after_free(); return NULL; } @@ -1331,11 +1331,11 @@ if (unlikely(tc->refs != NULL) && talloc_parent(ptr) != new_ctx) { struct talloc_reference_handle *h; - talloc_log("WARNING: talloc_steal with references at %s\n", + talloc_log("WARNING: talloc_steal with references at %s\r\n", location); for (h=tc->refs; h; h=h->next) { - talloc_log("\treference at %s\n", + talloc_log("\treference at %s\r\n", h->location); } } @@ -1344,7 +1344,7 @@ /* this test is probably too expensive to have on in the normal build, but it useful for debugging */ if (talloc_is_parent(new_ctx, ptr)) { - talloc_log("WARNING: stealing into talloc child at %s\n", location); + talloc_log("WARNING: stealing into talloc child at %s\r\n", location); } #endif @@ -1756,11 +1756,11 @@ return talloc_unlink(null_context, ptr); } - talloc_log("ERROR: talloc_free with references at %s\n", + talloc_log("ERROR: talloc_free with references at %s\r\n", location); for (h=tc->refs; h; h=h->next) { - talloc_log("\treference at %s\n", + talloc_log("\treference at %s\r\n", h->location); } return -1; @@ -2251,14 +2251,14 @@ FILE *f = (FILE *)_f; if (is_ref) { - fprintf(f, "%*sreference to: %s\n", depth*4, "", name); + fprintf(f, "%*sreference to: %s\r\n", depth*4, "", name); return; } tc = talloc_chunk_from_ptr(ptr); if (tc->limit && tc->limit->parent == tc) { fprintf(f, "%*s%-30s is a memlimit context" - " (max_size = %lu bytes, cur_size = %lu bytes)\n", + " (max_size = %lu bytes, cur_size = %lu bytes)\r\n", depth*4, "", name, (unsigned long)tc->limit->max_size, @@ -2266,14 +2266,14 @@ } if (depth == 0) { - fprintf(f,"%stalloc report on '%s' (total %6lu bytes in %3lu blocks)\n", + fprintf(f,"%stalloc report on '%s' (total %6lu bytes in %3lu blocks)\r", (max_depth < 0 ? "full " :""), name, (unsigned long)talloc_total_size(ptr), (unsigned long)talloc_total_blocks(ptr)); return; } - fprintf(f, "%*s%-30s contains %6lu bytes in %3lu blocks (ref %d) %p\n", + fprintf(f, "%*s%-30s contains %6lu bytes in %3lu blocks (ref %d) %p\r\n", depth*4, "", name, (unsigned long)talloc_total_size(ptr), @@ -2294,7 +2294,7 @@ } } } - fprintf(f, "\n"); + fprintf(f, "\r\n"); #endif } @@ -2837,14 +2837,14 @@ struct talloc_chunk *tc; if (context == NULL) { - fprintf(file, "talloc no parents for NULL\n"); + fprintf(file, "talloc no parents for NULL\r\n"); return; } tc = talloc_chunk_from_ptr(context); - fprintf(file, "talloc parents of '%s'\n", __talloc_get_name(context)); + fprintf(file, "talloc parents of '%s'\r\n", __talloc_get_name(context)); while (tc) { - fprintf(file, "\t'%s'\n", __talloc_get_name(TC_PTR_FROM_CHUNK(tc))); + fprintf(file, "\t'%s'\r\n", __talloc_get_name(TC_PTR_FROM_CHUNK(tc))); while (tc && tc->prev) tc = tc->prev; if (tc) { tc = tc->parent; @@ -2971,7 +2971,7 @@ for (l = limit; l != NULL; l = l->upper) { size_t new_cur_size = l->cur_size + size; if (new_cur_size < l->cur_size) { - talloc_abort("logic error in talloc_memlimit_grow\n"); + talloc_abort("logic error in talloc_memlimit_grow\r\n"); return; } l->cur_size = new_cur_size; @@ -2988,7 +2988,7 @@ for (l = limit; l != NULL; l = l->upper) { if (l->cur_size < size) { - talloc_abort("logic error in talloc_memlimit_shrink\n"); + talloc_abort("logic error in talloc_memlimit_shrink\r\n"); return; } l->cur_size = l->cur_size - size; -- To view, visit https://gerrit.osmocom.org/13994 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ieeb6a93c2dc9578220c73771136e2df7476f5e45 Gerrit-Change-Number: 13994 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 18:24:45 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 18:24:45 +0000 Subject: Change in osmo-ccid-firmware[master]: some basic talloc related vty commands In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13995 ) Change subject: some basic talloc related vty commands ...................................................................... some basic talloc related vty commands Change-Id: Id7c99e0c1d6b7421667425d38b512ad959142132 --- M sysmoOCTSIM/main.c 1 file changed, 27 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 6ab8bc8..6381a80 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -707,6 +707,26 @@ extern void testmode_init(void); +#include "talloc.h" +void *g_tall_ctx; + +DEFUN(_talloc_report, cmd_talloc_report, "talloc-report", "Generate a talloc report") +{ + talloc_report_full(g_tall_ctx, stdout); +} + +DEFUN(talloc_test, cmd_talloc_test, "talloc-test", "Test the talloc allocator") +{ + for (int i = 0; i < 10; i++) + talloc_named_const(g_tall_ctx, 10, "sibling"); +} + +DEFUN(v_talloc_free, cmd_talloc_free, "talloc-free", "Release all memory") +{ + talloc_free(g_tall_ctx); + g_tall_ctx = NULL; +} + int main(void) { atmel_start_init(); @@ -724,9 +744,16 @@ command_register(&cmd_sim_atr); command_register(&cmd_sim_iccid); testmode_init(); + command_register(&cmd_talloc_test); + command_register(&cmd_talloc_report); + command_register(&cmd_talloc_free); printf("\r\n\r\nsysmocom sysmoOCTSIM\r\n"); + talloc_enable_null_tracking(); + g_tall_ctx = talloc_named_const(NULL, 0, "global"); + printf("g_tall_ctx=%p\r\n", g_tall_ctx); + command_print_prompt(); while (true) { // main loop command_try_recv(); -- To view, visit https://gerrit.osmocom.org/13995 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id7c99e0c1d6b7421667425d38b512ad959142132 Gerrit-Change-Number: 13995 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 18:24:45 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 18:24:45 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid_proto.h: Add enum ccid_class_spec_req In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13996 ) Change subject: ccid_proto.h: Add enum ccid_class_spec_req ...................................................................... ccid_proto.h: Add enum ccid_class_spec_req This list the three class specific control requests specified in the CCID spec. Change-Id: I361f1674355384a97e51374f50f4346313191a7d --- M ccid/ccid_proto.h 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/ccid/ccid_proto.h b/ccid/ccid_proto.h index c3c740c..470416c 100644 --- a/ccid/ccid_proto.h +++ b/ccid/ccid_proto.h @@ -66,6 +66,13 @@ uint8_t bSeq; } __attribute__ ((packed)); +/* CCID Class-Specific Control Request (Section 5.3 / Table 5.3-1) */ +enum ccid_class_spec_req { + CLASS_SPEC_CCID_ABORT = 0x01, + CLASS_SPEC_CCID_GET_CLOCK_FREQ = 0x02, + CLASS_SPEC_CCID_GET_DATA_RATES = 0x03 +}; + /*********************************************************************** * Bulk OUT ***********************************************************************/ -- To view, visit https://gerrit.osmocom.org/13996 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I361f1674355384a97e51374f50f4346313191a7d Gerrit-Change-Number: 13996 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 19:10:27 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 19:10:27 +0000 Subject: Change in osmo-ci[master]: Add osmo-e1d to gerrit-verifications.yml Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13999 Change subject: Add osmo-e1d to gerrit-verifications.yml ...................................................................... Add osmo-e1d to gerrit-verifications.yml Change-Id: I78cfd6052aebbe8cfa215928906f18f8afe3c06a --- M jobs/gerrit-verifications.yml 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/99/13999/1 diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index b2cc1dd..fd9fec3 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -251,6 +251,7 @@ - simtrace2 - osmo-asf4-dfu - osmo-ccid-firmware + - osmo-e1d - gapk - pysim: -- To view, visit https://gerrit.osmocom.org/13999 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I78cfd6052aebbe8cfa215928906f18f8afe3c06a Gerrit-Change-Number: 13999 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 19:10:39 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 19:10:39 +0000 Subject: Change in osmo-ci[master]: Add osmo-e1d to gerrit-verifications.yml In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13999 ) Change subject: Add osmo-e1d to gerrit-verifications.yml ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13999 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I78cfd6052aebbe8cfa215928906f18f8afe3c06a Gerrit-Change-Number: 13999 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Sat, 11 May 2019 19:10:39 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 19:10:41 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 11 May 2019 19:10:41 +0000 Subject: Change in osmo-ci[master]: Add osmo-e1d to gerrit-verifications.yml In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13999 ) Change subject: Add osmo-e1d to gerrit-verifications.yml ...................................................................... Add osmo-e1d to gerrit-verifications.yml Change-Id: I78cfd6052aebbe8cfa215928906f18f8afe3c06a --- M jobs/gerrit-verifications.yml 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index b2cc1dd..fd9fec3 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -251,6 +251,7 @@ - simtrace2 - osmo-asf4-dfu - osmo-ccid-firmware + - osmo-e1d - gapk - pysim: -- To view, visit https://gerrit.osmocom.org/13999 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I78cfd6052aebbe8cfa215928906f18f8afe3c06a Gerrit-Change-Number: 13999 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 21:06:43 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 11 May 2019 21:06:43 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_11.c: fix double init of both SMR and SMC FSMs Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14000 Change subject: libmsc/gsm_04_11.c: fix double init of both SMR and SMC FSMs ...................................................................... libmsc/gsm_04_11.c: fix double init of both SMR and SMC FSMs Change-Id: I23700a2c575a96057ef22bc5d8ab6271104d619b --- M src/libmsc/gsm_04_11.c 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/00/14000/1 diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c index 22e55dd..cc9ce18 100644 --- a/src/libmsc/gsm_04_11.c +++ b/src/libmsc/gsm_04_11.c @@ -1012,10 +1012,6 @@ return NULL; } - /* Init both SMC and SMR state machines */ - gsm411_smc_init(&trans->sms.smc_inst, 0, 1, gsm411_mn_recv, gsm411_mm_send); - gsm411_smr_init(&trans->sms.smr_inst, 0, 1, gsm411_rl_recv, gsm411_mn_send); - if (msc_a) { msc_a_get(msc_a, MSC_A_USE_SMS); trans->msc_a = msc_a; -- To view, visit https://gerrit.osmocom.org/14000 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I23700a2c575a96057ef22bc5d8ab6271104d619b Gerrit-Change-Number: 14000 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 21:06:43 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 11 May 2019 21:06:43 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_11.c: cosmetic: restructure gsm411_mm_send() Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14001 Change subject: libmsc/gsm_04_11.c: cosmetic: restructure gsm411_mm_send() ...................................................................... libmsc/gsm_04_11.c: cosmetic: restructure gsm411_mm_send() Change-Id: I22e99f40ab2252a0b716969091e4d24b3b4268a2 --- M src/libmsc/gsm_04_11.c 1 file changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/01/14001/1 diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c index cc9ce18..c5c3036 100644 --- a/src/libmsc/gsm_04_11.c +++ b/src/libmsc/gsm_04_11.c @@ -216,22 +216,20 @@ switch (msg_type) { case GSM411_MMSMS_EST_REQ: rc = gsm411_mmsms_est_req(trans); - msgb_free(msg); /* upper layer does not free msg */ break; case GSM411_MMSMS_DATA_REQ: rc = gsm411_cp_sendmsg(msg, trans, cp_msg_type); - break; + return rc; /* gsm411_cp_sendmsg() takes msg ownership */ case GSM411_MMSMS_REL_REQ: LOG_TRANS(trans, LOGL_DEBUG, "Got MMSMS_REL_REQ, destroying transaction.\n"); - msgb_free(msg); trans_free(trans); break; default: LOG_TRANS(trans, LOGL_NOTICE, "Unhandled MMCCSMS msg 0x%x\n", msg_type); - msgb_free(msg); rc = -EINVAL; } + msgb_free(msg); return rc; } -- To view, visit https://gerrit.osmocom.org/14001 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I22e99f40ab2252a0b716969091e4d24b3b4268a2 Gerrit-Change-Number: 14001 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 21:08:37 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 11 May 2019 21:08:37 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_11.c: fix double init of both SMR and SMC FSMs In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14000 ) Change subject: libmsc/gsm_04_11.c: fix double init of both SMR and SMC FSMs ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14000 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I23700a2c575a96057ef22bc5d8ab6271104d619b Gerrit-Change-Number: 14000 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Jenkins Builder (1000002) Gerrit-Comment-Date: Sat, 11 May 2019 21:08:37 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 21:18:00 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 11 May 2019 21:18:00 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_11.c: fix double init of both SMR and SMC FSMs In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14000 to look at the new patch set (#2). Change subject: libmsc/gsm_04_11.c: fix double init of both SMR and SMC FSMs ...................................................................... libmsc/gsm_04_11.c: fix double init of both SMR and SMC FSMs Change-Id: I23700a2c575a96057ef22bc5d8ab6271104d619b --- M src/libmsc/gsm_04_11.c M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_umts_authen.err 7 files changed, 0 insertions(+), 40 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/00/14000/2 -- To view, visit https://gerrit.osmocom.org/14000 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I23700a2c575a96057ef22bc5d8ab6271104d619b Gerrit-Change-Number: 14000 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From jenkins at lists.osmocom.org Sat May 11 21:23:15 2019 From: jenkins at lists.osmocom.org (jenkins at lists.osmocom.org) Date: Sat, 11 May 2019 21:23:15 +0000 (UTC) Subject: =?UTF-8?Q?Build_failed_in_Jenkins:_mas?= =?UTF-8?Q?ter-osmo-gmr_=C2=BB_a1=3Ddefault,a2=3D?= =?UTF-8?Q?default,a3=3Ddefault,a4=3Ddefault,osmocom-master-debian9_#1857?= Message-ID: <802121627.0.1557609795910.JavaMail.jenkins@jenkins.osmocom.org> See ------------------------------------------ [...truncated 10.16 KB...] checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for pkg-config... /usr/bin/pkg-config checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.20... yes checking for ANSI C header files... (cached) yes checking execinfo.h usability... yes checking execinfo.h presence... yes checking for execinfo.h... yes checking sys/select.h usability... yes checking sys/select.h presence... yes checking for sys/select.h... yes checking sys/socket.h usability... yes checking sys/socket.h presence... yes checking for sys/socket.h... yes checking sys/timerfd.h usability... yes checking sys/timerfd.h presence... yes checking for sys/timerfd.h... yes checking syslog.h usability... yes checking syslog.h presence... yes checking for syslog.h... yes checking ctype.h usability... yes checking ctype.h presence... yes checking for ctype.h... yes checking netinet/tcp.h usability... yes checking netinet/tcp.h presence... yes checking for netinet/tcp.h... yes checking netinet/in.h usability... yes checking netinet/in.h presence... yes checking for netinet/in.h... yes checking for size_t... yes checking for working alloca.h... yes checking for alloca... yes checking for library containing dlopen... -ldl checking for library containing dlsym... -ldl checking for backtrace in -lexecinfo... no checking for library containing clock_gettime... none required checking for doxygen... (cached) false checking whether SYS_getrandom is declared... yes checking if gcc supports -fvisibility=hidden... yes checking for clock_gettime... yes checking for localtime_r... yes checking whether struct tm has tm_gmtoff member... yes checking for TALLOC... yes checking for PCSC... yes checking for LIBGNUTLS... yes checking whether to enable VTY/CTRL tests... no checking whether C compiler accepts -mavx2... yes checking whether C compiler accepts -mssse3... yes checking whether C compiler accepts -msse4.1... yes checking whether gcc has __builtin_cpu_supports built-in... yes CFLAGS="-g -O2 -DBUILDING_LIBOSMOCORE -Wall" CPPFLAGS=" -DBUILDING_LIBOSMOCORE -Wall" checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating libosmocore.pc config.status: creating libosmocodec.pc config.status: creating libosmocoding.pc config.status: creating libosmovty.pc config.status: creating libosmogsm.pc config.status: creating libosmogb.pc config.status: creating libosmoctrl.pc config.status: creating libosmosim.pc config.status: creating include/Makefile config.status: creating src/Makefile config.status: creating src/vty/Makefile config.status: creating src/codec/Makefile config.status: creating src/coding/Makefile config.status: creating src/sim/Makefile config.status: creating src/gsm/Makefile config.status: creating src/gb/Makefile config.status: creating src/ctrl/Makefile config.status: creating src/pseudotalloc/Makefile config.status: creating tests/Makefile config.status: creating tests/atlocal config.status: creating utils/Makefile config.status: creating Doxyfile.core config.status: creating Doxyfile.gsm config.status: creating Doxyfile.vty config.status: creating Doxyfile.codec config.status: creating Doxyfile.coding config.status: creating Doxyfile.gb config.status: creating Doxyfile.ctrl config.status: creating Makefile config.status: creating config.h config.status: executing tests/atconfig commands config.status: executing depfiles commands config.status: executing libtool commands configure: WARNING: unrecognized options: --with-systemdsystemunitdir + [ -n ] + make -j 8 install echo 1.1.0.9-ea82 > .version-t && mv .version-t .version make install-recursive make[1]: Entering directory ' Making install in include make[2]: Entering directory ' GEN osmocom/gsm/gsm0503.h Generating header file... Generate 'xcch' declaration Generate 'rach' declaration Generate 'rach_ext' declaration Generate 'sch' declaration Generate 'cs2' declaration Generate 'cs3' declaration Generate 'cs2_np' declaration Generate 'cs3_np' declaration Generate 'tch_afs_12_2' declaration Generate 'tch_afs_10_2' declaration Generate 'tch_afs_7_95' declaration Generate 'tch_afs_7_4' declaration Generate 'tch_afs_6_7' declaration Generate 'tch_afs_5_9' declaration Generate 'tch_afs_5_15' declaration Generate 'tch_afs_4_75' declaration Generate 'tch_fr' declaration Generate 'tch_hr' declaration Generate 'tch_ahs_7_95' declaration Generate 'tch_ahs_7_4' declaration Generate 'tch_ahs_6_7' declaration Generate 'tch_ahs_5_9' declaration Generate 'tch_ahs_5_15' declaration Generate 'tch_ahs_4_75' declaration Generate 'mcs1_dl_hdr' declaration Generate 'mcs1_ul_hdr' declaration Generate 'mcs1' declaration Generate 'mcs2' declaration Generate 'mcs3' declaration Generate 'mcs4' declaration Generate 'mcs5_dl_hdr' declaration Generate 'mcs5_ul_hdr' declaration Generate 'mcs5' declaration Generate 'mcs6' declaration Generate 'mcs7_dl_hdr' declaration Generate 'mcs7_ul_hdr' declaration Generate 'mcs7' declaration Generate 'mcs8' declaration Generate 'mcs9' declaration Generation complete. make install-am make[3]: Entering directory ' GEN osmocom/core/bit16gen.h GEN osmocom/core/bit32gen.h GEN osmocom/core/bit64gen.h GEN osmocom/core/crc16gen.h GEN osmocom/core/crc64gen.h GEN osmocom/core/crc32gen.h GEN osmocom/core/crc8gen.h GEN osmocom/core/bit16gen.h GEN osmocom/core/bit64gen.h GEN osmocom/core/crc32gen.h GEN osmocom/core/crc64gen.h GEN osmocom/core/bit32gen.h GEN osmocom/core/crc8gen.h GEN osmocom/core/crc16gen.h make[4]: Entering directory ' make[4]: Nothing to be done for 'install-exec-am'. /bin/mkdir -p ' /bin/mkdir -p ' /usr/bin/install -c -m 644 osmocom/core/application.h osmocom/core/backtrace.h osmocom/core/bit16gen.h osmocom/core/bit32gen.h osmocom/core/bit64gen.h osmocom/core/bits.h osmocom/core/bitvec.h osmocom/core/bitcomp.h osmocom/core/byteswap.h osmocom/core/conv.h osmocom/core/counter.h osmocom/core/crc16.h osmocom/core/crc16gen.h osmocom/core/crc32gen.h osmocom/core/crc64gen.h osmocom/core/crc8gen.h osmocom/core/crcgen.h osmocom/core/endian.h osmocom/core/defs.h osmocom/core/fsm.h osmocom/core/gsmtap.h osmocom/core/gsmtap_util.h osmocom/core/isdnhdlc.h osmocom/core/linuxlist.h osmocom/core/linuxrbtree.h osmocom/core/logging.h osmocom/core/loggingrb.h osmocom/core/stats.h osmocom/core/macaddr.h osmocom/core/msgb.h osmocom/core/panic.h osmocom/core/prbs.h osmocom/core/prim.h osmocom/core/process.h osmocom/core/rate_ctr.h osmocom/core/stat_item.h osmocom/core/select.h osmocom/core/sercomm.h osmocom/core/signal.h osmocom/core/socket.h ' /bin/mkdir -p ' /usr/bin/install -c -m 644 osmocom/gsm/a5.h osmocom/gsm/abis_nm.h osmocom/gsm/apn.h osmocom/gsm/bts_features.h osmocom/gsm/comp128.h osmocom/gsm/comp128v23.h osmocom/gsm/bitvec_gsm.h osmocom/gsm/gan.h osmocom/gsm/gsm0341.h osmocom/gsm/gsm0411_smc.h osmocom/gsm/gsm0411_smr.h osmocom/gsm/gsm0411_utils.h osmocom/gsm/gsm0480.h osmocom/gsm/gsm0502.h osmocom/gsm/gsm0503.h osmocom/gsm/gsm0808.h osmocom/gsm/gsm29205.h osmocom/gsm/gsm0808_utils.h osmocom/gsm/gsm23003.h osmocom/gsm/gsm29118.h osmocom/gsm/gsm48.h osmocom/gsm/gsm48_arfcn_range_encode.h osmocom/gsm/gsm48_ie.h osmocom/gsm/gsm48_rest_octets.h osmocom/gsm/gsm_utils.h osmocom/gsm/gsup.h osmocom/gsm/gsup_sms.h osmocom/gsm/ipa.h osmocom/gsm/lapd_core.h osmocom/gsm/lapdm.h osmocom/gsm/meas_rep.h osmocom/gsm/mncc.h osmocom/gsm/prim.h osmocom/gsm/l1sap.h osmocom/gsm/oap.h osmocom/gsm/oap_client.h osmocom/gsm/rsl.h osmocom/gsm/rxlev_stat.h osmocom/gsm/sysinfo.h osmocom/gsm/tlv.h ' /bin/mkdir -p ' /usr/bin/install -c -m 644 osmocom/coding/gsm0503_tables.h osmocom/coding/gsm0503_parity.h osmocom/coding/gsm0503_mapping.h osmocom/coding/gsm0503_interleaving.h osmocom/coding/gsm0503_coding.h ' /bin/mkdir -p ' /usr/bin/install -c -m 644 osmocom/core/statistics.h osmocom/core/strrb.h osmocom/core/talloc.h osmocom/core/tdef.h osmocom/core/timer.h osmocom/core/timer_compat.h osmocom/core/utils.h osmocom/core/write_queue.h osmocom/core/sockaddr_str.h osmocom/core/use_count.h osmocom/core/plugin.h osmocom/core/msgfile.h osmocom/core/serial.h ' /bin/mkdir -p ' /usr/bin/install -c -m 644 osmocom/vty/buffer.h osmocom/vty/command.h osmocom/vty/logging.h osmocom/vty/stats.h osmocom/vty/misc.h osmocom/vty/telnet_interface.h osmocom/vty/vector.h osmocom/vty/vty.h osmocom/vty/ports.h osmocom/vty/tdef_vty.h ' /bin/mkdir -p ' /usr/bin/install -c -m 644 osmocom/gsm/protocol/gsm_03_40.h osmocom/gsm/protocol/gsm_03_41.h osmocom/gsm/protocol/gsm_04_08.h osmocom/gsm/protocol/gsm_04_08_gprs.h osmocom/gsm/protocol/gsm_04_11.h osmocom/gsm/protocol/gsm_04_12.h osmocom/gsm/protocol/gsm_04_14.h osmocom/gsm/protocol/gsm_04_80.h osmocom/gsm/protocol/gsm_08_08.h osmocom/gsm/protocol/gsm_08_58.h osmocom/gsm/protocol/gsm_09_02.h osmocom/gsm/protocol/gsm_12_21.h osmocom/gsm/protocol/gsm_23_003.h osmocom/gsm/protocol/gsm_29_118.h osmocom/gsm/protocol/gsm_44_318.h osmocom/gsm/protocol/ipaccess.h osmocom/gsm/protocol/smpp34_osmocom.h ' /bin/mkdir -p ' /usr/bin/install -c -m 644 osmocom/sim/class_tables.h osmocom/sim/sim.h ' /bin/mkdir -p ' /usr/bin/install -c -m 644 osmocom/gprs/gprs_bssgp.h osmocom/gprs/gprs_bssgp_bss.h osmocom/gprs/gprs_msgb.h osmocom/gprs/gprs_ns.h osmocom/gprs/gprs_ns_frgre.h osmocom/gprs/gprs_rlc.h ' /bin/mkdir -p ' /usr/bin/install -c -m 644 osmocom/crypt/auth.h osmocom/crypt/gprs_cipher.h ' /bin/mkdir -p ' /usr/bin/install -c -m 644 osmocom/ctrl/control_cmd.h osmocom/ctrl/control_if.h osmocom/ctrl/ports.h osmocom/ctrl/control_vty.h ' /bin/mkdir -p ' /usr/bin/install -c -m 644 osmocom/gprs/protocol/gsm_04_60.h osmocom/gprs/protocol/gsm_08_16.h osmocom/gprs/protocol/gsm_08_18.h ' /bin/mkdir -p ' /usr/bin/install -c -m 644 osmocom/codec/ecu.h osmocom/codec/codec.h osmocom/codec/gsm610_bits.h ' make[4]: Leaving directory ' make[3]: Leaving directory ' make[2]: Leaving directory ' Making install in src make[2]: Entering directory ' GEN crc16gen.c GEN crc32gen.c GEN crc64gen.c GEN crc8gen.c make install-am make[3]: Entering directory ' CC timer.lo CC timer_gettimeofday.lo CC timer_clockgettime.lo CC select.lo CC bits.lo CC signal.lo CC msgb.lo CC bitvec.lo CC bitcomp.lo CC counter.lo CC fsm.lo CC write_queue.lo CC utils.lo CC socket.lo CC logging.lo CC logging_syslog.lo CC logging_gsmtap.lo CC rate_ctr.lo CC gsmtap_util.lo CC crc16.lo /bin/bash: line 2: 7386 Segmentation fault /bin/bash ../libtool --silent --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -DBUILDING_LIBOSMOCORE -Wall -Wall -g -O2 -DBUILDING_LIBOSMOCORE -Wall -MT gsmtap_util.lo -MD -MP -MF $depbase.Tpo -c -o gsmtap_util.lo gsmtap_util.c Makefile:565: recipe for target 'gsmtap_util.lo' failed make[3]: *** [gsmtap_util.lo] Error 139 make[3]: *** Waiting for unfinished jobs.... make[3]: Leaving directory ' Makefile:669: recipe for target 'install' failed make[2]: *** [install] Error 2 make[2]: Leaving directory ' Makefile:625: recipe for target 'install-recursive' failed make[1]: *** [install-recursive] Error 1 make[1]: Leaving directory ' Makefile:924: recipe for target 'install' failed make: *** [install] Error 2 Build step 'Execute shell' marked build as failure [WARNINGS]Skipping publisher since build result is FAILURE From gerrit-no-reply at lists.osmocom.org Sat May 11 21:51:35 2019 From: gerrit-no-reply at lists.osmocom.org (tnt) Date: Sat, 11 May 2019 21:51:35 +0000 Subject: Change in osmo-msc[master]: make LOG_TRANS() NULL-safe again In-Reply-To: References: Message-ID: tnt has posted comments on this change. ( https://gerrit.osmocom.org/13992 ) Change subject: make LOG_TRANS() NULL-safe again ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13992 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6e36c47bf828dd073b36c6301bbeabcc28e101e6 Gerrit-Change-Number: 13992 Gerrit-PatchSet: 2 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-Comment-Date: Sat, 11 May 2019 21:51:35 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 23:03:24 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 11 May 2019 23:03:24 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_11.c: properly handle MMTS indication In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/12059 ) Change subject: libmsc/gsm_04_11.c: properly handle MMTS indication ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/12059 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic46b04913b2e8cc5d11a39426dcc1bfe11f1d31e Gerrit-Change-Number: 12059 Gerrit-PatchSet: 9 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sat, 11 May 2019 23:03:24 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 23:13:49 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 11 May 2019 23:13:49 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_11.c: fix double init of both SMR and SMC FSMs In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14000 ) Change subject: libmsc/gsm_04_11.c: fix double init of both SMR and SMC FSMs ...................................................................... Patch Set 2: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/14000/2/src/libmsc/gsm_04_11.c File src/libmsc/gsm_04_11.c: https://gerrit.osmocom.org/#/c/14000/2/src/libmsc/gsm_04_11.c at 1028 PS2, Line 1028: /* Init both SMC and SMR state machines */ It's already being done here. -- To view, visit https://gerrit.osmocom.org/14000 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I23700a2c575a96057ef22bc5d8ab6271104d619b Gerrit-Change-Number: 14000 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sat, 11 May 2019 23:13:49 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 23:24:27 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 11 May 2019 23:24:27 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_11.c: properly handle MMTS indication In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/12059 to look at the new patch set (#10). Change subject: libmsc/gsm_04_11.c: properly handle MMTS indication ...................................................................... libmsc/gsm_04_11.c: properly handle MMTS indication According to 3GPP TS 29.002, section 7.6.8.7, MMS (More Messages to Send) is an optional IE of MT-ForwardSM-Req message which is used by SMSC to indicate that there are more (multi-part) MT SMS messages to be sent. The MSC needs to use this indication in order to decide whether to keep the RAN connection with a given subscriber open. Related Change-Id: (TTCN) I6308586a70c4fb3254c519330a61a9667372149f Change-Id: Ic46b04913b2e8cc5d11a39426dcc1bfe11f1d31e Related: OS#3587 --- M include/osmocom/msc/gsm_04_11.h M include/osmocom/msc/msc_a.h M include/osmocom/msc/transaction.h M src/libmsc/gsm_04_11.c M src/libmsc/gsm_04_11_gsup.c 5 files changed, 47 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/59/12059/10 -- To view, visit https://gerrit.osmocom.org/12059 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic46b04913b2e8cc5d11a39426dcc1bfe11f1d31e Gerrit-Change-Number: 12059 Gerrit-PatchSet: 10 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 11 23:24:28 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 11 May 2019 23:24:28 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_11_gsup.c: cosmetic: drop useless variable Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14002 Change subject: libmsc/gsm_04_11_gsup.c: cosmetic: drop useless variable ...................................................................... libmsc/gsm_04_11_gsup.c: cosmetic: drop useless variable Change-Id: I102e1bd0f8365e77bbc9203158909aad8dcf214b --- M src/libmsc/gsm_04_11_gsup.c 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/02/14002/1 diff --git a/src/libmsc/gsm_04_11_gsup.c b/src/libmsc/gsm_04_11_gsup.c index 19114cc..a1ec634 100644 --- a/src/libmsc/gsm_04_11_gsup.c +++ b/src/libmsc/gsm_04_11_gsup.c @@ -233,14 +233,12 @@ static int gsm411_gsup_mt_handler(struct vlr_subscr *vsub, const struct osmo_gsup_message *gsup_msg) { - struct vlr_instance *vlr; struct gsm_network *net; bool sm_rp_mmts_ind; int rc; /* Obtain required pointers */ - vlr = vsub->vlr; - net = (struct gsm_network *) vlr->user_ctx; + net = (struct gsm_network *) vsub->vlr->user_ctx; /* Associate logging messages with this subscriber */ log_set_context(LOG_CTX_VLR_SUBSCR, vsub); -- To view, visit https://gerrit.osmocom.org/14002 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I102e1bd0f8365e77bbc9203158909aad8dcf214b Gerrit-Change-Number: 14002 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From jenkins at lists.osmocom.org Sat May 11 23:59:52 2019 From: jenkins at lists.osmocom.org (jenkins at lists.osmocom.org) Date: Sat, 11 May 2019 23:59:52 +0000 (UTC) Subject: =?UTF-8?Q?Jenkins_build_is_back_to_normal?= =?UTF-8?Q?_:_master-osmo-gmr_=C2=BB_a1=3Ddefault?= =?UTF-8?Q?,a2=3Ddefault,a3=3Ddefault,a4=3Ddefau?= =?UTF-8?Q?lt,osmocom-master-debian9_#1858?= In-Reply-To: <802121627.0.1557609795910.JavaMail.jenkins@jenkins.osmocom.org> References: <802121627.0.1557609795910.JavaMail.jenkins@jenkins.osmocom.org> Message-ID: <102285108.3.1557619192606.JavaMail.jenkins@jenkins.osmocom.org> See From admin at opensuse.org Sun May 12 01:11:53 2019 From: admin at opensuse.org (OBS Notification) Date: Sun, 12 May 2019 01:11:53 +0000 Subject: Build failure of network:osmocom:latest/osmo-sysmon in xUbuntu_18.10/x86_64 In-Reply-To: References: Message-ID: <5cd772e0ee46a_3a5cdc5f827031f8@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sysmon/xUbuntu_18.10/x86_64 Package network:osmocom:latest/osmo-sysmon failed to build in xUbuntu_18.10/x86_64 Check out the package for editing: osc checkout network:osmocom:latest osmo-sysmon Last lines of build log: [ 56s] #define PACKAGE "osmo-sysmon" [ 56s] #define VERSION "0.1.0" [ 56s] #define STDC_HEADERS 1 [ 56s] #define HAVE_SYS_TYPES_H 1 [ 56s] #define HAVE_SYS_STAT_H 1 [ 56s] #define HAVE_STDLIB_H 1 [ 56s] #define HAVE_STRING_H 1 [ 56s] #define HAVE_MEMORY_H 1 [ 56s] #define HAVE_STRINGS_H 1 [ 56s] #define HAVE_INTTYPES_H 1 [ 56s] #define HAVE_STDINT_H 1 [ 56s] #define HAVE_UNISTD_H 1 [ 56s] #define HAVE_DLFCN_H 1 [ 56s] #define LT_OBJDIR ".libs/" [ 56s] [ 56s] configure: exit 1 [ 56s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/x86_64-linux-gnu --libexecdir=\${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 56s] make: *** [debian/rules:45: build] Error 2 [ 56s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 56s] [ 56s] build82 failed "build osmo-sysmon_0.1.0.dsc" at Sun May 12 01:11:48 UTC 2019. [ 56s] [ 56s] ### VM INTERACTION START ### [ 59s] [ 51.341012] sysrq: SysRq : Power Off [ 59s] [ 51.342562] reboot: Power down [ 59s] ### VM INTERACTION END ### [ 59s] [ 59s] build82 failed "build osmo-sysmon_0.1.0.dsc" at Sun May 12 01:11:52 UTC 2019. [ 59s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun May 12 01:12:28 2019 From: admin at opensuse.org (OBS Notification) Date: Sun, 12 May 2019 01:12:28 +0000 Subject: Build failure of network:osmocom:latest/osmo-sysmon in Debian_9.0/i586 In-Reply-To: References: Message-ID: <5cd77300484_3a5cdc5f827032f@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sysmon/Debian_9.0/i586 Package network:osmocom:latest/osmo-sysmon failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:latest osmo-sysmon Last lines of build log: [ 73s] #define HAVE_SYS_TYPES_H 1 [ 73s] #define HAVE_SYS_STAT_H 1 [ 73s] #define HAVE_STDLIB_H 1 [ 73s] #define HAVE_STRING_H 1 [ 73s] #define HAVE_MEMORY_H 1 [ 73s] #define HAVE_STRINGS_H 1 [ 73s] #define HAVE_INTTYPES_H 1 [ 73s] #define HAVE_STDINT_H 1 [ 73s] #define HAVE_UNISTD_H 1 [ 73s] #define HAVE_DLFCN_H 1 [ 60.528311] serial8250: too much work for irq4 [ 73s] [ 73s] #define LT_OBJDIR ".libs/" [ 73s] [ 73s] configure: exit 1 [ 73s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 73s] debian/rules:45: recipe for target 'build' failed [ 73s] make: *** [build] Error 2 [ 73s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 73s] [ 73s] lamb22 failed "build osmo-sysmon_0.1.0.dsc" at Sun May 12 01:12:24 UTC 2019. [ 73s] [ 73s] ### VM INTERACTION START ### [ 76s] [ 63.844383] sysrq: SysRq : Power Off [ 76s] [ 63.851401] reboot: Power down [ 76s] ### VM INTERACTION END ### [ 76s] [ 76s] lamb22 failed "build osmo-sysmon_0.1.0.dsc" at Sun May 12 01:12:27 UTC 2019. [ 76s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun May 12 01:12:28 2019 From: admin at opensuse.org (OBS Notification) Date: Sun, 12 May 2019 01:12:28 +0000 Subject: Build failure of network:osmocom:latest/osmo-sysmon in xUbuntu_18.04/x86_64 In-Reply-To: References: Message-ID: <5cd773004cbab_3a5cdc5f8270336e@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sysmon/xUbuntu_18.04/x86_64 Package network:osmocom:latest/osmo-sysmon failed to build in xUbuntu_18.04/x86_64 Check out the package for editing: osc checkout network:osmocom:latest osmo-sysmon Last lines of build log: [ 70s] #define VERSION "0.1.0" [ 70s] #define STDC_HEADERS 1 [ 70s] #define HAVE_SYS_TYPES_H 1 [ 70s] #define HAVE_SYS_STAT_H 1 [ 70s] #define HAVE_STDLIB_H 1 [ 70s] #define HAVE_STRING_H 1 [ 70s] #define HAVE_MEMORY_H 1 [ 70s] #define HAVE_STRINGS_H 1 [ 70s] #define HAVE_INTTYPES_H 1 [ 70s] #define HAVE_STDINT_H 1 [ 70s] #define HAVE_UNISTD_H 1 [ 70s] #define HAVE_DLFCN_H 1 [ 70s] #define LT_OBJDIR ".libs/" [ 70s] [ 70s] configure: exit 1 [ 70s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/x86_64-linux-gnu --libexecdir=\${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 70s] debian/rules:45: recipe for target 'build' failed [ 70s] make: *** [build] Error 2 [ 70s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 70s] [ 70s] sheep81 failed "build osmo-sysmon_0.1.0.dsc" at Sun May 12 01:12:06 UTC 2019. [ 70s] [ 70s] ### VM INTERACTION START ### [ 73s] [ 65.270115] sysrq: SysRq : Power Off [ 73s] [ 65.275575] reboot: Power down [ 73s] ### VM INTERACTION END ### [ 73s] [ 73s] sheep81 failed "build osmo-sysmon_0.1.0.dsc" at Sun May 12 01:12:11 UTC 2019. [ 73s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun May 12 01:12:45 2019 From: admin at opensuse.org (OBS Notification) Date: Sun, 12 May 2019 01:12:45 +0000 Subject: Build failure of network:osmocom:latest/osmo-sysmon in xUbuntu_17.10/x86_64 In-Reply-To: References: Message-ID: <5cd77319edb5c_3a5cdc5f827034ad@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sysmon/xUbuntu_17.10/x86_64 Package network:osmocom:latest/osmo-sysmon failed to build in xUbuntu_17.10/x86_64 Check out the package for editing: osc checkout network:osmocom:latest osmo-sysmon Last lines of build log: [ 74s] #define VERSION "0.1.0" [ 74s] #define STDC_HEADERS 1 [ 74s] #define HAVE_SYS_TYPES_H 1 [ 74s] #define HAVE_SYS_STAT_H 1 [ 74s] #define HAVE_STDLIB_H 1 [ 74s] #define HAVE_STRING_H 1 [ 74s] #define HAVE_MEMORY_H 1 [ 74s] #define HAVE_STRINGS_H 1 [ 74s] #define HAVE_INTTYPES_H 1 [ 74s] #define HAVE_STDINT_H 1 [ 74s] #define HAVE_UNISTD_H 1 [ 74s] #define HAVE_DLFCN_H 1 [ 74s] #define LT_OBJDIR ".libs/" [ 74s] [ 74s] configure: exit 1 [ 74s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/x86_64-linux-gnu --libexecdir=\${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 74s] debian/rules:45: recipe for target 'build' failed [ 74s] make: *** [build] Error 2 [ 74s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 74s] [ 74s] lamb01 failed "build osmo-sysmon_0.1.0.dsc" at Sun May 12 01:12:24 UTC 2019. [ 74s] [ 74s] ### VM INTERACTION START ### [ 77s] [ 66.269118] sysrq: SysRq : Power Off [ 77s] [ 66.276742] reboot: Power down [ 77s] ### VM INTERACTION END ### [ 77s] [ 77s] lamb01 failed "build osmo-sysmon_0.1.0.dsc" at Sun May 12 01:12:28 UTC 2019. [ 77s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun May 12 01:13:19 2019 From: admin at opensuse.org (OBS Notification) Date: Sun, 12 May 2019 01:13:19 +0000 Subject: Build failure of network:osmocom:latest/osmo-sysmon in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5cd7733934b80_3a5cdc5f82703552@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sysmon/Debian_9.0/armv7l Package network:osmocom:latest/osmo-sysmon failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:latest osmo-sysmon Last lines of build log: [ 115s] #define VERSION "0.1.0" [ 115s] #define STDC_HEADERS 1 [ 115s] #define HAVE_SYS_TYPES_H 1 [ 115s] #define HAVE_SYS_STAT_H 1 [ 115s] #define HAVE_STDLIB_H 1 [ 115s] #define HAVE_STRING_H 1 [ 115s] #define HAVE_MEMORY_H 1 [ 115s] #define HAVE_STRINGS_H 1 [ 115s] #define HAVE_INTTYPES_H 1 [ 115s] #define HAVE_STDINT_H 1 [ 115s] #define HAVE_UNISTD_H 1 [ 115s] #define HAVE_DLFCN_H 1 [ 115s] #define LT_OBJDIR ".libs/" [ 115s] [ 115s] configure: exit 1 [ 115s] dh_auto_configure: ./configure --build=arm-linux-gnueabihf --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/arm-linux-gnueabihf --libexecdir=${prefix}/lib/arm-linux-gnueabihf --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 115s] debian/rules:45: recipe for target 'build' failed [ 115s] make: *** [build] Error 2 [ 115s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 115s] [ 115s] armbuild02 failed "build osmo-sysmon_0.1.0.dsc" at Sun May 12 01:13:04 UTC 2019. [ 115s] [ 115s] ### VM INTERACTION START ### [ 118s] [ 94.985827] sysrq: SysRq : Power Off [ 118s] [ 94.987062] reboot: Power down [ 118s] ### VM INTERACTION END ### [ 118s] [ 118s] armbuild02 failed "build osmo-sysmon_0.1.0.dsc" at Sun May 12 01:13:07 UTC 2019. [ 118s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun May 12 01:13:19 2019 From: admin at opensuse.org (OBS Notification) Date: Sun, 12 May 2019 01:13:19 +0000 Subject: Build failure of network:osmocom:latest/osmo-sysmon in Debian_9.0/x86_64 In-Reply-To: References: Message-ID: <5cd773397f4b2_3a5cdc5f8270367c@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sysmon/Debian_9.0/x86_64 Package network:osmocom:latest/osmo-sysmon failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:latest osmo-sysmon Last lines of build log: [ 102s] N "0.1.0" [ 102s] #define STDC_HEADERS 1 [ 102s] #define HAVE_SYS_TYPES_H 1 [ 102s] #define HAVE_SYS_STAT_H 1 [ 102s] #define HAVE_STDLIB_H 1 [ 102s] #define HAVE_STRING_H 1 [ 102s] #define HAVE_MEMORY_H 1 [ 102s] #define HAVE_STRINGS_H 1 [ 102s] #define HAVE_INTTYPES_H 1 [ 102s] #define HAVE_STDINT_H 1 [ 102s] #define HAVE_UNISTD_H 1 [ 102s] #define HAVE_DLFCN_H 1 [ 102s] #define LT_OBJDIR ".libs/" [ 102s] [ 102s] configure: exit 1 [ 102s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 102s] debian/rules:45: recipe for target 'build' failed [ 102s] make: *** [build] Error 2 [ 102s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 102s] [ 102s] cloud120 failed "build osmo-sysmon_0.1.0.dsc" at Sun May 12 01:13:06 UTC 2019. [ 102s] [ 102s] ### VM INTERACTION START ### [ 106s] [ 80.195022] sysrq: SysRq : Power Off [ 106s] [ 80.206002] reboot: Power down [ 107s] ### VM INTERACTION END ### [ 107s] [ 107s] cloud120 failed "build osmo-sysmon_0.1.0.dsc" at Sun May 12 01:13:11 UTC 2019. [ 107s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun May 12 01:14:10 2019 From: admin at opensuse.org (OBS Notification) Date: Sun, 12 May 2019 01:14:10 +0000 Subject: Build failure of network:osmocom:latest/osmo-sysmon in Debian_9.0/aarch64 In-Reply-To: References: Message-ID: <5cd773774422a_3a5cdc5f8270377f@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sysmon/Debian_9.0/aarch64 Package network:osmocom:latest/osmo-sysmon failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:latest osmo-sysmon Last lines of build log: [ 180s] configure:12557: $? = 0 [ 180s] configure:12615: result: yes [ 180s] configure:12621: checking for LIBOSMONETIF [ 180s] configure:12628: $PKG_CONFIG --exists --print-errors "libosmo-netif >= 0.4.0" [ 180s] configure:12631: $? = 0 [ 180s] configure:12645: $PKG_CONFIG --exists --print-errors "libosmo-netif >= 0.4.0" [ 180s] configure:12648: $? = 0 [ 180s] configure:12706: result: yes [ 180s] configure:12712: checking for LIBMNL [ 180s] configure:12719: $PKG_CONFIG --exists --print-errors "libmnl" [ 180s] Package libmnl was not found in the pkg-config search path. [ 180s] Perhaps you should add the directory containing `libmnl.pc' [ 180s] to the PKG_CONFIG_PATH environment variable [ 180s] No package 'libmnl' found [ 180s] configure:12722: $? = 1 [ 180s] configure:12736: $PKG_CONFIG --exists --print-errors "libmnl" [ 180s] Package libmnl was not found in the pkg-config search path. [ 180s] Perhaps you should add the directory containing `libmnl.pc' [ 180s] to the PKG_CONFIG_PATH environment variable [ 180s] No package 'libmnl' found [ 180s] configure:12739: $? = 1 [ 180s] configure:12753: result: no [ 180s] No package 'libmnl' found [ 182s] configure:12769: error: Packa[ 151.792209] sysrq: SysRq : Power Off [ 182s] [ 151.815055] reboot: Power down [ 182s] ### VM INTERACTION END ### [ 182s] [ 182s] obs-arm-1 failed "build osmo-sysmon_0.1.0.dsc" at Sun May 12 01:13:55 UTC 2019. [ 182s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun May 12 01:17:52 2019 From: admin at opensuse.org (OBS Notification) Date: Sun, 12 May 2019 01:17:52 +0000 Subject: Build failure of network:osmocom:latest/osmo-sysmon in Raspbian_9.0/armv7l In-Reply-To: References: Message-ID: <5cd7744a5f6dd_3a5cdc5f827039b1@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sysmon/Raspbian_9.0/armv7l Package network:osmocom:latest/osmo-sysmon failed to build in Raspbian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:latest osmo-sysmon Last lines of build log: [ 408s] #define VERSION "0.1.0" [ 408s] #define STDC_HEADERS 1 [ 408s] #define HAVE_SYS_TYPES_H 1 [ 408s] #define HAVE_SYS_STAT_H 1 [ 408s] #define HAVE_STDLIB_H 1 [ 408s] #define HAVE_STRING_H 1 [ 408s] #define HAVE_MEMORY_H 1 [ 408s] #define HAVE_STRINGS_H 1 [ 408s] #define HAVE_INTTYPES_H 1 [ 408s] #define HAVE_STDINT_H 1 [ 408s] #define HAVE_UNISTD_H 1 [ 408s] #define HAVE_DLFCN_H 1 [ 408s] #define LT_OBJDIR ".libs/" [ 408s] [ 408s] configure: exit 1 [ 408s] dh_auto_configure: ./configure --build=arm-linux-gnueabihf --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/arm-linux-gnueabihf --libexecdir=${prefix}/lib/arm-linux-gnueabihf --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 408s] debian/rules:45: recipe for target 'build' failed [ 408s] make: *** [build] Error 2 [ 408s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 408s] [ 408s] obs-arm-6 failed "build osmo-sysmon_0.1.0.dsc" at Sun May 12 01:17:41 UTC 2019. [ 408s] [ 408s] ### VM INTERACTION START ### [ 411s] [ 348.258742] sysrq: SysRq : Power Off [ 411s] [ 348.274746] reboot: Power down [ 411s] ### VM INTERACTION END ### [ 411s] [ 411s] obs-arm-6 failed "build osmo-sysmon_0.1.0.dsc" at Sun May 12 01:17:44 UTC 2019. [ 411s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun May 12 02:42:44 2019 From: admin at opensuse.org (OBS Notification) Date: Sun, 12 May 2019 02:42:44 +0000 Subject: Build failure of network:osmocom:nightly/libosmo-netif in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5cd788352b6b7_3a5cdc5f827074b2@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmo-netif/Debian_8.0/i586 Package network:osmocom:nightly/libosmo-netif failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly libosmo-netif Last lines of build log: [ 157s] | #define HAVE_DLFCN_H 1 [ 157s] | #define LT_OBJDIR ".libs/" [ 157s] | #define STDC_HEADERS 1 [ 157s] | #define HAVE_EXECINFO_H 1 [ 157s] | #define HAVE_SYS_SELECT_H 1 [ 157s] | #define HAVE_SYS_SOCKET_H 1 [ 157s] | #define HAVE_SYSLOG_H 1 [ 157s] | #define HAVE_CTYPE_H 1 [ 157s] | #define HAVE_LIBSCTP 1 [ 157s] | #define HAVE_PCAP_H 1 [ 157s] | [ 157s] | configure: exit 0 [ 157s] [ 157s] debian/rules:27: recipe for target 'override_dh_auto_test' failed [ 157s] make[1]: *** [override_dh_auto_test] Error 1 [ 157s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 157s] debian/rules:13: recipe for target 'build' failed [ 157s] make: *** [build] Error 2 [ 157s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 157s] [ 157s] cloud112 failed "build libosmo-netif_0.5.0.dsc" at Sun May 12 02:42:35 UTC 2019. [ 157s] [ 157s] ### VM INTERACTION START ### [ 157s] Powering off. [ 157s] [ 131.943205] reboot: Power down [ 158s] ### VM INTERACTION END ### [ 158s] [ 158s] cloud112 failed "build libosmo-netif_0.5.0.dsc" at Sun May 12 02:42:38 UTC 2019. [ 158s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Sun May 12 10:06:50 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:06:50 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_11.c: fix double init of both SMR and SMC FSMs In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14000 ) Change subject: libmsc/gsm_04_11.c: fix double init of both SMR and SMC FSMs ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14000 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I23700a2c575a96057ef22bc5d8ab6271104d619b Gerrit-Change-Number: 14000 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 12 May 2019 10:06:50 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:07:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:07:33 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_11.c: cosmetic: restructure gsm411_mm_send() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14001 ) Change subject: libmsc/gsm_04_11.c: cosmetic: restructure gsm411_mm_send() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14001 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I22e99f40ab2252a0b716969091e4d24b3b4268a2 Gerrit-Change-Number: 14001 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 12 May 2019 10:07:33 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:09:06 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:09:06 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_11.c: properly handle MMTS indication In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/12059 ) Change subject: libmsc/gsm_04_11.c: properly handle MMTS indication ...................................................................... Patch Set 10: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/12059 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic46b04913b2e8cc5d11a39426dcc1bfe11f1d31e Gerrit-Change-Number: 12059 Gerrit-PatchSet: 10 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 12 May 2019 10:09:06 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:09:21 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:09:21 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_11_gsup.c: cosmetic: drop useless variable In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14002 ) Change subject: libmsc/gsm_04_11_gsup.c: cosmetic: drop useless variable ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14002 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I102e1bd0f8365e77bbc9203158909aad8dcf214b Gerrit-Change-Number: 14002 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 12 May 2019 10:09:21 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:09:25 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:09:25 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_11.c: fix double init of both SMR and SMC FSMs In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14000 ) Change subject: libmsc/gsm_04_11.c: fix double init of both SMR and SMC FSMs ...................................................................... libmsc/gsm_04_11.c: fix double init of both SMR and SMC FSMs Change-Id: I23700a2c575a96057ef22bc5d8ab6271104d619b --- M src/libmsc/gsm_04_11.c M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_umts_authen.err 7 files changed, 0 insertions(+), 40 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, approved Harald Welte: Looks good to me, approved diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c index 22e55dd..cc9ce18 100644 --- a/src/libmsc/gsm_04_11.c +++ b/src/libmsc/gsm_04_11.c @@ -1012,10 +1012,6 @@ return NULL; } - /* Init both SMC and SMR state machines */ - gsm411_smc_init(&trans->sms.smc_inst, 0, 1, gsm411_mn_recv, gsm411_mm_send); - gsm411_smr_init(&trans->sms.smr_inst, 0, 1, gsm411_rl_recv, gsm411_mn_send); - if (msc_a) { msc_a_get(msc_a, MSC_A_USE_SMS); trans->msc_a = msc_a; diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.err b/tests/msc_vlr/msc_vlr_test_gsm_authen.err index 0567938..2a7b696 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_authen.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.err @@ -320,8 +320,6 @@ DLSMS trans(SMS IMSI-901700000004620:MSISDN-46071 callref-0x40000001 tid-0) New transaction DLSMS SMC(0) instance created for network DLSMS SMR(0) instance created for network. -DLSMS SMC(0) instance created for network -DLSMS SMR(0) instance created for network. DLSMS trans(SMS IMSI-901700000004620:MSISDN-46071 callref-0x40000001 tid-0) Going to send a MT SMS DLSMS SMR(0) message SM-RL-DATA_REQ received in state IDLE DLSMS SMR(0) TX SMS RP-DATA @@ -949,8 +947,6 @@ DLSMS trans(SMS IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 callref-0x40000002 tid-0) New transaction DLSMS SMC(0) instance created for network DLSMS SMR(0) instance created for network. -DLSMS SMC(0) instance created for network -DLSMS SMR(0) instance created for network. DLSMS trans(SMS IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 callref-0x40000002 tid-0) Going to send a MT SMS DLSMS SMR(0) message SM-RL-DATA_REQ received in state IDLE DLSMS SMR(0) TX SMS RP-DATA @@ -2888,8 +2884,6 @@ DLSMS trans(SMS IMSI-901700000010650:MSISDN-42342 callref-0x40000003 tid-0) New transaction DLSMS SMC(0) instance created for network DLSMS SMR(0) instance created for network. -DLSMS SMC(0) instance created for network -DLSMS SMR(0) instance created for network. DLSMS trans(SMS IMSI-901700000010650:MSISDN-42342 callref-0x40000003 tid-0) Going to send a MT SMS DLSMS SMR(0) message SM-RL-DATA_REQ received in state IDLE DLSMS SMR(0) TX SMS RP-DATA diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err index 8694098..4abd840 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err @@ -357,8 +357,6 @@ DLSMS trans(SMS IMSI-901700000004620:MSISDN-46071 callref-0x40000001 tid-0) New transaction DLSMS SMC(0) instance created for network DLSMS SMR(0) instance created for network. -DLSMS SMC(0) instance created for network -DLSMS SMR(0) instance created for network. DLSMS trans(SMS IMSI-901700000004620:MSISDN-46071 callref-0x40000001 tid-0) Going to send a MT SMS DLSMS SMR(0) message SM-RL-DATA_REQ received in state IDLE DLSMS SMR(0) TX SMS RP-DATA @@ -1056,8 +1054,6 @@ DLSMS trans(SMS IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 callref-0x40000002 tid-0) New transaction DLSMS SMC(0) instance created for network DLSMS SMR(0) instance created for network. -DLSMS SMC(0) instance created for network -DLSMS SMR(0) instance created for network. DLSMS trans(SMS IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 callref-0x40000002 tid-0) Going to send a MT SMS DLSMS SMR(0) message SM-RL-DATA_REQ received in state IDLE DLSMS SMR(0) TX SMS RP-DATA @@ -2628,8 +2624,6 @@ DLSMS trans(SMS IMSI-901700000010650:MSISDN-42342 callref-0x40000003 tid-0) New transaction DLSMS SMC(0) instance created for network DLSMS SMR(0) instance created for network. -DLSMS SMC(0) instance created for network -DLSMS SMR(0) instance created for network. DLSMS trans(SMS IMSI-901700000010650:MSISDN-42342 callref-0x40000003 tid-0) Going to send a MT SMS DLSMS SMR(0) message SM-RL-DATA_REQ received in state IDLE DLSMS SMR(0) TX SMS RP-DATA @@ -3253,8 +3247,6 @@ DLSMS trans(SMS IMSI-901700000004620:MSISDN-42342 callref-0x40000004 tid-0) New transaction DLSMS SMC(0) instance created for network DLSMS SMR(0) instance created for network. -DLSMS SMC(0) instance created for network -DLSMS SMR(0) instance created for network. DLSMS trans(SMS IMSI-901700000004620:MSISDN-42342 callref-0x40000004 tid-0) Going to send a MT SMS DLSMS SMR(0) message SM-RL-DATA_REQ received in state IDLE DLSMS SMR(0) TX SMS RP-DATA @@ -3896,8 +3888,6 @@ DLSMS trans(SMS IMSI-901700000004620:MSISDN-42342 callref-0x40000005 tid-0) New transaction DLSMS SMC(0) instance created for network DLSMS SMR(0) instance created for network. -DLSMS SMC(0) instance created for network -DLSMS SMR(0) instance created for network. DLSMS trans(SMS IMSI-901700000004620:MSISDN-42342 callref-0x40000005 tid-0) Going to send a MT SMS DLSMS SMR(0) message SM-RL-DATA_REQ received in state IDLE DLSMS SMR(0) TX SMS RP-DATA diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.err b/tests/msc_vlr/msc_vlr_test_ms_timeout.err index 963974b..913ed03 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.err @@ -532,8 +532,6 @@ DLSMS trans(SMS IMSI-901700000004620:MSISDN-46071 callref-0x40000001 tid-0) New transaction DLSMS SMC(0) instance created for network DLSMS SMR(0) instance created for network. -DLSMS SMC(0) instance created for network -DLSMS SMR(0) instance created for network. DLSMS trans(SMS IMSI-901700000004620:MSISDN-46071 callref-0x40000001 tid-0) Going to send a MT SMS DLSMS SMR(0) message SM-RL-DATA_REQ received in state IDLE DLSMS SMR(0) TX SMS RP-DATA @@ -559,8 +557,6 @@ DLSMS trans(SMS IMSI-901700000004620:MSISDN-46071 callref-0x40000002 tid-1) New transaction DLSMS SMC(0) instance created for network DLSMS SMR(0) instance created for network. -DLSMS SMC(0) instance created for network -DLSMS SMR(0) instance created for network. DLSMS trans(SMS IMSI-901700000004620:MSISDN-46071 callref-0x40000002 tid-1) Going to send a MT SMS DLSMS SMR(0) message SM-RL-DATA_REQ received in state IDLE DLSMS SMR(0) TX SMS RP-DATA @@ -620,8 +616,6 @@ DLSMS trans(SMS IMSI-901700000004620:MSISDN-46071 callref-0x40000003 tid-0) New transaction DLSMS SMC(0) instance created for network DLSMS SMR(0) instance created for network. -DLSMS SMC(0) instance created for network -DLSMS SMR(0) instance created for network. DLSMS trans(SMS IMSI-901700000004620:MSISDN-46071 callref-0x40000003 tid-0) Going to send a MT SMS DLSMS SMR(0) message SM-RL-DATA_REQ received in state IDLE DLSMS SMR(0) TX SMS RP-DATA diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.err b/tests/msc_vlr/msc_vlr_test_no_authen.err index 321889b..129c8c1 100644 --- a/tests/msc_vlr/msc_vlr_test_no_authen.err +++ b/tests/msc_vlr/msc_vlr_test_no_authen.err @@ -232,8 +232,6 @@ DLSMS trans(SMS IMSI-901700000004620:MSISDN-46071 callref-0x40000001 tid-0) New transaction DLSMS SMC(0) instance created for network DLSMS SMR(0) instance created for network. -DLSMS SMC(0) instance created for network -DLSMS SMR(0) instance created for network. DLSMS trans(SMS IMSI-901700000004620:MSISDN-46071 callref-0x40000001 tid-0) Going to send a MT SMS DLSMS SMR(0) message SM-RL-DATA_REQ received in state IDLE DLSMS SMR(0) TX SMS RP-DATA @@ -728,8 +726,6 @@ DLSMS trans(SMS IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 callref-0x40000002 tid-0) New transaction DLSMS SMC(0) instance created for network DLSMS SMR(0) instance created for network. -DLSMS SMC(0) instance created for network -DLSMS SMR(0) instance created for network. DLSMS trans(SMS IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 callref-0x40000002 tid-0) Going to send a MT SMS DLSMS SMR(0) message SM-RL-DATA_REQ received in state IDLE DLSMS SMR(0) TX SMS RP-DATA diff --git a/tests/msc_vlr/msc_vlr_test_reject_concurrency.err b/tests/msc_vlr/msc_vlr_test_reject_concurrency.err index ec72204..424fca6 100644 --- a/tests/msc_vlr/msc_vlr_test_reject_concurrency.err +++ b/tests/msc_vlr/msc_vlr_test_reject_concurrency.err @@ -1441,8 +1441,6 @@ DLSMS trans(SMS IMSI-901700000004620:MSISDN-46071 callref-0x40000001 tid-0) New transaction DLSMS SMC(0) instance created for network DLSMS SMR(0) instance created for network. -DLSMS SMC(0) instance created for network -DLSMS SMR(0) instance created for network. DLSMS trans(SMS IMSI-901700000004620:MSISDN-46071 callref-0x40000001 tid-0) Going to send a MT SMS DLSMS SMR(0) message SM-RL-DATA_REQ received in state IDLE DLSMS SMR(0) TX SMS RP-DATA @@ -1740,8 +1738,6 @@ DLSMS trans(SMS IMSI-901700000004620:MSISDN-46071 callref-0x40000002 tid-0) New transaction DLSMS SMC(0) instance created for network DLSMS SMR(0) instance created for network. -DLSMS SMC(0) instance created for network -DLSMS SMR(0) instance created for network. DLSMS trans(SMS IMSI-901700000004620:MSISDN-46071 callref-0x40000002 tid-0) Going to send a MT SMS DLSMS SMR(0) message SM-RL-DATA_REQ received in state IDLE DLSMS SMR(0) TX SMS RP-DATA @@ -2062,8 +2058,6 @@ DLSMS trans(SMS IMSI-901700000004620:MSISDN-46071 callref-0x40000003 tid-0) New transaction DLSMS SMC(0) instance created for network DLSMS SMR(0) instance created for network. -DLSMS SMC(0) instance created for network -DLSMS SMR(0) instance created for network. DLSMS trans(SMS IMSI-901700000004620:MSISDN-46071 callref-0x40000003 tid-0) Going to send a MT SMS DLSMS SMR(0) message SM-RL-DATA_REQ received in state IDLE DLSMS SMR(0) TX SMS RP-DATA diff --git a/tests/msc_vlr/msc_vlr_test_umts_authen.err b/tests/msc_vlr/msc_vlr_test_umts_authen.err index eefa960..2940b36 100644 --- a/tests/msc_vlr/msc_vlr_test_umts_authen.err +++ b/tests/msc_vlr/msc_vlr_test_umts_authen.err @@ -337,8 +337,6 @@ DLSMS trans(SMS IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 callref-0x40000001 tid-0) New transaction DLSMS SMC(0) instance created for network DLSMS SMR(0) instance created for network. -DLSMS SMC(0) instance created for network -DLSMS SMR(0) instance created for network. DLSMS trans(SMS IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 callref-0x40000001 tid-0) Going to send a MT SMS DLSMS SMR(0) message SM-RL-DATA_REQ received in state IDLE DLSMS SMR(0) TX SMS RP-DATA @@ -958,8 +956,6 @@ DLSMS trans(SMS IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 callref-0x40000002 tid-0) New transaction DLSMS SMC(0) instance created for network DLSMS SMR(0) instance created for network. -DLSMS SMC(0) instance created for network -DLSMS SMR(0) instance created for network. DLSMS trans(SMS IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 callref-0x40000002 tid-0) Going to send a MT SMS DLSMS SMR(0) message SM-RL-DATA_REQ received in state IDLE DLSMS SMR(0) TX SMS RP-DATA -- To view, visit https://gerrit.osmocom.org/14000 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I23700a2c575a96057ef22bc5d8ab6271104d619b Gerrit-Change-Number: 14000 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:09:25 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:09:25 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_11.c: cosmetic: restructure gsm411_mm_send() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14001 ) Change subject: libmsc/gsm_04_11.c: cosmetic: restructure gsm411_mm_send() ...................................................................... libmsc/gsm_04_11.c: cosmetic: restructure gsm411_mm_send() Change-Id: I22e99f40ab2252a0b716969091e4d24b3b4268a2 --- M src/libmsc/gsm_04_11.c 1 file changed, 2 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c index cc9ce18..c5c3036 100644 --- a/src/libmsc/gsm_04_11.c +++ b/src/libmsc/gsm_04_11.c @@ -216,22 +216,20 @@ switch (msg_type) { case GSM411_MMSMS_EST_REQ: rc = gsm411_mmsms_est_req(trans); - msgb_free(msg); /* upper layer does not free msg */ break; case GSM411_MMSMS_DATA_REQ: rc = gsm411_cp_sendmsg(msg, trans, cp_msg_type); - break; + return rc; /* gsm411_cp_sendmsg() takes msg ownership */ case GSM411_MMSMS_REL_REQ: LOG_TRANS(trans, LOGL_DEBUG, "Got MMSMS_REL_REQ, destroying transaction.\n"); - msgb_free(msg); trans_free(trans); break; default: LOG_TRANS(trans, LOGL_NOTICE, "Unhandled MMCCSMS msg 0x%x\n", msg_type); - msgb_free(msg); rc = -EINVAL; } + msgb_free(msg); return rc; } -- To view, visit https://gerrit.osmocom.org/14001 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I22e99f40ab2252a0b716969091e4d24b3b4268a2 Gerrit-Change-Number: 14001 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:10:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:10:18 +0000 Subject: Change in osmo-msc[master]: Use transaction-specific debug macro In-Reply-To: References: Message-ID: Harald Welte has abandoned this change. ( https://gerrit.osmocom.org/12579 ) Change subject: Use transaction-specific debug macro ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/12579 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: I82ad7d2f53c123ad656e8f23432f770ab1d5937e Gerrit-Change-Number: 12579 Gerrit-PatchSet: 3 Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-CC: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:15:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:15:47 +0000 Subject: Change in libosmo-sccp[master]: osmo-stp: refactor handling of both SIGINT and SIGTERM In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13971 ) Change subject: osmo-stp: refactor handling of both SIGINT and SIGTERM ...................................................................... Patch Set 1: Code-Review-2 (1 comment) https://gerrit.osmocom.org/#/c/13971/1/stp/stp_main.c File stp/stp_main.c: https://gerrit.osmocom.org/#/c/13971/1/stp/stp_main.c at 221 PS1, Line 221: /* Gracefully shut down SIGTRAN links */ : osmo_signal_dispatch(SS_L_GLOBAL, S_L_GLOBAL_SHUTDOWN, NULL); : sleep(1); /* FIXME: do we really need to sleep() here? */ actually, that won't work. All our code is running asynchronously from the select main loop. So if the signal handlers are starting some activitiy that doesn't immediately timeout (e.g. sending an ASP-DOWN to the peer and waiting for the ACK), your sleep here won't help. If we want to do graceful shutdown, we should * receive the signal in the handler * change some state (such as quit++) * continue in the main loop * send the signal from the main loop * give the code some time (e.g. start a timer) * shut down on timer expiration If this fails for some reason, a second signal could be used to do quit++ and then cause a hard exit. -- To view, visit https://gerrit.osmocom.org/13971 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5d8618857c5119d4acca5d65cf1276ab02889c84 Gerrit-Change-Number: 13971 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 12 May 2019 10:15:47 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:16:35 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:16:35 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Separate as_GSUP_SAI from f_mm_auth In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13937 ) Change subject: msc: Separate as_GSUP_SAI from f_mm_auth ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13937 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I7b298d589930bab976b478ac84553a6352f25c93 Gerrit-Change-Number: 13937 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 12 May 2019 10:16:35 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:16:37 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:16:37 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Add a test for LU with invalid MCC/MNC in BSSAP/RANAP In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/12380 ) Change subject: msc: Add a test for LU with invalid MCC/MNC in BSSAP/RANAP ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/12380 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I676894358259b9cc0f973769ce552ba58a2a58a1 Gerrit-Change-Number: 12380 Gerrit-PatchSet: 4 Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Stefan Sperling Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 12 May 2019 10:16:37 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:16:38 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:16:38 +0000 Subject: Change in osmo-ttcn3-hacks[master]: add three tests for CIPHER MODE COMPLETE without algo In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/12347 ) Change subject: add three tests for CIPHER MODE COMPLETE without algo ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/12347 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1a2a126795c544613a7a87e238e1fc8c4e943885 Gerrit-Change-Number: 12347 Gerrit-PatchSet: 4 Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 12 May 2019 10:16:38 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:16:39 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:16:39 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Separate as_GSUP_SAI from f_mm_auth In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13937 ) Change subject: msc: Separate as_GSUP_SAI from f_mm_auth ...................................................................... msc: Separate as_GSUP_SAI from f_mm_auth In some cases we might want to match on (and perform) the GSUP SEND AUTH INFO without also expecting/performing a MM authentication on the Iu/A interface. Hence it makes sense to split those two. Change-Id: I7b298d589930bab976b478ac84553a6352f25c93 --- M msc/BSC_ConnectionHandler.ttcn 1 file changed, 24 insertions(+), 19 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 9fc0616..93a311e 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -379,34 +379,39 @@ return l3_info; } +altstep as_GSUP_SAI() runs on BSC_ConnHdlr { +var GSUP_IE auth_tuple; +[] GSUP.receive(tr_GSUP_SAI_REQ(g_pars.imsi)) { + if (g_pars.use_umts_aka) { + g_pars.vec := f_gen_auth_vec_3g(); + auth_tuple := valueof(ts_GSUP_IE_AuthTuple2G3G(g_pars.vec.rand, + g_pars.vec.sres, + g_pars.vec.kc, + g_pars.vec.ik, + g_pars.vec.ck, + g_pars.vec.autn, + g_pars.vec.res)); + GSUP.send(ts_GSUP_SAI_RES(g_pars.imsi, auth_tuple)); + } else { + g_pars.vec := f_gen_auth_vec_2g(); + auth_tuple := valueof(ts_GSUP_IE_AuthTuple2G(g_pars.vec.rand, + g_pars.vec.sres, + g_pars.vec.kc)); + GSUP.send(ts_GSUP_SAI_RES(g_pars.imsi, auth_tuple)); + } + } +} + function f_mm_auth() runs on BSC_ConnHdlr { if (g_pars.net.expect_auth) { - var GSUP_IE auth_tuple; - GSUP.receive(tr_GSUP_SAI_REQ(g_pars.imsi)); - + as_GSUP_SAI(); if (g_pars.use_umts_aka) { - g_pars.vec := f_gen_auth_vec_3g(); - auth_tuple := valueof(ts_GSUP_IE_AuthTuple2G3G(g_pars.vec.rand, - g_pars.vec.sres, - g_pars.vec.kc, - g_pars.vec.ik, - g_pars.vec.ck, - g_pars.vec.autn, - g_pars.vec.res)); - GSUP.send(ts_GSUP_SAI_RES(g_pars.imsi, auth_tuple)); - BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_MM_AUTH_REQ_3G(g_pars.vec.rand, g_pars.vec.autn))); var OCT4 res := substr(g_pars.vec.res, 0, 4); var OCT4 xres := substr(g_pars.vec.res, 4, 4); BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MT_MM_AUTH_RESP_3G(res, xres))); } else { - g_pars.vec := f_gen_auth_vec_2g(); - auth_tuple := valueof(ts_GSUP_IE_AuthTuple2G(g_pars.vec.rand, - g_pars.vec.sres, - g_pars.vec.kc)); - GSUP.send(ts_GSUP_SAI_RES(g_pars.imsi, auth_tuple)); - BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_MM_AUTH_REQ(g_pars.vec.rand))); BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MT_MM_AUTH_RESP_2G(g_pars.vec.sres))); } -- To view, visit https://gerrit.osmocom.org/13937 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I7b298d589930bab976b478ac84553a6352f25c93 Gerrit-Change-Number: 13937 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:16:39 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:16:39 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Add a test for LU with invalid MCC/MNC in BSSAP/RANAP In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/12380 ) Change subject: msc: Add a test for LU with invalid MCC/MNC in BSSAP/RANAP ...................................................................... msc: Add a test for LU with invalid MCC/MNC in BSSAP/RANAP Verify that the MSC rejects a location update from a Cell/BSC that contains a PLMN which does not match the core network's PLMN. Related: OS#3162 Change-Id: I676894358259b9cc0f973769ce552ba58a2a58a1 --- M msc/MSC_Tests.ttcn M msc/MSC_Tests_Iu.ttcn 2 files changed, 43 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index e1e5088..9524afb 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -3614,6 +3614,40 @@ vc_conn.done; } +/* Location Update with invalid (non-matching) MCC/MNC reported on BSSMAP level from BSC */ +friend function f_tc_lu_with_invalid_mcc_mnc(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { + f_init_handler(pars); + + /* tell GSUP dispatcher to send this IMSI to us */ + f_create_gsup_expect(hex2str(g_pars.imsi)); + + /* modify the cell ID which will be used to construct the COMPLELTE L3 or InitialUE */ + g_pars.cell_id := valueof(ts_CellId_CGI('333'H, '22'H, 23, 42)); + + /* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */ + var PDU_ML3_MS_NW l3_lu := f_build_lu_imsi(g_pars.imsi) + f_cl3_or_initial_ue(l3_lu); + + /* Expect LU reject from MSC. */ + alt { + [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej)) { + setverdict(pass); + } + [] BSSAP.receive { + setverdict(fail, "Unknown/unexpected BSSAP received"); + mtc.stop; + } + } + f_expect_clear(); +} +testcase TC_lu_with_invalid_mcc_mnc() runs on MTC_CT { + var BSC_ConnHdlr vc_conn; + f_init(); + vc_conn := f_start_handler(refers(f_tc_lu_with_invalid_mcc_mnc), 54); + vc_conn.done; +} + + /* TODO (SMS): * different user data lengths * SMPP transaction mode with unsuccessful delivery @@ -5282,6 +5316,7 @@ execute( TC_lu_and_ss_session_timeout() ); execute( TC_cipher_complete_with_invalid_cipher() ); + execute( TC_lu_with_invalid_mcc_mnc() ); execute( TC_sgsap_reset() ); execute( TC_sgsap_lu() ); diff --git a/msc/MSC_Tests_Iu.ttcn b/msc/MSC_Tests_Iu.ttcn index 991c9b8..5798821 100644 --- a/msc/MSC_Tests_Iu.ttcn +++ b/msc/MSC_Tests_Iu.ttcn @@ -387,6 +387,13 @@ f_vty_config(MSCVTY, "msc", "ncss guard-timeout 0"); } +testcase TC_iu_lu_with_invalid_mcc_mnc() runs on MTC_CT { + var BSC_ConnHdlr vc_conn; + f_init(3); + vc_conn := f_start_handler(refers(f_tc_lu_with_invalid_mcc_mnc), 1054, ran_idx := 2, ran_is_geran := false); + vc_conn.done; +} + control { execute( TC_iu_lu_imsi_reject() ); execute( TC_iu_lu_imsi_timeout_gsup() ); @@ -430,6 +437,7 @@ execute( TC_iu_lu_and_mt_ussd_during_mt_call() ); execute( TC_iu_lu_and_mo_ussd_mo_release() ); execute( TC_iu_lu_and_ss_session_timeout() ); + execute( TC_iu_lu_with_invalid_mcc_mnc() ); /* TODO: Iu + SGsAP related tests, e.g. paging on IuCS */ -- To view, visit https://gerrit.osmocom.org/12380 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I676894358259b9cc0f973769ce552ba58a2a58a1 Gerrit-Change-Number: 12380 Gerrit-PatchSet: 4 Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Stefan Sperling Gerrit-CC: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:16:40 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:16:40 +0000 Subject: Change in osmo-ttcn3-hacks[master]: add three tests for CIPHER MODE COMPLETE without algo In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/12347 ) Change subject: add three tests for CIPHER MODE COMPLETE without algo ...................................................................... add three tests for CIPHER MODE COMPLETE without algo Add three tests which exercise MSC behaviour when a CIPHER MODE COMPLETE command lacks the optional chosenEncryptionAlgorithm IE. Check for behaviour with A5/1, A5/3, and A5/1 + A5/3 configured in the network, and expect the location update to succeed. These tests pass on master, but they should somehow verify the cipher the MSC ends up using. I am not quite sure how to do that. Would inspecting the MSC's VTY be a reasonable approach? How could his be done by code which runs on BSC_ConnectionHandler? Change-Id: I1a2a126795c544613a7a87e238e1fc8c4e943885 Related: OS#2872 --- M library/BSSMAP_Templates.ttcn M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.cfg M msc/MSC_Tests.ttcn 4 files changed, 120 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index b7230cd..02c84e2 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -1174,6 +1174,19 @@ } } +template PDU_BSSAP ts_BSSMAP_CipherModeComplAlg(template BSSMAP_IE_ChosenEncryptionAlgorithm chosenEncryptionAlgorithm := ?) +modifies ts_BSSAP_BSSMAP := { + pdu := { + bssmap := { + cipherModeComplete := { + messageType := '55'O, + layer3MessageContents := omit, + chosenEncryptionAlgorithm := chosenEncryptionAlgorithm + } + } + } +} + template PDU_BSSAP tr_BSSMAP_CipherModeCompl(template OCT1 alg := ?) modifies tr_BSSAP_BSSMAP := { pdu := { bssmap := { diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 93a311e..796b0ce 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -494,12 +494,25 @@ } f_mm_common(); + f_msc_lu_hlr(); + f_accept_reject_lu(); + /* FIXME: there could be pending SMS or other common procedures by the MSC, let's ignore them */ + f_expect_clear(); + setverdict(pass); +} + +function f_msc_lu_hlr() runs on BSC_ConnHdlr +{ /* Expect MSC to perform LU with HLR */ GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi)); GSUP.send(ts_GSUP_ISD_REQ(g_pars.imsi, g_pars.msisdn)); GSUP.receive(tr_GSUP_ISD_RES(g_pars.imsi)); GSUP.send(ts_GSUP_UL_RES(g_pars.imsi)); +} + +function f_accept_reject_lu() runs on BSC_ConnHdlr { + var PDU_DTAP_MT dtap_mt; alt { [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Acc)) -> value dtap_mt { @@ -529,9 +542,6 @@ /* Wait for MM-Information (if enabled) */ f_expect_mm_info(); - - /* FIXME: there could be pending SMS or other common procedures by the MSC, let's ignore them */ - f_expect_clear(); setverdict(pass); } diff --git a/msc/MSC_Tests.cfg b/msc/MSC_Tests.cfg index b412889..b852bac 100644 --- a/msc/MSC_Tests.cfg +++ b/msc/MSC_Tests.cfg @@ -61,3 +61,6 @@ #MSC_Tests.TC_reset_two #MSC_Tests.TC_lu_and_mt_call #MSC_Tests.TC_cipher_complete_with_invalid_cipher +#MSC_Tests.TC_cipher_complete_1_without_cipher +#MSC_Tests.TC_cipher_complete_3_without_cipher +#MSC_Tests.TC_cipher_complete_13_without_cipher diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 9524afb..f6ab439 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -3647,6 +3647,94 @@ vc_conn.done; } +private function f_tc_cipher_complete_without_alg(charstring id, BSC_ConnHdlrPars pars, octetstring kc_support) runs on BSC_ConnHdlr { + pars.net.expect_auth := true; + pars.net.expect_ciph := true; + pars.net.kc_support := kc_support; + f_init_handler(pars); + + g_pars.vec := f_gen_auth_vec_2g(); + + /* Can't use f_perform_lu() directly. Code below is based on it. */ + + /* tell GSUP dispatcher to send this IMSI to us */ + f_create_gsup_expect(hex2str(g_pars.imsi)); + + /* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */ + var PDU_ML3_MS_NW l3_lu := f_build_lu_imsi(g_pars.imsi) + f_cl3_or_initial_ue(l3_lu); + + f_mm_auth(); + + var OCT1 a5_net := f_alg_mask_from_cm(g_pars.cm2); + var OCT1 a5_intersect := g_pars.net.kc_support and4b a5_net; + alt { + [] BSSAP.receive(tr_BSSMAP_CipherModeCmd(a5_intersect, g_pars.vec.kc)) { + BSSAP.send(ts_BSSMAP_CipherModeComplAlg(omit)); + } + [] BSSAP.receive(tr_BSSMAP_ClassmarkReq) { + BSSAP.send(ts_BSSMAP_ClassmarkUpd(g_pars.cm2, g_pars.cm3)); + repeat; + } + [] BSSAP.receive(tr_BSSMAP_CipherModeCmd(?, g_pars.vec.kc)) { + setverdict(fail, "Wrong ciphering algorithm mask in CiphModCmd"); + mtc.stop; + } + [] BSSAP.receive { + setverdict(fail, "Unknown/unexpected BSSAP received"); + mtc.stop; + } + } + + /* TODO: Verify MSC is using the best cipher available! How? */ + + f_msc_lu_hlr(); + f_accept_reject_lu(); + f_expect_clear(); + setverdict(pass); +} + +/* A5/1 only permitted on network side; attempt CIPHER MODE COMPLETE without specifying the accepted algorithm. */ +private function f_tc_cipher_complete_1_without_cipher(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { + f_tc_cipher_complete_without_alg(id, pars, '02'O /* A5/1 only */); +} + +/* A5/3 only permitted on network side; attempt CIPHER MODE COMPLETE without specifying the accepted algorithm. */ +private function f_tc_cipher_complete_3_without_cipher(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { + f_tc_cipher_complete_without_alg(id, pars, '08'O /* A5/3 only */); +} + +/* A5/1 + A5/3 permitted on network side; attempt CIPHER MODE COMPLETE without specifying the accepted algorithm. */ +private function f_tc_cipher_complete_13_without_cipher(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { + f_tc_cipher_complete_without_alg(id, pars, '0A'O /* A5/1 and A5/3 enabled */); +} + +testcase TC_cipher_complete_1_without_cipher() runs on MTC_CT { + var BSC_ConnHdlr vc_conn; + f_init(); + f_vty_config(MSCVTY, "network", "encryption a5 1"); + + vc_conn := f_start_handler(refers(f_tc_cipher_complete_1_without_cipher), 53); + vc_conn.done; +} + +testcase TC_cipher_complete_3_without_cipher() runs on MTC_CT { + var BSC_ConnHdlr vc_conn; + f_init(); + f_vty_config(MSCVTY, "network", "encryption a5 3"); + + vc_conn := f_start_handler(refers(f_tc_cipher_complete_3_without_cipher), 54); + vc_conn.done; +} + +testcase TC_cipher_complete_13_without_cipher() runs on MTC_CT { + var BSC_ConnHdlr vc_conn; + f_init(); + f_vty_config(MSCVTY, "network", "encryption a5 1 3"); + + vc_conn := f_start_handler(refers(f_tc_cipher_complete_13_without_cipher), 55); + vc_conn.done; +} /* TODO (SMS): * different user data lengths @@ -5316,6 +5404,9 @@ execute( TC_lu_and_ss_session_timeout() ); execute( TC_cipher_complete_with_invalid_cipher() ); + execute( TC_cipher_complete_1_without_cipher() ); + execute( TC_cipher_complete_3_without_cipher() ); + execute( TC_cipher_complete_13_without_cipher() ); execute( TC_lu_with_invalid_mcc_mnc() ); execute( TC_sgsap_reset() ); -- To view, visit https://gerrit.osmocom.org/12347 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I1a2a126795c544613a7a87e238e1fc8c4e943885 Gerrit-Change-Number: 12347 Gerrit-PatchSet: 4 Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:18:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:18:05 +0000 Subject: Change in osmo-msc[master]: remove msc specific db counters In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13800 ) Change subject: remove msc specific db counters ...................................................................... Patch Set 2: Code-Review-1 at least manuals/chapters/running.adoc should be modified in this very patch -- To view, visit https://gerrit.osmocom.org/13800 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id64f1839a55b5326f74ec04b7a5dbed9d269b89c Gerrit-Change-Number: 13800 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Sun, 12 May 2019 10:18:05 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:22:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:22:09 +0000 Subject: Change in libosmocore[master]: libosmovty: deprecate vty_init(), add vty_init[_app]_ctx() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13973 ) Change subject: libosmovty: deprecate vty_init(), add vty_init[_app]_ctx() ...................................................................... Patch Set 2: Code-Review-1 keeping the VTY context a separate context *not* underneath the applications global talloc context is actually a feature that was introduced intentionally. The point is that VTY is a heavy user of talloc, and it generates quite lengthy reports. By keeping the VTY alloctaions separate, we ensure that the normal talloc_report of the application context is not full of "vty spam" that we're not really interested. OpenBSC (and everything that we created as derivatife of openbsc.git later on) use different signals (SIGUSR1 vs SIGUSR2) to get the report either with or without VTY. I'm not saying this is set in stone, but there is some logic to it and we should be careful about changing this. I would rather want to move the SIGUSR* handling into libosmocore to avoid replicating this all over the place. This way we can ensure consistent behavior with regard to the VTY... -- To view, visit https://gerrit.osmocom.org/13973 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I65d71f8fc943e103b53b784f690ed56a6e373e3f Gerrit-Change-Number: 13973 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 12 May 2019 10:22:09 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:23:04 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:23:04 +0000 Subject: Change in osmo-msc[master]: libmsc/msc_ho.c: fix unreacheable check of MSC-T role allocation In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13975 ) Change subject: libmsc/msc_ho.c: fix unreacheable check of MSC-T role allocation ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13975 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I46fa37ff27e8a4576fdc8edad894ee16759a6e7a Gerrit-Change-Number: 13975 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Comment-Date: Sun, 12 May 2019 10:23:04 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:23:44 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:23:44 +0000 Subject: Change in osmo-msc[master]: transaction: fix NULL-pointer dereference in trans_alloc() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13974 ) Change subject: transaction: fix NULL-pointer dereference in trans_alloc() ...................................................................... Patch Set 1: too many NULL pointer related fixes in review in paralell, Neels should decide what to merge and what not. -- To view, visit https://gerrit.osmocom.org/13974 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I3c373d20ebd6e96ebd57f84b74dc15a6b69c03ac Gerrit-Change-Number: 13974 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Assignee: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-CC: Harald Welte Gerrit-Comment-Date: Sun, 12 May 2019 10:23:44 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:24:31 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:24:31 +0000 Subject: Change in osmo-msc[master]: libmsc/msc_a.c: fix possible NULL-pointer dereferences In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13976 ) Change subject: libmsc/msc_a.c: fix possible NULL-pointer dereferences ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13976 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id5c95fbf318a2e51e7ffee2e08ceab3042b26cc9 Gerrit-Change-Number: 13976 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 12 May 2019 10:24:31 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:24:58 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:24:58 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_11.c: fix NULL-pointer dereference in gsm340_rx_tpdu() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13978 ) Change subject: libmsc/gsm_04_11.c: fix NULL-pointer dereference in gsm340_rx_tpdu() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13978 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1e9b351e949efe596295d18f98c8a73c8e013763 Gerrit-Change-Number: 13978 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 12 May 2019 10:24:58 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:26:22 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:26:22 +0000 Subject: Change in osmo-msc[master]: libmsc/ran_msg_a.c: refactor ran_a_decode_lcls_notification() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13981 ) Change subject: libmsc/ran_msg_a.c: refactor ran_a_decode_lcls_notification() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13981 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie0f9b5c1bbbfb744e0615da07d76037d91b0abc8 Gerrit-Change-Number: 13981 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 12 May 2019 10:26:22 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:28:44 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:28:44 +0000 Subject: Change in osmo-msc[master]: transaction: fix NULL-pointer dereference in trans_alloc() In-Reply-To: References: Message-ID: Harald Welte has uploaded a new patch set (#3) to the change originally created by Vadim Yanitskiy. ( https://gerrit.osmocom.org/13974 ) Change subject: transaction: fix NULL-pointer dereference in trans_alloc() ...................................................................... transaction: fix NULL-pointer dereference in trans_alloc() Unlike LOG_TRANS_CAT(), LOG_TRANS() is not NULL-safe: LOG_TRANS_CAT(trans, (trans)->log_subsys, level, fmt, ##args) ^^^^^^^^^ NULL-pointer dereference Let's rather use generic LOGP() macro with pre-calculated logging subsystem. Intentional use of LOG_TRANS_CAT() doesn't make sense anyway, because the result would be uninformative: trans(NULL NULL callref-0x0 tid-0) ... Change-Id: I3c373d20ebd6e96ebd57f84b74dc15a6b69c03ac --- M include/osmocom/msc/transaction.h M src/libmsc/transaction.c 2 files changed, 6 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/74/13974/3 -- To view, visit https://gerrit.osmocom.org/13974 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3c373d20ebd6e96ebd57f84b74dc15a6b69c03ac Gerrit-Change-Number: 13974 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Assignee: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-CC: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:32:41 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:32:41 +0000 Subject: Change in osmo-msc[master]: add DSS logging category In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13942 ) Change subject: add DSS logging category ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13942 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id7e04c9f5088334cd5ec6cfdb6a9b3a2a7e7fda0 Gerrit-Change-Number: 13942 Gerrit-PatchSet: 2 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 12 May 2019 10:32:41 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:32:42 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:32:42 +0000 Subject: Change in osmo-msc[master]: add DSS logging category In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13942 ) Change subject: add DSS logging category ...................................................................... add DSS logging category Change-Id: Id7e04c9f5088334cd5ec6cfdb6a9b3a2a7e7fda0 --- M include/osmocom/msc/debug.h M include/osmocom/msc/transaction.h M src/libmsc/gsm_09_11.c M src/osmo-msc/msc_main.c M tests/msc_vlr/msc_vlr_test_ss.err M tests/msc_vlr/msc_vlr_tests.c 6 files changed, 23 insertions(+), 17 deletions(-) Approvals: Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/msc/debug.h b/include/osmocom/msc/debug.h index 28ba482..3347e20 100644 --- a/include/osmocom/msc/debug.h +++ b/include/osmocom/msc/debug.h @@ -22,5 +22,6 @@ DIUCS, DBSSAP, DSGS, + DSS, Debug_LastEntry, }; diff --git a/include/osmocom/msc/transaction.h b/include/osmocom/msc/transaction.h index 6b82390..c63ef5b 100644 --- a/include/osmocom/msc/transaction.h +++ b/include/osmocom/msc/transaction.h @@ -168,10 +168,7 @@ case TRANS_SMS: return DLSMS; case TRANS_USSD: - /* FIXME: traditionally (before LOG_TRANS() was added in I2e60964d7a3c06d051debd1c707051a0eb3101ba / - * ff7074a0c7b62025473d8f1a950905ac2cb2f31c), all USSD logging happened on DMM. Instead, it probably - * deserves its own logging subsystem. */ - return DMM; + return DSS; default: break; } diff --git a/src/libmsc/gsm_09_11.c b/src/libmsc/gsm_09_11.c index 984cc53..6558272 100644 --- a/src/libmsc/gsm_09_11.c +++ b/src/libmsc/gsm_09_11.c @@ -271,7 +271,7 @@ if (msc_a) { struct gsm_network *net = msc_a_net(msc_a); - LOG_MSC_A_CAT(msc_a, DMM, LOGL_DEBUG, "Paging succeeded\n"); + LOG_MSC_A_CAT(msc_a, DSS, LOGL_DEBUG, "Paging succeeded\n"); /* Assign connection */ msc_a_get(msc_a, MSC_A_USE_NC_SS); @@ -297,7 +297,7 @@ /* Count established network-initiated NC SS/USSD sessions */ rate_ctr_inc(&net->msc_ctrs->ctr[MSC_CTR_NC_SS_MT_ESTABLISHED]); } else { - LOG_MSC_A_CAT(msc_a, DMM, LOGL_DEBUG, "Paging expired\n"); + LOG_MSC_A_CAT(msc_a, DSS, LOGL_DEBUG, "Paging expired\n"); /* TODO: inform HLR about this failure */ diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c index e101d89..7577768 100644 --- a/src/osmo-msc/msc_main.c +++ b/src/osmo-msc/msc_main.c @@ -480,8 +480,11 @@ .description = "SGs Interface (SGsAP)", .enabled = 1, .loglevel = LOGL_NOTICE, }, - - + [DSS] = { + .name = "DSS", + .description = "Supplementary Services", + .enabled = 1, .loglevel = LOGL_NOTICE, + }, }; static int filter_fn(const struct log_context *ctx, struct log_target *tar) diff --git a/tests/msc_vlr/msc_vlr_test_ss.err b/tests/msc_vlr/msc_vlr_test_ss.err index 2030715..333d275 100644 --- a/tests/msc_vlr/msc_vlr_test_ss.err +++ b/tests/msc_vlr/msc_vlr_test_ss.err @@ -173,12 +173,12 @@ DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: RAN decode: DTAP DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: Dispatching 04.08 message: NCSS GSM0480_MTYPE_REGISTER DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + NCSS: now used by 3 (attached,active-conn,NCSS) -DMM trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000001 tid-8) New transaction +DSS trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000001 tid-8) New transaction DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: + nc_ss: now used by 3 (cm_service_ss,rx_from_ms,nc_ss) DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: Received Event MSC_A_EV_TRANSACTION_ACCEPTED DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: state_chg to MSC_A_ST_COMMUNICATING DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: - cm_service_ss: now used by 2 (rx_from_ms,nc_ss) -DMM trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ callref-0x20000001 tid-8) Received SS/USSD msg GSM0480_MTYPE_REGISTER +DSS trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ callref-0x20000001 tid-8) Received SS/USSD msg GSM0480_MTYPE_REGISTER GSUP --> HLR: OSMO_GSUP_MSGT_PROC_SS_REQUEST: 20010809710000004026f03004200000013101013515a11302010102013b300b04010f0406aa510c061b010a0103 DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: - rx_from_ms: now used by 1 (nc_ss) <-- GSUP rx OSMO_GSUP_MSGT_PROC_SS_REQUEST: 20010809710000004026f03004200000013101033527a225020101302002013b301b04010f0416d9775d0e2ae3e965f73cfd7683d27310cd06bbc51a0d0a0103 @@ -187,7 +187,7 @@ - DTAP --GERAN-A--> MS: GSM0480_MTYPE_RELEASE_COMPLETE: 8b2a1c27a225020101302002013b301b04010f0416d9775d0e2ae3e965f73cfd7683d27310cd06bbc51a0d - DTAP matches expected message DMSC dummy_msc_i(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST -DMM trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ callref-0x20000001 tid-8) Freeing transaction +DSS trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ callref-0x20000001 tid-8) Freeing transaction DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - NCSS: now used by 3 (attached,active-conn,gsm0911_gsup_rx) DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: - nc_ss: now used by 0 (-) DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Received Event MSC_A_EV_UNUSED @@ -366,9 +366,9 @@ <-- GSUP rx OSMO_GSUP_MSGT_PROC_SS_REQUEST: 20010809710000004026f03004200001013101013515a11302010102013b300b04010f0406aa510c061b010a0103 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + gsm0911_gsup_rx: now used by 3 (attached,_test_ss_ussd_no,gsm0911_gsup_rx) DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + NCSS: now used by 4 (attached,_test_ss_ussd_no,gsm0911_gsup_rx,NCSS) -DMM trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-255) New transaction -DMM trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-255) Establishing network-originated session -DMM trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-0) Triggering Paging Request +DSS trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-255) New transaction +DSS trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-255) Establishing network-originated session +DSS trans(NCSS IMSI-901700000004620:MSISDN-46071 callref-0x20000101 tid-0) Triggering Paging Request DPAG Paging: IMSI-901700000004620:MSISDN-46071 for GSM 09.11 SS/USSD: Starting paging paging request (SIGNALLING_HIGH_PRIO) to IMSI-901700000004620:MSISDN-46071 on GERAN-A strcmp(paging_expecting_imsi, vsub->imsi) == 0 @@ -417,7 +417,7 @@ DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTH_CIPH}: state_chg to MSC_A_ST_AUTHENTICATED DPAG Paging: IMSI-901700000004620:MSISDN-46071 for GSM 09.11 SS/USSD: Paging Response action (success) DPAG Paging: IMSI-901700000004620:MSISDN-46071 for GSM 09.11 SS/USSD: Removing Paging Request -DMM msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: Paging succeeded +DSS msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: Paging succeeded DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: + nc_ss: now used by 3 (rx_from_ms,paging-response,nc_ss) DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: RAN encode: DTAP on GERAN-A - DTAP --GERAN-A--> MS: GSM0480_MTYPE_REGISTER: 0b3b1c15a11302010102013b300b04010f0406aa510c061b01 @@ -433,7 +433,7 @@ DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: + rx_from_ms: now used by 2 (nc_ss,rx_from_ms) DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: RAN decode: DTAP DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: Dispatching 04.08 message: NCSS GSM0480_MTYPE_FACILITY -DMM trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP callref-0x20000101 tid-0) Received SS/USSD msg GSM0480_MTYPE_FACILITY +DSS trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP callref-0x20000101 tid-0) Received SS/USSD msg GSM0480_MTYPE_FACILITY GSUP --> HLR: OSMO_GSUP_MSGT_PROC_SS_REQUEST: 20010809710000004026f03004200001013101023527a225020101302002013b301b04010f0416d9775d0e2ae3e965f73cfd7683d27310cd06bbc51a0d0a0103 DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: - rx_from_ms: now used by 1 (nc_ss) dtap_tx_confirmed == 1 @@ -444,7 +444,7 @@ - DTAP --GERAN-A--> MS: GSM0480_MTYPE_RELEASE_COMPLETE: 0b2a - DTAP matches expected message DMSC dummy_msc_i(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST -DMM trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP callref-0x20000101 tid-0) Freeing transaction +DSS trans(NCSS IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP callref-0x20000101 tid-0) Freeing transaction DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - NCSS: now used by 4 (attached,2*gsm0911_gsup_rx,active-conn) DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: - nc_ss: now used by 0 (-) DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: Received Event MSC_A_EV_UNUSED diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 81ac3f7..488cd19 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -660,6 +660,11 @@ .description = "BSSAP Protocol (A Interface)", .enabled = 1, .loglevel = LOGL_DEBUG, }, + [DSS] = { + .name = "DSS", + .description = "Supplementary Services", + .enabled = 1, .loglevel = LOGL_DEBUG, + }, }; static struct log_info info = { -- To view, visit https://gerrit.osmocom.org/13942 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id7e04c9f5088334cd5ec6cfdb6a9b3a2a7e7fda0 Gerrit-Change-Number: 13942 Gerrit-PatchSet: 3 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:33:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:33:18 +0000 Subject: Change in osmo-msc[master]: silence error messages about HANDOVER_END not permitted In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13966 ) Change subject: silence error messages about HANDOVER_END not permitted ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13966 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie8dc0c0a631b7da43111f329562007766a21b134 Gerrit-Change-Number: 13966 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 12 May 2019 10:33:18 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:33:20 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:33:20 +0000 Subject: Change in osmo-msc[master]: silence error messages about HANDOVER_END not permitted In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13966 ) Change subject: silence error messages about HANDOVER_END not permitted ...................................................................... silence error messages about HANDOVER_END not permitted The MSC_A_EV_HANDOVER_END exists as parent term event for the msc_ho_fsm, but it is not actually required as functional event, since all cleanup is handled in msc_ho_fsm_cleanup(). That's why I never bothered to add the event to msc_a_fsm, but of course that means we get an error message after each (successful and unsuccessful) handover, that the MSC_A_EV_HANDOVER_END is not permitted. Allow the event and ignore it to silence the error message. Explain in a comment. Change-Id: Ie8dc0c0a631b7da43111f329562007766a21b134 --- M src/libmsc/msc_a.c 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c index 77dd43d..5137e20 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -646,6 +646,12 @@ msc_ho_start(msc_a, (struct ran_handover_required*)data); return; + case MSC_A_EV_HANDOVER_END: + /* Termination event of the msc_ho_fsm. No action needed, it's all done in the msc_ho_fsm cleanup. This + * event only exists because osmo_fsm_inst_alloc_child() requires a parent term event; and maybe + * interesting for logging. */ + return; + case MSC_A_EV_MO_CLOSE: case MSC_A_EV_CN_CLOSE: case MSC_A_EV_UNUSED: @@ -756,6 +762,10 @@ /* RTP streams cleaned up above */ return; + case MSC_A_EV_HANDOVER_END: + /* msc_ho_fsm does cleanup. */ + return; + default: OSMO_ASSERT(false); } @@ -921,6 +931,7 @@ | S(MSC_EV_CALL_LEG_TERM) | S(MSC_MNCC_EV_CALL_ENDED) | S(MSC_A_EV_HANDOVER_REQUIRED) + | S(MSC_A_EV_HANDOVER_END) , .out_state_mask = 0 | S(MSC_A_ST_RELEASING) @@ -935,6 +946,7 @@ | S(MSC_A_EV_UNUSED) | S(MSC_EV_CALL_LEG_TERM) | S(MSC_MNCC_EV_CALL_ENDED) + | S(MSC_A_EV_HANDOVER_END) , .out_state_mask = 0 | S(MSC_A_ST_RELEASED) -- To view, visit https://gerrit.osmocom.org/13966 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie8dc0c0a631b7da43111f329562007766a21b134 Gerrit-Change-Number: 13966 Gerrit-PatchSet: 2 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:34:15 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:34:15 +0000 Subject: Change in libosmocore[master]: osmo_sock_get_name_*: Ensure string is returned in error case In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13960 ) Change subject: osmo_sock_get_name_*: Ensure string is returned in error case ...................................................................... osmo_sock_get_name_*: Ensure string is returned in error case osmo_sock_get_name_buf(): In case the getsockname() call is failing for some weird reason, we shouldn't return an uninitialized, non-zero-terminated string buffer to the caller, as most callers will be too lazy to test the return value. This holds even more true for users of the internal osmo_sock_get_name2() and osmo_sock_get_name2_c() functions which indeed very much ignore the return value of osmo_sock_get_name_buf(). Change-Id: I2d56327e96b7a6783cca38b828c5ee74aed776ae --- M src/socket.c 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/socket.c b/src/socket.c index 7c412b6..614ad36 100644 --- a/src/socket.c +++ b/src/socket.c @@ -805,8 +805,10 @@ int rc; /* get local */ - if ((rc = osmo_sock_get_ip_and_port(fd, hostbuf_l, sizeof(hostbuf_l), portbuf_l, sizeof(portbuf_l), true))) + if ((rc = osmo_sock_get_ip_and_port(fd, hostbuf_l, sizeof(hostbuf_l), portbuf_l, sizeof(portbuf_l), true))) { + osmo_strlcpy(str, "", str_len); return rc; + } /* get remote */ if (osmo_sock_get_ip_and_port(fd, hostbuf_r, sizeof(hostbuf_r), portbuf_r, sizeof(portbuf_r), false) != 0) -- To view, visit https://gerrit.osmocom.org/13960 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I2d56327e96b7a6783cca38b828c5ee74aed776ae Gerrit-Change-Number: 13960 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Mykola Shchetinin -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:34:15 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:34:15 +0000 Subject: Change in libosmocore[master]: NS: log address:port on error In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/11636 ) Change subject: NS: log address:port on error ...................................................................... NS: log address:port on error Change-Id: If2dc533a6dc150254f5d44b672f04bb728e7e927 --- M src/gb/gprs_ns.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved diff --git a/src/gb/gprs_ns.c b/src/gb/gprs_ns.c index 3679a5b..cee4885 100644 --- a/src/gb/gprs_ns.c +++ b/src/gb/gprs_ns.c @@ -1963,8 +1963,8 @@ ret = recvfrom(bfd->fd, msg->data, NS_ALLOC_SIZE - NS_ALLOC_HEADROOM, 0, (struct sockaddr *)saddr, &saddr_len); if (ret < 0) { - LOGP(DNS, LOGL_ERROR, "recv error %s during NSIP recv\n", - strerror(errno)); + LOGP(DNS, LOGL_ERROR, "recv error %s during NSIP recvfrom %s\n", + strerror(errno), osmo_sock_get_name2(bfd->fd)); msgb_free(msg); *error = ret; return NULL; -- To view, visit https://gerrit.osmocom.org/11636 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If2dc533a6dc150254f5d44b672f04bb728e7e927 Gerrit-Change-Number: 11636 Gerrit-PatchSet: 4 Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:34:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:34:33 +0000 Subject: Change in libosmocore[master]: Change GSM48_PDISC_* to enum type In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/12572 ) Change subject: Change GSM48_PDISC_* to enum type ...................................................................... Patch Set 7: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/12572 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icbbe8786a776081d7643193f154e6270224399e6 Gerrit-Change-Number: 12572 Gerrit-PatchSet: 7 Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 12 May 2019 10:34:33 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:35:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:35:18 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_08.c: fix: print proper length value In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13906 ) Change subject: libmsc/gsm_04_08.c: fix: print proper length value ...................................................................... libmsc/gsm_04_08.c: fix: print proper length value Since in parse_umts_auth_resp() we are checking the length of GSM48_IE_AUTH_RES_EXT TLV, we need to print its length, but not the length of the whole L3. Change-Id: I2bfebce6d017be834bfe7628ffa2b341eb82c11c --- M src/libmsc/gsm_04_08.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 79488cd..280c341 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -916,8 +916,8 @@ data_len = msgb_l3len(msg) - (data - (uint8_t*)msgb_l3(msg)); if (data_len < 3) { - LOG_MSC_A_CAT(msc_a, DMM, LOGL_ERROR, "MM AUTHENTICATION RESPONSE: l3 length invalid: %u\n", - msgb_l3len(msg)); + LOG_MSC_A_CAT(msc_a, DMM, LOGL_ERROR, "MM AUTHENTICATION RESPONSE: " + "message length=%u is too short\n", data_len); return -EINVAL; } -- To view, visit https://gerrit.osmocom.org/13906 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I2bfebce6d017be834bfe7628ffa2b341eb82c11c Gerrit-Change-Number: 13906 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:35:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:35:19 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_08.c: refactor CM Service Request parsing In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13907 ) Change subject: libmsc/gsm_04_08.c: refactor CM Service Request parsing ...................................................................... libmsc/gsm_04_08.c: refactor CM Service Request parsing In gsm48_rx_mm_serv_req() we need to make sure that a given message buffer is large enough to contain both 'gsm48_hdr' and 'gsm48_service_request' structures. Comparing msg->data_len with size of pointer if wrong because: - we actually need to compare with size of struct(s), - we need msgb_l3len(), not length of the whole buffer. Moreover, since we have to use the pointer arithmetics in order to keep backwards compatibility with Phase1 phones, we also need to check the length of both Classmark2 and MI IEs. Change-Id: I6e7454d7a6f63fd5a0e12fb90d8c58688da0951e --- M src/libmsc/gsm_04_08.c 1 file changed, 38 insertions(+), 19 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 280c341..418ee2a 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -700,28 +700,47 @@ int gsm48_rx_mm_serv_req(struct msc_a *msc_a, struct msgb *msg) { struct gsm_network *net = msc_a_net(msc_a); - uint8_t mi_type; - struct gsm48_hdr *gh = msgb_l3(msg); - struct gsm48_service_request *req = - (struct gsm48_service_request *)gh->data; - /* unfortunately in Phase1 the classmark2 length is variable */ - uint8_t classmark2_len = gh->data[1]; - uint8_t *classmark2_buf = gh->data+2; - struct gsm48_classmark2 *cm2 = (void*)classmark2_buf; - uint8_t *mi_p = classmark2_buf + classmark2_len; - uint8_t mi_len = *mi_p; - uint8_t *mi = mi_p + 1; + struct gsm48_hdr *gh; + struct gsm48_service_request *req; + struct gsm48_classmark2 *cm2; + uint8_t *cm2_buf, cm2_len; + uint8_t *mi_buf, mi_len; + uint8_t *mi, mi_type; bool is_utran; struct vlr_subscr *vsub; - if (msg->data_len < sizeof(struct gsm48_service_request*)) { + /* Make sure that both header and CM Service Request fit into the buffer */ + if (msgb_l3len(msg) < sizeof(*gh) + sizeof(*req)) { LOG_MSC_A(msc_a, LOGL_ERROR, "Rx CM SERVICE REQUEST: wrong message size (%u < %zu)\n", - msg->data_len, sizeof(struct gsm48_service_request*)); + msgb_l3len(msg), sizeof(*gh) + sizeof(*req)); return msc_gsm48_tx_mm_serv_rej(msc_a, GSM48_REJECT_INCORRECT_MESSAGE); } - if (msg->data_len < req->mi_len + 6) { - LOG_MSC_A(msc_a, LOGL_ERROR, "Rx CM SERVICE REQUEST: message does not fit in packet\n"); + gh = (struct gsm48_hdr *) msgb_l3(msg); + req = (struct gsm48_service_request *) gh->data; + + /* Unfortunately in Phase1 the Classmark2 length is variable, so we cannot + * just use gsm48_service_request struct, and need to parse it manually. */ + cm2_len = gh->data[1]; + cm2_buf = gh->data + 2; + cm2 = (struct gsm48_classmark2 *) cm2_buf; + + /* Prevent buffer overrun: check the length of Classmark2 */ + if (cm2_buf + cm2_len > msg->tail) { + LOG_MSC_A(msc_a, LOGL_ERROR, "Rx CM SERVICE REQUEST: Classmark2 " + "length=%u is too big\n", cm2_len); + return msc_gsm48_tx_mm_serv_rej(msc_a, GSM48_REJECT_INCORRECT_MESSAGE); + } + + /* MI (Mobile Identity) LV follows the Classmark2 */ + mi_buf = cm2_buf + cm2_len; + mi_len = mi_buf[0]; + mi = mi_buf + 1; + + /* Prevent buffer overrun: check the length of MI */ + if (mi_buf + mi_len > msg->tail) { + LOG_MSC_A(msc_a, LOGL_ERROR, "Rx CM SERVICE REQUEST: Mobile Identity " + "length=%u is too big\n", cm2_len); return msc_gsm48_tx_mm_serv_rej(msc_a, GSM48_REJECT_INCORRECT_MESSAGE); } @@ -759,9 +778,9 @@ return msc_gsm48_tx_mm_serv_rej(msc_a, GSM48_REJECT_SRV_OPT_NOT_SUPPORTED); if (msc_a_is_accepted(msc_a)) - return cm_serv_reuse_conn(msc_a, mi_p, req->cm_service_type); + return cm_serv_reuse_conn(msc_a, mi_buf, req->cm_service_type); - osmo_signal_dispatch(SS_SUBSCR, S_SUBSCR_IDENTITY, mi_p); + osmo_signal_dispatch(SS_SUBSCR, S_SUBSCR_IDENTITY, mi_buf); msc_a_get(msc_a, msc_a_cm_service_type_to_use(req->cm_service_type)); @@ -775,7 +794,7 @@ is_utran || net->authentication_required, is_utran || net->a5_encryption_mask > 0x01, req->cipher_key_seq, - osmo_gsm48_classmark2_is_r99(cm2, classmark2_len), + osmo_gsm48_classmark2_is_r99(cm2, cm2_len), is_utran); /* From vlr_proc_acc_req() we expect an implicit dispatch of PR_ARQ_E_START we expect @@ -787,7 +806,7 @@ } vsub->classmark.classmark2 = *cm2; - vsub->classmark.classmark2_len = classmark2_len; + vsub->classmark.classmark2_len = cm2_len; return 0; } -- To view, visit https://gerrit.osmocom.org/13907 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I6e7454d7a6f63fd5a0e12fb90d8c58688da0951e Gerrit-Change-Number: 13907 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:35:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:35:19 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_08.c: clarify IMEI rejection in gsm48_rx_mm_serv_req() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13944 ) Change subject: libmsc/gsm_04_08.c: clarify IMEI rejection in gsm48_rx_mm_serv_req() ...................................................................... libmsc/gsm_04_08.c: clarify IMEI rejection in gsm48_rx_mm_serv_req() Change-Id: I65277aee1f52a8b4fd4b970e992482bbadd94d39 --- M src/libmsc/gsm_04_08.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 418ee2a..68b12c0 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -765,7 +765,8 @@ case GSM_MI_TYPE_IMEI: if (req->cm_service_type == GSM48_CMSERV_EMERGENCY) { /* We don't do emergency calls by IMEI */ - LOG_MSC_A(msc_a, LOGL_NOTICE, "Tx CM SERVICE REQUEST REJECT\n"); + LOG_MSC_A(msc_a, LOGL_NOTICE, "Tx CM SERVICE REQUEST REJECT: " + "emergency services by IMEI are not supported\n"); return msc_gsm48_tx_mm_serv_rej(msc_a, GSM48_REJECT_IMEI_NOT_ACCEPTED); } /* fall-through for non-emergency setup */ -- To view, visit https://gerrit.osmocom.org/13944 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I65277aee1f52a8b4fd4b970e992482bbadd94d39 Gerrit-Change-Number: 13944 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:35:40 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:35:40 +0000 Subject: Change in osmo-sgsn[master]: Fix IMSI padding in imsi-acl In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/11838 ) Change subject: Fix IMSI padding in imsi-acl ...................................................................... Fix IMSI padding in imsi-acl In I73fd54ad3a4ab8be5aff0fee5c722597ad766e9d incorrect fix was added which only initialize first element of array. Fix this by using explicit index to initialize entire array. Change-Id: I26e4aa44f159d1b5b91dda4a586fd4e809711245 --- M src/gprs/sgsn_vty.c 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c index 0147b85..c01de3b 100644 --- a/src/gprs/sgsn_vty.c +++ b/src/gprs/sgsn_vty.c @@ -636,12 +636,15 @@ "Remove IMSI from ACL\n" "IMSI of subscriber\n") { - char imsi_sanitized[GSM23003_IMSI_MAX_DIGITS + 1] = { '0' }; + char imsi_sanitized[GSM23003_IMSI_MAX_DIGITS + 1]; const char *op = argv[0]; const char *imsi = imsi_sanitized; size_t len = strnlen(argv[1], GSM23003_IMSI_MAX_DIGITS + 1); int rc; + memset(imsi_sanitized, '0', GSM23003_IMSI_MAX_DIGITS); + imsi_sanitized[GSM23003_IMSI_MAX_DIGITS] = '\0'; + /* Sanitize IMSI */ if (len > GSM23003_IMSI_MAX_DIGITS) { vty_out(vty, "%% IMSI (%s) too long (max %u digits) -- ignored!%s", -- To view, visit https://gerrit.osmocom.org/11838 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I26e4aa44f159d1b5b91dda4a586fd4e809711245 Gerrit-Change-Number: 11838 Gerrit-PatchSet: 3 Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:36:00 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:36:00 +0000 Subject: Change in osmo-gsm-tester[master]: virtual: Make it possible to add tests to the ms driver In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13826 ) Change subject: virtual: Make it possible to add tests to the ms driver ...................................................................... virtual: Make it possible to add tests to the ms driver Introduce an Executor that forwards all testcase related methods to a list of testcases. Allow to instantiate them by name and use the result to access the statistics. Change-Id: Ia65ee53987e92b24e6b8c40e1376bc74dc260180 --- M src/osmo_gsm_tester/ms_driver.py M src/osmo_ms_driver/test_support.py M suites/nitb_netreg_mass/register_default_mass.py 3 files changed, 82 insertions(+), 33 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/osmo_gsm_tester/ms_driver.py b/src/osmo_gsm_tester/ms_driver.py index dddedf7..0b2bd98 100644 --- a/src/osmo_gsm_tester/ms_driver.py +++ b/src/osmo_gsm_tester/ms_driver.py @@ -22,6 +22,7 @@ from osmo_ms_driver.simple_loop import SimpleLoop from osmo_ms_driver.location_update_test import MassUpdateLocationTest from osmo_ms_driver.starter import BinaryOptions, MobileTestStarter +from osmo_ms_driver.test_support import TestExecutor import os.path import shutil @@ -39,14 +40,20 @@ self._test_duration = timedelta(seconds=120) self._cdf = cdfs["ease_in_out"](self._time_start, self._time_step) self._loop = SimpleLoop() - self._test_case = None + self._executor = TestExecutor() self.event_server_sk_tmp_dir = None self._subscribers = [] self._configured = False + self._results = {} - if len(self.event_server_path().encode()) > 107: + # Set-up and start the event server + event_server_path = self.event_server_path() + if len(event_server_path.encode()) > 107: raise log.Error('Path for event_server socket is longer than max allowed len for unix socket path (107):', self.event_server_path()) + self._ev_server = EventServer("ev_server", event_server_path) + self._ev_server.listen(self._loop) + def event_server_path(self): if self.event_server_sk_tmp_dir is None: self.event_server_sk_tmp_dir = tempfile.mkdtemp('', 'ogteventserversk') @@ -83,27 +90,39 @@ """Adds a subscriber to the list of subscribers.""" self._subscribers.append(subscriber) + def add_test(self, test_name, **kwargs): + """ + Instantiates and returns a test for the given name. + + The instance created and added will be returned. + """ + if test_name == 'ul_test': + test = MassUpdateLocationTest("mass", + self._ev_server, self._results) + + # Verify that a test was instantiated. + if test_name is None: + raise log.Error("Unknown test_name: " + test_name) + + # Add it to the executor and return it. + self._executor.add_test(test) + return test + def configure(self): """ Configures the subscribers, tests and registration server. Needs to be called after the complete configuration of this driver. """ - event_server_path = self.event_server_path() - - self._ev_server = EventServer("ev_server", event_server_path) - self._ev_server.listen(self._loop) - self._results = {} options = self.build_binary_options() self._starter = MobileTestStarter("mass", options, self._cdf, self._ev_server, util.Dir(self.event_server_sk_tmp_dir), self._results, suite_run=self._suite_run) - self._test_case = MassUpdateLocationTest("mass", self._ev_server, self._results) for sub in self._subscribers: self._starter.subscriber_add(sub) - self._test_case.configure(len(self._subscribers)) + self._executor.configure(len(self._subscribers)) self._configured = True def run_test(self): @@ -114,34 +133,16 @@ """ if not self._configured: self.configure() - self._test_case.before_start() + self._executor.before_start() deadline = self._starter.start_all(self._loop, self._test_duration) - self._test_case.after_start() - self._test_case.wait_for_test(self._loop, deadline) + self._executor.after_start() + self._executor.wait_for_test(self._loop, deadline) def print_stats(self): """ Prints statistics about the test run. """ - self._test_case.print_stats() - - def get_stats(self): - """ - Returns a statistical summary of the test. - """ - return self._test_case.get_stats() - - def get_result_values(self): - """ - Returns the raw result values of the test run in any order. - """ - return self._test_case.get_result_values() - - def lus_less_than(self, acceptable_delay): - """ - Returns the results that completed their LU within the acceptable delay. - """ - return self._test_case.lus_less_than(acceptable_delay) + self._executor.print_stats() def cleanup(self): """ diff --git a/src/osmo_ms_driver/test_support.py b/src/osmo_ms_driver/test_support.py index cbfd444..f7910dd 100644 --- a/src/osmo_ms_driver/test_support.py +++ b/src/osmo_ms_driver/test_support.py @@ -18,6 +18,8 @@ from abc import ABCMeta from osmo_gsm_tester import log +import time + def imsi_ki_gen(): """ Generate IMSIs and KIs to be used by test. @@ -93,3 +95,48 @@ def print_stats(self): """Prints statistics/results of the test.""" pass + + +class TestExecutor(log.Origin): + """Execute/Wait for a list of tests to complete.""" + + def __init__(self): + super().__init__(log.C_RUN, "executor") + self._tests = [] + + def add_test(self, test): + self._tests.append(test) + + def configure(self, num_subscriber): + for test in self._tests: + test.configure(num_subscriber) + + def before_start(self): + for test in self._tests: + test.before_start() + + def after_start(self): + for test in self._tests: + test.after_start() + + def print_stats(self): + """Prints statistics/results of the test.""" + for test in self._tests: + test.print_stats() + + def all_tests_completed(self): + """Returns true if all tests completed.""" + for test in self._tests: + if not test.has_completed(): + return False + return True + + def wait_for_test(self, loop, deadline): + """Waits up to the absolute deadline for all tests to complete.""" + while not self.all_tests_completed(): + now_time = time.clock_gettime(time.CLOCK_MONOTONIC) + sleep_time = deadline - now_time + if sleep_time < 0: + break + loop.schedule_timeout(sleep_time) + loop.select() diff --git a/suites/nitb_netreg_mass/register_default_mass.py b/suites/nitb_netreg_mass/register_default_mass.py index f4e5e80..262b271 100644 --- a/suites/nitb_netreg_mass/register_default_mass.py +++ b/suites/nitb_netreg_mass/register_default_mass.py @@ -10,6 +10,7 @@ nitb = suite.nitb() bts = suite.bts() ms_driver = suite.ms_driver() +ul = ms_driver.add_test('ul_test') modems = suite.all_resources(suite.modem) print('Launching a simple network') @@ -35,7 +36,7 @@ # # 99% of LUs should complete # 99% of successful LUs should complete within 10s. -stats = ms_driver.get_stats() +stats = ul.get_stats() if len(modems) > 0 and stats.num_completed < 1: raise Exception("No run completed.") completion_ratio = stats.num_completed / stats.num_attempted @@ -46,7 +47,7 @@ # Check how many results are below our threshold. acceptable_delay = timedelta(seconds=30) -quick_enough = len(ms_driver.lus_less_than(acceptable_delay)) +quick_enough = len(ul.lus_less_than(acceptable_delay)) latency_ratio = quick_enough / stats.num_attempted if latency_ratio < 0.99: raise Exception("Latency ratio of %f%% lower than threshold." % (latency_ratio * 100.0)) -- To view, visit https://gerrit.osmocom.org/13826 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ia65ee53987e92b24e6b8c40e1376bc74dc260180 Gerrit-Change-Number: 13826 Gerrit-PatchSet: 3 Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:36:01 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 10:36:01 +0000 Subject: Change in osmo-gsm-tester[master]: virtual: Make mass tests be able to activate themselves In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13827 ) Change subject: virtual: Make mass tests be able to activate themselves ...................................................................... virtual: Make mass tests be able to activate themselves We will need to enable/disable generation of lua script code depending on the subscriber and mass test. Change-Id: Ide4d788543d910356efe9f61e789b3975f7bc558 --- M src/osmo_gsm_tester/ms_driver.py M src/osmo_ms_driver/__main__.py M src/osmo_ms_driver/location_update_test.py M src/osmo_ms_driver/starter.py M src/osmo_ms_driver/test_support.py 5 files changed, 42 insertions(+), 18 deletions(-) Approvals: Jenkins Builder: Verified Pau Espin Pedrol: Looks good to me, approved diff --git a/src/osmo_gsm_tester/ms_driver.py b/src/osmo_gsm_tester/ms_driver.py index 0b2bd98..f1334fc 100644 --- a/src/osmo_gsm_tester/ms_driver.py +++ b/src/osmo_gsm_tester/ms_driver.py @@ -122,7 +122,8 @@ for sub in self._subscribers: self._starter.subscriber_add(sub) - self._executor.configure(len(self._subscribers)) + self._starter.configure_tasks() + self._executor.configure(self._subscribers, self._starter.mobiles()) self._configured = True def run_test(self): diff --git a/src/osmo_ms_driver/__main__.py b/src/osmo_ms_driver/__main__.py index c3da49d..a752c37 100644 --- a/src/osmo_ms_driver/__main__.py +++ b/src/osmo_ms_driver/__main__.py @@ -98,8 +98,10 @@ 'imsi': imsi, 'ki': ki, 'auth_algo': 'comp128v1', + 'run_lu_test': False, } starter.subscriber_add(ms_osmo_mobile.MSOsmoMobile("ms_%d" % i, conf)) + starter.configure_tasks() test.configure(args.num_ms) atexit.register(starter.stop_all) diff --git a/src/osmo_ms_driver/location_update_test.py b/src/osmo_ms_driver/location_update_test.py index 1a33f09..d0d572d 100644 --- a/src/osmo_ms_driver/location_update_test.py +++ b/src/osmo_ms_driver/location_update_test.py @@ -60,9 +60,13 @@ super().__init__(name, event_server, results) self._event_server.register(self.handle_msg) - def configure(self, num_subscribers): - self._num_subscribers = num_subscribers - self._outstanding = num_subscribers + def configure(self, subscribers, mobiles): + # Enable the LU test script in each mobile + for mobile in mobiles: + mobile.set_cfg_item('run_lu_test', True) + + self._num_subscribers = len(subscribers) + self._outstanding = self._num_subscribers def handle_msg(self, _data, addr, time): data = json.loads(_data.decode()) diff --git a/src/osmo_ms_driver/starter.py b/src/osmo_ms_driver/starter.py index 61d3bb0..2ae423d 100644 --- a/src/osmo_ms_driver/starter.py +++ b/src/osmo_ms_driver/starter.py @@ -85,23 +85,32 @@ self._ki = subscriber.ki() self._omob_proc = None + lua_support = os.path.join(os.path.dirname(__file__), 'lua') + self._cfg = { + 'test': { + 'event_path': self._ev_server_path, + 'lua_support': lua_support, + } + } + def imsi(self): return self._imsi def ki(self): return self._ki + def set_cfg_item(self, key, value): + """ + Sets `key` to `value` inside the test dictionary. + + Used by testcases to pass per MS settings into the lua script + generator. + """ + self._cfg['test'][key] = value + def write_lua_cfg(self): - lua_support = os.path.join(os.path.dirname(__file__), 'lua') - cfg = { - 'test': { - 'event_path': self._ev_server_path, - 'lua_support': lua_support, - 'run_lu_test': True, - } - } lua_cfg_file = os.path.join(self._tmp_dir, "lua_" + self._name_number + ".lua") - lua_script = template.render(self._lua_template, cfg) + lua_script = template.render(self._lua_template, self._cfg) with open(lua_cfg_file, 'w') as w: w.write(lua_script) return lua_cfg_file @@ -220,7 +229,6 @@ def prepare(self, loop): self.log("Starting testcase") - self.configure_tasks() self.pre_launch(loop) self._start_time = time.clock_gettime(time.CLOCK_MONOTONIC) @@ -296,3 +304,7 @@ ms.set_start_time(time) launch_delay = ms.start_time() - ms.launch_time() self.log("MS start registered ", ms=ms, at=time, delay=launch_delay) + + def mobiles(self): + """Returns the list of mobiles configured.""" + return self._mobiles diff --git a/src/osmo_ms_driver/test_support.py b/src/osmo_ms_driver/test_support.py index f7910dd..ce3f5f1 100644 --- a/src/osmo_ms_driver/test_support.py +++ b/src/osmo_ms_driver/test_support.py @@ -76,8 +76,13 @@ self._event_server = event_server self._results = results - def configure(self, num_subscribers): - """Configures the test given the (number) of subscribers.""" + def configure(self, subscribers, mobiles): + """ + Configures the test given the subscribers. + + The subscriber at index _i_ belongs to the mobile at the + same index. subscribers[i] == mobiles[i].subscriber(). + """ pass def before_start(self): @@ -107,9 +112,9 @@ def add_test(self, test): self._tests.append(test) - def configure(self, num_subscriber): + def configure(self, subscribers, mobiles): for test in self._tests: - test.configure(num_subscriber) + test.configure(subscribers, mobiles) def before_start(self): for test in self._tests: -- To view, visit https://gerrit.osmocom.org/13827 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ide4d788543d910356efe9f61e789b3975f7bc558 Gerrit-Change-Number: 13827 Gerrit-PatchSet: 7 Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:43:31 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 12 May 2019 10:43:31 +0000 Subject: Change in libosmo-sccp[master]: osmo-stp: refactor handling of both SIGINT and SIGTERM In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13971 ) Change subject: osmo-stp: refactor handling of both SIGINT and SIGTERM ...................................................................... Patch Set 1: > actually, that won't work. [...] your sleep here won't help. Well, let's first clarify that it's not my sleep() - I just moved it from signal_handler(), together with osmo_signal_dispatch(). This sleep() was also looking confusing to me, since we also do this in OsmoMSC (https://git.osmocom.org/osmo-msc/tree/src/osmo-msc/msc_main.c#n748) and OsmoBSC (https://git.osmocom.org/osmo-bsc/tree/src/osmo-bsc/osmo_bsc_main.c#n638). In this patch I just wanted to facilitate printing both root and NULL talloc contexts on exit (see next change). Not sure, if I have time to work on graceful shutdown. I think we need to create an issue, and generalize this process somehow for all projects... -- To view, visit https://gerrit.osmocom.org/13971 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5d8618857c5119d4acca5d65cf1276ab02889c84 Gerrit-Change-Number: 13971 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 12 May 2019 10:43:31 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 10:48:37 2019 From: gerrit-no-reply at lists.osmocom.org (tnt) Date: Sun, 12 May 2019 10:48:37 +0000 Subject: Change in osmo-trx[master]: transceiver: RSSI was calculated reverse. In-Reply-To: References: Message-ID: tnt has posted comments on this change. ( https://gerrit.osmocom.org/9598 ) Change subject: transceiver: RSSI was calculated reverse. ...................................................................... Patch Set 2: Code-Review-2 Spec for TRX interface specifies it as being reverse logic -- To view, visit https://gerrit.osmocom.org/9598 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iaa4eda4660dbe155ac1c782b77316ef504ef00c5 Gerrit-Change-Number: 9598 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Assignee: tnt Gerrit-Reviewer: Alexander Chemeris Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Sun, 12 May 2019 10:48:37 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 11:25:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 11:25:53 +0000 Subject: Change in osmo-trx[master]: transceiver: RSSI was calculated reverse. In-Reply-To: References: Message-ID: Harald Welte has abandoned this change. ( https://gerrit.osmocom.org/9598 ) Change subject: transceiver: RSSI was calculated reverse. ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/9598 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: Iaa4eda4660dbe155ac1c782b77316ef504ef00c5 Gerrit-Change-Number: 9598 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Assignee: tnt Gerrit-Reviewer: Alexander Chemeris Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 11:36:20 2019 From: gerrit-no-reply at lists.osmocom.org (tnt) Date: Sun, 12 May 2019 11:36:20 +0000 Subject: Change in osmo-msc[master]: libmsc: Make sure to not dereference a NULL trans In-Reply-To: References: Message-ID: tnt has abandoned this change. ( https://gerrit.osmocom.org/13963 ) Change subject: libmsc: Make sure to not dereference a NULL trans ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/13963 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: Ia14bd28e1db570c487ad8e90e29a69208e2226f2 Gerrit-Change-Number: 13963 Gerrit-PatchSet: 2 Gerrit-Owner: tnt Gerrit-Assignee: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: tnt Gerrit-CC: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 13:44:19 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sun, 12 May 2019 13:44:19 +0000 Subject: Change in osmo-msc[master]: remove msc specific db counters In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Daniel Willmann, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13800 to look at the new patch set (#3). Change subject: remove msc specific db counters ...................................................................... remove msc specific db counters DB counters has been used to save osmo_counters & osmo_rate_ctr to a local sqlite databases every 60 seconds. This is quite slow e.g. 1000 subscriber might slow the msc down. Change-Id: Id64f1839a55b5326f74ec04b7a5dbed9d269b89c --- M doc/manuals/chapters/running.adoc M include/osmocom/msc/db.h M src/libmsc/db.c M src/osmo-msc/msc_main.c 4 files changed, 4 insertions(+), 94 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/00/13800/3 -- To view, visit https://gerrit.osmocom.org/13800 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id64f1839a55b5326f74ec04b7a5dbed9d269b89c Gerrit-Change-Number: 13800 Gerrit-PatchSet: 3 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 15:48:51 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 12 May 2019 15:48:51 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_11_gsup.c: cosmetic: drop useless variable In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/14002 ) Change subject: libmsc/gsm_04_11_gsup.c: cosmetic: drop useless variable ...................................................................... libmsc/gsm_04_11_gsup.c: cosmetic: drop useless variable Change-Id: I102e1bd0f8365e77bbc9203158909aad8dcf214b --- M src/libmsc/gsm_04_11_gsup.c 1 file changed, 1 insertion(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/gsm_04_11_gsup.c b/src/libmsc/gsm_04_11_gsup.c index 30f1871..9f5175b 100644 --- a/src/libmsc/gsm_04_11_gsup.c +++ b/src/libmsc/gsm_04_11_gsup.c @@ -233,13 +233,11 @@ static int gsm411_gsup_mt_handler(struct vlr_subscr *vsub, const struct osmo_gsup_message *gsup_msg) { - struct vlr_instance *vlr; struct gsm_network *net; int rc; /* Obtain required pointers */ - vlr = vsub->vlr; - net = (struct gsm_network *) vlr->user_ctx; + net = (struct gsm_network *) vsub->vlr->user_ctx; /* Associate logging messages with this subscriber */ log_set_context(LOG_CTX_VLR_SUBSCR, vsub); -- To view, visit https://gerrit.osmocom.org/14002 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I102e1bd0f8365e77bbc9203158909aad8dcf214b Gerrit-Change-Number: 14002 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 15:53:57 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 12 May 2019 15:53:57 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_11.c: properly handle MMTS indication In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/12059 ) Change subject: libmsc/gsm_04_11.c: properly handle MMTS indication ...................................................................... Patch Set 10: Verified+1 Makes MSC_Tests.TC_gsup_mt_multi_part_sms pass. -- To view, visit https://gerrit.osmocom.org/12059 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic46b04913b2e8cc5d11a39426dcc1bfe11f1d31e Gerrit-Change-Number: 12059 Gerrit-PatchSet: 10 Gerrit-Owner: Vadim Yanitskiy Gerrit-Assignee: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 12 May 2019 15:53:57 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 18:10:04 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 12 May 2019 18:10:04 +0000 Subject: Change in osmocom-bb[master]: firmware/Makefile.inc: allow overlapping sections Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14006 Change subject: firmware/Makefile.inc: allow overlapping sections ...................................................................... firmware/Makefile.inc: allow overlapping sections The entire point of our linker scripts is to produce overlapping segments/mappings/addresses. They are essential and required. Starting from [1], not only LMA but also VMA areas are now checked for overlaps (see also [2]). This results into linking errors: arm-none-eabi-ld: section .text.exceptions VMA [000000000080001c,0000000000800037] overlaps section .compal.reservedram VMA [0000000000800000,00000000008000fe] arm-none-eabi-ld: section .text.exceptions VMA [000000000080001c,0000000000800037] overlaps section .compal.loader VMA [0000000000800000,00000000008000ff] Let's tell the linker that the overlaps are expected using its command line option '--no-check-sections'. [1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a87dd97a2098b7e18ff2574a4e81ae521ef7e6f2 [2] https://sourceware.org/bugzilla/show_bug.cgi?id=18452 Change-Id: I098ddd33aabd7ec27981e2f09d8582f167bb649b Fixes: OS#1917 --- M src/target/firmware/Makefile.inc 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/06/14006/1 diff --git a/src/target/firmware/Makefile.inc b/src/target/firmware/Makefile.inc index 9049898..544143d 100644 --- a/src/target/firmware/Makefile.inc +++ b/src/target/firmware/Makefile.inc @@ -22,7 +22,7 @@ #ASFLAGS=--g$(DEBUGF) $(INCLUDES) -D__ASSEMBLY__ ASFLAGS=$(INCLUDES) -D__ASSEMBLY__ -LDFLAGS = -nostartfiles -nostdlib -nodefaultlibs --gc-sections --cref +LDFLAGS = -nostartfiles -nostdlib -nodefaultlibs --gc-sections --no-check-sections --cref #### QUIET OUTPUT #### -- To view, visit https://gerrit.osmocom.org/14006 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I098ddd33aabd7ec27981e2f09d8582f167bb649b Gerrit-Change-Number: 14006 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 18:10:04 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 12 May 2019 18:10:04 +0000 Subject: Change in osmocom-bb[master]: firmware/Makefile: clarify toolchain configuration include Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14007 Change subject: firmware/Makefile: clarify toolchain configuration include ...................................................................... firmware/Makefile: clarify toolchain configuration include Change-Id: I77ce68d5904ff623f10f6475309052666bab7742 --- M src/target/firmware/Makefile 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/07/14007/1 diff --git a/src/target/firmware/Makefile b/src/target/firmware/Makefile index 914db6c..2f44a20 100644 --- a/src/target/firmware/Makefile +++ b/src/target/firmware/Makefile @@ -127,7 +127,7 @@ -include tiffs/Makefile -include lib/Makefile -# Include rules +# Include toolchain configuration -include Makefile.inc -- To view, visit https://gerrit.osmocom.org/14007 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I77ce68d5904ff623f10f6475309052666bab7742 Gerrit-Change-Number: 14007 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 18:10:05 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 12 May 2019 18:10:05 +0000 Subject: Change in osmocom-bb[master]: target/toolchain: initial import of the build script Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14008 Change subject: target/toolchain: initial import of the build script ...................................................................... target/toolchain: initial import of the build script Change-Id: Ia3544bb9eb9276762e17e3780272610d5dba15c4 --- A src/target/toolchain/gnu-arm-build.3.sh 1 file changed, 169 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/08/14008/1 diff --git a/src/target/toolchain/gnu-arm-build.3.sh b/src/target/toolchain/gnu-arm-build.3.sh new file mode 100755 index 0000000..39bdc85 --- /dev/null +++ b/src/target/toolchain/gnu-arm-build.3.sh @@ -0,0 +1,169 @@ +#!/bin/sh + +ROOT=`pwd` +SRCDIR=$ROOT/src +BUILDDIR=$ROOT/build +PREFIX=$ROOT/install + +GCC_SRC=gcc-4.8.2.tar.bz2 +GCC_VERSION=4.8.2 +GCC_DIR=gcc-$GCC_VERSION + +BINUTILS_SRC=binutils-2.21.1a.tar.bz2 +BINUTILS_VERSION=2.21.1 +BINUTILS_DIR=binutils-$BINUTILS_VERSION + +NEWLIB_SRC=newlib-1.19.0.tar.gz +NEWLIB_VERSION=1.19.0 +NEWLIB_DIR=newlib-$NEWLIB_VERSION + +TARGET_TRIPLET=arm-none-eabi + +#INSIGHT_SRC=insight-6.8-1.tar.bz2 +#INSIGHT_VERSION=6.8-1 +#INSIGHT_DIR=insight-$INSIGHT_VERSION + +echo "I will build an $TARGET_TRIPLET cross-compiler: + + Prefix: $PREFIX + Sources: $SRCDIR + Build files: $BUILDDIR + +Press ^C now if you do NOT want to do this." +read IGNORE + +# +# Helper functions. +# +unpack_source() +{ +( + cd $SRCDIR + ARCHIVE_SUFFIX=${1##*.} + if [ "$ARCHIVE_SUFFIX" = "gz" ]; then + tar zxvf $1 + elif [ "$ARCHIVE_SUFFIX" = "bz2" ]; then + tar jxvf $1 + else + echo "Unknown archive format for $1" + exit 1 + fi +) +} + +# Create all the directories we need. +#mkdir -p $SRCDIR $BUILDDIR $PREFIX + +( +cd $SRCDIR + +# Unpack the sources. +unpack_source $(basename $GCC_SRC) +unpack_source $(basename $BINUTILS_SRC) +unpack_source $(basename $NEWLIB_SRC) +#unpack_source $(basename $INSIGHT_SRC) +) + +# Set the PATH to include the binaries we're going to build. +OLD_PATH=$PATH +export PATH=$PREFIX/bin:$PATH + +# +# Stage 1: Build binutils +# +( +( +# autoconf check. +cd $SRCDIR/$BINUTILS_DIR + +) || exit 1 + +# Now, build it. +mkdir -p $BUILDDIR/$BINUTILS_DIR +cd $BUILDDIR/$BINUTILS_DIR + +$SRCDIR/$BINUTILS_DIR/configure --target=$TARGET_TRIPLET --prefix=$PREFIX \ + --enable-interwork --enable-threads=posix --enable-multilib --with-float=soft --disable-werror \ + && make all install + +) || exit 1 + +# +# Stage 2: Patch the GCC multilib rules, then build the gcc compiler only +# +( +MULTILIB_CONFIG=$SRCDIR/$GCC_DIR/gcc/config/arm/t-$TARGET_TRIPLET + +echo " + +MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork +MULTILIB_DIRNAMES += normal interwork + +" >> $MULTILIB_CONFIG + +mkdir -p $BUILDDIR/$GCC_DIR +cd $BUILDDIR/$GCC_DIR + +$SRCDIR/$GCC_DIR/configure --target=$TARGET_TRIPLET --prefix=$PREFIX \ + --enable-interwork --enable-multilib --with-float=soft --disable-werror \ + --enable-languages="c,c++" --with-newlib \ + --with-headers=$SRCDIR/$NEWLIB_DIR/newlib/libc/include \ + --with-system-zlib --disable-shared \ + && make all-gcc install-gcc + +) || exit 1 + +# +# Stage 3: Build and install newlib +# +( +( +# Same issue, we have to patch to support makeinfo >= 4.11. +cd $SRCDIR/$NEWLIB_DIR + +) || exit 1 + +# And now we can build it. +mkdir -p $BUILDDIR/$NEWLIB_DIR +cd $BUILDDIR/$NEWLIB_DIR + +$SRCDIR/$NEWLIB_DIR/configure --target=$TARGET_TRIPLET --prefix=$PREFIX \ + --enable-interwork --enable-multilib --with-float=soft --disable-werror \ + && make all install + +) || exit 1 + +# +# Stage 4: Build and install the rest of GCC. +# +( +cd $BUILDDIR/$GCC_DIR + +make all install + +) || exit 1 + +# +# Stage 5: Build and install INSIGHT. +# +# edit: we currently don't need that for OsmocomBB + +#( +# Now, build it. +#mkdir -p $BUILDDIR/$INSIGHT_DIR + +#cd $BUILDDIR/$INSIGHT_DIR + +#$SRCDIR/$INSIGHT_DIR/configure --target=$TARGET_TRIPLET --prefix=$PREFIX \ +# --enable-interwork --enable-multilib --with-float=soft --disable-werror \ +# && make all install + +#) || exit 1 + + +export PATH=$OLD_PATH + +echo " +Build complete! Add $PREFIX/bin to your PATH to make $TARGET_TRIPLET-gcc and friends +accessible directly. +" -- To view, visit https://gerrit.osmocom.org/14008 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ia3544bb9eb9276762e17e3780272610d5dba15c4 Gerrit-Change-Number: 14008 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 19:34:58 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 12 May 2019 19:34:58 +0000 Subject: Change in osmocom-bb[master]: firmware/Makefile.inc: fix sections with overlapping VMA In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14006 ) Change subject: firmware/Makefile.inc: fix sections with overlapping VMA ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/14006 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I098ddd33aabd7ec27981e2f09d8582f167bb649b Gerrit-Change-Number: 14006 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 12 May 2019 19:34:58 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 19:41:19 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 12 May 2019 19:41:19 +0000 Subject: Change in osmocom-bb[master]: firmware/Makefile.inc: fix sections with overlapping VMA In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14006 ) Change subject: firmware/Makefile.inc: fix sections with overlapping VMA ...................................................................... Patch Set 2: Verified+1 Works for me. -- To view, visit https://gerrit.osmocom.org/14006 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I098ddd33aabd7ec27981e2f09d8582f167bb649b Gerrit-Change-Number: 14006 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 12 May 2019 19:41:19 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 20:04:03 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 20:04:03 +0000 Subject: Change in osmocom-bb[master]: firmware/Makefile.inc: fix sections with overlapping VMA In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14006 ) Change subject: firmware/Makefile.inc: fix sections with overlapping VMA ...................................................................... Patch Set 2: Code-Review+1 *finaly* somebody looks into this. Thanks. -- To view, visit https://gerrit.osmocom.org/14006 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I098ddd33aabd7ec27981e2f09d8582f167bb649b Gerrit-Change-Number: 14006 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 12 May 2019 20:04:03 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 12 20:04:13 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 12 May 2019 20:04:13 +0000 Subject: Change in osmocom-bb[master]: firmware/Makefile: clarify toolchain configuration include In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14007 ) Change subject: firmware/Makefile: clarify toolchain configuration include ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14007 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I77ce68d5904ff623f10f6475309052666bab7742 Gerrit-Change-Number: 14007 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 12 May 2019 20:04:13 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 06:19:48 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 13 May 2019 06:19:48 +0000 Subject: Change in osmo-msc[master]: vty: make retrieve-imeisv-early configurable In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/13892 ) Change subject: vty: make retrieve-imeisv-early configurable ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/13892 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I256224194c3b8caf2b58a88d11dccd32c569201f Gerrit-Change-Number: 13892 Gerrit-PatchSet: 4 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 13 May 2019 06:19:48 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 06:32:47 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 13 May 2019 06:32:47 +0000 Subject: Change in osmo-hlr[master]: db_hlr.c: db_subscr_create(): add flags argument In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#4) to the change originally created by Vadim Yanitskiy. ( https://gerrit.osmocom.org/13711 ) Change subject: db_hlr.c: db_subscr_create(): add flags argument ...................................................................... db_hlr.c: db_subscr_create(): add flags argument Allow creating new subscribers without giving them access to CS or PS. This will be used by the create-subscriber-on-demand feature. Related: OS#2542 Change-Id: I1a6dd85387723dab5487c53b33d2d9ec6d05d006 --- M src/db.c M src/db.h M src/db_hlr.c M src/hlr_db_tool.c M src/hlr_vty_subscr.c M tests/db/db_test.c M tests/db/db_test.err 7 files changed, 99 insertions(+), 37 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/11/13711/4 -- To view, visit https://gerrit.osmocom.org/13711 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1a6dd85387723dab5487c53b33d2d9ec6d05d006 Gerrit-Change-Number: 13711 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 06:34:23 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 13 May 2019 06:34:23 +0000 Subject: Change in osmo-hlr[master]: db_hlr.c: db_subscr_create(): add flags argument In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/13711 ) Change subject: db_hlr.c: db_subscr_create(): add flags argument ...................................................................... Patch Set 4: Thanks for all the reviews. Updated to drop _NONE and use (1 << 1) and (1 << 2). -- To view, visit https://gerrit.osmocom.org/13711 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1a6dd85387723dab5487c53b33d2d9ec6d05d006 Gerrit-Change-Number: 13711 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 13 May 2019 06:34:23 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 06:36:28 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 13 May 2019 06:36:28 +0000 Subject: Change in osmo-hlr[master]: db_hlr.c: db_subscr_create(): add flags argument In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13711 ) Change subject: db_hlr.c: db_subscr_create(): add flags argument ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13711 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1a6dd85387723dab5487c53b33d2d9ec6d05d006 Gerrit-Change-Number: 13711 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 13 May 2019 06:36:28 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 06:50:57 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 13 May 2019 06:50:57 +0000 Subject: Change in osmo-hlr[master]: db_hlr.c: db_subscr_create(): add flags argument In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/13711 ) Change subject: db_hlr.c: db_subscr_create(): add flags argument ...................................................................... Patch Set 4: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/13711/4/src/db_hlr.c File src/db_hlr.c: https://gerrit.osmocom.org/#/c/13711/4/src/db_hlr.c at 67 PS4, Line 67: if (!db_bind_int(stmt, "$nam_ps", flags & DB_SUBSCR_FLAG_NAM_PS)) I just noticed, that this leads to writing "2" in the database. I'll update the patch. -- To view, visit https://gerrit.osmocom.org/13711 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1a6dd85387723dab5487c53b33d2d9ec6d05d006 Gerrit-Change-Number: 13711 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 13 May 2019 06:50:57 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 06:58:09 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 13 May 2019 06:58:09 +0000 Subject: Change in osmo-hlr[master]: db_hlr.c: db_subscr_create(): add flags argument In-Reply-To: References: Message-ID: Vadim Yanitskiy has removed a vote on this change. Change subject: db_hlr.c: db_subscr_create(): add flags argument ...................................................................... Removed Code-Review+2 by Vadim Yanitskiy -- To view, visit https://gerrit.osmocom.org/13711 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: deleteVote Gerrit-Change-Id: I1a6dd85387723dab5487c53b33d2d9ec6d05d006 Gerrit-Change-Number: 13711 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 07:12:02 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 13 May 2019 07:12:02 +0000 Subject: Change in osmo-hlr[master]: Create subscribers on demand In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/13713 ) Change subject: Create subscribers on demand ...................................................................... Patch Set 5: (1 comment) https://gerrit.osmocom.org/#/c/13713/5/src/hlr.c File src/hlr.c: https://gerrit.osmocom.org/#/c/13713/5/src/hlr.c at 176 PS5, Line 176: while (1) { This generates an infinite loop if all the msisdns are used up, I'm not so happy with that. I'll update the patch to fix that. -- To view, visit https://gerrit.osmocom.org/13713 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd Gerrit-Change-Number: 13713 Gerrit-PatchSet: 5 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 13 May 2019 07:12:02 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 07:49:41 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 13 May 2019 07:49:41 +0000 Subject: Change in osmo-hlr[master]: db_hlr.c: db_subscr_create(): add flags argument In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#5) to the change originally created by Vadim Yanitskiy. ( https://gerrit.osmocom.org/13711 ) Change subject: db_hlr.c: db_subscr_create(): add flags argument ...................................................................... db_hlr.c: db_subscr_create(): add flags argument Allow creating new subscribers without giving them access to CS or PS. This will be used by the create-subscriber-on-demand feature. Related: OS#2542 Change-Id: I1a6dd85387723dab5487c53b33d2d9ec6d05d006 --- M src/db.c M src/db.h M src/db_hlr.c M src/hlr_db_tool.c M src/hlr_vty_subscr.c M tests/db/db_test.c M tests/db/db_test.err 7 files changed, 99 insertions(+), 37 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/11/13711/5 -- To view, visit https://gerrit.osmocom.org/13711 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1a6dd85387723dab5487c53b33d2d9ec6d05d006 Gerrit-Change-Number: 13711 Gerrit-PatchSet: 5 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 07:49:41 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 13 May 2019 07:49:41 +0000 Subject: Change in osmo-hlr[master]: Create subscribers on demand In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#6) to the change originally created by Vadim Yanitskiy. ( https://gerrit.osmocom.org/13713 ) Change subject: Create subscribers on demand ...................................................................... Create subscribers on demand Add a new vty option and allow to optionally generate a random msisdn, as well as setting the default NAM: subscriber-create-on-demand (no-extension|<3-15>) (none|cs|ps|both) Thanks to Vadim for the random MSISDN patch [1], which was squashed into this one. [1] Change-Id: I475c71f9902950fa7498855a616e1ec231fad6ac Related: OS#2542 Depends on: Idc74f4d94ad44b9fc1b6d43178f5f33d551ebfb1 (libosmocore) Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd --- M src/hlr.c M src/hlr.h M src/hlr_vty.c M tests/test_nodes.vty A tests/test_subscr_create_on_demand.vty 5 files changed, 183 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/13/13713/6 -- To view, visit https://gerrit.osmocom.org/13713 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd Gerrit-Change-Number: 13713 Gerrit-PatchSet: 6 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 07:50:33 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 13 May 2019 07:50:33 +0000 Subject: Change in osmo-hlr[master]: db_hlr.c: db_subscr_create(): add flags argument In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/13711 ) Change subject: db_hlr.c: db_subscr_create(): add flags argument ...................................................................... Patch Set 5: (1 comment) https://gerrit.osmocom.org/#/c/13711/4/src/db_hlr.c File src/db_hlr.c: https://gerrit.osmocom.org/#/c/13711/4/src/db_hlr.c at 67 PS4, Line 67: if (!db_bind_int(stmt, "$nam_ps", (flags & DB_SUBSCR_FLAG_NAM_PS) != 0)) > I just noticed, that this leads to writing "2" in the database. I'll update the patch. Done -- To view, visit https://gerrit.osmocom.org/13711 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1a6dd85387723dab5487c53b33d2d9ec6d05d006 Gerrit-Change-Number: 13711 Gerrit-PatchSet: 5 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 13 May 2019 07:50:33 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 07:53:26 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 13 May 2019 07:53:26 +0000 Subject: Change in osmo-hlr[master]: Create subscribers on demand In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/13713 ) Change subject: Create subscribers on demand ...................................................................... Patch Set 5: (1 comment) https://gerrit.osmocom.org/#/c/13713/5/src/hlr.c File src/hlr.c: https://gerrit.osmocom.org/#/c/13713/5/src/hlr.c at 176 PS5, Line 176: while (1) { > This generates an infinite loop if all the msisdns are used up, I'm not so happy with that. [?] Done. I've also moved the msisdn generation before subscriber creation. That makes it possible for users to retry (e.g. turning phone off and on again) if they had bad luck and the random MSISDNs generated were all pointing to existing entries. -- To view, visit https://gerrit.osmocom.org/13713 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd Gerrit-Change-Number: 13713 Gerrit-PatchSet: 5 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 13 May 2019 07:53:26 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 07:58:56 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 13 May 2019 07:58:56 +0000 Subject: Change in osmo-hlr[master]: db_hlr.c: db_subscr_create(): add flags argument In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13711 ) Change subject: db_hlr.c: db_subscr_create(): add flags argument ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13711 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1a6dd85387723dab5487c53b33d2d9ec6d05d006 Gerrit-Change-Number: 13711 Gerrit-PatchSet: 5 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 13 May 2019 07:58:56 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 08:12:05 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 13 May 2019 08:12:05 +0000 Subject: Change in osmo-hlr[master]: Create subscribers on demand In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13713 ) Change subject: Create subscribers on demand ...................................................................... Patch Set 6: (3 comments) https://gerrit.osmocom.org/#/c/13713/6/src/hlr.c File src/hlr.c: https://gerrit.osmocom.org/#/c/13713/6/src/hlr.c at 153 PS6, Line 153: generate_new_msisdn Let's follow the style of memcmp() here: dst, src, len. https://gerrit.osmocom.org/#/c/13713/6/src/hlr.c at 153 PS6, Line 153: { Also, please add a new line. https://gerrit.osmocom.org/#/c/13713/6/src/hlr.c at 155 PS6, Line 155: rand_buf In scope of this function, it makes sense to ASSERT() given len <= sizeof(rand_buf). I guess Coverity may fail to detect that VTY actually limits the length to 15. -- To view, visit https://gerrit.osmocom.org/13713 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd Gerrit-Change-Number: 13713 Gerrit-PatchSet: 6 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 13 May 2019 08:12:05 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 08:13:39 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 13 May 2019 08:13:39 +0000 Subject: Change in libosmocore[master]: gsm_23_003: add GSM23003_MSISDN_{MIN, MAX}_DIGITS In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13961 ) Change subject: gsm_23_003: add GSM23003_MSISDN_{MIN,MAX}_DIGITS ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13961 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Idc74f4d94ad44b9fc1b6d43178f5f33d551ebfb1 Gerrit-Change-Number: 13961 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 13 May 2019 08:13:39 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 08:24:53 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 13 May 2019 08:24:53 +0000 Subject: Change in osmo-hlr[master]: Create subscribers on demand In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#7) to the change originally created by Vadim Yanitskiy. ( https://gerrit.osmocom.org/13713 ) Change subject: Create subscribers on demand ...................................................................... Create subscribers on demand Add a new vty option and allow to optionally generate a random msisdn, as well as setting the default NAM: subscriber-create-on-demand (no-extension|<3-15>) (none|cs|ps|both) Thanks to Vadim for the random MSISDN patch [1], which was squashed into this one. [1] Change-Id: I475c71f9902950fa7498855a616e1ec231fad6ac Related: OS#2542 Depends on: Idc74f4d94ad44b9fc1b6d43178f5f33d551ebfb1 (libosmocore) Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd --- M src/hlr.c M src/hlr.h M src/hlr_vty.c M tests/test_nodes.vty A tests/test_subscr_create_on_demand.vty 5 files changed, 186 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/13/13713/7 -- To view, visit https://gerrit.osmocom.org/13713 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd Gerrit-Change-Number: 13713 Gerrit-PatchSet: 7 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 08:26:02 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 13 May 2019 08:26:02 +0000 Subject: Change in osmo-hlr[master]: Create subscribers on demand In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/13713 ) Change subject: Create subscribers on demand ...................................................................... Patch Set 6: (3 comments) https://gerrit.osmocom.org/#/c/13713/6/src/hlr.c File src/hlr.c: https://gerrit.osmocom.org/#/c/13713/6/src/hlr.c at 153 PS6, Line 153: generate_new_msisdn > Let's follow the style of memcmp() here: dst, src, len. Done https://gerrit.osmocom.org/#/c/13713/6/src/hlr.c at 153 PS6, Line 153: { > Also, please add a new line. Done https://gerrit.osmocom.org/#/c/13713/6/src/hlr.c at 155 PS6, Line 155: rand_buf > In scope of this function, it makes sense to ASSERT() given len <= sizeof(rand_buf). [?] Done -- To view, visit https://gerrit.osmocom.org/13713 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd Gerrit-Change-Number: 13713 Gerrit-PatchSet: 6 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 13 May 2019 08:26:02 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 08:29:37 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 08:29:37 +0000 Subject: Change in osmo-msc[master]: Introduce initial unit test for db_sms_* API In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13629 ) Change subject: Introduce initial unit test for db_sms_* API ...................................................................... Patch Set 2: Code-Review+1 (2 comments) https://gerrit.osmocom.org/#/c/13629/2/src/libmsc/db.c File src/libmsc/db.c: https://gerrit.osmocom.org/#/c/13629/2/src/libmsc/db.c at 776 PS2, Line 776: if (net != NULL) /* db_sms_test passes NULL, so we need to be tolerant */ if (net) https://gerrit.osmocom.org/#/c/13629/2/tests/db_sms/Makefile.am File tests/db_sms/Makefile.am: https://gerrit.osmocom.org/#/c/13629/2/tests/db_sms/Makefile.am at 47 PS2, Line 47: -lrt \ Still not sure why is -lrt needed here. Did you try building without it? -- To view, visit https://gerrit.osmocom.org/13629 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id94ad35b6f78f839137db2e17010fbf9b40111a3 Gerrit-Change-Number: 13629 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Max Gerrit-Comment-Date: Mon, 13 May 2019 08:29:37 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 08:34:46 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 13 May 2019 08:34:46 +0000 Subject: Change in osmo-ggsn[master]: osmo-ggsn: fix VTY command for getting PDP contexts by APN Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14009 Change subject: osmo-ggsn: fix VTY command for getting PDP contexts by APN ...................................................................... osmo-ggsn: fix VTY command for getting PDP contexts by APN Change-Id: I0a7f4b245c4664afdae83c660358acb1a5f88ce5 --- M ggsn/ggsn_vty.c 1 file changed, 38 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/09/14009/1 diff --git a/ggsn/ggsn_vty.c b/ggsn/ggsn_vty.c index 53f4ebf..7a3bf07 100644 --- a/ggsn/ggsn_vty.c +++ b/ggsn/ggsn_vty.c @@ -805,9 +805,9 @@ } DEFUN(show_pdpctx, show_pdpctx_cmd, - "show pdp-context ggsn NAME [apn APN]", + "show pdp-context ggsn NAME", SHOW_STR "Show PDP Context Information\n" - GGSN_STR "GGSN Name\n") // FIXME + GGSN_STR "GGSN Name\n") { struct ggsn_ctx *ggsn; struct apn_ctx *apn; @@ -817,21 +817,45 @@ vty_out(vty, "%% No such GGSN '%s'%s", argv[0], VTY_NEWLINE); return CMD_WARNING; } - if (argc < 2) { - llist_for_each_entry(apn, &ggsn->apn_list, list) - apn_show_pdp_contexts(vty, apn); - } else { - apn = ggsn_find_apn(ggsn, argv[1]); - if (!apn) { - vty_out(vty, "%% No such APN '%s'%s", argv[1], VTY_NEWLINE); - return CMD_WARNING; - } + + llist_for_each_entry(apn, &ggsn->apn_list, list) apn_show_pdp_contexts(vty, apn); - } return CMD_SUCCESS; } +DEFUN(show_pdpctx_apn, show_pdpctx_apn_cmd, + "show pdp-context ggsn NAME apn APN", + SHOW_STR "Show PDP Context Information\n" + GGSN_STR "GGSN Name\n" "Filter by APN\n" "APN name\n") +{ + struct ggsn_ctx *ggsn; + struct apn_ctx *apn; + + ggsn = ggsn_find(argv[0]); + if (!ggsn) { + vty_out(vty, "%% No such GGSN '%s'%s", argv[0], VTY_NEWLINE); + return CMD_WARNING; + } + + apn = ggsn_find_apn(ggsn, argv[1]); + if (!apn) { + vty_out(vty, "%% No such APN '%s'%s", argv[1], VTY_NEWLINE); + return CMD_WARNING; + } + + apn_show_pdp_contexts(vty, apn); + return CMD_SUCCESS; +} + +/* Backwards compatibility: the VTY parser has been interpreting + * "[apn APN]" as two separate elements: "[apn" and "APN]", + * but the first part */ +ALIAS_DEPRECATED(show_pdpctx_apn, show_deprecated_pdpctx_apn_cmd, + "show pdp-context ggsn NAME ap APN", + SHOW_STR "Show PDP Context Information\n" + GGSN_STR "GGSN Name\n" "Filter by APN\n" "APN name\n"); + static void show_apn(struct vty *vty, struct apn_ctx *apn) { vty_out(vty, " APN: %s%s", apn->cfg.name, VTY_NEWLINE); @@ -871,6 +895,8 @@ int ggsn_vty_init(void) { install_element_ve(&show_pdpctx_cmd); + install_element_ve(&show_pdpctx_apn_cmd); + install_element_ve(&show_deprecated_pdpctx_apn_cmd); install_element_ve(&show_pdpctx_imsi_cmd); install_element_ve(&show_ggsn_cmd); -- To view, visit https://gerrit.osmocom.org/14009 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I0a7f4b245c4664afdae83c660358acb1a5f88ce5 Gerrit-Change-Number: 14009 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 08:34:47 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 13 May 2019 08:34:47 +0000 Subject: Change in osmo-ggsn[master]: osmo-ggsn: add VTY command to show PDP context by IPv4 Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14010 Change subject: osmo-ggsn: add VTY command to show PDP context by IPv4 ...................................................................... osmo-ggsn: add VTY command to show PDP context by IPv4 Change-Id: Iad60de34c562803a1a1fc024287d1a60e071afab --- M ggsn/ggsn_vty.c 1 file changed, 42 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/10/14010/1 diff --git a/ggsn/ggsn_vty.c b/ggsn/ggsn_vty.c index 7a3bf07..8333abf 100644 --- a/ggsn/ggsn_vty.c +++ b/ggsn/ggsn_vty.c @@ -781,6 +781,47 @@ return CMD_SUCCESS; } +DEFUN(show_pdpctx_ip, show_pdpctx_ip_cmd, + "show pdp-context ggsn NAME ipv4 A.B.C.D", + SHOW_STR "Display information on PDP Context\n" + GGSN_STR "GGSN Name\n" "IPv4 address type\n" "IP address\n") +{ + struct ggsn_ctx *ggsn; + struct apn_ctx *apn; + unsigned int i; + + ggsn = ggsn_find(argv[0]); + if (!ggsn) { + vty_out(vty, "%% No such GGSN '%s'%s", argv[0], VTY_NEWLINE); + return CMD_WARNING; + } + + /* Iterate over all APNs of a given GGSN */ + llist_for_each_entry(apn, &ggsn->apn_list, list) { + struct ippool_t *pool = apn->v4.pool; + + /* In some rare cases, if GGSN fails to init TUN/TAP interfaces + * (e.g. due to insufficient permissions), it will continue to + * work in such broken state, and pool would be NULL. */ + if (!pool) + continue; + + /* Iterate over all IPv4 pool members */ + for (i = 0; i < pool->listsize; i++) { + struct ippoolm_t *member = &pool->member[i]; + if (member->inuse == 0) + continue; + if (strcmp(argv[1], in46a_ntoa(&member->addr)) == 0) { + show_one_pdp(vty, member->peer); + return CMD_SUCCESS; + } + } + } + + vty_out(vty, "%% No PDP context found for IP '%s'%s", argv[1], VTY_NEWLINE); + return CMD_WARNING; +} + /* show all (active) PDP contexts within a pool */ static void ippool_show_pdp_contexts(struct vty *vty, struct ippool_t *pool) { @@ -898,6 +939,7 @@ install_element_ve(&show_pdpctx_apn_cmd); install_element_ve(&show_deprecated_pdpctx_apn_cmd); install_element_ve(&show_pdpctx_imsi_cmd); + install_element_ve(&show_pdpctx_ip_cmd); install_element_ve(&show_ggsn_cmd); install_element(CONFIG_NODE, &cfg_ggsn_cmd); -- To view, visit https://gerrit.osmocom.org/14010 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Iad60de34c562803a1a1fc024287d1a60e071afab Gerrit-Change-Number: 14010 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 08:37:06 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 13 May 2019 08:37:06 +0000 Subject: Change in osmo-ggsn[master]: osmo-ggsn: fix VTY command for getting PDP contexts by APN In-Reply-To: References: Message-ID: Vadim Yanitskiy has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/14009 ) Change subject: osmo-ggsn: fix VTY command for getting PDP contexts by APN ...................................................................... osmo-ggsn: fix VTY command for getting PDP contexts by APN Change-Id: I0a7f4b245c4664afdae83c660358acb1a5f88ce5 --- M ggsn/ggsn_vty.c 1 file changed, 38 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/09/14009/2 -- To view, visit https://gerrit.osmocom.org/14009 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0a7f4b245c4664afdae83c660358acb1a5f88ce5 Gerrit-Change-Number: 14009 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-CC: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 09:04:14 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 13 May 2019 09:04:14 +0000 Subject: Change in osmo-hlr[master]: Create subscribers on demand In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13713 ) Change subject: Create subscribers on demand ...................................................................... Patch Set 7: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13713 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd Gerrit-Change-Number: 13713 Gerrit-PatchSet: 7 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 13 May 2019 09:04:14 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 09:07:28 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 09:07:28 +0000 Subject: Change in osmo-ggsn[master]: osmo-ggsn: add VTY command to show PDP context by IPv4 In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14010 ) Change subject: osmo-ggsn: add VTY command to show PDP context by IPv4 ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/14010/2/ggsn/ggsn_vty.c File ggsn/ggsn_vty.c: https://gerrit.osmocom.org/#/c/14010/2/ggsn/ggsn_vty.c at 785 PS2, Line 785: "show pdp-context ggsn NAME ipv4 A.B.C.D", Why adding a specific ggsn here? Other show pdp-context don't require it, so I'd stick to same format as the other ones. If you want to list on another ggsn0, it made it based on current node. -- To view, visit https://gerrit.osmocom.org/14010 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iad60de34c562803a1a1fc024287d1a60e071afab Gerrit-Change-Number: 14010 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 13 May 2019 09:07:28 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 09:08:45 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 09:08:45 +0000 Subject: Change in osmo-ggsn[master]: osmo-ggsn: add VTY command to show PDP context by IPv4 In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14010 ) Change subject: osmo-ggsn: add VTY command to show PDP context by IPv4 ...................................................................... Patch Set 2: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/14010/2/ggsn/ggsn_vty.c File ggsn/ggsn_vty.c: https://gerrit.osmocom.org/#/c/14010/2/ggsn/ggsn_vty.c at 785 PS2, Line 785: "show pdp-context ggsn NAME ipv4 A.B.C.D", > Why adding a specific ggsn here? Other show pdp-context don't require it, so I'd stick to same forma [?] Oh I actually see show_pdpctx_apn_cmd has already same format, so fine then. -- To view, visit https://gerrit.osmocom.org/14010 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iad60de34c562803a1a1fc024287d1a60e071afab Gerrit-Change-Number: 14010 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 13 May 2019 09:08:45 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 09:12:29 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 09:12:29 +0000 Subject: Change in osmo-ggsn[master]: osmo-ggsn: fix VTY command for getting PDP contexts by APN In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14009 ) Change subject: osmo-ggsn: fix VTY command for getting PDP contexts by APN ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14009 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0a7f4b245c4664afdae83c660358acb1a5f88ce5 Gerrit-Change-Number: 14009 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 13 May 2019 09:12:29 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 09:46:29 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 13 May 2019 09:46:29 +0000 Subject: Change in osmo-ggsn[master]: Use gtp_delete_context_req2() everywhere Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/14011 Change subject: Use gtp_delete_context_req2() everywhere ...................................................................... Use gtp_delete_context_req2() everywhere Replace calls to gtp_delete_context_req() with gtp_delete_context_req2(). Related: OS#2741 Change-Id: Iecc8c5ac45207e7e20129559c4ac7f3c67dfb36a --- M ggsn/ggsn.c M sgsnemu/sgsnemu.c 2 files changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/11/14011/1 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 2d37cf0..db20d15 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -107,7 +107,7 @@ if (!pdp) continue; LOGPPDP(LOGL_DEBUG, pdp, "Sending DELETE PDP CTX due to shutdown\n"); - gtp_delete_context_req(pdp->gsn, pdp, NULL, 1); + gtp_delete_context_req2(pdp->gsn, pdp, NULL, 1); } } diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c index a2220f0..0676f7e 100644 --- a/sgsnemu/sgsnemu.c +++ b/sgsnemu/sgsnemu.c @@ -1756,8 +1756,7 @@ for (n = 0; n < options.contexts; n++) { /* Delete context */ printf("Disconnecting PDP context #%d\n", n); - gtp_delete_context_req(gsn, iparr[n].pdp, NULL, - 1); + gtp_delete_context_req2(gsn, iparr[n].pdp, NULL, 1); if ((options.pinghost.s_addr != 0) && ntransmitted) ping_finish(); -- To view, visit https://gerrit.osmocom.org/14011 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Iecc8c5ac45207e7e20129559c4ac7f3c67dfb36a Gerrit-Change-Number: 14011 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 09:49:40 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 13 May 2019 09:49:40 +0000 Subject: Change in osmo-ggsn[master]: Use gtp_delete_context_req2() everywhere In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/14011 ) Change subject: Use gtp_delete_context_req2() everywhere ...................................................................... Patch Set 1: I am new to the osmo-ggsn codebase. But from what I can tell, and from looking at the similar sgsn patch [1], this is the only change that needs to be done. The sgsn patch also had a "pctx->lib = NULL;" line removed in its delete_pdp_conf() function, however in ggsn.c's gtp_delete_pdp_conf() and sgsnemu.c's delete_pdp_conf(), there is no similar code. [1]: https://gerrit.osmocom.org/#/c/osmo-sgsn/+/10019/ -- To view, visit https://gerrit.osmocom.org/14011 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iecc8c5ac45207e7e20129559c4ac7f3c67dfb36a Gerrit-Change-Number: 14011 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 13 May 2019 09:49:40 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 10:00:31 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 13 May 2019 10:00:31 +0000 Subject: Change in osmo-msc[master]: tests/.../Makefile.am avoid redundant linkage with librt Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14012 Change subject: tests/.../Makefile.am avoid redundant linkage with librt ...................................................................... tests/.../Makefile.am avoid redundant linkage with librt The librt is required for old glibc < 2.17 to get clock_gettime(). Since we do check the availability of this function libosmocore and conditionally link it against librt, there is no need to do such unconditional and redundant linkage here. Change-Id: If587d16d2db677b97e3a0641027eb735af9c9c30 --- M tests/msc_vlr/Makefile.am M tests/sms_queue/Makefile.am 2 files changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/12/14012/1 diff --git a/tests/msc_vlr/Makefile.am b/tests/msc_vlr/Makefile.am index 29c5fb1..f9a9224 100644 --- a/tests/msc_vlr/Makefile.am +++ b/tests/msc_vlr/Makefile.am @@ -42,7 +42,6 @@ $(LIBOSMOGSUPCLIENT_LIBS) \ $(LIBRARY_GSM) \ -ldbi \ - -lrt \ $(NULL) noinst_HEADERS = \ diff --git a/tests/sms_queue/Makefile.am b/tests/sms_queue/Makefile.am index 81e017b..80189c7 100644 --- a/tests/sms_queue/Makefile.am +++ b/tests/sms_queue/Makefile.am @@ -45,7 +45,6 @@ $(LIBOSMOGSUPCLIENT_LIBS) \ $(LIBRARY_GSM) \ -ldbi \ - -lrt \ $(NULL) sms_queue_test_LDFLAGS = \ -- To view, visit https://gerrit.osmocom.org/14012 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If587d16d2db677b97e3a0641027eb735af9c9c30 Gerrit-Change-Number: 14012 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 10:06:43 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 10:06:43 +0000 Subject: Change in osmo-msc[master]: tests/.../Makefile.am avoid redundant linkage with librt In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14012 ) Change subject: tests/.../Makefile.am avoid redundant linkage with librt ...................................................................... Patch Set 1: Code-Review+1 I think the important fact here is that we actually don't use clock_gettime but osmo_clock_gettime, which is available in libosmocore and we don't care about librt because that's libosmocore implementation details :) -- To view, visit https://gerrit.osmocom.org/14012 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If587d16d2db677b97e3a0641027eb735af9c9c30 Gerrit-Change-Number: 14012 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 13 May 2019 10:06:43 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 10:23:28 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 10:23:28 +0000 Subject: Change in osmo-ggsn[master]: Use gtp_delete_context_req2() everywhere In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14011 ) Change subject: Use gtp_delete_context_req2() everywhere ...................................................................... Patch Set 1: Code-Review-1 We probably miss using cb_conf and freeing the pointer during GTP_DELETE_PDP_REQ in cb_conf. -- To view, visit https://gerrit.osmocom.org/14011 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iecc8c5ac45207e7e20129559c4ac7f3c67dfb36a Gerrit-Change-Number: 14011 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 13 May 2019 10:23:28 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 11:00:46 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 11:00:46 +0000 Subject: Change in osmo-mgw[master]: osmux: Fix reception of legacy dummy payloads Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14013 Change subject: osmux: Fix reception of legacy dummy payloads ...................................................................... osmux: Fix reception of legacy dummy payloads Size check had a bug. Take the opportunity to print wrong frames on error. Change-Id: I9f0d4e28a2019c7ad94344f2c34d17c365bebea9 --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/13/14013/1 diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index ce89df1..9c3844f 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -348,9 +348,9 @@ static int osmux_legacy_dummy_parse_cid(struct sockaddr_in *addr, struct msgb *msg, uint8_t *osmux_cid) { - if (msg->len < 1 + sizeof(osmux_cid)) { + if (msg->len < 1 + sizeof(*osmux_cid)) { LOGP(DLMGCP, LOGL_ERROR, - "Discarding truncated Osmux dummy load\n"); + "Discarding truncated Osmux dummy load: %s\n", osmo_hexdump(msg->data, msg->len)); return -1; } -- To view, visit https://gerrit.osmocom.org/14013 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I9f0d4e28a2019c7ad94344f2c34d17c365bebea9 Gerrit-Change-Number: 14013 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 11:30:06 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 11:30:06 +0000 Subject: Change in osmo-mgw[master]: osmux: Use LOGPCONN in several log calls Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14014 Change subject: osmux: Use LOGPCONN in several log calls ...................................................................... osmux: Use LOGPCONN in several log calls Change-Id: Ieb2c4b53db2df44e0dfbedb7de76d8cf6c83da91 --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 30 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/14/14014/1 diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 9c3844f..149f27b 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -324,23 +324,23 @@ switch(conn->osmux.state) { case OSMUX_STATE_ACTIVATING: if (osmux_enable_conn(endp, conn, &conn->end.addr, htons(endp->cfg->osmux_port)) < 0) { - LOGP(DLMGCP, LOGL_ERROR, - "Could not enable osmux for conn:%s\n", - mgcp_conn_dump(conn->conn)); + LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, + "Could not enable osmux for conn:%s\n", + mgcp_conn_dump(conn->conn)); return -1; } - LOGP(DLMGCP, LOGL_ERROR, - "Osmux CID %u for %s:%u is now enabled\n", - conn->osmux.cid, inet_ntoa(conn->end.addr), - endp->cfg->osmux_port); + LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, + "Osmux CID %u for %s:%u is now enabled\n", + conn->osmux.cid, inet_ntoa(conn->end.addr), + endp->cfg->osmux_port); return 0; case OSMUX_STATE_ENABLED: return 0; default: - LOGP(DLMGCP, LOGL_ERROR, - "Osmux %s in conn %s without full negotiation, state %d\n", - sending ? "sent" : "received", - mgcp_conn_dump(conn->conn), conn->osmux.state); + LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, + "Osmux %s in conn %s without full negotiation, state %d\n", + sending ? "sent" : "received", + mgcp_conn_dump(conn->conn), conn->osmux.state); return -1; } } @@ -562,19 +562,22 @@ /* Check if osmux is enabled for the specified connection */ if (conn->osmux.state != OSMUX_STATE_ACTIVATING) { - LOGP(DLMGCP, LOGL_ERROR, "conn:%s didn't negotiate Osmux, state %d\n", - mgcp_conn_dump(conn->conn), conn->osmux.state); + LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, + "conn:%s didn't negotiate Osmux, state %d\n", + mgcp_conn_dump(conn->conn), conn->osmux.state); return -1; } conn->osmux.in = osmux_handle_lookup(endp->cfg, addr, port); if (!conn->osmux.in) { - LOGP(DLMGCP, LOGL_ERROR, "Cannot allocate input osmux handle for conn:%s\n", - mgcp_conn_dump(conn->conn)); + LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, + "Cannot allocate input osmux handle for conn:%s\n", + mgcp_conn_dump(conn->conn)); return -1; } if (osmux_xfrm_input_open_circuit(conn->osmux.in, conn->osmux.cid, osmux_dummy) < 0) { - LOGP(DLMGCP, LOGL_ERROR, "Cannot open osmux circuit %u for conn:%s\n", + LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, + "Cannot open osmux circuit %u for conn:%s\n", conn->osmux.cid, mgcp_conn_dump(conn->conn)); return -1; } @@ -611,8 +614,9 @@ if (conn->osmux.state != OSMUX_STATE_ENABLED) return; - LOGP(DLMGCP, LOGL_INFO, "Releasing connection %s using Osmux CID %u\n", - conn->conn->id, conn->osmux.cid); + LOGPCONN(conn->conn, DLMGCP, LOGL_INFO, + "Releasing connection %s using Osmux CID %u\n", + conn->conn->id, conn->osmux.cid); /* We are closing, we don't need pending RTP packets to be transmitted */ osmux_xfrm_output_set_tx_cb(&conn->osmux.out, NULL, NULL); @@ -642,16 +646,17 @@ int conn_osmux_allocate_cid(struct mgcp_conn_rtp *conn, int osmux_cid) { if (osmux_cid != -1 && osmux_cid_pool_allocated((uint8_t) osmux_cid)) { - LOGP(DLMGCP, LOGL_INFO, "Conn %s: Osmux CID %d already allocated!\n", - conn->conn->id, osmux_cid); + LOGPCONN(conn->conn, DLMGCP, LOGL_INFO, + "Osmux CID %d already allocated!\n", + osmux_cid); return -1; } if (osmux_cid == -1) { osmux_cid = osmux_cid_pool_get_next(); if (osmux_cid == -1) { - LOGP(DLMGCP, LOGL_INFO, "Conn %s: no available Osmux CID to allocate!\n", - conn->conn->id); + LOGPCONN(conn->conn, DLMGCP, LOGL_INFO, + "no available Osmux CID to allocate!\n"); return -1; } } else @@ -690,9 +695,9 @@ if (endp_osmux_state_check(endp, conn, true) < 0) return 0; - LOGP(DLMGCP, LOGL_DEBUG, - "sending OSMUX dummy load to %s CID %u\n", - inet_ntoa(conn->end.addr), conn->osmux.cid); + LOGPCONN(conn->conn, DLMGCP, LOGL_DEBUG, + "sending OSMUX dummy load to %s CID %u\n", + inet_ntoa(conn->end.addr), conn->osmux.cid); return mgcp_udp_send(osmux_fd.fd, &conn->end.addr, htons(endp->cfg->osmux_port), buf, sizeof(buf)); -- To view, visit https://gerrit.osmocom.org/14014 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ieb2c4b53db2df44e0dfbedb7de76d8cf6c83da91 Gerrit-Change-Number: 14014 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 12:44:29 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 12:44:29 +0000 Subject: Change in osmo-mgw[master]: osmux: Fix reception of legacy dummy payloads In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14013 ) Change subject: osmux: Fix reception of legacy dummy payloads ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14013 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9f0d4e28a2019c7ad94344f2c34d17c365bebea9 Gerrit-Change-Number: 14013 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 13 May 2019 12:44:29 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 12:44:54 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 12:44:54 +0000 Subject: Change in osmo-mgw[master]: osmux: Use LOGPCONN in several log calls In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14014 ) Change subject: osmux: Use LOGPCONN in several log calls ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14014 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ieb2c4b53db2df44e0dfbedb7de76d8cf6c83da91 Gerrit-Change-Number: 14014 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 13 May 2019 12:44:54 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 12:46:02 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 12:46:02 +0000 Subject: Change in osmo-ggsn[master]: osmo-ggsn: fix VTY command for getting PDP contexts by APN In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14009 ) Change subject: osmo-ggsn: fix VTY command for getting PDP contexts by APN ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14009 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0a7f4b245c4664afdae83c660358acb1a5f88ce5 Gerrit-Change-Number: 14009 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 13 May 2019 12:46:02 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 12:46:03 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 12:46:03 +0000 Subject: Change in osmo-ggsn[master]: osmo-ggsn: fix VTY command for getting PDP contexts by APN In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14009 ) Change subject: osmo-ggsn: fix VTY command for getting PDP contexts by APN ...................................................................... osmo-ggsn: fix VTY command for getting PDP contexts by APN Change-Id: I0a7f4b245c4664afdae83c660358acb1a5f88ce5 --- M ggsn/ggsn_vty.c 1 file changed, 38 insertions(+), 12 deletions(-) Approvals: Jenkins Builder: Verified Pau Espin Pedrol: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved diff --git a/ggsn/ggsn_vty.c b/ggsn/ggsn_vty.c index 53f4ebf..f55bd9b 100644 --- a/ggsn/ggsn_vty.c +++ b/ggsn/ggsn_vty.c @@ -805,9 +805,9 @@ } DEFUN(show_pdpctx, show_pdpctx_cmd, - "show pdp-context ggsn NAME [apn APN]", + "show pdp-context ggsn NAME", SHOW_STR "Show PDP Context Information\n" - GGSN_STR "GGSN Name\n") // FIXME + GGSN_STR "GGSN Name\n") { struct ggsn_ctx *ggsn; struct apn_ctx *apn; @@ -817,21 +817,45 @@ vty_out(vty, "%% No such GGSN '%s'%s", argv[0], VTY_NEWLINE); return CMD_WARNING; } - if (argc < 2) { - llist_for_each_entry(apn, &ggsn->apn_list, list) - apn_show_pdp_contexts(vty, apn); - } else { - apn = ggsn_find_apn(ggsn, argv[1]); - if (!apn) { - vty_out(vty, "%% No such APN '%s'%s", argv[1], VTY_NEWLINE); - return CMD_WARNING; - } + + llist_for_each_entry(apn, &ggsn->apn_list, list) apn_show_pdp_contexts(vty, apn); - } return CMD_SUCCESS; } +DEFUN(show_pdpctx_apn, show_pdpctx_apn_cmd, + "show pdp-context ggsn NAME apn APN", + SHOW_STR "Show PDP Context Information\n" + GGSN_STR "GGSN Name\n" "Filter by APN\n" "APN name\n") +{ + struct ggsn_ctx *ggsn; + struct apn_ctx *apn; + + ggsn = ggsn_find(argv[0]); + if (!ggsn) { + vty_out(vty, "%% No such GGSN '%s'%s", argv[0], VTY_NEWLINE); + return CMD_WARNING; + } + + apn = ggsn_find_apn(ggsn, argv[1]); + if (!apn) { + vty_out(vty, "%% No such APN '%s'%s", argv[1], VTY_NEWLINE); + return CMD_WARNING; + } + + apn_show_pdp_contexts(vty, apn); + return CMD_SUCCESS; +} + +/* Backwards compatibility: the VTY parser is (mis)interpreting + * "[apn APN]" as two separate elements: "[apn" and "APN]", + * but the first part somehow turns into command "ap". */ +ALIAS_DEPRECATED(show_pdpctx_apn, show_deprecated_pdpctx_apn_cmd, + "show pdp-context ggsn NAME ap APN", + SHOW_STR "Show PDP Context Information\n" + GGSN_STR "GGSN Name\n" "Filter by APN\n" "APN name\n"); + static void show_apn(struct vty *vty, struct apn_ctx *apn) { vty_out(vty, " APN: %s%s", apn->cfg.name, VTY_NEWLINE); @@ -871,6 +895,8 @@ int ggsn_vty_init(void) { install_element_ve(&show_pdpctx_cmd); + install_element_ve(&show_pdpctx_apn_cmd); + install_element_ve(&show_deprecated_pdpctx_apn_cmd); install_element_ve(&show_pdpctx_imsi_cmd); install_element_ve(&show_ggsn_cmd); -- To view, visit https://gerrit.osmocom.org/14009 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I0a7f4b245c4664afdae83c660358acb1a5f88ce5 Gerrit-Change-Number: 14009 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 12:46:41 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 12:46:41 +0000 Subject: Change in osmo-ggsn[master]: osmo-ggsn: add VTY command to show PDP context by IPv4 In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14010 ) Change subject: osmo-ggsn: add VTY command to show PDP context by IPv4 ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14010 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iad60de34c562803a1a1fc024287d1a60e071afab Gerrit-Change-Number: 14010 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 13 May 2019 12:46:41 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 12:46:43 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 12:46:43 +0000 Subject: Change in osmo-ggsn[master]: osmo-ggsn: add VTY command to show PDP context by IPv4 In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14010 ) Change subject: osmo-ggsn: add VTY command to show PDP context by IPv4 ...................................................................... osmo-ggsn: add VTY command to show PDP context by IPv4 Change-Id: Iad60de34c562803a1a1fc024287d1a60e071afab --- M ggsn/ggsn_vty.c 1 file changed, 42 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Pau Espin Pedrol: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved diff --git a/ggsn/ggsn_vty.c b/ggsn/ggsn_vty.c index f55bd9b..594c0e9 100644 --- a/ggsn/ggsn_vty.c +++ b/ggsn/ggsn_vty.c @@ -781,6 +781,47 @@ return CMD_SUCCESS; } +DEFUN(show_pdpctx_ip, show_pdpctx_ip_cmd, + "show pdp-context ggsn NAME ipv4 A.B.C.D", + SHOW_STR "Display information on PDP Context\n" + GGSN_STR "GGSN Name\n" "IPv4 address type\n" "IP address\n") +{ + struct ggsn_ctx *ggsn; + struct apn_ctx *apn; + unsigned int i; + + ggsn = ggsn_find(argv[0]); + if (!ggsn) { + vty_out(vty, "%% No such GGSN '%s'%s", argv[0], VTY_NEWLINE); + return CMD_WARNING; + } + + /* Iterate over all APNs of a given GGSN */ + llist_for_each_entry(apn, &ggsn->apn_list, list) { + struct ippool_t *pool = apn->v4.pool; + + /* In some rare cases, if GGSN fails to init TUN/TAP interfaces + * (e.g. due to insufficient permissions), it will continue to + * work in such broken state, and pool would be NULL. */ + if (!pool) + continue; + + /* Iterate over all IPv4 pool members */ + for (i = 0; i < pool->listsize; i++) { + struct ippoolm_t *member = &pool->member[i]; + if (member->inuse == 0) + continue; + if (strcmp(argv[1], in46a_ntoa(&member->addr)) == 0) { + show_one_pdp(vty, member->peer); + return CMD_SUCCESS; + } + } + } + + vty_out(vty, "%% No PDP context found for IP '%s'%s", argv[1], VTY_NEWLINE); + return CMD_WARNING; +} + /* show all (active) PDP contexts within a pool */ static void ippool_show_pdp_contexts(struct vty *vty, struct ippool_t *pool) { @@ -898,6 +939,7 @@ install_element_ve(&show_pdpctx_apn_cmd); install_element_ve(&show_deprecated_pdpctx_apn_cmd); install_element_ve(&show_pdpctx_imsi_cmd); + install_element_ve(&show_pdpctx_ip_cmd); install_element_ve(&show_ggsn_cmd); install_element(CONFIG_NODE, &cfg_ggsn_cmd); -- To view, visit https://gerrit.osmocom.org/14010 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iad60de34c562803a1a1fc024287d1a60e071afab Gerrit-Change-Number: 14010 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 12:47:04 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 12:47:04 +0000 Subject: Change in osmo-msc[master]: tests/.../Makefile.am avoid redundant linkage with librt In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14012 ) Change subject: tests/.../Makefile.am avoid redundant linkage with librt ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14012 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If587d16d2db677b97e3a0641027eb735af9c9c30 Gerrit-Change-Number: 14012 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 13 May 2019 12:47:04 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 12:47:04 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 12:47:04 +0000 Subject: Change in osmo-msc[master]: tests/.../Makefile.am avoid redundant linkage with librt In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14012 ) Change subject: tests/.../Makefile.am avoid redundant linkage with librt ...................................................................... tests/.../Makefile.am avoid redundant linkage with librt The librt is required for old glibc < 2.17 to get clock_gettime(). Since we do check the availability of this function libosmocore and conditionally link it against librt, there is no need to do such unconditional and redundant linkage here. Change-Id: If587d16d2db677b97e3a0641027eb735af9c9c30 --- M tests/msc_vlr/Makefile.am M tests/sms_queue/Makefile.am 2 files changed, 0 insertions(+), 2 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/msc_vlr/Makefile.am b/tests/msc_vlr/Makefile.am index 29c5fb1..f9a9224 100644 --- a/tests/msc_vlr/Makefile.am +++ b/tests/msc_vlr/Makefile.am @@ -42,7 +42,6 @@ $(LIBOSMOGSUPCLIENT_LIBS) \ $(LIBRARY_GSM) \ -ldbi \ - -lrt \ $(NULL) noinst_HEADERS = \ diff --git a/tests/sms_queue/Makefile.am b/tests/sms_queue/Makefile.am index 81e017b..80189c7 100644 --- a/tests/sms_queue/Makefile.am +++ b/tests/sms_queue/Makefile.am @@ -45,7 +45,6 @@ $(LIBOSMOGSUPCLIENT_LIBS) \ $(LIBRARY_GSM) \ -ldbi \ - -lrt \ $(NULL) sms_queue_test_LDFLAGS = \ -- To view, visit https://gerrit.osmocom.org/14012 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If587d16d2db677b97e3a0641027eb735af9c9c30 Gerrit-Change-Number: 14012 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 13:10:35 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 13 May 2019 13:10:35 +0000 Subject: Change in osmo-msc[master]: gsm_04_11: Log MT sms dst subscriber In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13555 ) Change subject: gsm_04_11: Log MT sms dst subscriber ...................................................................... Patch Set 5: (1 comment) LOGP_TRANS() does print more than enough details now. Not sure if this change makes sense... https://gerrit.osmocom.org/#/c/13555/5/tests/msc_vlr/msc_vlr_test_gsm_authen.err File tests/msc_vlr/msc_vlr_test_gsm_authen.err: https://gerrit.osmocom.org/#/c/13555/5/tests/msc_vlr/msc_vlr_test_gsm_authen.err at 323 PS5, Line 323: IMSI-901700000004620:MSISDN-46071 Now have all the MI info here... -- To view, visit https://gerrit.osmocom.org/13555 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I483ac61067f51d03f6f476821d8664da3d1f17b2 Gerrit-Change-Number: 13555 Gerrit-PatchSet: 5 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Mon, 13 May 2019 13:10:35 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 14:21:44 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 14:21:44 +0000 Subject: Change in osmo-mgw[master]: osmux: Fix reception of legacy dummy payloads In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/14013 ) Change subject: osmux: Fix reception of legacy dummy payloads ...................................................................... osmux: Fix reception of legacy dummy payloads Size check had a bug. Take the opportunity to print wrong frames on error. Change-Id: I9f0d4e28a2019c7ad94344f2c34d17c365bebea9 --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index ce89df1..9c3844f 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -348,9 +348,9 @@ static int osmux_legacy_dummy_parse_cid(struct sockaddr_in *addr, struct msgb *msg, uint8_t *osmux_cid) { - if (msg->len < 1 + sizeof(osmux_cid)) { + if (msg->len < 1 + sizeof(*osmux_cid)) { LOGP(DLMGCP, LOGL_ERROR, - "Discarding truncated Osmux dummy load\n"); + "Discarding truncated Osmux dummy load: %s\n", osmo_hexdump(msg->data, msg->len)); return -1; } -- To view, visit https://gerrit.osmocom.org/14013 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I9f0d4e28a2019c7ad94344f2c34d17c365bebea9 Gerrit-Change-Number: 14013 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 14:21:45 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 14:21:45 +0000 Subject: Change in osmo-mgw[master]: osmux: Use LOGPCONN in several log calls In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/14014 ) Change subject: osmux: Use LOGPCONN in several log calls ...................................................................... osmux: Use LOGPCONN in several log calls Change-Id: Ieb2c4b53db2df44e0dfbedb7de76d8cf6c83da91 --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 30 insertions(+), 25 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 9c3844f..149f27b 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -324,23 +324,23 @@ switch(conn->osmux.state) { case OSMUX_STATE_ACTIVATING: if (osmux_enable_conn(endp, conn, &conn->end.addr, htons(endp->cfg->osmux_port)) < 0) { - LOGP(DLMGCP, LOGL_ERROR, - "Could not enable osmux for conn:%s\n", - mgcp_conn_dump(conn->conn)); + LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, + "Could not enable osmux for conn:%s\n", + mgcp_conn_dump(conn->conn)); return -1; } - LOGP(DLMGCP, LOGL_ERROR, - "Osmux CID %u for %s:%u is now enabled\n", - conn->osmux.cid, inet_ntoa(conn->end.addr), - endp->cfg->osmux_port); + LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, + "Osmux CID %u for %s:%u is now enabled\n", + conn->osmux.cid, inet_ntoa(conn->end.addr), + endp->cfg->osmux_port); return 0; case OSMUX_STATE_ENABLED: return 0; default: - LOGP(DLMGCP, LOGL_ERROR, - "Osmux %s in conn %s without full negotiation, state %d\n", - sending ? "sent" : "received", - mgcp_conn_dump(conn->conn), conn->osmux.state); + LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, + "Osmux %s in conn %s without full negotiation, state %d\n", + sending ? "sent" : "received", + mgcp_conn_dump(conn->conn), conn->osmux.state); return -1; } } @@ -562,19 +562,22 @@ /* Check if osmux is enabled for the specified connection */ if (conn->osmux.state != OSMUX_STATE_ACTIVATING) { - LOGP(DLMGCP, LOGL_ERROR, "conn:%s didn't negotiate Osmux, state %d\n", - mgcp_conn_dump(conn->conn), conn->osmux.state); + LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, + "conn:%s didn't negotiate Osmux, state %d\n", + mgcp_conn_dump(conn->conn), conn->osmux.state); return -1; } conn->osmux.in = osmux_handle_lookup(endp->cfg, addr, port); if (!conn->osmux.in) { - LOGP(DLMGCP, LOGL_ERROR, "Cannot allocate input osmux handle for conn:%s\n", - mgcp_conn_dump(conn->conn)); + LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, + "Cannot allocate input osmux handle for conn:%s\n", + mgcp_conn_dump(conn->conn)); return -1; } if (osmux_xfrm_input_open_circuit(conn->osmux.in, conn->osmux.cid, osmux_dummy) < 0) { - LOGP(DLMGCP, LOGL_ERROR, "Cannot open osmux circuit %u for conn:%s\n", + LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, + "Cannot open osmux circuit %u for conn:%s\n", conn->osmux.cid, mgcp_conn_dump(conn->conn)); return -1; } @@ -611,8 +614,9 @@ if (conn->osmux.state != OSMUX_STATE_ENABLED) return; - LOGP(DLMGCP, LOGL_INFO, "Releasing connection %s using Osmux CID %u\n", - conn->conn->id, conn->osmux.cid); + LOGPCONN(conn->conn, DLMGCP, LOGL_INFO, + "Releasing connection %s using Osmux CID %u\n", + conn->conn->id, conn->osmux.cid); /* We are closing, we don't need pending RTP packets to be transmitted */ osmux_xfrm_output_set_tx_cb(&conn->osmux.out, NULL, NULL); @@ -642,16 +646,17 @@ int conn_osmux_allocate_cid(struct mgcp_conn_rtp *conn, int osmux_cid) { if (osmux_cid != -1 && osmux_cid_pool_allocated((uint8_t) osmux_cid)) { - LOGP(DLMGCP, LOGL_INFO, "Conn %s: Osmux CID %d already allocated!\n", - conn->conn->id, osmux_cid); + LOGPCONN(conn->conn, DLMGCP, LOGL_INFO, + "Osmux CID %d already allocated!\n", + osmux_cid); return -1; } if (osmux_cid == -1) { osmux_cid = osmux_cid_pool_get_next(); if (osmux_cid == -1) { - LOGP(DLMGCP, LOGL_INFO, "Conn %s: no available Osmux CID to allocate!\n", - conn->conn->id); + LOGPCONN(conn->conn, DLMGCP, LOGL_INFO, + "no available Osmux CID to allocate!\n"); return -1; } } else @@ -690,9 +695,9 @@ if (endp_osmux_state_check(endp, conn, true) < 0) return 0; - LOGP(DLMGCP, LOGL_DEBUG, - "sending OSMUX dummy load to %s CID %u\n", - inet_ntoa(conn->end.addr), conn->osmux.cid); + LOGPCONN(conn->conn, DLMGCP, LOGL_DEBUG, + "sending OSMUX dummy load to %s CID %u\n", + inet_ntoa(conn->end.addr), conn->osmux.cid); return mgcp_udp_send(osmux_fd.fd, &conn->end.addr, htons(endp->cfg->osmux_port), buf, sizeof(buf)); -- To view, visit https://gerrit.osmocom.org/14014 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ieb2c4b53db2df44e0dfbedb7de76d8cf6c83da91 Gerrit-Change-Number: 14014 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 15:30:56 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 13 May 2019 15:30:56 +0000 Subject: Change in osmo-ggsn[master]: osmo-ggsn: check result of osmo_apn_to_str() Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14015 Change subject: osmo-ggsn: check result of osmo_apn_to_str() ...................................................................... osmo-ggsn: check result of osmo_apn_to_str() Change-Id: I03d0eb266dca176f342e77a54f0291cc5bd7df43 --- M ggsn/ggsn.c 1 file changed, 7 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/15/14015/1 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 2d37cf0..a3bf4db 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -639,15 +639,17 @@ struct in46_addr addr[2]; struct ippoolm_t *member = NULL, *addrv4 = NULL, *addrv6 = NULL; char straddrv4[INET_ADDRSTRLEN], straddrv6[INET6_ADDRSTRLEN]; - struct apn_ctx *apn; + struct apn_ctx *apn = NULL; int rc, num_addr, i; + char *apn_name; - osmo_apn_to_str(name_buf, pdp->apn_req.v, pdp->apn_req.l); - - LOGPPDP(LOGL_DEBUG, pdp, "Processing create PDP context request for APN '%s'\n", name_buf); + apn_name = osmo_apn_to_str(name_buf, pdp->apn_req.v, pdp->apn_req.l); + LOGPPDP(LOGL_DEBUG, pdp, "Processing create PDP context request for APN '%s'\n", + apn_name ? name_buf : "(NONE)"); /* First find an exact APN name match */ - apn = ggsn_find_apn(ggsn, name_buf); + if (apn_name != NULL) + apn = ggsn_find_apn(ggsn, name_buf); /* ignore if the APN has not been started */ if (apn && !apn->started) apn = NULL; -- To view, visit https://gerrit.osmocom.org/14015 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I03d0eb266dca176f342e77a54f0291cc5bd7df43 Gerrit-Change-Number: 14015 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 15:30:57 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 13 May 2019 15:30:57 +0000 Subject: Change in osmo-ggsn[master]: osmo-ggsn: print requested / actual APN in PDP info Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14016 Change subject: osmo-ggsn: print requested / actual APN in PDP info ...................................................................... osmo-ggsn: print requested / actual APN in PDP info An actual APN can be different from the one that was requested by user, e.g. when 'default-apn' VTY parameter is used. The one that was requested is already being stored in the PDP context state. Let's also store a chosen APN in create_context_ind(). Change-Id: I9cbe195f64e5b83d5158c175aad2e81ba2487850 --- M ggsn/ggsn.c M ggsn/ggsn_vty.c 2 files changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/16/14016/1 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index a3bf4db..bd8647f 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -685,6 +685,12 @@ return 0; } + /* Store the actual APN for logging and the VTY */ + rc = osmo_apn_from_str(pdp->apn_use.v, sizeof(pdp->apn_use.v), apn->cfg.name); + if (rc < 0) /* Unlikely this would happen, but anyway... */ + LOGPPDP(LOGL_ERROR, pdp, "Failed to store APN '%s'\n", apn->cfg.name); + pdp->apn_use.l = rc; + /* Allocate dynamic addresses from the pool */ for (i = 0; i < num_addr; i++) { if (addr[i].len == sizeof(struct in_addr)) { diff --git a/ggsn/ggsn_vty.c b/ggsn/ggsn_vty.c index 594c0e9..173cbe0 100644 --- a/ggsn/ggsn_vty.c +++ b/ggsn/ggsn_vty.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -733,6 +734,8 @@ static void show_one_pdp(struct vty *vty, struct pdp_t *pdp) { struct in46_addr eua46; + char name_buf[256]; + char *apn_name; vty_out(vty, "IMSI: %s, NSAPI: %u, MSISDN: %s%s", imsi_gtp2str(&pdp->imsi), pdp->nsapi, osmo_hexdump_nospc(pdp->msisdn.v, pdp->msisdn.l), VTY_NEWLINE); @@ -743,6 +746,11 @@ vty_out(vty, " Data: %s:%08x ", print_gsnaddr(&pdp->gsnlu), pdp->teid_own); vty_out(vty, "<-> %s:%08x%s", print_gsnaddr(&pdp->gsnru), pdp->teid_gn, VTY_NEWLINE); + apn_name = osmo_apn_to_str(name_buf, pdp->apn_use.v, pdp->apn_use.l); + vty_out(vty, " APN in use: %s%s", apn_name ? name_buf : "(NONE)", VTY_NEWLINE); + apn_name = osmo_apn_to_str(name_buf, pdp->apn_req.v, pdp->apn_req.l); + vty_out(vty, " APN requested: %s%s", apn_name ? name_buf : "(NONE)", VTY_NEWLINE); + in46a_from_eua(&pdp->eua, &eua46); vty_out(vty, " End-User Address: %s%s", in46a_ntoa(&eua46), VTY_NEWLINE); vty_out(vty, " Transmit GTP Sequence Number for G-PDU: %s%s", -- To view, visit https://gerrit.osmocom.org/14016 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I9cbe195f64e5b83d5158c175aad2e81ba2487850 Gerrit-Change-Number: 14016 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 15:40:35 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 15:40:35 +0000 Subject: Change in libosmocore[master]: WIP Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14017 Change subject: WIP ...................................................................... WIP Change-Id: I28f83e2e32b9533c99e65ccc1562900ac2aec74e --- M include/osmocom/gsm/gsm0808_utils.h M include/osmocom/gsm/protocol/gsm_08_08.h M src/gsm/gsm0808.c M src/gsm/gsm0808_utils.c M src/gsm/libosmogsm.map 5 files changed, 29 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/17/14017/1 diff --git a/include/osmocom/gsm/gsm0808_utils.h b/include/osmocom/gsm/gsm0808_utils.h index 3a7beb7..9cfaea6 100644 --- a/include/osmocom/gsm/gsm0808_utils.h +++ b/include/osmocom/gsm/gsm0808_utils.h @@ -100,6 +100,7 @@ const struct sockaddr_storage *ss); int gsm0808_dec_aoip_trasp_addr(struct sockaddr_storage *ss, const uint8_t *elem, uint8_t len); +int gsm0808_dec_osmux_cid(uint8_t *cid, const uint8_t *elem, uint8_t len); uint8_t gsm0808_enc_lcls(struct msgb *msg, const struct osmo_lcls *lcls); int gsm0808_dec_lcls(struct osmo_lcls *lcls, const struct tlv_parsed *tp); diff --git a/include/osmocom/gsm/protocol/gsm_08_08.h b/include/osmocom/gsm/protocol/gsm_08_08.h index aa01ee5..9806e08 100644 --- a/include/osmocom/gsm/protocol/gsm_08_08.h +++ b/include/osmocom/gsm/protocol/gsm_08_08.h @@ -303,6 +303,10 @@ GSM0808_IE_SELECTED_OPERATOR = 0x98, GSM0808_IE_PS_REGISTERED_OPERATOR = 0x99, GSM0808_IE_CS_REGISTERED_OPERATOR = 0x9a, + + /* Osmocom extensions: */ + GSM0808_IE_OSMO_OSMUX_SUPPORT = 0xf0, + GSM0808_IE_OSMO_OSMUX_CID = 0xf1, }; /* 3GPP TS 48.008 3.2.3 Signalling Field Element Coding */ diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c index 3c77c77..514d7f2 100644 --- a/src/gsm/gsm0808.c +++ b/src/gsm/gsm0808.c @@ -1387,6 +1387,10 @@ [GSM0808_IE_CN_TO_MS_TRANSP_INFO] = { TLV_TYPE_TLV }, [GSM0808_IE_SELECTED_PLMN_ID] = { TLV_TYPE_FIXED, 3 }, [GSM0808_IE_LAST_USED_EUTRAN_PLMN_ID] = { TLV_TYPE_FIXED, 3 }, + + /* Osmocom extensions */ + [GSM0808_IE_OSMO_OSMUX_SUPPORT] = { TLV_TYPE_T }, + [GSM0808_IE_OSMO_OSMUX_CID] = { TLV_TYPE_TV }, }, }; diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c index e825930..26f7944 100644 --- a/src/gsm/gsm0808_utils.c +++ b/src/gsm/gsm0808_utils.c @@ -172,6 +172,25 @@ return (int)(elem - old_elem); } +/*! Decode TS 08.08 (Osmocom Extension) Osmux CID + * TV with len(V) == 1, and V is the CID to be used. + * \param[out] cid Caller-provided variable where CID is stored + * \param[in] elem pointer to IE value + * \param[in] len length of \a elem in bytes + * \returns number of bytes parsed */ +int gsm0808_dec_osmux_cid(uint8_t *cid, const uint8_t *elem, uint8_t len) +{ + OSMO_ASSERT(cid); + if (!elem) + return -EINVAL; + if (len != 1) + return -EINVAL; + + *cid = *elem; + + return 1; +} + #endif /* HAVE_SYS_SOCKET_H */ /* Helper function for gsm0808_enc_speech_codec() diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 840bac9..0f4a0db 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -198,6 +198,7 @@ gsm0808_enc_cause; gsm0808_enc_aoip_trasp_addr; gsm0808_dec_aoip_trasp_addr; +gsm0808_dec_osmux_cid; gsm0808_enc_speech_codec; gsm0808_dec_speech_codec; gsm0808_enc_speech_codec_list; -- To view, visit https://gerrit.osmocom.org/14017 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I28f83e2e32b9533c99e65ccc1562900ac2aec74e Gerrit-Change-Number: 14017 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 15:55:20 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 15:55:20 +0000 Subject: Change in libosmocore[master]: gsm0808: Introduce Osmocom extensions to announce Osmux support In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14017 to look at the new patch set (#2). Change subject: gsm0808: Introduce Osmocom extensions to announce Osmux support ...................................................................... gsm0808: Introduce Osmocom extensions to announce Osmux support IE GSM0808_IE_OSMO_OSMUX_SUPPORT (T, 1 byte) is sent in AoIP appended to BSSMAP RESET in order to announce the peer that its MGW supports handling Osmux streams upon call set up. IE GSM0808_IE_OSMO_OSMUX_CID (TV, T 1 byte & V 1 byte) is sent in AoIP during call set up: * MSC->BSC Assignment Request * BSC->MSC Assignemnt Complete The 1 byte value contains the local Osmux CID, aka the recvCID aka CID where the peer sending the Assign Req/Compl will look for Osmux frames on that call. Hence, the peer receiving this CID value must use it to send Osmux frames for that call. As a result, a given call leg BSC<->MSC can have one different Osmux CID per direction. For example: * MS => MGW_BSC ==CID 0==> MGW_MSC * MS <= MGW_BSC <=CID 1=== MGW_MSC This allows for setups with 256 call legs per BSC on scenarios where NAT is not a problem, where MSC can have a pool of 256 CID per MGW_BSC (or remote peer). Related: OS#2551 Change-Id: I28f83e2e32b9533c99e65ccc1562900ac2aec74e --- M include/osmocom/gsm/gsm0808_utils.h M include/osmocom/gsm/protocol/gsm_08_08.h M src/gsm/gsm0808.c M src/gsm/gsm0808_utils.c M src/gsm/libosmogsm.map 5 files changed, 29 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/17/14017/2 -- To view, visit https://gerrit.osmocom.org/14017 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I28f83e2e32b9533c99e65ccc1562900ac2aec74e Gerrit-Change-Number: 14017 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 15:57:53 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 15:57:53 +0000 Subject: Change in osmo-ggsn[master]: osmo-ggsn: check result of osmo_apn_to_str() In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14015 ) Change subject: osmo-ggsn: check result of osmo_apn_to_str() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14015 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I03d0eb266dca176f342e77a54f0291cc5bd7df43 Gerrit-Change-Number: 14015 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 13 May 2019 15:57:53 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 16:01:59 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 16:01:59 +0000 Subject: Change in osmo-ggsn[master]: osmo-ggsn: print requested / actual APN in PDP info In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14016 ) Change subject: osmo-ggsn: print requested / actual APN in PDP info ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/14016/1/ggsn/ggsn_vty.c File ggsn/ggsn_vty.c: https://gerrit.osmocom.org/#/c/14016/1/ggsn/ggsn_vty.c at 752 PS1, Line 752: vty_out(vty, " APN requested: %s%s", apn_name ? name_buf : "(NONE)", VTY_NEWLINE); Probably makes sense to swap both (chronological order: first user requested X, then we actually assigned Y). -- To view, visit https://gerrit.osmocom.org/14016 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9cbe195f64e5b83d5158c175aad2e81ba2487850 Gerrit-Change-Number: 14016 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 13 May 2019 16:01:59 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 16:13:38 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Mon, 13 May 2019 16:13:38 +0000 Subject: Change in osmo-trx[master]: add support for xtrx Message-ID: lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/14018 Change subject: add support for xtrx ...................................................................... add support for xtrx Based on the github.com/xtrx-sdr/osmo-trx Change-Id: Iad73e0611e7951d5bcfcc918063cc3778cb1dd8f --- M Transceiver52M/Makefile.am M Transceiver52M/device/Makefile.am A Transceiver52M/device/xtrx/Makefile.am A Transceiver52M/device/xtrx/XTRXDevice.cpp A Transceiver52M/device/xtrx/XTRXDevice.h M configure.ac M contrib/systemd/Makefile.am A contrib/systemd/osmo-trx-xtrx.service M debian/control A debian/osmo-trx-xtrx.install M doc/examples/Makefile.am A doc/examples/osmo-trx-xtrx/osmo-trx-xtrx.cfg 12 files changed, 729 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/18/14018/1 diff --git a/Transceiver52M/Makefile.am b/Transceiver52M/Makefile.am index 89ab796..b8a9858 100644 --- a/Transceiver52M/Makefile.am +++ b/Transceiver52M/Makefile.am @@ -109,3 +109,13 @@ $(LMS_LIBS) osmo_trx_lms_CPPFLAGS = $(AM_CPPFLAGS) $(LMS_CFLAGS) endif + +if DEVICE_XTRX +bin_PROGRAMS += osmo-trx-xtrx +osmo_trx_xtrx_SOURCES = osmo-trx.cpp +osmo_trx_xtrx_LDADD = \ + $(builddir)/device/xtrx/libdevice.la \ + $(COMMON_LDADD) \ + $(XTRX_LIBS) +osmo_trx_xtrx_CPPFLAGS = $(AM_CPPFLAGS) $(XTRX_CFLAGS) +endif diff --git a/Transceiver52M/device/Makefile.am b/Transceiver52M/device/Makefile.am index 369e877..8460a96 100644 --- a/Transceiver52M/device/Makefile.am +++ b/Transceiver52M/device/Makefile.am @@ -13,3 +13,7 @@ if DEVICE_LMS SUBDIRS += lms endif + +if DEVICE_XTRX +SUBDIRS += xtrx +endif diff --git a/Transceiver52M/device/xtrx/Makefile.am b/Transceiver52M/device/xtrx/Makefile.am new file mode 100644 index 0000000..b978d1a --- /dev/null +++ b/Transceiver52M/device/xtrx/Makefile.am @@ -0,0 +1,10 @@ +include $(top_srcdir)/Makefile.common + +AM_CPPFLAGS = -Wall $(STD_DEFINES_AND_INCLUDES) -I${srcdir}/.. +AM_CXXFLAGS = -lpthread $(LIBOSMOCORE_CFLAGS) $(LIBOSMOCTRL_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(XTRX_CFLAGS) + +noinst_HEADERS = XTRXDevice.h + +noinst_LTLIBRARIES = libdevice.la + +libdevice_la_SOURCES = XTRXDevice.cpp diff --git a/Transceiver52M/device/xtrx/XTRXDevice.cpp b/Transceiver52M/device/xtrx/XTRXDevice.cpp new file mode 100644 index 0000000..5f3cb79 --- /dev/null +++ b/Transceiver52M/device/xtrx/XTRXDevice.cpp @@ -0,0 +1,452 @@ +/* +* Copyright 2018 Sergey Kostanbaev +* + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + + +#include +#include +#include +#include "Threads.h" +#include "XTRXDevice.h" + +#include +#include + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +using namespace std; + +const double defaultRXBandwidth = 0.5e6; +const double defaultTXBandwidth = 1.5e6; + +static int time_tx_corr = 60; //20+20+20+20+20; + +XTRXDevice::XTRXDevice(size_t tx_sps, size_t rx_sps, InterfaceType iface, size_t chans, double lo_offset, + const std::vector& tx_paths, + const std::vector& rx_paths) : + RadioDevice(tx_sps, rx_sps, iface, chans, lo_offset, tx_paths, rx_paths) +{ + LOG(INFO) << "creating XTRX device:" + << " RXSPS: " << rx_sps + << " TXSPS: " << tx_sps + << " chans: " << chans + << " lo_off: " << lo_offset + << " rx_path(0): " << (rx_paths.size() ? rx_paths[0] : "<>") + << " tx_path(0): " << (tx_paths.size() ? tx_paths[0] : "<>"); + + txsps = tx_sps; + rxsps = rx_sps; + + rxGain = 0; + + loopback = false; + device = NULL; +} + +static int parse_config(const char* line, const char* argument, int default_value) +{ + const char* arg_found = strstr(line, argument); + if (!arg_found) + return default_value; + + const char* qe_pos = strchr(arg_found, '='); + if (!qe_pos) + return default_value; + + int res = strtol(qe_pos + 1, NULL, 10); + if (res == 0 && errno) { + return default_value; + } + + return res; +} + +int XTRXDevice::open(const std::string &args, int ref, bool swap_channels) +{ + LOG(INFO) << "opening XTRX device '" << args << "'.."; + + int loglevel = parse_config(args.c_str(), "loglevel", 3); + int lb_param = parse_config(args.c_str(), "loopback", 0); + time_tx_corr = parse_config(args.c_str(), "tcorr", time_tx_corr); + int fref = parse_config(args.c_str(), "refclk", 26000000); + int rxdec = parse_config(args.c_str(), "rxdec", 0); + + char xtrx_name[500]; + const char* lend = strchr(args.c_str(), ','); + int len = (lend) ? (lend - args.c_str()) : sizeof(xtrx_name) - 1; + strncpy(xtrx_name, args.c_str(), len); + xtrx_name[len] = 0; + + if ((txsps % 2) || (rxsps % 2)) { + LOG(ALERT) << "XTRX TxSPS/RxSPS must be even!"; + return -1; + } + + if (lb_param) { + LOG(ALERT) << "XTRX LOOPBACK mode is set!"; + loopback = true; + } + + int res = xtrx_open(xtrx_name, loglevel, &device); + if (res) { + LOG(ALERT) << "XTRX creating failed, device " << xtrx_name << " code " << res; + return -1; + } + double actualMasterClock = 0; + + if (fref > 0) { + xtrx_set_ref_clk(device, fref, XTRX_CLKSRC_INT); + } + + res = xtrx_set_samplerate(device, + GSMRATE * (double) std::min(txsps, rxsps) * 32 * 4 * ((rxdec) ? 2 : 1), + GSMRATE * (double) rxsps, + GSMRATE * (double) txsps, + (rxdec) ? XTRX_SAMPLERATE_FORCE_RX_DECIM : 0, + &actualMasterClock, + &actualRXSampleRate, + &actualTXSampleRate); + if (res) { + LOG(ALERT) << "XTRX failed to set samplerate RX: " << GSMRATE * (double) rxsps + << " TX: " << GSMRATE * (double) txsps + << " res: " << res; + return -1; + } else { + LOG(INFO) << "XTRX set samplerate Master: " << actualMasterClock + << " RX: " << actualRXSampleRate + << " TX: " << actualTXSampleRate; + } + + double bw; + double actualbw; + + actualbw = 0; + bw = defaultRXBandwidth; + res = xtrx_tune_rx_bandwidth(device, XTRX_CH_AB, bw, &actualbw); + if (res) { + LOG(ALERT) << "XTRX failed to set RX bandwidth: " << bw + << " res: " << res; + } else { + LOG(INFO) << "XTRX set RX bandwidth: " << actualbw; + } + + actualbw = 0; + bw = defaultTXBandwidth; + res = xtrx_tune_tx_bandwidth(device, XTRX_CH_AB, bw, &actualbw); + if (res) { + LOG(ALERT) << "XTRX failed to set TX bandwidth: " << bw + << " res: " << res; + } else { + LOG(INFO) << "XTRX set TX bandwidth: " << actualbw; + } + + samplesRead = 0; + samplesWritten = 0; + started = false; + + return NORMAL; +} + +XTRXDevice::~XTRXDevice() +{ + if (device) { + xtrx_close(device); + } +} + +bool XTRXDevice::start() +{ + LOG(INFO) << "starting XTRX..."; + if (started) { + return false; + } + + dataStart = 0; + dataEnd = 0; + timeStart = 0; + timeEnd = 0; + timeRx = initialReadTimestamp(); + timestampOffset = 0; + latestWriteTimestamp = 0; + lastPktTimestamp = 0; + hi32Timestamp = 0; + isAligned = false; + + xtrx_stop(device, XTRX_TX); + xtrx_stop(device, XTRX_RX); + + xtrx_set_antenna(device, XTRX_TX_AUTO); + xtrx_set_antenna(device, XTRX_RX_AUTO); + + xtrx_run_params_t params; + params.dir = XTRX_TRX; + params.nflags = (loopback) ? XTRX_RUN_DIGLOOPBACK : 0; + + params.rx.chs = XTRX_CH_AB; + params.rx.flags = XTRX_RSP_SISO_MODE; + params.rx.hfmt = XTRX_IQ_INT16; + params.rx.wfmt = XTRX_WF_16; + params.rx.paketsize = 625 * rxsps; + + params.tx.chs = XTRX_CH_AB; + params.tx.flags = XTRX_RSP_SISO_MODE; + params.tx.hfmt = XTRX_IQ_INT16; + params.tx.wfmt = XTRX_WF_16; + params.tx.paketsize = 625 * txsps; + + if (loopback) { + params.tx.flags |= XTRX_RSP_SWAP_AB | XTRX_RSP_SWAP_IQ; + } + + params.tx_repeat_buf = NULL; + params.rx_stream_start = initialReadTimestamp(); + + int res = xtrx_run_ex(device, ¶ms); + if (res) { + LOG(ALERT) << "XTRX start failed res: " << res; + } else { + LOG(INFO) << "XTRX started"; + started = true; + } + return started; +} + +bool XTRXDevice::stop() +{ + if (started) { + int res = xtrx_stop(device, XTRX_TRX); + if (res) { + LOG(ALERT) << "XTRX stop failed res: " << res; + } else { + LOG(INFO) << "XTRX stopped"; + started = false; + } + } + return !started; +} + +TIMESTAMP XTRXDevice::initialWriteTimestamp() +{ + if (/*(iface == MULTI_ARFCN) || */(rxsps == txsps)) + return initialReadTimestamp(); + else + return initialReadTimestamp() * txsps; +} + +double XTRXDevice::maxTxGain() +{ + return 30; +} + +double XTRXDevice::minTxGain() +{ + return 0; +} + +double XTRXDevice::maxRxGain() +{ + return 30; +} + +double XTRXDevice::minRxGain() +{ + return 0; +} + +double XTRXDevice::setTxGain(double dB, size_t chan) +{ + if (chan) { + LOG(ALERT) << "Invalid channel " << chan; + return 0.0; + } + double actual = 0; + LOG(NOTICE) << "Setting TX gain to " << dB << " dB."; + + int res = xtrx_set_gain(device, XTRX_CH_AB, XTRX_TX_PAD_GAIN, dB - 30, &actual); + if (res) { + LOG(ERR) << "Error setting TX gain res: " << res; + } + + return actual; +} + + +double XTRXDevice::setRxGain(double dB, size_t chan) +{ + if (chan) { + LOG(ALERT) << "Invalid channel " << chan; + return 0.0; + } + double actual = 0; + LOG(NOTICE) << "Setting RX gain to " << dB << " dB."; + + int res = xtrx_set_gain(device, XTRX_CH_AB, XTRX_RX_LNA_GAIN, dB, &actual); + if (res) { + LOG(ERR) << "Error setting RX gain res: " << res; + } + + return actual; +} + +// NOTE: Assumes sequential reads +int XTRXDevice::readSamples(std::vector &bufs, int len, bool *overrun, + TIMESTAMP timestamp, bool *underrun, unsigned *RSSI) +{ + if (!started) + return -1; + + struct xtrx_recv_ex_info ri; + ri.samples = len; + ri.buffer_count = bufs.size(); + ri.buffers = (void* const*)&bufs[0]; + ri.flags = 0; + + int res = xtrx_recv_sync_ex(device, &ri); + if (res) { + LOG(ALERT) << "xtrx_recv_sync failed res " << res << " current TS " << timeRx << " req TS" << timestamp; + return -1; + } + timeRx += len; + + // TODO get rid of it! + int i; + for (i = 0; i < len * 2; i++) + bufs[0][i] <<= 4; + + if (underrun) { + *underrun = (ri.out_events & RCVEX_EVENT_FILLED_ZERO); + } + return len; + +} + +int XTRXDevice::writeSamples(std::vector &bufs, int len, + bool *underrun, unsigned long long timestamp, + bool isControl) +{ + if (!started) + return 0; + + xtrx_send_ex_info_t nfo; + nfo.buffers = (const void* const*)&bufs[0]; + nfo.buffer_count = bufs.size(); + nfo.flags = XTRX_TX_DONT_BUFFER; + nfo.samples = len; + nfo.ts = timestamp - time_tx_corr; + + int res = xtrx_send_sync_ex(device, &nfo); + if (res != 0) { + LOG(ALERT) << "xtrx_send_sync_ex returned " << res << " len=" << len << " ts=" << timestamp; + return 0; + } + + if (*underrun) { + *underrun = (nfo.out_flags & XTRX_TX_DISCARDED_TO); + } + + return len; +} + +bool XTRXDevice::setRxAntenna(const std::string & ant, size_t chan) +{ + LOG(ALERT) << "CH" << chan << ": RX ANTENNA: " << ant.c_str(); + return true; +} + +std::string XTRXDevice::getRxAntenna(size_t chan) +{ + return ""; +} + +bool XTRXDevice::setTxAntenna(const std::string & ant, size_t chan) +{ + LOG(ALERT) << "CH" << chan << ": TX ANTENNA: " << ant.c_str(); + return true; +} + +std::string XTRXDevice::getTxAntenna(size_t chan ) +{ + return ""; +} + + +bool XTRXDevice::requiresRadioAlign() +{ + return false; +} + +GSM::Time XTRXDevice::minLatency() +{ + return GSM::Time(6,7); +} + +bool XTRXDevice::updateAlignment(TIMESTAMP timestamp) +{ + LOG(ALERT) << "Update Aligment " << timestamp; + return true; +} + +bool XTRXDevice::setTxFreq(double wFreq, size_t chan) +{ + int res; + double actual = 0; + + if (chan) { + LOG(ALERT) << "Invalid channel " << chan; + return false; + } + + if ((res = xtrx_tune(device, XTRX_TUNE_TX_FDD, wFreq, &actual)) == 0) { + LOG(INFO) << "set RX: " << wFreq << std::endl + << " actual freq: " << actual << std::endl; + return true; + } + else { + LOG(ALERT) << "set RX: " << wFreq << "failed (code: " << res << ")" << std::endl; + return false; + } +} + +bool XTRXDevice::setRxFreq(double wFreq, size_t chan) +{ + int res; + double actual = 0; + + if (chan) { + LOG(ALERT) << "Invalid channel " << chan; + return false; + } + + if ((res = xtrx_tune(device, XTRX_TUNE_RX_FDD, wFreq, &actual)) == 0) { + LOG(INFO) << "set RX: " << wFreq << std::endl + << " actual freq: " << actual << std::endl; + return true; + } + else { + LOG(ALERT) << "set RX: " << wFreq << "failed (code: " << res << ")" << std::endl; + return false; + } +} + +RadioDevice *RadioDevice::make(size_t tx_sps, size_t rx_sps, + InterfaceType iface, size_t chans, double lo_offset, + const std::vector < std::string > &tx_paths, + const std::vector < std::string > &rx_paths) +{ + return new XTRXDevice(tx_sps, rx_sps, iface, chans, lo_offset, tx_paths, rx_paths); +} diff --git a/Transceiver52M/device/xtrx/XTRXDevice.h b/Transceiver52M/device/xtrx/XTRXDevice.h new file mode 100644 index 0000000..86b2d01 --- /dev/null +++ b/Transceiver52M/device/xtrx/XTRXDevice.h @@ -0,0 +1,176 @@ +#ifndef _XTRX_DEVICE_H_ +#define _XTRX_DEVICE_H_ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "radioDevice.h" + +#include +#include +#include +#include + +#include "Threads.h" +#include + +class XTRXDevice: public RadioDevice { +private: + int txsps; + int rxsps; + double actualTXSampleRate; ///< the actual XTRX sampling rate + double actualRXSampleRate; ///< the actual XTRX sampling rate + //unsigned int decimRate; ///< the XTRX decimation rate + //unsigned int interRate; ///< the XTRX decimation rate + + unsigned long long samplesRead; ///< number of samples read from XTRX + unsigned long long samplesWritten; ///< number of samples sent to XTRX + + bool started; ///< flag indicates XTRX has started + + short *data; + unsigned long dataStart; + unsigned long dataEnd; + TIMESTAMP timeStart; + TIMESTAMP timeEnd; + + TIMESTAMP timeRx; + bool isAligned; + + Mutex writeLock; + + short *currData; ///< internal data buffer when reading from XTRX + TIMESTAMP currTimestamp; ///< timestamp of internal data buffer + unsigned currLen; ///< size of internal data buffer + + TIMESTAMP timestampOffset; ///< timestamp offset b/w Tx and Rx blocks + TIMESTAMP latestWriteTimestamp; ///< timestamp of most recent ping command + TIMESTAMP pingTimestamp; ///< timestamp of most recent ping response + + unsigned long hi32Timestamp; + unsigned long lastPktTimestamp; + + double rxGain; + bool loopback; + + xtrx_dev* device; +public: + + /** Object constructor */ + XTRXDevice(size_t tx_sps, size_t rx_sps, InterfaceType iface, size_t chans, double lo_offset, + const std::vector& tx_paths, + const std::vector& rx_paths); + + ~XTRXDevice(); + + /** Instantiate the XTRX */ + int open(const std::string &args, int ref, bool swap_channels); + + /** Start the XTRX */ + bool start(); + + /** Stop the XTRX */ + bool stop(); + + /** Set priority not supported */ + void setPriority(float prio = 0.5) { } + + enum TxWindowType getWindowType() { return TX_WINDOW_FIXED; } + + /** + Read samples from the XTRX. + @param buf preallocated buf to contain read result + @param len number of samples desired + @param overrun Set if read buffer has been overrun, e.g. data not being read fast enough + @param timestamp The timestamp of the first samples to be read + @param underrun Set if XTRX does not have data to transmit, e.g. data not being sent fast enough + @param RSSI The received signal strength of the read result + @return The number of samples actually read + */ + int readSamples(std::vector &buf, int len, bool *overrun, + TIMESTAMP timestamp = 0xffffffff, bool *underrun = NULL, + unsigned *RSSI = NULL); + /** + Write samples to the XTRX. + @param buf Contains the data to be written. + @param len number of samples to write. + @param underrun Set if XTRX does not have data to transmit, e.g. data not being sent fast enough + @param timestamp The timestamp of the first sample of the data buffer. + @param isControl Set if data is a control packet, e.g. a ping command + @return The number of samples actually written + */ + int writeSamples(std::vector &bufs, int len, bool *underrun, + TIMESTAMP timestamp = 0xffffffff, bool isControl = false); + + /** Update the alignment between the read and write timestamps */ + bool updateAlignment(TIMESTAMP timestamp); + + /** Set the transmitter frequency */ + bool setTxFreq(double wFreq, size_t chan = 0); + + /** Set the receiver frequency */ + bool setRxFreq(double wFreq, size_t chan = 0); + + /** Returns the starting write Timestamp*/ + TIMESTAMP initialWriteTimestamp(void); + + /** Returns the starting read Timestamp*/ + TIMESTAMP initialReadTimestamp(void) { return 20000;} + + /** returns the full-scale transmit amplitude **/ + double fullScaleInputValue() {return (double) 32767*0.7;} + + /** returns the full-scale receive amplitude **/ + double fullScaleOutputValue() {return (double) 32767;} + + /** sets the receive chan gain, returns the gain setting **/ + double setRxGain(double dB, size_t chan = 0); + + /** get the current receive gain */ + double getRxGain(size_t chan = 0) { return rxGain; } + + /** return maximum Rx Gain **/ + double maxRxGain(void); + + /** return minimum Rx Gain **/ + double minRxGain(void); + + /** sets the transmit chan gain, returns the gain setting **/ + double setTxGain(double dB, size_t chan = 0); + + /** return maximum Tx Gain **/ + double maxTxGain(void); + + /** return minimum Rx Gain **/ + double minTxGain(void); + + /** sets the RX path to use, returns true if successful and false otherwise */ + bool setRxAntenna(const std::string & ant, size_t chan = 0); + + /** return the used RX path */ + std::string getRxAntenna(size_t chan = 0); + + /** sets the RX path to use, returns true if successful and false otherwise */ + bool setTxAntenna(const std::string & ant, size_t chan = 0); + + /** return the used RX path */ + std::string getTxAntenna(size_t chan = 0); + + /** return whether user drives synchronization of Tx/Rx of USRP */ + bool requiresRadioAlign(); + + /** return whether user drives synchronization of Tx/Rx of USRP */ + virtual GSM::Time minLatency(); + + /** Return internal status values */ + inline double getTxFreq(size_t chan = 0) { return 0; } + inline double getRxFreq(size_t chan = 0) { return 0; } + inline double getSampleRate() { return actualTXSampleRate; } + inline double numberRead() { return samplesRead; } + inline double numberWritten() { return samplesWritten; } + +}; + +#endif // _XTRX_DEVICE_H_ + diff --git a/configure.ac b/configure.ac index e2a07f8..26a3844 100644 --- a/configure.ac +++ b/configure.ac @@ -125,6 +125,11 @@ [enable LimeSuite based transceiver]) ]) +AC_ARG_WITH(xtrx, [ + AS_HELP_STRING([--with-xtrx], + [enable XTRX based transceiver]) +]) + AC_ARG_WITH(singledb, [ AS_HELP_STRING([--with-singledb], [enable single daughterboard use on USRP1]) @@ -164,6 +169,10 @@ PKG_CHECK_MODULES(LMS, LimeSuite) ]) +AS_IF([test "x$with_xtrx" = "xyes"], [ + PKG_CHECK_MODULES(XTRX, libxtrx) +]) + AS_IF([test "x$with_uhd" != "xno"],[ PKG_CHECK_MODULES(UHD, uhd >= 003.011, [AC_DEFINE(USE_UHD_3_11, 1, UHD version 3.11.0 or higher)], @@ -216,6 +225,7 @@ AM_CONDITIONAL(DEVICE_UHD, [test "x$with_uhd" != "xno"]) AM_CONDITIONAL(DEVICE_USRP1, [test "x$with_usrp1" = "xyes"]) AM_CONDITIONAL(DEVICE_LMS, [test "x$with_lms" = "xyes"]) +AM_CONDITIONAL(DEVICE_XTRX, [test "x$with_xtrx" = "xyes"]) AM_CONDITIONAL(ARCH_ARM, [test "x$with_neon" = "xyes" || test "x$with_neon_vfpv4" = "xyes"]) AM_CONDITIONAL(ARCH_ARM_A15, [test "x$with_neon_vfpv4" = "xyes"]) @@ -300,6 +310,7 @@ Transceiver52M/device/uhd/Makefile \ Transceiver52M/device/usrp1/Makefile \ Transceiver52M/device/lms/Makefile \ + Transceiver52M/device/xtrx/Makefile \ tests/Makefile \ tests/CommonLibs/Makefile \ tests/Transceiver52M/Makefile \ diff --git a/contrib/systemd/Makefile.am b/contrib/systemd/Makefile.am index 800b1e1..7ccd293 100644 --- a/contrib/systemd/Makefile.am +++ b/contrib/systemd/Makefile.am @@ -1,7 +1,8 @@ EXTRA_DIST = \ osmo-trx-lms.service \ osmo-trx-uhd.service \ - osmo-trx-usrp1.service + osmo-trx-usrp1.service \ + osmo-trx-xtrx.service if HAVE_SYSTEMD SYSTEMD_SERVICES = @@ -18,5 +19,9 @@ SYSTEMD_SERVICES += osmo-trx-lms.service endif +if DEVICE_XTRX +SYSTEMD_SERVICES += osmo-trx-xtrx.service +endif + systemdsystemunit_DATA = $(SYSTEMD_SERVICES) endif # HAVE_SYSTEMD diff --git a/contrib/systemd/osmo-trx-xtrx.service b/contrib/systemd/osmo-trx-xtrx.service new file mode 100644 index 0000000..c131812 --- /dev/null +++ b/contrib/systemd/osmo-trx-xtrx.service @@ -0,0 +1,11 @@ +[Unit] +Description=Osmocom SDR BTS L1 Transceiver (XTRX backend) + +[Service] +Type=simple +Restart=always +ExecStart=/usr/bin/osmo-trx-xtrx -C /etc/osmocom/osmo-trx-xtrx.cfg +RestartSec=2 + +[Install] +WantedBy=multi-user.target diff --git a/debian/control b/debian/control index ffb9ac1..680bead 100644 --- a/debian/control +++ b/debian/control @@ -89,3 +89,22 @@ 3GPP is the "3rd Generation Partnership Project" which is the collaboration between different telecommunication associations for developing new generations of mobile phone networks. (post-2G/GSM) + +Package: osmo-trx-xtrx +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: SDR transceiver that implements Layer 1 of a GSM BTS (XTRX) + OsmoTRX is a software-defined radio transceiver that implements the Layer 1 + physical layer of a BTS comprising the following 3GPP specifications: + . + TS 05.01 "Physical layer on the radio path" + TS 05.02 "Multiplexing and Multiple Access on the Radio Path" + TS 05.04 "Modulation" + TS 05.10 "Radio subsystem synchronization" + . + In this context, BTS is "Base transceiver station". It's the stations that + connect mobile phones to the mobile network. + . + 3GPP is the "3rd Generation Partnership Project" which is the collaboration + between different telecommunication associations for developing new + generations of mobile phone networks. (post-2G/GSM) diff --git a/debian/osmo-trx-xtrx.install b/debian/osmo-trx-xtrx.install new file mode 100644 index 0000000..8601346 --- /dev/null +++ b/debian/osmo-trx-xtrx.install @@ -0,0 +1,4 @@ +etc/osmocom/osmo-trx-xtrx.cfg +lib/systemd/system/osmo-trx-xtrx.service +/usr/bin/osmo-trx-xtrx +/usr/share/doc/osmo-trx/examples/osmo-trx-xtrx/osmo-trx-xtrx.cfg /usr/share/doc/osmo-trx/examples/osmo-trx-xtrx/ diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am index 88d9142..4b52834 100644 --- a/doc/examples/Makefile.am +++ b/doc/examples/Makefile.am @@ -14,6 +14,10 @@ OSMOCONF_FILES += osmo-trx-lms/osmo-trx-lms.cfg endif +if DEVICE_XTRX +OSMOCONF_FILES += osmo-trx-xtrx/osmo-trx-xtrx.cfg +endif + osmoconf_DATA = $(OSMOCONF_FILES) EXTRA_DIST = $(OSMOCONF_FILES) diff --git a/doc/examples/osmo-trx-xtrx/osmo-trx-xtrx.cfg b/doc/examples/osmo-trx-xtrx/osmo-trx-xtrx.cfg new file mode 100644 index 0000000..e2c67d6 --- /dev/null +++ b/doc/examples/osmo-trx-xtrx/osmo-trx-xtrx.cfg @@ -0,0 +1,22 @@ +log stderr + logging filter all 1 + logging color 1 + logging print category 1 + logging timestamp 1 + logging print file basename + logging level set-all info +! +line vty + no login +! +trx + bind-ip 127.0.0.1 + remote-ip 127.0.0.1 + base-port 5700 + egprs disable + tx-sps 4 + rx-sps 4 + rt-prio 18 + chan 0 + tx-path BAND1 + rx-path LNAW -- To view, visit https://gerrit.osmocom.org/14018 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Iad73e0611e7951d5bcfcc918063cc3778cb1dd8f Gerrit-Change-Number: 14018 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 16:16:14 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Mon, 13 May 2019 16:16:14 +0000 Subject: Change in osmo-trx[master]: add support for xtrx In-Reply-To: References: Message-ID: lynxis lazus has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/14018 ) Change subject: add support for xtrx ...................................................................... add support for xtrx Based on the github.com/xtrx-sdr/osmo-trx 0f8ccd7ac31e617bf803c58252e4f310e19e0bc8 Change-Id: Iad73e0611e7951d5bcfcc918063cc3778cb1dd8f --- M Transceiver52M/Makefile.am M Transceiver52M/device/Makefile.am A Transceiver52M/device/xtrx/Makefile.am A Transceiver52M/device/xtrx/XTRXDevice.cpp A Transceiver52M/device/xtrx/XTRXDevice.h M configure.ac M contrib/systemd/Makefile.am A contrib/systemd/osmo-trx-xtrx.service M debian/control A debian/osmo-trx-xtrx.install M doc/examples/Makefile.am A doc/examples/osmo-trx-xtrx/osmo-trx-xtrx.cfg 12 files changed, 729 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/18/14018/2 -- To view, visit https://gerrit.osmocom.org/14018 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iad73e0611e7951d5bcfcc918063cc3778cb1dd8f Gerrit-Change-Number: 14018 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-CC: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 16:20:54 2019 From: gerrit-no-reply at lists.osmocom.org (Vasil Velichkov) Date: Mon, 13 May 2019 16:20:54 +0000 Subject: Change in libosmocore[master]: Add code coverage support In-Reply-To: References: Message-ID: Vasil Velichkov has posted comments on this change. ( https://gerrit.osmocom.org/13496 ) Change subject: Add code coverage support ...................................................................... Patch Set 6: > Patch Set 6: Verified-1 > > Build Failed > > https://jenkins.osmocom.org/jenkins/job/gerrit-libosmocore/1932/ : FAILURE It seems the Docker containers are not used for this build. > checking for lcov... no checking for genhtml... no Let me know if I have to modify some of the ansible playbooks. Here is the summary of changes in patchset 6: - Rename osmo_code_coverage.m4 to osmo_ac_code_coverage.m4 and OSMO_CODE_COVERAGE to OSMO_AC_CODE_COVERAGE. When the macro name contains _AC_ and is not defined autoreconf returns an error - Check whether the compiler supports `--coverage` flag. - Add the coverage flags to CFLAGS and remove CODE_COVERAGE_CPPFLAGS and CODE_COVERAGE_LIBS from the various Makefile.am - Add usr/share/aclocal/osmo*.m4 to debian/libosmocore-dev.install -- To view, visit https://gerrit.osmocom.org/13496 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6f4ffb91bd7f3dd070aa09dd16d5ad1faf130a4c Gerrit-Change-Number: 13496 Gerrit-PatchSet: 6 Gerrit-Owner: Vasil Velichkov Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: Vasil Velichkov Gerrit-Comment-Date: Mon, 13 May 2019 16:20:54 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 16:27:58 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 16:27:58 +0000 Subject: Change in osmo-trx[master]: add support for xtrx In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14018 ) Change subject: add support for xtrx ...................................................................... Patch Set 1: (11 comments) Some comments after quick review. https://gerrit.osmocom.org/#/c/14018/1/Transceiver52M/device/xtrx/XTRXDevice.cpp File Transceiver52M/device/xtrx/XTRXDevice.cpp: https://gerrit.osmocom.org/#/c/14018/1/Transceiver52M/device/xtrx/XTRXDevice.cpp at 44 PS1, Line 44: LOG(INFO) << "creating XTRX device:" You should be using category DEV here, not MAIN (see other devices). https://gerrit.osmocom.org/#/c/14018/1/Transceiver52M/device/xtrx/XTRXDevice.cpp at 162 PS1, Line 162: return NORMAL; This NORMAL thing here makes no sense in the context of this function afaik. https://gerrit.osmocom.org/#/c/14018/1/Transceiver52M/device/xtrx/XTRXDevice.cpp at 167 PS1, Line 167: if (device) { Drop {} https://gerrit.osmocom.org/#/c/14018/1/Transceiver52M/device/xtrx/XTRXDevice.cpp at 175 PS1, Line 175: if (started) { Drop {} https://gerrit.osmocom.org/#/c/14018/1/Transceiver52M/device/xtrx/XTRXDevice.cpp at 212 PS1, Line 212: if (loopback) { Drop {} https://gerrit.osmocom.org/#/c/14018/1/Transceiver52M/device/xtrx/XTRXDevice.cpp at 231 PS1, Line 231: if (started) { early return: if (!started) reutrn false; https://gerrit.osmocom.org/#/c/14018/1/Transceiver52M/device/xtrx/XTRXDevice.cpp at 278 PS1, Line 278: LOG(NOTICE) << "Setting TX gain to " << dB << " dB."; LOGCHAN https://gerrit.osmocom.org/#/c/14018/1/Transceiver52M/device/xtrx/XTRXDevice.cpp at 282 PS1, Line 282: LOG(ERR) << "Error setting TX gain res: " << res; LOGCHAN. LOGCHAN everywhere where "chan" is passed as parameter in this file. https://gerrit.osmocom.org/#/c/14018/1/Transceiver52M/device/xtrx/XTRXDevice.cpp at 319 PS1, Line 319: int res = xtrx_recv_sync_ex(device, &ri); Looks like we need to add smpl_buf usage in here (see my latest commits merged). https://gerrit.osmocom.org/#/c/14018/1/debian/osmo-trx-xtrx.install File debian/osmo-trx-xtrx.install: https://gerrit.osmocom.org/#/c/14018/1/debian/osmo-trx-xtrx.install at 3 PS1, Line 3: /usr/bin/osmo-trx-xtrx why some strt with / and some doesn't? Unify style if possible. https://gerrit.osmocom.org/#/c/14018/1/doc/examples/osmo-trx-xtrx/osmo-trx-xtrx.cfg File doc/examples/osmo-trx-xtrx/osmo-trx-xtrx.cfg: https://gerrit.osmocom.org/#/c/14018/1/doc/examples/osmo-trx-xtrx/osmo-trx-xtrx.cfg at 21 PS1, Line 21: tx-path BAND1 Are you sure this belongs here? looks copied from LMS file. -- To view, visit https://gerrit.osmocom.org/14018 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iad73e0611e7951d5bcfcc918063cc3778cb1dd8f Gerrit-Change-Number: 14018 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 13 May 2019 16:27:58 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 16:59:51 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 16:59:51 +0000 Subject: Change in libosmocore[master]: gsm0808: Introduce Osmocom extensions to announce Osmux support In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14017 ) Change subject: gsm0808: Introduce Osmocom extensions to announce Osmux support ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14017 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I28f83e2e32b9533c99e65ccc1562900ac2aec74e Gerrit-Change-Number: 14017 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 13 May 2019 16:59:51 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 17:00:30 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 17:00:30 +0000 Subject: Change in osmocom-bb[master]: firmware/Makefile.inc: fix sections with overlapping VMA In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14006 ) Change subject: firmware/Makefile.inc: fix sections with overlapping VMA ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14006 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I098ddd33aabd7ec27981e2f09d8582f167bb649b Gerrit-Change-Number: 14006 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Mon, 13 May 2019 17:00:30 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 17:07:14 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 17:07:14 +0000 Subject: Change in libosmocore[master]: gsm0808: Introduce Osmocom extensions to announce Osmux support In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/14017 ) Change subject: gsm0808: Introduce Osmocom extensions to announce Osmux support ...................................................................... gsm0808: Introduce Osmocom extensions to announce Osmux support IE GSM0808_IE_OSMO_OSMUX_SUPPORT (T, 1 byte) is sent in AoIP appended to BSSMAP RESET in order to announce the peer that its MGW supports handling Osmux streams upon call set up. IE GSM0808_IE_OSMO_OSMUX_CID (TV, T 1 byte & V 1 byte) is sent in AoIP during call set up: * MSC->BSC Assignment Request * BSC->MSC Assignemnt Complete The 1 byte value contains the local Osmux CID, aka the recvCID aka CID where the peer sending the Assign Req/Compl will look for Osmux frames on that call. Hence, the peer receiving this CID value must use it to send Osmux frames for that call. As a result, a given call leg BSC<->MSC can have one different Osmux CID per direction. For example: * MS => MGW_BSC ==CID 0==> MGW_MSC * MS <= MGW_BSC <=CID 1=== MGW_MSC This allows for setups with 256 call legs per BSC on scenarios where NAT is not a problem, where MSC can have a pool of 256 CID per MGW_BSC (or remote peer). Related: OS#2551 Change-Id: I28f83e2e32b9533c99e65ccc1562900ac2aec74e --- M include/osmocom/gsm/gsm0808_utils.h M include/osmocom/gsm/protocol/gsm_08_08.h M src/gsm/gsm0808.c M src/gsm/gsm0808_utils.c M src/gsm/libosmogsm.map 5 files changed, 29 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/gsm/gsm0808_utils.h b/include/osmocom/gsm/gsm0808_utils.h index 3a7beb7..9cfaea6 100644 --- a/include/osmocom/gsm/gsm0808_utils.h +++ b/include/osmocom/gsm/gsm0808_utils.h @@ -100,6 +100,7 @@ const struct sockaddr_storage *ss); int gsm0808_dec_aoip_trasp_addr(struct sockaddr_storage *ss, const uint8_t *elem, uint8_t len); +int gsm0808_dec_osmux_cid(uint8_t *cid, const uint8_t *elem, uint8_t len); uint8_t gsm0808_enc_lcls(struct msgb *msg, const struct osmo_lcls *lcls); int gsm0808_dec_lcls(struct osmo_lcls *lcls, const struct tlv_parsed *tp); diff --git a/include/osmocom/gsm/protocol/gsm_08_08.h b/include/osmocom/gsm/protocol/gsm_08_08.h index aa01ee5..9806e08 100644 --- a/include/osmocom/gsm/protocol/gsm_08_08.h +++ b/include/osmocom/gsm/protocol/gsm_08_08.h @@ -303,6 +303,10 @@ GSM0808_IE_SELECTED_OPERATOR = 0x98, GSM0808_IE_PS_REGISTERED_OPERATOR = 0x99, GSM0808_IE_CS_REGISTERED_OPERATOR = 0x9a, + + /* Osmocom extensions: */ + GSM0808_IE_OSMO_OSMUX_SUPPORT = 0xf0, + GSM0808_IE_OSMO_OSMUX_CID = 0xf1, }; /* 3GPP TS 48.008 3.2.3 Signalling Field Element Coding */ diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c index 3c77c77..514d7f2 100644 --- a/src/gsm/gsm0808.c +++ b/src/gsm/gsm0808.c @@ -1387,6 +1387,10 @@ [GSM0808_IE_CN_TO_MS_TRANSP_INFO] = { TLV_TYPE_TLV }, [GSM0808_IE_SELECTED_PLMN_ID] = { TLV_TYPE_FIXED, 3 }, [GSM0808_IE_LAST_USED_EUTRAN_PLMN_ID] = { TLV_TYPE_FIXED, 3 }, + + /* Osmocom extensions */ + [GSM0808_IE_OSMO_OSMUX_SUPPORT] = { TLV_TYPE_T }, + [GSM0808_IE_OSMO_OSMUX_CID] = { TLV_TYPE_TV }, }, }; diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c index e825930..26f7944 100644 --- a/src/gsm/gsm0808_utils.c +++ b/src/gsm/gsm0808_utils.c @@ -172,6 +172,25 @@ return (int)(elem - old_elem); } +/*! Decode TS 08.08 (Osmocom Extension) Osmux CID + * TV with len(V) == 1, and V is the CID to be used. + * \param[out] cid Caller-provided variable where CID is stored + * \param[in] elem pointer to IE value + * \param[in] len length of \a elem in bytes + * \returns number of bytes parsed */ +int gsm0808_dec_osmux_cid(uint8_t *cid, const uint8_t *elem, uint8_t len) +{ + OSMO_ASSERT(cid); + if (!elem) + return -EINVAL; + if (len != 1) + return -EINVAL; + + *cid = *elem; + + return 1; +} + #endif /* HAVE_SYS_SOCKET_H */ /* Helper function for gsm0808_enc_speech_codec() diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 840bac9..0f4a0db 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -198,6 +198,7 @@ gsm0808_enc_cause; gsm0808_enc_aoip_trasp_addr; gsm0808_dec_aoip_trasp_addr; +gsm0808_dec_osmux_cid; gsm0808_enc_speech_codec; gsm0808_dec_speech_codec; gsm0808_enc_speech_codec_list; -- To view, visit https://gerrit.osmocom.org/14017 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I28f83e2e32b9533c99e65ccc1562900ac2aec74e Gerrit-Change-Number: 14017 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 17:10:59 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 17:10:59 +0000 Subject: Change in osmo-mgw[master]: cosmetic: mgcp_udp_send: Document port param is in network byte order Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14019 Change subject: cosmetic: mgcp_udp_send: Document port param is in network byte order ...................................................................... cosmetic: mgcp_udp_send: Document port param is in network byte order Change-Id: I7c4a388eba850ac066e60db089d46da0247773ec --- M src/libosmo-mgcp/mgcp_network.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/19/14019/1 diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 4d92051..dbed156 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -130,7 +130,7 @@ /*! send udp packet. * \param[in] fd associated file descriptor * \param[in] addr destination ip-address - * \param[in] port destination UDP port + * \param[in] port destination UDP port (network byte order) * \param[in] buf buffer that holds the data to be send * \param[in] len length of the data to be sent * \returns bytes sent, -1 on error */ -- To view, visit https://gerrit.osmocom.org/14019 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I7c4a388eba850ac066e60db089d46da0247773ec Gerrit-Change-Number: 14019 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 17:10:59 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 17:10:59 +0000 Subject: Change in osmo-mgw[master]: cosmetic: osmux: Document network byte order in port variable Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14020 Change subject: cosmetic: osmux: Document network byte order in port variable ...................................................................... cosmetic: osmux: Document network byte order in port variable Change-Id: Ia367ef08625265bc9cbdfcc693720a9b88852f4a --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/20/14020/1 diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 149f27b..d91cf68 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -35,7 +35,7 @@ struct llist_head head; struct osmux_in_handle *in; struct in_addr rem_addr; - int rem_port; + int rem_port; /* network byte order */ int refcnt; }; @@ -543,7 +543,7 @@ * \param[in] endp mgcp endpoint (configuration) * \param[in] conn connection to disable * \param[in] addr IP address of remote OSMUX endpoint - * \param[in] port portnumber of the remote OSMUX endpoint + * \param[in] port portnumber of the remote OSMUX endpoint (in network byte order) * \returns 0 on success, -1 on ERROR */ int osmux_enable_conn(struct mgcp_endpoint *endp, struct mgcp_conn_rtp *conn, struct in_addr *addr, uint16_t port) -- To view, visit https://gerrit.osmocom.org/14020 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ia367ef08625265bc9cbdfcc693720a9b88852f4a Gerrit-Change-Number: 14020 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 17:10:59 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 17:10:59 +0000 Subject: Change in osmo-mgw[master]: vty: Allow enabling Osmux Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14021 Change subject: vty: Allow enabling Osmux ...................................................................... vty: Allow enabling Osmux Change-Id: Ica2f82473bf1934502444be2325ee2049d938781 --- M src/libosmo-mgcp/mgcp_vty.c 1 file changed, 2 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/21/14021/1 diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 25d7a67..06aa7c8 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -1305,14 +1305,7 @@ if (strcmp(argv[0], "off") == 0) { g_cfg->osmux = OSMUX_USAGE_OFF; return CMD_SUCCESS; - } - - /* Since OSMUX support is not finished, we do not - * allow to turn it on yet. */ - vty_out(vty, "OSMUX currently unavailable in this software version.%s", VTY_NEWLINE); - return CMD_WARNING; -#if 0 - if (strcmp(argv[0], "on") == 0) + } else if (strcmp(argv[0], "on") == 0) g_cfg->osmux = OSMUX_USAGE_ON; else if (strcmp(argv[0], "only") == 0) g_cfg->osmux = OSMUX_USAGE_ONLY; @@ -1323,7 +1316,7 @@ } return CMD_SUCCESS; -#endif + } DEFUN(cfg_mgcp_osmux_ip, -- To view, visit https://gerrit.osmocom.org/14021 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ica2f82473bf1934502444be2325ee2049d938781 Gerrit-Change-Number: 14021 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 17:11:00 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 17:11:00 +0000 Subject: Change in osmo-mgw[master]: osmux: Allocate CID during CRCX Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14022 Change subject: osmux: Allocate CID during CRCX ...................................................................... osmux: Allocate CID during CRCX Change-Id: Ie0e1835ff7e99421de9a5741a5eb57a11c004f7e --- M src/libosmo-mgcp/mgcp_msg.c M src/libosmo-mgcp/mgcp_protocol.c 2 files changed, 15 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/22/14022/1 diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c index 5dae5a2..a31bff4 100644 --- a/src/libosmo-mgcp/mgcp_msg.c +++ b/src/libosmo-mgcp/mgcp_msg.c @@ -354,21 +354,27 @@ /*! Extract OSMUX CID from an MGCP parameter line (string). * \param[in] line single parameter line from the MGCP message - * \returns OSMUX CID, -1 on error */ + * \returns OSMUX CID, -1 wildcard, -2 on error */ int mgcp_parse_osmux_cid(const char *line) { int osmux_cid; + + if (strstr(line + 2, "Osmux: *")) { + LOGP(DLMGCP, LOGL_DEBUG, "Parsed wilcard Osmux CID\n"); + return -1; + } + if (sscanf(line + 2, "Osmux: %u", &osmux_cid) != 1) { LOGP(DLMGCP, LOGL_ERROR, "Failed parsing Osmux in MGCP msg line: %s\n", line); - return -1; + return -2; } if (osmux_cid > OSMUX_CID_MAX) { LOGP(DLMGCP, LOGL_ERROR, "Osmux ID too large: %u > %u\n", osmux_cid, OSMUX_CID_MAX); - return -1; + return -2; } LOGP(DLMGCP, LOGL_DEBUG, "bsc-nat offered Osmux CID %u\n", osmux_cid); diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 807e34a..0ec9c78 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -783,7 +783,7 @@ const char *callid = NULL; const char *mode = NULL; char *line; - int have_sdp = 0, osmux_cid = -1; + int have_sdp = 0, osmux_cid = -2; struct mgcp_conn_rtp *conn = NULL; struct mgcp_conn *_conn = NULL; char conn_name[512]; @@ -917,9 +917,12 @@ /* Annotate Osmux circuit ID and set it to negotiating state until this * is fully set up from the dummy load. */ conn->osmux.state = OSMUX_STATE_DISABLED; - if (osmux_cid >= 0) { - conn->osmux.cid = osmux_cid; + if (osmux_cid >= -1) { /* -1 is wilcard, alloc next avail CID */ conn->osmux.state = OSMUX_STATE_NEGOTIATING; + if (conn_osmux_allocate_cid(conn, osmux_cid) == -1) { + rate_ctr_inc(&rate_ctrs->ctr[MGCP_CRCX_FAIL_NO_OSMUX]); + goto error2; + } } else if (endp->cfg->osmux == OSMUX_USAGE_ONLY) { LOGPCONN(_conn, DLMGCP, LOGL_ERROR, "CRCX: osmux only and no osmux offered\n"); -- To view, visit https://gerrit.osmocom.org/14022 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ie0e1835ff7e99421de9a5741a5eb57a11c004f7e Gerrit-Change-Number: 14022 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 17:11:00 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 17:11:00 +0000 Subject: Change in osmo-mgw[master]: osmux: Introduce mgcp_conn_rtp_is_osmux() helper Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14023 Change subject: osmux: Introduce mgcp_conn_rtp_is_osmux() helper ...................................................................... osmux: Introduce mgcp_conn_rtp_is_osmux() helper This is going to be useful to know if a conn is to use Osmux without looking at implementation details. Currently we have some duplicated information (type, osmux.state, etc.) which we may want to refactor later. This will allow changing implementation details without caring much about rest of code. Change-Id: Ib5a239fdbc319bcb16317f5e959d9a724b7a444a --- M include/osmocom/mgcp/mgcp_internal.h 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/23/14023/1 diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index 82ff6c8..e9d5d2d 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -312,6 +312,11 @@ int mgcp_set_ip_tos(int fd, int tos); +/* Was conn configured to handle Osmux? */ +static inline bool mgcp_conn_rtp_is_osmux(const struct mgcp_conn_rtp *conn) { + return conn->type == MGCP_OSMUX_BSC || conn->type == MGCP_OSMUX_BSC_NAT; +} + enum { MGCP_DEST_NET = 0, MGCP_DEST_BTS, -- To view, visit https://gerrit.osmocom.org/14023 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ib5a239fdbc319bcb16317f5e959d9a724b7a444a Gerrit-Change-Number: 14023 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 17:11:00 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 17:11:00 +0000 Subject: Change in osmo-mgw[master]: osmux: Mark conn_rtp->type as osmux during CRCX Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14024 Change subject: osmux: Mark conn_rtp->type as osmux during CRCX ...................................................................... osmux: Mark conn_rtp->type as osmux during CRCX We also update code to allow setting up RTP related fields to succeed during CRCX. We also update code to allow setting up RTP related fields to succeed during CRCX. Change-Id: Ia6e723d9a28ba38fc3382a4fb35ea6e5bab30c09 --- M src/libosmo-mgcp/mgcp_osmux.c M src/libosmo-mgcp/mgcp_protocol.c 2 files changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/24/14024/1 diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index d91cf68..7290ba3 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -664,6 +664,7 @@ conn->osmux.cid = (uint8_t) osmux_cid; conn->osmux.cid_allocated = true; + conn->type = MGCP_OSMUX_BSC; return osmux_cid; } diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 0ec9c78..e1bf12b 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -147,7 +147,7 @@ struct mgcp_conn_rtp *conn_dst = conn; struct mgcp_conn *_conn; - if (conn->type != MGCP_RTP_DEFAULT) { + if (conn->type != MGCP_RTP_DEFAULT && !mgcp_conn_rtp_is_osmux(conn)) { LOGPENDP(endp, DLMGCP, LOGL_NOTICE, "RTP-setup: Endpoint is not configured as RTP default, stopping here!\n"); return 0; -- To view, visit https://gerrit.osmocom.org/14024 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ia6e723d9a28ba38fc3382a4fb35ea6e5bab30c09 Gerrit-Change-Number: 14024 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 17:11:01 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 17:11:01 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Allow submitting X-Osmux on CRCX request Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14025 Change subject: mgcp-cli: Allow submitting X-Osmux on CRCX request ...................................................................... mgcp-cli: Allow submitting X-Osmux on CRCX request Change-Id: I73b4c62baf39050da81d65553cbea07bc51163de --- M include/osmocom/mgcp/mgcp_common.h M include/osmocom/mgcp_client/mgcp_client.h M include/osmocom/mgcp_client/mgcp_client_fsm.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp-client/mgcp_client_fsm.c M tests/mgcp_client/mgcp_client_test.c M tests/mgcp_client/mgcp_client_test.ok 7 files changed, 62 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/25/14025/1 diff --git a/include/osmocom/mgcp/mgcp_common.h b/include/osmocom/mgcp/mgcp_common.h index 75d5a37..a1bbb19 100644 --- a/include/osmocom/mgcp/mgcp_common.h +++ b/include/osmocom/mgcp/mgcp_common.h @@ -50,6 +50,7 @@ }; #define MGCP_X_OSMO_IGN_HEADER "X-Osmo-IGN:" +#define MGCP_X_OSMO_OSMUX_HEADER "X-Osmux:" /* Values should be bitwise-OR-able */ enum mgcp_x_osmo_ign { diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index 9b57f10..be84356 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -95,6 +95,7 @@ #define MGCP_MSG_PRESENCE_AUDIO_IP 0x0008 #define MGCP_MSG_PRESENCE_AUDIO_PORT 0x0010 #define MGCP_MSG_PRESENCE_CONN_MODE 0x0020 +#define MGCP_MSG_PRESENCE_X_OSMO_OSMUX_CID 0x4000 #define MGCP_MSG_PRESENCE_X_OSMO_IGN 0x8000 struct mgcp_msg { @@ -113,6 +114,8 @@ 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; }; diff --git a/include/osmocom/mgcp_client/mgcp_client_fsm.h b/include/osmocom/mgcp_client/mgcp_client_fsm.h index e170a25..c763d74 100644 --- a/include/osmocom/mgcp_client/mgcp_client_fsm.h +++ b/include/osmocom/mgcp_client/mgcp_client_fsm.h @@ -48,6 +48,11 @@ * name than the BSC. An OsmoMGW will then ignore these and not fail on mismatches. */ uint32_t x_osmo_ign; + /*! send 'X-Osmux: %d' header (or "*" as wildcard). */ + bool x_osmo_osmux_use; + /*! -1 means send wildcard. */ + int x_osmo_osmux_cid; + /*! If left MGCP_CONN_NONE, use MGCP_CONN_RECV_ONLY or MGCP_CONN_RECV_SEND, depending on whether an audio RTP * address is set. If != MGCP_CONN_NONE, force this conn mode. */ enum mgcp_connection_mode conn_mode; diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index c28f5d2..bbef9ef 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -1104,6 +1104,7 @@ int rc = 0; int rc_sdp; bool use_sdp = false; + char buf[32]; msg->l2h = msg->data; msg->cb[MSGB_CB_MGCP_TRANS_ID] = trans_id; @@ -1207,6 +1208,15 @@ msgb_printf(msg, MGCP_X_OSMO_IGN_HEADER "%s\r\n", mgcp_msg->x_osmo_ign & MGCP_X_OSMO_IGN_CALLID ? " C": ""); + /* Add X-Osmo-Osmux */ + if ((mgcp_msg->presence & MGCP_MSG_PRESENCE_X_OSMO_OSMUX_CID)) { + snprintf(buf, sizeof(buf), " %d", mgcp_msg->x_osmo_osmux_cid); + rc += + msgb_printf(msg, MGCP_X_OSMO_OSMUX_HEADER "%s\r\n", + mgcp_msg->x_osmo_osmux_cid == -1 ? " *": buf); + } + + /* Add session description protocol (SDP) */ if (use_sdp && (mgcp_msg->verb == MGCP_VERB_CRCX diff --git a/src/libosmo-mgcp-client/mgcp_client_fsm.c b/src/libosmo-mgcp-client/mgcp_client_fsm.c index 75d583b..0d16720 100644 --- a/src/libosmo-mgcp-client/mgcp_client_fsm.c +++ b/src/libosmo-mgcp-client/mgcp_client_fsm.c @@ -126,6 +126,11 @@ mgcp_msg->x_osmo_ign = info->x_osmo_ign; mgcp_msg->presence |= MGCP_MSG_PRESENCE_X_OSMO_IGN; } + + if (info->x_osmo_osmux_use) { + mgcp_msg->x_osmo_osmux_cid = info->x_osmo_osmux_cid; + mgcp_msg->presence |= MGCP_MSG_PRESENCE_X_OSMO_OSMUX_CID; + } } static void add_audio(struct mgcp_msg *mgcp_msg, struct mgcp_conn_peer *info) diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index d610783..432a09c 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -157,6 +157,7 @@ .ptmap[0].pt = 96, .ptmap_len = 1, .x_osmo_ign = MGCP_X_OSMO_IGN_CALLID, + .x_osmo_osmux_cid = -1, /* wildcard */ }; if (mgcp) @@ -254,6 +255,27 @@ msg = mgcp_msg_gen(mgcp, &mgcp_msg); printf("%s\n", (char *)msg->data); + printf("Generate X-Osmo-Osmux message:\n"); + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + mgcp_msg.verb = MGCP_VERB_CRCX; + mgcp_msg.presence = + (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | + MGCP_MSG_PRESENCE_CONN_ID | MGCP_MSG_PRESENCE_CONN_MODE + | MGCP_MSG_PRESENCE_X_OSMO_OSMUX_CID); + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + printf("%s\n", (char *)msg->data); + + printf("Generate X-Osmo-Osmux message (fixed CID 2):\n"); + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + mgcp_msg.verb = MGCP_VERB_CRCX; + mgcp_msg.x_osmo_osmux_cid = 2; + mgcp_msg.presence = + (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | + MGCP_MSG_PRESENCE_CONN_ID | MGCP_MSG_PRESENCE_CONN_MODE + | MGCP_MSG_PRESENCE_X_OSMO_OSMUX_CID); + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + printf("%s\n", (char *)msg->data); + printf("Overfolow test:\n"); mgcp_msg.verb = MGCP_VERB_MDCX; mgcp_msg.presence = diff --git a/tests/mgcp_client/mgcp_client_test.ok b/tests/mgcp_client/mgcp_client_test.ok index 65b5298..8fbe3ae 100644 --- a/tests/mgcp_client/mgcp_client_test.ok +++ b/tests/mgcp_client/mgcp_client_test.ok @@ -84,6 +84,22 @@ M: sendrecv X-Osmo-IGN: C +Generate X-Osmo-Osmux message: +CRCX 13 23 at mgw MGCP 1.0 +C: 2f +I: 11 +L: p:20, a:GSM, nt:IN +M: sendrecv +X-Osmux: * + +Generate X-Osmo-Osmux message (fixed CID 2): +CRCX 15 23 at mgw MGCP 1.0 +C: 2f +I: 11 +L: p:20, a:GSM, nt:IN +M: sendrecv +X-Osmux: 2 + Overfolow test: -- To view, visit https://gerrit.osmocom.org/14025 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I73b4c62baf39050da81d65553cbea07bc51163de Gerrit-Change-Number: 14025 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 17:11:01 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 17:11:01 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Parse X-Osmux on CRCX response Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14026 Change subject: mgcp-cli: Parse X-Osmux on CRCX response ...................................................................... mgcp-cli: Parse X-Osmux on CRCX response Change-Id: I6174d092b7425b8d3d6d02a55bf294be3e710e6a --- M include/osmocom/mgcp_client/mgcp_client.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp-client/mgcp_client_fsm.c 3 files changed, 56 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/26/14026/1 diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index be84356..32bd87b 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -67,6 +67,8 @@ 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 { diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index bbef9ef..d65a799 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -393,6 +393,40 @@ return -EINVAL; } +/*! Extract OSMUX CID from an MGCP parameter line (string). + * \param[in] line single parameter line from the MGCP message + * \returns OSMUX CID, -1 wildcard, -2 on error + * FIXME: This is a copy of function in mgcp_msg.c. Have some common.c file between both libs? + */ +static int mgcp_parse_osmux_cid(const char *line) +{ + int osmux_cid; + + + if (strstr(line + 2, "Osmux: *")) { + LOGP(DLMGCP, LOGL_DEBUG, "Parsed wilcard Osmux CID\n"); + return -1; + } + + if (sscanf(line + 2, "Osmux: %u", &osmux_cid) != 1) { + LOGP(DLMGCP, LOGL_ERROR, "Failed parsing Osmux in MGCP msg line: %s\n", + line); + return -2; + } + +#ifndef OSMUX_CID_MAX +#define OSMUX_CID_MAX 255 /* FIXME: use OSMUX_CID_MAX from libosmo-netif? */ +#endif + if (osmux_cid > OSMUX_CID_MAX) { /* OSMUX_CID_MAX from libosmo-netif */ + LOGP(DLMGCP, LOGL_ERROR, "Osmux ID too large: %u > %u\n", + osmux_cid, OSMUX_CID_MAX); + return -2; + } + LOGP(DLMGCP, LOGL_DEBUG, "bsc-nat offered Osmux CID %u\n", osmux_cid); + + return osmux_cid; +} + /* A new section is marked by a double line break, check a few more * patterns as there may be variants */ static char *mgcp_find_section_end(char *string) @@ -567,6 +601,21 @@ if (rc) goto exit; break; + case 'X': + if (strncmp("Osmux: ", line + 2, strlen("Osmux: ")) == 0) { + rc = mgcp_parse_osmux_cid(line); + if (rc < 0) { + /* -1: we don't want wildcards in response. -2: error */ + rc = -EINVAL; + goto exit; + } + r->head.x_osmo_osmux_use = true; + r->head.x_osmo_osmux_cid = (uint8_t) rc; + rc = 0; + break; + } + /* Ignore unknown X-headers */ + break; default: /* skip unhandled parameters */ break; diff --git a/src/libosmo-mgcp-client/mgcp_client_fsm.c b/src/libosmo-mgcp-client/mgcp_client_fsm.c index 0d16720..efbb365 100644 --- a/src/libosmo-mgcp-client/mgcp_client_fsm.c +++ b/src/libosmo-mgcp-client/mgcp_client_fsm.c @@ -275,6 +275,11 @@ return; } LOGPFSML(fi, LOGL_DEBUG, "MGW/CRCX: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + if(r->head.x_osmo_osmux_use) { + LOGPFSML(fi, LOGL_DEBUG, "MGW/CRCX: MGW responded using Osmux %u\n", r->head.x_osmo_osmux_cid); + mgcp_ctx->conn_peer_remote.x_osmo_osmux_use = true; + mgcp_ctx->conn_peer_remote.x_osmo_osmux_cid = r->head.x_osmo_osmux_cid; + } osmo_strlcpy(mgcp_ctx->conn_peer_remote.addr, r->audio_ip, sizeof(mgcp_ctx->conn_peer_remote.addr)); mgcp_ctx->conn_peer_remote.port = r->audio_port; -- To view, visit https://gerrit.osmocom.org/14026 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I6174d092b7425b8d3d6d02a55bf294be3e710e6a Gerrit-Change-Number: 14026 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 17:11:01 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 17:11:01 +0000 Subject: Change in osmo-mgw[master]: osmux: Handle Osmux MGCP extension in MDCX messages Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14027 Change subject: osmux: Handle Osmux MGCP extension in MDCX messages ...................................................................... osmux: Handle Osmux MGCP extension in MDCX messages Change-Id: I65e53bd5dd08b58c253e03d2f358f3be523a2688 --- M src/libosmo-mgcp/mgcp_protocol.c 1 file changed, 30 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/27/14027/1 diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index e1bf12b..35141f8 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -1048,6 +1048,7 @@ const char *mode = NULL; struct mgcp_conn_rtp *conn = NULL; const char *conn_id = NULL; + int osmux_cid = -2; int rc; LOGPENDP(endp, DLMGCP, LOGL_NOTICE, "MDCX: modifying existing connection ...\n"); @@ -1095,6 +1096,16 @@ case 'Z': silent = strcmp("noanswer", line + 3) == 0; break; + case 'X': + if (strncmp("Osmux: ", line + 2, strlen("Osmux: ")) == 0) { + /* If osmux is disabled, just skip setting it up */ + if (!p->endp->cfg->osmux) + break; + osmux_cid = mgcp_osmux_setup(endp, line); + break; + } + /* Ignore unknown X-headers */ + break; case '\0': have_sdp = 1; goto mgcp_header_done; @@ -1166,6 +1177,25 @@ goto error3; } + if (mgcp_conn_rtp_is_osmux(conn)) { + OSMO_ASSERT(conn->osmux.cid_allocated); + if (osmux_cid < -1) { + LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, + "MDCX: Failed to parse Osmux CID!\n"); + goto error3; + } else if (osmux_cid == -1) { + LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, + "MDCX: wilcard in MDCX is not supported!\n"); + goto error3; + } else if (osmux_cid != (int) conn->osmux.cid) { + LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, + "MDCX: changing already allocated CID is not supported!\n"); + goto error3; + } + /* TODO: In the future (when we have recvCID!=sendCID), we need to + tell Osmux code that osmux_cid is to be used as sendCID for + that conn. */ + } if (setup_rtp_processing(endp, conn) != 0) { rate_ctr_inc(&rate_ctrs->ctr[MGCP_MDCX_FAIL_START_RTP]); -- To view, visit https://gerrit.osmocom.org/14027 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I65e53bd5dd08b58c253e03d2f358f3be523a2688 Gerrit-Change-Number: 14027 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 17:11:01 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 17:11:01 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Allow submitting X-Osmux on MDCX request Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14028 Change subject: mgcp-cli: Allow submitting X-Osmux on MDCX request ...................................................................... mgcp-cli: Allow submitting X-Osmux on MDCX request Change-Id: I41243f3ed212ace6087d5b0341e3a52f4069e37d --- M src/libosmo-mgcp-client/mgcp_client_fsm.c M tests/mgcp_client/mgcp_client_test.c M tests/mgcp_client/mgcp_client_test.ok 3 files changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/28/14028/1 diff --git a/src/libosmo-mgcp-client/mgcp_client_fsm.c b/src/libosmo-mgcp-client/mgcp_client_fsm.c index efbb365..0bbe24b 100644 --- a/src/libosmo-mgcp-client/mgcp_client_fsm.c +++ b/src/libosmo-mgcp-client/mgcp_client_fsm.c @@ -173,6 +173,11 @@ set_conn_mode(&mgcp_msg, &mgcp_ctx->conn_peer_local); + if (mgcp_ctx->conn_peer_local.x_osmo_osmux_use) { + mgcp_msg.x_osmo_osmux_cid = mgcp_ctx->conn_peer_local.x_osmo_osmux_cid; + mgcp_msg.presence |= MGCP_MSG_PRESENCE_X_OSMO_OSMUX_CID; + } + /* Note: We take the endpoint and the call_id from the remote * connection info, because we can be confident that the * information there is valid. For the local info, we explicitly diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index 432a09c..9c4392f 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -276,6 +276,17 @@ msg = mgcp_msg_gen(mgcp, &mgcp_msg); printf("%s\n", (char *)msg->data); + printf("Generate X-Osmo-Osmux message (MDCX):\n"); + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + mgcp_msg.verb = MGCP_VERB_MDCX; + mgcp_msg.x_osmo_osmux_cid = 2; + mgcp_msg.presence = + (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | + MGCP_MSG_PRESENCE_CONN_ID | MGCP_MSG_PRESENCE_CONN_MODE + | MGCP_MSG_PRESENCE_X_OSMO_OSMUX_CID); + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + printf("%s\n", (char *)msg->data); + printf("Overfolow test:\n"); mgcp_msg.verb = MGCP_VERB_MDCX; mgcp_msg.presence = diff --git a/tests/mgcp_client/mgcp_client_test.ok b/tests/mgcp_client/mgcp_client_test.ok index 8fbe3ae..8b3e15b 100644 --- a/tests/mgcp_client/mgcp_client_test.ok +++ b/tests/mgcp_client/mgcp_client_test.ok @@ -100,6 +100,14 @@ M: sendrecv X-Osmux: 2 +Generate X-Osmo-Osmux message (MDCX): +MDCX 17 23 at mgw MGCP 1.0 +C: 2f +I: 11 +L: p:20, a:GSM, nt:IN +M: sendrecv +X-Osmux: 2 + Overfolow test: -- To view, visit https://gerrit.osmocom.org/14028 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I41243f3ed212ace6087d5b0341e3a52f4069e37d Gerrit-Change-Number: 14028 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 17:11:02 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 17:11:02 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Parse X-Osmux on MDCX response Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14029 Change subject: mgcp-cli: Parse X-Osmux on MDCX response ...................................................................... mgcp-cli: Parse X-Osmux on MDCX response During MDCX state is already changed to ACTIVATING but we still want to send the local CID back to announce that we still use same local CID. Change-Id: If182a48743ebe03f97caf9034e49b9947014bdf9 --- M src/libosmo-mgcp-client/mgcp_client_fsm.c M src/libosmo-mgcp/mgcp_protocol.c 2 files changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/29/14029/1 diff --git a/src/libosmo-mgcp-client/mgcp_client_fsm.c b/src/libosmo-mgcp-client/mgcp_client_fsm.c index 0bbe24b..95594f1 100644 --- a/src/libosmo-mgcp-client/mgcp_client_fsm.c +++ b/src/libosmo-mgcp-client/mgcp_client_fsm.c @@ -404,6 +404,12 @@ } LOGPFSML(fi, LOGL_DEBUG, "MGW/MDCX: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + if(r->head.x_osmo_osmux_use) { + LOGPFSML(fi, LOGL_DEBUG, "MGW/CRCX: MGW responded using Osmux %u\n", r->head.x_osmo_osmux_cid); + mgcp_ctx->conn_peer_remote.x_osmo_osmux_use = true; + mgcp_ctx->conn_peer_remote.x_osmo_osmux_cid = r->head.x_osmo_osmux_cid; + } + osmo_strlcpy(mgcp_ctx->conn_peer_remote.addr, r->audio_ip, sizeof(mgcp_ctx->conn_peer_remote.addr)); mgcp_ctx->conn_peer_remote.port = r->audio_port; diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 35141f8..0c809cb 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -323,7 +323,7 @@ } /* Attach optional OSMUX parameters */ - if (conn->osmux.state == OSMUX_STATE_NEGOTIATING) { + if(mgcp_conn_rtp_is_osmux(conn)) { rc = msgb_printf(sdp, "X-Osmux: %u\r\n", conn->osmux.cid); if (rc < 0) goto error; -- To view, visit https://gerrit.osmocom.org/14029 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If182a48743ebe03f97caf9034e49b9947014bdf9 Gerrit-Change-Number: 14029 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 17:11:02 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 17:11:02 +0000 Subject: Change in osmo-mgw[master]: osmux: Drop unneeded OSMUX_STATE_NEGOTIATING Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14030 Change subject: osmux: Drop unneeded OSMUX_STATE_NEGOTIATING ...................................................................... osmux: Drop unneeded OSMUX_STATE_NEGOTIATING Change-Id: I94e7df3287d037975adc16c5ada05adf94269ead --- M include/osmocom/mgcp/osmux.h M src/libosmo-mgcp/mgcp_protocol.c 2 files changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/30/14030/1 diff --git a/include/osmocom/mgcp/osmux.h b/include/osmocom/mgcp/osmux.h index c080c85..eb05610 100644 --- a/include/osmocom/mgcp/osmux.h +++ b/include/osmocom/mgcp/osmux.h @@ -28,7 +28,6 @@ enum osmux_state { OSMUX_STATE_DISABLED = 0, /* Osmux not being currently used by endp */ - OSMUX_STATE_NEGOTIATING, /* Osmux was locally requested in MGCP CRCX */ OSMUX_STATE_ACTIVATING, /* Osmux was accepted in MGCP CRCX ACK. It can now be enabled by \ref osmux_enable_endpoint. */ OSMUX_STATE_ENABLED, /* Osmux was initialized by \ref osmux_enable_endpoint and can process frames */ }; diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 0c809cb..4b0be07 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -327,7 +327,6 @@ rc = msgb_printf(sdp, "X-Osmux: %u\r\n", conn->osmux.cid); if (rc < 0) goto error; - conn->osmux.state = OSMUX_STATE_ACTIVATING; } /* Attach line break to separate the parameters from the SDP block */ @@ -918,7 +917,7 @@ * is fully set up from the dummy load. */ conn->osmux.state = OSMUX_STATE_DISABLED; if (osmux_cid >= -1) { /* -1 is wilcard, alloc next avail CID */ - conn->osmux.state = OSMUX_STATE_NEGOTIATING; + conn->osmux.state = OSMUX_STATE_ACTIVATING; if (conn_osmux_allocate_cid(conn, osmux_cid) == -1) { rate_ctr_inc(&rate_ctrs->ctr[MGCP_CRCX_FAIL_NO_OSMUX]); goto error2; -- To view, visit https://gerrit.osmocom.org/14030 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I94e7df3287d037975adc16c5ada05adf94269ead Gerrit-Change-Number: 14030 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 17:11:03 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 17:11:03 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: endpoint_fsm: Add API to retrieve Osmux CID from MGW Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14031 Change subject: mgcp-cli: endpoint_fsm: Add API to retrieve Osmux CID from MGW ...................................................................... mgcp-cli: endpoint_fsm: Add API to retrieve Osmux CID from MGW Change-Id: Ic80d47f8eedda1c6ac8c33f1cafeb55c65e74692 --- M include/osmocom/mgcp_client/mgcp_client_endpoint_fsm.h M src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c 2 files changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/31/14031/1 diff --git a/include/osmocom/mgcp_client/mgcp_client_endpoint_fsm.h b/include/osmocom/mgcp_client/mgcp_client_endpoint_fsm.h index 73de292..d77371a 100644 --- a/include/osmocom/mgcp_client/mgcp_client_endpoint_fsm.h +++ b/include/osmocom/mgcp_client/mgcp_client_endpoint_fsm.h @@ -21,6 +21,7 @@ struct osmo_mgcpc_ep_ci *osmo_mgcpc_ep_ci_add(struct osmo_mgcpc_ep *ep, const char *label_fmt, ...); const struct mgcp_conn_peer *osmo_mgcpc_ep_ci_get_rtp_info(const struct osmo_mgcpc_ep_ci *ci); bool osmo_mgcpc_ep_ci_get_crcx_info_to_sockaddr(const struct osmo_mgcpc_ep_ci *ci, struct sockaddr_storage *dest); +bool osmo_mgcpc_ep_ci_get_crcx_info_to_osmux_cid(const struct osmo_mgcpc_ep_ci *ci, uint8_t* cid); void osmo_mgcpc_ep_ci_request(struct osmo_mgcpc_ep_ci *ci, enum mgcp_verb verb, const struct mgcp_conn_peer *verb_info, diff --git a/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c b/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c index a9bab87..420fc0f 100644 --- a/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c +++ b/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c @@ -489,6 +489,20 @@ return true; } +bool osmo_mgcpc_ep_ci_get_crcx_info_to_osmux_cid(const struct osmo_mgcpc_ep_ci *ci, uint8_t* cid) +{ + const struct mgcp_conn_peer *rtp_info; + + rtp_info = osmo_mgcpc_ep_ci_get_rtp_info(ci); + if (!rtp_info) + return false; + + if (!rtp_info->x_osmo_osmux_use) + return false; + + *cid = rtp_info->x_osmo_osmux_cid; + return true; +} static const struct osmo_tdef_state_timeout osmo_mgcpc_ep_fsm_timeouts[32] = { [OSMO_MGCPC_EP_ST_WAIT_MGW_RESPONSE] = { .T=2427001 }, -- To view, visit https://gerrit.osmocom.org/14031 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ic80d47f8eedda1c6ac8c33f1cafeb55c65e74692 Gerrit-Change-Number: 14031 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 17:11:03 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 17:11:03 +0000 Subject: Change in osmo-mgw[master]: osmux: Provide correct local port during mgcp resp Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14032 Change subject: osmux: Provide correct local port during mgcp resp ...................................................................... osmux: Provide correct local port during mgcp resp Also document some possible future improvements for local addr. Change-Id: I12c8fcdc8b772b9f92a70774406d4662f44bd9a9 --- M src/libosmo-mgcp/mgcp_network.c M src/libosmo-mgcp/mgcp_protocol.c M src/libosmo-mgcp/mgcp_sdp.c 3 files changed, 10 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/32/14032/1 diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index dbed156..650d4c0 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -86,7 +86,7 @@ } } - /* Select from preconfigured IP-Addresses */ + /* Select from preconfigured IP-Addresses. We don't have bind_addr for Osmux (yet?). */ if (endp->cfg->net_ports.bind_addr) { /* Check there is a bind IP for the RTP traffic configured, * if so, use that IP-Address */ diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 4b0be07..e163b32 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -300,6 +300,9 @@ const char *trans_id, bool add_conn_params) { + /* TODO: we may want to define another local_ip_osmux var to us for + OSMUX connections. Perhaps adding a new internal API to get it based + on conn type */ const char *addr = endp->cfg->local_ip; struct msgb *sdp; int rc; diff --git a/src/libosmo-mgcp/mgcp_sdp.c b/src/libosmo-mgcp/mgcp_sdp.c index 6b41f50..99e764b 100644 --- a/src/libosmo-mgcp/mgcp_sdp.c +++ b/src/libosmo-mgcp/mgcp_sdp.c @@ -512,6 +512,7 @@ struct sdp_fmtp_param fmtp_param; int rc; int payload_types[1]; + int local_port; struct sdp_fmtp_param fmtp_params[1]; unsigned int fmtp_params_len = 0; @@ -541,7 +542,11 @@ if (payload_type >= 0) { payload_types[0] = payload_type; - rc = add_audio(sdp, payload_types, 1, conn->end.local_port); + if (mgcp_conn_rtp_is_osmux(conn)) + local_port = endp->cfg->osmux_port; + else + local_port = conn->end.local_port; + rc = add_audio(sdp, payload_types, 1, local_port); if (rc < 0) goto buffer_too_small; -- To view, visit https://gerrit.osmocom.org/14032 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I12c8fcdc8b772b9f92a70774406d4662f44bd9a9 Gerrit-Change-Number: 14032 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 17:11:03 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 17:11:03 +0000 Subject: Change in osmo-mgw[master]: osmux: Use remote port to send osmux frames Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14033 Change subject: osmux: Use remote port to send osmux frames ...................................................................... osmux: Use remote port to send osmux frames Previously the local one was used but nobody cared because probably everybody was using default 1984 on different IP addresses. Change-Id: I01e590465fa247185d74103578681e9041249099 --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/33/14033/1 diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 7290ba3..9bbc1b2 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -323,7 +323,7 @@ { switch(conn->osmux.state) { case OSMUX_STATE_ACTIVATING: - if (osmux_enable_conn(endp, conn, &conn->end.addr, htons(endp->cfg->osmux_port)) < 0) { + if (osmux_enable_conn(endp, conn, &conn->end.addr, conn->end.rtp_port) < 0) { LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, "Could not enable osmux for conn:%s\n", mgcp_conn_dump(conn->conn)); @@ -332,7 +332,7 @@ LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, "Osmux CID %u for %s:%u is now enabled\n", conn->osmux.cid, inet_ntoa(conn->end.addr), - endp->cfg->osmux_port); + ntohs(conn->end.rtp_port)); return 0; case OSMUX_STATE_ENABLED: return 0; @@ -701,7 +701,7 @@ inet_ntoa(conn->end.addr), conn->osmux.cid); return mgcp_udp_send(osmux_fd.fd, &conn->end.addr, - htons(endp->cfg->osmux_port), buf, sizeof(buf)); + conn->end.rtp_port, buf, sizeof(buf)); } /* bsc-nat allocates/releases the Osmux circuit ID. +7 to round up to 8 bit boundary. */ -- To view, visit https://gerrit.osmocom.org/14033 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I01e590465fa247185d74103578681e9041249099 Gerrit-Change-Number: 14033 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 17:11:04 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 17:11:04 +0000 Subject: Change in osmo-mgw[master]: osmux: Improve logging around osmux enabling events Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14034 Change subject: osmux: Improve logging around osmux enabling events ...................................................................... osmux: Improve logging around osmux enabling events Change-Id: Iab687b97010fd484cb353b240b120c9c382066fa --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/34/14034/1 diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 9bbc1b2..4423194 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -325,12 +325,14 @@ case OSMUX_STATE_ACTIVATING: if (osmux_enable_conn(endp, conn, &conn->end.addr, conn->end.rtp_port) < 0) { LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, - "Could not enable osmux for conn:%s\n", + "Could not enable osmux for conn on %s: %s\n", + sending ? "sent" : "received", mgcp_conn_dump(conn->conn)); return -1; } LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, - "Osmux CID %u for %s:%u is now enabled\n", + "Osmux %s CID %u towards %s:%u is now enabled\n", + sending ? "sent" : "received", conn->osmux.cid, inet_ntoa(conn->end.addr), ntohs(conn->end.rtp_port)); return 0; @@ -697,8 +699,8 @@ return 0; LOGPCONN(conn->conn, DLMGCP, LOGL_DEBUG, - "sending OSMUX dummy load to %s CID %u\n", - inet_ntoa(conn->end.addr), conn->osmux.cid); + "sending OSMUX dummy load to %s:%u CID %u\n", + inet_ntoa(conn->end.addr), ntohs(conn->end.rtp_port), conn->osmux.cid); return mgcp_udp_send(osmux_fd.fd, &conn->end.addr, conn->end.rtp_port, buf, sizeof(buf)); -- To view, visit https://gerrit.osmocom.org/14034 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Iab687b97010fd484cb353b240b120c9c382066fa Gerrit-Change-Number: 14034 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 17:11:04 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 17:11:04 +0000 Subject: Change in osmo-mgw[master]: osmux: Delay osmux enable of conn until remote addr is configured by ... Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14035 Change subject: osmux: Delay osmux enable of conn until remote addr is configured by MDCX ...................................................................... osmux: Delay osmux enable of conn until remote addr is configured by MDCX Change-Id: I243e53681ebeb3d9cd8ed38bb132172b41745795 --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/35/14035/1 diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 4423194..536b65b 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -559,6 +559,7 @@ * overlapping RTP SSRC traveling to the BTSes behind the BSC, * similarly, for flows traveling to the MSC. */ + struct in_addr addr_unset = {}; static const uint32_t rtp_ssrc_winlen = UINT32_MAX / (OSMUX_CID_MAX + 1); uint16_t osmux_dummy = endp->cfg->osmux_dummy; @@ -570,6 +571,13 @@ return -1; } + /* Wait until we have the connection information from MDCX */ + if (memcmp(&conn->end.addr, &addr_unset, sizeof(addr_unset)) == 0) { + LOGPCONN(conn->conn, DLMGCP, LOGL_INFO, + "Osmux remote address/port still unknown\n"); + return -1; + } + conn->osmux.in = osmux_handle_lookup(endp->cfg, addr, port); if (!conn->osmux.in) { LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, -- To view, visit https://gerrit.osmocom.org/14035 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I243e53681ebeb3d9cd8ed38bb132172b41745795 Gerrit-Change-Number: 14035 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 17:11:04 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 17:11:04 +0000 Subject: Change in osmo-mgw[master]: osmux: Redo read/write osmux glue code to have data routed correctly Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14036 Change subject: osmux: Redo read/write osmux glue code to have data routed correctly ...................................................................... osmux: Redo read/write osmux glue code to have data routed correctly Remove old BTS/NET no longer in use and meaningless. Use new osmo-mgw APIs to inject payload RTP<->Osmux on the correct socket and conn. Change-Id: I60b6ba3ffdc74efff945ba13a0b736798bdf5d8c --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 78 insertions(+), 208 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/36/14036/1 diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 536b65b..7a817f8 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -178,6 +178,12 @@ memcpy(msg->data, buf, buf_len); msgb_put(msg, buf_len); + if (conn->osmux.state != OSMUX_STATE_ENABLED) { + LOGPCONN(conn->conn, DLMGCP, LOGL_INFO, "forwarding RTP to Osmux conn not yet enabled, dropping (cid=%d)\n", + conn->osmux.cid); + return -1; + } + while ((ret = osmux_xfrm_input(conn->osmux.in, msg, conn->osmux.cid)) > 0) { /* batch full, build and deliver it */ osmux_xfrm_input_deliver(conn->osmux.in); @@ -186,111 +192,54 @@ } /* Lookup the endpoint that corresponds to the specified address (port) */ -static struct mgcp_endpoint * -endpoint_lookup(struct mgcp_config *cfg, int cid, - struct in_addr *from_addr, int type) +static struct mgcp_conn_rtp* +osmux_conn_lookup(struct mgcp_config *cfg, uint8_t cid, + struct in_addr *from_addr) { - struct mgcp_endpoint *endp = NULL; + struct mgcp_endpoint *endp; + struct mgcp_conn *conn = NULL; + struct mgcp_conn_rtp * conn_rtp; int i; - struct mgcp_conn_rtp *conn_net = NULL; - struct mgcp_conn_rtp *conn_bts = NULL; for (i=0; itrunk.number_endpoints; i++) { - struct in_addr *this; endp = &cfg->trunk.endpoints[i]; -#if 0 - if (!tmp->allocated) - continue; -#endif + llist_for_each_entry(conn, &endp->conns, entry) { + if (conn->type != MGCP_CONN_TYPE_RTP) + continue; - switch(type) { - case MGCP_DEST_NET: - /* FIXME: Get rid of CONN_ID_XXX! */ - conn_net = mgcp_conn_get_rtp(endp, CONN_ID_NET); - if (conn_net) - this = &conn_net->end.addr; - else - this = NULL; - break; - case MGCP_DEST_BTS: - /* FIXME: Get rid of CONN_ID_XXX! */ - conn_bts = mgcp_conn_get_rtp(endp, CONN_ID_BTS); - if (conn_bts) - this = &conn_bts->end.addr; - else - this = NULL; - break; - default: - /* Should not ever happen */ - LOGP(DLMGCP, LOGL_ERROR, "Bad type %d. Fix your code.\n", type); - return NULL; + conn_rtp = &conn->u.rtp; + if (!mgcp_conn_rtp_is_osmux(conn_rtp)) + continue; + + if (conn_rtp->osmux.cid == cid) + return conn_rtp; } - - /* FIXME: Get rid of CONN_ID_XXX! */ - conn_net = mgcp_conn_get_rtp(endp, CONN_ID_NET); - if (conn_net && this && conn_net->osmux.cid == cid - && this->s_addr == from_addr->s_addr) - return endp; } - LOGP(DLMGCP, LOGL_ERROR, "Cannot find endpoint with cid=%d\n", cid); + LOGP(DLMGCP, LOGL_ERROR, "Cannot find osmux conn with cid=%d\n", cid); return NULL; } -static void scheduled_tx_net_cb(struct msgb *msg, void *data) +/* FIXME: this is declared and used in mgcp_network.c, but documentation of mgcp_dispatch_rtp_bridge_cb() states another enum is to be used */ +enum { + MGCP_PROTO_RTP, + MGCP_PROTO_RTCP, +}; + +static void scheduled_from_osmux_tx_rtp_cb(struct msgb *msg, void *data) { - struct mgcp_endpoint *endp = data; - struct mgcp_conn_rtp *conn_net = NULL; - struct mgcp_conn_rtp *conn_bts = NULL; - - /* FIXME: Get rid of CONN_ID_XXX! */ - conn_bts = mgcp_conn_get_rtp(endp, CONN_ID_BTS); - conn_net = mgcp_conn_get_rtp(endp, CONN_ID_NET); - if (!conn_bts || !conn_net) - return; - + struct mgcp_conn_rtp *conn = data; + struct mgcp_endpoint *endp = conn->conn->endp; struct sockaddr_in addr = { - .sin_addr = conn_net->end.addr, - .sin_port = conn_net->end.rtp_port, - }; + .sin_addr = conn->end.addr, + .sin_port = conn->end.rtp_port, + }; /* FIXME: not set/used in cb */ - rate_ctr_inc(&conn_bts->rate_ctr_group->ctr[RTP_PACKETS_TX_CTR]); - rate_ctr_add(&conn_bts->rate_ctr_group->ctr[RTP_OCTETS_TX_CTR], msg->len); - /* Send RTP data to NET */ - /* FIXME: Get rid of conn_bts and conn_net! */ - mgcp_send(endp, 1, &addr, (char *)msg->data, msg->len, - conn_bts, conn_net); - msgb_free(msg); -} - -static void scheduled_tx_bts_cb(struct msgb *msg, void *data) -{ - struct mgcp_endpoint *endp = data; - struct mgcp_conn_rtp *conn_net = NULL; - struct mgcp_conn_rtp *conn_bts = NULL; - - /* FIXME: Get rid of CONN_ID_XXX! */ - conn_bts = mgcp_conn_get_rtp(endp, CONN_ID_BTS); - conn_net = mgcp_conn_get_rtp(endp, CONN_ID_NET); - if (!conn_bts || !conn_net) - return; - - struct sockaddr_in addr = { - .sin_addr = conn_bts->end.addr, - .sin_port = conn_bts->end.rtp_port, - }; - - rate_ctr_inc(&conn_net->rate_ctr_group->ctr[RTP_PACKETS_TX_CTR]); - rate_ctr_add(&conn_net->rate_ctr_group->ctr[RTP_OCTETS_TX_CTR], msg->len); - - /* Send RTP data to BTS */ - /* FIXME: Get rid of conn_bts and conn_net! */ - mgcp_send(endp, 1, &addr, (char *)msg->data, msg->len, - conn_net, conn_bts); + endp->type->dispatch_rtp_cb(MGCP_PROTO_RTP, &addr, (char *)msg->data, msg->len, conn->conn); msgb_free(msg); } @@ -361,16 +310,40 @@ return 0; } +/* This is called from the bsc-nat */ +static int osmux_handle_dummy(struct mgcp_config *cfg, struct sockaddr_in *addr, + struct msgb *msg) +{ + uint8_t osmux_cid; + struct mgcp_conn_rtp *conn; + + if (osmux_legacy_dummy_parse_cid(addr, msg, &osmux_cid) < 0) + goto out; + + conn = osmux_conn_lookup(cfg, osmux_cid, &addr->sin_addr); + if (!conn) { + LOGP(DLMGCP, LOGL_ERROR, + "Cannot find conn for Osmux CID %d\n", osmux_cid); + goto out; + } + + endp_osmux_state_check(conn->conn->endp, conn, false); + /* Only needed to punch hole in firewall, it can be dropped */ +out: + msgb_free(msg); + return 0; +} + #define osmux_chunk_length(msg, rem) (rem - msg->len); -int osmux_read_from_bsc_nat_cb(struct osmo_fd *ofd, unsigned int what) +static int osmux_read_fd_cb(struct osmo_fd *ofd, unsigned int what) { struct msgb *msg; struct osmux_hdr *osmuxh; struct sockaddr_in addr; struct mgcp_config *cfg = ofd->data; uint32_t rem; - struct mgcp_conn_rtp *conn_bts = NULL; + struct mgcp_conn_rtp *conn_src; msg = osmux_recv(ofd, &addr); if (!msg) @@ -384,115 +357,32 @@ /* not any further processing dummy messages */ if (msg->data[0] == MGCP_DUMMY_LOAD) - goto out; + return osmux_handle_dummy(cfg, &addr, msg); rem = msg->len; while((osmuxh = osmux_xfrm_output_pull(msg)) != NULL) { - struct mgcp_endpoint *endp; - /* Yes, we use MGCP_DEST_NET to locate the origin */ - endp = endpoint_lookup(cfg, osmuxh->circuit_id, - &addr.sin_addr, MGCP_DEST_NET); - - /* FIXME: Get rid of CONN_ID_XXX! */ - conn_bts = mgcp_conn_get_rtp(endp, CONN_ID_BTS); - if (!conn_bts) - continue; - - if (!endp) { + conn_src = osmux_conn_lookup(cfg, osmuxh->circuit_id, + &addr.sin_addr); + if (!conn_src) { LOGP(DLMGCP, LOGL_ERROR, - "Cannot find an endpoint for circuit_id=%d\n", + "Cannot find a src conn for circuit_id=%d\n", osmuxh->circuit_id); goto out; } - if (endp_osmux_state_check(endp, conn_bts, false) == 0) { - conn_bts->osmux.stats.octets += osmux_chunk_length(msg, rem); - conn_bts->osmux.stats.chunks++; - osmux_xfrm_output_sched(&conn_bts->osmux.out, osmuxh); - } - rem = msg->len; - } -out: - msgb_free(msg); - return 0; -} -/* This is called from the bsc-nat */ -static int osmux_handle_dummy(struct mgcp_config *cfg, struct sockaddr_in *addr, - struct msgb *msg, int endp_type) -{ - struct mgcp_endpoint *endp; - uint8_t osmux_cid; - struct mgcp_conn_rtp *conn = NULL; - - if (osmux_legacy_dummy_parse_cid(addr, msg, &osmux_cid) < 0) - goto out; - - endp = endpoint_lookup(cfg, osmux_cid, &addr->sin_addr, endp_type); - if (!endp) { - LOGP(DLMGCP, LOGL_ERROR, - "Cannot find endpoint for Osmux CID %d\n", osmux_cid); - goto out; - } - - /* FIXME: Get rid of CONN_ID_XXX! */ - conn = mgcp_conn_get_rtp(endp, endp_type == MGCP_DEST_BTS ? CONN_ID_NET : CONN_ID_BTS); - if (!conn) - goto out; - - endp_osmux_state_check(endp, conn, false); - /* Only needed to punch hole in firewall, it can be dropped */ -out: - msgb_free(msg); - return 0; -} - -int osmux_read_from_bsc_cb(struct osmo_fd *ofd, unsigned int what) -{ - struct msgb *msg; - struct osmux_hdr *osmuxh; - struct sockaddr_in addr; - struct mgcp_config *cfg = ofd->data; - uint32_t rem; - struct mgcp_conn_rtp *conn_net = NULL; - - msg = osmux_recv(ofd, &addr); - if (!msg) - return -1; - - if (!cfg->osmux) { - LOGP(DLMGCP, LOGL_ERROR, - "bsc wants to use Osmux but bsc-nat did not request it\n"); - goto out; - } - - /* not any further processing dummy messages */ - if (msg->data[0] == MGCP_DUMMY_LOAD) - return osmux_handle_dummy(cfg, &addr, msg, MGCP_DEST_BTS); - - rem = msg->len; - while((osmuxh = osmux_xfrm_output_pull(msg)) != NULL) { - struct mgcp_endpoint *endp; - - /* Yes, we use MGCP_DEST_BTS to locate the origin */ - endp = endpoint_lookup(cfg, osmuxh->circuit_id, - &addr.sin_addr, MGCP_DEST_BTS); - - /* FIXME: Get rid of CONN_ID_XXX! */ - conn_net = mgcp_conn_get_rtp(endp, CONN_ID_NET); - if (!conn_net) - continue; - - if (!endp) { + /*conn_dst = mgcp_find_dst_conn(conn_src->conn); + if (!conn_dst) { LOGP(DLMGCP, LOGL_ERROR, - "Cannot find an endpoint for circuit_id=%d\n", + "Cannot find a dst conn for circuit_id=%d\n", osmuxh->circuit_id); goto out; - } - if (endp_osmux_state_check(endp, conn_net, false) == 0) { - conn_net->osmux.stats.octets += osmux_chunk_length(msg, rem); - conn_net->osmux.stats.chunks++; - osmux_xfrm_output_sched(&conn_net->osmux.out, osmuxh); + }*/ + + if (endp_osmux_state_check(conn_src->conn->endp, conn_src, false) == 0) { + conn_src->osmux.stats.octets += osmux_chunk_length(msg, rem); + conn_src->osmux.stats.chunks++; + osmux_xfrm_output_sched(&conn_src->osmux.out, osmuxh); } rem = msg->len; } @@ -505,17 +395,7 @@ { int ret; - switch(role) { - case OSMUX_ROLE_BSC: - osmux_fd.cb = osmux_read_from_bsc_nat_cb; - break; - case OSMUX_ROLE_BSC_NAT: - osmux_fd.cb = osmux_read_from_bsc_cb; - break; - default: - LOGP(DLMGCP, LOGL_ERROR, "wrong role for OSMUX\n"); - return -1; - } + osmux_fd.cb = osmux_read_fd_cb; osmux_fd.data = cfg; ret = mgcp_create_bind(cfg->osmux_addr, &osmux_fd, cfg->osmux_port); @@ -596,18 +476,8 @@ (conn->osmux.cid * rtp_ssrc_winlen) + (random() % rtp_ssrc_winlen)); - switch (endp->cfg->role) { - case MGCP_BSC_NAT: - conn->type = MGCP_OSMUX_BSC_NAT; - osmux_xfrm_output_set_tx_cb(&conn->osmux.out, - scheduled_tx_net_cb, endp); - break; - case MGCP_BSC: - conn->type = MGCP_OSMUX_BSC; - osmux_xfrm_output_set_tx_cb(&conn->osmux.out, - scheduled_tx_bts_cb, endp); - break; - } + osmux_xfrm_output_set_tx_cb(&conn->osmux.out, + scheduled_from_osmux_tx_rtp_cb, conn); conn->osmux.state = OSMUX_STATE_ENABLED; -- To view, visit https://gerrit.osmocom.org/14036 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I60b6ba3ffdc74efff945ba13a0b736798bdf5d8c Gerrit-Change-Number: 14036 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 17:42:04 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 17:42:04 +0000 Subject: Change in osmo-bsc[master]: vty: Add option to enable osmux towards MSC In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13922 ) Change subject: vty: Add option to enable osmux towards MSC ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/13922 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I30c485c022f2d55e0a004f69b2503da7f91ecb74 Gerrit-Change-Number: 13922 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 13 May 2019 17:42:04 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 17:42:09 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 17:42:09 +0000 Subject: Change in osmo-bsc[master]: bssap: Detect MSC Osmux support on RESET (ACK) recv In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13923 ) Change subject: bssap: Detect MSC Osmux support on RESET (ACK) recv ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/13923 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I830e38cc1ffb8b6ebbe299567507160f19beb528 Gerrit-Change-Number: 13923 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 13 May 2019 17:42:09 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 17:42:19 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 17:42:19 +0000 Subject: Change in osmo-bsc[master]: bssap: Announce Osmux support on RESET (ACK) send In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13924 ) Change subject: bssap: Announce Osmux support on RESET (ACK) send ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/13924 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6b5b475b6109a2882051445762e27046d015b770 Gerrit-Change-Number: 13924 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 13 May 2019 17:42:19 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 17:42:27 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 17:42:27 +0000 Subject: Change in osmo-bsc[master]: bssap: Parse Osmux CID on BSSAP Assign Req recv and use it in MGCP In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13925 ) Change subject: bssap: Parse Osmux CID on BSSAP Assign Req recv and use it in MGCP ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/13925 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I86e7e13fc7921e3209fb764c0e7797e7ec09b79e Gerrit-Change-Number: 13925 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 13 May 2019 17:42:27 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 17:42:38 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 17:42:38 +0000 Subject: Change in osmo-bsc[master]: bssap: Feed Assign Complete with Osmux CID retrieved from MGW In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13927 ) Change subject: bssap: Feed Assign Complete with Osmux CID retrieved from MGW ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/13927 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I77dfdd965ae828c39a9818669177aefd22bc02f2 Gerrit-Change-Number: 13927 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 13 May 2019 17:42:38 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 17:42:45 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 17:42:45 +0000 Subject: Change in osmo-bsc[master]: TEST In-Reply-To: References: Message-ID: Pau Espin Pedrol has abandoned this change. ( https://gerrit.osmocom.org/13928 ) Change subject: TEST ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/13928 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: I43f2d99a91563240e7dd9c02d3e97be68c7e82f6 Gerrit-Change-Number: 13928 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 17:42:58 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 17:42:58 +0000 Subject: Change in osmo-bsc[master]: Ask mgw to use osmux when requested by MSC In-Reply-To: References: Message-ID: Pau Espin Pedrol has abandoned this change. ( https://gerrit.osmocom.org/13926 ) Change subject: Ask mgw to use osmux when requested by MSC ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/13926 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: I4156a4e2fb7ce1b896779b50e4d3481281b43e55 Gerrit-Change-Number: 13926 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 18:03:07 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 18:03:07 +0000 Subject: Change in osmo-msc[master]: ran_peer: Move rx_reset_ack logic into its own func Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14037 Change subject: ran_peer: Move rx_reset_ack logic into its own func ...................................................................... ran_peer: Move rx_reset_ack logic into its own func Later on we want to do extra steps upon receiving a Rx Reset Ack (checking for Osmux support from peer). Let's move handling of this message into its own function to have handling implementation in one place. Change-Id: I516c4baf6071d26f6c530726d93677bed968efd1 --- M src/libmsc/ran_peer.c 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/37/14037/1 diff --git a/src/libmsc/ran_peer.c b/src/libmsc/ran_peer.c index 40040a2..9ec157e 100644 --- a/src/libmsc/ran_peer.c +++ b/src/libmsc/ran_peer.c @@ -152,6 +152,11 @@ ran_peer_state_chg(rp, RAN_PEER_ST_READY); } +static void ran_peer_rx_reset_ack(struct ran_peer *rp) +{ + ran_peer_state_chg(rp, RAN_PEER_ST_READY); +} + void ran_peer_reset(struct ran_peer *rp) { struct msgb *reset; @@ -269,7 +274,7 @@ switch (event) { case RAN_PEER_EV_RX_RESET_ACK: - ran_peer_state_chg(rp, RAN_PEER_ST_READY); + ran_peer_rx_reset_ack(rp); return; case RAN_PEER_EV_MSG_UP_CO: -- To view, visit https://gerrit.osmocom.org/14037 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I516c4baf6071d26f6c530726d93677bed968efd1 Gerrit-Change-Number: 14037 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 18:03:07 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 18:03:07 +0000 Subject: Change in osmo-msc[master]: vty: Add option to enable osmux towards BSCs Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14038 Change subject: vty: Add option to enable osmux towards BSCs ...................................................................... vty: Add option to enable osmux towards BSCs Change-Id: I6de1be0322ddbdc115074ebb6be2598ebf6c95db --- M include/osmocom/msc/Makefile.am M include/osmocom/msc/gsm_data.h A include/osmocom/msc/osmux.h M src/libmsc/msc_vty.c 4 files changed, 35 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/38/14038/1 diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am index 9ca4c38..0d7d45c 100644 --- a/include/osmocom/msc/Makefile.am +++ b/include/osmocom/msc/Makefile.am @@ -28,6 +28,7 @@ msc_t_remote.h \ msub.h \ neighbor_ident.h \ + osmux.h \ paging.h \ ran_conn.h \ ran_infra.h \ diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 42bb69a..f6e3ed9 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -19,6 +19,7 @@ #include #include "gsm_data_shared.h" +#include "osmux.h" /** annotations for msgb ownership */ #define __uses @@ -231,6 +232,9 @@ uint64_t range_end; uint64_t next; } handover_number; + + /* Whether we want to use Osmux against BSCs. Controlled via VTY */ + enum osmux_usage use_osmux; }; struct osmo_esme; diff --git a/include/osmocom/msc/osmux.h b/include/osmocom/msc/osmux.h new file mode 100644 index 0000000..aa3d1ab --- /dev/null +++ b/include/osmocom/msc/osmux.h @@ -0,0 +1,7 @@ +#pragma once + +enum osmux_usage { + OSMUX_USAGE_OFF = 0, + OSMUX_USAGE_ON = 1, + OSMUX_USAGE_ONLY = 2, +}; diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index 2990735..dd3b9b5 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -59,6 +59,7 @@ #include #include #include +#include #include #include #include @@ -554,6 +555,22 @@ return CMD_SUCCESS; } +#define OSMUX_STR "RTP multiplexing\n" +DEFUN(cfg_msc_osmux, + cfg_msc_osmux_cmd, + "osmux (on|off|only)", + OSMUX_STR "Enable OSMUX\n" "Disable OSMUX\n" "Only use OSMUX\n") +{ + if (strcmp(argv[0], "off") == 0) + gsmnet->use_osmux = OSMUX_USAGE_OFF; + else if (strcmp(argv[0], "on") == 0) + gsmnet->use_osmux = OSMUX_USAGE_ON; + else if (strcmp(argv[0], "only") == 0) + gsmnet->use_osmux = OSMUX_USAGE_ONLY; + + return CMD_SUCCESS; +} + static int config_write_msc(struct vty *vty) { vty_out(vty, "msc%s", VTY_NEWLINE); @@ -601,6 +618,11 @@ gsmnet->handover_number.range_start, gsmnet->handover_number.range_end, VTY_NEWLINE); + if (gsmnet->use_osmux != OSMUX_USAGE_OFF) { + vty_out(vty, " osmux %s%s", gsmnet->use_osmux == OSMUX_USAGE_ON ? "on" : "only", + VTY_NEWLINE); + } + mgcp_client_config_write(vty, " "); #ifdef BUILD_IU ranap_iu_vty_config_write(vty, " "); @@ -1746,6 +1768,7 @@ install_element(MSC_NODE, &cfg_msc_emergency_msisdn_cmd); install_element(MSC_NODE, &cfg_msc_sms_over_gsup_cmd); install_element(MSC_NODE, &cfg_msc_no_sms_over_gsup_cmd); + install_element(MSC_NODE, &cfg_msc_osmux_cmd); install_element(MSC_NODE, &cfg_msc_handover_number_range_cmd); neighbor_ident_vty_init(msc_network); -- To view, visit https://gerrit.osmocom.org/14038 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I6de1be0322ddbdc115074ebb6be2598ebf6c95db Gerrit-Change-Number: 14038 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 18:03:08 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 18:03:08 +0000 Subject: Change in osmo-msc[master]: bssap: Detect BSC Osmux support on RESET (ACK) recv Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14039 Change subject: bssap: Detect BSC Osmux support on RESET (ACK) recv ...................................................................... bssap: Detect BSC Osmux support on RESET (ACK) recv Related: OS#2551 Depends: libosmocore.git I28f83e2e32b9533c99e65ccc1562900ac2aec74e Change-Id: If4f33da9b414ab194098755d2c5be85e1fce5d31 --- M include/osmocom/msc/ran_peer.h M src/libmsc/ran_peer.c 2 files changed, 44 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/39/14039/1 diff --git a/include/osmocom/msc/ran_peer.h b/include/osmocom/msc/ran_peer.h index e3ff59d..06ab500 100644 --- a/include/osmocom/msc/ran_peer.h +++ b/include/osmocom/msc/ran_peer.h @@ -51,6 +51,9 @@ /* See cell_id_list.h */ struct llist_head cells_seen; + + /* Whether we detected the BSC supports Osmux (during BSSMAP_RESET) */ + bool remote_supports_osmux; }; #define ran_peer_for_each_ran_conn(RAN_CONN, RAN_PEER) \ diff --git a/src/libmsc/ran_peer.c b/src/libmsc/ran_peer.c index 9ec157e..6ee7b47 100644 --- a/src/libmsc/ran_peer.c +++ b/src/libmsc/ran_peer.c @@ -122,13 +122,40 @@ } } +/* TODO: create an sccp_ran_ops.rx_reset(_ack) to handle this differently on 2g and 3G */ +/* We expect RAN peer to provide use with an Osmocom extension TLV in BSSMAP_RESET to + * announce Osmux support */ +static void ran_peer_update_osmux_support(struct ran_peer *rp, struct msgb *msg) +{ + struct tlv_parsed tp; + int rc; + bool old_value = rp->remote_supports_osmux; + + msg->l3h = msg->l2h + sizeof(struct bssmap_header); + rc = tlv_parse(&tp, gsm0808_att_tlvdef(), msg->l3h + 1, msgb_l3len(msg) - 1, 0, 0); + if (rc < 0) + LOG_RAN_PEER(rp, LOGL_NOTICE, "Failed parsing TLV looking for Osmux support\n"); + + if (TLVP_PRESENT(&tp, GSM0808_IE_OSMO_OSMUX_SUPPORT)) { + rp->remote_supports_osmux = true; + } else { + rp->remote_supports_osmux = false; + } + + if (old_value != rp->remote_supports_osmux) + LOG_RAN_PEER(rp, LOGL_INFO, "BSC detected AoIP Osmux support changed: %d->%d\n", + old_value, rp->remote_supports_osmux); +} + /* Drop all SCCP connections for this ran_peer, respond with RESET ACKNOWLEDGE and move to READY state. */ -static void ran_peer_rx_reset(struct ran_peer *rp) +static void ran_peer_rx_reset(struct ran_peer *rp, struct msgb* msg) { struct msgb *reset_ack; ran_peer_discard_all_conns(rp); + ran_peer_update_osmux_support(rp, msg); + reset_ack = rp->sri->ran->sccp_ran_ops.make_reset_msg(rp->sri, SCCP_RAN_MSG_RESET_ACK); if (!reset_ack) { @@ -152,9 +179,10 @@ ran_peer_state_chg(rp, RAN_PEER_ST_READY); } -static void ran_peer_rx_reset_ack(struct ran_peer *rp) +static void ran_peer_rx_reset_ack(struct ran_peer *rp, struct msgb* msg) { ran_peer_state_chg(rp, RAN_PEER_ST_READY); + ran_peer_update_osmux_support(rp, msg); } void ran_peer_reset(struct ran_peer *rp) @@ -228,6 +256,7 @@ { struct ran_peer *rp = fi->priv; struct ran_peer_ev_ctx *ctx; + struct msgb *msg; switch (event) { @@ -257,7 +286,8 @@ return; case RAN_PEER_EV_RX_RESET: - ran_peer_rx_reset(rp); + msg = (struct msgb*)data; + ran_peer_rx_reset(rp, msg); return; default: @@ -270,11 +300,13 @@ { struct ran_peer *rp = fi->priv; struct ran_peer_ev_ctx *ctx; + struct msgb *msg; switch (event) { case RAN_PEER_EV_RX_RESET_ACK: - ran_peer_rx_reset_ack(rp); + msg = (struct msgb*)data; + ran_peer_rx_reset_ack(rp, msg); return; case RAN_PEER_EV_MSG_UP_CO: @@ -289,7 +321,8 @@ return; case RAN_PEER_EV_RX_RESET: - ran_peer_rx_reset(rp); + msg = (struct msgb*)data; + ran_peer_rx_reset(rp, msg); return; default: @@ -330,6 +363,7 @@ struct ran_peer_ev_ctx *ctx; struct ran_conn *conn; struct an_apdu an_apdu; + struct msgb *msg; switch (event) { @@ -397,7 +431,8 @@ return; case RAN_PEER_EV_RX_RESET: - ran_peer_rx_reset(rp); + msg = (struct msgb*)data; + ran_peer_rx_reset(rp, msg); return; default: -- To view, visit https://gerrit.osmocom.org/14039 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If4f33da9b414ab194098755d2c5be85e1fce5d31 Gerrit-Change-Number: 14039 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 18:03:08 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 18:03:08 +0000 Subject: Change in osmo-msc[master]: a_iface: Announce Osmux support on RESET (ACK) send Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14040 Change subject: a_iface: Announce Osmux support on RESET (ACK) send ...................................................................... a_iface: Announce Osmux support on RESET (ACK) send Related: OS#2551 Depends: libosmocore.git I28f83e2e32b9533c99e65ccc1562900ac2aec74e Change-Id: Id607f60749e923755cb38179bc283a7957670653 --- M src/libmsc/ran_msg_a.c 1 file changed, 24 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/40/14040/1 diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c index ba0990d..43923df 100644 --- a/src/libmsc/ran_msg_a.c +++ b/src/libmsc/ran_msg_a.c @@ -34,6 +34,7 @@ #include #include #include +#include #define LOG_RAN_A_DEC(RAN_DEC, level, fmt, args...) \ LOG_RAN_DEC(RAN_DEC, DBSSAP, level, "BSSMAP: " fmt, ## args) @@ -1246,16 +1247,37 @@ } } +/* Patch regular BSSMAP RESET to add extra T to announce Osmux support (osmocom extension) */ +static void _gsm0808_extend_announce_osmux(struct msgb *msg) +{ + OSMO_ASSERT(msg->l3h[1] == msgb_l3len(msg) - 2); /*TL not in len */ + msgb_put_u8(msg, GSM0808_IE_OSMO_OSMUX_SUPPORT); + msg->l3h[1] = msgb_l3len(msg) - 2; +} + struct msgb *bssmap_make_reset_msg(const struct sccp_ran_inst *sri, enum reset_msg_type type) { + struct gsm_network *net = sri->user_data; + struct msgb *msg; + switch (type) { case SCCP_RAN_MSG_RESET: - return gsm0808_create_reset(); + msg = gsm0808_create_reset(); + break; case SCCP_RAN_MSG_RESET_ACK: - return gsm0808_create_reset_ack(); + msg = gsm0808_create_reset_ack(); + break; default: return NULL; } + + if (!msg) + return NULL; + + if (net->use_osmux != OSMUX_USAGE_OFF) + _gsm0808_extend_announce_osmux(msg); + + return msg; } struct msgb *bssmap_make_paging_msg(const struct sccp_ran_inst *sri, const struct gsm0808_cell_id *page_cell_id, -- To view, visit https://gerrit.osmocom.org/14040 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id607f60749e923755cb38179bc283a7957670653 Gerrit-Change-Number: 14040 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 18:03:08 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 18:03:08 +0000 Subject: Change in osmo-msc[master]: Request Osmux CID and forward it in Assign Req and Assign Compl Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14041 Change subject: Request Osmux CID and forward it in Assign Req and Assign Compl ...................................................................... Request Osmux CID and forward it in Assign Req and Assign Compl Related: OS#2551 Depends: osmo-mgw.git I73b4c62baf39050da81d65553cbea07bc51163de Change-Id: I5b14e34481e890669c9ee02dba81eba84293cebb --- M include/osmocom/msc/call_leg.h M include/osmocom/msc/ran_msg.h M include/osmocom/msc/rtp_stream.h M src/libmsc/call_leg.c M src/libmsc/msc_a.c M src/libmsc/ran_msg_a.c M src/libmsc/rtp_stream.c 7 files changed, 105 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/41/14041/1 diff --git a/include/osmocom/msc/call_leg.h b/include/osmocom/msc/call_leg.h index d8380f5..f35816c 100644 --- a/include/osmocom/msc/call_leg.h +++ b/include/osmocom/msc/call_leg.h @@ -44,6 +44,8 @@ /* Prevent events from deallocating for certain release code paths, to prevent use-after-free problems. */ bool deallocating; + + bool ran_peer_supports_osmux; }; enum call_leg_event { diff --git a/include/osmocom/msc/ran_msg.h b/include/osmocom/msc/ran_msg.h index 4d0485d..af0822b 100644 --- a/include/osmocom/msc/ran_msg.h +++ b/include/osmocom/msc/ran_msg.h @@ -84,6 +84,8 @@ const struct osmo_sockaddr_str *cn_rtp; const struct gsm0808_channel_type *channel_type; enum nsap_addr_enc rab_assign_addr_enc; + bool osmux_present; + uint8_t osmux_cid; }; struct ran_cipher_mode_command { @@ -223,6 +225,8 @@ struct osmo_sockaddr_str remote_rtp; bool codec_present; enum mgcp_codecs codec; + bool osmux_present; + uint8_t osmux_cid; } assignment_complete; struct { enum gsm0808_cause bssap_cause; diff --git a/include/osmocom/msc/rtp_stream.h b/include/osmocom/msc/rtp_stream.h index 794e806..c53c4f1 100644 --- a/include/osmocom/msc/rtp_stream.h +++ b/include/osmocom/msc/rtp_stream.h @@ -44,6 +44,15 @@ struct osmo_mgcpc_ep_ci *ci; enum mgcp_connection_mode crcx_conn_mode; + + /* configured to use Osmux */ + bool use_osmux; + /* Allocated by our MGW, negative means invalid, not yet known */ + int local_osmux_cid; + /* Allocated by BSC MGW, negative means invalid, not yet known */ + int remote_osmux_cid; + /* Whether remote_osmux_cid has been communicated to MGW */ + bool remote_osmux_cid_sent_to_mgw; }; #define RTP_STREAM_FMT "local=" RTP_IP_PORT_FMT ",remote=" RTP_IP_PORT_FMT @@ -57,6 +66,7 @@ void rtp_stream_set_codec(struct rtp_stream *rtps, enum mgcp_codecs codec); void rtp_stream_set_remote_addr(struct rtp_stream *rtps, const struct osmo_sockaddr_str *r); +void rtp_stream_set_remote_osmux_cid(struct rtp_stream *rtps, uint8_t osmux_cid); int rtp_stream_commit(struct rtp_stream *rtps); void rtp_stream_release(struct rtp_stream *rtps); diff --git a/src/libmsc/call_leg.c b/src/libmsc/call_leg.c index 46405bc..794eda2 100644 --- a/src/libmsc/call_leg.c +++ b/src/libmsc/call_leg.c @@ -321,6 +321,10 @@ if (call_leg_ensure_rtp_alloc(cl, dir, call_id, for_trans)) return -EIO; cl->rtp[dir]->crcx_conn_mode = cl->crcx_conn_mode[dir]; + if (dir == RTP_TO_RAN && cl->ran_peer_supports_osmux) { + cl->rtp[dir]->use_osmux = true; + cl->rtp[dir]->remote_osmux_cid = -1; /* wildcard */ + } if (codec_if_known) rtp_stream_set_codec(cl->rtp[dir], *codec_if_known); if (remote_addr_if_known && osmo_sockaddr_str_is_set(remote_addr_if_known)) diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c index 5137e20..7a54375 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -509,6 +509,8 @@ .assignment_command = { .cn_rtp = &msc_a->cc.call_leg->rtp[RTP_TO_RAN]->local, .channel_type = &channel_type, + .osmux_present = msc_a->cc.call_leg->rtp[RTP_TO_RAN]->use_osmux, + .osmux_cid = msc_a->cc.call_leg->rtp[RTP_TO_RAN]->local_osmux_cid, }, }; if (msc_a_ran_down(msc_a, MSC_ROLE_I, &msg)) { @@ -602,8 +604,9 @@ return; } LOG_MSC_A(msc_a, LOGL_DEBUG, - "MGW endpoint's RTP address available for the CI %s: " OSMO_SOCKADDR_STR_FMT "\n", - rtp_direction_name(rtps->dir), OSMO_SOCKADDR_STR_FMT_ARGS(&rtps->local)); + "MGW endpoint's RTP address available for the CI %s: " OSMO_SOCKADDR_STR_FMT " (osmux=%s:%d)\n", + rtp_direction_name(rtps->dir), OSMO_SOCKADDR_STR_FMT_ARGS(&rtps->local), + rtps->use_osmux ? "yes" : "no", rtps->local_osmux_cid); switch (rtps->dir) { case RTP_TO_RAN: msc_a_call_leg_ran_local_addr_available(msc_a); @@ -1239,9 +1242,20 @@ return; } + if (rtps_to_ran->use_osmux != ac->assignment_complete.osmux_present) { + LOG_MSC_A_CAT(msc_a, DCC, LOGL_ERROR, "Osmux usage ass request and complete don't match: %d vs %d", + rtps_to_ran->use_osmux, ac->assignment_complete.osmux_present); + call_leg_release(msc_a->cc.call_leg); + return; + } + /* Update RAN-side endpoint CI: */ rtp_stream_set_codec(rtps_to_ran, ac->assignment_complete.codec); rtp_stream_set_remote_addr(rtps_to_ran, &ac->assignment_complete.remote_rtp); + if (rtps_to_ran->use_osmux) + rtp_stream_set_remote_osmux_cid(rtps_to_ran, + ac->assignment_complete.osmux_cid); + rtp_stream_commit(rtps_to_ran); /* Setup CN side endpoint CI: @@ -1574,6 +1588,8 @@ static int msc_a_start_assignment(struct msc_a *msc_a, struct gsm_trans *cc_trans) { struct call_leg *cl = msc_a->cc.call_leg; + struct msc_i *msc_i = msc_a_msc_i(msc_a); + struct gsm_network *net = msc_a_net(msc_a); OSMO_ASSERT(!msc_a->cc.active_trans); msc_a->cc.active_trans = cc_trans; @@ -1594,6 +1610,16 @@ cl->crcx_conn_mode[RTP_TO_RAN] = MGCP_CONN_LOOPBACK; } + if (net->use_osmux != OSMUX_USAGE_OFF) { + msc_i = msc_a_msc_i(msc_a); + if (msc_i->c.remote_to) { + /* TODO: investigate what to do in this case */ + LOG_MSC_A(msc_a, LOGL_ERROR, "Osmux not yet supported for inter-MSC"); + } else { + cl->ran_peer_supports_osmux = msc_i->ran_conn->ran_peer->remote_supports_osmux; + } + } + /* This will lead to either MSC_EV_CALL_LEG_LOCAL_ADDR_AVAILABLE or MSC_EV_CALL_LEG_TERM. * If the local address is already known, then immediately trigger. */ if (call_leg_local_ip(cl, RTP_TO_RAN)) diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c index 43923df..5194ee8 100644 --- a/src/libmsc/ran_msg_a.c +++ b/src/libmsc/ran_msg_a.c @@ -269,6 +269,7 @@ { struct tlv_p_entry *ie_aoip_transp_addr = TLVP_GET(tp, GSM0808_IE_AOIP_TRASP_ADDR); struct tlv_p_entry *ie_speech_codec = TLVP_GET(tp, GSM0808_IE_SPEECH_CODEC); + struct tlv_p_entry *ie_osmux_cid = TLVP_GET(tp, GSM0808_IE_OSMO_OSMUX_CID); struct sockaddr_storage rtp_addr; struct sockaddr_in *rtp_addr_in; struct gsm0808_speech_codec sc; @@ -286,6 +287,9 @@ return -EINVAL; } + rc = gsm0808_dec_osmux_cid(&ran_dec_msg.assignment_complete.osmux_cid, ie_osmux_cid->val, ie_osmux_cid->len); + ran_dec_msg.assignment_complete.osmux_present = rc < 0 ? false : true; + rtp_addr_in = (struct sockaddr_in*)&rtp_addr; if (rtp_addr.ss_family != AF_INET) { @@ -909,6 +913,13 @@ return 0; } +static void _gsm0808_assignment_extend_osmux(struct msgb *msg, uint8_t cid) +{ + OSMO_ASSERT(msg->l3h[1] == msgb_l3len(msg) - 2); /*TL not in len */ + msgb_tv_put(msg, GSM0808_IE_OSMO_OSMUX_CID, cid); + msg->l3h[1] = msgb_l3len(msg) - 2; +} + /* Compose a BSSAP Assignment Command. * Passing an RTP address is optional. * The msub is passed merely for error logging. */ @@ -919,6 +930,7 @@ struct gsm0808_speech_codec_list *use_scl = NULL; struct sockaddr_storage rtp_addr; struct sockaddr_storage *use_rtp_addr = NULL; + struct msgb *msg; int rc; if (!ac->channel_type) { @@ -959,7 +971,10 @@ } } - return gsm0808_create_ass(ac->channel_type, NULL, use_rtp_addr, use_scl, NULL); + msg = gsm0808_create_ass(ac->channel_type, NULL, use_rtp_addr, use_scl, NULL); + if (ac->osmux_present) + _gsm0808_assignment_extend_osmux(msg, ac->osmux_cid); + return msg; } /* For an A5/N number a5_n set dst to the matching GSM0808_ALG_ID_A5_. */ diff --git a/src/libmsc/rtp_stream.c b/src/libmsc/rtp_stream.c index 6163a98..5c71ffb 100644 --- a/src/libmsc/rtp_stream.c +++ b/src/libmsc/rtp_stream.c @@ -82,11 +82,19 @@ OSMO_STRBUF_PRINTF(sb, ":no-codec"); else if (!rtps->codec_sent_to_mgw) OSMO_STRBUF_PRINTF(sb, ":codec-not-sent"); + if (rtps->use_osmux) { + if (rtps->remote_osmux_cid < 0) + OSMO_STRBUF_PRINTF(sb, ":no-remote-osmux-cid"); + else if (!rtps->remote_osmux_cid_sent_to_mgw) + OSMO_STRBUF_PRINTF(sb, ":remote-osmux-cid-not-sent"); + } } if (osmo_sockaddr_str_is_set(&rtps->local)) OSMO_STRBUF_PRINTF(sb, ":local-%s-%u", rtps->local.ip, rtps->local.port); if (osmo_sockaddr_str_is_set(&rtps->remote)) OSMO_STRBUF_PRINTF(sb, ":remote-%s-%u", rtps->remote.ip, rtps->remote.port); + if (rtps->use_osmux) + OSMO_STRBUF_PRINTF(sb, ":osmux-%d-%d", rtps->local_osmux_cid, rtps->remote_osmux_cid); /* Replace any dots in the IP address, dots not allowed as FSM instance name */ for (p = buf; *p; p++) @@ -117,6 +125,8 @@ .call_id = call_id, .for_trans = for_trans, .dir = dir, + .local_osmux_cid = -2, + .remote_osmux_cid = -2, }; rtp_stream_update_id(rtps); @@ -130,6 +140,7 @@ && osmo_sockaddr_str_is_set(&rtps->local) && osmo_sockaddr_str_is_set(&rtps->remote) && rtps->remote_sent_to_mgw + && (!rtps->use_osmux || rtps->remote_osmux_cid_sent_to_mgw) && rtps->codec_known) rtp_stream_state_chg(rtps, RTP_STREAM_ST_ESTABLISHED); } @@ -142,17 +153,27 @@ case RTP_STREAM_EV_CRCX_OK: crcx_info = osmo_mgcpc_ep_ci_get_rtp_info(rtps->ci); osmo_sockaddr_str_from_str(&rtps->local, crcx_info->addr, crcx_info->port); + if (rtps->use_osmux != crcx_info->x_osmo_osmux_use) { + LOG_RTPS(rtps, LOGL_ERROR, "Osmux usage request and response don't match: %d vs %d", + rtps->use_osmux, crcx_info->x_osmo_osmux_use); + /* TODO: proper failure path */ + OSMO_ASSERT(rtps->use_osmux != crcx_info->x_osmo_osmux_use); + } + if (crcx_info->x_osmo_osmux_use) + rtps->local_osmux_cid = crcx_info->x_osmo_osmux_cid; rtp_stream_update_id(rtps); osmo_fsm_inst_dispatch(fi->proc.parent, CALL_LEG_EV_RTP_STREAM_ADDR_AVAILABLE, rtps); check_established(rtps); if ((!rtps->remote_sent_to_mgw || !rtps->codec_sent_to_mgw) && osmo_sockaddr_str_is_set(&rtps->remote) + && (!rtps->use_osmux || rtps->remote_osmux_cid_sent_to_mgw) && rtps->codec_known) { LOG_RTPS(rtps, LOGL_DEBUG, - "local ip:port set;%s%s triggering MDCX to send the new settings\n", + "local ip:port set;%s%s%s triggering MDCX to send the new settings\n", (!rtps->remote_sent_to_mgw)? " remote ip:port not yet sent," : "", - (!rtps->codec_sent_to_mgw)? " codec not yet sent," : ""); + (!rtps->codec_sent_to_mgw)? " codec not yet sent," : "", + (rtps->use_osmux && !rtps->remote_osmux_cid_sent_to_mgw) ? "Osmux CID not yet sent,": ""); rtp_stream_do_mdcx(rtps); } return; @@ -166,6 +187,7 @@ case RTP_STREAM_EV_MDCX_FAIL: rtps->remote_sent_to_mgw = false; rtps->codec_sent_to_mgw = false; + rtps->remote_osmux_cid_sent_to_mgw = false; rtp_stream_update_id(rtps); rtp_stream_state_chg(rtps, RTP_STREAM_ST_DISCARDING); return; @@ -274,6 +296,8 @@ verb_info = (struct mgcp_conn_peer){ .call_id = rtps->call_id, .ptime = 20, + .x_osmo_osmux_use = rtps->use_osmux, + .x_osmo_osmux_cid = rtps->remote_osmux_cid, }; if (verb == MGCP_VERB_CRCX) @@ -347,9 +371,10 @@ return 0; } - LOG_RTPS(rtps, LOGL_DEBUG, "Committing: Tx MDCX to update the MGW: updating%s%s\n", + LOG_RTPS(rtps, LOGL_DEBUG, "Committing: Tx MDCX to update the MGW: updating%s%s%s\n", rtps->remote_sent_to_mgw ? "" : " remote-RTP-IP-port", - rtps->codec_sent_to_mgw ? "" : " codec"); + rtps->codec_sent_to_mgw ? "" : " codec", + (!rtps->use_osmux || rtps->remote_osmux_cid_sent_to_mgw) ? "" : " remote-Osmux-CID"); return rtp_stream_do_mdcx(rtps); } @@ -374,6 +399,16 @@ rtp_stream_update_id(rtps); } +void rtp_stream_set_remote_osmux_cid(struct rtp_stream *rtps, uint8_t osmux_cid) +{ + if (rtps->fi->state == RTP_STREAM_ST_ESTABLISHED) + rtp_stream_state_chg(rtps, RTP_STREAM_ST_ESTABLISHING); + LOG_RTPS(rtps, LOGL_DEBUG, "setting remote Osmux CID to %u\n", osmux_cid); + rtps->remote_osmux_cid = osmux_cid; + rtps->remote_osmux_cid_sent_to_mgw = false; + rtp_stream_update_id(rtps); +} + bool rtp_stream_is_established(struct rtp_stream *rtps) { if (!rtps) @@ -383,7 +418,8 @@ if (rtps->fi->state != RTP_STREAM_ST_ESTABLISHED) return false; if (!rtps->remote_sent_to_mgw - || !rtps->codec_sent_to_mgw) + || !rtps->codec_sent_to_mgw + || (rtps->use_osmux && !rtps->remote_osmux_cid_sent_to_mgw)) return false; return true; } -- To view, visit https://gerrit.osmocom.org/14041 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I5b14e34481e890669c9ee02dba81eba84293cebb Gerrit-Change-Number: 14041 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 18:41:11 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 18:41:11 +0000 Subject: Change in osmo-bsc[master]: bssap: Parse Osmux CID on BSSAP Assign Req recv and use it in MGCP In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13925 ) Change subject: bssap: Parse Osmux CID on BSSAP Assign Req recv and use it in MGCP ...................................................................... Patch Set 2: Expected build failure because dependency from osmo-mgw still not merged. -- To view, visit https://gerrit.osmocom.org/13925 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I86e7e13fc7921e3209fb764c0e7797e7ec09b79e Gerrit-Change-Number: 13925 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 13 May 2019 18:41:11 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 20:06:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 20:06:47 +0000 Subject: Change in osmo-bsc[master]: vty: Add option to enable osmux towards MSC In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13922 ) Change subject: vty: Add option to enable osmux towards MSC ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13922 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I30c485c022f2d55e0a004f69b2503da7f91ecb74 Gerrit-Change-Number: 13922 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 13 May 2019 20:06:47 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 20:07:26 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 20:07:26 +0000 Subject: Change in osmo-bsc[master]: bssap: Detect MSC Osmux support on RESET (ACK) recv In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13923 ) Change subject: bssap: Detect MSC Osmux support on RESET (ACK) recv ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13923 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I830e38cc1ffb8b6ebbe299567507160f19beb528 Gerrit-Change-Number: 13923 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 13 May 2019 20:07:26 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 20:07:51 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 20:07:51 +0000 Subject: Change in osmo-bsc[master]: bssap: Announce Osmux support on RESET (ACK) send In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13924 ) Change subject: bssap: Announce Osmux support on RESET (ACK) send ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13924 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6b5b475b6109a2882051445762e27046d015b770 Gerrit-Change-Number: 13924 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 13 May 2019 20:07:51 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 20:08:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 20:08:19 +0000 Subject: Change in osmo-mgw[master]: cosmetic: mgcp_udp_send: Document port param is in network byte order In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14019 ) Change subject: cosmetic: mgcp_udp_send: Document port param is in network byte order ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14019 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I7c4a388eba850ac066e60db089d46da0247773ec Gerrit-Change-Number: 14019 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 13 May 2019 20:08:19 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 20:08:27 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 20:08:27 +0000 Subject: Change in osmo-mgw[master]: cosmetic: osmux: Document network byte order in port variable In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14020 ) Change subject: cosmetic: osmux: Document network byte order in port variable ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14020 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia367ef08625265bc9cbdfcc693720a9b88852f4a Gerrit-Change-Number: 14020 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 13 May 2019 20:08:27 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 20:09:34 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 20:09:34 +0000 Subject: Change in osmo-mgw[master]: vty: Allow enabling Osmux In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14021 ) Change subject: vty: Allow enabling Osmux ...................................................................... Patch Set 1: will this commit alone make it work? If yes, we can merge the patch as-is. If not (which I suspect), then this patch should either be the very last patch in the series, or it should at least for now still have an "#if 1" -> print error message like now. -- To view, visit https://gerrit.osmocom.org/14021 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ica2f82473bf1934502444be2325ee2049d938781 Gerrit-Change-Number: 14021 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Harald Welte Gerrit-Comment-Date: Mon, 13 May 2019 20:09:34 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 20:10:04 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 20:10:04 +0000 Subject: Change in osmo-mgw[master]: osmux: Allocate CID during CRCX In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14022 ) Change subject: osmux: Allocate CID during CRCX ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14022 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie0e1835ff7e99421de9a5741a5eb57a11c004f7e Gerrit-Change-Number: 14022 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 13 May 2019 20:10:04 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 20:10:24 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 20:10:24 +0000 Subject: Change in osmo-mgw[master]: osmux: Introduce mgcp_conn_rtp_is_osmux() helper In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14023 ) Change subject: osmux: Introduce mgcp_conn_rtp_is_osmux() helper ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14023 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib5a239fdbc319bcb16317f5e959d9a724b7a444a Gerrit-Change-Number: 14023 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 13 May 2019 20:10:24 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 20:10:50 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 20:10:50 +0000 Subject: Change in osmo-mgw[master]: osmux: Mark conn_rtp->type as osmux during CRCX In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14024 ) Change subject: osmux: Mark conn_rtp->type as osmux during CRCX ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14024 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia6e723d9a28ba38fc3382a4fb35ea6e5bab30c09 Gerrit-Change-Number: 14024 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 13 May 2019 20:10:50 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 20:11:56 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 20:11:56 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Allow submitting X-Osmux on CRCX request In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14025 ) Change subject: mgcp-cli: Allow submitting X-Osmux on CRCX request ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14025 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I73b4c62baf39050da81d65553cbea07bc51163de Gerrit-Change-Number: 14025 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 13 May 2019 20:11:56 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 20:12:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 20:12:18 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Allow submitting X-Osmux on CRCX request In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14025 ) Change subject: mgcp-cli: Allow submitting X-Osmux on CRCX request ...................................................................... Patch Set 1: Code-Review-1 doesn't update TODO-RELEASE -- To view, visit https://gerrit.osmocom.org/14025 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I73b4c62baf39050da81d65553cbea07bc51163de Gerrit-Change-Number: 14025 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 13 May 2019 20:12:18 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 20:12:26 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 20:12:26 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Parse X-Osmux on CRCX response In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14026 ) Change subject: mgcp-cli: Parse X-Osmux on CRCX response ...................................................................... Patch Set 1: Code-Review-1 breaks ABI but doesn't update TODO-RELEASE -- To view, visit https://gerrit.osmocom.org/14026 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6174d092b7425b8d3d6d02a55bf294be3e710e6a Gerrit-Change-Number: 14026 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 13 May 2019 20:12:26 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 20:12:37 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 20:12:37 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Parse X-Osmux on CRCX response In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14026 ) Change subject: mgcp-cli: Parse X-Osmux on CRCX response ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/14026/1/src/libosmo-mgcp-client/mgcp_client_fsm.c File src/libosmo-mgcp-client/mgcp_client_fsm.c: https://gerrit.osmocom.org/#/c/14026/1/src/libosmo-mgcp-client/mgcp_client_fsm.c at 278 PS1, Line 278: if(r->head.x_osmo_osmux_use) { ws -- To view, visit https://gerrit.osmocom.org/14026 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6174d092b7425b8d3d6d02a55bf294be3e710e6a Gerrit-Change-Number: 14026 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 13 May 2019 20:12:37 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 20:12:57 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 20:12:57 +0000 Subject: Change in osmo-mgw[master]: osmux: Handle Osmux MGCP extension in MDCX messages In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14027 ) Change subject: osmux: Handle Osmux MGCP extension in MDCX messages ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14027 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I65e53bd5dd08b58c253e03d2f358f3be523a2688 Gerrit-Change-Number: 14027 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 13 May 2019 20:12:57 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 20:13:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 20:13:16 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Allow submitting X-Osmux on MDCX request In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14028 ) Change subject: mgcp-cli: Allow submitting X-Osmux on MDCX request ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14028 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I41243f3ed212ace6087d5b0341e3a52f4069e37d Gerrit-Change-Number: 14028 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 13 May 2019 20:13:16 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 20:13:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 20:13:53 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Parse X-Osmux on MDCX response In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14029 ) Change subject: mgcp-cli: Parse X-Osmux on MDCX response ...................................................................... Patch Set 1: (2 comments) you seem to be in an "if is a function" mode today :P https://gerrit.osmocom.org/#/c/14029/1/src/libosmo-mgcp-client/mgcp_client_fsm.c File src/libosmo-mgcp-client/mgcp_client_fsm.c: https://gerrit.osmocom.org/#/c/14029/1/src/libosmo-mgcp-client/mgcp_client_fsm.c at 407 PS1, Line 407: if(r->head.x_osmo_osmux_use) { ws https://gerrit.osmocom.org/#/c/14029/1/src/libosmo-mgcp/mgcp_protocol.c File src/libosmo-mgcp/mgcp_protocol.c: https://gerrit.osmocom.org/#/c/14029/1/src/libosmo-mgcp/mgcp_protocol.c at 326 PS1, Line 326: if(mgcp_conn_rtp_is_osmux(conn)) { ws -- To view, visit https://gerrit.osmocom.org/14029 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If182a48743ebe03f97caf9034e49b9947014bdf9 Gerrit-Change-Number: 14029 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Harald Welte Gerrit-Comment-Date: Mon, 13 May 2019 20:13:53 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 20:15:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 20:15:05 +0000 Subject: Change in osmo-msc[master]: libmsc/sgs_server.c: do not override rc in case of SCTP_SHUTDOWN_EVENT In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13967 ) Change subject: libmsc/sgs_server.c: do not override rc in case of SCTP_SHUTDOWN_EVENT ...................................................................... libmsc/sgs_server.c: do not override rc in case of SCTP_SHUTDOWN_EVENT Change-Id: I06215a7d3dc33f2e8adb77fa1b3f2ac5198dee26 Fixes: CID#190867 --- M src/libmsc/sgs_server.c 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/sgs_server.c b/src/libmsc/sgs_server.c index 28c42cb..779e12c 100644 --- a/src/libmsc/sgs_server.c +++ b/src/libmsc/sgs_server.c @@ -40,7 +40,7 @@ struct msgb *msg = gsm29118_msgb_alloc(); struct sctp_sndrcvinfo sinfo; int flags = 0; - int rc; + int rc = 0; /* we cannot use osmo_stream_srv_recv() here, as we might get some out-of-band info from * SCTP. FIXME: add something like osmo_stream_srv_recv_sctp() to libosmo-netif and use @@ -72,7 +72,6 @@ default: break; } - rc = 0; goto out; } -- To view, visit https://gerrit.osmocom.org/13967 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I06215a7d3dc33f2e8adb77fa1b3f2ac5198dee26 Gerrit-Change-Number: 13967 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 20:15:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 20:15:05 +0000 Subject: Change in osmo-msc[master]: libmsc/msc_ho.c: fix unreacheable check of MSC-T role allocation In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13975 ) Change subject: libmsc/msc_ho.c: fix unreacheable check of MSC-T role allocation ...................................................................... libmsc/msc_ho.c: fix unreacheable check of MSC-T role allocation Change-Id: I46fa37ff27e8a4576fdc8edad894ee16759a6e7a Fixes: CID#198413 --- M src/libmsc/msc_ho.c 1 file changed, 8 insertions(+), 7 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/msc_ho.c b/src/libmsc/msc_ho.c index 3a4258c..615b8cd 100644 --- a/src/libmsc/msc_ho.c +++ b/src/libmsc/msc_ho.c @@ -463,9 +463,8 @@ msc_i->ran_conn->ran_peer->fi->id, rp->fi->id); } - msc_t_alloc(msc_a->c.msub, rp); - msc_ho_send_handover_request(msc_a); - return; + msc_t = msc_t_alloc(msc_a->c.msub, rp); + break; case MSC_NEIGHBOR_TYPE_REMOTE_MSC: ipa_name = msc_a->ho.new_cell.msc_ipa_name; @@ -482,22 +481,24 @@ osmo_quote_str(ipa_name, -1)); } - msc_t_remote_alloc(msc_a->c.msub, msc_a->c.ran, (const uint8_t*)ipa_name, strlen(ipa_name)); - msc_ho_send_handover_request(msc_a); - return; + msc_t = msc_t_remote_alloc(msc_a->c.msub, msc_a->c.ran, + (const uint8_t *) ipa_name, + strlen(ipa_name)); + break; default: msc_ho_try_next_cell(msc_a, "unknown Handover target type %d\n", msc_a->ho.new_cell.type); return; } - msc_t = msc_a_msc_t(msc_a); if (!msc_t) { /* There should definitely be one now. */ msc_ho_failed(msc_a, GSM0808_CAUSE_EQUIPMENT_FAILURE, "Cannot initiate Handover Request, failed to set up a target MSC-T\n"); return; } + + msc_ho_send_handover_request(msc_a); } static void msc_ho_rx_request_ack(struct msc_a *msc_a, struct msc_a_ran_dec_data *hra); -- To view, visit https://gerrit.osmocom.org/13975 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I46fa37ff27e8a4576fdc8edad894ee16759a6e7a Gerrit-Change-Number: 13975 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 20:15:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 20:15:05 +0000 Subject: Change in osmo-msc[master]: libmsc/msc_a.c: fix possible NULL-pointer dereferences In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13976 ) Change subject: libmsc/msc_a.c: fix possible NULL-pointer dereferences ...................................................................... libmsc/msc_a.c: fix possible NULL-pointer dereferences Change-Id: Id5c95fbf318a2e51e7ffee2e08ceab3042b26cc9 Fixes: CID#198411, CID#198414 --- M src/libmsc/msc_a.c 1 file changed, 25 insertions(+), 7 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c index 5137e20..cfba545 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -245,10 +245,18 @@ int msc_a_vlr_set_cipher_mode(void *_msc_a, bool umts_aka, bool retrieve_imeisv) { struct msc_a *msc_a = _msc_a; - struct vlr_subscr *vsub = msc_a_vsub(msc_a); + struct vlr_subscr *vsub; - if (!msc_a || !vsub || !vsub->last_tuple) { - LOG_MSC_A(msc_a, LOGL_ERROR, "Insufficient info to start ciphering\n"); + if (!msc_a) { + LOGP(DMSC, LOGL_ERROR, "Insufficient info to start ciphering: " + "MSC-A role is NULL?!?\n"); + return -EINVAL; + } + + vsub = msc_a_vsub(msc_a); + if (!vsub || !vsub->last_tuple) { + LOG_MSC_A(msc_a, LOGL_ERROR, "Insufficient info to start ciphering: " + "vlr_subscr is NULL?!?\n"); return -EINVAL; } @@ -280,12 +288,22 @@ static int msc_a_ran_enc_ciphering(struct msc_a *msc_a, bool umts_aka, bool retrieve_imeisv) { - struct gsm_network *net = msc_a_net(msc_a); - struct vlr_subscr *vsub = msc_a_vsub(msc_a); + struct gsm_network *net; + struct vlr_subscr *vsub; struct ran_msg msg; - if (!msc_a || !vsub || !vsub->last_tuple) { - LOG_MSC_A(msc_a, LOGL_ERROR, "Insufficient info to start ciphering\n"); + if (!msc_a) { + LOGP(DMSC, LOGL_ERROR, "Insufficient info to start ciphering: " + "MSC-A role is NULL?!?\n"); + return -EINVAL; + } + + net = msc_a_net(msc_a); + vsub = msc_a_vsub(msc_a); + + if (!net || !vsub || !vsub->last_tuple) { + LOG_MSC_A(msc_a, LOGL_ERROR, "Insufficient info to start ciphering: " + "gsm_network and/or vlr_subscr is NULL?!?\n"); return -EINVAL; } -- To view, visit https://gerrit.osmocom.org/13976 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id5c95fbf318a2e51e7ffee2e08ceab3042b26cc9 Gerrit-Change-Number: 13976 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 20:15:06 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 20:15:06 +0000 Subject: Change in osmo-msc[master]: sms_queue_test: assert return value of osmo_use_count_get_put() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13977 ) Change subject: sms_queue_test: assert return value of osmo_use_count_get_put() ...................................................................... sms_queue_test: assert return value of osmo_use_count_get_put() Change-Id: I9381e88435ccd856ec619135ca9999c15c25d436 Fixes: CID#198416 --- M tests/sms_queue/sms_queue_test.c 1 file changed, 4 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/sms_queue/sms_queue_test.c b/tests/sms_queue/sms_queue_test.c index 495e078..25fc312 100644 --- a/tests/sms_queue/sms_queue_test.c +++ b/tests/sms_queue/sms_queue_test.c @@ -96,7 +96,7 @@ static struct vlr_subscr arbitrary_vsub = {}; static bool arbitrary_vsub_set_up = false; struct gsm_sms *sms; - int i; + int i, rc = 0; printf(" hitting database: looking for MSISDN > '%s', failed_attempts <= %d\n", last_msisdn, max_failed); @@ -110,9 +110,10 @@ * may call vlr_subscr_put() on our arbitrary_vsub, what would * lead to a segfault if its use_count <= 0. To prevent this, * let's ensure a big enough initial value. */ - osmo_use_count_get_put(&arbitrary_vsub.use_count, VSUB_USE_SMS_RECEIVER, 1000); - osmo_use_count_get_put(&arbitrary_vsub.use_count, VSUB_USE_SMS_PENDING, 1000); + rc += osmo_use_count_get_put(&arbitrary_vsub.use_count, VSUB_USE_SMS_RECEIVER, 1000); + rc += osmo_use_count_get_put(&arbitrary_vsub.use_count, VSUB_USE_SMS_PENDING, 1000); arbitrary_vsub.lu_complete = true; + OSMO_ASSERT(rc == 0); for (i = 0; i < ARRAY_SIZE(fake_sms_db); i++) { if (!fake_sms_db[i].nr_of_sms) -- To view, visit https://gerrit.osmocom.org/13977 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I9381e88435ccd856ec619135ca9999c15c25d436 Gerrit-Change-Number: 13977 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 20:15:06 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 20:15:06 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_11.c: fix NULL-pointer dereference in gsm340_rx_tpdu() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13978 ) Change subject: libmsc/gsm_04_11.c: fix NULL-pointer dereference in gsm340_rx_tpdu() ...................................................................... libmsc/gsm_04_11.c: fix NULL-pointer dereference in gsm340_rx_tpdu() Change-Id: I1e9b351e949efe596295d18f98c8a73c8e013763 Fixes: CID#198451 --- M src/libmsc/gsm_04_11.c 1 file changed, 17 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c index c5c3036..a3b3830 100644 --- a/src/libmsc/gsm_04_11.c +++ b/src/libmsc/gsm_04_11.c @@ -457,14 +457,25 @@ uint8_t da_len_bytes; uint8_t address_lv[12]; /* according to 03.40 / 9.1.2.5 */ int rc = 0; - struct msc_a *msc_a = trans->msc_a; - struct gsm_network *net = msc_a_net(msc_a); - struct vlr_subscr *vsub = msc_a_vsub(msc_a); + struct gsm_network *net; + struct vlr_subscr *vsub; - rate_ctr_inc(&net->msc_ctrs->ctr[MSC_CTR_SMS_SUBMITTED]); - - if (!msc_a || !vsub) + if (!trans->msc_a) { + LOG_TRANS(trans, LOGL_ERROR, "Insufficient info to process TPDU: " + "MSC-A role is NULL?!?\n"); return GSM411_RP_CAUSE_MO_NET_OUT_OF_ORDER; + } + + net = msc_a_net(trans->msc_a); + vsub = msc_a_vsub(trans->msc_a); + if (!net || !vsub) { + LOG_TRANS(trans, LOGL_ERROR, "Insufficient info to process TPDU: " + "gsm_network and/or vlr_subscr is NULL?!?\n"); + return GSM411_RP_CAUSE_MO_NET_OUT_OF_ORDER; + } + + /* FIXME: should we do this on success, after all checks? */ + rate_ctr_inc(&net->msc_ctrs->ctr[MSC_CTR_SMS_SUBMITTED]); gsms = sms_alloc(); if (!gsms) -- To view, visit https://gerrit.osmocom.org/13978 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I1e9b351e949efe596295d18f98c8a73c8e013763 Gerrit-Change-Number: 13978 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 20:15:06 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 20:15:06 +0000 Subject: Change in osmo-msc[master]: libmsc/ran_msg_a.c: avoid ternary operator in struct initialization In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13979 ) Change subject: libmsc/ran_msg_a.c: avoid ternary operator in struct initialization ...................................................................... libmsc/ran_msg_a.c: avoid ternary operator in struct initialization For some reason, having ternary operator there makes Coverity think that 'n->geran.chosen_encryption' is dereferenced before checking against NULL. Let's make it happy, and move the assignment. Change-Id: I95051d0f02e2fdd3ec8da3a506109e7b23e99b4b Fixes: CID#198454 Dereference before null check --- M src/libmsc/ran_msg_a.c 1 file changed, 1 insertion(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c index ba0990d..da32a84 100644 --- a/src/libmsc/ran_msg_a.c +++ b/src/libmsc/ran_msg_a.c @@ -1068,9 +1068,6 @@ .speech_version_used = n->speech_version_used, - .chosen_encryption_algorithm_serving = - n->geran.chosen_encryption ? n->geran.chosen_encryption->alg_id : 0, - .old_bss_to_new_bss_info_raw = n->old_bss_to_new_bss_info_raw, .old_bss_to_new_bss_info_raw_len = n->old_bss_to_new_bss_info_raw_len, @@ -1098,6 +1095,7 @@ memcpy(r.encryption_information.key, n->geran.chosen_encryption->key, n->geran.chosen_encryption->key_len); r.encryption_information.key_len = n->geran.chosen_encryption->key_len; + r.chosen_encryption_algorithm_serving = n->geran.chosen_encryption->alg_id; } if (n->classmark) -- To view, visit https://gerrit.osmocom.org/13979 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I95051d0f02e2fdd3ec8da3a506109e7b23e99b4b Gerrit-Change-Number: 13979 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 20:15:07 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 20:15:07 +0000 Subject: Change in osmo-msc[master]: libmsc/ran_msg_a.c: refactor ran_a_decode_lcls_notification() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13981 ) Change subject: libmsc/ran_msg_a.c: refactor ran_a_decode_lcls_notification() ...................................................................... libmsc/ran_msg_a.c: refactor ran_a_decode_lcls_notification() We basically need to make sure that one of two possible IEs is not NULL, while another is NULL (eXclusive OR). This can be done using at least two conditional branches. Change-Id: Ie0f9b5c1bbbfb744e0615da07d76037d91b0abc8 Fixes: CID#198444 Logically dead code --- M src/libmsc/ran_msg_a.c 1 file changed, 3 insertions(+), 10 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c index da32a84..21be896 100644 --- a/src/libmsc/ran_msg_a.c +++ b/src/libmsc/ran_msg_a.c @@ -375,13 +375,7 @@ struct ran_msg ran_dec_msg; /* Either ?3.2.2.119 LCLS-BSS-Status or ?3.2.2.120 LCLS-Break-Request shall be present */ - if ((!ie_lcls_bss_status && !ie_lcls_break_req) - || (ie_lcls_bss_status && ie_lcls_break_req)) { - LOG_RAN_A_DEC(ran_dec, LOGL_ERROR, "Ignoring broken LCLS Notification message\n"); - return -EINVAL; - } - - if (ie_lcls_bss_status) { + if (ie_lcls_bss_status && !ie_lcls_break_req) { ran_dec_msg = (struct ran_msg){ .msg_type = RAN_MSG_LCLS_STATUS, .msg_name = "BSSMAP LCLS Notification (LCLS Status)", @@ -391,9 +385,7 @@ }, }; return ran_decoded(ran_dec, &ran_dec_msg); - } - - if (ie_lcls_break_req) { + } else if (ie_lcls_break_req && !ie_lcls_bss_status) { ran_dec_msg = (struct ran_msg){ .msg_type = RAN_MSG_LCLS_BREAK_REQ, .msg_name = "BSSMAP LCLS Notification (LCLS Break Req)", @@ -404,6 +396,7 @@ return ran_decoded(ran_dec, &ran_dec_msg); } + LOG_RAN_A_DEC(ran_dec, LOGL_ERROR, "Ignoring broken LCLS Notification message\n"); return -EINVAL; } -- To view, visit https://gerrit.osmocom.org/13981 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie0f9b5c1bbbfb744e0615da07d76037d91b0abc8 Gerrit-Change-Number: 13981 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 20:15:07 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 20:15:07 +0000 Subject: Change in osmo-msc[master]: libmsc/ran_msg_a.c: prevent chosen_encryption->key buffer overrun In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13982 ) Change subject: libmsc/ran_msg_a.c: prevent chosen_encryption->key buffer overrun ...................................................................... libmsc/ran_msg_a.c: prevent chosen_encryption->key buffer overrun In ran_a_make_handover_request() we do prevent destination buffer (r.encryption_information.key) overflow, but not source buffer (n->geran.chosen_encryption->key) overrun if an incorrect key length is received. Let's fix this. Change-Id: I278bb72660634c2d535e1bd3d7fce5696da23575 Fixes: CID#198450 Out-of-bounds access --- M src/libmsc/ran_msg_a.c 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c index 21be896..805308c 100644 --- a/src/libmsc/ran_msg_a.c +++ b/src/libmsc/ran_msg_a.c @@ -1080,7 +1080,9 @@ /* Encryption Information */ make_encrypt_info_perm_algo(log_fi, &r.encryption_information, n->geran.a5_encryption_mask, n->classmark); if (n->geran.chosen_encryption && n->geran.chosen_encryption->key_len) { - if (n->geran.chosen_encryption->key_len > sizeof(r.encryption_information.key)) { + /* Prevent both source / destination buffer overrun / overflow */ + if (n->geran.chosen_encryption->key_len > sizeof(r.encryption_information.key) + || n->geran.chosen_encryption->key_len > sizeof(n->geran.chosen_encryption->key)) { LOG_RAN_A_ENC(log_fi, LOGL_ERROR, "Handover Request: invalid chosen encryption key size %u\n", n->geran.chosen_encryption->key_len); return NULL; -- To view, visit https://gerrit.osmocom.org/13982 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I278bb72660634c2d535e1bd3d7fce5696da23575 Gerrit-Change-Number: 13982 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 20:15:07 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 13 May 2019 20:15:07 +0000 Subject: Change in osmo-msc[master]: libmsc/mncc_call.c: fix uninitialized access of stack memory In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13983 ) Change subject: libmsc/mncc_call.c: fix uninitialized access of stack memory ...................................................................... libmsc/mncc_call.c: fix uninitialized access of stack memory Change-Id: I5f561d9682c9fb87e4837430063095ef2cb7bd5f Fixes: CID#198405 --- M src/libmsc/mncc_call.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/mncc_call.c b/src/libmsc/mncc_call.c index 6ea4024..5ca91d0 100644 --- a/src/libmsc/mncc_call.c +++ b/src/libmsc/mncc_call.c @@ -199,7 +199,7 @@ void mncc_call_detach_rtp_stream(struct mncc_call *mncc_call) { struct rtp_stream *rtps = mncc_call->rtps; - struct osmo_sockaddr_str clear; + struct osmo_sockaddr_str clear = { 0 }; if (!rtps) return; mncc_call->rtps = NULL; -- To view, visit https://gerrit.osmocom.org/13983 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I5f561d9682c9fb87e4837430063095ef2cb7bd5f Gerrit-Change-Number: 13983 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 20:25:48 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 20:25:48 +0000 Subject: Change in osmo-mgw[master]: cosmetic: mgcp_udp_send: Document port param is in network byte order In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/14019 ) Change subject: cosmetic: mgcp_udp_send: Document port param is in network byte order ...................................................................... cosmetic: mgcp_udp_send: Document port param is in network byte order Change-Id: I7c4a388eba850ac066e60db089d46da0247773ec --- M src/libosmo-mgcp/mgcp_network.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 4d92051..dbed156 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -130,7 +130,7 @@ /*! send udp packet. * \param[in] fd associated file descriptor * \param[in] addr destination ip-address - * \param[in] port destination UDP port + * \param[in] port destination UDP port (network byte order) * \param[in] buf buffer that holds the data to be send * \param[in] len length of the data to be sent * \returns bytes sent, -1 on error */ -- To view, visit https://gerrit.osmocom.org/14019 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I7c4a388eba850ac066e60db089d46da0247773ec Gerrit-Change-Number: 14019 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 13 20:25:49 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 13 May 2019 20:25:49 +0000 Subject: Change in osmo-mgw[master]: cosmetic: osmux: Document network byte order in port variable In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/14020 ) Change subject: cosmetic: osmux: Document network byte order in port variable ...................................................................... cosmetic: osmux: Document network byte order in port variable Change-Id: Ia367ef08625265bc9cbdfcc693720a9b88852f4a --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 149f27b..d91cf68 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -35,7 +35,7 @@ struct llist_head head; struct osmux_in_handle *in; struct in_addr rem_addr; - int rem_port; + int rem_port; /* network byte order */ int refcnt; }; @@ -543,7 +543,7 @@ * \param[in] endp mgcp endpoint (configuration) * \param[in] conn connection to disable * \param[in] addr IP address of remote OSMUX endpoint - * \param[in] port portnumber of the remote OSMUX endpoint + * \param[in] port portnumber of the remote OSMUX endpoint (in network byte order) * \returns 0 on success, -1 on ERROR */ int osmux_enable_conn(struct mgcp_endpoint *endp, struct mgcp_conn_rtp *conn, struct in_addr *addr, uint16_t port) -- To view, visit https://gerrit.osmocom.org/14020 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ia367ef08625265bc9cbdfcc693720a9b88852f4a Gerrit-Change-Number: 14020 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 08:19:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 May 2019 08:19:47 +0000 Subject: Change in osmo-msc[master]: vlr_lu_fsm.c: assert for invalid events In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13965 ) Change subject: vlr_lu_fsm.c: assert for invalid events ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13965 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If5363ae37b414a0ac195e5f89664c75cbad0bb21 Gerrit-Change-Number: 13965 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Tue, 14 May 2019 08:19:47 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 08:19:52 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 May 2019 08:19:52 +0000 Subject: Change in osmo-msc[master]: vlr_lu_fsm.c: assert for invalid events In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13965 ) Change subject: vlr_lu_fsm.c: assert for invalid events ...................................................................... vlr_lu_fsm.c: assert for invalid events In state machine callback functions, instead of logging an error when an invalid event arrives, do OSMO_ASSERT(0). Change-Id: If5363ae37b414a0ac195e5f89664c75cbad0bb21 --- M src/libvlr/vlr_lu_fsm.c 1 file changed, 6 insertions(+), 12 deletions(-) Approvals: Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c index 27196d8..15ab88c 100644 --- a/src/libvlr/vlr_lu_fsm.c +++ b/src/libvlr/vlr_lu_fsm.c @@ -1086,8 +1086,7 @@ _start_lu_main(fi); break; default: - LOGPFSML(fi, LOGL_ERROR, "event without effect: %s\n", - osmo_fsm_event_name(fi->fsm, event)); + OSMO_ASSERT(0); break; } } @@ -1104,8 +1103,7 @@ vlr_loc_upd_want_imsi(fi); break; default: - LOGPFSML(fi, LOGL_ERROR, "event without effect: %s\n", - osmo_fsm_event_name(fi->fsm, event)); + OSMO_ASSERT(0); break; } } @@ -1170,8 +1168,7 @@ vlr_loc_upd_node1(fi); break; default: - LOGPFSML(fi, LOGL_ERROR, "event without effect: %s\n", - osmo_fsm_event_name(fi->fsm, event)); + OSMO_ASSERT(0); break; } } @@ -1213,8 +1210,7 @@ } break; default: - LOGPFSML(fi, LOGL_ERROR, "event without effect: %s\n", - osmo_fsm_event_name(fi->fsm, event)); + OSMO_ASSERT(0); break; } } @@ -1264,8 +1260,7 @@ lu_fsm_failure(fi, cause); break; default: - LOGPFSML(fi, LOGL_ERROR, "event without effect: %s\n", - osmo_fsm_event_name(fi->fsm, event)); + OSMO_ASSERT(0); break; } } @@ -1297,8 +1292,7 @@ lu_fsm_failure(fi, cause); break; default: - LOGPFSML(fi, LOGL_ERROR, "event without effect: %s\n", - osmo_fsm_event_name(fi->fsm, event)); + OSMO_ASSERT(0); break; } } -- To view, visit https://gerrit.osmocom.org/13965 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If5363ae37b414a0ac195e5f89664c75cbad0bb21 Gerrit-Change-Number: 13965 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 08:29:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 May 2019 08:29:19 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: endpoint_fsm: Add API to retrieve Osmux CID from MGW In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14031 ) Change subject: mgcp-cli: endpoint_fsm: Add API to retrieve Osmux CID from MGW ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14031 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic80d47f8eedda1c6ac8c33f1cafeb55c65e74692 Gerrit-Change-Number: 14031 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 14 May 2019 08:29:19 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 08:29:42 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 May 2019 08:29:42 +0000 Subject: Change in osmo-mgw[master]: osmux: Provide correct local port during mgcp resp In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14032 ) Change subject: osmux: Provide correct local port during mgcp resp ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14032 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I12c8fcdc8b772b9f92a70774406d4662f44bd9a9 Gerrit-Change-Number: 14032 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 14 May 2019 08:29:42 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 08:30:01 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 May 2019 08:30:01 +0000 Subject: Change in osmo-mgw[master]: osmux: Use remote port to send osmux frames In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14033 ) Change subject: osmux: Use remote port to send osmux frames ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14033 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I01e590465fa247185d74103578681e9041249099 Gerrit-Change-Number: 14033 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 14 May 2019 08:30:01 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 08:30:06 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 May 2019 08:30:06 +0000 Subject: Change in osmo-mgw[master]: osmux: Improve logging around osmux enabling events In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14034 ) Change subject: osmux: Improve logging around osmux enabling events ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14034 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iab687b97010fd484cb353b240b120c9c382066fa Gerrit-Change-Number: 14034 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 14 May 2019 08:30:06 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 08:30:45 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 May 2019 08:30:45 +0000 Subject: Change in osmo-mgw[master]: osmux: Delay osmux enable of conn until remote addr is configured by ... In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14035 ) Change subject: osmux: Delay osmux enable of conn until remote addr is configured by MDCX ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14035 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I243e53681ebeb3d9cd8ed38bb132172b41745795 Gerrit-Change-Number: 14035 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 14 May 2019 08:30:45 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 08:31:25 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 May 2019 08:31:25 +0000 Subject: Change in osmo-mgw[master]: osmux: Redo read/write osmux glue code to have data routed correctly In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14036 ) Change subject: osmux: Redo read/write osmux glue code to have data routed correctly ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14036 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I60b6ba3ffdc74efff945ba13a0b736798bdf5d8c Gerrit-Change-Number: 14036 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 14 May 2019 08:31:25 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 08:31:43 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 May 2019 08:31:43 +0000 Subject: Change in osmo-ggsn[master]: osmo-ggsn: check result of osmo_apn_to_str() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14015 ) Change subject: osmo-ggsn: check result of osmo_apn_to_str() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14015 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I03d0eb266dca176f342e77a54f0291cc5bd7df43 Gerrit-Change-Number: 14015 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 14 May 2019 08:31:43 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 08:31:51 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 May 2019 08:31:51 +0000 Subject: Change in osmo-ggsn[master]: osmo-ggsn: check result of osmo_apn_to_str() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14015 ) Change subject: osmo-ggsn: check result of osmo_apn_to_str() ...................................................................... osmo-ggsn: check result of osmo_apn_to_str() Change-Id: I03d0eb266dca176f342e77a54f0291cc5bd7df43 --- M ggsn/ggsn.c 1 file changed, 7 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified Pau Espin Pedrol: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 2d37cf0..a3bf4db 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -639,15 +639,17 @@ struct in46_addr addr[2]; struct ippoolm_t *member = NULL, *addrv4 = NULL, *addrv6 = NULL; char straddrv4[INET_ADDRSTRLEN], straddrv6[INET6_ADDRSTRLEN]; - struct apn_ctx *apn; + struct apn_ctx *apn = NULL; int rc, num_addr, i; + char *apn_name; - osmo_apn_to_str(name_buf, pdp->apn_req.v, pdp->apn_req.l); - - LOGPPDP(LOGL_DEBUG, pdp, "Processing create PDP context request for APN '%s'\n", name_buf); + apn_name = osmo_apn_to_str(name_buf, pdp->apn_req.v, pdp->apn_req.l); + LOGPPDP(LOGL_DEBUG, pdp, "Processing create PDP context request for APN '%s'\n", + apn_name ? name_buf : "(NONE)"); /* First find an exact APN name match */ - apn = ggsn_find_apn(ggsn, name_buf); + if (apn_name != NULL) + apn = ggsn_find_apn(ggsn, name_buf); /* ignore if the APN has not been started */ if (apn && !apn->started) apn = NULL; -- To view, visit https://gerrit.osmocom.org/14015 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I03d0eb266dca176f342e77a54f0291cc5bd7df43 Gerrit-Change-Number: 14015 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 08:32:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 May 2019 08:32:19 +0000 Subject: Change in osmo-ggsn[master]: osmo-ggsn: print requested / actual APN in PDP info In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14016 ) Change subject: osmo-ggsn: print requested / actual APN in PDP info ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14016 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9cbe195f64e5b83d5158c175aad2e81ba2487850 Gerrit-Change-Number: 14016 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 14 May 2019 08:32:19 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 08:32:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 May 2019 08:32:47 +0000 Subject: Change in osmo-ggsn[master]: osmo-ggsn: print requested / actual APN in PDP info In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14016 ) Change subject: osmo-ggsn: print requested / actual APN in PDP info ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/14016/1/ggsn/ggsn_vty.c File ggsn/ggsn_vty.c: https://gerrit.osmocom.org/#/c/14016/1/ggsn/ggsn_vty.c at 752 PS1, Line 752: vty_out(vty, " APN requested: %s%s", apn_name ? name_buf : "(NONE)", VTY_NEWLINE); > Probably makes sense to swap both (chronological order: first user requested X, then we actually ass [?] good idea, I'll quickly edit it here in gerrit. -- To view, visit https://gerrit.osmocom.org/14016 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9cbe195f64e5b83d5158c175aad2e81ba2487850 Gerrit-Change-Number: 14016 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 14 May 2019 08:32:47 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 08:33:28 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 May 2019 08:33:28 +0000 Subject: Change in osmo-ggsn[master]: osmo-ggsn: print requested / actual APN in PDP info In-Reply-To: References: Message-ID: Harald Welte has uploaded a new patch set (#2) to the change originally created by Vadim Yanitskiy. ( https://gerrit.osmocom.org/14016 ) Change subject: osmo-ggsn: print requested / actual APN in PDP info ...................................................................... osmo-ggsn: print requested / actual APN in PDP info An actual APN can be different from the one that was requested by user, e.g. when 'default-apn' VTY parameter is used. The one that was requested is already being stored in the PDP context state. Let's also store a chosen APN in create_context_ind(). Change-Id: I9cbe195f64e5b83d5158c175aad2e81ba2487850 --- M ggsn/ggsn.c M ggsn/ggsn_vty.c 2 files changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/16/14016/2 -- To view, visit https://gerrit.osmocom.org/14016 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9cbe195f64e5b83d5158c175aad2e81ba2487850 Gerrit-Change-Number: 14016 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 08:33:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 May 2019 08:33:47 +0000 Subject: Change in osmocom-bb[master]: firmware/Makefile.inc: fix sections with overlapping VMA In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14006 ) Change subject: firmware/Makefile.inc: fix sections with overlapping VMA ...................................................................... firmware/Makefile.inc: fix sections with overlapping VMA Starting from [1], not only LMA but also VMA areas are now checked for overlaps (see also [2]). This results into linking errors: arm-none-eabi-ld: section .text.exceptions VMA [000000000080001c,0000000000800037] overlaps section .compal.reservedram VMA [0000000000800000,00000000008000fe] arm-none-eabi-ld: section .text.exceptions VMA [000000000080001c,0000000000800037] overlaps section .compal.loader VMA [0000000000800000,00000000008000ff] Let's try to work around this. [1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a87dd97a2098b7e18ff2574a4e81ae521ef7e6f2 [2] https://sourceware.org/bugzilla/show_bug.cgi?id=18452 Change-Id: I098ddd33aabd7ec27981e2f09d8582f167bb649b Fixes: OS#1917 --- M src/target/firmware/board/compal/ram.lds M src/target/firmware/board/compal_e88/flash.lds 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Verified Harald Welte: Looks good to me, approved diff --git a/src/target/firmware/board/compal/ram.lds b/src/target/firmware/board/compal/ram.lds index b52b619..4f08a83 100644 --- a/src/target/firmware/board/compal/ram.lds +++ b/src/target/firmware/board/compal/ram.lds @@ -20,10 +20,10 @@ . = 0x800000; /* romloader data section, contains passthru interrupt vectors */ - .compal.loader (NOLOAD) : { . = 0x100; } > LRAM + .compal.loader (NOLOAD) : { . = 0x1c; } > LRAM /* image signature (prepended by osmocon according to phone type) */ - .compal.header (NOLOAD) : { . = 4; } > LRAM + .compal.header 0x800100 (NOLOAD): { . = 4; } > LRAM /* initialization code */ . = ALIGN(4); diff --git a/src/target/firmware/board/compal_e88/flash.lds b/src/target/firmware/board/compal_e88/flash.lds index 67d727f..52148d9 100644 --- a/src/target/firmware/board/compal_e88/flash.lds +++ b/src/target/firmware/board/compal_e88/flash.lds @@ -91,8 +91,8 @@ PROVIDE(_got_end = ADDR(.got) + SIZEOF(.got)); /* reserved ram */ - .compal.reservedram 0x800000 (NOLOAD) : { - . = 0xff; + .compal.reservedram 0x800038 (NOLOAD) : { + . = 0xff - 0x38; } > IRAM /* initialized data */ -- To view, visit https://gerrit.osmocom.org/14006 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I098ddd33aabd7ec27981e2f09d8582f167bb649b Gerrit-Change-Number: 14006 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 08:33:54 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 May 2019 08:33:54 +0000 Subject: Change in osmocom-bb[master]: firmware/Makefile: clarify toolchain configuration include In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14007 ) Change subject: firmware/Makefile: clarify toolchain configuration include ...................................................................... firmware/Makefile: clarify toolchain configuration include Change-Id: I77ce68d5904ff623f10f6475309052666bab7742 --- M src/target/firmware/Makefile 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/target/firmware/Makefile b/src/target/firmware/Makefile index 914db6c..2f44a20 100644 --- a/src/target/firmware/Makefile +++ b/src/target/firmware/Makefile @@ -127,7 +127,7 @@ -include tiffs/Makefile -include lib/Makefile -# Include rules +# Include toolchain configuration -include Makefile.inc -- To view, visit https://gerrit.osmocom.org/14007 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I77ce68d5904ff623f10f6475309052666bab7742 Gerrit-Change-Number: 14007 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 09:17:20 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 14 May 2019 09:17:20 +0000 Subject: Change in osmo-mgw[master]: vty: Allow enabling Osmux In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14021 ) Change subject: vty: Allow enabling Osmux ...................................................................... Patch Set 1: > will this commit alone make it work? If yes, we can merge the > patch as-is. If not (which I suspect), then this patch should > either be the very last patch in the series, or it should at least > for now still have an "#if 1" -> print error message like now. Well it makes sense from chronological and development point of view to have this first, since you want to build the new code using the pre-existing logic of enabling it from a VTY cmd, so I first need to enable it to test it. Once the whole set of patches in this patchset is merged (they can be merged together), then Osmux works again, at least for the most common cases I tested. Since it's quite a lot of work, my plan is to have this patchset merged providing initial support and once merged provide TTCN3 tests on osmo-bsc/osmo-msc/osmo-mgw. Later on features/special cases can be improved, otherwise the amount of patches I need to maintain in my branch is quite big. -- To view, visit https://gerrit.osmocom.org/14021 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ica2f82473bf1934502444be2325ee2049d938781 Gerrit-Change-Number: 14021 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Harald Welte Gerrit-Comment-Date: Tue, 14 May 2019 09:17:20 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 09:18:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 May 2019 09:18:09 +0000 Subject: Change in osmo-msc[master]: make LOG_TRANS() NULL-safe again In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13992 ) Change subject: make LOG_TRANS() NULL-safe again ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13992 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6e36c47bf828dd073b36c6301bbeabcc28e101e6 Gerrit-Change-Number: 13992 Gerrit-PatchSet: 2 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-Comment-Date: Tue, 14 May 2019 09:18:09 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 09:18:11 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 May 2019 09:18:11 +0000 Subject: Change in osmo-msc[master]: make LOG_TRANS() NULL-safe again In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13992 ) Change subject: make LOG_TRANS() NULL-safe again ...................................................................... make LOG_TRANS() NULL-safe again Previous patch [1] removed NULL-safety from LOG_TRANS(). Fix that. In case a trans is NULL, it is fine to log in the DMSC category, since the context should still be general (erratic message or other initial problems). [1] 7f85acea9bb9f80e208820958f4cae63625f3689 / I6dfe5b98fb9e884c2dde61d603832dafceb12123 "LOG_TRANS: store subsys in trans, unify USSD logging back to DMM" Change-Id: I6e36c47bf828dd073b36c6301bbeabcc28e101e6 --- M include/osmocom/msc/transaction.h 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve tnt: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmocom/msc/transaction.h b/include/osmocom/msc/transaction.h index c63ef5b..9278b64 100644 --- a/include/osmocom/msc/transaction.h +++ b/include/osmocom/msc/transaction.h @@ -27,7 +27,7 @@ ##args) #define LOG_TRANS(trans, level, fmt, args...) \ - LOG_TRANS_CAT(trans, (trans)->log_subsys, level, fmt, ##args) + LOG_TRANS_CAT(trans, (trans) ? (trans)->log_subsys : DMSC, level, fmt, ##args) enum bridge_state { BRIDGE_STATE_NONE, -- To view, visit https://gerrit.osmocom.org/13992 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I6e36c47bf828dd073b36c6301bbeabcc28e101e6 Gerrit-Change-Number: 13992 Gerrit-PatchSet: 3 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 09:31:00 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 14 May 2019 09:31:00 +0000 Subject: Change in osmo-ggsn[master]: osmo-ggsn: print requested / actual APN in PDP info In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14016 ) Change subject: osmo-ggsn: print requested / actual APN in PDP info ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14016 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9cbe195f64e5b83d5158c175aad2e81ba2487850 Gerrit-Change-Number: 14016 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 14 May 2019 09:31:00 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 09:31:15 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 14 May 2019 09:31:15 +0000 Subject: Change in osmo-ggsn[master]: osmo-ggsn: print requested / actual APN in PDP info In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/14016 ) Change subject: osmo-ggsn: print requested / actual APN in PDP info ...................................................................... osmo-ggsn: print requested / actual APN in PDP info An actual APN can be different from the one that was requested by user, e.g. when 'default-apn' VTY parameter is used. The one that was requested is already being stored in the PDP context state. Let's also store a chosen APN in create_context_ind(). Change-Id: I9cbe195f64e5b83d5158c175aad2e81ba2487850 --- M ggsn/ggsn.c M ggsn/ggsn_vty.c 2 files changed, 14 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, approved diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index a3bf4db..bd8647f 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -685,6 +685,12 @@ return 0; } + /* Store the actual APN for logging and the VTY */ + rc = osmo_apn_from_str(pdp->apn_use.v, sizeof(pdp->apn_use.v), apn->cfg.name); + if (rc < 0) /* Unlikely this would happen, but anyway... */ + LOGPPDP(LOGL_ERROR, pdp, "Failed to store APN '%s'\n", apn->cfg.name); + pdp->apn_use.l = rc; + /* Allocate dynamic addresses from the pool */ for (i = 0; i < num_addr; i++) { if (addr[i].len == sizeof(struct in_addr)) { diff --git a/ggsn/ggsn_vty.c b/ggsn/ggsn_vty.c index 594c0e9..214e2fa 100644 --- a/ggsn/ggsn_vty.c +++ b/ggsn/ggsn_vty.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -733,6 +734,8 @@ static void show_one_pdp(struct vty *vty, struct pdp_t *pdp) { struct in46_addr eua46; + char name_buf[256]; + char *apn_name; vty_out(vty, "IMSI: %s, NSAPI: %u, MSISDN: %s%s", imsi_gtp2str(&pdp->imsi), pdp->nsapi, osmo_hexdump_nospc(pdp->msisdn.v, pdp->msisdn.l), VTY_NEWLINE); @@ -743,6 +746,11 @@ vty_out(vty, " Data: %s:%08x ", print_gsnaddr(&pdp->gsnlu), pdp->teid_own); vty_out(vty, "<-> %s:%08x%s", print_gsnaddr(&pdp->gsnru), pdp->teid_gn, VTY_NEWLINE); + apn_name = osmo_apn_to_str(name_buf, pdp->apn_req.v, pdp->apn_req.l); + vty_out(vty, " APN requested: %s%s", apn_name ? name_buf : "(NONE)", VTY_NEWLINE); + apn_name = osmo_apn_to_str(name_buf, pdp->apn_use.v, pdp->apn_use.l); + vty_out(vty, " APN in use: %s%s", apn_name ? name_buf : "(NONE)", VTY_NEWLINE); + in46a_from_eua(&pdp->eua, &eua46); vty_out(vty, " End-User Address: %s%s", in46a_ntoa(&eua46), VTY_NEWLINE); vty_out(vty, " Transmit GTP Sequence Number for G-PDU: %s%s", -- To view, visit https://gerrit.osmocom.org/14016 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I9cbe195f64e5b83d5158c175aad2e81ba2487850 Gerrit-Change-Number: 14016 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 09:35:27 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 14 May 2019 09:35:27 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Parse X-Osmux on MDCX response In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14029 ) Change subject: mgcp-cli: Parse X-Osmux on MDCX response ...................................................................... Patch Set 1: > (2 comments) > > you seem to be in an "if is a function" mode today :P I wish it was only today! I am actually quite used to using "if(" style. -- To view, visit https://gerrit.osmocom.org/14029 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If182a48743ebe03f97caf9034e49b9947014bdf9 Gerrit-Change-Number: 14029 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Harald Welte Gerrit-Comment-Date: Tue, 14 May 2019 09:35:27 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 09:37:46 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 14 May 2019 09:37:46 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Allow submitting X-Osmux on CRCX request In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14025 to look at the new patch set (#2). Change subject: mgcp-cli: Allow submitting X-Osmux on CRCX request ...................................................................... mgcp-cli: Allow submitting X-Osmux on CRCX request Change-Id: I73b4c62baf39050da81d65553cbea07bc51163de --- M TODO-RELEASE M include/osmocom/mgcp/mgcp_common.h M include/osmocom/mgcp_client/mgcp_client.h M include/osmocom/mgcp_client/mgcp_client_fsm.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp-client/mgcp_client_fsm.c M tests/mgcp_client/mgcp_client_test.c M tests/mgcp_client/mgcp_client_test.ok 8 files changed, 64 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/25/14025/2 -- To view, visit https://gerrit.osmocom.org/14025 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I73b4c62baf39050da81d65553cbea07bc51163de Gerrit-Change-Number: 14025 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 09:37:46 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 14 May 2019 09:37:46 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Parse X-Osmux on CRCX response In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14026 to look at the new patch set (#2). Change subject: mgcp-cli: Parse X-Osmux on CRCX response ...................................................................... mgcp-cli: Parse X-Osmux on CRCX response Change-Id: I6174d092b7425b8d3d6d02a55bf294be3e710e6a --- M TODO-RELEASE M include/osmocom/mgcp_client/mgcp_client.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp-client/mgcp_client_fsm.c 4 files changed, 57 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/26/14026/2 -- To view, visit https://gerrit.osmocom.org/14026 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6174d092b7425b8d3d6d02a55bf294be3e710e6a Gerrit-Change-Number: 14026 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 09:37:46 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 14 May 2019 09:37:46 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Parse X-Osmux on MDCX response In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14029 to look at the new patch set (#2). Change subject: mgcp-cli: Parse X-Osmux on MDCX response ...................................................................... mgcp-cli: Parse X-Osmux on MDCX response During MDCX state is already changed to ACTIVATING but we still want to send the local CID back to announce that we still use same local CID. Change-Id: If182a48743ebe03f97caf9034e49b9947014bdf9 --- M src/libosmo-mgcp-client/mgcp_client_fsm.c M src/libosmo-mgcp/mgcp_protocol.c 2 files changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/29/14029/2 -- To view, visit https://gerrit.osmocom.org/14029 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: If182a48743ebe03f97caf9034e49b9947014bdf9 Gerrit-Change-Number: 14029 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 09:45:57 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 14 May 2019 09:45:57 +0000 Subject: Change in osmo-msc[master]: vty: Add option to enable osmux towards BSCs In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14038 to look at the new patch set (#2). Change subject: vty: Add option to enable osmux towards BSCs ...................................................................... vty: Add option to enable osmux towards BSCs Change-Id: I6de1be0322ddbdc115074ebb6be2598ebf6c95db --- M include/osmocom/msc/Makefile.am M include/osmocom/msc/gsm_data.h A include/osmocom/msc/osmux.h M src/libmsc/msc_vty.c M tests/test_nodes.vty 5 files changed, 36 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/38/14038/2 -- To view, visit https://gerrit.osmocom.org/14038 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6de1be0322ddbdc115074ebb6be2598ebf6c95db Gerrit-Change-Number: 14038 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 10:03:34 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 May 2019 10:03:34 +0000 Subject: Change in osmo-mgw[master]: vty: Allow enabling Osmux In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14021 ) Change subject: vty: Allow enabling Osmux ...................................................................... Patch Set 1: > > will this commit alone make it work? If yes, we can merge the > > patch as-is. If not (which I suspect), then this patch should > > either be the very last patch in the series, or it should at > least > > for now still have an "#if 1" -> print error message like now. > > Well it makes sense from chronological and development point of > view to have this first, since you want to build the new code using > the pre-existing logic of enabling it from a VTY cmd, so I first > need to enable it to test it. Once the whole set of patches in this > patchset is merged (they can be merged together), then Osmux works > again, at least for the most common cases I tested. > > Since it's quite a lot of work, my plan is to have this patchset > merged providing initial support and once merged provide TTCN3 > tests on osmo-bsc/osmo-msc/osmo-mgw. Later on features/special > cases can be improved, otherwise the amount of patches I need to > maintain in my branch is quite big. In the end, our software is difficult enough to use as-is. We shouldn't confuse the user with options that can be enabled and imply something is working, while it absolutely isn't. I'm sure we have already some of these, but we shouldn't add more to it. If you first enable some VTY option, commit that and then only later actually fix/implement it, then there's also the danger that we might tag a release in between. The VTY commands then get listed in the manuals, etc. So in summary, I think it's not too much to ask to keep the vty/config options in a private branch until the functionality is actually known wokring. -- To view, visit https://gerrit.osmocom.org/14021 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ica2f82473bf1934502444be2325ee2049d938781 Gerrit-Change-Number: 14021 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Harald Welte Gerrit-Comment-Date: Tue, 14 May 2019 10:03:34 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 10:10:17 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 14 May 2019 10:10:17 +0000 Subject: Change in osmo-mgw[master]: vty: Allow enabling Osmux In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14021 ) Change subject: vty: Allow enabling Osmux ...................................................................... Patch Set 1: I didn't submit the branch until I got into a state where it can be used/tested. So it's going to be into a private branch until we merge the entire osmo-mgw patchset together. I'm fine with waiting until the entire patchset is ready to go and be merged. It doesn't make sense to me to merge half of them anyway for same reasons you expose. -- To view, visit https://gerrit.osmocom.org/14021 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ica2f82473bf1934502444be2325ee2049d938781 Gerrit-Change-Number: 14021 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Harald Welte Gerrit-Comment-Date: Tue, 14 May 2019 10:10:17 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 13:53:01 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 14 May 2019 13:53:01 +0000 Subject: Change in osmocom-bb[master]: common/sim.c: add missing break to sim_apdu_resp() Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14042 Change subject: common/sim.c: add missing break to sim_apdu_resp() ...................................................................... common/sim.c: add missing break to sim_apdu_resp() Change-Id: Id5c325ffcfea8175bc5d5499a0904c0984e00349 Fixes: OS#198542 --- M src/host/layer23/src/common/sim.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/42/14042/1 diff --git a/src/host/layer23/src/common/sim.c b/src/host/layer23/src/common/sim.c index 2c6c83c..ed7f54a 100644 --- a/src/host/layer23/src/common/sim.c +++ b/src/host/layer23/src/common/sim.c @@ -942,6 +942,7 @@ pin_cause[0] = SIM_CAUSE_PUC_BLOCKED; pin_cause[1] = 0; } + break; case SIM_JST_PIN1_UNLOCK: case SIM_JST_PIN1_CHANGE: case SIM_JST_PIN1_DISABLE: -- To view, visit https://gerrit.osmocom.org/14042 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id5c325ffcfea8175bc5d5499a0904c0984e00349 Gerrit-Change-Number: 14042 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 14:06:32 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 14 May 2019 14:06:32 +0000 Subject: Change in osmocom-bb[master]: common/sim.c: add missing break to sim_apdu_resp() In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14042 ) Change subject: common/sim.c: add missing break to sim_apdu_resp() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14042 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id5c325ffcfea8175bc5d5499a0904c0984e00349 Gerrit-Change-Number: 14042 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 14 May 2019 14:06:32 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 14:06:44 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 14 May 2019 14:06:44 +0000 Subject: Change in osmocom-bb[master]: common/sim.c: add missing break to sim_apdu_resp() In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/14042 ) Change subject: common/sim.c: add missing break to sim_apdu_resp() ...................................................................... common/sim.c: add missing break to sim_apdu_resp() Change-Id: Id5c325ffcfea8175bc5d5499a0904c0984e00349 Fixes: OS#198542 --- M src/host/layer23/src/common/sim.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, approved diff --git a/src/host/layer23/src/common/sim.c b/src/host/layer23/src/common/sim.c index 2c6c83c..ed7f54a 100644 --- a/src/host/layer23/src/common/sim.c +++ b/src/host/layer23/src/common/sim.c @@ -942,6 +942,7 @@ pin_cause[0] = SIM_CAUSE_PUC_BLOCKED; pin_cause[1] = 0; } + break; case SIM_JST_PIN1_UNLOCK: case SIM_JST_PIN1_CHANGE: case SIM_JST_PIN1_DISABLE: -- To view, visit https://gerrit.osmocom.org/14042 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id5c325ffcfea8175bc5d5499a0904c0984e00349 Gerrit-Change-Number: 14042 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 14:25:03 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 14 May 2019 14:25:03 +0000 Subject: Change in osmo-mgw[master]: mgw, mgcp-li: Handle X-Osmux param name as case insensitive Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14043 Change subject: mgw, mgcp-li: Handle X-Osmux param name as case insensitive ...................................................................... mgw, mgcp-li: Handle X-Osmux param name as case insensitive RFC3435 states most text (except SDP) must be handled as case insensitive. Change-Id: Iac073f1db46569b46eddeaecc9934a2986bd50f1 --- M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/mgcp_msg.c M src/libosmo-mgcp/mgcp_protocol.c 3 files changed, 8 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/43/14043/1 diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index d65a799..7074328 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -403,12 +403,12 @@ int osmux_cid; - if (strstr(line + 2, "Osmux: *")) { + if (strcasecmp(line + 2, "Osmux: *") == 0) { LOGP(DLMGCP, LOGL_DEBUG, "Parsed wilcard Osmux CID\n"); return -1; } - if (sscanf(line + 2, "Osmux: %u", &osmux_cid) != 1) { + if (sscanf(line + 2 + 7, "%u", &osmux_cid) != 1) { LOGP(DLMGCP, LOGL_ERROR, "Failed parsing Osmux in MGCP msg line: %s\n", line); return -2; @@ -602,7 +602,8 @@ goto exit; break; case 'X': - if (strncmp("Osmux: ", line + 2, strlen("Osmux: ")) == 0) { + case 'x': + if (strncasecmp("Osmux: ", line + 2, strlen("Osmux: ")) == 0) { rc = mgcp_parse_osmux_cid(line); if (rc < 0) { /* -1: we don't want wildcards in response. -2: error */ diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c index a31bff4..59e0e91 100644 --- a/src/libosmo-mgcp/mgcp_msg.c +++ b/src/libosmo-mgcp/mgcp_msg.c @@ -360,12 +360,12 @@ int osmux_cid; - if (strstr(line + 2, "Osmux: *")) { + if (strcasecmp(line + 2, "Osmux: *") == 0) { LOGP(DLMGCP, LOGL_DEBUG, "Parsed wilcard Osmux CID\n"); return -1; } - if (sscanf(line + 2, "Osmux: %u", &osmux_cid) != 1) { + if (sscanf(line + 2 + 7, "%u", &osmux_cid) != 1) { LOGP(DLMGCP, LOGL_ERROR, "Failed parsing Osmux in MGCP msg line: %s\n", line); return -2; diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 0831abb..6fd991d 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -816,7 +816,8 @@ mode = (const char *)line + 3; break; case 'X': - if (strncmp("Osmux: ", line + 2, strlen("Osmux: ")) == 0) { + case 'x': + if (strncasecmp("Osmux: ", line + 2, strlen("Osmux: ")) == 0) { /* If osmux is disabled, just skip setting it up */ if (!p->endp->cfg->osmux) break; -- To view, visit https://gerrit.osmocom.org/14043 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Iac073f1db46569b46eddeaecc9934a2986bd50f1 Gerrit-Change-Number: 14043 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 14:25:29 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 14 May 2019 14:25:29 +0000 Subject: Change in osmo-mgw[master]: mgw, mgcp-li: Handle X-Osmux param name as case insensitive In-Reply-To: References: Message-ID: Pau Espin Pedrol has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/14043 ) Change subject: mgw, mgcp-li: Handle X-Osmux param name as case insensitive ...................................................................... mgw, mgcp-li: Handle X-Osmux param name as case insensitive RFC3435 states most text (except SDP) must be handled as case insensitive. Related: OS#4001 Change-Id: Iac073f1db46569b46eddeaecc9934a2986bd50f1 --- M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/mgcp_msg.c M src/libosmo-mgcp/mgcp_protocol.c 3 files changed, 8 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/43/14043/2 -- To view, visit https://gerrit.osmocom.org/14043 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iac073f1db46569b46eddeaecc9934a2986bd50f1 Gerrit-Change-Number: 14043 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-CC: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 14:42:31 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 14 May 2019 14:42:31 +0000 Subject: Change in osmo-msc[master]: libmsc/ran_peer.c: fix msgb memleaks in ran_peer_down_paging() Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14044 Change subject: libmsc/ran_peer.c: fix msgb memleaks in ran_peer_down_paging() ...................................................................... libmsc/ran_peer.c: fix msgb memleaks in ran_peer_down_paging() Change-Id: I1e76b5eab7cfa091375bd9c76d8dcdec8d16ffe5 --- M src/libmsc/ran_peer.c 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/44/14044/1 diff --git a/src/libmsc/ran_peer.c b/src/libmsc/ran_peer.c index 40040a2..a77cb89 100644 --- a/src/libmsc/ran_peer.c +++ b/src/libmsc/ran_peer.c @@ -657,7 +657,13 @@ LOG_RAN_PEER_CAT(rp, DPAG, LOGL_ERROR, "Paging for %s matched this RAN peer, but emitting a Paging failed\n", gsm0808_cell_id_name(page_id)); + msgb_free(l2); return 0; } + + /* The RAN_PEER_EV_MSG_DOWN_CL handler calls sccp_ran_down_l2_cl(), + * which doesn't free msgb. We have to do this ourselves. */ + msgb_free(l2); + return 1; } -- To view, visit https://gerrit.osmocom.org/14044 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I1e76b5eab7cfa091375bd9c76d8dcdec8d16ffe5 Gerrit-Change-Number: 14044 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 14:49:58 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 14 May 2019 14:49:58 +0000 Subject: Change in osmo-msc[master]: libmsc/ran_peer.c: avoid unreasonable use of goto in ran_peer_down_pa... Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14045 Change subject: libmsc/ran_peer.c: avoid unreasonable use of goto in ran_peer_down_paging() ...................................................................... libmsc/ran_peer.c: avoid unreasonable use of goto in ran_peer_down_paging() Change-Id: I3320240d8f1dc318e516162bb32e01ddafc7e30e --- M src/libmsc/ran_peer.c 1 file changed, 2 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/45/14045/1 diff --git a/src/libmsc/ran_peer.c b/src/libmsc/ran_peer.c index a77cb89..40e26a2 100644 --- a/src/libmsc/ran_peer.c +++ b/src/libmsc/ran_peer.c @@ -640,15 +640,11 @@ { struct msgb *l2; - if (cell_id_list_find(&rp->cells_seen, page_id, 0, false)) - goto page_it; - /* There are also the RAN peers that are configured in the neighbor ident for Handover, but if those aren't * connected, then we can't Page there. */ + if (!cell_id_list_find(&rp->cells_seen, page_id, 0, false)) + return 0; - return 0; - -page_it: LOG_RAN_PEER_CAT(rp, DPAG, LOGL_DEBUG, "Paging for %s on %s\n", vlr_subscr_name(vsub), gsm0808_cell_id_name(page_id)); l2 = rp->sri->ran->sccp_ran_ops.make_paging_msg(rp->sri, page_id, vsub->imsi, vsub->tmsi, cause); -- To view, visit https://gerrit.osmocom.org/14045 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I3320240d8f1dc318e516162bb32e01ddafc7e30e Gerrit-Change-Number: 14045 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 15:19:22 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 14 May 2019 15:19:22 +0000 Subject: Change in osmo-ttcn3-hacks[master]: mgw: Add 2 CRCX tests with Osmux enabled Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14046 Change subject: mgw: Add 2 CRCX tests with Osmux enabled ...................................................................... mgw: Add 2 CRCX tests with Osmux enabled This patch requires "osmux on" to be set in osmo-mgw's VTY cfg file. Depends: osmo-mgw.git Iac073f1db46569b46eddeaecc9934a2986bd50f1 Change-Id: Ibb58b2a4e08d6f30cfe347c217794d0d1310954f --- M library/MGCP_Templates.ttcn M library/MGCP_Types.ttcn M mgw/MGCP_Test.ttcn M mgw/expected-results.xml 4 files changed, 105 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/46/14046/1 diff --git a/library/MGCP_Templates.ttcn b/library/MGCP_Templates.ttcn index 506100f..9e6f5b7 100644 --- a/library/MGCP_Templates.ttcn +++ b/library/MGCP_Templates.ttcn @@ -49,6 +49,12 @@ val := hex2str(cid) }; + /* Osmocom extension: X-Osmux: {*,%u} */ + template MgcpParameter ts_MgcpParOsmuxCID(MgcpOsmuxCID osmux_cid) := { + code := "X-OSMUX", + val := f_mgcp_osmux_cid_encode(osmux_cid) + }; + /* osmo-bsc_mgcp implements L/C/M/X only, osmo-mgw adds 'I' */ /* SDP: osmo-bsc_mgcp implements Tx of v,o,s,c,t,m,a */ @@ -89,6 +95,18 @@ sdp := sdp } + template MgcpCommand ts_CRCX_osmux(MgcpTransId trans_id, charstring ep, MgcpConnectionMode mode, MgcpCallId call_id, MgcpOsmuxCID osmux_cid, template SDP_Message sdp := omit) := { + line := t_MgcpCmdLine("CRCX", trans_id, ep), + params := { + t_MgcpParConnMode(mode), + ts_MgcpParCallId(call_id), + //t_MgcpParReqId(omit), + t_MgcpParLocConnOpt("p:20, a:AMR"), + ts_MgcpParOsmuxCID(osmux_cid) + }, + sdp := sdp + } + template MgcpCommand tr_CRCX(template MgcpEndpoint ep := ?) := { line := t_MgcpCmdLine("CRCX", ?, ep), params := *, @@ -105,6 +123,16 @@ sdp := ? } + template MgcpResponse tr_CRCX_ACK_osmux := { + line := { + code := "200", + trans_id := ?, + string := "OK" + }, + params:= { { "I", ? }, {"X-OSMUX", ?}, *}, + sdp := ? + } + template MgcpResponse ts_CRCX_ACK(MgcpTransId trans_id, MgcpConnectionId conn_id, template SDP_Message sdp := omit) := { line := { code := "200", @@ -286,6 +314,24 @@ } } + /* -1 is wildcard, positive is translated as string */ + function f_mgcp_osmux_cid_encode(MgcpOsmuxCID osmux_cid) return charstring { + if (osmux_cid < -1) { + return "ERROR-wrong-negative-value"; + } + if (osmux_cid == -1) { + return "*"; + } + return int2str(osmux_cid); + } + + function f_mgcp_osmux_cid_decode(charstring osmux_cid) return MgcpOsmuxCID { + if (osmux_cid == "*") { + return -1; + } + return str2int(osmux_cid); + } + function f_mgcp_contains_par(MgcpMessage msg, MgcpInfoCode code) return boolean { var MgcpParameterList pars; if (ischosen(msg.command)) { @@ -352,6 +398,10 @@ return str2hex(f_MgcpCmd_extract_par(cmd, "I")); } + function f_MgcpCmd_extract_osmux_cid(MgcpCommand cmd) return MgcpOsmuxCID { + return f_mgcp_osmux_cid_decode(f_MgcpCmd_extract_par(cmd, "X-OSMUX")); + } + function f_mgcp_alloc_tid() return MgcpTransId { return int2str(float2int(rnd()*2147483647.0)); diff --git a/library/MGCP_Types.ttcn b/library/MGCP_Types.ttcn index 8e11c7a..b56734c 100644 --- a/library/MGCP_Types.ttcn +++ b/library/MGCP_Types.ttcn @@ -24,13 +24,14 @@ type hexstring MgcpCallId length(1..32); /* 3.2.2.2 */ type hexstring MgcpConnectionId length(1..32); /* 3.2.2.5 */ type hexstring MgcpRequestId length(1..32); /* 3.2.2.18 */ + type integer MgcpOsmuxCID (-1 .. 255); type charstring MgcpResponseCode (pattern "\d#(3)"); type charstring MgcpInfoCode ("B", "C", "I", "N", "X", "L", "M", "R", "S", "D", "O", "P", "E", "Z", "Q", "T", "RC", "LC", "A", "ES", "RM", "RD", "PL", - "MD", "X-Osmo-CP") with { - variant "TEXT_CODING(,convert=upper_case,'([BCINXLMRSDOPEZQTA])|(RC)|(LC)|(ES)|(RM)|(RD)|(PL)|(MD)|(X-Osmo-CP)',case_insensitive)" + "MD", "X-OSMO-CP", "X-OSMUX") with { + variant "TEXT_CODING(,convert=upper_case,'([BCINXLMRSDOPEZQTA])|(RC)|(LC)|(ES)|(RM)|(RD)|(PL)|(MD)|(X-OSMO-CP)|(X-OSMUX)',case_insensitive)" }; /* 3.2.2.6 */ diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn index 8cb2404..fa103c4 100644 --- a/mgw/MGCP_Test.ttcn +++ b/mgw/MGCP_Test.ttcn @@ -437,6 +437,40 @@ } } + function f_crcx_osmux(charstring ep_prefix, MgcpOsmuxCID osmux_cid) runs on dummy_CT { + var MgcpEndpoint ep := ep_prefix & "2@" & c_mgw_domain; + var template MgcpCommand cmd; + var MgcpResponse resp; + var MgcpCallId call_id := '1234'H; + var charstring cid_response; + + f_init(ep); + + /* create the connection on the MGW */ + cmd := ts_CRCX_osmux(get_next_trans_id(), ep, "recvonly", call_id, osmux_cid); + resp := mgcp_transceive_mgw(cmd, tr_CRCX_ACK_osmux); + extract_conn_id(resp); + + /* extract Osmux CID we got assigned by the MGW */ + var MgcpMessage resp_msg := { + response := resp + } + + if (f_mgcp_find_param(resp_msg, "X-OSMUX", cid_response) == false) { + setverdict(fail, "No Osmux CID in MGCP response", resp); + mtc.stop; + } + + /* Make sure response is no wildcard */ + if (f_mgcp_osmux_cid_decode(cid_response) == -1) { + setverdict(fail, "Osmux CID in MGCP response contains unexpected wildcard"); + mtc.stop; + } + + /* clean-up */ + f_dlcx_ok(ep, call_id); + } + /* test valid CRCX without SDP */ testcase TC_crcx() runs on dummy_CT { f_crcx(c_mgw_ep_rtpbridge); @@ -791,6 +825,18 @@ setverdict(pass); } + /* test valid CRCX without SDP */ + testcase TC_crcx_osmux_wildcard() runs on dummy_CT { + f_crcx_osmux(c_mgw_ep_rtpbridge, -1); + setverdict(pass); + } + + /* test valid CRCX without SDP */ + testcase TC_crcx_osmux_fixed() runs on dummy_CT { + f_crcx_osmux(c_mgw_ep_rtpbridge, 2); + setverdict(pass); + } + function f_crcx_and_dlcx_ep_callid_connid(MgcpEndpoint ep, MgcpCallId call_id) runs on dummy_CT { var template MgcpCommand cmd; var MgcpResponse resp; @@ -1482,6 +1528,9 @@ execute(TC_crcx_and_dlcx_ep_callid_connid_inval()); execute(TC_crcx_and_dlcx_retrans()); + execute(TC_crcx_osmux_wildcard()); + execute(TC_crcx_osmux_fixed()); + execute(TC_crcx_dlcx_30ep()); execute(TC_rtpem_selftest()); diff --git a/mgw/expected-results.xml b/mgw/expected-results.xml index 5c520c5..f968859 100644 --- a/mgw/expected-results.xml +++ b/mgw/expected-results.xml @@ -1,5 +1,5 @@ - + no verdict @@ -26,6 +26,8 @@ + + -- To view, visit https://gerrit.osmocom.org/14046 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ibb58b2a4e08d6f30cfe347c217794d0d1310954f Gerrit-Change-Number: 14046 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 15:22:58 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 14 May 2019 15:22:58 +0000 Subject: Change in docker-playground[master]: mgw: Enable osmux in osmo-mgw.cfg Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14047 Change subject: mgw: Enable osmux in osmo-mgw.cfg ...................................................................... mgw: Enable osmux in osmo-mgw.cfg This config is required to have tests passing added in osmo-ttcn3-hacks Ibb58b2a4e08d6f30cfe347c217794d0d1310954f. Depends: osmo-mgw.git Iac073f1db46569b46eddeaecc9934a2986bd50f1 Change-Id: Ic380b4cfff8be3cbab95a376ca5eabdb8d682477 --- M ttcn3-mgw-test/osmo-mgw.cfg 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/47/14047/1 diff --git a/ttcn3-mgw-test/osmo-mgw.cfg b/ttcn3-mgw-test/osmo-mgw.cfg index 7b0094f..e01f600 100644 --- a/ttcn3-mgw-test/osmo-mgw.cfg +++ b/ttcn3-mgw-test/osmo-mgw.cfg @@ -50,4 +50,4 @@ loop 0 number endpoints 31 allow-transcoding - osmux off + osmux on -- To view, visit https://gerrit.osmocom.org/14047 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ic380b4cfff8be3cbab95a376ca5eabdb8d682477 Gerrit-Change-Number: 14047 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 15:23:34 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 May 2019 15:23:34 +0000 Subject: Change in osmo-msc[master]: libmsc/ran_peer.c: fix msgb memleaks in ran_peer_down_paging() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14044 ) Change subject: libmsc/ran_peer.c: fix msgb memleaks in ran_peer_down_paging() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14044 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1e76b5eab7cfa091375bd9c76d8dcdec8d16ffe5 Gerrit-Change-Number: 14044 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Comment-Date: Tue, 14 May 2019 15:23:34 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 15:26:30 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 14 May 2019 15:26:30 +0000 Subject: Change in osmo-msc[master]: vty: Add option to enable osmux towards BSCs In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14038 ) Change subject: vty: Add option to enable osmux towards BSCs ...................................................................... Patch Set 2: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/14038/2/include/osmocom/msc/osmux.h File include/osmocom/msc/osmux.h: https://gerrit.osmocom.org/#/c/14038/2/include/osmocom/msc/osmux.h at 6 PS2, Line 6: OSMUX_USAGE_ONLY Could you please add some comments on each entry? Or at least, for this one. OFF / ON is clean, but what is ONLY? -- To view, visit https://gerrit.osmocom.org/14038 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6de1be0322ddbdc115074ebb6be2598ebf6c95db Gerrit-Change-Number: 14038 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 14 May 2019 15:26:30 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 15:26:41 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 May 2019 15:26:41 +0000 Subject: Change in osmo-msc[master]: libmsc/ran_peer.c: avoid unreasonable use of goto in ran_peer_down_pa... In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14045 ) Change subject: libmsc/ran_peer.c: avoid unreasonable use of goto in ran_peer_down_paging() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14045 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I3320240d8f1dc318e516162bb32e01ddafc7e30e Gerrit-Change-Number: 14045 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 14 May 2019 15:26:41 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 15:26:43 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 May 2019 15:26:43 +0000 Subject: Change in osmo-msc[master]: libmsc/ran_peer.c: fix msgb memleaks in ran_peer_down_paging() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14044 ) Change subject: libmsc/ran_peer.c: fix msgb memleaks in ran_peer_down_paging() ...................................................................... libmsc/ran_peer.c: fix msgb memleaks in ran_peer_down_paging() Change-Id: I1e76b5eab7cfa091375bd9c76d8dcdec8d16ffe5 --- M src/libmsc/ran_peer.c 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libmsc/ran_peer.c b/src/libmsc/ran_peer.c index 40040a2..a77cb89 100644 --- a/src/libmsc/ran_peer.c +++ b/src/libmsc/ran_peer.c @@ -657,7 +657,13 @@ LOG_RAN_PEER_CAT(rp, DPAG, LOGL_ERROR, "Paging for %s matched this RAN peer, but emitting a Paging failed\n", gsm0808_cell_id_name(page_id)); + msgb_free(l2); return 0; } + + /* The RAN_PEER_EV_MSG_DOWN_CL handler calls sccp_ran_down_l2_cl(), + * which doesn't free msgb. We have to do this ourselves. */ + msgb_free(l2); + return 1; } -- To view, visit https://gerrit.osmocom.org/14044 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I1e76b5eab7cfa091375bd9c76d8dcdec8d16ffe5 Gerrit-Change-Number: 14044 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 15:26:43 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 May 2019 15:26:43 +0000 Subject: Change in osmo-msc[master]: libmsc/ran_peer.c: avoid unreasonable use of goto in ran_peer_down_pa... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14045 ) Change subject: libmsc/ran_peer.c: avoid unreasonable use of goto in ran_peer_down_paging() ...................................................................... libmsc/ran_peer.c: avoid unreasonable use of goto in ran_peer_down_paging() Change-Id: I3320240d8f1dc318e516162bb32e01ddafc7e30e --- M src/libmsc/ran_peer.c 1 file changed, 2 insertions(+), 6 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libmsc/ran_peer.c b/src/libmsc/ran_peer.c index a77cb89..40e26a2 100644 --- a/src/libmsc/ran_peer.c +++ b/src/libmsc/ran_peer.c @@ -640,15 +640,11 @@ { struct msgb *l2; - if (cell_id_list_find(&rp->cells_seen, page_id, 0, false)) - goto page_it; - /* There are also the RAN peers that are configured in the neighbor ident for Handover, but if those aren't * connected, then we can't Page there. */ + if (!cell_id_list_find(&rp->cells_seen, page_id, 0, false)) + return 0; - return 0; - -page_it: LOG_RAN_PEER_CAT(rp, DPAG, LOGL_DEBUG, "Paging for %s on %s\n", vlr_subscr_name(vsub), gsm0808_cell_id_name(page_id)); l2 = rp->sri->ran->sccp_ran_ops.make_paging_msg(rp->sri, page_id, vsub->imsi, vsub->tmsi, cause); -- To view, visit https://gerrit.osmocom.org/14045 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I3320240d8f1dc318e516162bb32e01ddafc7e30e Gerrit-Change-Number: 14045 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 15:29:14 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 14 May 2019 15:29:14 +0000 Subject: Change in osmo-msc[master]: vty: Add option to enable osmux towards BSCs In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14038 ) Change subject: vty: Add option to enable osmux towards BSCs ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/14038/2/include/osmocom/msc/osmux.h File include/osmocom/msc/osmux.h: https://gerrit.osmocom.org/#/c/14038/2/include/osmocom/msc/osmux.h at 6 PS2, Line 6: OSMUX_USAGE_ONLY > Could you please add some comments on each entry? Or at least, for this one. [?] "Only" means BSC will reject all call setups from MSC which doesn't support Osmux. Same for MSC but the way around with BSCs. -- To view, visit https://gerrit.osmocom.org/14038 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6de1be0322ddbdc115074ebb6be2598ebf6c95db Gerrit-Change-Number: 14038 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 14 May 2019 15:29:14 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 15:30:11 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 14 May 2019 15:30:11 +0000 Subject: Change in osmo-msc[master]: bssap: Detect BSC Osmux support on RESET (ACK) recv In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14039 ) Change subject: bssap: Detect BSC Osmux support on RESET (ACK) recv ...................................................................... Patch Set 2: (2 comments) https://gerrit.osmocom.org/#/c/14039/2/src/libmsc/ran_peer.c File src/libmsc/ran_peer.c: https://gerrit.osmocom.org/#/c/14039/2/src/libmsc/ran_peer.c at 134 PS2, Line 134: msg->l3h It probably makes sense to OSMO_ASSERT(msg) here, as we receive it from the FSM handlers. https://gerrit.osmocom.org/#/c/14039/2/src/libmsc/ran_peer.c at 137 PS2, Line 137: Failed parsing TLV Does it make sense to continue execution of this function in this case? -- To view, visit https://gerrit.osmocom.org/14039 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If4f33da9b414ab194098755d2c5be85e1fce5d31 Gerrit-Change-Number: 14039 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 14 May 2019 15:30:11 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 15:30:17 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 14 May 2019 15:30:17 +0000 Subject: Change in osmo-msc[master]: ran_peer: Move rx_reset_ack logic into its own func In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14037 ) Change subject: ran_peer: Move rx_reset_ack logic into its own func ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14037 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I516c4baf6071d26f6c530726d93677bed968efd1 Gerrit-Change-Number: 14037 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 14 May 2019 15:30:17 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 15:33:48 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 14 May 2019 15:33:48 +0000 Subject: Change in osmo-msc[master]: a_iface: Announce Osmux support on RESET (ACK) send In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14040 ) Change subject: a_iface: Announce Osmux support on RESET (ACK) send ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14040 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id607f60749e923755cb38179bc283a7957670653 Gerrit-Change-Number: 14040 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 14 May 2019 15:33:48 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 18:35:48 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 14 May 2019 18:35:48 +0000 Subject: Change in osmo-mgw[master]: mgw, mgcp-li: Handle X-Osmux param name as case insensitive In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14043 to look at the new patch set (#3). Change subject: mgw, mgcp-li: Handle X-Osmux param name as case insensitive ...................................................................... mgw, mgcp-li: Handle X-Osmux param name as case insensitive RFC3435 states most text (except SDP) must be handled as case insensitive. Related: OS#4001 Change-Id: Iac073f1db46569b46eddeaecc9934a2986bd50f1 --- M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/mgcp_msg.c M src/libosmo-mgcp/mgcp_protocol.c 3 files changed, 10 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/43/14043/3 -- To view, visit https://gerrit.osmocom.org/14043 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iac073f1db46569b46eddeaecc9934a2986bd50f1 Gerrit-Change-Number: 14043 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 21:41:41 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 May 2019 21:41:41 +0000 Subject: Change in osmo-trx[master]: lms: Use a default Tx gain value of 64 dB. In-Reply-To: References: Message-ID: Harald Welte has abandoned this change. ( https://gerrit.osmocom.org/12008 ) Change subject: lms: Use a default Tx gain value of 64 dB. ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/12008 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: Id018b27b1d8a2f48d60b29e688583c9a5ac49a81 Gerrit-Change-Number: 12008 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Assignee: roh Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: roh -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 21:42:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 May 2019 21:42:05 +0000 Subject: Change in osmo-msc[master]: ran_peer: Move rx_reset_ack logic into its own func In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14037 ) Change subject: ran_peer: Move rx_reset_ack logic into its own func ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14037 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I516c4baf6071d26f6c530726d93677bed968efd1 Gerrit-Change-Number: 14037 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 14 May 2019 21:42:05 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 14 21:42:46 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 14 May 2019 21:42:46 +0000 Subject: Change in osmo-msc[master]: a_iface: Announce Osmux support on RESET (ACK) send In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14040 ) Change subject: a_iface: Announce Osmux support on RESET (ACK) send ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14040 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id607f60749e923755cb38179bc283a7957670653 Gerrit-Change-Number: 14040 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 14 May 2019 21:42:46 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 08:33:37 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 15 May 2019 08:33:37 +0000 Subject: Change in osmo-msc[master]: vty: make retrieve-imeisv-early configurable In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13892 ) Change subject: vty: make retrieve-imeisv-early configurable ...................................................................... Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13892 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I256224194c3b8caf2b58a88d11dccd32c569201f Gerrit-Change-Number: 13892 Gerrit-PatchSet: 4 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 15 May 2019 08:33:37 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 08:41:28 2019 From: gerrit-no-reply at lists.osmocom.org (tnt) Date: Wed, 15 May 2019 08:41:28 +0000 Subject: Change in libosmocore[master]: gsm_23_003: add GSM23003_MSISDN_{MIN, MAX}_DIGITS In-Reply-To: References: Message-ID: tnt has posted comments on this change. ( https://gerrit.osmocom.org/13961 ) Change subject: gsm_23_003: add GSM23003_MSISDN_{MIN,MAX}_DIGITS ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13961 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Idc74f4d94ad44b9fc1b6d43178f5f33d551ebfb1 Gerrit-Change-Number: 13961 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Reviewer: tnt Gerrit-Comment-Date: Wed, 15 May 2019 08:41:28 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 08:43:39 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 15 May 2019 08:43:39 +0000 Subject: Change in osmo-msc[master]: vty: make retrieve-imeisv-early configurable In-Reply-To: References: Message-ID: osmith has submitted this change and it was merged. ( https://gerrit.osmocom.org/13892 ) Change subject: vty: make retrieve-imeisv-early configurable ...................................................................... vty: make retrieve-imeisv-early configurable Prepare for Rhizomatica's subscriber on demand use case, in which the network access is disabled by default for new subscribers, but the IMEI is required in the HLR to find out which user has which IMSI. Due to the network access being disabled, the location update request towards the HLR fails and the MS gets rejected, so we need to get the IMEI early. Related: OS#2542, OS#3755 Change-Id: I256224194c3b8caf2b58a88d11dccd32c569201f --- M src/libmsc/msc_vty.c M tests/test_nodes.vty 2 files changed, 21 insertions(+), 7 deletions(-) Approvals: Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index 2990735..bd369ae 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -455,13 +455,24 @@ } DEFUN(cfg_msc_check_imei_rqd, cfg_msc_check_imei_rqd_cmd, - "check-imei-rqd (0|1)", + "check-imei-rqd (0|1|early)", "Send each IMEI to the EIR to ask if it is permitted or not. The EIR is implemented as part of OsmoHLR, " "and can optionally save the IMEI in the HLR.\n" "Do not send IMEIs to the EIR\n" - "Send each IMEI to the EIR\n") + "Send each IMEI to the EIR\n" + "Send each IMEI to the EIR, and do it at the start of the location update. This allows the EIR to receive the" + " IMEI, even if the MS would get rejected when the MSC sends the location update request to the HLR.\n") { - gsmnet->vlr->cfg.check_imei_rqd = atoi(argv[0]) ? true : false; + if (strcmp(argv[0], "0") == 0) { + gsmnet->vlr->cfg.check_imei_rqd = false; + gsmnet->vlr->cfg.retrieve_imeisv_early = false; + } else if (strcmp(argv[0], "1") == 0) { + gsmnet->vlr->cfg.check_imei_rqd = true; + gsmnet->vlr->cfg.retrieve_imeisv_early = false; + } else if (strcmp(argv[0], "early") == 0) { + gsmnet->vlr->cfg.check_imei_rqd = true; + gsmnet->vlr->cfg.retrieve_imeisv_early = true; + } return CMD_SUCCESS; } @@ -581,9 +592,12 @@ vty_out(vty, " auth-tuple-reuse-on-error 1%s", VTY_NEWLINE); - if (gsmnet->vlr->cfg.check_imei_rqd) - vty_out(vty, " check-imei-rqd 1 %s", - VTY_NEWLINE); + if (gsmnet->vlr->cfg.check_imei_rqd) { + if (gsmnet->vlr->cfg.retrieve_imeisv_early) + vty_out(vty, " check-imei-rqd early%s", VTY_NEWLINE); + else + vty_out(vty, " check-imei-rqd 1%s", VTY_NEWLINE); + } if (gsmnet->paging_response_timer != MSC_PAGING_RESPONSE_TIMER_DEFAULT) vty_out(vty, " paging response-timer %u%s", gsmnet->paging_response_timer, VTY_NEWLINE); diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty index 28eaefb..cdb3f8a 100644 --- a/tests/test_nodes.vty +++ b/tests/test_nodes.vty @@ -38,7 +38,7 @@ no assign-tmsi auth-tuple-max-reuse-count <-1-2147483647> auth-tuple-reuse-on-error (0|1) - check-imei-rqd (0|1) + check-imei-rqd (0|1|early) cs7-instance-a <0-15> cs7-instance-iu <0-15> paging response-timer (default|<1-65535>) -- To view, visit https://gerrit.osmocom.org/13892 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I256224194c3b8caf2b58a88d11dccd32c569201f Gerrit-Change-Number: 13892 Gerrit-PatchSet: 5 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 08:50:22 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 15 May 2019 08:50:22 +0000 Subject: Change in osmo-msc[master]: vlr: fix IMEI length In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13904 ) Change subject: vlr: fix IMEI length ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13904 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iaf2569c099874b55acbd748b776394726cc5ce54 Gerrit-Change-Number: 13904 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Wed, 15 May 2019 08:50:22 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 08:52:50 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 15 May 2019 08:52:50 +0000 Subject: Change in libosmocore[master]: gsm_23_003: add GSM23003_MSISDN_{MIN, MAX}_DIGITS In-Reply-To: References: Message-ID: osmith has submitted this change and it was merged. ( https://gerrit.osmocom.org/13961 ) Change subject: gsm_23_003: add GSM23003_MSISDN_{MIN,MAX}_DIGITS ...................................................................... gsm_23_003: add GSM23003_MSISDN_{MIN,MAX}_DIGITS Add the constant, so it can be used in create-subscriber-on-demand related patches. ITU-T Rec. E.164 6.1 states that maximum international number length should be 15. I did not find a source for a minimum length, but I've added the constant and set it to 1 for consistency (based on the existing osmo_msisdn_str_valid() function). Related: OS#2542 Change-Id: Idc74f4d94ad44b9fc1b6d43178f5f33d551ebfb1 --- M include/osmocom/gsm/protocol/gsm_23_003.h M src/gsm/gsm23003.c 2 files changed, 4 insertions(+), 1 deletion(-) Approvals: Vadim Yanitskiy: Looks good to me, approved tnt: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmocom/gsm/protocol/gsm_23_003.h b/include/osmocom/gsm/protocol/gsm_23_003.h index be1b157..3e5c3e5 100644 --- a/include/osmocom/gsm/protocol/gsm_23_003.h +++ b/include/osmocom/gsm/protocol/gsm_23_003.h @@ -20,6 +20,9 @@ #define GSM23003_MME_CODE_NUM_BYTES 1 #define GSM23003_MME_GROUP_NUM_BYTES 2 #define GSM23003_MTMSI_NUM_BYTES 4 +/* Chapter 3.2 */ +#define GSM23003_MSISDN_MAX_DIGITS 15 /* ITU-T Rec. E.164 6.1 */ +#define GSM23003_MSISDN_MIN_DIGITS 1 /* Chapter 6.2.1 */ #define GSM23003_IMEI_TAC_NUM_DIGITS 8 #define GSM23003_IMEI_SNR_NUM_DIGITS 6 diff --git a/src/gsm/gsm23003.c b/src/gsm/gsm23003.c index 2252f70..a97ed07 100644 --- a/src/gsm/gsm23003.c +++ b/src/gsm/gsm23003.c @@ -69,7 +69,7 @@ */ bool osmo_msisdn_str_valid(const char *msisdn) { - return is_n_digits(msisdn, 1, 15); + return is_n_digits(msisdn, GSM23003_MSISDN_MIN_DIGITS, GSM23003_MSISDN_MAX_DIGITS); } /*! Determine whether the given IMEI is valid according to 3GPP TS 23.003, -- To view, visit https://gerrit.osmocom.org/13961 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Idc74f4d94ad44b9fc1b6d43178f5f33d551ebfb1 Gerrit-Change-Number: 13961 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Reviewer: tnt -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 08:53:22 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 15 May 2019 08:53:22 +0000 Subject: Change in osmo-msc[master]: vlr: fix IMEI length In-Reply-To: References: Message-ID: osmith has submitted this change and it was merged. ( https://gerrit.osmocom.org/13904 ) Change subject: vlr: fix IMEI length ...................................................................... vlr: fix IMEI length Set the length of vlr_subscr->imei to GSM23003_IMEI_NUM_DIGITS_NO_CHK (14) instead of GSM23003_IMEISV_NUM_DIGITS (16). Note that there is also GSM23003_IMEI_NUM_DIGITS (15), which includes an additional checksum digit. This digit is not intended for digital transmission, so we don't need to store it. Also by not storing it, we can simply copy the IMEI-part from the IMEISV to the IMEI without worrying about the checksum (will be done in a follow up patch). A good overview of the IMEI/IMEISV structure is here: https://en.wikipedia.org/wiki/International_Mobile_Equipment_Identity#Structure_of_the_IMEI_and_IMEISV_(IMEI_software_version) Related: OS#2542 Change-Id: Iaf2569c099874b55acbd748b776394726cc5ce54 --- M include/osmocom/msc/vlr.h M tests/msc_vlr/msc_vlr_test_gsm_authen.c M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_no_authen.err 7 files changed, 47 insertions(+), 51 deletions(-) Approvals: Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index 4c11951..b1c0d5d 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -146,7 +146,7 @@ struct osmo_cell_global_id cgi; /* 2.4.16 */ char imeisv[GSM23003_IMEISV_NUM_DIGITS+1]; /* 2.2.3 */ - char imei[GSM23003_IMEISV_NUM_DIGITS+1]; /* 2.1.9 */ + char imei[GSM23003_IMEI_NUM_DIGITS_NO_CHK+1]; /* 2.1.9 */ bool imsi_detached_flag; /* 2.7.1 */ bool conf_by_radio_contact_ind; /* 2.7.4.1 */ bool sub_dataconf_by_hlr_ind; /* 2.7.4.2 */ diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.c b/tests/msc_vlr/msc_vlr_test_gsm_authen.c index d68ce05..805ae64 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_authen.c +++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.c @@ -568,7 +568,7 @@ thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0" VLR_TO_HLR); + gsup_expect_tx("30010809710000004026f050080724433224433224" VLR_TO_HLR); ms_sends_msg("0559084a32244332244302"); EXPECT_ACCEPTED(false); thwart_rx_non_initial_requests(); @@ -586,7 +586,7 @@ btw("Subscriber has the IMEI"); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); - VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d"); + VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d"); vlr_subscr_put(vsub, __func__); BTW("subscriber detaches"); @@ -677,7 +677,7 @@ thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0" VLR_TO_HLR); + gsup_expect_tx("30010809710000004026f050080724433224433224" VLR_TO_HLR); ms_sends_msg("0559084a32244332244302"); EXPECT_ACCEPTED(false); thwart_rx_non_initial_requests(); @@ -770,7 +770,7 @@ thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0" VLR_TO_HLR); + gsup_expect_tx("30010809710000004026f050080724433224433224" VLR_TO_HLR); ms_sends_msg("0559084a32244332244302"); EXPECT_ACCEPTED(false); thwart_rx_non_initial_requests(); @@ -864,7 +864,7 @@ thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0" VLR_TO_HLR); + gsup_expect_tx("30010809710000004026f050080724433224433224" VLR_TO_HLR); ms_sends_msg("0559084a32244332244302"); EXPECT_ACCEPTED(false); thwart_rx_non_initial_requests(); @@ -898,7 +898,7 @@ btw("Subscriber has the IMEI and TMSI"); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); - VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d"); + VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d"); VERBOSE_ASSERT(vsub->tmsi, == 0x03020100, "0x%08x"); vlr_subscr_put(vsub, __func__); diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.err b/tests/msc_vlr/msc_vlr_test_gsm_authen.err index 2a7b696..66a97c2 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_authen.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.err @@ -1565,9 +1565,9 @@ DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode: DTAP DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Dispatching 04.08 message: MM GSM48_MT_MM_ID_RESP DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f00a0101 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f0500807244332244332240a0101 DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: - rx_from_ms: now used by 1 (lu) msc_a_is_accepted() == false requests shall be thwarted @@ -1646,7 +1646,7 @@ llist_count(&msub_list) == 0 - Subscriber has the IMEI DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_gsm_authen_imei: now used by 2 (attached,test_gsm_authen_imei) - strcmp(vsub->imei, "423423423423420") == 0 + strcmp(vsub->imei, "42342342342342") == 0 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_gsm_authen_imei: now used by 1 (attached) @@ -1875,9 +1875,9 @@ DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode: DTAP DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Dispatching 04.08 message: MM GSM48_MT_MM_ID_RESP DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f00a0101 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f0500807244332244332240a0101 DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: - rx_from_ms: now used by 1 (lu) msc_a_is_accepted() == false requests shall be thwarted @@ -2140,9 +2140,9 @@ DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode: DTAP DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Dispatching 04.08 message: MM GSM48_MT_MM_ID_RESP DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f00a0101 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f0500807244332244332240a0101 DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: - rx_from_ms: now used by 1 (lu) msc_a_is_accepted() == false requests shall be thwarted @@ -2406,9 +2406,9 @@ DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode: DTAP DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Dispatching 04.08 message: MM GSM48_MT_MM_ID_RESP DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f00a0101 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f0500807244332244332240a0101 DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: - rx_from_ms: now used by 1 (lu) msc_a_is_accepted() == false requests shall be thwarted @@ -2527,7 +2527,7 @@ llist_count(&msub_list) == 0 - Subscriber has the IMEI and TMSI DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 + test_gsm_authen_tmsi_imei: now used by 2 (attached,test_gsm_authen_tmsi_imei) - strcmp(vsub->imei, "423423423423420") == 0 + strcmp(vsub->imei, "42342342342342") == 0 vsub->tmsi == 0x03020100 DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 - test_gsm_authen_tmsi_imei: now used by 1 (attached) diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c index 953b4c9..ceb17a5 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c @@ -550,7 +550,7 @@ thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0" VLR_TO_HLR); + gsup_expect_tx("30010809710000004026f050080724433224433224" VLR_TO_HLR); ms_sends_msg("0559084a32244332244302"); EXPECT_ACCEPTED(false); thwart_rx_non_initial_requests(); @@ -568,7 +568,7 @@ btw("Subscriber has the IMEI"); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); - VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d"); + VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d"); vlr_subscr_put(vsub, __func__); BTW("subscriber detaches"); @@ -761,7 +761,7 @@ thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0" VLR_TO_HLR); + gsup_expect_tx("30010809710000004026f050080724433224433224" VLR_TO_HLR); ms_sends_msg("0559084a32244332244302"); EXPECT_ACCEPTED(false); thwart_rx_non_initial_requests(); @@ -795,7 +795,7 @@ btw("Subscriber has the IMEI and TMSI"); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); - VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d"); + VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d"); VERBOSE_ASSERT(vsub->tmsi, == 0x03020100, "0x%08x"); vlr_subscr_put(vsub, __func__); diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err index 4abd840..1999d89 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err @@ -1520,9 +1520,9 @@ DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode: DTAP DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Dispatching 04.08 message: MM GSM48_MT_MM_ID_RESP DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f00a0101 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f0500807244332244332240a0101 DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: - rx_from_ms: now used by 1 (lu) msc_a_is_accepted() == false requests shall be thwarted @@ -1601,7 +1601,7 @@ llist_count(&msub_list) == 0 - Subscriber has the IMEI DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_ciph_imei: now used by 2 (attached,test_ciph_imei) - strcmp(vsub->imei, "423423423423420") == 0 + strcmp(vsub->imei, "42342342342342") == 0 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_ciph_imei: now used by 1 (attached) @@ -2120,9 +2120,9 @@ DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode: DTAP DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Dispatching 04.08 message: MM GSM48_MT_MM_ID_RESP DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f00a0101 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f0500807244332244332240a0101 DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: - rx_from_ms: now used by 1 (lu) msc_a_is_accepted() == false requests shall be thwarted @@ -2241,7 +2241,7 @@ llist_count(&msub_list) == 0 - Subscriber has the IMEI and TMSI DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 + test_ciph_tmsi_imei: now used by 2 (attached,test_ciph_tmsi_imei) - strcmp(vsub->imei, "423423423423420") == 0 + strcmp(vsub->imei, "42342342342342") == 0 vsub->tmsi == 0x03020100 DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 - test_ciph_tmsi_imei: now used by 1 (attached) diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.c b/tests/msc_vlr/msc_vlr_test_no_authen.c index d9ec091..72647a3 100644 --- a/tests/msc_vlr/msc_vlr_test_no_authen.c +++ b/tests/msc_vlr/msc_vlr_test_no_authen.c @@ -419,7 +419,7 @@ thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0" VLR_TO_HLR); + gsup_expect_tx("30010809710000004026f050080724433224433224" VLR_TO_HLR); /* 3GPP TS 23.003: 6.2.1 Composition of IMEI: the IMEI ends with a * spare digit that shall be sent as zero by the MS. */ ms_sends_msg("0559084a32244332244302"); @@ -437,7 +437,7 @@ btw("Subscriber has the IMEI"); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); - VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d"); + VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d"); vlr_subscr_put(vsub, __func__); BTW("subscriber detaches"); @@ -494,7 +494,7 @@ thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0" VLR_TO_HLR); + gsup_expect_tx("30010809710000004026f050080724433224433224" VLR_TO_HLR); ms_sends_msg("0559084a32244332244302"); btw("HLR accepts the IMEI"); @@ -519,7 +519,7 @@ btw("Subscriber has the IMEI and TMSI"); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); - VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d"); + VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d"); VERBOSE_ASSERT(vsub->tmsi, == 0x03020100, "0x%08x"); vlr_subscr_put(vsub, __func__); @@ -645,13 +645,12 @@ EXPECT_CONN_COUNT(1); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); - VERBOSE_ASSERT(vsub->imei[0], == 0, "%d"); vlr_subscr_put(vsub, __func__); EXPECT_ACCEPTED(false); thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0" VLR_TO_HLR); + gsup_expect_tx("30010809710000004026f050080724433224433224" VLR_TO_HLR); ms_sends_msg("0559084a32244332244302"); btw("HLR accepts the IMEI"); @@ -667,7 +666,7 @@ btw("Subscriber has the IMEI"); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); - VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d"); + VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d"); vlr_subscr_put(vsub, __func__); BTW("subscriber detaches"); @@ -871,13 +870,12 @@ EXPECT_CONN_COUNT(1); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); - VERBOSE_ASSERT(vsub->imei[0], == 0, "%d"); vlr_subscr_put(vsub, __func__); EXPECT_ACCEPTED(false); thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050090824433224433224f0" VLR_TO_HLR); + gsup_expect_tx("30010809710000004026f050080724433224433224" VLR_TO_HLR); ms_sends_msg("0559084a32244332244302"); btw("HLR accepts the IMEI"); @@ -903,7 +901,7 @@ vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); OSMO_ASSERT(vsub); VERBOSE_ASSERT(strcmp(vsub->imeisv, "4234234234234275"), == 0, "%d"); - VERBOSE_ASSERT(strcmp(vsub->imei, "423423423423420"), == 0, "%d"); + VERBOSE_ASSERT(strcmp(vsub->imei, "42342342342342"), == 0, "%d"); VERBOSE_ASSERT(vsub->tmsi, == 0x03020100, "0x%08x"); vlr_subscr_put(vsub, __func__); diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.err b/tests/msc_vlr/msc_vlr_test_no_authen.err index 129c8c1..7d668cb 100644 --- a/tests/msc_vlr/msc_vlr_test_no_authen.err +++ b/tests/msc_vlr/msc_vlr_test_no_authen.err @@ -1249,9 +1249,9 @@ DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode: DTAP DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Dispatching 04.08 message: MM GSM48_MT_MM_ID_RESP DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f00a0101 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f0500807244332244332240a0101 DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: - rx_from_ms: now used by 1 (lu) - HLR accepts the IMEI <-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: 32010809710000004026f05101000a0101 @@ -1312,7 +1312,7 @@ llist_count(&msub_list) == 0 - Subscriber has the IMEI DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_no_authen_imei: now used by 2 (attached,test_no_authen_imei) - strcmp(vsub->imei, "423423423423420") == 0 + strcmp(vsub->imei, "42342342342342") == 0 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_no_authen_imei: now used by 1 (attached) @@ -1498,9 +1498,9 @@ DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode: DTAP DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Dispatching 04.08 message: MM GSM48_MT_MM_ID_RESP DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f00a0101 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f0500807244332244332240a0101 DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: - rx_from_ms: now used by 1 (lu) - HLR accepts the IMEI <-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: 32010809710000004026f05101000a0101 @@ -1595,7 +1595,7 @@ llist_count(&msub_list) == 0 - Subscriber has the IMEI and TMSI DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 + test_no_authen_tmsi_imei: now used by 2 (attached,test_no_authen_tmsi_imei) - strcmp(vsub->imei, "423423423423420") == 0 + strcmp(vsub->imei, "42342342342342") == 0 vsub->tmsi == 0x03020100 DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 - test_no_authen_tmsi_imei: now used by 1 (attached) @@ -1992,7 +1992,6 @@ - We will only do business when the IMEI is known llist_count(&msub_list) == 1 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_no_authen_imeisv_imei: now used by 2 (active-conn,test_no_authen_imeisv_imei) - vsub->imei[0] == 0 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_no_authen_imeisv_imei: now used by 1 (active-conn) msc_a_is_accepted() == false requests shall be thwarted @@ -2018,9 +2017,9 @@ DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode: DTAP DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Dispatching 04.08 message: MM GSM48_MT_MM_ID_RESP DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f00a0101 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f0500807244332244332240a0101 DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: - rx_from_ms: now used by 1 (lu) - HLR accepts the IMEI <-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: 32010809710000004026f05101000a0101 @@ -2081,7 +2080,7 @@ llist_count(&msub_list) == 0 - Subscriber has the IMEI DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_no_authen_imeisv_imei: now used by 2 (attached,test_no_authen_imeisv_imei) - strcmp(vsub->imei, "423423423423420") == 0 + strcmp(vsub->imei, "42342342342342") == 0 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_no_authen_imeisv_imei: now used by 1 (attached) @@ -2719,7 +2718,6 @@ - We will only do business when the IMEI is known llist_count(&msub_list) == 1 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_no_authen_imeisv_tmsi_imei: now used by 2 (active-conn,test_no_authen_imeisv_tmsi_imei) - vsub->imei[0] == 0 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_no_authen_imeisv_tmsi_imei: now used by 1 (active-conn) msc_a_is_accepted() == false requests shall be thwarted @@ -2745,9 +2743,9 @@ DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode: DTAP DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Dispatching 04.08 message: MM GSM48_MT_MM_ID_RESP DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=423423423423420 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f050090824433224433224f00a0101 +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f0500807244332244332240a0101 DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: - rx_from_ms: now used by 1 (lu) - HLR accepts the IMEI <-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: 32010809710000004026f05101000a0101 @@ -2843,7 +2841,7 @@ - Subscriber has the IMEISV, IMEI and TMSI DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 + test_no_authen_imeisv_tmsi_imei: now used by 2 (attached,test_no_authen_imeisv_tmsi_imei) strcmp(vsub->imeisv, "4234234234234275") == 0 - strcmp(vsub->imei, "423423423423420") == 0 + strcmp(vsub->imei, "42342342342342") == 0 vsub->tmsi == 0x03020100 DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 - test_no_authen_imeisv_tmsi_imei: now used by 1 (attached) -- To view, visit https://gerrit.osmocom.org/13904 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iaf2569c099874b55acbd748b776394726cc5ce54 Gerrit-Change-Number: 13904 Gerrit-PatchSet: 4 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 08:54:11 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 08:54:11 +0000 Subject: Change in docker-playground[master]: Simplify git checkout, allow branches and commits In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13895 ) Change subject: Simplify git checkout, allow branches and commits ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13895 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2ff745c8d19b777d876170d5717c082ceb68a1f3 Gerrit-Change-Number: 13895 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 15 May 2019 08:54:11 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 08:54:12 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 08:54:12 +0000 Subject: Change in docker-playground[master]: Simplify git checkout, allow branches and commits In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13895 ) Change subject: Simplify git checkout, allow branches and commits ...................................................................... Simplify git checkout, allow branches and commits Replace the following statements: a) "git checkout -f -B $BRANCH origin/$BRANCH" b) "git checkout -f -B $BRANCH $BRANCH" with: c) "git checkout -f $BRANCH" Regarding a), we don't need to specify 'origin/' for each branch, since we are cloning the repositories in the same Dockerfile, and therefore we know for sure that there is only one remote and branch names won't be ambiguous. Removing the 'origin/' allows to put commit hashes into the branch variables (like done in the new bisect script [1]). Version b) does not work with branch names: $ git checkout -f -B osmith/check-imei-before-lu osmith/check-imei-before-lu fatal: Cannot update paths and switch to branch 'osmith/check-imei-before-lu' at the same time. Did you intend to checkout 'osmith/check-imei-before-lu' which can not be resolved as commit? New version c) works with both commits and branches, and it is shorter. [1] Change-Id: I11f7e61a9b30d58a0fdfcaf77dde447806bf661f Change-Id: I2ff745c8d19b777d876170d5717c082ceb68a1f3 --- M gr-gsm-master/Dockerfile M osmo-bsc-master/Dockerfile M osmo-bts-master/Dockerfile M osmo-gerrit-libosmo/Dockerfile M osmo-ggsn-master/Dockerfile M osmo-hlr-master/Dockerfile M osmo-hnbgw-master/Dockerfile M osmo-mgw-master/Dockerfile M osmo-msc-master/Dockerfile M osmo-nitb-master/Dockerfile M osmo-pcu-master/Dockerfile M osmo-sgsn-master/Dockerfile M osmo-sip-master/Dockerfile M osmo-stp-master/Dockerfile M osmocom-bb-host-master/Dockerfile M ttcn3-bsc-test/Dockerfile M ttcn3-bscnat-test/Dockerfile M ttcn3-bts-test/Dockerfile M ttcn3-ggsn-test/Dockerfile M ttcn3-hlr-test/Dockerfile M ttcn3-mgw-test/Dockerfile M ttcn3-msc-test/Dockerfile M ttcn3-nitb-sysinfo/Dockerfile M ttcn3-pcu-test/Dockerfile M ttcn3-sgsn-test/Dockerfile M ttcn3-sip-test/Dockerfile 26 files changed, 47 insertions(+), 47 deletions(-) Approvals: osmith: Verified Pau Espin Pedrol: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved diff --git a/gr-gsm-master/Dockerfile b/gr-gsm-master/Dockerfile index 03cf427..b678dd6 100644 --- a/gr-gsm-master/Dockerfile +++ b/gr-gsm-master/Dockerfile @@ -50,7 +50,7 @@ ADD http://git.osmocom.org/libosmocore/patch?h=$LIBOSMOCORE_BRANCH /tmp/commit-libosmocore RUN cd libosmocore \ - && git fetch && git checkout -f -B $LIBOSMOCORE_BRANCH origin/$LIBOSMOCORE_BRANCH \ + && git fetch && git checkout -f $LIBOSMOCORE_BRANCH \ && git rev-parse --abbrev-ref HEAD && git rev-parse HEAD \ && autoreconf -fi \ && ./configure \ @@ -65,7 +65,7 @@ ADD http://git.osmocom.org/gr-gsm/patch?h=$GR_GSM_BRANCH /tmp/commit-gr-gsm RUN cd gr-gsm \ - && git fetch && git checkout -f -B $GR_GSM_BRANCH origin/$GR_GSM_BRANCH \ + && git fetch && git checkout -f $GR_GSM_BRANCH \ && git rev-parse HEAD \ && mkdir build/ \ && cd build/ \ diff --git a/osmo-bsc-master/Dockerfile b/osmo-bsc-master/Dockerfile index bcd0573..cbf80f9 100644 --- a/osmo-bsc-master/Dockerfile +++ b/osmo-bsc-master/Dockerfile @@ -32,7 +32,7 @@ ADD http://git.osmocom.org/osmo-bsc/patch?h=$OSMO_BSC_BRANCH /tmp/commit-osmo-bsc RUN cd osmo-bsc && \ - git fetch && git checkout -f -B $OSMO_BSC_BRANCH $OSMO_BSC_BRANCH && \ + git fetch && git checkout -f $OSMO_BSC_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-bts-master/Dockerfile b/osmo-bts-master/Dockerfile index f4ddf3a..d7707a3 100644 --- a/osmo-bts-master/Dockerfile +++ b/osmo-bts-master/Dockerfile @@ -33,7 +33,7 @@ ADD http://git.osmocom.org/osmo-bts/patch?h=$OSMO_BTS_BRANCH /tmp/commit-osmo-bts RUN cd osmo-bts && \ - git fetch && git checkout -f -B $OSMO_BTS_BRANCH $OSMO_BTS_BRANCH && \ + git fetch && git checkout -f $OSMO_BTS_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-trx && \ diff --git a/osmo-gerrit-libosmo/Dockerfile b/osmo-gerrit-libosmo/Dockerfile index 5442703..4db1923 100644 --- a/osmo-gerrit-libosmo/Dockerfile +++ b/osmo-gerrit-libosmo/Dockerfile @@ -45,7 +45,7 @@ # build libasn1c first, no libosmo* dependency and infrequent changes ADD http://git.osmocom.org/libasn1c/patch /tmp/commit-libasn1c RUN cd libasn1c && \ - git fetch && git checkout -f -B master origin/master && \ + git fetch && git checkout -f master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -56,7 +56,7 @@ # build libsmpp34 first, no libosmo* dependency and infrequent changes ADD http://git.osmocom.org/libsmpp34/patch /tmp/commit-libsmpp34 RUN cd libsmpp34 && \ - git fetch && git checkout -f -B master origin/master && \ + git fetch && git checkout -f master && \ autoreconf -fi && \ ./configure && \ make -j1 && \ @@ -67,7 +67,7 @@ # build libosmocore before any of its downatream dependences ADD http://git.osmocom.org/libosmocore/patch /tmp/commit-libosmocore RUN cd libosmocore && \ - git fetch && git checkout -f -B master origin/master && \ + git fetch && git checkout -f master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -79,7 +79,7 @@ ADD http://git.osmocom.org/libosmo-abis/patch /tmp/commit-libosmo-abis RUN cd libosmo-abis && \ - git fetch && git checkout -f -B master origin/master && \ + git fetch && git checkout -f master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -89,7 +89,7 @@ ADD http://git.osmocom.org/libosmo-netif/patch /tmp/commit-libosmo-netif RUN cd libosmo-netif && \ - git fetch && git checkout -f -B master origin/master && \ + git fetch && git checkout -f master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -99,7 +99,7 @@ ADD http://git.osmocom.org/libosmo-sccp/patch /tmp/commit-libosmo-sccp RUN cd libosmo-sccp && \ - git fetch && git checkout -f -B master origin/master && \ + git fetch && git checkout -f master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -109,7 +109,7 @@ ADD http://git.osmocom.org/osmo-mgw/patch /tmp/commit-osmo-mgw RUN cd osmo-mgw && \ - git fetch && git checkout -f -B master origin/master && \ + git fetch && git checkout -f master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -119,7 +119,7 @@ ADD http://git.osmocom.org/osmo-iuh/patch /tmp/commit-osmo-iuh RUN cd osmo-iuh && \ - git fetch && git checkout -f -B master origin/master && \ + git fetch && git checkout -f master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -129,7 +129,7 @@ ADD http://git.osmocom.org/osmo-ggsn/patch /tmp/commit-osmo-ggsn RUN cd osmo-ggsn && \ - git fetch && git checkout -f -B master origin/master && \ + git fetch && git checkout -f master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -139,4 +139,4 @@ # example command which builds a single osmo-* application at 'docker run' time in tmpfs -CMD /bin/sh -c 'cd /tmpfs && git clone --reference /build/openbsc git://git.osmocom.org/openbsc.git && cd openbsc && git checkout -f -B master origin/master && cd openbsc && autoreconf -fi && ./configure --enable-nat --enable-osmo-bsc --enable-smpp --enable-vty-tests --enable-external-tests && make -j8 check' +CMD /bin/sh -c 'cd /tmpfs && git clone --reference /build/openbsc git://git.osmocom.org/openbsc.git && cd openbsc && git checkout -f master && cd openbsc && autoreconf -fi && ./configure --enable-nat --enable-osmo-bsc --enable-smpp --enable-vty-tests --enable-external-tests && make -j8 check' diff --git a/osmo-ggsn-master/Dockerfile b/osmo-ggsn-master/Dockerfile index cf84d02..8398fbb 100644 --- a/osmo-ggsn-master/Dockerfile +++ b/osmo-ggsn-master/Dockerfile @@ -25,7 +25,7 @@ RUN git clone git://git.osmocom.org/osmo-ggsn.git ADD http://git.osmocom.org/osmo-ggsn/patch/?h=$OSMO_GGSN_BRANCH /tmp/commit RUN cd osmo-ggsn && \ - git fetch && git checkout -f -B $OSMO_GGSN_BRANCH $OSMO_GGSN_BRANCH && \ + git fetch && git checkout -f $OSMO_GGSN_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-hlr-master/Dockerfile b/osmo-hlr-master/Dockerfile index 2da7c08..84df534 100644 --- a/osmo-hlr-master/Dockerfile +++ b/osmo-hlr-master/Dockerfile @@ -30,7 +30,7 @@ ADD http://git.osmocom.org/osmo-hlr/patch?h=$OSMO_HLR_BRANCH /tmp/commit-osmo-hlr RUN cd osmo-hlr && \ - git fetch && git checkout -f -B $OSMO_HLR_BRANCH $OSMO_HLR_BRANCH && \ + git fetch && git checkout -f $OSMO_HLR_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-hnbgw-master/Dockerfile b/osmo-hnbgw-master/Dockerfile index c89502b..347e8d4 100644 --- a/osmo-hnbgw-master/Dockerfile +++ b/osmo-hnbgw-master/Dockerfile @@ -30,7 +30,7 @@ ADD http://git.osmocom.org/osmo-iuh/patch?h=$OSMO_IUH_BRANCH /tmp/commit-osmo-mgw RUN cd osmo-iuh && \ - git fetch && git checkout -f -B $OSMO_IUH_BRANCH $OSMO_IUH_BRANCH && \ + git fetch && git checkout -f $OSMO_IUH_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-mgw-master/Dockerfile b/osmo-mgw-master/Dockerfile index 4c6d32a..92e499e 100644 --- a/osmo-mgw-master/Dockerfile +++ b/osmo-mgw-master/Dockerfile @@ -30,7 +30,7 @@ RUN cd osmo-mgw && \ - git fetch && git checkout -f -B $OSMO_MGW_BRANCH $OSMO_MGW_BRANCH && \ + git fetch && git checkout -f $OSMO_MGW_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-msc-master/Dockerfile b/osmo-msc-master/Dockerfile index c8cfd62..83576ea 100644 --- a/osmo-msc-master/Dockerfile +++ b/osmo-msc-master/Dockerfile @@ -37,7 +37,7 @@ ADD http://git.osmocom.org/osmo-msc/patch?h=$OSMO_MSC_BRANCH /tmp/commit-osmo-msc RUN cd osmo-msc && \ - git fetch && git checkout -f -B $OSMO_MSC_BRANCH $OSMO_MSC_BRANCH && \ + git fetch && git checkout -f $OSMO_MSC_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-smpp --enable-iu && \ diff --git a/osmo-nitb-master/Dockerfile b/osmo-nitb-master/Dockerfile index d3774da..d0fc8af 100644 --- a/osmo-nitb-master/Dockerfile +++ b/osmo-nitb-master/Dockerfile @@ -31,7 +31,7 @@ ADD http://git.osmocom.org/openbsc/patch?h=$OSMO_NITB_BRANCH /tmp/commit-openbsc RUN cd openbsc/openbsc && \ - git fetch && git checkout -f -B $OSMO_NITB_BRANCH $OSMO_NITB_BRANCH && \ + git fetch && git checkout -f $OSMO_NITB_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-nat --enable-osmo-bsc --enable-smpp && \ diff --git a/osmo-pcu-master/Dockerfile b/osmo-pcu-master/Dockerfile index 7a294a4..fba8c31 100644 --- a/osmo-pcu-master/Dockerfile +++ b/osmo-pcu-master/Dockerfile @@ -28,7 +28,7 @@ ADD http://git.osmocom.org/osmo-pcu/patch?h=$OSMO_PCU_BRANCH /tmp/commit-osmo-pcu RUN cd osmo-pcu && \ - git fetch && git checkout -f -B $OSMO_PCU_BRANCH $OSMO_PCU_BRANCH && \ + git fetch && git checkout -f $OSMO_PCU_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-trx && \ diff --git a/osmo-sgsn-master/Dockerfile b/osmo-sgsn-master/Dockerfile index c373564..4973240 100644 --- a/osmo-sgsn-master/Dockerfile +++ b/osmo-sgsn-master/Dockerfile @@ -32,7 +32,7 @@ ADD http://git.osmocom.org/osmo-sgsn/patch?h=$OSMO_SGSN_BRANCH /tmp/commit RUN cd osmo-sgsn && \ - git fetch && git checkout -f -B $OSMO_SGSN_BRANCH $OSMO_SGSN_BRANCH && \ + git fetch && git checkout -f $OSMO_SGSN_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-sip-master/Dockerfile b/osmo-sip-master/Dockerfile index 258b1fe..a8d14c7 100644 --- a/osmo-sip-master/Dockerfile +++ b/osmo-sip-master/Dockerfile @@ -36,7 +36,7 @@ ADD http://git.osmocom.org/osmo-sip-connector/patch?h=$OSMO_SIP_BRANCH /tmp/commit-osmo-sip-connector RUN cd osmo-sip-connector && \ - git fetch && git checkout -f -B $OSMO_SIP_BRANCH $OSMO_SIP_BRANCH && \ + git fetch && git checkout -f $OSMO_SIP_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-smpp --enable-iu && \ diff --git a/osmo-stp-master/Dockerfile b/osmo-stp-master/Dockerfile index 0a62ed7..a1e931f 100644 --- a/osmo-stp-master/Dockerfile +++ b/osmo-stp-master/Dockerfile @@ -26,7 +26,7 @@ RUN git clone git://git.osmocom.org/libosmo-sccp.git ADD http://git.osmocom.org/libosmo-sccp/patch?h=$OSMO_STP_BRANCH /tmp/commit RUN cd libosmo-sccp && \ - git fetch && git checkout -f -B $OSMO_STP_BRANCH $OSMO_STP_BRANCH && \ + git fetch && git checkout -f $OSMO_STP_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmocom-bb-host-master/Dockerfile b/osmocom-bb-host-master/Dockerfile index 260f381..ef6ff2d 100644 --- a/osmocom-bb-host-master/Dockerfile +++ b/osmocom-bb-host-master/Dockerfile @@ -25,7 +25,7 @@ ADD http://git.osmocom.org/osmocom-bb/patch?h=$OSMO_BB_BRANCH /tmp/commit RUN cd osmocom-bb && \ - git fetch && git checkout -f -B $OSMO_BB_BRANCH origin/$OSMO_BB_BRANCH && \ + git fetch && git checkout -f $OSMO_BB_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD RUN cd osmocom-bb/src/host/trxcon && \ diff --git a/ttcn3-bsc-test/Dockerfile b/ttcn3-bsc-test/Dockerfile index 546f33b..93d65ad 100644 --- a/ttcn3-bsc-test/Dockerfile +++ b/ttcn3-bsc-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f -B master origin/master && \ + git checkout -f master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout -f $OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make bsc diff --git a/ttcn3-bscnat-test/Dockerfile b/ttcn3-bscnat-test/Dockerfile index 047f21c..86422b3 100644 --- a/ttcn3-bscnat-test/Dockerfile +++ b/ttcn3-bscnat-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f -B master origin/master && \ + git checkout -f master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout -f $OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make bsc-nat diff --git a/ttcn3-bts-test/Dockerfile b/ttcn3-bts-test/Dockerfile index d8969bb..387afb0 100644 --- a/ttcn3-bts-test/Dockerfile +++ b/ttcn3-bts-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f -B master origin/master && \ + git checkout -f master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout -f $OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make deps-update bts diff --git a/ttcn3-ggsn-test/Dockerfile b/ttcn3-ggsn-test/Dockerfile index 6d6aff6..7bfb0a8 100644 --- a/ttcn3-ggsn-test/Dockerfile +++ b/ttcn3-ggsn-test/Dockerfile @@ -4,7 +4,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f -B master origin/master && \ + git checkout -f master && \ make deps ARG OSMO_TTCN3_BRANCH="master" @@ -12,7 +12,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout -f $OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make ggsn_tests diff --git a/ttcn3-hlr-test/Dockerfile b/ttcn3-hlr-test/Dockerfile index 752d442..fa70311 100644 --- a/ttcn3-hlr-test/Dockerfile +++ b/ttcn3-hlr-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f -B master origin/master && \ + git checkout -f master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout -f $OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make deps-update hlr diff --git a/ttcn3-mgw-test/Dockerfile b/ttcn3-mgw-test/Dockerfile index bf13d12..d6267e8 100644 --- a/ttcn3-mgw-test/Dockerfile +++ b/ttcn3-mgw-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f -B master origin/master && \ + git checkout -f master && \ make deps ARG OSMO_TTCN3_BRANCH="master" @@ -13,7 +13,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout -f $OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make mgw diff --git a/ttcn3-msc-test/Dockerfile b/ttcn3-msc-test/Dockerfile index 53aa393..92eeee0 100644 --- a/ttcn3-msc-test/Dockerfile +++ b/ttcn3-msc-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f -B master origin/master && \ + git checkout -f master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout -f $OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make msc diff --git a/ttcn3-nitb-sysinfo/Dockerfile b/ttcn3-nitb-sysinfo/Dockerfile index d0ec87a..45bf225 100644 --- a/ttcn3-nitb-sysinfo/Dockerfile +++ b/ttcn3-nitb-sysinfo/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f -B master origin/master && \ + git checkout -f master && \ make deps ARG OSMO_TTCN3_BRANCH="master" @@ -13,7 +13,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout -f $OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make sysinfo diff --git a/ttcn3-pcu-test/Dockerfile b/ttcn3-pcu-test/Dockerfile index fbb64f5..fa9e724 100644 --- a/ttcn3-pcu-test/Dockerfile +++ b/ttcn3-pcu-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f -B master origin/master && \ + git checkout -f master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout -f $OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make pcu diff --git a/ttcn3-sgsn-test/Dockerfile b/ttcn3-sgsn-test/Dockerfile index 60ec333..4ea5daf 100644 --- a/ttcn3-sgsn-test/Dockerfile +++ b/ttcn3-sgsn-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f -B master origin/master && \ + git checkout -f master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout -f $OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make sgsn diff --git a/ttcn3-sip-test/Dockerfile b/ttcn3-sip-test/Dockerfile index eead347..4ba59be 100644 --- a/ttcn3-sip-test/Dockerfile +++ b/ttcn3-sip-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f -B master origin/master && \ + git checkout -f master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout -f $OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make sip -- To view, visit https://gerrit.osmocom.org/13895 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I2ff745c8d19b777d876170d5717c082ceb68a1f3 Gerrit-Change-Number: 13895 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 08:54:44 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 15 May 2019 08:54:44 +0000 Subject: Change in osmo-msc[master]: vlr: when setting IMEISV, also set IMEI In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13893 ) Change subject: vlr: when setting IMEISV, also set IMEI ...................................................................... Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13893 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I02e7b66848bf7dddb31b105e2ae981432817ae1e Gerrit-Change-Number: 13893 Gerrit-PatchSet: 4 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 15 May 2019 08:54:44 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 09:05:09 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 15 May 2019 09:05:09 +0000 Subject: Change in osmo-msc[master]: vlr: optionally send IMEI early to HLR In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13894 ) Change subject: vlr: optionally send IMEI early to HLR ...................................................................... Patch Set 5: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13894 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I88283cad23793b475445d814ff49db534cb41244 Gerrit-Change-Number: 13894 Gerrit-PatchSet: 5 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 15 May 2019 09:05:09 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 09:17:54 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 15 May 2019 09:17:54 +0000 Subject: Change in osmo-msc[master]: vlr: when setting IMEISV, also set IMEI In-Reply-To: References: Message-ID: osmith has submitted this change and it was merged. ( https://gerrit.osmocom.org/13893 ) Change subject: vlr: when setting IMEISV, also set IMEI ...................................................................... vlr: when setting IMEISV, also set IMEI Copy IMEISV to IMEI when IMEISV changes. The additional SV digits will get cut off then. This is needed for the subscriber on demand use case, since we can get the IMEISV early (see [1]), but need to send the IMEI to the Check IMEI procedure. While adjusting the tests, I have noticed that there are code paths where we ask the MS for the IMEISV first, and later ask the MS for the IMEI, although we already have the IMEISV. This could be improved in a future patch. [1] Change-Id I256224194c3b8caf2b58a88d11dccd32c569201f Related: OS#2542 Change-Id: I02e7b66848bf7dddb31b105e2ae981432817ae1e --- M src/libvlr/vlr.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_no_authen.err 3 files changed, 9 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 5082469..f76a7ee 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -451,6 +451,9 @@ OSMO_STRLCPY_ARRAY(vsub->imeisv, imeisv); DEBUGP(DVLR, "set IMEISV on subscriber; IMSI=%s IMEISV=%s\n", vsub->imsi, vsub->imeisv); + + /* Copy IMEISV to IMEI (additional SV digits get cut off) */ + vlr_subscr_set_imei(vsub, imeisv); } /* Safely copy the given MSISDN string to vsub->msisdn */ diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err index 1999d89..7328a8d 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err @@ -1783,6 +1783,7 @@ DRLL msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Dispatching 04.08 message: RR GSM48_MT_RR_CIPH_M_COMPL DBSSAP msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Ciphering Mode Complete contains Mobile Identity: IMEI-SV-4234234234234275F DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=4234234234234275 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_ID_IMEISV DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_HLR_UPD}: Event VLR_ULA_E_ID_IMEISV not permitted DREF msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: - ms_sends_ciphering_mode_complete: now used by 1 (lu) diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.err b/tests/msc_vlr/msc_vlr_test_no_authen.err index 7d668cb..a048215 100644 --- a/tests/msc_vlr/msc_vlr_test_no_authen.err +++ b/tests/msc_vlr/msc_vlr_test_no_authen.err @@ -1702,6 +1702,7 @@ DRLL msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Dispatching 04.08 message: MM GSM48_MT_MM_ID_RESP DMM IDENTITY RESPONSE: MI=IMEI-SV-4234234234234275 DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=4234234234234275 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: Received Event VLR_ULA_E_ID_IMEISV DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_auth() @@ -1920,6 +1921,7 @@ DRLL msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Dispatching 04.08 message: MM GSM48_MT_MM_ID_RESP DMM IDENTITY RESPONSE: MI=IMEI-SV-4234234234234275 DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=4234234234234275 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: Received Event VLR_ULA_E_ID_IMEISV DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_auth() @@ -2186,6 +2188,7 @@ DRLL msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Dispatching 04.08 message: MM GSM48_MT_MM_ID_RESP DMM IDENTITY RESPONSE: MI=IMEI-SV-4234234234234275 DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=4234234234234275 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: Received Event VLR_ULA_E_ID_IMEISV DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_auth() @@ -2382,6 +2385,7 @@ DRLL msc_a(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Dispatching 04.08 message: MM GSM48_MT_MM_ID_RESP DMM IDENTITY RESPONSE: MI=IMEI-SV-5234234234234276 DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=5234234234234276 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=52342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: Received Event VLR_ULA_E_ID_IMEISV DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_auth() @@ -2646,6 +2650,7 @@ DRLL msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Dispatching 04.08 message: MM GSM48_MT_MM_ID_RESP DMM IDENTITY RESPONSE: MI=IMEI-SV-4234234234234275 DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=4234234234234275 +DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: Received Event VLR_ULA_E_ID_IMEISV DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_auth() -- To view, visit https://gerrit.osmocom.org/13893 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I02e7b66848bf7dddb31b105e2ae981432817ae1e Gerrit-Change-Number: 13893 Gerrit-PatchSet: 5 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 09:17:55 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 15 May 2019 09:17:55 +0000 Subject: Change in osmo-msc[master]: vlr: optionally send IMEI early to HLR In-Reply-To: References: Message-ID: osmith has submitted this change and it was merged. ( https://gerrit.osmocom.org/13894 ) Change subject: vlr: optionally send IMEI early to HLR ...................................................................... vlr: optionally send IMEI early to HLR When 'check-imei-rqd 1 early' is set in the config, send the IMEI to the HLR before doing the location update with the HLR. The OsmoHLR documentation referenced in the code will be added in osmo-hlr.git's Change-Id I2dd4a56f7b8be8b5d0e6fc32e04459e5e278d0a9. Related: OS#2542 Change-Id: I88283cad23793b475445d814ff49db534cb41244 --- M src/libvlr/vlr.c M src/libvlr/vlr_lu_fsm.c M src/libvlr/vlr_lu_fsm.h M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_ss.err M tests/msc_vlr/msc_vlr_test_umts_authen.err 16 files changed, 207 insertions(+), 169 deletions(-) Approvals: Vadim Yanitskiy: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index f76a7ee..b156b43 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -1043,6 +1043,8 @@ return -ENODEV; } + /* Dispatch result to vsub->lu_fsm, which will either handle the result by itself (Check IMEI early) or dispatch + * it further to lu_compl_vlr_fsm (Check IMEI after LU). */ if (gsup->message_type == OSMO_GSUP_MSGT_CHECK_IMEI_RESULT) { if (gsup->imei_result == OSMO_GSUP_IMEI_RESULT_ACK) osmo_fsm_inst_dispatch(vsub->lu_fsm, VLR_ULA_E_HLR_IMEI_ACK, NULL); diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c index 15ab88c..9dff4aa 100644 --- a/src/libvlr/vlr_lu_fsm.c +++ b/src/libvlr/vlr_lu_fsm.c @@ -460,7 +460,8 @@ /* TODO: Trace_Subscriber_Activity_VLR */ - if (vlr->cfg.check_imei_rqd) { + /* If imeisv_early is enabled: IMEI already retrieved and checked (vlr_loc_upd_node1_pre), don't do it again. */ + if (vlr->cfg.check_imei_rqd && !vlr->cfg.retrieve_imeisv_early) { /* Check IMEI VLR */ osmo_fsm_inst_state_chg(fi, lcvp->assign_tmsi ? @@ -924,6 +925,39 @@ } } +static void vlr_loc_upd_node1_pre(struct osmo_fsm_inst *fi) +{ + struct lu_fsm_priv *lfp = lu_fsm_fi_priv(fi); + struct vlr_instance *vlr = lfp->vlr; + + LOGPFSM(fi, "%s()\n", __func__); + + if (vlr->cfg.check_imei_rqd && vlr->cfg.retrieve_imeisv_early) { + osmo_fsm_inst_state_chg(fi, VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY, vlr_timer(lfp->vlr, 3270), 3270); + vlr_subscr_tx_req_check_imei(lfp->vsub); + } else { + vlr_loc_upd_node1(fi); + } +} + +/* End of Check_IMEI Procedure. Executed early (before the location update), so we can send the IMEI to the HLR even if + * the MS would be rejected in LU. See the "Configuring the Subscribers Create on Demand Feature" section of the OsmoHLR + * user manual for a detailed explanation of the use case. */ +static void lu_fsm_wait_hlr_check_imei_early(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case VLR_ULA_E_HLR_IMEI_ACK: + vlr_loc_upd_node1(fi); + break; + case VLR_ULA_E_HLR_IMEI_NACK: + lu_fsm_failure(fi, GSM48_REJECT_ILLEGAL_ME); + break; + default: + OSMO_ASSERT(0); + break; + } +} + static void vlr_loc_upd_want_imsi(struct osmo_fsm_inst *fi) { struct lu_fsm_priv *lfp = lu_fsm_fi_priv(fi); @@ -937,7 +971,7 @@ osmo_fsm_inst_state_chg(fi, VLR_ULA_S_WAIT_IMSI, vlr_timer(vlr, 3270), 3270); vlr->ops.tx_id_req(lfp->msc_conn_ref, GSM_MI_TYPE_IMSI); - /* will continue at vlr_loc_upd_node1() once IMSI arrives */ + /* will continue at vlr_loc_upd_node1_pre() once IMSI arrives */ } static int assoc_lfp_with_sub(struct osmo_fsm_inst *fi, struct vlr_subscr *vsub) @@ -1043,7 +1077,7 @@ if (!lfp->vsub->imsi[0]) vlr_loc_upd_want_imsi(fi); else - vlr_loc_upd_node1(fi); + vlr_loc_upd_node1_pre(fi); } static void lu_fsm_idle(struct osmo_fsm_inst *fi, uint32_t event, @@ -1097,7 +1131,7 @@ { switch (event) { case VLR_ULA_E_SEND_ID_ACK: - vlr_loc_upd_node1(fi); + vlr_loc_upd_node1_pre(fi); break; case VLR_ULA_E_SEND_ID_NACK: vlr_loc_upd_want_imsi(fi); @@ -1165,7 +1199,7 @@ switch (event) { case VLR_ULA_E_ID_IMSI: vlr_subscr_set_imsi(vsub, mi_string); - vlr_loc_upd_node1(fi); + vlr_loc_upd_node1_pre(fi); break; default: OSMO_ASSERT(0); @@ -1305,6 +1339,7 @@ S(VLR_ULA_S_WAIT_IMSI) | S(VLR_ULA_S_WAIT_AUTH) | S(VLR_ULA_S_WAIT_CIPH) | + S(VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY) | S(VLR_ULA_S_WAIT_HLR_UPD) | S(VLR_ULA_S_DONE), .name = OSMO_STRINGIFY(VLR_ULA_S_IDLE), @@ -1316,6 +1351,7 @@ S(VLR_ULA_S_WAIT_IMSI) | S(VLR_ULA_S_WAIT_AUTH) | S(VLR_ULA_S_WAIT_CIPH) | + S(VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY) | S(VLR_ULA_S_WAIT_HLR_UPD) | S(VLR_ULA_S_DONE), .name = OSMO_STRINGIFY(VLR_ULA_S_WAIT_IMEISV), @@ -1327,6 +1363,7 @@ .out_state_mask = S(VLR_ULA_S_WAIT_IMSI) | S(VLR_ULA_S_WAIT_AUTH) | S(VLR_ULA_S_WAIT_CIPH) | + S(VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY) | S(VLR_ULA_S_DONE), .name = OSMO_STRINGIFY(VLR_ULA_S_WAIT_PVLR), .action = lu_fsm_wait_pvlr, @@ -1352,11 +1389,23 @@ .in_event_mask = S(VLR_ULA_E_ID_IMSI), .out_state_mask = S(VLR_ULA_S_WAIT_AUTH) | S(VLR_ULA_S_WAIT_CIPH) | + S(VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY) | S(VLR_ULA_S_WAIT_HLR_UPD) | S(VLR_ULA_S_DONE), .name = OSMO_STRINGIFY(VLR_ULA_S_WAIT_IMSI), .action = lu_fsm_wait_imsi, }, + [VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY] = { + .in_event_mask = S(VLR_ULA_E_HLR_IMEI_ACK) | + S(VLR_ULA_E_HLR_IMEI_NACK), + .out_state_mask = S(VLR_ULA_S_WAIT_AUTH) | + S(VLR_ULA_S_WAIT_CIPH) | + S(VLR_ULA_S_WAIT_HLR_UPD) | + S(VLR_ULA_S_WAIT_LU_COMPL) | + S(VLR_ULA_S_DONE), + .name = OSMO_STRINGIFY(VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY), + .action = lu_fsm_wait_hlr_check_imei_early, + }, [VLR_ULA_S_WAIT_HLR_UPD] = { .in_event_mask = S(VLR_ULA_E_HLR_LU_RES) | S(VLR_ULA_E_UPD_HLR_COMPL), diff --git a/src/libvlr/vlr_lu_fsm.h b/src/libvlr/vlr_lu_fsm.h index 5cf13c7..b5c4a5e 100644 --- a/src/libvlr/vlr_lu_fsm.h +++ b/src/libvlr/vlr_lu_fsm.h @@ -9,6 +9,7 @@ VLR_ULA_S_WAIT_AUTH, /* Waiting for Authentication */ VLR_ULA_S_WAIT_CIPH, /* Waiting for Ciphering Complete */ VLR_ULA_S_WAIT_IMSI, /* Waiting for IMSI from MS */ + VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY, /* Waiting for Check IMEI result from HLR */ VLR_ULA_S_WAIT_HLR_UPD, /* Waiting for end of HLR update */ VLR_ULA_S_WAIT_LU_COMPL,/* Waiting for LU complete */ VLR_ULA_S_WAIT_LU_COMPL_STANDALONE, /* Standalone VLR */ diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.err b/tests/msc_vlr/msc_vlr_test_authen_reuse.err index 9b8555d..ea156de 100644 --- a/tests/msc_vlr/msc_vlr_test_authen_reuse.err +++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.err @@ -30,6 +30,7 @@ DMSC msc_a(IMSI-901700000010650:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000010650:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -531,6 +532,7 @@ DMSC msc_a(IMSI-901700000010650:UTRAN-Iu:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000010650:UTRAN-Iu:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:UTRAN-Iu:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1062,6 +1064,7 @@ DMSC msc_a(IMSI-901700000010650:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000010650:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1666,6 +1669,7 @@ DMSC msc_a(IMSI-901700000010650:UTRAN-Iu:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000010650:UTRAN-Iu:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:UTRAN-Iu:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -2309,6 +2313,7 @@ DMSC msc_a(IMSI-901700000010650:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000010650:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -2695,6 +2700,7 @@ DMSC msc_a(IMSI-901700000010650:UTRAN-Iu:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000010650:UTRAN-Iu:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:UTRAN-Iu:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated diff --git a/tests/msc_vlr/msc_vlr_test_call.err b/tests/msc_vlr/msc_vlr_test_call.err index 620ec0e..0eaa2f3 100644 --- a/tests/msc_vlr/msc_vlr_test_call.err +++ b/tests/msc_vlr/msc_vlr_test_call.err @@ -31,6 +31,7 @@ DMSC msc_a(IMSI-901700000010650:UTRAN-Iu:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000010650:UTRAN-Iu:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:UTRAN-Iu:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -456,6 +457,7 @@ DMSC msc_a(IMSI-901700000010650:UTRAN-Iu:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000010650:UTRAN-Iu:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:UTRAN-Iu:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -879,6 +881,7 @@ DMSC msc_a(IMSI-901700000010650:UTRAN-Iu:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000010650:UTRAN-Iu:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:UTRAN-Iu:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1261,6 +1264,7 @@ DMSC msc_a(IMSI-901700000010650:UTRAN-Iu:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000010650:UTRAN-Iu:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:UTRAN-Iu:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1645,6 +1649,7 @@ DMSC msc_a(IMSI-901700000010650:UTRAN-Iu:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000010650:UTRAN-Iu:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:UTRAN-Iu:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.err b/tests/msc_vlr/msc_vlr_test_gsm_authen.err index 66a97c2..45b047d 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_authen.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.err @@ -30,6 +30,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -610,6 +611,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1175,6 +1177,7 @@ DMSC msc_a(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 - _lu_fsm_associate_vsub: now used by 2 (attached,active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1428,6 +1431,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1738,6 +1742,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -2003,6 +2008,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -2269,6 +2275,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -2620,6 +2627,7 @@ DMSC msc_a(IMSI-901700000010650:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000010650:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -3175,6 +3183,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err index 7328a8d..b527f05 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err @@ -30,6 +30,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -679,6 +680,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1376,6 +1378,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1693,6 +1696,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1977,6 +1981,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -2335,6 +2340,7 @@ DMSC msc_a(IMSI-901700000010650:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000010650:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -2929,6 +2935,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -3570,6 +3577,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated diff --git a/tests/msc_vlr/msc_vlr_test_hlr_reject.err b/tests/msc_vlr/msc_vlr_test_hlr_reject.err index 8114459..2dd6a52 100644 --- a/tests/msc_vlr/msc_vlr_test_hlr_reject.err +++ b/tests/msc_vlr/msc_vlr_test_hlr_reject.err @@ -30,6 +30,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -131,6 +132,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -235,6 +237,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -396,6 +399,7 @@ DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - _lu_fsm_associate_vsub: now used by 2 (attached,active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -559,6 +563,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -720,6 +725,7 @@ DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - _lu_fsm_associate_vsub: now used by 2 (attached,active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -824,6 +830,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -986,6 +993,7 @@ DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - _lu_fsm_associate_vsub: now used by 2 (attached,active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1087,6 +1095,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1187,6 +1196,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -1290,6 +1300,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() diff --git a/tests/msc_vlr/msc_vlr_test_hlr_timeout.err b/tests/msc_vlr/msc_vlr_test_hlr_timeout.err index 9c8a97f..60b240d 100644 --- a/tests/msc_vlr/msc_vlr_test_hlr_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_hlr_timeout.err @@ -31,6 +31,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -141,6 +142,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.err b/tests/msc_vlr/msc_vlr_test_ms_timeout.err index 913ed03..07f2b5b 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.err @@ -31,6 +31,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -160,6 +161,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -432,6 +434,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -739,6 +742,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000004620:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.c b/tests/msc_vlr/msc_vlr_test_no_authen.c index 72647a3..b3289f3 100644 --- a/tests/msc_vlr/msc_vlr_test_no_authen.c +++ b/tests/msc_vlr/msc_vlr_test_no_authen.c @@ -615,11 +615,10 @@ ms_sends_msg("050802008168000130089910070000006402"); OSMO_ASSERT(dtap_tx_confirmed); - btw("MS replies with an Identity Response, causes LU to commence with a GSUP LU request to HLR"); - gsup_expect_tx("04010809710000004026f0280102" VLR_TO_HLR); + btw("MS replies with an Identity Response, causes an early GSUP Check IMEI request to HLR"); + gsup_expect_tx("30010809710000004026f050080724433224433224" VLR_TO_HLR); ms_sends_msg("0559094332244332244372f5"); OSMO_ASSERT(gsup_tx_confirmed); - VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); btw("Subscriber has the IMEISV from the ID Response"); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); @@ -627,6 +626,13 @@ VERBOSE_ASSERT(strcmp(vsub->imeisv, "4234234234234275"), == 0, "%d"); vlr_subscr_put(vsub, __func__); + btw("HLR accepts the IMEI, VLR responds with LU Request"); + expect_bssap_clear(); + gsup_rx("32010809710000004026f0510100" HLR_TO_VLR, + "04010809710000004026f0280102" VLR_TO_HLR); + OSMO_ASSERT(gsup_tx_confirmed); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + btw("HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT"); gsup_rx("10010809710000004026f00804036470f1" HLR_TO_VLR, "12010809710000004026f0" VLR_TO_HLR); @@ -637,27 +643,9 @@ thwart_rx_non_initial_requests(); VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); - btw("HLR also sends GSUP _UPDATE_LOCATION_RESULT, and we send an ID Request for the IMEI to the MS"); - dtap_expect_tx("051802"); + btw("HLR also sends GSUP _UPDATE_LOCATION_RESULT"); gsup_rx("06010809710000004026f0" HLR_TO_VLR, NULL); - btw("We will only do business when the IMEI is known"); - EXPECT_CONN_COUNT(1); - vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); - OSMO_ASSERT(vsub); - vlr_subscr_put(vsub, __func__); - EXPECT_ACCEPTED(false); - thwart_rx_non_initial_requests(); - - btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050080724433224433224" VLR_TO_HLR); - ms_sends_msg("0559084a32244332244302"); - - btw("HLR accepts the IMEI"); - expect_bssap_clear(); - gsup_rx("32010809710000004026f0510100" HLR_TO_VLR, NULL); - VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); - btw("LU was successful, and the conn has already been closed"); VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d"); ran_sends_clear_complete(); @@ -840,11 +828,10 @@ ms_sends_msg("050802008168000130089910070000006402"); OSMO_ASSERT(dtap_tx_confirmed); - btw("MS replies with an Identity Response, causes LU to commence with a GSUP LU request to HLR"); - gsup_expect_tx("04010809710000004026f0280102" VLR_TO_HLR); + btw("MS replies with an Identity Response, causes an early GSUP Check IMEI request to HLR"); + gsup_expect_tx("30010809710000004026f050080724433224433224" VLR_TO_HLR); ms_sends_msg("0559094332244332244372f5"); OSMO_ASSERT(gsup_tx_confirmed); - VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); btw("Subscriber has the IMEISV from the ID Response"); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); @@ -852,6 +839,13 @@ VERBOSE_ASSERT(strcmp(vsub->imeisv, "4234234234234275"), == 0, "%d"); vlr_subscr_put(vsub, __func__); + btw("HLR accepts the IMEI, VLR responds with LU Request"); + expect_bssap_clear(); + gsup_rx("32010809710000004026f0510100" HLR_TO_VLR, + "04010809710000004026f0280102" VLR_TO_HLR); + OSMO_ASSERT(gsup_tx_confirmed); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + btw("HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT"); gsup_rx("10010809710000004026f00804036470f1" HLR_TO_VLR, "12010809710000004026f0" VLR_TO_HLR); @@ -862,25 +856,9 @@ thwart_rx_non_initial_requests(); VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); - btw("HLR also sends GSUP _UPDATE_LOCATION_RESULT, and we send an ID Request for the IMEI to the MS"); - dtap_expect_tx("051802"); + btw("HLR also sends GSUP _UPDATE_LOCATION_RESULT"); gsup_rx("06010809710000004026f0" HLR_TO_VLR, NULL); - btw("We will only do business when the IMEI is known"); - EXPECT_CONN_COUNT(1); - vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__); - OSMO_ASSERT(vsub); - vlr_subscr_put(vsub, __func__); - EXPECT_ACCEPTED(false); - thwart_rx_non_initial_requests(); - - btw("MS replies with an Identity Response, VLR sends the IMEI to HLR"); - gsup_expect_tx("30010809710000004026f050080724433224433224" VLR_TO_HLR); - ms_sends_msg("0559084a32244332244302"); - - btw("HLR accepts the IMEI"); - gsup_rx("32010809710000004026f0510100" HLR_TO_VLR, NULL); - btw("a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl"); EXPECT_CONN_COUNT(1); VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d"); diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.err b/tests/msc_vlr/msc_vlr_test_no_authen.err index a048215..b6c0698 100644 --- a/tests/msc_vlr/msc_vlr_test_no_authen.err +++ b/tests/msc_vlr/msc_vlr_test_no_authen.err @@ -30,6 +30,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -477,6 +478,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -909,6 +911,7 @@ DMSC msc_a(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100 - _lu_fsm_associate_vsub: now used by 2 (attached,active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -1155,6 +1158,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -1404,6 +1408,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -1704,6 +1709,7 @@ DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=4234234234234275 DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: Received Event VLR_ULA_E_ID_IMEISV +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_ciph() @@ -1914,7 +1920,7 @@ DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_IMEISV DREF msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: - mm_rx_loc_upd_req: now used by 2 (rx_from_ms,lu) DREF msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: - rx_from_ms: now used by 1 (lu) -- MS replies with an Identity Response, causes LU to commence with a GSUP LU request to HLR +- MS replies with an Identity Response, causes an early GSUP Check IMEI request to HLR MSC <--GERAN-A-- MS: GSM48_MT_MM_ID_RESP DREF msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: + rx_from_ms: now used by 2 (lu,rx_from_ms) DBSSAP msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode: DTAP @@ -1923,22 +1929,31 @@ DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=4234234234234275 DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: Received Event VLR_ULA_E_ID_IMEISV -DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1() -DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_auth() -DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_ciph() -DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node_4() -DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: state_chg to VLR_ULA_S_WAIT_HLR_UPD +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1_pre() +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: state_chg to VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f0500807244332244332240a0101 +DREF msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: - rx_from_ms: now used by 1 (lu) +- Subscriber has the IMEISV from the ID Response +DREF VLR subscr IMSI-901700000004620 + test_no_authen_imeisv_imei: now used by 2 (active-conn,test_no_authen_imeisv_imei) + strcmp(vsub->imeisv, "4234234234234275") == 0 +DREF VLR subscr IMSI-901700000004620 - test_no_authen_imeisv_imei: now used by 1 (active-conn) +- HLR accepts the IMEI, VLR responds with LU Request +<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: 32010809710000004026f05101000a0101 +DREF VLR subscr IMSI-901700000004620 + vlr_gsup_rx: now used by 2 (active-conn,vlr_gsup_rx) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY}: Received Event VLR_ULA_E_HLR_IMEI_ACK +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY}: vlr_loc_upd_node1() +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY}: vlr_loc_upd_post_ciph() +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY}: vlr_loc_upd_node_4() +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY}: state_chg to VLR_ULA_S_WAIT_HLR_UPD DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A:LU){UPD_HLR_VLR_S_INIT}: Allocated DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A:LU){UPD_HLR_VLR_S_INIT}: is child of vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU) DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A:LU){UPD_HLR_VLR_S_INIT}: Received Event UPD_HLR_VLR_E_START GSUP --> HLR: OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST: 04010809710000004026f02801020a0101 DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A:LU){UPD_HLR_VLR_S_INIT}: state_chg to UPD_HLR_VLR_S_WAIT_FOR_DATA -DREF msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: - rx_from_ms: now used by 1 (lu) +DREF VLR subscr IMSI-901700000004620 - vlr_gsup_rx: now used by 1 (active-conn) +<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: vlr_gsupc_read_cb() returns 0 lu_result_sent == 0 -- Subscriber has the IMEISV from the ID Response -DREF VLR subscr IMSI-901700000004620 + test_no_authen_imeisv_imei: now used by 2 (active-conn,test_no_authen_imeisv_imei) - strcmp(vsub->imeisv, "4234234234234275") == 0 -DREF VLR subscr IMSI-901700000004620 - test_no_authen_imeisv_imei: now used by 1 (active-conn) - HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT <-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: 10010809710000004026f00804036470f10a0101 DREF VLR subscr IMSI-901700000004620 + vlr_gsup_rx: now used by 2 (active-conn,vlr_gsup_rx) @@ -1968,7 +1983,7 @@ DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Message not permitted for initial conn: SMS:0x01 DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode error (rc=-13) for DTAP from MSC-I lu_result_sent == 0 -- HLR also sends GSUP _UPDATE_LOCATION_RESULT, and we send an ID Request for the IMEI to the MS +- HLR also sends GSUP _UPDATE_LOCATION_RESULT <-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: 06010809710000004026f00a0101 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + vlr_gsup_rx: now used by 2 (active-conn,vlr_gsup_rx) DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_HLR_LU_RES @@ -1983,58 +1998,13 @@ DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_INIT}: Received Event LU_COMPL_VLR_E_START DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_INIT}: state_chg to LU_COMPL_VLR_S_WAIT_SUB_PRES DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_WAIT_SUB_PRES}: Received Event LU_COMPL_VLR_E_SUB_PRES_COMPL -DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_WAIT_SUB_PRES}: state_chg to LU_COMPL_VLR_S_WAIT_IMEI -DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN encode: DTAP on GERAN-A -- DTAP --GERAN-A--> MS: GSM48_MT_MM_ID_REQ: 051802 -- DTAP matches expected message -DMSC dummy_msc_i(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST -DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A:LU){UPD_HLR_VLR_S_DONE}: Deallocated -DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - vlr_gsup_rx: now used by 1 (active-conn) -<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: vlr_gsupc_read_cb() returns 0 -- We will only do business when the IMEI is known - llist_count(&msub_list) == 1 -DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_no_authen_imeisv_imei: now used by 2 (active-conn,test_no_authen_imeisv_imei) -DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_no_authen_imeisv_imei: now used by 1 (active-conn) -msc_a_is_accepted() == false - requests shall be thwarted -DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode: DTAP -DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Dispatching 04.08 message: CC GSM48_MT_CC_SETUP -DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Message not permitted for initial conn: GSM48_MT_CC_SETUP -DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode error (rc=-13) for DTAP from MSC-I -DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode: DTAP -DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Dispatching 04.08 message: MM unknown 0x33 -DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Message not permitted for initial conn: unknown 0x33 -DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode error (rc=-13) for DTAP from MSC-I -DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode: DTAP -DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Dispatching 04.08 message: RR GSM48_MT_RR_SYSINFO_1 -DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Message not permitted for initial conn: GSM48_MT_RR_SYSINFO_1 -DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode error (rc=-13) for DTAP from MSC-I -DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode: DTAP -DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Dispatching 04.08 message: SMS SMS:0x01 -DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Message not permitted for initial conn: SMS:0x01 -DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode error (rc=-13) for DTAP from MSC-I -- MS replies with an Identity Response, VLR sends the IMEI to HLR - MSC <--GERAN-A-- MS: GSM48_MT_MM_ID_RESP -DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: + rx_from_ms: now used by 2 (lu,rx_from_ms) -DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode: DTAP -DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Dispatching 04.08 message: MM GSM48_MT_MM_ID_RESP -DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 -DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f0500807244332244332240a0101 -DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: - rx_from_ms: now used by 1 (lu) -- HLR accepts the IMEI -<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: 32010809710000004026f05101000a0101 -DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + vlr_gsup_rx: now used by 2 (active-conn,vlr_gsup_rx) -DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_HLR_IMEI_ACK -DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_WAIT_IMEI}: Received Event LU_COMPL_VLR_E_IMEI_CHECK_ACK - sending LU Accept for IMSI-901700000004620:MSISDN-46071:GERAN-A:LU DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + attached: now used by 3 (active-conn,vlr_gsup_rx,attached) -DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_WAIT_IMEI}: state_chg to LU_COMPL_VLR_S_DONE +DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_WAIT_SUB_PRES}: state_chg to LU_COMPL_VLR_S_DONE DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_LU_COMPL_SUCCESS -DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_DONE}: Terminating in cascade, depth 2 (cause = OSMO_FSM_TERM_PARENT, caused by: upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A:LU)) DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_DONE}: Removing from parent vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU) -DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_DONE}: Deallocated +DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_DONE}: Deferring: will deallocate with upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A:LU) DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_WAIT_LU_COMPL}: state_chg to VLR_ULA_S_DONE DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Received Event MSC_A_EV_AUTHENTICATED DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: state_chg to MSC_A_ST_AUTHENTICATED @@ -2049,9 +2019,9 @@ DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_RELEASING}: RAN encode: CLEAR_COMMAND on GERAN-A DMSC dummy_msc_i(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - msc_a_fsm_releasing_onenter: now used by 3 (active-conn,vlr_gsup_rx,attached) +DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A:LU){UPD_HLR_VLR_S_DONE}: Deallocated, including all deferred deallocations DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - vlr_gsup_rx: now used by 2 (active-conn,attached) -<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: vlr_gsupc_read_cb() returns 0 - bssap_clear_sent == 1 +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: vlr_gsupc_read_cb() returns 0 - LU was successful, and the conn has already been closed lu_result_sent == 1 DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_RELEASING}: RAN decode: CLEAR_COMPLETE @@ -2190,6 +2160,7 @@ DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=4234234234234275 DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: Received Event VLR_ULA_E_ID_IMEISV +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_ciph() @@ -2387,6 +2358,7 @@ DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=5234234234234276 DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=52342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: Received Event VLR_ULA_E_ID_IMEISV +DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:TMSI-0x03020100:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_ciph() @@ -2643,7 +2615,7 @@ DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_IMEISV DREF msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: - mm_rx_loc_upd_req: now used by 2 (rx_from_ms,lu) DREF msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: - rx_from_ms: now used by 1 (lu) -- MS replies with an Identity Response, causes LU to commence with a GSUP LU request to HLR +- MS replies with an Identity Response, causes an early GSUP Check IMEI request to HLR MSC <--GERAN-A-- MS: GSM48_MT_MM_ID_RESP DREF msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: + rx_from_ms: now used by 2 (lu,rx_from_ms) DBSSAP msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode: DTAP @@ -2652,22 +2624,31 @@ DVLR set IMEISV on subscriber; IMSI=901700000004620 IMEISV=4234234234234275 DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: Received Event VLR_ULA_E_ID_IMEISV -DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1() -DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_auth() -DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_post_ciph() -DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node_4() -DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: state_chg to VLR_ULA_S_WAIT_HLR_UPD +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: vlr_loc_upd_node1_pre() +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_IMEISV}: state_chg to VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY +GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f0500807244332244332240a0101 +DREF msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: - rx_from_ms: now used by 1 (lu) +- Subscriber has the IMEISV from the ID Response +DREF VLR subscr IMSI-901700000004620 + test_no_authen_imeisv_tmsi_imei: now used by 2 (active-conn,test_no_authen_imeisv_tmsi_imei) + strcmp(vsub->imeisv, "4234234234234275") == 0 +DREF VLR subscr IMSI-901700000004620 - test_no_authen_imeisv_tmsi_imei: now used by 1 (active-conn) +- HLR accepts the IMEI, VLR responds with LU Request +<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: 32010809710000004026f05101000a0101 +DREF VLR subscr IMSI-901700000004620 + vlr_gsup_rx: now used by 2 (active-conn,vlr_gsup_rx) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY}: Received Event VLR_ULA_E_HLR_IMEI_ACK +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY}: vlr_loc_upd_node1() +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY}: vlr_loc_upd_post_ciph() +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY}: vlr_loc_upd_node_4() +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_WAIT_HLR_CHECK_IMEI_EARLY}: state_chg to VLR_ULA_S_WAIT_HLR_UPD DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A:LU){UPD_HLR_VLR_S_INIT}: Allocated DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A:LU){UPD_HLR_VLR_S_INIT}: is child of vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU) DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A:LU){UPD_HLR_VLR_S_INIT}: Received Event UPD_HLR_VLR_E_START GSUP --> HLR: OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST: 04010809710000004026f02801020a0101 DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A:LU){UPD_HLR_VLR_S_INIT}: state_chg to UPD_HLR_VLR_S_WAIT_FOR_DATA -DREF msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: - rx_from_ms: now used by 1 (lu) +DREF VLR subscr IMSI-901700000004620 - vlr_gsup_rx: now used by 1 (active-conn) +<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: vlr_gsupc_read_cb() returns 0 lu_result_sent == 0 -- Subscriber has the IMEISV from the ID Response -DREF VLR subscr IMSI-901700000004620 + test_no_authen_imeisv_tmsi_imei: now used by 2 (active-conn,test_no_authen_imeisv_tmsi_imei) - strcmp(vsub->imeisv, "4234234234234275") == 0 -DREF VLR subscr IMSI-901700000004620 - test_no_authen_imeisv_tmsi_imei: now used by 1 (active-conn) - HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT <-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: 10010809710000004026f00804036470f10a0101 DREF VLR subscr IMSI-901700000004620 + vlr_gsup_rx: now used by 2 (active-conn,vlr_gsup_rx) @@ -2697,7 +2678,7 @@ DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Message not permitted for initial conn: SMS:0x01 DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode error (rc=-13) for DTAP from MSC-I lu_result_sent == 0 -- HLR also sends GSUP _UPDATE_LOCATION_RESULT, and we send an ID Request for the IMEI to the MS +- HLR also sends GSUP _UPDATE_LOCATION_RESULT <-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: 06010809710000004026f00a0101 DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + vlr_gsup_rx: now used by 2 (active-conn,vlr_gsup_rx) DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_HLR_LU_RES @@ -2712,57 +2693,13 @@ DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_INIT}: Received Event LU_COMPL_VLR_E_START DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_INIT}: state_chg to LU_COMPL_VLR_S_WAIT_SUB_PRES DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_WAIT_SUB_PRES}: Received Event LU_COMPL_VLR_E_SUB_PRES_COMPL -DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_WAIT_SUB_PRES}: state_chg to LU_COMPL_VLR_S_WAIT_IMEI_TMSI -DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN encode: DTAP on GERAN-A -- DTAP --GERAN-A--> MS: GSM48_MT_MM_ID_REQ: 051802 -- DTAP matches expected message -DMSC dummy_msc_i(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST -DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A:LU){UPD_HLR_VLR_S_DONE}: Deallocated -DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - vlr_gsup_rx: now used by 1 (active-conn) -<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: vlr_gsupc_read_cb() returns 0 -- We will only do business when the IMEI is known - llist_count(&msub_list) == 1 -DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + test_no_authen_imeisv_tmsi_imei: now used by 2 (active-conn,test_no_authen_imeisv_tmsi_imei) -DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - test_no_authen_imeisv_tmsi_imei: now used by 1 (active-conn) -msc_a_is_accepted() == false - requests shall be thwarted -DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode: DTAP -DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Dispatching 04.08 message: CC GSM48_MT_CC_SETUP -DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Message not permitted for initial conn: GSM48_MT_CC_SETUP -DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode error (rc=-13) for DTAP from MSC-I -DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode: DTAP -DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Dispatching 04.08 message: MM unknown 0x33 -DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Message not permitted for initial conn: unknown 0x33 -DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode error (rc=-13) for DTAP from MSC-I -DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode: DTAP -DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Dispatching 04.08 message: RR GSM48_MT_RR_SYSINFO_1 -DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Message not permitted for initial conn: GSM48_MT_RR_SYSINFO_1 -DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode error (rc=-13) for DTAP from MSC-I -DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode: DTAP -DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Dispatching 04.08 message: SMS SMS:0x01 -DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Message not permitted for initial conn: SMS:0x01 -DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode error (rc=-13) for DTAP from MSC-I -- MS replies with an Identity Response, VLR sends the IMEI to HLR - MSC <--GERAN-A-- MS: GSM48_MT_MM_ID_RESP -DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: + rx_from_ms: now used by 2 (lu,rx_from_ms) -DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN decode: DTAP -DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Dispatching 04.08 message: MM GSM48_MT_MM_ID_RESP -DMM IDENTITY RESPONSE: MI=IMEI-423423423423420 -DVLR set IMEI on subscriber; IMSI=901700000004620 IMEI=42342342342342 -DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_ID_IMEI -GSUP --> HLR: OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: 30010809710000004026f0500807244332244332240a0101 -DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: - rx_from_ms: now used by 1 (lu) -- HLR accepts the IMEI -<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: 32010809710000004026f05101000a0101 -DREF VLR subscr IMSI-901700000004620:MSISDN-46071 + vlr_gsup_rx: now used by 2 (active-conn,vlr_gsup_rx) -DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_HLR_IMEI_ACK -DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_WAIT_IMEI_TMSI}: Received Event LU_COMPL_VLR_E_IMEI_CHECK_ACK -DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_WAIT_IMEI_TMSI}: lu_compl_vlr_new_tmsi() +DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_WAIT_SUB_PRES}: lu_compl_vlr_new_tmsi() DVLR SUBSCR(IMSI-901700000004620:MSISDN-46071:TMSInew-0x03020100) VLR: update for IMSI=901700000004620 (MSISDN=46071) -DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_WAIT_IMEI_TMSI}: state_chg to LU_COMPL_VLR_S_WAIT_TMSI_CNF +DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_WAIT_SUB_PRES}: state_chg to LU_COMPL_VLR_S_WAIT_TMSI_CNF - sending LU Accept for IMSI-901700000004620:MSISDN-46071:TMSInew-0x03020100:GERAN-A:LU, with TMSI 0x03020100 +DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A:LU){UPD_HLR_VLR_S_DONE}: Deallocated DREF VLR subscr IMSI-901700000004620:MSISDN-46071:TMSInew-0x03020100 - vlr_gsup_rx: now used by 1 (active-conn) -<-- GSUP rx OSMO_GSUP_MSGT_CHECK_IMEI_RESULT: vlr_gsupc_read_cb() returns 0 +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: vlr_gsupc_read_cb() returns 0 - a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl llist_count(&msub_list) == 1 lu_result_sent == 1 @@ -2941,6 +2878,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() diff --git a/tests/msc_vlr/msc_vlr_test_reject_concurrency.err b/tests/msc_vlr/msc_vlr_test_reject_concurrency.err index 424fca6..e1df2db 100644 --- a/tests/msc_vlr/msc_vlr_test_reject_concurrency.err +++ b/tests/msc_vlr/msc_vlr_test_reject_concurrency.err @@ -30,6 +30,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -219,6 +220,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -359,6 +361,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -503,6 +506,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -645,6 +649,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -879,6 +884,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -1117,6 +1123,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -1340,6 +1347,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -1637,6 +1645,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -1957,6 +1966,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() diff --git a/tests/msc_vlr/msc_vlr_test_rest.err b/tests/msc_vlr/msc_vlr_test_rest.err index 1f37000..3990d10 100644 --- a/tests/msc_vlr/msc_vlr_test_rest.err +++ b/tests/msc_vlr/msc_vlr_test_rest.err @@ -95,6 +95,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -233,6 +234,7 @@ DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620:MSISDN-46071 - _lu_fsm_associate_vsub: now used by 2 (attached,active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -467,6 +469,7 @@ DVLR set IMSI on subscriber; IMSI=901700000004620 id=901700000004620 DVLR vlr_lu_fsm(TMSI-0x23422342:GERAN-A:LU){VLR_ULA_S_WAIT_IMSI}: Received Event VLR_ULA_E_ID_IMSI DVLR set IMSI on subscriber; IMSI=901700000004620 id=901700000004620 +DVLR vlr_lu_fsm(TMSI-0x23422342:GERAN-A:LU){VLR_ULA_S_WAIT_IMSI}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(TMSI-0x23422342:GERAN-A:LU){VLR_ULA_S_WAIT_IMSI}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(TMSI-0x23422342:GERAN-A:LU){VLR_ULA_S_WAIT_IMSI}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(TMSI-0x23422342:GERAN-A:LU){VLR_ULA_S_WAIT_IMSI}: vlr_loc_upd_post_ciph() diff --git a/tests/msc_vlr/msc_vlr_test_ss.err b/tests/msc_vlr/msc_vlr_test_ss.err index 333d275..976b263 100644 --- a/tests/msc_vlr/msc_vlr_test_ss.err +++ b/tests/msc_vlr/msc_vlr_test_ss.err @@ -30,6 +30,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() @@ -263,6 +264,7 @@ DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() diff --git a/tests/msc_vlr/msc_vlr_test_umts_authen.err b/tests/msc_vlr/msc_vlr_test_umts_authen.err index 2940b36..b11f077 100644 --- a/tests/msc_vlr/msc_vlr_test_umts_authen.err +++ b/tests/msc_vlr/msc_vlr_test_umts_authen.err @@ -30,6 +30,7 @@ DMSC msc_a(IMSI-901700000010650:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000010650:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -628,6 +629,7 @@ DMSC msc_a(IMSI-901700000010650:UTRAN-Iu:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000010650:UTRAN-Iu:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:UTRAN-Iu:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1257,6 +1259,7 @@ DMSC msc_a(IMSI-901700000010650:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000010650:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1488,6 +1491,7 @@ DMSC msc_a(IMSI-901700000010650:UTRAN-Iu:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000010650:UTRAN-Iu:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:UTRAN-Iu:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1731,6 +1735,7 @@ DMSC msc_a(IMSI-901700000010650:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000010650:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1848,6 +1853,7 @@ DMSC msc_a(IMSI-901700000010650:UTRAN-Iu:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000010650:UTRAN-Iu:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:UTRAN-Iu:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -1965,6 +1971,7 @@ DMSC msc_a(IMSI-901700000010650:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000010650:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -2082,6 +2089,7 @@ DMSC msc_a(IMSI-901700000010650:UTRAN-Iu:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000010650:UTRAN-Iu:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:UTRAN-Iu:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -2199,6 +2207,7 @@ DMSC msc_a(IMSI-901700000010650:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000010650:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:GERAN-A:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated @@ -2316,6 +2325,7 @@ DMSC msc_a(IMSI-901700000010650:UTRAN-Iu:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK DMSC msc_a(IMSI-901700000010650:UTRAN-Iu:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH DREF VLR subscr IMSI-901700000010650 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() DVLR vlr_lu_fsm(IMSI-901700000010650:UTRAN-Iu:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH DVLR VLR_Authenticate(IMSI-901700000010650:UTRAN-Iu:LU){VLR_SUB_AS_NEEDS_AUTH}: Allocated -- To view, visit https://gerrit.osmocom.org/13894 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I88283cad23793b475445d814ff49db534cb41244 Gerrit-Change-Number: 13894 Gerrit-PatchSet: 5 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 09:42:02 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 15 May 2019 09:42:02 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_11.c: properly handle MMTS indication In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/12059 ) Change subject: libmsc/gsm_04_11.c: properly handle MMTS indication ...................................................................... Patch Set 10: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/12059 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic46b04913b2e8cc5d11a39426dcc1bfe11f1d31e Gerrit-Change-Number: 12059 Gerrit-PatchSet: 10 Gerrit-Owner: Vadim Yanitskiy Gerrit-Assignee: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 15 May 2019 09:42:02 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 09:46:17 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 15 May 2019 09:46:17 +0000 Subject: Change in osmo-hlr[master]: Document subscribers create on demand feature In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13715 ) Change subject: Document subscribers create on demand feature ...................................................................... Patch Set 8: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13715 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2dd4a56f7b8be8b5d0e6fc32e04459e5e278d0a9 Gerrit-Change-Number: 13715 Gerrit-PatchSet: 8 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 15 May 2019 09:46:17 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 10:25:04 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 15 May 2019 10:25:04 +0000 Subject: Change in osmo-msc[master]: ran_peer: Move rx_reset_ack logic into its own func In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/14037 ) Change subject: ran_peer: Move rx_reset_ack logic into its own func ...................................................................... ran_peer: Move rx_reset_ack logic into its own func Later on we want to do extra steps upon receiving a Rx Reset Ack (checking for Osmux support from peer). Let's move handling of this message into its own function to have handling implementation in one place. Change-Id: I516c4baf6071d26f6c530726d93677bed968efd1 --- M src/libmsc/ran_peer.c 1 file changed, 6 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/libmsc/ran_peer.c b/src/libmsc/ran_peer.c index 40e26a2..35f2842 100644 --- a/src/libmsc/ran_peer.c +++ b/src/libmsc/ran_peer.c @@ -152,6 +152,11 @@ ran_peer_state_chg(rp, RAN_PEER_ST_READY); } +static void ran_peer_rx_reset_ack(struct ran_peer *rp) +{ + ran_peer_state_chg(rp, RAN_PEER_ST_READY); +} + void ran_peer_reset(struct ran_peer *rp) { struct msgb *reset; @@ -269,7 +274,7 @@ switch (event) { case RAN_PEER_EV_RX_RESET_ACK: - ran_peer_state_chg(rp, RAN_PEER_ST_READY); + ran_peer_rx_reset_ack(rp); return; case RAN_PEER_EV_MSG_UP_CO: -- To view, visit https://gerrit.osmocom.org/14037 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I516c4baf6071d26f6c530726d93677bed968efd1 Gerrit-Change-Number: 14037 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 10:51:26 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 15 May 2019 10:51:26 +0000 Subject: Change in osmo-msc[master]: bssap: Detect BSC Osmux support on RESET (ACK) recv In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14039 ) Change subject: bssap: Detect BSC Osmux support on RESET (ACK) recv ...................................................................... Patch Set 2: (2 comments) https://gerrit.osmocom.org/#/c/14039/2/src/libmsc/ran_peer.c File src/libmsc/ran_peer.c: https://gerrit.osmocom.org/#/c/14039/2/src/libmsc/ran_peer.c at 134 PS2, Line 134: msg->l3h > It probably makes sense to OSMO_ASSERT(msg) here, as we receive it from the FSM handlers. ACK https://gerrit.osmocom.org/#/c/14039/2/src/libmsc/ran_peer.c at 137 PS2, Line 137: Failed parsing TLV > Does it make sense to continue execution of this function in this case? Sure it does, we cannot assure osmux support is there in this case, so we should drop support for it towards this RAN. -- To view, visit https://gerrit.osmocom.org/14039 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If4f33da9b414ab194098755d2c5be85e1fce5d31 Gerrit-Change-Number: 14039 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Wed, 15 May 2019 10:51:26 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 10:53:50 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 15 May 2019 10:53:50 +0000 Subject: Change in osmo-msc[master]: vty: Add option to enable osmux towards BSCs In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14038 to look at the new patch set (#3). Change subject: vty: Add option to enable osmux towards BSCs ...................................................................... vty: Add option to enable osmux towards BSCs Change-Id: I6de1be0322ddbdc115074ebb6be2598ebf6c95db --- M include/osmocom/msc/Makefile.am M include/osmocom/msc/gsm_data.h A include/osmocom/msc/osmux.h M src/libmsc/msc_vty.c M tests/test_nodes.vty 5 files changed, 40 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/38/14038/3 -- To view, visit https://gerrit.osmocom.org/14038 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6de1be0322ddbdc115074ebb6be2598ebf6c95db Gerrit-Change-Number: 14038 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 10:53:50 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 15 May 2019 10:53:50 +0000 Subject: Change in osmo-msc[master]: bssap: Detect BSC Osmux support on RESET (ACK) recv In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14039 to look at the new patch set (#3). Change subject: bssap: Detect BSC Osmux support on RESET (ACK) recv ...................................................................... bssap: Detect BSC Osmux support on RESET (ACK) recv Related: OS#2551 Depends: libosmocore.git I28f83e2e32b9533c99e65ccc1562900ac2aec74e Change-Id: If4f33da9b414ab194098755d2c5be85e1fce5d31 --- M include/osmocom/msc/ran_peer.h M src/libmsc/ran_peer.c 2 files changed, 45 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/39/14039/3 -- To view, visit https://gerrit.osmocom.org/14039 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: If4f33da9b414ab194098755d2c5be85e1fce5d31 Gerrit-Change-Number: 14039 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 11:21:32 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 15 May 2019 11:21:32 +0000 Subject: Change in osmo-msc[master]: transaction: accept trans_type enum in trans_log_subsys() In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13974 to look at the new patch set (#4). Change subject: transaction: accept trans_type enum in trans_log_subsys() ...................................................................... transaction: accept trans_type enum in trans_log_subsys() Change-Id: I3c373d20ebd6e96ebd57f84b74dc15a6b69c03ac --- M include/osmocom/msc/transaction.h M src/libmsc/transaction.c 2 files changed, 6 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/74/13974/4 -- To view, visit https://gerrit.osmocom.org/13974 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3c373d20ebd6e96ebd57f84b74dc15a6b69c03ac Gerrit-Change-Number: 13974 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Assignee: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-CC: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 12:46:23 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 12:46:23 +0000 Subject: Change in osmo-ci[master]: Fix oc2g poky SDK installation Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14049 Change subject: Fix oc2g poky SDK installation ...................................................................... Fix oc2g poky SDK installation It's poky_installer_file, not poky_install_file. Also, don't mandate a version from april that's no longer on downloads.sysmocom.de. This was broken since Change-Id I35f34a089311808cb21a064dd50e41cd1887b320 Change-Id: If3adf078fd89b9d0c5151cdbf745123df34bbaba --- M ansible/roles/install-poky-sdk/README.md M ansible/setup-jenkins-slave.yml 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/49/14049/1 diff --git a/ansible/roles/install-poky-sdk/README.md b/ansible/roles/install-poky-sdk/README.md index 7f2c31e..dc2fe7e 100644 --- a/ansible/roles/install-poky-sdk/README.md +++ b/ansible/roles/install-poky-sdk/README.md @@ -10,7 +10,7 @@ ``` - name: install-poky-sdk jenkins_user: osmocom-build - poky_install_file: poky-glibc-x86_64-meta-toolchain-osmo-cortexa15hf-neon-toolchain-osmo-2.3.4-20190426050512.sh + poky_installer_file: poky-glibc-x86_64-meta-toolchain-osmo-cortexa15hf-neon-toolchain-osmo-2.3.4-20190426050512.sh poky_dest: /opt/poky-sdk/2.3.4/ tags: - poky diff --git a/ansible/setup-jenkins-slave.yml b/ansible/setup-jenkins-slave.yml index 1135ab2..39e6f77 100644 --- a/ansible/setup-jenkins-slave.yml +++ b/ansible/setup-jenkins-slave.yml @@ -21,7 +21,7 @@ - name: install-poky-sdk jenkins_user: osmocom-build - poky_install_file: poky-glibc-x86_64-meta-toolchain-osmo-cortexa15hf-neon-toolchain-osmo-2.3.4-20190426050512.sh + poky_installer_file: poky-glibc-x86_64-meta-toolchain-osmo-cortexa15hf-neon-toolchain-osmo-2.3.4.sh poky_dest: /opt/poky-oc2g/2.3.4/ tags: - poky -- To view, visit https://gerrit.osmocom.org/14049 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If3adf078fd89b9d0c5151cdbf745123df34bbaba Gerrit-Change-Number: 14049 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 12:47:49 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 12:47:49 +0000 Subject: Change in osmo-ci[master]: Fix oc2g poky SDK installation In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14049 ) Change subject: Fix oc2g poky SDK installation ...................................................................... Patch Set 1: Verified+1 I wonder how that bug ever could get V+1 -- To view, visit https://gerrit.osmocom.org/14049 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If3adf078fd89b9d0c5151cdbf745123df34bbaba Gerrit-Change-Number: 14049 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Wed, 15 May 2019 12:47:49 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 12:48:25 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 15 May 2019 12:48:25 +0000 Subject: Change in osmo-ci[master]: Fix oc2g poky SDK installation In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14049 ) Change subject: Fix oc2g poky SDK installation ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14049 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If3adf078fd89b9d0c5151cdbf745123df34bbaba Gerrit-Change-Number: 14049 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Wed, 15 May 2019 12:48:25 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 12:49:22 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 12:49:22 +0000 Subject: Change in osmo-msc[master]: transaction: accept trans_type enum in trans_log_subsys() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13974 ) Change subject: transaction: accept trans_type enum in trans_log_subsys() ...................................................................... Patch Set 5: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/13974/5//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/#/c/13974/5//COMMIT_MSG at 7 PS5, Line 7: transaction: accept trans_type enum in trans_log_subsys() would be good to state why -- To view, visit https://gerrit.osmocom.org/13974 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I3c373d20ebd6e96ebd57f84b74dc15a6b69c03ac Gerrit-Change-Number: 13974 Gerrit-PatchSet: 5 Gerrit-Owner: Vadim Yanitskiy Gerrit-Assignee: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Comment-Date: Wed, 15 May 2019 12:49:22 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 12:50:11 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 12:50:11 +0000 Subject: Change in docker-playground[master]: mgw: Enable osmux in osmo-mgw.cfg In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14047 ) Change subject: mgw: Enable osmux in osmo-mgw.cfg ...................................................................... Patch Set 1: Code-Review-1 how will this not break 'latest' tests? -- To view, visit https://gerrit.osmocom.org/14047 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic380b4cfff8be3cbab95a376ca5eabdb8d682477 Gerrit-Change-Number: 14047 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Wed, 15 May 2019 12:50:11 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 12:55:39 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 15 May 2019 12:55:39 +0000 Subject: Change in docker-playground[master]: mgw: Enable osmux in osmo-mgw.cfg In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14047 ) Change subject: mgw: Enable osmux in osmo-mgw.cfg ...................................................................... Patch Set 1: > how will this not break 'latest' tests? So what'd you propose here? I can think of: * Adding some bits to use a different osmo-mgw.cfg in latest and master * Calling "osmux on" and "osmux off" for each test during f_init() what sounds better to you? -- To view, visit https://gerrit.osmocom.org/14047 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic380b4cfff8be3cbab95a376ca5eabdb8d682477 Gerrit-Change-Number: 14047 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 15 May 2019 12:55:39 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 12:59:37 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 12:59:37 +0000 Subject: Change in osmo-bsc[master]: Make sure to default to AMR octet-aligned mode Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14050 Change subject: Make sure to default to AMR octet-aligned mode ...................................................................... Make sure to default to AMR octet-aligned mode In Change-Id If6d40b2407b87aad2227ea7f15533ef01a3771b3 we introduced the support for both octet-aligned and bandwidth-efficient mode, and added a related VTY option about it. However, we accidentially also changed the default behavior. Without any explicit configuration, we should behave just like we behaved all those years before: Continue with octet-aligned mode. Change-Id: I8b6fd8bec05b35d84ad16275d84f9d363e238d2b Closes: OS#4002 --- M src/osmo-bsc/osmo_bsc_msc.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/50/14050/1 diff --git a/src/osmo-bsc/osmo_bsc_msc.c b/src/osmo-bsc/osmo_bsc_msc.c index 4df1ce4..6a6b1a9 100644 --- a/src/osmo-bsc/osmo_bsc_msc.c +++ b/src/osmo-bsc/osmo_bsc_msc.c @@ -94,6 +94,7 @@ /* Defaults for the audio setup */ msc_data->amr_conf.m5_90 = 1; + msc_data->amr_octet_aligned = true; /* Allow the full set of possible codecs by default */ msc_data->audio_length = 5; -- To view, visit https://gerrit.osmocom.org/14050 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I8b6fd8bec05b35d84ad16275d84f9d363e238d2b Gerrit-Change-Number: 14050 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 13:02:35 2019 From: gerrit-no-reply at lists.osmocom.org (tnt) Date: Wed, 15 May 2019 13:02:35 +0000 Subject: Change in osmo-bsc[master]: Make sure to default to AMR octet-aligned mode In-Reply-To: References: Message-ID: tnt has posted comments on this change. ( https://gerrit.osmocom.org/14050 ) Change subject: Make sure to default to AMR octet-aligned mode ...................................................................... Patch Set 1: Code-Review+1 lgtm. Also tested the patch and works. -- To view, visit https://gerrit.osmocom.org/14050 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8b6fd8bec05b35d84ad16275d84f9d363e238d2b Gerrit-Change-Number: 14050 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: tnt Gerrit-CC: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 15 May 2019 13:02:35 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 14:23:35 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 15 May 2019 14:23:35 +0000 Subject: Change in osmo-bsc[master]: Make sure to default to AMR octet-aligned mode In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14050 ) Change subject: Make sure to default to AMR octet-aligned mode ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14050 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8b6fd8bec05b35d84ad16275d84f9d363e238d2b Gerrit-Change-Number: 14050 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-Comment-Date: Wed, 15 May 2019 14:23:35 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 14:33:00 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 15 May 2019 14:33:00 +0000 Subject: Change in osmo-bsc[master]: Make sure to default to AMR octet-aligned mode In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14050 ) Change subject: Make sure to default to AMR octet-aligned mode ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14050 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8b6fd8bec05b35d84ad16275d84f9d363e238d2b Gerrit-Change-Number: 14050 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-Comment-Date: Wed, 15 May 2019 14:33:00 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 15:42:34 2019 From: gerrit-no-reply at lists.osmocom.org (tnt) Date: Wed, 15 May 2019 15:42:34 +0000 Subject: Change in libosmocore[master]: codec/ecu: Add a bit of precision about the actual frame format used Message-ID: tnt has uploaded this change for review. ( https://gerrit.osmocom.org/14051 Change subject: codec/ecu: Add a bit of precision about the actual frame format used ...................................................................... codec/ecu: Add a bit of precision about the actual frame format used Change-Id: I9620088e449c31e966ecb9ec5ddf283b949c5a4a Signed-off-by: Sylvain Munaut --- M src/codec/ecu_fr.c 1 file changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/51/14051/1 diff --git a/src/codec/ecu_fr.c b/src/codec/ecu_fr.c index 784a5b8..20a0f89 100644 --- a/src/codec/ecu_fr.c +++ b/src/codec/ecu_fr.c @@ -123,10 +123,12 @@ return rc; } -/** +/*! * To be called when a good frame is received. * This function will then create a backup of the frame * and reset the internal state. + * \param[in] state The state object for the ECU + * \param[out] frame The valid frame (GSM_FR_BYTES bytes in RTP payload format) */ void osmo_ecu_fr_reset(struct osmo_ecu_fr_state *state, uint8_t *frame) { @@ -134,10 +136,13 @@ memcpy(state->frame_backup, frame, GSM_FR_BYTES); } -/** +/*! * To be called when a bad frame is received. * This function will then generate a replacement frame * that can be used to conceal the dropout. + * \param[in] state The state object for the ECU + * \param[out] frame The buffer to fill with GSM_FR_BYTES of replacement frame + * \returns 0 if the frame was sucessfully filled */ int osmo_ecu_fr_conceal(struct osmo_ecu_fr_state *state, uint8_t *frame) { -- To view, visit https://gerrit.osmocom.org/14051 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I9620088e449c31e966ecb9ec5ddf283b949c5a4a Gerrit-Change-Number: 14051 Gerrit-PatchSet: 1 Gerrit-Owner: tnt -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 16:48:34 2019 From: gerrit-no-reply at lists.osmocom.org (Daniel Willmann) Date: Wed, 15 May 2019 16:48:34 +0000 Subject: Change in osmo-msc[master]: remove msc specific db counters In-Reply-To: References: Message-ID: Daniel Willmann has posted comments on this change. ( https://gerrit.osmocom.org/13800 ) Change subject: remove msc specific db counters ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13800 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id64f1839a55b5326f74ec04b7a5dbed9d269b89c Gerrit-Change-Number: 13800 Gerrit-PatchSet: 3 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Wed, 15 May 2019 16:48:34 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 17:16:16 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 15 May 2019 17:16:16 +0000 Subject: Change in libosmocore[master]: codec/ecu: Add a bit of precision about the actual frame format used In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14051 ) Change subject: codec/ecu: Add a bit of precision about the actual frame format used ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14051 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9620088e449c31e966ecb9ec5ddf283b949c5a4a Gerrit-Change-Number: 14051 Gerrit-PatchSet: 1 Gerrit-Owner: tnt Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Wed, 15 May 2019 17:16:16 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 17:25:14 2019 From: gerrit-no-reply at lists.osmocom.org (tnt) Date: Wed, 15 May 2019 17:25:14 +0000 Subject: Change in libosmocore[master]: codec/ecu: Add a bit of precision about the actual frame format used In-Reply-To: References: Message-ID: tnt has submitted this change and it was merged. ( https://gerrit.osmocom.org/14051 ) Change subject: codec/ecu: Add a bit of precision about the actual frame format used ...................................................................... codec/ecu: Add a bit of precision about the actual frame format used Change-Id: I9620088e449c31e966ecb9ec5ddf283b949c5a4a Signed-off-by: Sylvain Munaut --- M src/codec/ecu_fr.c 1 file changed, 7 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, approved diff --git a/src/codec/ecu_fr.c b/src/codec/ecu_fr.c index 784a5b8..20a0f89 100644 --- a/src/codec/ecu_fr.c +++ b/src/codec/ecu_fr.c @@ -123,10 +123,12 @@ return rc; } -/** +/*! * To be called when a good frame is received. * This function will then create a backup of the frame * and reset the internal state. + * \param[in] state The state object for the ECU + * \param[out] frame The valid frame (GSM_FR_BYTES bytes in RTP payload format) */ void osmo_ecu_fr_reset(struct osmo_ecu_fr_state *state, uint8_t *frame) { @@ -134,10 +136,13 @@ memcpy(state->frame_backup, frame, GSM_FR_BYTES); } -/** +/*! * To be called when a bad frame is received. * This function will then generate a replacement frame * that can be used to conceal the dropout. + * \param[in] state The state object for the ECU + * \param[out] frame The buffer to fill with GSM_FR_BYTES of replacement frame + * \returns 0 if the frame was sucessfully filled */ int osmo_ecu_fr_conceal(struct osmo_ecu_fr_state *state, uint8_t *frame) { -- To view, visit https://gerrit.osmocom.org/14051 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I9620088e449c31e966ecb9ec5ddf283b949c5a4a Gerrit-Change-Number: 14051 Gerrit-PatchSet: 1 Gerrit-Owner: tnt Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 17:56:21 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 17:56:21 +0000 Subject: Change in osmo-ccid-firmware[master]: CICD: Add ccid_proto.c with value_string of important enumerations Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14052 Change subject: CICD: Add ccid_proto.c with value_string of important enumerations ...................................................................... CICD: Add ccid_proto.c with value_string of important enumerations Change-Id: Idc6b3d2f0a22db3a57f0c05d96c776e92b718b07 --- M ccid/Makefile A ccid/ccid_proto.c M ccid/ccid_proto.h 3 files changed, 77 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/52/14052/1 diff --git a/ccid/Makefile b/ccid/Makefile index 34df8c9..a259c90 100644 --- a/ccid/Makefile +++ b/ccid/Makefile @@ -1,6 +1,6 @@ -ccid_descriptors: ccid_descriptors.o +ccid_descriptors: ccid_descriptors.o ccid_proto.o $(CC) -lasan -losmocore -laio -o $@ $^ %.o: %.c diff --git a/ccid/ccid_proto.c b/ccid/ccid_proto.c new file mode 100644 index 0000000..9275cf2 --- /dev/null +++ b/ccid/ccid_proto.c @@ -0,0 +1,67 @@ +#include +#include "ccid_proto.h" + +const struct value_string ccid_msg_type_vals[] = { + OSMO_VALUE_STRING(RDR_to_PC_NotifySlotChange), + OSMO_VALUE_STRING(RDR_to_PC_HardwareError), + OSMO_VALUE_STRING(PC_to_RDR_IccPowerOn), + OSMO_VALUE_STRING(PC_to_RDR_IccPowerOff), + OSMO_VALUE_STRING(PC_to_RDR_GetSlotStatus), + OSMO_VALUE_STRING(PC_to_RDR_XfrBlock), + OSMO_VALUE_STRING(PC_to_RDR_GetParameters), + OSMO_VALUE_STRING(PC_to_RDR_ResetParameters), + OSMO_VALUE_STRING(PC_to_RDR_SetParameters), + OSMO_VALUE_STRING(PC_to_RDR_Escape), + OSMO_VALUE_STRING(PC_to_RDR_IccClock), + OSMO_VALUE_STRING(PC_to_RDR_T0APDU), + OSMO_VALUE_STRING(PC_to_RDR_Secure), + OSMO_VALUE_STRING(PC_to_RDR_Mechanical), + OSMO_VALUE_STRING(PC_to_RDR_Abort), + OSMO_VALUE_STRING(PC_to_RDR_SetDataRateAndClockFrequency), + OSMO_VALUE_STRING(RDR_to_PC_DataBlock), + OSMO_VALUE_STRING(RDR_to_PC_SlotStatus), + OSMO_VALUE_STRING(RDR_to_PC_Escape), + OSMO_VALUE_STRING(RDR_to_PC_DataRateAndClockFrequency), + { 0, NULL } +}; + +const struct value_string ccid_class_spec_req_vals[] = { + { CLASS_SPEC_CCID_ABORT, "CCID_ABORT" }, + { CLASS_SPEC_CCID_GET_CLOCK_FREQ, "GET_CLOCK_FREQ" }, + { CLASS_SPEC_CCID_GET_DATA_RATES, "GET_DATA_RATES" }, + { 0, NULL } +}; + +const struct value_string ccid_power_select_vals[] = { + { CCID_PWRSEL_AUTO, "AUTO" }, + { CCID_PWRSEL_5V0, "5.0V" }, + { CCID_PWRSEL_3V0, "3.0V" }, + { CCID_PWRSEL_1V8, "1.8V" }, + { 0, NULL } +}; + +const struct value_string ccid_clock_command_vals[] = { + { CCID_CLOCK_CMD_RESTART, "RESTART" }, + { CCID_CLOCK_CMD_STOP, "STOP" }, + { 0, NULL } +}; + +const struct value_string ccid_error_code_vals[] = { + { CCID_ERR_CMD_ABORTED, "CMD_ABORTED" }, + { CCID_ERR_ICC_MUTE, "ICC_MUTE" }, + { CCID_ERR_XFR_PARITY_ERROR, "XFR_PARITY_ERROR" }, + { CCID_ERR_XFR_OVERRUN, "XFR_OVERRUN" }, + { CCID_ERR_HW_ERROR, "HW_ERROR" }, + { CCID_ERR_BAD_ATR_TS, "BAD_ATR_TS" }, + { CCID_ERR_BAD_ATR_TCK, "BAD_ATR_TCK" }, + { CCID_ERR_ICC_PROTOCOL_NOT_SUPPORTED, "ICC_PROTOCOL_NOT_SUPPORTED" }, + { CCID_ERR_ICC_CLASS_NOT_SUPPORTED, "ICC_CLASS_NOT_SUPPORTED" }, + { CCID_ERR_PROCEDURE_BYTE_CONFLICT, "PROCEDURE_BYTE_CONFLICT" }, + { CCID_ERR_DEACTIVATED_PROTOCOL, "DEACTIVATED_PROTOCOL" }, + { CCID_ERR_BUSY_WITH_AUTO_SEQUENCE, "BUSY_WITH_AUTO_SEQUENCE" }, + { CCID_ERR_PIN_TIMEOUT, "PIN_TIMEOUT" }, + { CCID_ERR_PIN_CANCELLED, "PIN_CANCELLED" }, + { CCID_ERR_CMD_SLOT_BUSY, "CMD_SLOT_BUSY" }, + { CCID_ERR_CMD_NOT_SUPPORTED, "CMD_NOT_SUPPORTED" }, + { 0, NULL } +}; diff --git a/ccid/ccid_proto.h b/ccid/ccid_proto.h index 470416c..e10be8a 100644 --- a/ccid/ccid_proto.h +++ b/ccid/ccid_proto.h @@ -1,5 +1,6 @@ #pragma once #include +#include /* Identifies the length of type of subordinate descriptors of a CCID device * Table 5.1-1 Smart Card Device Class descriptors */ @@ -372,3 +373,11 @@ struct ccid_rdr_to_pc_notify_slot_change slot_change; struct ccid_rdr_to_pc_hardware_error hw_error; }; + + +extern const struct value_string ccid_msg_type_vals[]; +extern const struct value_string ccid_class_spec_req_vals[]; +extern const struct value_string ccid_power_select_vals[]; +extern const struct value_string ccid_clock_command_vals[]; +extern const struct value_string ccid_error_code_vals[]; + -- To view, visit https://gerrit.osmocom.org/14052 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Idc6b3d2f0a22db3a57f0c05d96c776e92b718b07 Gerrit-Change-Number: 14052 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 17:56:21 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 17:56:21 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid_proto: Fix ccid_rdr_to_pc_{data_rate_and_clock, escape} Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14053 Change subject: ccid_proto: Fix ccid_rdr_to_pc_{data_rate_and_clock,escape} ...................................................................... ccid_proto: Fix ccid_rdr_to_pc_{data_rate_and_clock,escape} Both use 'struct ccid_header_in', not 'struct ccid_header'. Change-Id: I0e370da11a0c95d0ea4a517aa6060f16e21adef0 --- M ccid/ccid_proto.h 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/53/14053/1 diff --git a/ccid/ccid_proto.h b/ccid/ccid_proto.h index e10be8a..fa0ead1 100644 --- a/ccid/ccid_proto.h +++ b/ccid/ccid_proto.h @@ -303,14 +303,14 @@ /* Section 6.2.4 RDR_to_PC_Escape */ struct ccid_rdr_to_pc_escape { - struct ccid_header hdr; + struct ccid_header_in hdr; uint8_t bRFU; uint8_t abData[0]; } __attribute__ ((packed)); /* Section 6.2.5 RDR_to_PC_DataRateAndClockFrequency */ struct ccid_rdr_to_pc_data_rate_and_clock { - struct ccid_header hdr; + struct ccid_header_in hdr; uint8_t bRFU; uint32_t dwClockFrequency; uint32_t dwDataRate; -- To view, visit https://gerrit.osmocom.org/14053 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I0e370da11a0c95d0ea4a517aa6060f16e21adef0 Gerrit-Change-Number: 14053 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 17:56:21 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 17:56:21 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid_device: Make it compile Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14054 Change subject: ccid_device: Make it compile ...................................................................... ccid_device: Make it compile Change-Id: I0350fec36eeef69eeccb873f547c9df8b364ae12 --- M ccid/ccid_device.c 1 file changed, 47 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/54/14054/1 diff --git a/ccid/ccid_device.c b/ccid/ccid_device.c index c81f177..f10b700 100644 --- a/ccid/ccid_device.c +++ b/ccid/ccid_device.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include @@ -19,7 +20,7 @@ }; struct ccid_ops { - int (*send)(struct ccid_instance *ci, struct msgb *msg); + int (*send_in)(struct ccid_instance *ci, struct msgb *msg); }; struct ccid_instance { @@ -35,7 +36,7 @@ if (slot_nr >= sizeof(ci->slot)) return NULL; else - return &ci->slot[slot_nr] + return &ci->slot[slot_nr]; } static uint8_t get_icc_status(const struct ccid_slot *cs) @@ -67,7 +68,7 @@ static struct msgb *ccid_msgb_alloc(void) { - struct msgb *msg = msgb_alloc("ccid"); + struct msgb *msg = msgb_alloc(512, "ccid"); OSMO_ASSERT(msg); return msg; } @@ -79,10 +80,10 @@ static int ccid_slot_send(struct ccid_slot *cs, struct msgb *msg) { - const struct ccid_header *ch = (const struct ccid_header *) msgb_ccid_in(msg); + struct ccid_header *ch = (struct ccid_header *) msgb_ccid_in(msg); /* patch bSlotNr into message */ - ch->hdr.bSlot = cs->slot_nr; + ch->bSlot = cs->slot_nr; return ccid_send(cs->ci, msg); } @@ -93,11 +94,12 @@ uint32_t data_len) { struct msgb *msg = ccid_msgb_alloc(); - struct ccid_rdr_to_pc_data_block *db = msgb_put(msg, sizeof(*db) + data_len); + struct ccid_rdr_to_pc_data_block *db = + (struct ccid_rdr_to_pc_data_block *) msgb_put(msg, sizeof(*db) + data_len); uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | get_icc_status(cs); SET_HDR_IN(db, RDR_to_PC_DataBlock, cs->slot_nr, seq, sts, err); - db->hdr.dwLength = cpu_to_le32(data_len); + osmo_store32le(data_len, &db->hdr.hdr.dwLength); memcpy(db->abData, data, data_len); return msg; } @@ -107,7 +109,8 @@ enum ccid_error_code err) { struct msgb *msg = ccid_msgb_alloc(); - struct ccid_rdr_to_pc_slot_status *ss = msgb_put(msg, sizeof(*ss)); + struct ccid_rdr_to_pc_slot_status *ss = + (struct ccid_rdr_to_pc_slot_status *) msgb_put(msg, sizeof(*ss)); uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | get_icc_status(cs); SET_HDR_IN(ss, RDR_to_PC_SlotStatus, cs->slot_nr, seq, sts, err); @@ -123,11 +126,12 @@ uint32_t data_len) { struct msgb *msg = ccid_msgb_alloc(); - struct ccid_rdr_to_pc_escape *esc = msgb_put(msg, sizeof(*esc) + data_len); + struct ccid_rdr_to_pc_escape *esc = + (struct ccid_rdr_to_pc_escape *) msgb_put(msg, sizeof(*esc) + data_len); uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | get_icc_status(cs); SET_HDR_IN(esc, RDR_to_PC_Escape, cs->slot_nr, seq, sts, err); - esc->hdr.dwLength = cpu_to_le32(data_len); + osmo_store32le(data_len, &esc->hdr.hdr.dwLength); memcpy(esc->abData, data, data_len); return msg; } @@ -137,13 +141,14 @@ enum ccid_error_code err, uint32_t clock_khz, uint32_t rate_bps) { struct msgb *msg = ccid_msgb_alloc(); - struct ccid_rdr_to_pc_data_rate_and_clock *drc = msgb_put(msg, sizeof(*drc)); + struct ccid_rdr_to_pc_data_rate_and_clock *drc = + (struct ccid_rdr_to_pc_data_rate_and_clock *) msgb_put(msg, sizeof(*drc)); uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | get_icc_status(cs); SET_HDR_IN(drc, RDR_to_PC_DataRateAndClockFrequency, cs->slot_nr, seq, sts, err); - drc->dwLength = cpu_to_le32(8); /* Message-specific data length (wtf?) */ - drc->dwClockFrequency = cpu_to_le32(clock_khz); /* kHz */ - drc->dwDataRate = cpu_to_le32(rate_bps); /* bps */ + osmo_store32le(8, &drc->hdr.hdr.dwLength); /* Message-specific data length (wtf?) */ + osmo_store32le(clock_khz, &drc->dwClockFrequency); /* kHz */ + osmo_store32le(rate_bps, &drc->dwDataRate); /* bps */ return msg; } @@ -181,7 +186,7 @@ /* TODO: send actual ATR; handle error cases */ /* TODO: handle this asynchronously */ - resp = ccid_gen_data_block(cs, u->icc_power_on.hdr.hSeq, CCID_CMD_STATUS_OK, 0, NULL, 0); + resp = ccid_gen_data_block(cs, u->icc_power_on.hdr.bSeq, CCID_CMD_STATUS_OK, 0, NULL, 0); return ccid_send(cs->ci, resp); } @@ -190,6 +195,8 @@ static int ccid_handle_icc_power_off(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + struct msgb *resp; + resp = ccid_gen_slot_status(cs, u->get_slot_status.hdr.bSeq, CCID_CMD_STATUS_OK, 0); return ccid_send(cs->ci, resp); } @@ -198,7 +205,9 @@ static int ccid_handle_xfr_block(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); - resp = ccid_gen_data_block(cs, u->icc_power_on.hdr.hSeq, CCID_CMD_STATUS_OK, 0, NULL, 0); + struct msgb *resp; + + resp = ccid_gen_data_block(cs, u->icc_power_on.hdr.bSeq, CCID_CMD_STATUS_OK, 0, NULL, 0); return ccid_send(cs->ci, resp); } @@ -206,30 +215,36 @@ static int ccid_handle_get_parameters(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + struct msgb *resp; } /* Section 6.1.6 */ static int ccid_handle_reset_parameters(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + struct msgb *resp; } /* Section 6.1.7 */ static int ccid_handle_set_parameters(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + struct msgb *resp; } /* Section 6.1.8 */ static int ccid_handle_escape(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + struct msgb *resp; } /* Section 6.1.9 */ static int ccid_handle_icc_clock(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + struct msgb *resp; + resp = ccid_gen_slot_status(cs, u->get_slot_status.hdr.bSeq, CCID_CMD_STATUS_OK, 0); return ccid_send(cs->ci, resp); } @@ -238,6 +253,8 @@ static int ccid_handle_t0apdu(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + struct msgb *resp; + resp = ccid_gen_slot_status(cs, u->get_slot_status.hdr.bSeq, CCID_CMD_STATUS_OK, 0); return ccid_send(cs->ci, resp); } @@ -252,6 +269,8 @@ static int ccid_handle_mechanical(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + struct msgb *resp; + resp = ccid_gen_slot_status(cs, u->get_slot_status.hdr.bSeq, CCID_CMD_STATUS_OK, 0); return ccid_send(cs->ci, resp); } @@ -260,6 +279,8 @@ static int ccid_handle_abort(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + struct msgb *resp; + resp = ccid_gen_slot_status(cs, u->get_slot_status.hdr.bSeq, CCID_CMD_STATUS_OK, 0); return ccid_send(cs->ci, resp); } @@ -267,7 +288,8 @@ /* Section 6.1.14 */ static int ccid_handle_set_rate_and_clock(struct ccid_slot *cs, struct msgb *msg) { - const union ccid_pc_to_rdr *u = msgb_ccid(msg); + const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + struct msgb *resp; } /* handle data arriving from the host on the OUT endpoint */ @@ -277,13 +299,14 @@ const struct ccid_header *ch = (const struct ccid_header *) u; unsigned int len = msgb_length(msg); struct ccid_slot *cs; + int rc; if (len < sizeof(*ch)) { /* FIXME */ return -1; } - cs = get_ccid_slot(ci, ch->hdr.bSlot); + cs = get_ccid_slot(ci, ch->bSlot); if (!cs) { /* FIXME */ return -1; @@ -338,7 +361,7 @@ case PC_to_RDR_T0APDU: if (len != /*FIXME*/ sizeof(u->t0apdu)) goto short_msg; - rc = ccid_handle_t0_apdu(cs, msg); + rc = ccid_handle_t0apdu(cs, msg); break; case PC_to_RDR_Secure: if (len < sizeof(u->secure)) @@ -361,10 +384,12 @@ rc = ccid_handle_set_rate_and_clock(cs, msg); break; default: - FIXME + /* FIXME */ break; } - FIXME + return 0; + short_msg: - FIXME + /* FIXME */ + return -1; } -- To view, visit https://gerrit.osmocom.org/14054 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I0350fec36eeef69eeccb873f547c9df8b364ae12 Gerrit-Change-Number: 14054 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 17:56:22 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 17:56:22 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid_device: Return errors in case of invalid slot numbers Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14055 Change subject: ccid_device: Return errors in case of invalid slot numbers ...................................................................... ccid_device: Return errors in case of invalid slot numbers Change-Id: I4928425cc114c7af0068b13280fe89f428f44aab --- M ccid/ccid_device.c 1 file changed, 282 insertions(+), 49 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/55/14055/1 diff --git a/ccid/ccid_device.c b/ccid/ccid_device.c index f10b700..340ff60 100644 --- a/ccid/ccid_device.c +++ b/ccid/ccid_device.c @@ -17,6 +17,7 @@ bool icc_present; bool icc_powered; bool icc_in_reset; + bool cmd_busy; }; struct ccid_ops { @@ -26,11 +27,16 @@ struct ccid_instance { struct ccid_slot slot[NR_SLOTS]; struct ccid_ops ops; + const char *name; }; #define msgb_ccid_out(x) (union ccid_pc_to_rdr *)msgb_data(x) #define msgb_ccid_in(x) (union ccid_rdr_to_pc *)msgb_data(x) +#define LOGPCI(ci, lvl, fmt, args ...) LOGP(DCCID, lvl, "%s: " fmt, (ci)->name, ## args) +#define LOGPCS(cs, lvl, fmt, args ...) \ + LOGP(DCCID, lvl, "%s(%u): " fmt, (cc)->ci->name, (cc)->slot_nr, ## args) + static struct ccid_slot *get_ccid_slot(struct ccid_instance *ci, uint8_t slot_nr) { if (slot_nr >= sizeof(ci->slot)) @@ -62,6 +68,14 @@ (x)->hdr.bError = error; \ } while (0) +#if 0 +static uint8_t ccid_pc_to_rdr_get_seq(const struct ccid_pc_to_rdr *u) +{ + const struct ccid_header *ch = (const struct ccid_header *) u; + return ch->bSeq; +} +#endif + /*********************************************************************** * Message generation / sending ***********************************************************************/ @@ -73,11 +87,13 @@ return msg; } +/* Send given CCID message */ static int ccid_send(struct ccid_instance *ci, struct msgb *msg) { return ci->ops.send_in(ci, msg); } +/* Send given CCID message for given slot; patch bSlot into message */ static int ccid_slot_send(struct ccid_slot *cs, struct msgb *msg) { struct ccid_header *ch = (struct ccid_header *) msgb_ccid_in(msg); @@ -87,80 +103,207 @@ return ccid_send(cs->ci, msg); } +/* Send given CCID message and mark slot as un-busy */ +static int ccid_slot_send_unbusy(struct ccid_slot *cs, struct msgb *msg) +{ + cs->cmd_busy = false; + return ccid_slot_send(cs, msg); +} /* Section 6.2.1 */ -static struct msgb *ccid_gen_data_block(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, - enum ccid_error_code err, const uint8_t *data, - uint32_t data_len) +static struct msgb *ccid_gen_data_block_nr(uint8_t slot_nr, uint8_t icc_status, uint8_t seq, + uint8_t cmd_sts, enum ccid_error_code err, + const uint8_t *data, uint32_t data_len) { struct msgb *msg = ccid_msgb_alloc(); - struct ccid_rdr_to_pc_data_block *db = + struct ccid_rdr_to_pc_data_block *db = (struct ccid_rdr_to_pc_data_block *) msgb_put(msg, sizeof(*db) + data_len); - uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | get_icc_status(cs); + uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | icc_status; - SET_HDR_IN(db, RDR_to_PC_DataBlock, cs->slot_nr, seq, sts, err); + SET_HDR_IN(db, RDR_to_PC_DataBlock, slot_nr, seq, sts, err); osmo_store32le(data_len, &db->hdr.hdr.dwLength); memcpy(db->abData, data, data_len); return msg; } +static struct msgb *ccid_gen_data_block(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, + enum ccid_error_code err, const uint8_t *data, + uint32_t data_len) +{ + return ccid_gen_data_block_nr(cs->slot_nr, get_icc_status(cs), seq, cmd_sts, err, data, data_len); +} /* Section 6.2.2 */ -static struct msgb *ccid_gen_slot_status(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, - enum ccid_error_code err) +static struct msgb *ccid_gen_slot_status_nr(uint8_t slot_nr, uint8_t icc_status, + uint8_t seq, uint8_t cmd_sts, + enum ccid_error_code err) { struct msgb *msg = ccid_msgb_alloc(); struct ccid_rdr_to_pc_slot_status *ss = (struct ccid_rdr_to_pc_slot_status *) msgb_put(msg, sizeof(*ss)); - uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | get_icc_status(cs); + uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | icc_status; - SET_HDR_IN(ss, RDR_to_PC_SlotStatus, cs->slot_nr, seq, sts, err); + SET_HDR_IN(ss, RDR_to_PC_SlotStatus, slot_nr, seq, sts, err); return msg; } +static struct msgb *ccid_gen_slot_status(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, + enum ccid_error_code err) +{ + return ccid_gen_slot_status_nr(cs->slot_nr, get_icc_status(cs), seq, cmd_sts, err); +} /* Section 6.2.3 */ -/* TODO */ +static struct msgb *ccid_gen_parameters_t0_nr(uint8_t slot_nr, uint8_t icc_status, + uint8_t seq, uint8_t cmd_sts, enum ccid_error_code err, + const struct ccid_proto_data_t0 *t0) +{ + struct msgb *msg = ccid_msgb_alloc(); + struct ccid_rdr_to_pc_parameters *par = + (struct ccid_rdr_to_pc_parameters *) msgb_put(msg, sizeof(par->hdr)+sizeof(*t0)); + uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | icc_status; + + SET_HDR_IN(par, RDR_to_PC_Parameters, slot_nr, seq, sts, err); + if (t0) { + osmo_store32le(sizeof(*t0), &par->hdr.hdr.dwLength); + par->abProtocolData.t0 = *t0; + } + return msg; +} +static struct msgb *ccid_gen_parameters_t0(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, + enum ccid_error_code err, + const struct ccid_proto_data_t0 *t0) +{ + return ccid_gen_parameters_t0_nr(cs->slot_nr, get_icc_status(cs), seq, cmd_sts, err, t0); +} + +static struct msgb *ccid_gen_parameters_t1_nr(uint8_t slot_nr, uint8_t icc_status, + uint8_t seq, uint8_t cmd_sts, enum ccid_error_code err, + const struct ccid_proto_data_t1 *t1) +{ + struct msgb *msg = ccid_msgb_alloc(); + struct ccid_rdr_to_pc_parameters *par = + (struct ccid_rdr_to_pc_parameters *) msgb_put(msg, sizeof(par->hdr)+sizeof(*t1)); + uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | icc_status; + + SET_HDR_IN(par, RDR_to_PC_Parameters, slot_nr, seq, sts, err); + if (t1) { + osmo_store32le(sizeof(*t1), &par->hdr.hdr.dwLength); + par->abProtocolData.t1 = *t1; + } + return msg; +} +static struct msgb *ccid_gen_parameters_t1(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, + enum ccid_error_code err, + const struct ccid_proto_data_t1 *t1) +{ + return ccid_gen_parameters_t1_nr(cs->slot_nr, get_icc_status(cs), seq, cmd_sts, err, t1); +} + /* Section 6.2.4 */ -static struct msgb *ccid_gen_escape(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, - enum ccid_error_code err, const uint8_t *data, - uint32_t data_len) +static struct msgb *ccid_gen_escape_nr(uint8_t slot_nr, uint8_t icc_status, uint8_t seq, uint8_t cmd_sts, + enum ccid_error_code err, const uint8_t *data, uint32_t data_len) { struct msgb *msg = ccid_msgb_alloc(); struct ccid_rdr_to_pc_escape *esc = (struct ccid_rdr_to_pc_escape *) msgb_put(msg, sizeof(*esc) + data_len); - uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | get_icc_status(cs); + uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | icc_status; - SET_HDR_IN(esc, RDR_to_PC_Escape, cs->slot_nr, seq, sts, err); + SET_HDR_IN(esc, RDR_to_PC_Escape, slot_nr, seq, sts, err); osmo_store32le(data_len, &esc->hdr.hdr.dwLength); memcpy(esc->abData, data, data_len); return msg; } +static struct msgb *ccid_gen_escape(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, + enum ccid_error_code err, const uint8_t *data, + uint32_t data_len) +{ + return ccid_gen_escape_nr(cs->slot_nr, get_icc_status(cs), seq, cmd_sts, err, data, data_len); +} /* Section 6.2.5 */ -static struct msgb *ccid_gen_clock_and_rate(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, - enum ccid_error_code err, uint32_t clock_khz, uint32_t rate_bps) +static struct msgb *ccid_gen_clock_and_rate_nr(uint8_t slot_nr, uint8_t icc_status, uint8_t seq, + uint8_t cmd_sts, enum ccid_error_code err, + uint32_t clock_khz, uint32_t rate_bps) { struct msgb *msg = ccid_msgb_alloc(); struct ccid_rdr_to_pc_data_rate_and_clock *drc = (struct ccid_rdr_to_pc_data_rate_and_clock *) msgb_put(msg, sizeof(*drc)); - uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | get_icc_status(cs); + uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | icc_status; - SET_HDR_IN(drc, RDR_to_PC_DataRateAndClockFrequency, cs->slot_nr, seq, sts, err); + SET_HDR_IN(drc, RDR_to_PC_DataRateAndClockFrequency, slot_nr, seq, sts, err); osmo_store32le(8, &drc->hdr.hdr.dwLength); /* Message-specific data length (wtf?) */ osmo_store32le(clock_khz, &drc->dwClockFrequency); /* kHz */ osmo_store32le(rate_bps, &drc->dwDataRate); /* bps */ return msg; } - - - -#if 0 -static struct msgb *gen_err_resp(struct ccid_instance *ci, enum ccid_msg_type msg_type, - enum ccid_error_code err_code) +static struct msgb *ccid_gen_clock_and_rate(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, + enum ccid_error_code err, uint32_t clock_khz, + uint32_t rate_bps) { - struct c + return ccid_gen_clock_and_rate_nr(cs->slot_nr, get_icc_status(cs), seq, cmd_sts, err, + clock_khz, rate_bps); } -#endif + +/*! generate an error response for given input message_type/slot_nr/seq + * \param[in] msg_type CCID Message Type against which response is to be created + * \param[in] slot_nr CCID Slot Number + * \param[in] icc_status ICC Status of the slot + * \param[in] seq CCID Sequence number + * \param[in] err_code CCID Error Code to send + * \returns dynamically-allocated message buffer containing error response */ +static struct msgb *gen_err_resp(enum ccid_msg_type msg_type, uint8_t slot_nr, uint8_t icc_status, + uint8_t seq, enum ccid_error_code err_code) +{ + struct msgb *resp = NULL; + + switch (msg_type) { + case PC_to_RDR_IccPowerOn: + case PC_to_RDR_XfrBlock: + case PC_to_RDR_Secure: + /* Return RDR_to_PC_DataBlock */ + resp = ccid_gen_data_block_nr(slot_nr, icc_status, seq, CCID_CMD_STATUS_FAILED, + err_code, NULL, 0); + break; + + case PC_to_RDR_IccPowerOff: + case PC_to_RDR_GetSlotStatus: + case PC_to_RDR_IccClock: + case PC_to_RDR_T0APDU: + case PC_to_RDR_Mechanical: + case PC_to_RDR_Abort: + /* Return RDR_to_PC_SlotStatus */ + resp = ccid_gen_slot_status_nr(slot_nr, icc_status, seq, CCID_CMD_STATUS_FAILED, + err_code); + break; + + case PC_to_RDR_GetParameters: + case PC_to_RDR_ResetParameters: + case PC_to_RDR_SetParameters: + /* Return RDR_to_PC_Parameters */ + resp = ccid_gen_parameters_t0_nr(slot_nr, icc_status, seq, CCID_CMD_STATUS_FAILED, + err_code, NULL); /* FIXME: parameters? */ + break; + + case PC_to_RDR_Escape: + /* Return RDR_to_PC_Escape */ + resp = ccid_gen_escape_nr(slot_nr, icc_status, seq, CCID_CMD_STATUS_FAILED, + err_code, NULL, 0); + break; + + case PC_to_RDR_SetDataRateAndClockFrequency: + /* Return RDR_to_PC_SlotStatus */ + resp = ccid_gen_slot_status_nr(slot_nr, icc_status, seq, CCID_CMD_STATUS_FAILED, + err_code); + break; + + default: + /* generate general error */ + resp = ccid_gen_slot_status_nr(slot_nr, icc_status, seq, CCID_CMD_STATUS_FAILED, + CCID_ERR_CMD_NOT_SUPPORTED); + break; + } + return resp; +} /*********************************************************************** * Message reception / parsing @@ -170,11 +313,13 @@ static int ccid_handle_get_slot_status(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->get_slot_status.hdr.bSeq; struct msgb *resp; - resp = ccid_gen_slot_status(cs, u->get_slot_status.hdr.bSeq, CCID_CMD_STATUS_OK, 0); + resp = ccid_gen_slot_status(cs, seq, CCID_CMD_STATUS_OK, 0); - return ccid_send(cs->ci, resp); + return ccid_slot_send_unbusy(cs, resp); } @@ -182,123 +327,195 @@ static int ccid_handle_icc_power_on(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->icc_power_on.hdr.bSeq; struct msgb *resp; /* TODO: send actual ATR; handle error cases */ /* TODO: handle this asynchronously */ - resp = ccid_gen_data_block(cs, u->icc_power_on.hdr.bSeq, CCID_CMD_STATUS_OK, 0, NULL, 0); + resp = ccid_gen_data_block(cs, seq, CCID_CMD_STATUS_OK, 0, NULL, 0); - return ccid_send(cs->ci, resp); + return ccid_slot_send_unbusy(cs, resp); } /* Section 6.1.2 */ static int ccid_handle_icc_power_off(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->icc_power_off.hdr.bSeq; struct msgb *resp; - resp = ccid_gen_slot_status(cs, u->get_slot_status.hdr.bSeq, CCID_CMD_STATUS_OK, 0); - return ccid_send(cs->ci, resp); + /* FIXME */ + resp = ccid_gen_slot_status(cs, seq, CCID_CMD_STATUS_OK, 0); + return ccid_slot_send_unbusy(cs, resp); } /* Section 6.1.4 */ static int ccid_handle_xfr_block(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->xfr_block.hdr.bSeq; struct msgb *resp; - resp = ccid_gen_data_block(cs, u->icc_power_on.hdr.bSeq, CCID_CMD_STATUS_OK, 0, NULL, 0); - return ccid_send(cs->ci, resp); + /* FIXME */ + resp = ccid_gen_data_block(cs, seq, CCID_CMD_STATUS_OK, 0, NULL, 0); + return ccid_slot_send_unbusy(cs, resp); } /* Section 6.1.5 */ static int ccid_handle_get_parameters(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->get_parameters.hdr.bSeq; struct msgb *resp; + + /* FIXME */ + return ccid_slot_send_unbusy(cs, resp); } /* Section 6.1.6 */ static int ccid_handle_reset_parameters(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->reset_parameters.hdr.bSeq; struct msgb *resp; + + /* FIXME */ + return ccid_slot_send_unbusy(cs, resp); } /* Section 6.1.7 */ static int ccid_handle_set_parameters(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->set_parameters.hdr.bSeq; struct msgb *resp; + + /* FIXME */ + return ccid_slot_send_unbusy(cs, resp); } /* Section 6.1.8 */ static int ccid_handle_escape(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->escape.hdr.bSeq; struct msgb *resp; + + resp = ccid_gen_escape(cs, seq, CCID_CMD_STATUS_FAILED, CCID_ERR_CMD_NOT_SUPPORTED, NULL, 0); + return ccid_slot_send_unbusy(cs, resp); } /* Section 6.1.9 */ static int ccid_handle_icc_clock(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->icc_clock.hdr.bSeq; struct msgb *resp; - resp = ccid_gen_slot_status(cs, u->get_slot_status.hdr.bSeq, CCID_CMD_STATUS_OK, 0); - return ccid_send(cs->ci, resp); + /* FIXME: Actually Stop/Start the clock */ + resp = ccid_gen_slot_status(cs, seq, CCID_CMD_STATUS_OK, 0); + return ccid_slot_send_unbusy(cs, resp); } /* Section 6.1.10 */ static int ccid_handle_t0apdu(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->t0apdu.hdr.bSeq; struct msgb *resp; - resp = ccid_gen_slot_status(cs, u->get_slot_status.hdr.bSeq, CCID_CMD_STATUS_OK, 0); - return ccid_send(cs->ci, resp); + /* FIXME */ + //resp = ccid_gen_slot_status(cs, seq, CCID_CMD_STATUS_OK, 0); + resp = ccid_gen_slot_status(cs, seq, CCID_CMD_STATUS_FAILED, CCID_ERR_CMD_NOT_SUPPORTED); + return ccid_slot_send_unbusy(cs, resp); } /* Section 6.1.11 */ static int ccid_handle_secure(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->secure.hdr.bSeq; + struct msgb *resp; + + /* FIXME */ + resp = ccid_gen_slot_status(cs, seq, CCID_CMD_STATUS_FAILED, CCID_ERR_CMD_NOT_SUPPORTED); + return ccid_slot_send_unbusy(cs, resp); } /* Section 6.1.12 */ static int ccid_handle_mechanical(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->mechanical.hdr.bSeq; struct msgb *resp; - resp = ccid_gen_slot_status(cs, u->get_slot_status.hdr.bSeq, CCID_CMD_STATUS_OK, 0); - return ccid_send(cs->ci, resp); + resp = ccid_gen_slot_status(cs, seq, CCID_CMD_STATUS_FAILED, CCID_ERR_CMD_NOT_SUPPORTED); + return ccid_slot_send_unbusy(cs, resp); } /* Section 6.1.13 */ static int ccid_handle_abort(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->abort.hdr.bSeq; struct msgb *resp; - resp = ccid_gen_slot_status(cs, u->get_slot_status.hdr.bSeq, CCID_CMD_STATUS_OK, 0); - return ccid_send(cs->ci, resp); + /* Check if the currently in-progress message is Abortable */ + switch (0/* FIXME */) { + case PC_to_RDR_IccPowerOn: + case PC_to_RDR_XfrBlock: + case PC_to_RDR_Escape: + case PC_to_RDR_Secure: + case PC_to_RDR_Mechanical: + //case PC_to_RDR_Abort: /* seriously? WTF! */ + break; + default: + /* CCID spec lists CMD_NOT_ABORTED, but gives no numberic value ?!? */ + resp = ccid_gen_slot_status(cs, seq, CCID_CMD_STATUS_FAILED, CCID_ERR_CMD_NOT_SUPPORTED); + return ccid_slot_send_unbusy(cs, resp); + } + + /* FIXME */ + resp = ccid_gen_slot_status(cs, seq, CCID_CMD_STATUS_OK, 0); + return ccid_slot_send_unbusy(cs, resp); } /* Section 6.1.14 */ static int ccid_handle_set_rate_and_clock(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->set_rate_and_clock.hdr.bSeq; struct msgb *resp; + + /* FIXME */ + resp = ccid_gen_clock_and_rate(cs, seq, CCID_CMD_STATUS_OK, 0, 9600, 2500000); + return ccid_slot_send_unbusy(cs, resp); } -/* handle data arriving from the host on the OUT endpoint */ +/*! Handle data arriving from the host on the OUT endpoint. + * \param[in] cs CCID Instance on which to operate + * \param[in] msgb received message buffer containing one CCID OUT EP message from the host + * \returns 0 on success; negative on error */ int ccid_handle_out(struct ccid_instance *ci, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); const struct ccid_header *ch = (const struct ccid_header *) u; unsigned int len = msgb_length(msg); struct ccid_slot *cs; + struct msgb *resp; int rc; if (len < sizeof(*ch)) { @@ -306,12 +523,26 @@ return -1; } + /* Check for invalid slot number */ cs = get_ccid_slot(ci, ch->bSlot); if (!cs) { - /* FIXME */ - return -1; + resp = gen_err_resp(ch->bMessageType, ch->bSlot, CCID_ICC_STATUS_NO_ICC, ch->bSeq, 5); + return ccid_send(ci, resp); } + /* Check if slot is already busy; Reject any additional commands meanwhile */ + if (cs->cmd_busy) { + /* FIXME: ABORT logic as per section 5.3.1 of CCID Spec v1.1 */ + resp = gen_err_resp(ch->bMessageType, ch->bSlot, get_icc_status(cs), ch->bSeq, + CCID_ERR_CMD_SLOT_BUSY); + return ccid_send(ci, resp); + } + + /* we're now processing a command for the slot; mark slot as busy */ + cs->cmd_busy = true; + + /* TODO: enqueue into the per-slot specific input queue */ + switch (ch->bMessageType) { case PC_to_RDR_GetSlotStatus: if (len != sizeof(u->get_slot_status)) @@ -384,8 +615,10 @@ rc = ccid_handle_set_rate_and_clock(cs, msg); break; default: - /* FIXME */ - break; + /* generic response with bERror = 0 (command not supported) */ + resp = gen_err_resp(ch->bMessageType, ch->bSlot, CCID_ICC_STATUS_NO_ICC, ch->bSeq, + CCID_ERR_CMD_NOT_SUPPORTED); + return ccid_slot_send_unbusy(cs, resp); } return 0; -- To view, visit https://gerrit.osmocom.org/14055 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I4928425cc114c7af0068b13280fe89f428f44aab Gerrit-Change-Number: 14055 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 17:56:22 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 17:56:22 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid: Build with -Wall Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14056 Change subject: ccid: Build with -Wall ...................................................................... ccid: Build with -Wall Change-Id: I50cf270aefa4c9fd0d7ab27a9a6e4716a2e95416 --- M ccid/Makefile 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/56/14056/1 diff --git a/ccid/Makefile b/ccid/Makefile index a259c90..018b223 100644 --- a/ccid/Makefile +++ b/ccid/Makefile @@ -1,10 +1,10 @@ - +CFLAGS=-Wall -g ccid_descriptors: ccid_descriptors.o ccid_proto.o - $(CC) -lasan -losmocore -laio -o $@ $^ + $(CC) $(CFLAGS) -lasan -losmocore -laio -o $@ $^ %.o: %.c - $(CC) -o $@ -c $^ + $(CC) $(CFLAGS) -o $@ -c $^ clean: rm ccid_descriptors *.o -- To view, visit https://gerrit.osmocom.org/14056 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I50cf270aefa4c9fd0d7ab27a9a6e4716a2e95416 Gerrit-Change-Number: 14056 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 17:56:23 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 17:56:23 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid: Implement encode/decode of ProtocolParameters Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14057 Change subject: ccid: Implement encode/decode of ProtocolParameters ...................................................................... ccid: Implement encode/decode of ProtocolParameters Change-Id: Id6c436916a54b98a11809a58e9154e3e9b627885 --- M ccid/ccid_device.c M ccid/ccid_proto.h 2 files changed, 175 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/57/14057/1 diff --git a/ccid/ccid_device.c b/ccid/ccid_device.c index 340ff60..02d1599 100644 --- a/ccid/ccid_device.c +++ b/ccid/ccid_device.c @@ -11,6 +11,28 @@ #define NR_SLOTS 8 +struct ccid_pars_decoded { + /* global for T0/T1 */ + uint8_t fi; + uint8_t di; + enum ccid_clock_stop clock_stop; + bool inverse_convention; + + struct { + uint8_t guard_time_etu; + uint8_t waiting_integer; + } t0; + + struct { + enum ccid_t1_csum_type csum_type; + uint8_t guard_time_t1; + uint8_t bwi; + uint8_t cwi; + uint8_t ifsc; + uint8_t nad; + } t1; +}; + struct ccid_slot { struct ccid_instance *ci; uint8_t slot_nr; @@ -18,8 +40,100 @@ bool icc_powered; bool icc_in_reset; bool cmd_busy; + struct ccid_pars_decoded pars; }; +/* decode on-the-wire T0 parameters into their parsed form */ +static int decode_ccid_pars_t0(struct ccid_pars_decoded *out, const struct ccid_proto_data_t0 *in) +{ + /* input validation: only 0x00 and 0x02 permitted for bmTCCKST0 */ + if (in->bmTCCKST0 & 0xFD) + return -11; + /* input validation: only 0x00 to 0x03 permitted for bClockSTop */ + if (in->bClockStop & 0xFC) + return -14; + + out->fi = in->bmFindexDindex >> 4; + out->di = in->bmFindexDindex & 0xF; + if (in->bmTCCKST0 & 2) + out->inverse_convention = true; + else + out->inverse_convention = false; + if (in->bGuardTimeT0 == 0xff) + out->t0.guard_time_etu = 0; + else + out->t0.guard_time_etu = in->bGuardTimeT0; + out->t0.waiting_integer = in->bWaitingIntegerT0; + out->clock_stop = in->bClockStop & 0x03; + + return 0; +} + +/* encode T0 parameters from parsed form into on-the-wire encoding */ +static void encode_ccid_pars_t0(struct ccid_proto_data_t0 *out, const struct ccid_pars_decoded *in) +{ + out->bmFindexDindex = ((in->fi << 4) & 0xF0) | (in->di & 0x0F); + if (in->inverse_convention) + out->bmTCCKST0 = 0x02; + else + out->bmTCCKST0 = 0x00; + out->bGuardTimeT0 = in->t0.guard_time_etu; + out->bWaitingIntegerT0 = in->t0.waiting_integer; + out->bClockStop = in->clock_stop & 0x03; +} + +/* decode on-the-wire T1 parameters into their parsed form */ +static int decode_ccid_pars_t1(struct ccid_pars_decoded *out, const struct ccid_proto_data_t1 *in) +{ + /* input validation: only some values permitted for bmTCCKST0 */ + if (in->bmTCCKST1 & 0xE8) + return -11; + /* input validation: only 0x00 to 0x9F permitted for bmWaitingIntegersT1 */ + if (in->bWaitingIntegersT1 > 0x9F) + return -13; + /* input validation: only 0x00 to 0x03 permitted for bClockSTop */ + if (in->bClockStop & 0xFC) + return -14; + /* input validation: only 0x00 to 0xFE permitted for bIFSC */ + if (in->bIFSC > 0xFE) + return -15; + + out->fi = in->bmFindexDindex >> 4; + out->di = in->bmFindexDindex & 0xF; + if (in->bmTCCKST1 & 1) + out->t1.csum_type = CCID_CSUM_TYPE_CRC; + else + out->t1.csum_type = CCID_CSUM_TYPE_LRC; + if (in->bmTCCKST1 & 2) + out->inverse_convention = true; + else + out->inverse_convention = false; + out->t1.guard_time_t1 = in->bGuardTimeT1; + out->t1.bwi = in->bWaitingIntegersT1 >> 4; + out->t1.cwi = in->bWaitingIntegersT1 & 0xF; + out->clock_stop = in->bClockStop & 0x03; + out->t1.ifsc = in->bIFSC; + out->t1.nad = in->bNadValue; + + return 0; +} + +/* encode T1 parameters from parsed form into on-the-wire encoding */ +static void encode_ccid_pars_t1(struct ccid_proto_data_t1 *out, const struct ccid_pars_decoded *in) +{ + out->bmFindexDindex = ((in->fi << 4) & 0xF0) | (in->di & 0x0F); + out->bmTCCKST1 = 0x10; + if (in->t1.csum_type == CCID_CSUM_TYPE_CRC) + out->bmTCCKST1 |= 0x01; + if (in->inverse_convention) + out->bmTCCKST1 |= 0x02; + out->bGuardTimeT1 = in->t1.guard_time_t1; + out->bWaitingIntegersT1 = ((in->t1.bwi << 4) & 0xF0) | (in->t1.cwi & 0x0F); + out->bClockStop = in->clock_stop & 0x03; + out->bIFSC = in->t1.ifsc; + out->bNadValue = in->t1.nad; +} + struct ccid_ops { int (*send_in)(struct ccid_instance *ci, struct msgb *msg); }; @@ -154,48 +268,46 @@ /* Section 6.2.3 */ static struct msgb *ccid_gen_parameters_t0_nr(uint8_t slot_nr, uint8_t icc_status, uint8_t seq, uint8_t cmd_sts, enum ccid_error_code err, - const struct ccid_proto_data_t0 *t0) + const struct ccid_pars_decoded *dec_par) { struct msgb *msg = ccid_msgb_alloc(); struct ccid_rdr_to_pc_parameters *par = - (struct ccid_rdr_to_pc_parameters *) msgb_put(msg, sizeof(par->hdr)+sizeof(*t0)); + (struct ccid_rdr_to_pc_parameters *) msgb_put(msg, sizeof(par->hdr)+sizeof(par->abProtocolData.t0)); uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | icc_status; SET_HDR_IN(par, RDR_to_PC_Parameters, slot_nr, seq, sts, err); - if (t0) { - osmo_store32le(sizeof(*t0), &par->hdr.hdr.dwLength); - par->abProtocolData.t0 = *t0; + if (dec_par) { + osmo_store32le(sizeof(par->abProtocolData.t0), &par->hdr.hdr.dwLength); + encode_ccid_pars_t0(&par->abProtocolData.t0, dec_par); } return msg; } static struct msgb *ccid_gen_parameters_t0(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, - enum ccid_error_code err, - const struct ccid_proto_data_t0 *t0) + enum ccid_error_code err) { - return ccid_gen_parameters_t0_nr(cs->slot_nr, get_icc_status(cs), seq, cmd_sts, err, t0); + return ccid_gen_parameters_t0_nr(cs->slot_nr, get_icc_status(cs), seq, cmd_sts, err, &cs->pars); } static struct msgb *ccid_gen_parameters_t1_nr(uint8_t slot_nr, uint8_t icc_status, uint8_t seq, uint8_t cmd_sts, enum ccid_error_code err, - const struct ccid_proto_data_t1 *t1) + const struct ccid_pars_decoded *dec_par) { struct msgb *msg = ccid_msgb_alloc(); struct ccid_rdr_to_pc_parameters *par = - (struct ccid_rdr_to_pc_parameters *) msgb_put(msg, sizeof(par->hdr)+sizeof(*t1)); + (struct ccid_rdr_to_pc_parameters *) msgb_put(msg, sizeof(par->hdr)+sizeof(par->abProtocolData.t1)); uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | icc_status; SET_HDR_IN(par, RDR_to_PC_Parameters, slot_nr, seq, sts, err); - if (t1) { - osmo_store32le(sizeof(*t1), &par->hdr.hdr.dwLength); - par->abProtocolData.t1 = *t1; + if (dec_par) { + osmo_store32le(sizeof(par->abProtocolData.t1), &par->hdr.hdr.dwLength); + encode_ccid_pars_t1(&par->abProtocolData.t1, dec_par); } return msg; } static struct msgb *ccid_gen_parameters_t1(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, - enum ccid_error_code err, - const struct ccid_proto_data_t1 *t1) + enum ccid_error_code err) { - return ccid_gen_parameters_t1_nr(cs->slot_nr, get_icc_status(cs), seq, cmd_sts, err, t1); + return ccid_gen_parameters_t1_nr(cs->slot_nr, get_icc_status(cs), seq, cmd_sts, err, &cs->pars); } @@ -372,7 +484,8 @@ uint8_t seq = u->get_parameters.hdr.bSeq; struct msgb *resp; - /* FIXME */ + /* FIXME: T=1 */ + resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_OK, 0); return ccid_slot_send_unbusy(cs, resp); } @@ -384,7 +497,9 @@ uint8_t seq = u->reset_parameters.hdr.bSeq; struct msgb *resp; - /* FIXME */ + /* FIXME: copy default parameters from somewhere */ + /* FIXME: T=1 */ + resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_OK, 0); return ccid_slot_send_unbusy(cs, resp); } @@ -392,11 +507,34 @@ static int ccid_handle_set_parameters(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_pc_to_rdr_set_parameters *spar = &u->set_parameters; const struct ccid_header *ch = (const struct ccid_header *) u; uint8_t seq = u->set_parameters.hdr.bSeq; + struct ccid_pars_decoded pars_dec; struct msgb *resp; + int rc; - /* FIXME */ + switch (spar->bProtocolNum) { + case CCID_PROTOCOL_NUM_T0: + rc = decode_ccid_pars_t0(&pars_dec, &spar->abProtocolData.t0); + if (rc < 0) + resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_FAILED, -rc); + /* FIXME: validate parameters; abort if they are not supported */ + cs->pars = pars_dec; + resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_OK, 0); + break; + case CCID_PROTOCOL_NUM_T1: + rc = decode_ccid_pars_t1(&pars_dec, &spar->abProtocolData.t1); + if (rc < 0) + resp = ccid_gen_parameters_t1(cs, seq, CCID_CMD_STATUS_FAILED, -rc); + /* FIXME: validate parameters; abort if they are not supported */ + cs->pars = pars_dec; + resp = ccid_gen_parameters_t1(cs, seq, CCID_CMD_STATUS_OK, 0); + break; + default: + resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_FAILED, 0); + break; + } return ccid_slot_send_unbusy(cs, resp); } diff --git a/ccid/ccid_proto.h b/ccid/ccid_proto.h index fa0ead1..92878dc 100644 --- a/ccid/ccid_proto.h +++ b/ccid/ccid_proto.h @@ -132,6 +132,23 @@ /* Response: RDR_to_PC_Parameters */ /* Section 6.1.7 */ +enum ccid_protocol_num { + CCID_PROTOCOL_NUM_T0 = 0x00, + CCID_PROTOCOL_NUM_T1 = 0x01, + CCID_PROTOCOL_NUM_2WIRE = 0x80, + CCID_PROTOCOL_NUM_3WIRE = 0x81, + CCID_PROTOCOL_NUM_I2C = 0x82, +}; +enum ccid_clock_stop { + CCID_CLOCK_STOP_NOTALLOWED = 0x00, + CCID_CLOCK_STOP_LOW = 0x01, + CCID_CLOCK_STOP_HIGH = 0x02, + CCID_CLOCK_STOP_EITHER = 0x03, +}; +enum ccid_t1_csum_type { + CCID_CSUM_TYPE_LRC = 0, + CCID_CSUM_TYPE_CRC = 1, +}; struct ccid_proto_data_t0 { uint8_t bmFindexDindex; uint8_t bmTCCKST0; @@ -145,7 +162,7 @@ uint8_t bGuardTimeT1; uint8_t bWaitingIntegersT1; uint8_t bClockStop; - uint8_t bFSC; + uint8_t bIFSC; uint8_t bNadValue; } __attribute__ ((packed)); struct ccid_pc_to_rdr_set_parameters { -- To view, visit https://gerrit.osmocom.org/14057 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id6c436916a54b98a11809a58e9154e3e9b627885 Gerrit-Change-Number: 14057 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 17:56:23 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 17:56:23 +0000 Subject: Change in osmo-ccid-firmware[master]: Add ccid_device.h file for ccid_device.c Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14058 Change subject: Add ccid_device.h file for ccid_device.c ...................................................................... Add ccid_device.h file for ccid_device.c Change-Id: I1b171ede38deebfa525a0ee10865da2dc5ec7e4e --- M ccid/ccid_device.c A ccid/ccid_device.h 2 files changed, 71 insertions(+), 48 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/58/14058/1 diff --git a/ccid/ccid_device.c b/ccid/ccid_device.c index 02d1599..b7077df 100644 --- a/ccid/ccid_device.c +++ b/ccid/ccid_device.c @@ -8,40 +8,7 @@ #include #include "ccid_proto.h" - -#define NR_SLOTS 8 - -struct ccid_pars_decoded { - /* global for T0/T1 */ - uint8_t fi; - uint8_t di; - enum ccid_clock_stop clock_stop; - bool inverse_convention; - - struct { - uint8_t guard_time_etu; - uint8_t waiting_integer; - } t0; - - struct { - enum ccid_t1_csum_type csum_type; - uint8_t guard_time_t1; - uint8_t bwi; - uint8_t cwi; - uint8_t ifsc; - uint8_t nad; - } t1; -}; - -struct ccid_slot { - struct ccid_instance *ci; - uint8_t slot_nr; - bool icc_present; - bool icc_powered; - bool icc_in_reset; - bool cmd_busy; - struct ccid_pars_decoded pars; -}; +#include "ccid_device.h" /* decode on-the-wire T0 parameters into their parsed form */ static int decode_ccid_pars_t0(struct ccid_pars_decoded *out, const struct ccid_proto_data_t0 *in) @@ -134,23 +101,9 @@ out->bNadValue = in->t1.nad; } -struct ccid_ops { - int (*send_in)(struct ccid_instance *ci, struct msgb *msg); -}; - -struct ccid_instance { - struct ccid_slot slot[NR_SLOTS]; - struct ccid_ops ops; - const char *name; -}; - #define msgb_ccid_out(x) (union ccid_pc_to_rdr *)msgb_data(x) #define msgb_ccid_in(x) (union ccid_rdr_to_pc *)msgb_data(x) -#define LOGPCI(ci, lvl, fmt, args ...) LOGP(DCCID, lvl, "%s: " fmt, (ci)->name, ## args) -#define LOGPCS(cs, lvl, fmt, args ...) \ - LOGP(DCCID, lvl, "%s(%u): " fmt, (cc)->ci->name, (cc)->slot_nr, ## args) - static struct ccid_slot *get_ccid_slot(struct ccid_instance *ci, uint8_t slot_nr) { if (slot_nr >= sizeof(ci->slot)) diff --git a/ccid/ccid_device.h b/ccid/ccid_device.h new file mode 100644 index 0000000..c7cef47 --- /dev/null +++ b/ccid/ccid_device.h @@ -0,0 +1,70 @@ +#pragma once +#include +#include + + +#define NR_SLOTS 8 + +#define LOGPCI(ci, lvl, fmt, args ...) LOGP(DCCID, lvl, "%s: " fmt, (ci)->name, ## args) +#define LOGPCS(cs, lvl, fmt, args ...) \ + LOGP(DCCID, lvl, "%s(%u): " fmt, (cc)->ci->name, (cc)->slot_nr, ## args) + +struct msgb; + +struct ccid_pars_decoded { + /* global for T0/T1 */ + uint8_t fi; + uint8_t di; + enum ccid_clock_stop clock_stop; + bool inverse_convention; + + struct { + uint8_t guard_time_etu; + uint8_t waiting_integer; + } t0; + + struct { + enum ccid_t1_csum_type csum_type; + uint8_t guard_time_t1; + uint8_t bwi; + uint8_t cwi; + uint8_t ifsc; + uint8_t nad; + } t1; +}; + +struct ccid_slot { + /* back-pointer to the ccid_instance */ + struct ccid_instance *ci; + /* number of this slot (0 = first) */ + uint8_t slot_nr; + /* is there an ICC physically present (card detect)? */ + bool icc_present; + /* was there an ICC present during the last NotifSlotStatus? + * should be set to zero every USB resume and setConfig != 0 */ + bool icc_present_last; + /* is the ICC physically powered? */ + bool icc_powered; + /* is the ICC currently in reset? */ + bool icc_in_reset; + /* is this slot currently busy with processing a CCID command? */ + bool cmd_busy; + /* decided CCID parameters */ + struct ccid_pars_decoded pars; +}; + +/* CCID operations */ +struct ccid_ops { + int (*send_in)(struct ccid_instance *ci, struct msgb *msg); +}; + +/* An instance of CCID (i.e. a card reader device) */ +struct ccid_instance { + /* slots within the reader */ + struct ccid_slot slot[NR_SLOTS]; + /* set of function pointers implementing specific operations */ + const struct ccid_ops ops; + const char *name; +}; + +int ccid_handle_out(struct ccid_instance *ci, struct msgb *msg); -- To view, visit https://gerrit.osmocom.org/14058 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I1b171ede38deebfa525a0ee10865da2dc5ec7e4e Gerrit-Change-Number: 14058 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 17:56:23 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 17:56:23 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid: tie ccid_device implementation into ccid_descriptors.c Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14059 Change subject: ccid: tie ccid_device implementation into ccid_descriptors.c ...................................................................... ccid: tie ccid_device implementation into ccid_descriptors.c Change-Id: Iaf40e8e455f79f7db71de767c442ba9e98961e0f --- M ccid/Makefile M ccid/ccid_descriptors.c 2 files changed, 22 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/59/14059/1 diff --git a/ccid/Makefile b/ccid/Makefile index 018b223..e23823a 100644 --- a/ccid/Makefile +++ b/ccid/Makefile @@ -1,6 +1,6 @@ CFLAGS=-Wall -g -ccid_descriptors: ccid_descriptors.o ccid_proto.o +ccid_descriptors: ccid_descriptors.o ccid_proto.o ccid_device.o $(CC) $(CFLAGS) -lasan -losmocore -laio -o $@ $^ %.o: %.c diff --git a/ccid/ccid_descriptors.c b/ccid/ccid_descriptors.c index 7117fbb..84eb70c 100644 --- a/ccid/ccid_descriptors.c +++ b/ccid/ccid_descriptors.c @@ -6,7 +6,6 @@ #include "ccid_proto.h" - #if __BYTE_ORDER == __LITTLE_ENDIAN #define cpu_to_le16(x) (x) #define cpu_to_le32(x) (x) @@ -132,11 +131,14 @@ #include #include #include +#include + +#include "ccid_device.h" #ifndef FUNCTIONFS_SUPPORTS_POLL #include struct aio_help { - uint8_t buf[64]; + struct msgb *msg; struct iocb *iocb; }; #endif @@ -154,6 +156,7 @@ struct aio_help aio_out; struct aio_help aio_int; #endif + struct ccid_instance *ccid_handle; }; static int ep_int_cb(struct osmo_fd *ofd, unsigned int what) @@ -164,13 +167,20 @@ static int ep_out_cb(struct osmo_fd *ofd, unsigned int what) { - uint8_t buf[64]; + struct ufunc_handle *uh = (struct ufunc_handle *) ofd->data; + struct msgb *msg = msgb_alloc(512, "OUT-Rx"); int rc; printf("OUT\n"); if (what & BSC_FD_READ) { - rc = read(ofd->fd, buf, sizeof(buf)); - ccid_handle_out(uh->ccid_handle, buf, rc); + rc = read(ofd->fd, msgb_data(msg), msgb_tailroom(msg)); + if (rc <= 0) { + msgb_free(msg); + return rc; + } + msgb_put(msg, rc); + ccid_handle_out(uh->ccid_handle, msg); + msgb_free(msg); } return 0; } @@ -238,7 +248,8 @@ { int rc; struct aio_help *ah = &uh->aio_out; - io_prep_pread(ah->iocb, uh->ep_out.fd, ah->buf, sizeof(ah->buf), 0); + msgb_reset(ah->msg); + io_prep_pread(ah->iocb, uh->ep_out.fd, msgb_data(ah->msg), msgb_tailroom(ah->msg), 0); io_set_eventfd(ah->iocb, uh->aio_evfd.fd); rc = io_submit(uh->aio_ctx, 1, &ah->iocb); OSMO_ASSERT(rc >= 0); @@ -270,7 +281,9 @@ /* IN endpoint AIO has completed. This means the host has sent us * some OUT data */ //printf("\t%s\n", osmo_hexdump(uh->aio_out.buf, evt[i].res)); - ccid_handle_out(uh->ccid_handle, uh->aio_out.buf, evt[i].res); + //ccid_handle_out(uh->ccid_handle, uh->aio_out.buf, evt[i].res); + msgb_put(uh->aio_out.msg, evt[i].res); + ccid_handle_out(uh->ccid_handle, uh->aio_out.msg); aio_refill_out(uh); } } @@ -332,6 +345,7 @@ osmo_fd_setup(&uh->aio_evfd, rc, BSC_FD_READ, &evfd_cb, uh, 0); osmo_fd_register(&uh->aio_evfd); + uh->aio_out.msg = msgb_alloc(512, "OUT-Rx-AIO"); uh->aio_out.iocb = malloc(sizeof(struct iocb)); #endif -- To view, visit https://gerrit.osmocom.org/14059 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Iaf40e8e455f79f7db71de767c442ba9e98961e0f Gerrit-Change-Number: 14059 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 17:56:24 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 17:56:24 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid: rename ccid_descriptors.c to ccid_main_functionfs Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14060 Change subject: ccid: rename ccid_descriptors.c to ccid_main_functionfs ...................................................................... ccid: rename ccid_descriptors.c to ccid_main_functionfs ... which resembles its actual purpose much better Change-Id: I02d21a9594db8e87714b6ce0d106ed3ef5297548 --- M ccid/Makefile R ccid/ccid_main_functionfs.c 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/60/14060/1 diff --git a/ccid/Makefile b/ccid/Makefile index e23823a..317fcbd 100644 --- a/ccid/Makefile +++ b/ccid/Makefile @@ -1,10 +1,10 @@ CFLAGS=-Wall -g -ccid_descriptors: ccid_descriptors.o ccid_proto.o ccid_device.o +ccid_functionfs: ccid_main_functionfs.o ccid_proto.o ccid_device.o $(CC) $(CFLAGS) -lasan -losmocore -laio -o $@ $^ %.o: %.c $(CC) $(CFLAGS) -o $@ -c $^ clean: - rm ccid_descriptors *.o + rm ccid_functionfs *.o diff --git a/ccid/ccid_descriptors.c b/ccid/ccid_main_functionfs.c similarity index 100% rename from ccid/ccid_descriptors.c rename to ccid/ccid_main_functionfs.c -- To view, visit https://gerrit.osmocom.org/14060 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I02d21a9594db8e87714b6ce0d106ed3ef5297548 Gerrit-Change-Number: 14060 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 17:58:00 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 15 May 2019 17:58:00 +0000 Subject: Change in osmo-msc[master]: libmsc/msc_vty.c: fix: use msub_for_vsub() in subscr_dump_full_vty() Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14061 Change subject: libmsc/msc_vty.c: fix: use msub_for_vsub() in subscr_dump_full_vty() ...................................................................... libmsc/msc_vty.c: fix: use msub_for_vsub() in subscr_dump_full_vty() Change-Id: I8a099b71b10ebb5d2bccfc7e78b6d37a1e60add8 Related: OS#4003 --- M src/libmsc/msc_vty.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/61/14061/1 diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index bd369ae..67955d3 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -821,7 +821,7 @@ /* Connection */ if (vsub->msc_conn_ref) { - struct msub *msub = vsub->msc_conn_ref; + struct msub *msub = msub_for_vsub(vsub); int idx = 0; if (msub) { vty_dump_one_conn(vty, msub, &idx); -- To view, visit https://gerrit.osmocom.org/14061 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I8a099b71b10ebb5d2bccfc7e78b6d37a1e60add8 Gerrit-Change-Number: 14061 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 18:25:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 18:25:33 +0000 Subject: Change in osmo-ccid-firmware[master]: CICD: Add ccid_proto.c with value_string of important enumerations In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14052 ) Change subject: CICD: Add ccid_proto.c with value_string of important enumerations ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14052 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Idc6b3d2f0a22db3a57f0c05d96c776e92b718b07 Gerrit-Change-Number: 14052 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 15 May 2019 18:25:33 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 18:25:40 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 18:25:40 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid_proto: Fix ccid_rdr_to_pc_{data_rate_and_clock, escape} In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14053 ) Change subject: ccid_proto: Fix ccid_rdr_to_pc_{data_rate_and_clock,escape} ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14053 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0e370da11a0c95d0ea4a517aa6060f16e21adef0 Gerrit-Change-Number: 14053 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 15 May 2019 18:25:40 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 18:25:51 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 18:25:51 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid_device: Make it compile In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14054 ) Change subject: ccid_device: Make it compile ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14054 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0350fec36eeef69eeccb873f547c9df8b364ae12 Gerrit-Change-Number: 14054 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 15 May 2019 18:25:51 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 18:26:01 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 18:26:01 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid_device: Return errors in case of invalid slot numbers In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14055 ) Change subject: ccid_device: Return errors in case of invalid slot numbers ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14055 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4928425cc114c7af0068b13280fe89f428f44aab Gerrit-Change-Number: 14055 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 15 May 2019 18:26:01 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 18:26:04 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 18:26:04 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid: Build with -Wall In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14056 ) Change subject: ccid: Build with -Wall ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14056 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I50cf270aefa4c9fd0d7ab27a9a6e4716a2e95416 Gerrit-Change-Number: 14056 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 15 May 2019 18:26:04 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 18:26:14 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 18:26:14 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid: Implement encode/decode of ProtocolParameters In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14057 ) Change subject: ccid: Implement encode/decode of ProtocolParameters ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14057 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id6c436916a54b98a11809a58e9154e3e9b627885 Gerrit-Change-Number: 14057 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 15 May 2019 18:26:14 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 18:26:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 18:26:18 +0000 Subject: Change in osmo-ccid-firmware[master]: Add ccid_device.h file for ccid_device.c In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14058 ) Change subject: Add ccid_device.h file for ccid_device.c ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14058 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1b171ede38deebfa525a0ee10865da2dc5ec7e4e Gerrit-Change-Number: 14058 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 15 May 2019 18:26:18 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 18:26:23 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 18:26:23 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid: rename ccid_descriptors.c to ccid_main_functionfs In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14060 ) Change subject: ccid: rename ccid_descriptors.c to ccid_main_functionfs ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14060 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I02d21a9594db8e87714b6ce0d106ed3ef5297548 Gerrit-Change-Number: 14060 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 15 May 2019 18:26:23 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 18:26:31 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 18:26:31 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid: tie ccid_device implementation into ccid_descriptors.c In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14059 ) Change subject: ccid: tie ccid_device implementation into ccid_descriptors.c ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14059 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iaf40e8e455f79f7db71de767c442ba9e98961e0f Gerrit-Change-Number: 14059 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 15 May 2019 18:26:31 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 18:26:32 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 18:26:32 +0000 Subject: Change in osmo-ccid-firmware[master]: CICD: Add ccid_proto.c with value_string of important enumerations In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14052 ) Change subject: CICD: Add ccid_proto.c with value_string of important enumerations ...................................................................... CICD: Add ccid_proto.c with value_string of important enumerations Change-Id: Idc6b3d2f0a22db3a57f0c05d96c776e92b718b07 --- M ccid/Makefile A ccid/ccid_proto.c M ccid/ccid_proto.h 3 files changed, 77 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/ccid/Makefile b/ccid/Makefile index 34df8c9..a259c90 100644 --- a/ccid/Makefile +++ b/ccid/Makefile @@ -1,6 +1,6 @@ -ccid_descriptors: ccid_descriptors.o +ccid_descriptors: ccid_descriptors.o ccid_proto.o $(CC) -lasan -losmocore -laio -o $@ $^ %.o: %.c diff --git a/ccid/ccid_proto.c b/ccid/ccid_proto.c new file mode 100644 index 0000000..9275cf2 --- /dev/null +++ b/ccid/ccid_proto.c @@ -0,0 +1,67 @@ +#include +#include "ccid_proto.h" + +const struct value_string ccid_msg_type_vals[] = { + OSMO_VALUE_STRING(RDR_to_PC_NotifySlotChange), + OSMO_VALUE_STRING(RDR_to_PC_HardwareError), + OSMO_VALUE_STRING(PC_to_RDR_IccPowerOn), + OSMO_VALUE_STRING(PC_to_RDR_IccPowerOff), + OSMO_VALUE_STRING(PC_to_RDR_GetSlotStatus), + OSMO_VALUE_STRING(PC_to_RDR_XfrBlock), + OSMO_VALUE_STRING(PC_to_RDR_GetParameters), + OSMO_VALUE_STRING(PC_to_RDR_ResetParameters), + OSMO_VALUE_STRING(PC_to_RDR_SetParameters), + OSMO_VALUE_STRING(PC_to_RDR_Escape), + OSMO_VALUE_STRING(PC_to_RDR_IccClock), + OSMO_VALUE_STRING(PC_to_RDR_T0APDU), + OSMO_VALUE_STRING(PC_to_RDR_Secure), + OSMO_VALUE_STRING(PC_to_RDR_Mechanical), + OSMO_VALUE_STRING(PC_to_RDR_Abort), + OSMO_VALUE_STRING(PC_to_RDR_SetDataRateAndClockFrequency), + OSMO_VALUE_STRING(RDR_to_PC_DataBlock), + OSMO_VALUE_STRING(RDR_to_PC_SlotStatus), + OSMO_VALUE_STRING(RDR_to_PC_Escape), + OSMO_VALUE_STRING(RDR_to_PC_DataRateAndClockFrequency), + { 0, NULL } +}; + +const struct value_string ccid_class_spec_req_vals[] = { + { CLASS_SPEC_CCID_ABORT, "CCID_ABORT" }, + { CLASS_SPEC_CCID_GET_CLOCK_FREQ, "GET_CLOCK_FREQ" }, + { CLASS_SPEC_CCID_GET_DATA_RATES, "GET_DATA_RATES" }, + { 0, NULL } +}; + +const struct value_string ccid_power_select_vals[] = { + { CCID_PWRSEL_AUTO, "AUTO" }, + { CCID_PWRSEL_5V0, "5.0V" }, + { CCID_PWRSEL_3V0, "3.0V" }, + { CCID_PWRSEL_1V8, "1.8V" }, + { 0, NULL } +}; + +const struct value_string ccid_clock_command_vals[] = { + { CCID_CLOCK_CMD_RESTART, "RESTART" }, + { CCID_CLOCK_CMD_STOP, "STOP" }, + { 0, NULL } +}; + +const struct value_string ccid_error_code_vals[] = { + { CCID_ERR_CMD_ABORTED, "CMD_ABORTED" }, + { CCID_ERR_ICC_MUTE, "ICC_MUTE" }, + { CCID_ERR_XFR_PARITY_ERROR, "XFR_PARITY_ERROR" }, + { CCID_ERR_XFR_OVERRUN, "XFR_OVERRUN" }, + { CCID_ERR_HW_ERROR, "HW_ERROR" }, + { CCID_ERR_BAD_ATR_TS, "BAD_ATR_TS" }, + { CCID_ERR_BAD_ATR_TCK, "BAD_ATR_TCK" }, + { CCID_ERR_ICC_PROTOCOL_NOT_SUPPORTED, "ICC_PROTOCOL_NOT_SUPPORTED" }, + { CCID_ERR_ICC_CLASS_NOT_SUPPORTED, "ICC_CLASS_NOT_SUPPORTED" }, + { CCID_ERR_PROCEDURE_BYTE_CONFLICT, "PROCEDURE_BYTE_CONFLICT" }, + { CCID_ERR_DEACTIVATED_PROTOCOL, "DEACTIVATED_PROTOCOL" }, + { CCID_ERR_BUSY_WITH_AUTO_SEQUENCE, "BUSY_WITH_AUTO_SEQUENCE" }, + { CCID_ERR_PIN_TIMEOUT, "PIN_TIMEOUT" }, + { CCID_ERR_PIN_CANCELLED, "PIN_CANCELLED" }, + { CCID_ERR_CMD_SLOT_BUSY, "CMD_SLOT_BUSY" }, + { CCID_ERR_CMD_NOT_SUPPORTED, "CMD_NOT_SUPPORTED" }, + { 0, NULL } +}; diff --git a/ccid/ccid_proto.h b/ccid/ccid_proto.h index 470416c..e10be8a 100644 --- a/ccid/ccid_proto.h +++ b/ccid/ccid_proto.h @@ -1,5 +1,6 @@ #pragma once #include +#include /* Identifies the length of type of subordinate descriptors of a CCID device * Table 5.1-1 Smart Card Device Class descriptors */ @@ -372,3 +373,11 @@ struct ccid_rdr_to_pc_notify_slot_change slot_change; struct ccid_rdr_to_pc_hardware_error hw_error; }; + + +extern const struct value_string ccid_msg_type_vals[]; +extern const struct value_string ccid_class_spec_req_vals[]; +extern const struct value_string ccid_power_select_vals[]; +extern const struct value_string ccid_clock_command_vals[]; +extern const struct value_string ccid_error_code_vals[]; + -- To view, visit https://gerrit.osmocom.org/14052 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Idc6b3d2f0a22db3a57f0c05d96c776e92b718b07 Gerrit-Change-Number: 14052 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 18:26:32 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 18:26:32 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid_proto: Fix ccid_rdr_to_pc_{data_rate_and_clock, escape} In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14053 ) Change subject: ccid_proto: Fix ccid_rdr_to_pc_{data_rate_and_clock,escape} ...................................................................... ccid_proto: Fix ccid_rdr_to_pc_{data_rate_and_clock,escape} Both use 'struct ccid_header_in', not 'struct ccid_header'. Change-Id: I0e370da11a0c95d0ea4a517aa6060f16e21adef0 --- M ccid/ccid_proto.h 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/ccid/ccid_proto.h b/ccid/ccid_proto.h index e10be8a..fa0ead1 100644 --- a/ccid/ccid_proto.h +++ b/ccid/ccid_proto.h @@ -303,14 +303,14 @@ /* Section 6.2.4 RDR_to_PC_Escape */ struct ccid_rdr_to_pc_escape { - struct ccid_header hdr; + struct ccid_header_in hdr; uint8_t bRFU; uint8_t abData[0]; } __attribute__ ((packed)); /* Section 6.2.5 RDR_to_PC_DataRateAndClockFrequency */ struct ccid_rdr_to_pc_data_rate_and_clock { - struct ccid_header hdr; + struct ccid_header_in hdr; uint8_t bRFU; uint32_t dwClockFrequency; uint32_t dwDataRate; -- To view, visit https://gerrit.osmocom.org/14053 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I0e370da11a0c95d0ea4a517aa6060f16e21adef0 Gerrit-Change-Number: 14053 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 18:26:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 18:26:33 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid_device: Make it compile In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14054 ) Change subject: ccid_device: Make it compile ...................................................................... ccid_device: Make it compile Change-Id: I0350fec36eeef69eeccb873f547c9df8b364ae12 --- M ccid/ccid_device.c 1 file changed, 47 insertions(+), 22 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/ccid/ccid_device.c b/ccid/ccid_device.c index c81f177..f10b700 100644 --- a/ccid/ccid_device.c +++ b/ccid/ccid_device.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include @@ -19,7 +20,7 @@ }; struct ccid_ops { - int (*send)(struct ccid_instance *ci, struct msgb *msg); + int (*send_in)(struct ccid_instance *ci, struct msgb *msg); }; struct ccid_instance { @@ -35,7 +36,7 @@ if (slot_nr >= sizeof(ci->slot)) return NULL; else - return &ci->slot[slot_nr] + return &ci->slot[slot_nr]; } static uint8_t get_icc_status(const struct ccid_slot *cs) @@ -67,7 +68,7 @@ static struct msgb *ccid_msgb_alloc(void) { - struct msgb *msg = msgb_alloc("ccid"); + struct msgb *msg = msgb_alloc(512, "ccid"); OSMO_ASSERT(msg); return msg; } @@ -79,10 +80,10 @@ static int ccid_slot_send(struct ccid_slot *cs, struct msgb *msg) { - const struct ccid_header *ch = (const struct ccid_header *) msgb_ccid_in(msg); + struct ccid_header *ch = (struct ccid_header *) msgb_ccid_in(msg); /* patch bSlotNr into message */ - ch->hdr.bSlot = cs->slot_nr; + ch->bSlot = cs->slot_nr; return ccid_send(cs->ci, msg); } @@ -93,11 +94,12 @@ uint32_t data_len) { struct msgb *msg = ccid_msgb_alloc(); - struct ccid_rdr_to_pc_data_block *db = msgb_put(msg, sizeof(*db) + data_len); + struct ccid_rdr_to_pc_data_block *db = + (struct ccid_rdr_to_pc_data_block *) msgb_put(msg, sizeof(*db) + data_len); uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | get_icc_status(cs); SET_HDR_IN(db, RDR_to_PC_DataBlock, cs->slot_nr, seq, sts, err); - db->hdr.dwLength = cpu_to_le32(data_len); + osmo_store32le(data_len, &db->hdr.hdr.dwLength); memcpy(db->abData, data, data_len); return msg; } @@ -107,7 +109,8 @@ enum ccid_error_code err) { struct msgb *msg = ccid_msgb_alloc(); - struct ccid_rdr_to_pc_slot_status *ss = msgb_put(msg, sizeof(*ss)); + struct ccid_rdr_to_pc_slot_status *ss = + (struct ccid_rdr_to_pc_slot_status *) msgb_put(msg, sizeof(*ss)); uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | get_icc_status(cs); SET_HDR_IN(ss, RDR_to_PC_SlotStatus, cs->slot_nr, seq, sts, err); @@ -123,11 +126,12 @@ uint32_t data_len) { struct msgb *msg = ccid_msgb_alloc(); - struct ccid_rdr_to_pc_escape *esc = msgb_put(msg, sizeof(*esc) + data_len); + struct ccid_rdr_to_pc_escape *esc = + (struct ccid_rdr_to_pc_escape *) msgb_put(msg, sizeof(*esc) + data_len); uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | get_icc_status(cs); SET_HDR_IN(esc, RDR_to_PC_Escape, cs->slot_nr, seq, sts, err); - esc->hdr.dwLength = cpu_to_le32(data_len); + osmo_store32le(data_len, &esc->hdr.hdr.dwLength); memcpy(esc->abData, data, data_len); return msg; } @@ -137,13 +141,14 @@ enum ccid_error_code err, uint32_t clock_khz, uint32_t rate_bps) { struct msgb *msg = ccid_msgb_alloc(); - struct ccid_rdr_to_pc_data_rate_and_clock *drc = msgb_put(msg, sizeof(*drc)); + struct ccid_rdr_to_pc_data_rate_and_clock *drc = + (struct ccid_rdr_to_pc_data_rate_and_clock *) msgb_put(msg, sizeof(*drc)); uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | get_icc_status(cs); SET_HDR_IN(drc, RDR_to_PC_DataRateAndClockFrequency, cs->slot_nr, seq, sts, err); - drc->dwLength = cpu_to_le32(8); /* Message-specific data length (wtf?) */ - drc->dwClockFrequency = cpu_to_le32(clock_khz); /* kHz */ - drc->dwDataRate = cpu_to_le32(rate_bps); /* bps */ + osmo_store32le(8, &drc->hdr.hdr.dwLength); /* Message-specific data length (wtf?) */ + osmo_store32le(clock_khz, &drc->dwClockFrequency); /* kHz */ + osmo_store32le(rate_bps, &drc->dwDataRate); /* bps */ return msg; } @@ -181,7 +186,7 @@ /* TODO: send actual ATR; handle error cases */ /* TODO: handle this asynchronously */ - resp = ccid_gen_data_block(cs, u->icc_power_on.hdr.hSeq, CCID_CMD_STATUS_OK, 0, NULL, 0); + resp = ccid_gen_data_block(cs, u->icc_power_on.hdr.bSeq, CCID_CMD_STATUS_OK, 0, NULL, 0); return ccid_send(cs->ci, resp); } @@ -190,6 +195,8 @@ static int ccid_handle_icc_power_off(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + struct msgb *resp; + resp = ccid_gen_slot_status(cs, u->get_slot_status.hdr.bSeq, CCID_CMD_STATUS_OK, 0); return ccid_send(cs->ci, resp); } @@ -198,7 +205,9 @@ static int ccid_handle_xfr_block(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); - resp = ccid_gen_data_block(cs, u->icc_power_on.hdr.hSeq, CCID_CMD_STATUS_OK, 0, NULL, 0); + struct msgb *resp; + + resp = ccid_gen_data_block(cs, u->icc_power_on.hdr.bSeq, CCID_CMD_STATUS_OK, 0, NULL, 0); return ccid_send(cs->ci, resp); } @@ -206,30 +215,36 @@ static int ccid_handle_get_parameters(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + struct msgb *resp; } /* Section 6.1.6 */ static int ccid_handle_reset_parameters(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + struct msgb *resp; } /* Section 6.1.7 */ static int ccid_handle_set_parameters(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + struct msgb *resp; } /* Section 6.1.8 */ static int ccid_handle_escape(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + struct msgb *resp; } /* Section 6.1.9 */ static int ccid_handle_icc_clock(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + struct msgb *resp; + resp = ccid_gen_slot_status(cs, u->get_slot_status.hdr.bSeq, CCID_CMD_STATUS_OK, 0); return ccid_send(cs->ci, resp); } @@ -238,6 +253,8 @@ static int ccid_handle_t0apdu(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + struct msgb *resp; + resp = ccid_gen_slot_status(cs, u->get_slot_status.hdr.bSeq, CCID_CMD_STATUS_OK, 0); return ccid_send(cs->ci, resp); } @@ -252,6 +269,8 @@ static int ccid_handle_mechanical(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + struct msgb *resp; + resp = ccid_gen_slot_status(cs, u->get_slot_status.hdr.bSeq, CCID_CMD_STATUS_OK, 0); return ccid_send(cs->ci, resp); } @@ -260,6 +279,8 @@ static int ccid_handle_abort(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + struct msgb *resp; + resp = ccid_gen_slot_status(cs, u->get_slot_status.hdr.bSeq, CCID_CMD_STATUS_OK, 0); return ccid_send(cs->ci, resp); } @@ -267,7 +288,8 @@ /* Section 6.1.14 */ static int ccid_handle_set_rate_and_clock(struct ccid_slot *cs, struct msgb *msg) { - const union ccid_pc_to_rdr *u = msgb_ccid(msg); + const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + struct msgb *resp; } /* handle data arriving from the host on the OUT endpoint */ @@ -277,13 +299,14 @@ const struct ccid_header *ch = (const struct ccid_header *) u; unsigned int len = msgb_length(msg); struct ccid_slot *cs; + int rc; if (len < sizeof(*ch)) { /* FIXME */ return -1; } - cs = get_ccid_slot(ci, ch->hdr.bSlot); + cs = get_ccid_slot(ci, ch->bSlot); if (!cs) { /* FIXME */ return -1; @@ -338,7 +361,7 @@ case PC_to_RDR_T0APDU: if (len != /*FIXME*/ sizeof(u->t0apdu)) goto short_msg; - rc = ccid_handle_t0_apdu(cs, msg); + rc = ccid_handle_t0apdu(cs, msg); break; case PC_to_RDR_Secure: if (len < sizeof(u->secure)) @@ -361,10 +384,12 @@ rc = ccid_handle_set_rate_and_clock(cs, msg); break; default: - FIXME + /* FIXME */ break; } - FIXME + return 0; + short_msg: - FIXME + /* FIXME */ + return -1; } -- To view, visit https://gerrit.osmocom.org/14054 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I0350fec36eeef69eeccb873f547c9df8b364ae12 Gerrit-Change-Number: 14054 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 18:26:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 18:26:33 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid_device: Return errors in case of invalid slot numbers In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14055 ) Change subject: ccid_device: Return errors in case of invalid slot numbers ...................................................................... ccid_device: Return errors in case of invalid slot numbers Change-Id: I4928425cc114c7af0068b13280fe89f428f44aab --- M ccid/ccid_device.c 1 file changed, 282 insertions(+), 49 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/ccid/ccid_device.c b/ccid/ccid_device.c index f10b700..340ff60 100644 --- a/ccid/ccid_device.c +++ b/ccid/ccid_device.c @@ -17,6 +17,7 @@ bool icc_present; bool icc_powered; bool icc_in_reset; + bool cmd_busy; }; struct ccid_ops { @@ -26,11 +27,16 @@ struct ccid_instance { struct ccid_slot slot[NR_SLOTS]; struct ccid_ops ops; + const char *name; }; #define msgb_ccid_out(x) (union ccid_pc_to_rdr *)msgb_data(x) #define msgb_ccid_in(x) (union ccid_rdr_to_pc *)msgb_data(x) +#define LOGPCI(ci, lvl, fmt, args ...) LOGP(DCCID, lvl, "%s: " fmt, (ci)->name, ## args) +#define LOGPCS(cs, lvl, fmt, args ...) \ + LOGP(DCCID, lvl, "%s(%u): " fmt, (cc)->ci->name, (cc)->slot_nr, ## args) + static struct ccid_slot *get_ccid_slot(struct ccid_instance *ci, uint8_t slot_nr) { if (slot_nr >= sizeof(ci->slot)) @@ -62,6 +68,14 @@ (x)->hdr.bError = error; \ } while (0) +#if 0 +static uint8_t ccid_pc_to_rdr_get_seq(const struct ccid_pc_to_rdr *u) +{ + const struct ccid_header *ch = (const struct ccid_header *) u; + return ch->bSeq; +} +#endif + /*********************************************************************** * Message generation / sending ***********************************************************************/ @@ -73,11 +87,13 @@ return msg; } +/* Send given CCID message */ static int ccid_send(struct ccid_instance *ci, struct msgb *msg) { return ci->ops.send_in(ci, msg); } +/* Send given CCID message for given slot; patch bSlot into message */ static int ccid_slot_send(struct ccid_slot *cs, struct msgb *msg) { struct ccid_header *ch = (struct ccid_header *) msgb_ccid_in(msg); @@ -87,80 +103,207 @@ return ccid_send(cs->ci, msg); } +/* Send given CCID message and mark slot as un-busy */ +static int ccid_slot_send_unbusy(struct ccid_slot *cs, struct msgb *msg) +{ + cs->cmd_busy = false; + return ccid_slot_send(cs, msg); +} /* Section 6.2.1 */ -static struct msgb *ccid_gen_data_block(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, - enum ccid_error_code err, const uint8_t *data, - uint32_t data_len) +static struct msgb *ccid_gen_data_block_nr(uint8_t slot_nr, uint8_t icc_status, uint8_t seq, + uint8_t cmd_sts, enum ccid_error_code err, + const uint8_t *data, uint32_t data_len) { struct msgb *msg = ccid_msgb_alloc(); - struct ccid_rdr_to_pc_data_block *db = + struct ccid_rdr_to_pc_data_block *db = (struct ccid_rdr_to_pc_data_block *) msgb_put(msg, sizeof(*db) + data_len); - uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | get_icc_status(cs); + uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | icc_status; - SET_HDR_IN(db, RDR_to_PC_DataBlock, cs->slot_nr, seq, sts, err); + SET_HDR_IN(db, RDR_to_PC_DataBlock, slot_nr, seq, sts, err); osmo_store32le(data_len, &db->hdr.hdr.dwLength); memcpy(db->abData, data, data_len); return msg; } +static struct msgb *ccid_gen_data_block(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, + enum ccid_error_code err, const uint8_t *data, + uint32_t data_len) +{ + return ccid_gen_data_block_nr(cs->slot_nr, get_icc_status(cs), seq, cmd_sts, err, data, data_len); +} /* Section 6.2.2 */ -static struct msgb *ccid_gen_slot_status(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, - enum ccid_error_code err) +static struct msgb *ccid_gen_slot_status_nr(uint8_t slot_nr, uint8_t icc_status, + uint8_t seq, uint8_t cmd_sts, + enum ccid_error_code err) { struct msgb *msg = ccid_msgb_alloc(); struct ccid_rdr_to_pc_slot_status *ss = (struct ccid_rdr_to_pc_slot_status *) msgb_put(msg, sizeof(*ss)); - uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | get_icc_status(cs); + uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | icc_status; - SET_HDR_IN(ss, RDR_to_PC_SlotStatus, cs->slot_nr, seq, sts, err); + SET_HDR_IN(ss, RDR_to_PC_SlotStatus, slot_nr, seq, sts, err); return msg; } +static struct msgb *ccid_gen_slot_status(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, + enum ccid_error_code err) +{ + return ccid_gen_slot_status_nr(cs->slot_nr, get_icc_status(cs), seq, cmd_sts, err); +} /* Section 6.2.3 */ -/* TODO */ +static struct msgb *ccid_gen_parameters_t0_nr(uint8_t slot_nr, uint8_t icc_status, + uint8_t seq, uint8_t cmd_sts, enum ccid_error_code err, + const struct ccid_proto_data_t0 *t0) +{ + struct msgb *msg = ccid_msgb_alloc(); + struct ccid_rdr_to_pc_parameters *par = + (struct ccid_rdr_to_pc_parameters *) msgb_put(msg, sizeof(par->hdr)+sizeof(*t0)); + uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | icc_status; + + SET_HDR_IN(par, RDR_to_PC_Parameters, slot_nr, seq, sts, err); + if (t0) { + osmo_store32le(sizeof(*t0), &par->hdr.hdr.dwLength); + par->abProtocolData.t0 = *t0; + } + return msg; +} +static struct msgb *ccid_gen_parameters_t0(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, + enum ccid_error_code err, + const struct ccid_proto_data_t0 *t0) +{ + return ccid_gen_parameters_t0_nr(cs->slot_nr, get_icc_status(cs), seq, cmd_sts, err, t0); +} + +static struct msgb *ccid_gen_parameters_t1_nr(uint8_t slot_nr, uint8_t icc_status, + uint8_t seq, uint8_t cmd_sts, enum ccid_error_code err, + const struct ccid_proto_data_t1 *t1) +{ + struct msgb *msg = ccid_msgb_alloc(); + struct ccid_rdr_to_pc_parameters *par = + (struct ccid_rdr_to_pc_parameters *) msgb_put(msg, sizeof(par->hdr)+sizeof(*t1)); + uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | icc_status; + + SET_HDR_IN(par, RDR_to_PC_Parameters, slot_nr, seq, sts, err); + if (t1) { + osmo_store32le(sizeof(*t1), &par->hdr.hdr.dwLength); + par->abProtocolData.t1 = *t1; + } + return msg; +} +static struct msgb *ccid_gen_parameters_t1(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, + enum ccid_error_code err, + const struct ccid_proto_data_t1 *t1) +{ + return ccid_gen_parameters_t1_nr(cs->slot_nr, get_icc_status(cs), seq, cmd_sts, err, t1); +} + /* Section 6.2.4 */ -static struct msgb *ccid_gen_escape(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, - enum ccid_error_code err, const uint8_t *data, - uint32_t data_len) +static struct msgb *ccid_gen_escape_nr(uint8_t slot_nr, uint8_t icc_status, uint8_t seq, uint8_t cmd_sts, + enum ccid_error_code err, const uint8_t *data, uint32_t data_len) { struct msgb *msg = ccid_msgb_alloc(); struct ccid_rdr_to_pc_escape *esc = (struct ccid_rdr_to_pc_escape *) msgb_put(msg, sizeof(*esc) + data_len); - uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | get_icc_status(cs); + uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | icc_status; - SET_HDR_IN(esc, RDR_to_PC_Escape, cs->slot_nr, seq, sts, err); + SET_HDR_IN(esc, RDR_to_PC_Escape, slot_nr, seq, sts, err); osmo_store32le(data_len, &esc->hdr.hdr.dwLength); memcpy(esc->abData, data, data_len); return msg; } +static struct msgb *ccid_gen_escape(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, + enum ccid_error_code err, const uint8_t *data, + uint32_t data_len) +{ + return ccid_gen_escape_nr(cs->slot_nr, get_icc_status(cs), seq, cmd_sts, err, data, data_len); +} /* Section 6.2.5 */ -static struct msgb *ccid_gen_clock_and_rate(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, - enum ccid_error_code err, uint32_t clock_khz, uint32_t rate_bps) +static struct msgb *ccid_gen_clock_and_rate_nr(uint8_t slot_nr, uint8_t icc_status, uint8_t seq, + uint8_t cmd_sts, enum ccid_error_code err, + uint32_t clock_khz, uint32_t rate_bps) { struct msgb *msg = ccid_msgb_alloc(); struct ccid_rdr_to_pc_data_rate_and_clock *drc = (struct ccid_rdr_to_pc_data_rate_and_clock *) msgb_put(msg, sizeof(*drc)); - uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | get_icc_status(cs); + uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | icc_status; - SET_HDR_IN(drc, RDR_to_PC_DataRateAndClockFrequency, cs->slot_nr, seq, sts, err); + SET_HDR_IN(drc, RDR_to_PC_DataRateAndClockFrequency, slot_nr, seq, sts, err); osmo_store32le(8, &drc->hdr.hdr.dwLength); /* Message-specific data length (wtf?) */ osmo_store32le(clock_khz, &drc->dwClockFrequency); /* kHz */ osmo_store32le(rate_bps, &drc->dwDataRate); /* bps */ return msg; } - - - -#if 0 -static struct msgb *gen_err_resp(struct ccid_instance *ci, enum ccid_msg_type msg_type, - enum ccid_error_code err_code) +static struct msgb *ccid_gen_clock_and_rate(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, + enum ccid_error_code err, uint32_t clock_khz, + uint32_t rate_bps) { - struct c + return ccid_gen_clock_and_rate_nr(cs->slot_nr, get_icc_status(cs), seq, cmd_sts, err, + clock_khz, rate_bps); } -#endif + +/*! generate an error response for given input message_type/slot_nr/seq + * \param[in] msg_type CCID Message Type against which response is to be created + * \param[in] slot_nr CCID Slot Number + * \param[in] icc_status ICC Status of the slot + * \param[in] seq CCID Sequence number + * \param[in] err_code CCID Error Code to send + * \returns dynamically-allocated message buffer containing error response */ +static struct msgb *gen_err_resp(enum ccid_msg_type msg_type, uint8_t slot_nr, uint8_t icc_status, + uint8_t seq, enum ccid_error_code err_code) +{ + struct msgb *resp = NULL; + + switch (msg_type) { + case PC_to_RDR_IccPowerOn: + case PC_to_RDR_XfrBlock: + case PC_to_RDR_Secure: + /* Return RDR_to_PC_DataBlock */ + resp = ccid_gen_data_block_nr(slot_nr, icc_status, seq, CCID_CMD_STATUS_FAILED, + err_code, NULL, 0); + break; + + case PC_to_RDR_IccPowerOff: + case PC_to_RDR_GetSlotStatus: + case PC_to_RDR_IccClock: + case PC_to_RDR_T0APDU: + case PC_to_RDR_Mechanical: + case PC_to_RDR_Abort: + /* Return RDR_to_PC_SlotStatus */ + resp = ccid_gen_slot_status_nr(slot_nr, icc_status, seq, CCID_CMD_STATUS_FAILED, + err_code); + break; + + case PC_to_RDR_GetParameters: + case PC_to_RDR_ResetParameters: + case PC_to_RDR_SetParameters: + /* Return RDR_to_PC_Parameters */ + resp = ccid_gen_parameters_t0_nr(slot_nr, icc_status, seq, CCID_CMD_STATUS_FAILED, + err_code, NULL); /* FIXME: parameters? */ + break; + + case PC_to_RDR_Escape: + /* Return RDR_to_PC_Escape */ + resp = ccid_gen_escape_nr(slot_nr, icc_status, seq, CCID_CMD_STATUS_FAILED, + err_code, NULL, 0); + break; + + case PC_to_RDR_SetDataRateAndClockFrequency: + /* Return RDR_to_PC_SlotStatus */ + resp = ccid_gen_slot_status_nr(slot_nr, icc_status, seq, CCID_CMD_STATUS_FAILED, + err_code); + break; + + default: + /* generate general error */ + resp = ccid_gen_slot_status_nr(slot_nr, icc_status, seq, CCID_CMD_STATUS_FAILED, + CCID_ERR_CMD_NOT_SUPPORTED); + break; + } + return resp; +} /*********************************************************************** * Message reception / parsing @@ -170,11 +313,13 @@ static int ccid_handle_get_slot_status(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->get_slot_status.hdr.bSeq; struct msgb *resp; - resp = ccid_gen_slot_status(cs, u->get_slot_status.hdr.bSeq, CCID_CMD_STATUS_OK, 0); + resp = ccid_gen_slot_status(cs, seq, CCID_CMD_STATUS_OK, 0); - return ccid_send(cs->ci, resp); + return ccid_slot_send_unbusy(cs, resp); } @@ -182,123 +327,195 @@ static int ccid_handle_icc_power_on(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->icc_power_on.hdr.bSeq; struct msgb *resp; /* TODO: send actual ATR; handle error cases */ /* TODO: handle this asynchronously */ - resp = ccid_gen_data_block(cs, u->icc_power_on.hdr.bSeq, CCID_CMD_STATUS_OK, 0, NULL, 0); + resp = ccid_gen_data_block(cs, seq, CCID_CMD_STATUS_OK, 0, NULL, 0); - return ccid_send(cs->ci, resp); + return ccid_slot_send_unbusy(cs, resp); } /* Section 6.1.2 */ static int ccid_handle_icc_power_off(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->icc_power_off.hdr.bSeq; struct msgb *resp; - resp = ccid_gen_slot_status(cs, u->get_slot_status.hdr.bSeq, CCID_CMD_STATUS_OK, 0); - return ccid_send(cs->ci, resp); + /* FIXME */ + resp = ccid_gen_slot_status(cs, seq, CCID_CMD_STATUS_OK, 0); + return ccid_slot_send_unbusy(cs, resp); } /* Section 6.1.4 */ static int ccid_handle_xfr_block(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->xfr_block.hdr.bSeq; struct msgb *resp; - resp = ccid_gen_data_block(cs, u->icc_power_on.hdr.bSeq, CCID_CMD_STATUS_OK, 0, NULL, 0); - return ccid_send(cs->ci, resp); + /* FIXME */ + resp = ccid_gen_data_block(cs, seq, CCID_CMD_STATUS_OK, 0, NULL, 0); + return ccid_slot_send_unbusy(cs, resp); } /* Section 6.1.5 */ static int ccid_handle_get_parameters(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->get_parameters.hdr.bSeq; struct msgb *resp; + + /* FIXME */ + return ccid_slot_send_unbusy(cs, resp); } /* Section 6.1.6 */ static int ccid_handle_reset_parameters(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->reset_parameters.hdr.bSeq; struct msgb *resp; + + /* FIXME */ + return ccid_slot_send_unbusy(cs, resp); } /* Section 6.1.7 */ static int ccid_handle_set_parameters(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->set_parameters.hdr.bSeq; struct msgb *resp; + + /* FIXME */ + return ccid_slot_send_unbusy(cs, resp); } /* Section 6.1.8 */ static int ccid_handle_escape(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->escape.hdr.bSeq; struct msgb *resp; + + resp = ccid_gen_escape(cs, seq, CCID_CMD_STATUS_FAILED, CCID_ERR_CMD_NOT_SUPPORTED, NULL, 0); + return ccid_slot_send_unbusy(cs, resp); } /* Section 6.1.9 */ static int ccid_handle_icc_clock(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->icc_clock.hdr.bSeq; struct msgb *resp; - resp = ccid_gen_slot_status(cs, u->get_slot_status.hdr.bSeq, CCID_CMD_STATUS_OK, 0); - return ccid_send(cs->ci, resp); + /* FIXME: Actually Stop/Start the clock */ + resp = ccid_gen_slot_status(cs, seq, CCID_CMD_STATUS_OK, 0); + return ccid_slot_send_unbusy(cs, resp); } /* Section 6.1.10 */ static int ccid_handle_t0apdu(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->t0apdu.hdr.bSeq; struct msgb *resp; - resp = ccid_gen_slot_status(cs, u->get_slot_status.hdr.bSeq, CCID_CMD_STATUS_OK, 0); - return ccid_send(cs->ci, resp); + /* FIXME */ + //resp = ccid_gen_slot_status(cs, seq, CCID_CMD_STATUS_OK, 0); + resp = ccid_gen_slot_status(cs, seq, CCID_CMD_STATUS_FAILED, CCID_ERR_CMD_NOT_SUPPORTED); + return ccid_slot_send_unbusy(cs, resp); } /* Section 6.1.11 */ static int ccid_handle_secure(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->secure.hdr.bSeq; + struct msgb *resp; + + /* FIXME */ + resp = ccid_gen_slot_status(cs, seq, CCID_CMD_STATUS_FAILED, CCID_ERR_CMD_NOT_SUPPORTED); + return ccid_slot_send_unbusy(cs, resp); } /* Section 6.1.12 */ static int ccid_handle_mechanical(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->mechanical.hdr.bSeq; struct msgb *resp; - resp = ccid_gen_slot_status(cs, u->get_slot_status.hdr.bSeq, CCID_CMD_STATUS_OK, 0); - return ccid_send(cs->ci, resp); + resp = ccid_gen_slot_status(cs, seq, CCID_CMD_STATUS_FAILED, CCID_ERR_CMD_NOT_SUPPORTED); + return ccid_slot_send_unbusy(cs, resp); } /* Section 6.1.13 */ static int ccid_handle_abort(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->abort.hdr.bSeq; struct msgb *resp; - resp = ccid_gen_slot_status(cs, u->get_slot_status.hdr.bSeq, CCID_CMD_STATUS_OK, 0); - return ccid_send(cs->ci, resp); + /* Check if the currently in-progress message is Abortable */ + switch (0/* FIXME */) { + case PC_to_RDR_IccPowerOn: + case PC_to_RDR_XfrBlock: + case PC_to_RDR_Escape: + case PC_to_RDR_Secure: + case PC_to_RDR_Mechanical: + //case PC_to_RDR_Abort: /* seriously? WTF! */ + break; + default: + /* CCID spec lists CMD_NOT_ABORTED, but gives no numberic value ?!? */ + resp = ccid_gen_slot_status(cs, seq, CCID_CMD_STATUS_FAILED, CCID_ERR_CMD_NOT_SUPPORTED); + return ccid_slot_send_unbusy(cs, resp); + } + + /* FIXME */ + resp = ccid_gen_slot_status(cs, seq, CCID_CMD_STATUS_OK, 0); + return ccid_slot_send_unbusy(cs, resp); } /* Section 6.1.14 */ static int ccid_handle_set_rate_and_clock(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_header *ch = (const struct ccid_header *) u; + uint8_t seq = u->set_rate_and_clock.hdr.bSeq; struct msgb *resp; + + /* FIXME */ + resp = ccid_gen_clock_and_rate(cs, seq, CCID_CMD_STATUS_OK, 0, 9600, 2500000); + return ccid_slot_send_unbusy(cs, resp); } -/* handle data arriving from the host on the OUT endpoint */ +/*! Handle data arriving from the host on the OUT endpoint. + * \param[in] cs CCID Instance on which to operate + * \param[in] msgb received message buffer containing one CCID OUT EP message from the host + * \returns 0 on success; negative on error */ int ccid_handle_out(struct ccid_instance *ci, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); const struct ccid_header *ch = (const struct ccid_header *) u; unsigned int len = msgb_length(msg); struct ccid_slot *cs; + struct msgb *resp; int rc; if (len < sizeof(*ch)) { @@ -306,12 +523,26 @@ return -1; } + /* Check for invalid slot number */ cs = get_ccid_slot(ci, ch->bSlot); if (!cs) { - /* FIXME */ - return -1; + resp = gen_err_resp(ch->bMessageType, ch->bSlot, CCID_ICC_STATUS_NO_ICC, ch->bSeq, 5); + return ccid_send(ci, resp); } + /* Check if slot is already busy; Reject any additional commands meanwhile */ + if (cs->cmd_busy) { + /* FIXME: ABORT logic as per section 5.3.1 of CCID Spec v1.1 */ + resp = gen_err_resp(ch->bMessageType, ch->bSlot, get_icc_status(cs), ch->bSeq, + CCID_ERR_CMD_SLOT_BUSY); + return ccid_send(ci, resp); + } + + /* we're now processing a command for the slot; mark slot as busy */ + cs->cmd_busy = true; + + /* TODO: enqueue into the per-slot specific input queue */ + switch (ch->bMessageType) { case PC_to_RDR_GetSlotStatus: if (len != sizeof(u->get_slot_status)) @@ -384,8 +615,10 @@ rc = ccid_handle_set_rate_and_clock(cs, msg); break; default: - /* FIXME */ - break; + /* generic response with bERror = 0 (command not supported) */ + resp = gen_err_resp(ch->bMessageType, ch->bSlot, CCID_ICC_STATUS_NO_ICC, ch->bSeq, + CCID_ERR_CMD_NOT_SUPPORTED); + return ccid_slot_send_unbusy(cs, resp); } return 0; -- To view, visit https://gerrit.osmocom.org/14055 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I4928425cc114c7af0068b13280fe89f428f44aab Gerrit-Change-Number: 14055 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 18:26:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 18:26:33 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid: Build with -Wall In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14056 ) Change subject: ccid: Build with -Wall ...................................................................... ccid: Build with -Wall Change-Id: I50cf270aefa4c9fd0d7ab27a9a6e4716a2e95416 --- M ccid/Makefile 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/ccid/Makefile b/ccid/Makefile index a259c90..018b223 100644 --- a/ccid/Makefile +++ b/ccid/Makefile @@ -1,10 +1,10 @@ - +CFLAGS=-Wall -g ccid_descriptors: ccid_descriptors.o ccid_proto.o - $(CC) -lasan -losmocore -laio -o $@ $^ + $(CC) $(CFLAGS) -lasan -losmocore -laio -o $@ $^ %.o: %.c - $(CC) -o $@ -c $^ + $(CC) $(CFLAGS) -o $@ -c $^ clean: rm ccid_descriptors *.o -- To view, visit https://gerrit.osmocom.org/14056 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I50cf270aefa4c9fd0d7ab27a9a6e4716a2e95416 Gerrit-Change-Number: 14056 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 18:26:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 18:26:33 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid: Implement encode/decode of ProtocolParameters In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14057 ) Change subject: ccid: Implement encode/decode of ProtocolParameters ...................................................................... ccid: Implement encode/decode of ProtocolParameters Change-Id: Id6c436916a54b98a11809a58e9154e3e9b627885 --- M ccid/ccid_device.c M ccid/ccid_proto.h 2 files changed, 175 insertions(+), 20 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/ccid/ccid_device.c b/ccid/ccid_device.c index 340ff60..02d1599 100644 --- a/ccid/ccid_device.c +++ b/ccid/ccid_device.c @@ -11,6 +11,28 @@ #define NR_SLOTS 8 +struct ccid_pars_decoded { + /* global for T0/T1 */ + uint8_t fi; + uint8_t di; + enum ccid_clock_stop clock_stop; + bool inverse_convention; + + struct { + uint8_t guard_time_etu; + uint8_t waiting_integer; + } t0; + + struct { + enum ccid_t1_csum_type csum_type; + uint8_t guard_time_t1; + uint8_t bwi; + uint8_t cwi; + uint8_t ifsc; + uint8_t nad; + } t1; +}; + struct ccid_slot { struct ccid_instance *ci; uint8_t slot_nr; @@ -18,8 +40,100 @@ bool icc_powered; bool icc_in_reset; bool cmd_busy; + struct ccid_pars_decoded pars; }; +/* decode on-the-wire T0 parameters into their parsed form */ +static int decode_ccid_pars_t0(struct ccid_pars_decoded *out, const struct ccid_proto_data_t0 *in) +{ + /* input validation: only 0x00 and 0x02 permitted for bmTCCKST0 */ + if (in->bmTCCKST0 & 0xFD) + return -11; + /* input validation: only 0x00 to 0x03 permitted for bClockSTop */ + if (in->bClockStop & 0xFC) + return -14; + + out->fi = in->bmFindexDindex >> 4; + out->di = in->bmFindexDindex & 0xF; + if (in->bmTCCKST0 & 2) + out->inverse_convention = true; + else + out->inverse_convention = false; + if (in->bGuardTimeT0 == 0xff) + out->t0.guard_time_etu = 0; + else + out->t0.guard_time_etu = in->bGuardTimeT0; + out->t0.waiting_integer = in->bWaitingIntegerT0; + out->clock_stop = in->bClockStop & 0x03; + + return 0; +} + +/* encode T0 parameters from parsed form into on-the-wire encoding */ +static void encode_ccid_pars_t0(struct ccid_proto_data_t0 *out, const struct ccid_pars_decoded *in) +{ + out->bmFindexDindex = ((in->fi << 4) & 0xF0) | (in->di & 0x0F); + if (in->inverse_convention) + out->bmTCCKST0 = 0x02; + else + out->bmTCCKST0 = 0x00; + out->bGuardTimeT0 = in->t0.guard_time_etu; + out->bWaitingIntegerT0 = in->t0.waiting_integer; + out->bClockStop = in->clock_stop & 0x03; +} + +/* decode on-the-wire T1 parameters into their parsed form */ +static int decode_ccid_pars_t1(struct ccid_pars_decoded *out, const struct ccid_proto_data_t1 *in) +{ + /* input validation: only some values permitted for bmTCCKST0 */ + if (in->bmTCCKST1 & 0xE8) + return -11; + /* input validation: only 0x00 to 0x9F permitted for bmWaitingIntegersT1 */ + if (in->bWaitingIntegersT1 > 0x9F) + return -13; + /* input validation: only 0x00 to 0x03 permitted for bClockSTop */ + if (in->bClockStop & 0xFC) + return -14; + /* input validation: only 0x00 to 0xFE permitted for bIFSC */ + if (in->bIFSC > 0xFE) + return -15; + + out->fi = in->bmFindexDindex >> 4; + out->di = in->bmFindexDindex & 0xF; + if (in->bmTCCKST1 & 1) + out->t1.csum_type = CCID_CSUM_TYPE_CRC; + else + out->t1.csum_type = CCID_CSUM_TYPE_LRC; + if (in->bmTCCKST1 & 2) + out->inverse_convention = true; + else + out->inverse_convention = false; + out->t1.guard_time_t1 = in->bGuardTimeT1; + out->t1.bwi = in->bWaitingIntegersT1 >> 4; + out->t1.cwi = in->bWaitingIntegersT1 & 0xF; + out->clock_stop = in->bClockStop & 0x03; + out->t1.ifsc = in->bIFSC; + out->t1.nad = in->bNadValue; + + return 0; +} + +/* encode T1 parameters from parsed form into on-the-wire encoding */ +static void encode_ccid_pars_t1(struct ccid_proto_data_t1 *out, const struct ccid_pars_decoded *in) +{ + out->bmFindexDindex = ((in->fi << 4) & 0xF0) | (in->di & 0x0F); + out->bmTCCKST1 = 0x10; + if (in->t1.csum_type == CCID_CSUM_TYPE_CRC) + out->bmTCCKST1 |= 0x01; + if (in->inverse_convention) + out->bmTCCKST1 |= 0x02; + out->bGuardTimeT1 = in->t1.guard_time_t1; + out->bWaitingIntegersT1 = ((in->t1.bwi << 4) & 0xF0) | (in->t1.cwi & 0x0F); + out->bClockStop = in->clock_stop & 0x03; + out->bIFSC = in->t1.ifsc; + out->bNadValue = in->t1.nad; +} + struct ccid_ops { int (*send_in)(struct ccid_instance *ci, struct msgb *msg); }; @@ -154,48 +268,46 @@ /* Section 6.2.3 */ static struct msgb *ccid_gen_parameters_t0_nr(uint8_t slot_nr, uint8_t icc_status, uint8_t seq, uint8_t cmd_sts, enum ccid_error_code err, - const struct ccid_proto_data_t0 *t0) + const struct ccid_pars_decoded *dec_par) { struct msgb *msg = ccid_msgb_alloc(); struct ccid_rdr_to_pc_parameters *par = - (struct ccid_rdr_to_pc_parameters *) msgb_put(msg, sizeof(par->hdr)+sizeof(*t0)); + (struct ccid_rdr_to_pc_parameters *) msgb_put(msg, sizeof(par->hdr)+sizeof(par->abProtocolData.t0)); uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | icc_status; SET_HDR_IN(par, RDR_to_PC_Parameters, slot_nr, seq, sts, err); - if (t0) { - osmo_store32le(sizeof(*t0), &par->hdr.hdr.dwLength); - par->abProtocolData.t0 = *t0; + if (dec_par) { + osmo_store32le(sizeof(par->abProtocolData.t0), &par->hdr.hdr.dwLength); + encode_ccid_pars_t0(&par->abProtocolData.t0, dec_par); } return msg; } static struct msgb *ccid_gen_parameters_t0(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, - enum ccid_error_code err, - const struct ccid_proto_data_t0 *t0) + enum ccid_error_code err) { - return ccid_gen_parameters_t0_nr(cs->slot_nr, get_icc_status(cs), seq, cmd_sts, err, t0); + return ccid_gen_parameters_t0_nr(cs->slot_nr, get_icc_status(cs), seq, cmd_sts, err, &cs->pars); } static struct msgb *ccid_gen_parameters_t1_nr(uint8_t slot_nr, uint8_t icc_status, uint8_t seq, uint8_t cmd_sts, enum ccid_error_code err, - const struct ccid_proto_data_t1 *t1) + const struct ccid_pars_decoded *dec_par) { struct msgb *msg = ccid_msgb_alloc(); struct ccid_rdr_to_pc_parameters *par = - (struct ccid_rdr_to_pc_parameters *) msgb_put(msg, sizeof(par->hdr)+sizeof(*t1)); + (struct ccid_rdr_to_pc_parameters *) msgb_put(msg, sizeof(par->hdr)+sizeof(par->abProtocolData.t1)); uint8_t sts = (cmd_sts & CCID_CMD_STATUS_MASK) | icc_status; SET_HDR_IN(par, RDR_to_PC_Parameters, slot_nr, seq, sts, err); - if (t1) { - osmo_store32le(sizeof(*t1), &par->hdr.hdr.dwLength); - par->abProtocolData.t1 = *t1; + if (dec_par) { + osmo_store32le(sizeof(par->abProtocolData.t1), &par->hdr.hdr.dwLength); + encode_ccid_pars_t1(&par->abProtocolData.t1, dec_par); } return msg; } static struct msgb *ccid_gen_parameters_t1(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, - enum ccid_error_code err, - const struct ccid_proto_data_t1 *t1) + enum ccid_error_code err) { - return ccid_gen_parameters_t1_nr(cs->slot_nr, get_icc_status(cs), seq, cmd_sts, err, t1); + return ccid_gen_parameters_t1_nr(cs->slot_nr, get_icc_status(cs), seq, cmd_sts, err, &cs->pars); } @@ -372,7 +484,8 @@ uint8_t seq = u->get_parameters.hdr.bSeq; struct msgb *resp; - /* FIXME */ + /* FIXME: T=1 */ + resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_OK, 0); return ccid_slot_send_unbusy(cs, resp); } @@ -384,7 +497,9 @@ uint8_t seq = u->reset_parameters.hdr.bSeq; struct msgb *resp; - /* FIXME */ + /* FIXME: copy default parameters from somewhere */ + /* FIXME: T=1 */ + resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_OK, 0); return ccid_slot_send_unbusy(cs, resp); } @@ -392,11 +507,34 @@ static int ccid_handle_set_parameters(struct ccid_slot *cs, struct msgb *msg) { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); + const struct ccid_pc_to_rdr_set_parameters *spar = &u->set_parameters; const struct ccid_header *ch = (const struct ccid_header *) u; uint8_t seq = u->set_parameters.hdr.bSeq; + struct ccid_pars_decoded pars_dec; struct msgb *resp; + int rc; - /* FIXME */ + switch (spar->bProtocolNum) { + case CCID_PROTOCOL_NUM_T0: + rc = decode_ccid_pars_t0(&pars_dec, &spar->abProtocolData.t0); + if (rc < 0) + resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_FAILED, -rc); + /* FIXME: validate parameters; abort if they are not supported */ + cs->pars = pars_dec; + resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_OK, 0); + break; + case CCID_PROTOCOL_NUM_T1: + rc = decode_ccid_pars_t1(&pars_dec, &spar->abProtocolData.t1); + if (rc < 0) + resp = ccid_gen_parameters_t1(cs, seq, CCID_CMD_STATUS_FAILED, -rc); + /* FIXME: validate parameters; abort if they are not supported */ + cs->pars = pars_dec; + resp = ccid_gen_parameters_t1(cs, seq, CCID_CMD_STATUS_OK, 0); + break; + default: + resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_FAILED, 0); + break; + } return ccid_slot_send_unbusy(cs, resp); } diff --git a/ccid/ccid_proto.h b/ccid/ccid_proto.h index fa0ead1..92878dc 100644 --- a/ccid/ccid_proto.h +++ b/ccid/ccid_proto.h @@ -132,6 +132,23 @@ /* Response: RDR_to_PC_Parameters */ /* Section 6.1.7 */ +enum ccid_protocol_num { + CCID_PROTOCOL_NUM_T0 = 0x00, + CCID_PROTOCOL_NUM_T1 = 0x01, + CCID_PROTOCOL_NUM_2WIRE = 0x80, + CCID_PROTOCOL_NUM_3WIRE = 0x81, + CCID_PROTOCOL_NUM_I2C = 0x82, +}; +enum ccid_clock_stop { + CCID_CLOCK_STOP_NOTALLOWED = 0x00, + CCID_CLOCK_STOP_LOW = 0x01, + CCID_CLOCK_STOP_HIGH = 0x02, + CCID_CLOCK_STOP_EITHER = 0x03, +}; +enum ccid_t1_csum_type { + CCID_CSUM_TYPE_LRC = 0, + CCID_CSUM_TYPE_CRC = 1, +}; struct ccid_proto_data_t0 { uint8_t bmFindexDindex; uint8_t bmTCCKST0; @@ -145,7 +162,7 @@ uint8_t bGuardTimeT1; uint8_t bWaitingIntegersT1; uint8_t bClockStop; - uint8_t bFSC; + uint8_t bIFSC; uint8_t bNadValue; } __attribute__ ((packed)); struct ccid_pc_to_rdr_set_parameters { -- To view, visit https://gerrit.osmocom.org/14057 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id6c436916a54b98a11809a58e9154e3e9b627885 Gerrit-Change-Number: 14057 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 18:26:34 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 18:26:34 +0000 Subject: Change in osmo-ccid-firmware[master]: Add ccid_device.h file for ccid_device.c In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14058 ) Change subject: Add ccid_device.h file for ccid_device.c ...................................................................... Add ccid_device.h file for ccid_device.c Change-Id: I1b171ede38deebfa525a0ee10865da2dc5ec7e4e --- M ccid/ccid_device.c A ccid/ccid_device.h 2 files changed, 71 insertions(+), 48 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/ccid/ccid_device.c b/ccid/ccid_device.c index 02d1599..b7077df 100644 --- a/ccid/ccid_device.c +++ b/ccid/ccid_device.c @@ -8,40 +8,7 @@ #include #include "ccid_proto.h" - -#define NR_SLOTS 8 - -struct ccid_pars_decoded { - /* global for T0/T1 */ - uint8_t fi; - uint8_t di; - enum ccid_clock_stop clock_stop; - bool inverse_convention; - - struct { - uint8_t guard_time_etu; - uint8_t waiting_integer; - } t0; - - struct { - enum ccid_t1_csum_type csum_type; - uint8_t guard_time_t1; - uint8_t bwi; - uint8_t cwi; - uint8_t ifsc; - uint8_t nad; - } t1; -}; - -struct ccid_slot { - struct ccid_instance *ci; - uint8_t slot_nr; - bool icc_present; - bool icc_powered; - bool icc_in_reset; - bool cmd_busy; - struct ccid_pars_decoded pars; -}; +#include "ccid_device.h" /* decode on-the-wire T0 parameters into their parsed form */ static int decode_ccid_pars_t0(struct ccid_pars_decoded *out, const struct ccid_proto_data_t0 *in) @@ -134,23 +101,9 @@ out->bNadValue = in->t1.nad; } -struct ccid_ops { - int (*send_in)(struct ccid_instance *ci, struct msgb *msg); -}; - -struct ccid_instance { - struct ccid_slot slot[NR_SLOTS]; - struct ccid_ops ops; - const char *name; -}; - #define msgb_ccid_out(x) (union ccid_pc_to_rdr *)msgb_data(x) #define msgb_ccid_in(x) (union ccid_rdr_to_pc *)msgb_data(x) -#define LOGPCI(ci, lvl, fmt, args ...) LOGP(DCCID, lvl, "%s: " fmt, (ci)->name, ## args) -#define LOGPCS(cs, lvl, fmt, args ...) \ - LOGP(DCCID, lvl, "%s(%u): " fmt, (cc)->ci->name, (cc)->slot_nr, ## args) - static struct ccid_slot *get_ccid_slot(struct ccid_instance *ci, uint8_t slot_nr) { if (slot_nr >= sizeof(ci->slot)) diff --git a/ccid/ccid_device.h b/ccid/ccid_device.h new file mode 100644 index 0000000..c7cef47 --- /dev/null +++ b/ccid/ccid_device.h @@ -0,0 +1,70 @@ +#pragma once +#include +#include + + +#define NR_SLOTS 8 + +#define LOGPCI(ci, lvl, fmt, args ...) LOGP(DCCID, lvl, "%s: " fmt, (ci)->name, ## args) +#define LOGPCS(cs, lvl, fmt, args ...) \ + LOGP(DCCID, lvl, "%s(%u): " fmt, (cc)->ci->name, (cc)->slot_nr, ## args) + +struct msgb; + +struct ccid_pars_decoded { + /* global for T0/T1 */ + uint8_t fi; + uint8_t di; + enum ccid_clock_stop clock_stop; + bool inverse_convention; + + struct { + uint8_t guard_time_etu; + uint8_t waiting_integer; + } t0; + + struct { + enum ccid_t1_csum_type csum_type; + uint8_t guard_time_t1; + uint8_t bwi; + uint8_t cwi; + uint8_t ifsc; + uint8_t nad; + } t1; +}; + +struct ccid_slot { + /* back-pointer to the ccid_instance */ + struct ccid_instance *ci; + /* number of this slot (0 = first) */ + uint8_t slot_nr; + /* is there an ICC physically present (card detect)? */ + bool icc_present; + /* was there an ICC present during the last NotifSlotStatus? + * should be set to zero every USB resume and setConfig != 0 */ + bool icc_present_last; + /* is the ICC physically powered? */ + bool icc_powered; + /* is the ICC currently in reset? */ + bool icc_in_reset; + /* is this slot currently busy with processing a CCID command? */ + bool cmd_busy; + /* decided CCID parameters */ + struct ccid_pars_decoded pars; +}; + +/* CCID operations */ +struct ccid_ops { + int (*send_in)(struct ccid_instance *ci, struct msgb *msg); +}; + +/* An instance of CCID (i.e. a card reader device) */ +struct ccid_instance { + /* slots within the reader */ + struct ccid_slot slot[NR_SLOTS]; + /* set of function pointers implementing specific operations */ + const struct ccid_ops ops; + const char *name; +}; + +int ccid_handle_out(struct ccid_instance *ci, struct msgb *msg); -- To view, visit https://gerrit.osmocom.org/14058 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I1b171ede38deebfa525a0ee10865da2dc5ec7e4e Gerrit-Change-Number: 14058 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 18:26:34 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 18:26:34 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid: tie ccid_device implementation into ccid_descriptors.c In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14059 ) Change subject: ccid: tie ccid_device implementation into ccid_descriptors.c ...................................................................... ccid: tie ccid_device implementation into ccid_descriptors.c Change-Id: Iaf40e8e455f79f7db71de767c442ba9e98961e0f --- M ccid/Makefile M ccid/ccid_descriptors.c 2 files changed, 22 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/ccid/Makefile b/ccid/Makefile index 018b223..e23823a 100644 --- a/ccid/Makefile +++ b/ccid/Makefile @@ -1,6 +1,6 @@ CFLAGS=-Wall -g -ccid_descriptors: ccid_descriptors.o ccid_proto.o +ccid_descriptors: ccid_descriptors.o ccid_proto.o ccid_device.o $(CC) $(CFLAGS) -lasan -losmocore -laio -o $@ $^ %.o: %.c diff --git a/ccid/ccid_descriptors.c b/ccid/ccid_descriptors.c index 7117fbb..84eb70c 100644 --- a/ccid/ccid_descriptors.c +++ b/ccid/ccid_descriptors.c @@ -6,7 +6,6 @@ #include "ccid_proto.h" - #if __BYTE_ORDER == __LITTLE_ENDIAN #define cpu_to_le16(x) (x) #define cpu_to_le32(x) (x) @@ -132,11 +131,14 @@ #include #include #include +#include + +#include "ccid_device.h" #ifndef FUNCTIONFS_SUPPORTS_POLL #include struct aio_help { - uint8_t buf[64]; + struct msgb *msg; struct iocb *iocb; }; #endif @@ -154,6 +156,7 @@ struct aio_help aio_out; struct aio_help aio_int; #endif + struct ccid_instance *ccid_handle; }; static int ep_int_cb(struct osmo_fd *ofd, unsigned int what) @@ -164,13 +167,20 @@ static int ep_out_cb(struct osmo_fd *ofd, unsigned int what) { - uint8_t buf[64]; + struct ufunc_handle *uh = (struct ufunc_handle *) ofd->data; + struct msgb *msg = msgb_alloc(512, "OUT-Rx"); int rc; printf("OUT\n"); if (what & BSC_FD_READ) { - rc = read(ofd->fd, buf, sizeof(buf)); - ccid_handle_out(uh->ccid_handle, buf, rc); + rc = read(ofd->fd, msgb_data(msg), msgb_tailroom(msg)); + if (rc <= 0) { + msgb_free(msg); + return rc; + } + msgb_put(msg, rc); + ccid_handle_out(uh->ccid_handle, msg); + msgb_free(msg); } return 0; } @@ -238,7 +248,8 @@ { int rc; struct aio_help *ah = &uh->aio_out; - io_prep_pread(ah->iocb, uh->ep_out.fd, ah->buf, sizeof(ah->buf), 0); + msgb_reset(ah->msg); + io_prep_pread(ah->iocb, uh->ep_out.fd, msgb_data(ah->msg), msgb_tailroom(ah->msg), 0); io_set_eventfd(ah->iocb, uh->aio_evfd.fd); rc = io_submit(uh->aio_ctx, 1, &ah->iocb); OSMO_ASSERT(rc >= 0); @@ -270,7 +281,9 @@ /* IN endpoint AIO has completed. This means the host has sent us * some OUT data */ //printf("\t%s\n", osmo_hexdump(uh->aio_out.buf, evt[i].res)); - ccid_handle_out(uh->ccid_handle, uh->aio_out.buf, evt[i].res); + //ccid_handle_out(uh->ccid_handle, uh->aio_out.buf, evt[i].res); + msgb_put(uh->aio_out.msg, evt[i].res); + ccid_handle_out(uh->ccid_handle, uh->aio_out.msg); aio_refill_out(uh); } } @@ -332,6 +345,7 @@ osmo_fd_setup(&uh->aio_evfd, rc, BSC_FD_READ, &evfd_cb, uh, 0); osmo_fd_register(&uh->aio_evfd); + uh->aio_out.msg = msgb_alloc(512, "OUT-Rx-AIO"); uh->aio_out.iocb = malloc(sizeof(struct iocb)); #endif -- To view, visit https://gerrit.osmocom.org/14059 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iaf40e8e455f79f7db71de767c442ba9e98961e0f Gerrit-Change-Number: 14059 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 18:26:35 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 18:26:35 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid: rename ccid_descriptors.c to ccid_main_functionfs In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14060 ) Change subject: ccid: rename ccid_descriptors.c to ccid_main_functionfs ...................................................................... ccid: rename ccid_descriptors.c to ccid_main_functionfs ... which resembles its actual purpose much better Change-Id: I02d21a9594db8e87714b6ce0d106ed3ef5297548 --- M ccid/Makefile R ccid/ccid_main_functionfs.c 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/ccid/Makefile b/ccid/Makefile index e23823a..317fcbd 100644 --- a/ccid/Makefile +++ b/ccid/Makefile @@ -1,10 +1,10 @@ CFLAGS=-Wall -g -ccid_descriptors: ccid_descriptors.o ccid_proto.o ccid_device.o +ccid_functionfs: ccid_main_functionfs.o ccid_proto.o ccid_device.o $(CC) $(CFLAGS) -lasan -losmocore -laio -o $@ $^ %.o: %.c $(CC) $(CFLAGS) -o $@ -c $^ clean: - rm ccid_descriptors *.o + rm ccid_functionfs *.o diff --git a/ccid/ccid_descriptors.c b/ccid/ccid_main_functionfs.c similarity index 100% rename from ccid/ccid_descriptors.c rename to ccid/ccid_main_functionfs.c -- To view, visit https://gerrit.osmocom.org/14060 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I02d21a9594db8e87714b6ce0d106ed3ef5297548 Gerrit-Change-Number: 14060 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 18:27:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 18:27:09 +0000 Subject: Change in osmo-msc[master]: remove msc specific db counters In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13800 ) Change subject: remove msc specific db counters ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13800 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id64f1839a55b5326f74ec04b7a5dbed9d269b89c Gerrit-Change-Number: 13800 Gerrit-PatchSet: 3 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Wed, 15 May 2019 18:27:09 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 18:27:13 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 18:27:13 +0000 Subject: Change in osmo-msc[master]: remove msc specific db counters In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13800 ) Change subject: remove msc specific db counters ...................................................................... remove msc specific db counters DB counters has been used to save osmo_counters & osmo_rate_ctr to a local sqlite databases every 60 seconds. This is quite slow e.g. 1000 subscriber might slow the msc down. Change-Id: Id64f1839a55b5326f74ec04b7a5dbed9d269b89c --- M doc/manuals/chapters/running.adoc M include/osmocom/msc/db.h M src/libmsc/db.c M src/osmo-msc/msc_main.c 4 files changed, 4 insertions(+), 94 deletions(-) Approvals: Harald Welte: Looks good to me, approved Daniel Willmann: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/doc/manuals/chapters/running.adoc b/doc/manuals/chapters/running.adoc index cb68157..9d56f1f 100644 --- a/doc/manuals/chapters/running.adoc +++ b/doc/manuals/chapters/running.adoc @@ -43,8 +43,8 @@ *-m, --mncc-sock*:: Same as option -M (deprecated). *-C, --no-dbcounter*:: - Disable the regular periodic synchronization of statistics - counters to the database. + Deprecated. DB statistics and counter has been removed. + This option is only valid for compatiblity and does nothing. === Multiple instances diff --git a/include/osmocom/msc/db.h b/include/osmocom/msc/db.h index 8d9ec41..d9463a6 100644 --- a/include/osmocom/msc/db.h +++ b/include/osmocom/msc/db.h @@ -52,10 +52,4 @@ int db_sms_delete_expired_message_by_id(unsigned long long sms_id); void db_sms_delete_oldest_expired_message(void); -/* Statistics counter storage */ -struct osmo_counter; -int db_store_counter(struct osmo_counter *ctr); -struct rate_ctr_group; -int db_store_rate_ctr_group(struct rate_ctr_group *ctrg); - #endif /* _DB_H */ diff --git a/src/libmsc/db.c b/src/libmsc/db.c index a9aaf94..c2d8339 100644 --- a/src/libmsc/db.c +++ b/src/libmsc/db.c @@ -1060,63 +1060,3 @@ dbi_result_free(result); } - -int db_store_counter(struct osmo_counter *ctr) -{ - dbi_result result; - char *q_name; - - dbi_conn_quote_string_copy(conn, ctr->name, &q_name); - - result = dbi_conn_queryf(conn, - "INSERT INTO Counters " - "(timestamp,name,value) VALUES " - "(datetime('now'),%s,%lu)", q_name, ctr->value); - - free(q_name); - - if (!result) - return -EIO; - - dbi_result_free(result); - return 0; -} - -static int db_store_rate_ctr(struct rate_ctr_group *ctrg, unsigned int num, - char *q_prefix) -{ - dbi_result result; - char *q_name; - - dbi_conn_quote_string_copy(conn, ctrg->desc->ctr_desc[num].name, - &q_name); - - result = dbi_conn_queryf(conn, - "Insert INTO RateCounters " - "(timestamp,name,idx,value) VALUES " - "(datetime('now'),%s.%s,%u,%"PRIu64")", - q_prefix, q_name, ctrg->idx, ctrg->ctr[num].current); - - free(q_name); - - if (!result) - return -EIO; - - dbi_result_free(result); - return 0; -} - -int db_store_rate_ctr_group(struct rate_ctr_group *ctrg) -{ - unsigned int i; - char *q_prefix; - - dbi_conn_quote_string_copy(conn, ctrg->desc->group_name_prefix, &q_prefix); - - for (i = 0; i < ctrg->desc->num_ctr; i++) - db_store_rate_ctr(ctrg, i, q_prefix); - - free(q_prefix); - - return 0; -} diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c index 7577768..9da26fb 100644 --- a/src/osmo-msc/msc_main.c +++ b/src/osmo-msc/msc_main.c @@ -102,19 +102,14 @@ const char *config_file; int daemonize; const char *mncc_sock_path; - int use_db_counter; } msc_cmdline_config = { .database_name = "sms.db", .config_file = "osmo-msc.cfg", - .use_db_counter = 1, }; /* timer to store statistics */ -#define DB_SYNC_INTERVAL 60, 0 #define EXPIRE_INTERVAL 10, 0 -static struct osmo_timer_list db_sync_timer; - static int quit = 0; static void print_usage() @@ -135,7 +130,6 @@ printf(" -V --version Print the version of OsmoMSC.\n"); printf(" -e --log-level number Set a global loglevel.\n"); printf(" -M --mncc-sock-path PATH Disable built-in MNCC handler and offer socket.\n"); - printf(" -C --no-dbcounter Disable regular syncing of counters to database.\n"); } static void handle_options(int argc, char **argv) @@ -153,7 +147,7 @@ {"version", 0, 0, 'V' }, {"log-level", 1, 0, 'e'}, {"mncc-sock-path", 1, 0, 'M'}, - {"no-dbcounter", 0, 0, 'C'}, + {"no-dbcounter", 0, 0, 'C'}, /* deprecated */ {0, 0, 0, 0} }; @@ -192,7 +186,7 @@ msc_cmdline_config.mncc_sock_path = optarg; break; case 'C': - msc_cmdline_config.use_db_counter = 0; + fprintf(stderr, "-C is deprecated and does nothing."); break; case 'V': print_version(1); @@ -260,19 +254,6 @@ } } -/* timer handling */ -static int _db_store_counter(struct osmo_counter *counter, void *data) -{ - return db_store_counter(counter); -} - -static void db_sync_timer_cb(void *data) -{ - /* store counters to database and re-schedule */ - osmo_counters_for_each(_db_store_counter, NULL); - osmo_timer_schedule(&db_sync_timer, DB_SYNC_INTERVAL); -} - static int msc_vty_go_parent(struct vty *vty) { switch (vty->node) { @@ -665,11 +646,6 @@ return 5; } - /* setup the timer */ - osmo_timer_setup(&db_sync_timer, db_sync_timer_cb, NULL); - if (msc_cmdline_config.use_db_counter) - osmo_timer_schedule(&db_sync_timer, DB_SYNC_INTERVAL); - signal(SIGINT, &signal_handler); signal(SIGTERM, &signal_handler); signal(SIGABRT, &signal_handler); -- To view, visit https://gerrit.osmocom.org/13800 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id64f1839a55b5326f74ec04b7a5dbed9d269b89c Gerrit-Change-Number: 13800 Gerrit-PatchSet: 4 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 18:35:34 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 15 May 2019 18:35:34 +0000 Subject: Change in osmo-msc[master]: libmsc/msc_vty.c: fix documentation of 'show subscriber id' Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14062 Change subject: libmsc/msc_vty.c: fix documentation of 'show subscriber id' ...................................................................... libmsc/msc_vty.c: fix documentation of 'show subscriber id' Change-Id: I3357e71ae54e22b97cbb3707712445d7602c1129 --- M src/libmsc/msc_vty.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/62/14062/1 diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index 67955d3..8cce7a0 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -960,7 +960,7 @@ "Legacy alias for 'msisdn'\n" \ "Identify subscriber by IMSI\n" \ "Identify subscriber by TMSI\n" \ - "Identify subscriber by database ID\n" \ + "Legacy alias for 'imsi'\n" \ "Identifier for the subscriber\n" DEFUN(show_subscr, -- To view, visit https://gerrit.osmocom.org/14062 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I3357e71ae54e22b97cbb3707712445d7602c1129 Gerrit-Change-Number: 14062 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 18:53:43 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 15 May 2019 18:53:43 +0000 Subject: Change in osmo-msc[master]: libmsc/msc_vty.c: use llist_count() in subscr_dump_full_vty() Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14063 Change subject: libmsc/msc_vty.c: use llist_count() in subscr_dump_full_vty() ...................................................................... libmsc/msc_vty.c: use llist_count() in subscr_dump_full_vty() Change-Id: I9e4814d2b2da7d4e75da074e138f423af850ed49 --- M src/libmsc/msc_vty.c 1 file changed, 3 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/63/14063/1 diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index 8cce7a0..5c58221 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -742,8 +742,6 @@ static void subscr_dump_full_vty(struct vty *vty, struct vlr_subscr *vsub) { struct gsm_trans *trans; - int reqs; - struct llist_head *entry; char buf[128]; if (strlen(vsub->name)) @@ -803,11 +801,10 @@ VTY_NEWLINE); } - reqs = 0; - llist_for_each(entry, &vsub->cs.requests) - reqs += 1; vty_out(vty, " Paging: %s paging for %d requests%s", - vsub->cs.is_paging ? "is" : "not", reqs, VTY_NEWLINE); + vsub->cs.is_paging ? "is" : "not", + llist_count(&vsub->cs.requests), + VTY_NEWLINE); /* SGs related */ vty_out(vty, " SGs-state: %s%s", -- To view, visit https://gerrit.osmocom.org/14063 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I9e4814d2b2da7d4e75da074e138f423af850ed49 Gerrit-Change-Number: 14063 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 20:04:49 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 20:04:49 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid_main_functionfs: Fix full chain of IN/OUT EP Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14064 Change subject: ccid_main_functionfs: Fix full chain of IN/OUT EP ...................................................................... ccid_main_functionfs: Fix full chain of IN/OUT EP which is already sufficient to make pcsc_scan happy and list all eight cards/slots like Reader 1: sysmoOCTSIM Test Reader [Osmocom CCID Interface] (2342) 01 00 Event number: 0 Card state: Card removed, Change-Id: I37bd952ef0add662d565150f70e83d85ffd0c254 --- M ccid/ccid_device.c M ccid/ccid_device.h M ccid/ccid_main_functionfs.c 3 files changed, 51 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/64/14064/1 diff --git a/ccid/ccid_device.c b/ccid/ccid_device.c index b7077df..e3705ae 100644 --- a/ccid/ccid_device.c +++ b/ccid/ccid_device.c @@ -157,7 +157,7 @@ /* Send given CCID message */ static int ccid_send(struct ccid_instance *ci, struct msgb *msg) { - return ci->ops.send_in(ci, msg); + return ci->ops->send_in(ci, msg); } /* Send given CCID message for given slot; patch bSlot into message */ @@ -717,3 +717,18 @@ /* FIXME */ return -1; } + +void ccid_instance_init(struct ccid_instance *ci, const struct ccid_ops *ops, const char *name, + void *priv) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(ci->slot); i++) { + struct ccid_slot *cs = &ci->slot[i]; + cs->slot_nr = i; + cs->ci = ci; + } + ci->ops= ops; + ci->name = name; + ci->priv = priv; +} diff --git a/ccid/ccid_device.h b/ccid/ccid_device.h index c7cef47..4cdb325 100644 --- a/ccid/ccid_device.h +++ b/ccid/ccid_device.h @@ -63,8 +63,12 @@ /* slots within the reader */ struct ccid_slot slot[NR_SLOTS]; /* set of function pointers implementing specific operations */ - const struct ccid_ops ops; + const struct ccid_ops *ops; const char *name; + /* user-supplied opaque data */ + void *priv; }; +void ccid_instance_init(struct ccid_instance *ci, const struct ccid_ops *ops, const char *name, + void *priv); int ccid_handle_out(struct ccid_instance *ci, struct msgb *msg); diff --git a/ccid/ccid_main_functionfs.c b/ccid/ccid_main_functionfs.c index 84eb70c..2b57182 100644 --- a/ccid/ccid_main_functionfs.c +++ b/ccid/ccid_main_functionfs.c @@ -277,16 +277,19 @@ } else if (fd == uh->ep_in.fd) { /* IN endpoint AIO has completed. This means the IN transfer which * we sent to the host has completed */ + msgb_free(uh->aio_in.msg); + uh->aio_in.msg = NULL; } else if (fd == uh->ep_out.fd) { /* IN endpoint AIO has completed. This means the host has sent us * some OUT data */ - //printf("\t%s\n", osmo_hexdump(uh->aio_out.buf, evt[i].res)); - //ccid_handle_out(uh->ccid_handle, uh->aio_out.buf, evt[i].res); msgb_put(uh->aio_out.msg, evt[i].res); + printf("\t%s\n", msgb_hexdump(uh->aio_out.msg)); + //ccid_handle_out(uh->ccid_handle, uh->aio_out.buf, evt[i].res); ccid_handle_out(uh->ccid_handle, uh->aio_out.msg); aio_refill_out(uh); } } + return 0; } #endif @@ -353,12 +356,37 @@ return 0; } +static int ccid_ops_send_in(struct ccid_instance *ci, struct msgb *msg) +{ + struct ufunc_handle *uh = ci->priv; + struct aio_help *ah = &uh->aio_in; + int rc; + + /* FIXME: does this work with multiple iocbs? probably not yet! */ + ah->iocb = malloc(sizeof(struct iocb)); + OSMO_ASSERT(ah->iocb); + ah->msg = msg; + io_prep_pwrite(ah->iocb, uh->ep_in.fd, msgb_data(msg), msgb_length(msg), 0); + io_set_eventfd(ah->iocb, uh->aio_evfd.fd); + rc = io_submit(uh->aio_ctx, 1, &ah->iocb); + OSMO_ASSERT(rc >= 0); + + return 0; +} + +static const struct ccid_ops c_ops = { + .send_in = ccid_ops_send_in, +}; int main(int argc, char **argv) { struct ufunc_handle ufh = (struct ufunc_handle) { 0, }; + struct ccid_instance ci = (struct ccid_instance) { 0, }; int rc; + ccid_instance_init(&ci, &c_ops, "", &ufh); + ufh.ccid_handle = &ci; + chdir(argv[1]); rc = ep0_init(&ufh); if (rc < 0) { -- To view, visit https://gerrit.osmocom.org/14064 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I37bd952ef0add662d565150f70e83d85ffd0c254 Gerrit-Change-Number: 14064 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 20:04:50 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 20:04:50 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid: Add README and kernel patch related to CCID on functionfs Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14065 Change subject: ccid: Add README and kernel patch related to CCID on functionfs ...................................................................... ccid: Add README and kernel patch related to CCID on functionfs Change-Id: Ib7315dadd63d14933e9728c0884297b440f6530c --- A ccid/CCID.patch A ccid/README.linux-dummy_hcd-ffs A ccid/remove_ccid_gadget.sh 3 files changed, 146 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/65/14065/1 diff --git a/ccid/CCID.patch b/ccid/CCID.patch new file mode 100644 index 0000000..011697a --- /dev/null +++ b/ccid/CCID.patch @@ -0,0 +1,15 @@ +Index: linux-source-4.19/drivers/usb/gadget/function/f_fs.c +=================================================================== +--- linux-source-4.19.orig/drivers/usb/gadget/function/f_fs.c ++++ linux-source-4.19/drivers/usb/gadget/function/f_fs.c +@@ -2000,8 +2000,8 @@ + + case HID_DT_HID: + pr_vdebug("hid descriptor\n"); +- if (length != sizeof(struct hid_descriptor)) +- goto inv_length; ++ //if (length != sizeof(struct hid_descriptor)) ++ //goto inv_length; + break; + + case USB_DT_OTG: diff --git a/ccid/README.linux-dummy_hcd-ffs b/ccid/README.linux-dummy_hcd-ffs new file mode 100644 index 0000000..bb628b6 --- /dev/null +++ b/ccid/README.linux-dummy_hcd-ffs @@ -0,0 +1,98 @@ +Requirements +============ + +* you need dummy_hcd.ko, i.e. a kernel compiled with CONFIG_USB_DUMMY_HCD=m +* you need a fixed usb_f_fs.ko, which doesn't make blind assumptions about + everything being a HID descriptor. See CCID.patch + +On a stock Debian system, this works as follows (kernel versions will change over time, +in my case `uname -r` shows 4.19.0-4-amd64). + +---- +apt-get install linux-headers-4.19.0-4-amd64 linux-source-4.19 +cd /usr/src +tar xf linux-source-4.19.tar.xz +cd linux-source-4.19 +ln -s /boot/config-4.19.0-4-amd64 .config +ln -s /usr/src/linux-headers-4.19.0-4-amd64/Module.symvers . +patch -p1 < /my/path/to/CCID.patch +# edit .config and set CONFIG_USB_DUMMY_HCD=m +make modules_prepare +make M=drivers/usb/gadget/function +make M=drivers/usb/gadget/udc +cp drivers/usb/gadget/function/usb_f_fs.ko /lib/modules/`uname -r`/kernel/drivers/usb/gadget/function/ +cp drivers/usb/gadget/udc/dummy_hcd.ko /lib/modules/`uname -r`/kernel/drivers/usb/gadget/udc/ +depmod +---- + + +Running +------- + +You first have to run the `create_ccid_gadget.sh` script, which will + +* load the required kernel modules with their respective options +* use usb-gadget-configfs to create a new device with configuration + interface +* mount the resulting endpoints as usb functionfs to /dev/ffs-ccid + +Next, you run the actual userspace implementation of the gadget, telling it the functionfs path + + ./ccid_functionfs /dev/ffs-ccid + +which should make your 'dmesg' show something like + +---- +read descriptors +read strings +---- + +Finally, you can virtually connect the gadget to the virtual host controller by issuing + + echo dummy_udc.0 > /sys/kernel/config/usb_gadget/osmo-ccid/UDC + +at which point your 'dmesg' should print something along the lines of + +---- +usb 3-1: new full-speed USB device number 8 using dummy_hcd +usb 3-1: New USB device found, idVendor=2342, idProduct=2342, bcdDevice= 4.19 +usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 +usb 3-1: Product: sysmoOCTSIM +usb 3-1: Manufacturer: sysmocom GmbH +usb 3-1: SerialNumber: 2342 +configfs-gadget gadget: full-speed config #1: c +---- + + +Using from pcsc-lite +-------------------- + +In order to make pcsc-lite recognize the reader, you'll need to add the VID/PID +to the /etc/libccid_Info.plist with a diff like this: + +--- /tmp/libccid_Info.plist 2019-05-15 22:02:07.892925425 +0200 ++++ /etc/libccid_Info.plist 2018-12-27 16:18:01.026824476 +0100 +@@ -525,6 +525,7 @@ + 0x08C3 + 0x15E1 + 0x062D ++ 0x2342 + + + ifdProductID +@@ -952,6 +953,7 @@ + 0x0402 + 0x2007 + 0x0001 ++ 0x2342 + + + ifdFriendlyName +@@ -1379,6 +1381,7 @@ + Precise Biometrics Precise 200 MC + RSA RSA SecurID (R) Authenticator + THRC Smart Card Reader ++ sysmoOCTSIM Test Reader + + + Copyright + diff --git a/ccid/remove_ccid_gadget.sh b/ccid/remove_ccid_gadget.sh new file mode 100755 index 0000000..3ad0511 --- /dev/null +++ b/ccid/remove_ccid_gadget.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +GADGET_NAME=osmo-ccid + +GADGET_CONFIGFS=/sys/kernel/config/usb_gadget + +set -e +set -x + +gadgetdir="$GADGET_CONFIGFS/$GADGET_NAME" + +# unmount the endpoints from the filesystem +umount /dev/ffs-ccid + +# detach from USB gadget/bus +echo "" > "$gadgetdir/UDC" || true + +# remove function from config +rm "$gadgetdir/configs/c.1/ffs.usb0" + +# remove strings in config +rmdir "$gadgetdir/configs/c.1/strings/0x409" + +# remove config +rmdir "$gadgetdir/configs/c.1" + +# remove function +rmdir "$gadgetdir/functions/ffs.usb0" + +# remove strings in gadget +rmdir "$gadgetdir/strings/0x409" + +rmdir $gadgetdir -- To view, visit https://gerrit.osmocom.org/14065 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ib7315dadd63d14933e9728c0884297b440f6530c Gerrit-Change-Number: 14065 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 20:06:14 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 20:06:14 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid_main_functionfs: Fix full chain of IN/OUT EP In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14064 ) Change subject: ccid_main_functionfs: Fix full chain of IN/OUT EP ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14064 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I37bd952ef0add662d565150f70e83d85ffd0c254 Gerrit-Change-Number: 14064 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 15 May 2019 20:06:14 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 20:06:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 20:06:16 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid_main_functionfs: Fix full chain of IN/OUT EP In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14064 ) Change subject: ccid_main_functionfs: Fix full chain of IN/OUT EP ...................................................................... ccid_main_functionfs: Fix full chain of IN/OUT EP which is already sufficient to make pcsc_scan happy and list all eight cards/slots like Reader 1: sysmoOCTSIM Test Reader [Osmocom CCID Interface] (2342) 01 00 Event number: 0 Card state: Card removed, Change-Id: I37bd952ef0add662d565150f70e83d85ffd0c254 --- M ccid/ccid_device.c M ccid/ccid_device.h M ccid/ccid_main_functionfs.c 3 files changed, 51 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/ccid/ccid_device.c b/ccid/ccid_device.c index b7077df..e3705ae 100644 --- a/ccid/ccid_device.c +++ b/ccid/ccid_device.c @@ -157,7 +157,7 @@ /* Send given CCID message */ static int ccid_send(struct ccid_instance *ci, struct msgb *msg) { - return ci->ops.send_in(ci, msg); + return ci->ops->send_in(ci, msg); } /* Send given CCID message for given slot; patch bSlot into message */ @@ -717,3 +717,18 @@ /* FIXME */ return -1; } + +void ccid_instance_init(struct ccid_instance *ci, const struct ccid_ops *ops, const char *name, + void *priv) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(ci->slot); i++) { + struct ccid_slot *cs = &ci->slot[i]; + cs->slot_nr = i; + cs->ci = ci; + } + ci->ops= ops; + ci->name = name; + ci->priv = priv; +} diff --git a/ccid/ccid_device.h b/ccid/ccid_device.h index c7cef47..4cdb325 100644 --- a/ccid/ccid_device.h +++ b/ccid/ccid_device.h @@ -63,8 +63,12 @@ /* slots within the reader */ struct ccid_slot slot[NR_SLOTS]; /* set of function pointers implementing specific operations */ - const struct ccid_ops ops; + const struct ccid_ops *ops; const char *name; + /* user-supplied opaque data */ + void *priv; }; +void ccid_instance_init(struct ccid_instance *ci, const struct ccid_ops *ops, const char *name, + void *priv); int ccid_handle_out(struct ccid_instance *ci, struct msgb *msg); diff --git a/ccid/ccid_main_functionfs.c b/ccid/ccid_main_functionfs.c index 84eb70c..2b57182 100644 --- a/ccid/ccid_main_functionfs.c +++ b/ccid/ccid_main_functionfs.c @@ -277,16 +277,19 @@ } else if (fd == uh->ep_in.fd) { /* IN endpoint AIO has completed. This means the IN transfer which * we sent to the host has completed */ + msgb_free(uh->aio_in.msg); + uh->aio_in.msg = NULL; } else if (fd == uh->ep_out.fd) { /* IN endpoint AIO has completed. This means the host has sent us * some OUT data */ - //printf("\t%s\n", osmo_hexdump(uh->aio_out.buf, evt[i].res)); - //ccid_handle_out(uh->ccid_handle, uh->aio_out.buf, evt[i].res); msgb_put(uh->aio_out.msg, evt[i].res); + printf("\t%s\n", msgb_hexdump(uh->aio_out.msg)); + //ccid_handle_out(uh->ccid_handle, uh->aio_out.buf, evt[i].res); ccid_handle_out(uh->ccid_handle, uh->aio_out.msg); aio_refill_out(uh); } } + return 0; } #endif @@ -353,12 +356,37 @@ return 0; } +static int ccid_ops_send_in(struct ccid_instance *ci, struct msgb *msg) +{ + struct ufunc_handle *uh = ci->priv; + struct aio_help *ah = &uh->aio_in; + int rc; + + /* FIXME: does this work with multiple iocbs? probably not yet! */ + ah->iocb = malloc(sizeof(struct iocb)); + OSMO_ASSERT(ah->iocb); + ah->msg = msg; + io_prep_pwrite(ah->iocb, uh->ep_in.fd, msgb_data(msg), msgb_length(msg), 0); + io_set_eventfd(ah->iocb, uh->aio_evfd.fd); + rc = io_submit(uh->aio_ctx, 1, &ah->iocb); + OSMO_ASSERT(rc >= 0); + + return 0; +} + +static const struct ccid_ops c_ops = { + .send_in = ccid_ops_send_in, +}; int main(int argc, char **argv) { struct ufunc_handle ufh = (struct ufunc_handle) { 0, }; + struct ccid_instance ci = (struct ccid_instance) { 0, }; int rc; + ccid_instance_init(&ci, &c_ops, "", &ufh); + ufh.ccid_handle = &ci; + chdir(argv[1]); rc = ep0_init(&ufh); if (rc < 0) { -- To view, visit https://gerrit.osmocom.org/14064 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I37bd952ef0add662d565150f70e83d85ffd0c254 Gerrit-Change-Number: 14064 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 20:06:21 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 20:06:21 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid: Add README and kernel patch related to CCID on functionfs In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14065 ) Change subject: ccid: Add README and kernel patch related to CCID on functionfs ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14065 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib7315dadd63d14933e9728c0884297b440f6530c Gerrit-Change-Number: 14065 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 15 May 2019 20:06:21 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 20:06:23 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 20:06:23 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid: Add README and kernel patch related to CCID on functionfs In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14065 ) Change subject: ccid: Add README and kernel patch related to CCID on functionfs ...................................................................... ccid: Add README and kernel patch related to CCID on functionfs Change-Id: Ib7315dadd63d14933e9728c0884297b440f6530c --- A ccid/CCID.patch A ccid/README.linux-dummy_hcd-ffs A ccid/remove_ccid_gadget.sh 3 files changed, 146 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/ccid/CCID.patch b/ccid/CCID.patch new file mode 100644 index 0000000..011697a --- /dev/null +++ b/ccid/CCID.patch @@ -0,0 +1,15 @@ +Index: linux-source-4.19/drivers/usb/gadget/function/f_fs.c +=================================================================== +--- linux-source-4.19.orig/drivers/usb/gadget/function/f_fs.c ++++ linux-source-4.19/drivers/usb/gadget/function/f_fs.c +@@ -2000,8 +2000,8 @@ + + case HID_DT_HID: + pr_vdebug("hid descriptor\n"); +- if (length != sizeof(struct hid_descriptor)) +- goto inv_length; ++ //if (length != sizeof(struct hid_descriptor)) ++ //goto inv_length; + break; + + case USB_DT_OTG: diff --git a/ccid/README.linux-dummy_hcd-ffs b/ccid/README.linux-dummy_hcd-ffs new file mode 100644 index 0000000..bb628b6 --- /dev/null +++ b/ccid/README.linux-dummy_hcd-ffs @@ -0,0 +1,98 @@ +Requirements +============ + +* you need dummy_hcd.ko, i.e. a kernel compiled with CONFIG_USB_DUMMY_HCD=m +* you need a fixed usb_f_fs.ko, which doesn't make blind assumptions about + everything being a HID descriptor. See CCID.patch + +On a stock Debian system, this works as follows (kernel versions will change over time, +in my case `uname -r` shows 4.19.0-4-amd64). + +---- +apt-get install linux-headers-4.19.0-4-amd64 linux-source-4.19 +cd /usr/src +tar xf linux-source-4.19.tar.xz +cd linux-source-4.19 +ln -s /boot/config-4.19.0-4-amd64 .config +ln -s /usr/src/linux-headers-4.19.0-4-amd64/Module.symvers . +patch -p1 < /my/path/to/CCID.patch +# edit .config and set CONFIG_USB_DUMMY_HCD=m +make modules_prepare +make M=drivers/usb/gadget/function +make M=drivers/usb/gadget/udc +cp drivers/usb/gadget/function/usb_f_fs.ko /lib/modules/`uname -r`/kernel/drivers/usb/gadget/function/ +cp drivers/usb/gadget/udc/dummy_hcd.ko /lib/modules/`uname -r`/kernel/drivers/usb/gadget/udc/ +depmod +---- + + +Running +------- + +You first have to run the `create_ccid_gadget.sh` script, which will + +* load the required kernel modules with their respective options +* use usb-gadget-configfs to create a new device with configuration + interface +* mount the resulting endpoints as usb functionfs to /dev/ffs-ccid + +Next, you run the actual userspace implementation of the gadget, telling it the functionfs path + + ./ccid_functionfs /dev/ffs-ccid + +which should make your 'dmesg' show something like + +---- +read descriptors +read strings +---- + +Finally, you can virtually connect the gadget to the virtual host controller by issuing + + echo dummy_udc.0 > /sys/kernel/config/usb_gadget/osmo-ccid/UDC + +at which point your 'dmesg' should print something along the lines of + +---- +usb 3-1: new full-speed USB device number 8 using dummy_hcd +usb 3-1: New USB device found, idVendor=2342, idProduct=2342, bcdDevice= 4.19 +usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 +usb 3-1: Product: sysmoOCTSIM +usb 3-1: Manufacturer: sysmocom GmbH +usb 3-1: SerialNumber: 2342 +configfs-gadget gadget: full-speed config #1: c +---- + + +Using from pcsc-lite +-------------------- + +In order to make pcsc-lite recognize the reader, you'll need to add the VID/PID +to the /etc/libccid_Info.plist with a diff like this: + +--- /tmp/libccid_Info.plist 2019-05-15 22:02:07.892925425 +0200 ++++ /etc/libccid_Info.plist 2018-12-27 16:18:01.026824476 +0100 +@@ -525,6 +525,7 @@ + 0x08C3 + 0x15E1 + 0x062D ++ 0x2342 + + + ifdProductID +@@ -952,6 +953,7 @@ + 0x0402 + 0x2007 + 0x0001 ++ 0x2342 + + + ifdFriendlyName +@@ -1379,6 +1381,7 @@ + Precise Biometrics Precise 200 MC + RSA RSA SecurID (R) Authenticator + THRC Smart Card Reader ++ sysmoOCTSIM Test Reader + + + Copyright + diff --git a/ccid/remove_ccid_gadget.sh b/ccid/remove_ccid_gadget.sh new file mode 100755 index 0000000..3ad0511 --- /dev/null +++ b/ccid/remove_ccid_gadget.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +GADGET_NAME=osmo-ccid + +GADGET_CONFIGFS=/sys/kernel/config/usb_gadget + +set -e +set -x + +gadgetdir="$GADGET_CONFIGFS/$GADGET_NAME" + +# unmount the endpoints from the filesystem +umount /dev/ffs-ccid + +# detach from USB gadget/bus +echo "" > "$gadgetdir/UDC" || true + +# remove function from config +rm "$gadgetdir/configs/c.1/ffs.usb0" + +# remove strings in config +rmdir "$gadgetdir/configs/c.1/strings/0x409" + +# remove config +rmdir "$gadgetdir/configs/c.1" + +# remove function +rmdir "$gadgetdir/functions/ffs.usb0" + +# remove strings in gadget +rmdir "$gadgetdir/strings/0x409" + +rmdir $gadgetdir -- To view, visit https://gerrit.osmocom.org/14065 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ib7315dadd63d14933e9728c0884297b440f6530c Gerrit-Change-Number: 14065 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 20:45:37 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 15 May 2019 20:45:37 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid: Integrate libosmocore logging Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14066 Change subject: ccid: Integrate libosmocore logging ...................................................................... ccid: Integrate libosmocore logging Change-Id: I3436827f658653273af21f1deaf030c2a389f91a --- M ccid/Makefile M ccid/ccid_device.c M ccid/ccid_device.h M ccid/ccid_main_functionfs.c 4 files changed, 97 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/66/14066/1 diff --git a/ccid/Makefile b/ccid/Makefile index 317fcbd..cd8321f 100644 --- a/ccid/Makefile +++ b/ccid/Makefile @@ -1,7 +1,7 @@ CFLAGS=-Wall -g ccid_functionfs: ccid_main_functionfs.o ccid_proto.o ccid_device.o - $(CC) $(CFLAGS) -lasan -losmocore -laio -o $@ $^ + $(CC) $(CFLAGS) -lasan -losmocore -ltalloc -laio -o $@ $^ %.o: %.c $(CC) $(CFLAGS) -o $@ -c $^ diff --git a/ccid/ccid_device.c b/ccid/ccid_device.c index e3705ae..ffcbacc 100644 --- a/ccid/ccid_device.c +++ b/ccid/ccid_device.c @@ -6,6 +6,7 @@ #include #include +#include #include "ccid_proto.h" #include "ccid_device.h" @@ -157,6 +158,15 @@ /* Send given CCID message */ static int ccid_send(struct ccid_instance *ci, struct msgb *msg) { + struct ccid_header *ch = (struct ccid_header *) msgb_ccid_in(msg); + struct ccid_slot *cs = get_ccid_slot(ci, ch->bSlot); + if (cs) { + LOGPCS(cs, LOGL_DEBUG, "Tx CCID(IN) %s %s\n", + get_value_string(ccid_msg_type_vals, ch->bMessageType), msgb_hexdump(msg)); + } else { + LOGPCI(ci, LOGL_DEBUG, "Tx CCID(IN) %s %s\n", + get_value_string(ccid_msg_type_vals, ch->bMessageType), msgb_hexdump(msg)); + } return ci->ops->send_in(ci, msg); } @@ -470,24 +480,32 @@ switch (spar->bProtocolNum) { case CCID_PROTOCOL_NUM_T0: rc = decode_ccid_pars_t0(&pars_dec, &spar->abProtocolData.t0); - if (rc < 0) + if (rc < 0) { + LOGP(DCCID, LOGL_ERROR, "SetParameters: Unable to parse T0: %d\n", rc); resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_FAILED, -rc); + goto out; + } /* FIXME: validate parameters; abort if they are not supported */ cs->pars = pars_dec; resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_OK, 0); break; case CCID_PROTOCOL_NUM_T1: rc = decode_ccid_pars_t1(&pars_dec, &spar->abProtocolData.t1); - if (rc < 0) + if (rc < 0) { + LOGP(DCCID, LOGL_ERROR, "SetParameters: Unable to parse T1: %d\n", rc); resp = ccid_gen_parameters_t1(cs, seq, CCID_CMD_STATUS_FAILED, -rc); + goto out; + } /* FIXME: validate parameters; abort if they are not supported */ cs->pars = pars_dec; resp = ccid_gen_parameters_t1(cs, seq, CCID_CMD_STATUS_OK, 0); break; default: + LOGP(DCCID, LOGL_ERROR, "SetParameters: Invalid Protocol 0x%02x\n",spar->bProtocolNum); resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_FAILED, 0); break; } +out: return ccid_slot_send_unbusy(cs, resp); } @@ -573,6 +591,7 @@ //case PC_to_RDR_Abort: /* seriously? WTF! */ break; default: + LOGP(DCCID, LOGL_ERROR, "Abort for non-Abortable Message Type\n"); /* CCID spec lists CMD_NOT_ABORTED, but gives no numberic value ?!? */ resp = ccid_gen_slot_status(cs, seq, CCID_CMD_STATUS_FAILED, CCID_ERR_CMD_NOT_SUPPORTED); return ccid_slot_send_unbusy(cs, resp); @@ -617,18 +636,23 @@ /* Check for invalid slot number */ cs = get_ccid_slot(ci, ch->bSlot); if (!cs) { + LOGPCI(ci, LOGL_ERROR, "Invalid bSlot %u\n", ch->bSlot); resp = gen_err_resp(ch->bMessageType, ch->bSlot, CCID_ICC_STATUS_NO_ICC, ch->bSeq, 5); return ccid_send(ci, resp); } /* Check if slot is already busy; Reject any additional commands meanwhile */ if (cs->cmd_busy) { + LOGPCS(cs, LOGL_ERROR, "Slot Busy, but another cmd received\n"); /* FIXME: ABORT logic as per section 5.3.1 of CCID Spec v1.1 */ resp = gen_err_resp(ch->bMessageType, ch->bSlot, get_icc_status(cs), ch->bSeq, CCID_ERR_CMD_SLOT_BUSY); return ccid_send(ci, resp); } + LOGPCS(cs, LOGL_DEBUG, "Rx CCID(OUT) %s %s\n", + get_value_string(ccid_msg_type_vals, ch->bMessageType), msgb_hexdump(msg)); + /* we're now processing a command for the slot; mark slot as busy */ cs->cmd_busy = true; @@ -707,6 +731,7 @@ break; default: /* generic response with bERror = 0 (command not supported) */ + LOGP(DCCID, LOGL_NOTICE, "Unknown CCID Message received: 0x%02x\n", ch->bMessageType); resp = gen_err_resp(ch->bMessageType, ch->bSlot, CCID_ICC_STATUS_NO_ICC, ch->bSeq, CCID_ERR_CMD_NOT_SUPPORTED); return ccid_slot_send_unbusy(cs, resp); @@ -714,7 +739,7 @@ return 0; short_msg: - /* FIXME */ + LOGP(DCCID, LOGL_ERROR, "Short CCID message received: %s; ignoring\n", msgb_hexdump(msg)); return -1; } diff --git a/ccid/ccid_device.h b/ccid/ccid_device.h index 4cdb325..68ec98a 100644 --- a/ccid/ccid_device.h +++ b/ccid/ccid_device.h @@ -2,12 +2,16 @@ #include #include +enum { + DCCID, + DUSB, +}; #define NR_SLOTS 8 #define LOGPCI(ci, lvl, fmt, args ...) LOGP(DCCID, lvl, "%s: " fmt, (ci)->name, ## args) #define LOGPCS(cs, lvl, fmt, args ...) \ - LOGP(DCCID, lvl, "%s(%u): " fmt, (cc)->ci->name, (cc)->slot_nr, ## args) + LOGP(DCCID, lvl, "%s(%u): " fmt, (cs)->ci->name, (cs)->slot_nr, ## args) struct msgb; diff --git a/ccid/ccid_main_functionfs.c b/ccid/ccid_main_functionfs.c index 2b57182..717a6ae 100644 --- a/ccid/ccid_main_functionfs.c +++ b/ccid/ccid_main_functionfs.c @@ -1,4 +1,5 @@ +#include #include #include #include @@ -132,6 +133,9 @@ #include #include #include +#include +#include +#include #include "ccid_device.h" @@ -161,7 +165,7 @@ static int ep_int_cb(struct osmo_fd *ofd, unsigned int what) { - printf("INT\n"); + LOGP(DUSB, LOGL_DEBUG, "%s\n", __func__); return 0; } @@ -171,7 +175,7 @@ struct msgb *msg = msgb_alloc(512, "OUT-Rx"); int rc; - printf("OUT\n"); + LOGP(DUSB, LOGL_DEBUG, "%s\n", __func__); if (what & BSC_FD_READ) { rc = read(ofd->fd, msgb_data(msg), msgb_tailroom(msg)); if (rc <= 0) { @@ -187,7 +191,7 @@ static int ep_in_cb(struct osmo_fd *ofd, unsigned int what) { - printf("IN\n"); + LOGP(DUSB, LOGL_DEBUG, "%s\n", __func__); if (what & BSC_FD_WRITE) { /* write what we have to write */ } @@ -207,11 +211,10 @@ static void handle_setup(const struct usb_ctrlrequest *setup) { - printf("bRequestType = %d\n", setup->bRequestType); - printf("bRequest = %d\n", setup->bRequest); - printf("wValue = %d\n", le16_to_cpu(setup->wValue)); - printf("wIndex = %d\n", le16_to_cpu(setup->wIndex)); - printf("wLength = %d\n", le16_to_cpu(setup->wLength)); + LOGP(DUSB, LOGL_NOTICE, "EP0 SETUP bRequestType=0x%02x, bRequest=0x%02x wValue=0x%04x, " + "wIndex=0x%04x, wLength=%u\n", setup->bRequestType, setup->bRequest, + le16_to_cpu(setup->wValue), le16_to_cpu(setup->wIndex), le16_to_cpu(setup->wLength)); + /* FIXME: Handle control transfer */ } static void aio_refill_out(struct ufunc_handle *uh); @@ -221,14 +224,12 @@ struct ufunc_handle *uh = (struct ufunc_handle *) ofd->data; int rc; - printf("EP0\n"); - if (what & BSC_FD_READ) { struct usb_functionfs_event evt; rc = read(ofd->fd, (uint8_t *)&evt, sizeof(evt)); if (rc < sizeof(evt)) return -23; - printf("\t%s\n", get_value_string(ffs_evt_type_names, evt.type)); + LOGP(DUSB, LOGL_NOTICE, "EP0 %s\n", get_value_string(ffs_evt_type_names, evt.type)); switch (evt.type) { case FUNCTIONFS_ENABLE: aio_refill_out(uh); @@ -248,6 +249,8 @@ { int rc; struct aio_help *ah = &uh->aio_out; + + LOGP(DUSB, LOGL_DEBUG, "%s\n", __func__); msgb_reset(ah->msg); io_prep_pread(ah->iocb, uh->ep_out.fd, msgb_data(ah->msg), msgb_tailroom(ah->msg), 0); io_set_eventfd(ah->iocb, uh->aio_evfd.fd); @@ -266,24 +269,31 @@ assert(rc == sizeof(ev_cnt)); rc = io_getevents(uh->aio_ctx, 1, 3, evt, NULL); - if (rc <= 0) + if (rc <= 0) { + LOGP(DUSB, LOGL_ERROR, "error in io_getevents(): %d\n", rc); return rc; + } for (i = 0; i < rc; i++) { int fd = evt[i].obj->aio_fildes; if (fd == uh->ep_int.fd) { /* interrupt endpoint AIO has completed. This means the IRQ transfer * which we generated has reached the host */ + LOGP(DUSB, LOGL_DEBUG, "IRQ AIO completed, free()ing msgb\n"); + msgb_free(uh->aio_in.msg); + uh->aio_in.msg = NULL; } else if (fd == uh->ep_in.fd) { /* IN endpoint AIO has completed. This means the IN transfer which * we sent to the host has completed */ + LOGP(DUSB, LOGL_DEBUG, "IN AIO completed, free()ing msgb\n"); msgb_free(uh->aio_in.msg); uh->aio_in.msg = NULL; } else if (fd == uh->ep_out.fd) { - /* IN endpoint AIO has completed. This means the host has sent us + /* OUT endpoint AIO has completed. This means the host has sent us * some OUT data */ + LOGP(DUSB, LOGL_DEBUG, "OUT AIO completed, dispatching received msg\n"); msgb_put(uh->aio_out.msg, evt[i].res); - printf("\t%s\n", msgb_hexdump(uh->aio_out.msg)); + //printf("\t%s\n", msgb_hexdump(uh->aio_out.msg)); //ccid_handle_out(uh->ccid_handle, uh->aio_out.buf, evt[i].res); ccid_handle_out(uh->ccid_handle, uh->aio_out.msg); aio_refill_out(uh); @@ -304,11 +314,15 @@ osmo_fd_setup(&uh->ep0, rc, BSC_FD_READ, &ep_0_cb, uh, 0); osmo_fd_register(&uh->ep0); rc = write(uh->ep0.fd, &descriptors, sizeof(descriptors)); - if (rc != sizeof(descriptors)) + if (rc != sizeof(descriptors)) { + LOGP(DUSB, LOGL_ERROR, "Cannot write descriptors: %s\n", strerror(errno)); return -1; + } rc = write(uh->ep0.fd, &strings, sizeof(strings)); - if (rc != sizeof(strings)) + if (rc != sizeof(strings)) { + LOGP(DUSB, LOGL_ERROR, "Cannot write strings: %s\n", strerror(errno)); return -1; + } /* open other endpoint file descriptors */ rc = open("ep1", O_RDWR); @@ -378,20 +392,52 @@ .send_in = ccid_ops_send_in, }; +static const struct log_info_cat log_info_cat[] = { + [DUSB] = { + .name = "USB", + .description = "USB Transport", + .enabled = 1, + .loglevel = LOGL_NOTICE, + }, + [DCCID] = { + .name = "CCID", + .description = "CCID Core", + .color = "\033[1;35m", + .enabled = 1, + .loglevel = LOGL_DEBUG, + }, +}; + +static const struct log_info log_info = { + .cat = log_info_cat, + .num_cat = ARRAY_SIZE(log_info_cat), +}; + +static void *tall_main_ctx; + int main(int argc, char **argv) { struct ufunc_handle ufh = (struct ufunc_handle) { 0, }; struct ccid_instance ci = (struct ccid_instance) { 0, }; int rc; + tall_main_ctx = talloc_named_const(NULL, 0, "ccid_main_functionfs"); + msgb_talloc_ctx_init(tall_main_ctx, 0); + osmo_init_logging2(tall_main_ctx, &log_info); + ccid_instance_init(&ci, &c_ops, "", &ufh); ufh.ccid_handle = &ci; + if (argc < 2) { + fprintf(stderr, "You have to specify the mount-path of the functionfs\n"); + exit(2); + } + chdir(argv[1]); rc = ep0_init(&ufh); if (rc < 0) { fprintf(stderr, "Error %d\n", rc); - exit(2); + exit(1); } while (1) { -- To view, visit https://gerrit.osmocom.org/14066 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I3436827f658653273af21f1deaf030c2a389f91a Gerrit-Change-Number: 14066 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 21:55:00 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 15 May 2019 21:55:00 +0000 Subject: Change in osmo-mgw[master]: osmux: Use DUMMY ft msg as per Osmux spec Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14067 Change subject: osmux: Use DUMMY ft msg as per Osmux spec ...................................................................... osmux: Use DUMMY ft msg as per Osmux spec That MGCP_DUMMY_LOAD is an old hack prior to Osmux spec update, and it's not nice since it cannot be 100% distinguished from a usual AMR ft frame. Let's use the correct DUMMY ft type and build it according spec. Allow handling differently the old format for a while until we are sure no old implementations (like bsc-nat) exist sending that kind of message. Change-Id: Ib17d20b87b28aade49ba60519b56a96e694819af --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 11 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/67/14067/1 diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 7a817f8..3b788b6 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -20,6 +20,7 @@ #include #include +#include #include #include @@ -554,7 +555,8 @@ * \returns bytes sent, -1 on error */ int osmux_send_dummy(struct mgcp_endpoint *endp, struct mgcp_conn_rtp *conn) { - char buf[1 + sizeof(uint8_t)]; + struct osmux_hdr *osmuxh; + int buf_len; struct in_addr addr_unset = {}; /*! The dummy packet will not be sent via the actual OSMUX connection, @@ -566,9 +568,6 @@ * endpoint may have already punched the hole in the firewall. This * approach is simple though. */ - buf[0] = MGCP_DUMMY_LOAD; - memcpy(&buf[1], &conn->osmux.cid, sizeof(conn->osmux.cid)); - /* Wait until we have the connection information from MDCX */ if (memcmp(&conn->end.addr, &addr_unset, sizeof(addr_unset)) == 0) return 0; @@ -576,12 +575,19 @@ if (endp_osmux_state_check(endp, conn, true) < 0) return 0; + buf_len = sizeof(struct osmux_hdr) + osmo_amr_bytes(AMR_FT_0); + osmuxh = (struct osmux_hdr *) alloca(buf_len); + memset(osmuxh, 0, buf_len); + osmuxh->ft = OSMUX_FT_DUMMY; + osmuxh->amr_ft = AMR_FT_0; + osmuxh->circuit_id = conn->osmux.cid; + LOGPCONN(conn->conn, DLMGCP, LOGL_DEBUG, "sending OSMUX dummy load to %s:%u CID %u\n", inet_ntoa(conn->end.addr), ntohs(conn->end.rtp_port), conn->osmux.cid); return mgcp_udp_send(osmux_fd.fd, &conn->end.addr, - conn->end.rtp_port, buf, sizeof(buf)); + conn->end.rtp_port, (char*)osmuxh, buf_len); } /* bsc-nat allocates/releases the Osmux circuit ID. +7 to round up to 8 bit boundary. */ -- To view, visit https://gerrit.osmocom.org/14067 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ib17d20b87b28aade49ba60519b56a96e694819af Gerrit-Change-Number: 14067 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 21:55:00 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 15 May 2019 21:55:00 +0000 Subject: Change in osmo-mgw[master]: osmux: Fix loopback for Osmux connections Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14068 Change subject: osmux: Fix loopback for Osmux connections ...................................................................... osmux: Fix loopback for Osmux connections Move code in RTP specific path to generic dispatch_rtp_cb. This way loopback logic is applied both for Osmux and RTP connections. Change-Id: Ia30f5a14f150e4d151eac4d1046ea834f1685a5f --- M src/libosmo-mgcp/mgcp_network.c 1 file changed, 16 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/68/14068/1 diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 650d4c0..bb29d2b 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -1233,6 +1233,22 @@ * destination connection is known the RTP packet is sent via * the destination connection. */ + + /* Check if the connection is in loopback mode, if yes, just send the + * incoming data back to the origin */ + if (conn->mode == MGCP_CONN_LOOPBACK) { + /* When we are in loopback mode, we loop back all incoming + * packets back to their origin. We will use the originating + * address data from the UDP packet header to patch the + * outgoing address in connection on the fly */ + if (conn->u.rtp.end.rtp_port == 0) { + conn->u.rtp.end.addr = addr->sin_addr; + conn->u.rtp.end.rtp_port = addr->sin_port; + } + return mgcp_send_rtp(proto, addr, buf, + buf_size, &conn->u.rtp, &conn->u.rtp); + } + /* Find a destination connection. */ /* NOTE: This code path runs every time an RTP packet is received. The * function mgcp_find_dst_conn() we use to determine the detination @@ -1319,21 +1335,6 @@ mgcp_conn_watchdog_kick(conn_src->conn); - /* Check if the connection is in loopback mode, if yes, just send the - * incoming data back to the origin */ - if (conn_src->conn->mode == MGCP_CONN_LOOPBACK) { - /* When we are in loopback mode, we loop back all incoming - * packets back to their origin. We will use the originating - * address data from the UDP packet header to patch the - * outgoing address in connection on the fly */ - if (conn_src->end.rtp_port == 0) { - conn_src->end.addr = addr.sin_addr; - conn_src->end.rtp_port = addr.sin_port; - } - return mgcp_send_rtp(proto, &addr, buf, - len, conn_src, conn_src); - } - /* If AMR is configured for the ingress connection a conversion of the * framing mode (octet-aligned vs. bandwith-efficient is explicitly * define, then we check if the incoming payload matches that -- To view, visit https://gerrit.osmocom.org/14068 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ia30f5a14f150e4d151eac4d1046ea834f1685a5f Gerrit-Change-Number: 14068 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 15 23:13:52 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 15 May 2019 23:13:52 +0000 Subject: Change in osmo-msc[master]: libmsc/msc_vty.c: refactor 'show subscr / conn / trans' commands Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14069 Change subject: libmsc/msc_vty.c: refactor 'show subscr / conn / trans' commands ...................................................................... libmsc/msc_vty.c: refactor 'show subscr / conn / trans' commands Change-Id: I5e58b56204c3f3d019e8d4c3c96cefdbb4af4d47 --- M src/libmsc/msc_vty.c 1 file changed, 291 insertions(+), 170 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/69/14069/1 diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index 5c58221..f513f11 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -639,58 +639,6 @@ return CMD_SUCCESS; } -/* -_Subscriber_______________________________________ _LAC_ _RAN___________________ _MSC-A_state_________ _MSC-A_use_ -IMSI-123456789012345:MSISDN-12345:TMSI-0x12345678 1 GERAN-A-4294967295:A5-3 WAIT_CLASSMARK_UPDATE 2=cm_service,trans_cc -IMSI-123456789012356:MSISDN-234567:TMSI-0x123ABC78 65535 UTRAN-Iu-4294967295 COMMUNICATING 2=cm_service,trans_sms -IMSI-123456789012367:MSISDN-98712345890:TMSI-0xF.. - EUTRAN-SGs RELEASING 0=none -IMSI-123456789012378:HONR-12345432101 2 MSC-901-700-423:9876 REMOTE_MSC_A 1=inter_msc -*/ -static void vty_dump_one_conn(struct vty *vty, const struct msub *msub, int *idx) -{ - struct msc_a *msc_a = msub_msc_a(msub); - struct vlr_subscr *vsub = msub_vsub(msub); - char buf[128]; - - if (!(*idx)) - vty_out(vty, - "_Subscriber_______________________________________ _LAC_ _RAN___________________" - " _MSC-A_state_________ _MSC-A_use_%s", - VTY_NEWLINE); - (*idx)++; - - vty_out(vty, "%50s %5u %23s %20s %d=%s%s", - vlr_subscr_short_name(msub_vsub(msub), 50), - vsub ? vsub->cgi.lai.lac : 0, - msub_ran_conn_name(msub), - osmo_fsm_inst_state_name(msc_a->c.fi), - osmo_use_count_total(&msc_a->use_count), - osmo_use_count_name_buf(buf, sizeof(buf), &msc_a->use_count), - VTY_NEWLINE); -} - -DEFUN(show_msc_conn, show_msc_conn_cmd, - "show connection", SHOW_STR "Subscriber Connections\n") -{ - struct msub *msub; - int idx = 0; - llist_for_each_entry(msub, &msub_list, entry) { - vty_dump_one_conn(vty, msub, &idx); - } - return CMD_SUCCESS; -} - -static void vty_trans_hdr(struct vty *vty) -{ - if (llist_empty(&gsmnet->trans_list)) - return; - - vty_out(vty, - "_Subscriber_______________________________________ _RAN___________________" - " _P__ TI CallRef_ _state_%s", - VTY_NEWLINE); -} - static const char *get_trans_proto_str(const struct gsm_trans *trans) { static char buf[256]; @@ -703,146 +651,311 @@ trans->cc.T308_second); break; case TRANS_SMS: - snprintf(buf, sizeof(buf), "%s %s", + snprintf(buf, sizeof(buf), "CP:%s RP:%s", gsm411_cp_state_name(trans->sms.smc_inst.cp_state), gsm411_rp_state_name(trans->sms.smr_inst.rp_state)); break; default: - buf[0] = '\0'; - break; + return NULL; } return buf; } -static void vty_dump_one_trans(struct vty *vty, const struct gsm_trans *trans) +/* Prefix a given format string with a given amount of spaces */ +#define MSC_VTY_DUMP(vty, offset, fmt, args...) \ + vty_out(vty, "%*s" fmt, offset, "", ##args) + +#define MSC_VTY_DUMP_FLAG(vty, offset, name, flag) \ + MSC_VTY_DUMP(vty, offset + 2, "%s: %*s%s%s", \ + name, 30 - (int)strlen(name), "", \ + flag ? "true" : "false", \ + VTY_NEWLINE) + +enum msc_vty_dump_flags { + MSC_VTY_DUMP_F_SUBSCR = (1 << 0), + MSC_VTY_DUMP_F_CONNECTION = (1 << 1), + MSC_VTY_DUMP_F_TRANSACTION = (1 << 2), +}; + +static void vty_dump_one_trans(struct vty *vty, const struct gsm_trans *trans, + int offset, uint8_t dump_flags) { - vty_out(vty, "%50s %23s %4s %02u %08x %s%s", - vlr_subscr_short_name(msc_a_vsub(trans->msc_a), 50), - msub_ran_conn_name(trans->msc_a->c.msub), - trans_type_name(trans->type), - trans->transaction_id, - trans->callref, - get_trans_proto_str(trans), - VTY_NEWLINE); + const char *proto_str; + + if (dump_flags & MSC_VTY_DUMP_F_SUBSCR) { + MSC_VTY_DUMP(vty, offset, "Subscriber: %s%s", + vlr_subscr_name(msc_a_vsub(trans->msc_a)), + VTY_NEWLINE); + } + + if (dump_flags & MSC_VTY_DUMP_F_CONNECTION) { + /* FIXME: trans->msc_a may be NULL (e.g. in case of MT SMS) */ + MSC_VTY_DUMP(vty, offset, "RAN connection: %s%s", + msub_ran_conn_name(trans->msc_a->c.msub), + VTY_NEWLINE); + } + + MSC_VTY_DUMP(vty, offset, "Unique (global) identifier: 0x%08x%s", + trans->callref, VTY_NEWLINE); + MSC_VTY_DUMP(vty, offset, "GSM 04.07 identifier (%s): %u%s", + (trans->transaction_id & 0x08) ? "MO" : "MT", + trans->transaction_id, + VTY_NEWLINE); + + MSC_VTY_DUMP(vty, offset, "Type: %s%s", + trans_type_name(trans->type), + VTY_NEWLINE); + + if ((proto_str = get_trans_proto_str(trans))) { + MSC_VTY_DUMP(vty, offset, "Protocol specific: %s%s", + proto_str, VTY_NEWLINE); + } +} + +static void vty_dump_one_conn(struct vty *vty, const struct msub *msub, + int offset, uint8_t dump_flags) +{ + struct vlr_subscr *vsub = msub_vsub(msub); + struct msc_a *msc_a = msub_msc_a(msub); + char buf[128]; + + if (dump_flags & MSC_VTY_DUMP_F_SUBSCR) { + dump_flags = dump_flags &~ MSC_VTY_DUMP_F_SUBSCR; + MSC_VTY_DUMP(vty, offset, "Subscriber: %s%s", + vlr_subscr_name(vsub), + VTY_NEWLINE); + } + + MSC_VTY_DUMP(vty, offset, "RAN connection: %s%s", + msub_ran_conn_name(msub), + VTY_NEWLINE); + MSC_VTY_DUMP(vty, offset, "RAN connection state: %s%s", + osmo_fsm_inst_state_name(msc_a->c.fi), + VTY_NEWLINE); + + if (vsub) { + MSC_VTY_DUMP(vty, offset, "LAC / cell ID: %u / %u%s", + vsub->cgi.lai.lac, vsub->cgi.cell_identity, + VTY_NEWLINE); + } + + MSC_VTY_DUMP(vty, offset, "Use count total: %d%s", + osmo_use_count_total(&msc_a->use_count), + VTY_NEWLINE); + MSC_VTY_DUMP(vty, offset, "Use count: %s%s", + osmo_use_count_name_buf(buf, sizeof(buf), &msc_a->use_count), + VTY_NEWLINE); + + /* Transactions of this connection */ + if (dump_flags & MSC_VTY_DUMP_F_TRANSACTION) { + struct gsm_trans *trans; + unsigned int i = 0; + + /* Both subscriber and connection info is already printed */ + dump_flags = dump_flags &~ MSC_VTY_DUMP_F_CONNECTION; + dump_flags = dump_flags &~ MSC_VTY_DUMP_F_SUBSCR; + + llist_for_each_entry(trans, &gsmnet->trans_list, entry) { + if (trans->msc_a != msc_a) + continue; + MSC_VTY_DUMP(vty, offset, "Transaction #%02u: %s", + i++, VTY_NEWLINE); + vty_dump_one_trans(vty, trans, offset + 2, dump_flags); + } + } +} + +static void vty_dump_one_subscr(struct vty *vty, struct vlr_subscr *vsub, + int offset, uint8_t dump_flags) +{ + char buf[128]; + + if (strlen(vsub->name)) { + MSC_VTY_DUMP(vty, offset, "Name: '%s'%s", + vsub->name, VTY_NEWLINE); + } + if (strlen(vsub->msisdn)) { + MSC_VTY_DUMP(vty, offset, "MSISDN: %s%s", + vsub->msisdn, VTY_NEWLINE); + } + + MSC_VTY_DUMP(vty, offset, "LAC / cell ID: %u / %u%s", + vsub->cgi.lai.lac, vsub->cgi.cell_identity, + VTY_NEWLINE); + MSC_VTY_DUMP(vty, offset, "RAN type: %s%s", + osmo_rat_type_name(vsub->cs.attached_via_ran), + VTY_NEWLINE); + + MSC_VTY_DUMP(vty, offset, "IMSI: %s%s", + vsub->imsi, VTY_NEWLINE); + if (vsub->tmsi != GSM_RESERVED_TMSI) { + MSC_VTY_DUMP(vty, offset, "TMSI: %08X%s", + vsub->tmsi, VTY_NEWLINE); + } + if (vsub->tmsi_new != GSM_RESERVED_TMSI) { + MSC_VTY_DUMP(vty, offset, "New TMSI: %08X%s", + vsub->tmsi_new, VTY_NEWLINE); + } + if (vsub->imei[0] != '\0') { + MSC_VTY_DUMP(vty, offset, "IMEI: %s%s", + vsub->imei, VTY_NEWLINE); + } + if (vsub->imeisv[0] != '\0') { + MSC_VTY_DUMP(vty, offset, "IMEISV: %s%s", + vsub->imeisv, VTY_NEWLINE); + } + + MSC_VTY_DUMP(vty, offset, "Flags: %s", VTY_NEWLINE); + MSC_VTY_DUMP_FLAG(vty, offset, "IMSI detached", + vsub->imsi_detached_flag); + MSC_VTY_DUMP_FLAG(vty, offset, "Conf. by radio contact", + vsub->conf_by_radio_contact_ind); + MSC_VTY_DUMP_FLAG(vty, offset, "Subscr. data conf. by HLR", + vsub->sub_dataconf_by_hlr_ind); + MSC_VTY_DUMP_FLAG(vty, offset, "Location conf. in HLR", + vsub->loc_conf_in_hlr_ind); + MSC_VTY_DUMP_FLAG(vty, offset, "Subscriber dormant", + vsub->dormant_ind); + MSC_VTY_DUMP_FLAG(vty, offset, "Received cancel location", + vsub->cancel_loc_rx); + MSC_VTY_DUMP_FLAG(vty, offset, "MS not reachable", + vsub->ms_not_reachable_flag); + MSC_VTY_DUMP_FLAG(vty, offset, "LA allowed", + vsub->la_allowed); + + if (vsub->last_tuple) { + struct vlr_auth_tuple *t = vsub->last_tuple; + MSC_VTY_DUMP(vty, offset, "A3A8 last tuple (used %d times): %s", + t->use_count, VTY_NEWLINE); + MSC_VTY_DUMP(vty, offset + 2, "seq # : %d%s", + t->key_seq, VTY_NEWLINE); + MSC_VTY_DUMP(vty, offset + 2, "RAND : %s%s", + osmo_hexdump(t->vec.rand, sizeof(t->vec.rand)), + VTY_NEWLINE); + MSC_VTY_DUMP(vty, offset + 2, "SRES : %s%s", + osmo_hexdump(t->vec.sres, sizeof(t->vec.sres)), + VTY_NEWLINE); + MSC_VTY_DUMP(vty, offset + 2, "Kc : %s%s", + osmo_hexdump(t->vec.kc, sizeof(t->vec.kc)), + VTY_NEWLINE); + } + + MSC_VTY_DUMP(vty, offset, "Paging: %s paging for %d requests%s", + vsub->cs.is_paging ? "is" : "not", + llist_count(&vsub->cs.requests), + VTY_NEWLINE); + + /* SGs related */ + MSC_VTY_DUMP(vty, offset, "SGs-state: %s%s", + osmo_fsm_inst_state_name(vsub->sgs_fsm), + VTY_NEWLINE); + MSC_VTY_DUMP(vty, offset, "SGs-MME: %s%s", + strlen(vsub->sgs.mme_name) ? + vsub->sgs.mme_name : "(none)", + VTY_NEWLINE); + + MSC_VTY_DUMP(vty, offset, "Use count total: %d%s", + osmo_use_count_total(&vsub->use_count), + VTY_NEWLINE); + MSC_VTY_DUMP(vty, offset, "Use count: %s%s", + osmo_use_count_name_buf(buf, sizeof(buf), &vsub->use_count), + VTY_NEWLINE); + + /* Connection(s) and/or transactions of this subscriber */ + if (dump_flags & MSC_VTY_DUMP_F_CONNECTION) { + struct msub *msub = msub_for_vsub(vsub); + if (!msub) + return; + + /* Subscriber info is already printed */ + dump_flags = dump_flags &~ MSC_VTY_DUMP_F_SUBSCR; + + MSC_VTY_DUMP(vty, offset, "Connection: %s", VTY_NEWLINE); + vty_dump_one_conn(vty, msub, offset + 2, dump_flags); + } else if (dump_flags & MSC_VTY_DUMP_F_TRANSACTION) { + struct gsm_trans *trans; + unsigned int i = 0; + + /* Subscriber info is already printed */ + dump_flags = dump_flags &~ MSC_VTY_DUMP_F_SUBSCR; + /* Do not print connection info, but mention it */ + dump_flags |= MSC_VTY_DUMP_F_CONNECTION; + + llist_for_each_entry(trans, &gsmnet->trans_list, entry) { + if (trans->vsub != vsub) + continue; + MSC_VTY_DUMP(vty, offset, "Transaction #%02u: %s", + i++, VTY_NEWLINE); + vty_dump_one_trans(vty, trans, offset + 2, dump_flags); + } + } } DEFUN(show_msc_transaction, show_msc_transaction_cmd, - "show transaction", SHOW_STR "Transactions\n") + "show transaction", + SHOW_STR "Transactions\n") { struct gsm_trans *trans; + uint8_t flags = 0x00; + unsigned int i = 0; - vty_trans_hdr(vty); - llist_for_each_entry(trans, &gsmnet->trans_list, entry) - vty_dump_one_trans(vty, trans); + flags |= MSC_VTY_DUMP_F_CONNECTION; + flags |= MSC_VTY_DUMP_F_SUBSCR; + + llist_for_each_entry(trans, &gsmnet->trans_list, entry) { + vty_out(vty, " Transaction #%02u: %s", i++, VTY_NEWLINE); + vty_dump_one_trans(vty, trans, 4, flags); + } return CMD_SUCCESS; } -static void subscr_dump_full_vty(struct vty *vty, struct vlr_subscr *vsub) +DEFUN(show_msc_conn, show_msc_conn_cmd, + "show connection [trans]", + SHOW_STR "Subscriber Connections\n" + "Show child transactions of each connection\n") { - struct gsm_trans *trans; - char buf[128]; + uint8_t flags = 0x00; + unsigned int i = 0; + struct msub *msub; - if (strlen(vsub->name)) - vty_out(vty, " Name: '%s'%s", vsub->name, VTY_NEWLINE); - if (strlen(vsub->msisdn)) - vty_out(vty, " Extension: %s%s", vsub->msisdn, - VTY_NEWLINE); - vty_out(vty, " LAC: %d/0x%x%s", - vsub->cgi.lai.lac, vsub->cgi.lai.lac, VTY_NEWLINE); - vty_out(vty, " RAN: %s%s", - osmo_rat_type_name(vsub->cs.attached_via_ran), VTY_NEWLINE); - vty_out(vty, " IMSI: %s%s", vsub->imsi, VTY_NEWLINE); - if (vsub->tmsi != GSM_RESERVED_TMSI) - vty_out(vty, " TMSI: %08X%s", vsub->tmsi, - VTY_NEWLINE); - if (vsub->tmsi_new != GSM_RESERVED_TMSI) - vty_out(vty, " new TMSI: %08X%s", vsub->tmsi_new, - VTY_NEWLINE); - if (vsub->imei[0] != '\0') - vty_out(vty, " IMEI: %s%s", vsub->imei, VTY_NEWLINE); - if (vsub->imeisv[0] != '\0') - vty_out(vty, " IMEISV: %s%s", vsub->imeisv, VTY_NEWLINE); + if (argc > 0) + flags |= MSC_VTY_DUMP_F_TRANSACTION; + flags |= MSC_VTY_DUMP_F_SUBSCR; - vty_out(vty, " Flags: %s", VTY_NEWLINE); - vty_out(vty, " IMSI detached: %s%s", - vsub->imsi_detached_flag ? "true" : "false", VTY_NEWLINE); - vty_out(vty, " Conf. by radio contact: %s%s", - vsub->conf_by_radio_contact_ind ? "true" : "false", - VTY_NEWLINE); - vty_out(vty, " Subscr. data conf. by HLR: %s%s", - vsub->sub_dataconf_by_hlr_ind ? "true" : "false", VTY_NEWLINE); - vty_out(vty, " Location conf. in HLR: %s%s", - vsub->loc_conf_in_hlr_ind ? "true" : "false", VTY_NEWLINE); - vty_out(vty, " Subscriber dormant: %s%s", - vsub->dormant_ind ? "true" : "false", VTY_NEWLINE); - vty_out(vty, " Received cancel locataion: %s%s", - vsub->cancel_loc_rx ? "true" : "false", VTY_NEWLINE); - vty_out(vty, " MS not reachable: %s%s", - vsub->ms_not_reachable_flag ? "true" : "false", VTY_NEWLINE); - vty_out(vty, " LA allowed: %s%s", - vsub->la_allowed ? "true" : "false", VTY_NEWLINE); - - if (vsub->last_tuple) { - struct vlr_auth_tuple *t = vsub->last_tuple; - vty_out(vty, " A3A8 last tuple (used %d times):%s", - t->use_count, VTY_NEWLINE); - vty_out(vty, " seq # : %d%s", - t->key_seq, VTY_NEWLINE); - vty_out(vty, " RAND : %s%s", - osmo_hexdump(t->vec.rand, sizeof(t->vec.rand)), - VTY_NEWLINE); - vty_out(vty, " SRES : %s%s", - osmo_hexdump(t->vec.sres, sizeof(t->vec.sres)), - VTY_NEWLINE); - vty_out(vty, " Kc : %s%s", - osmo_hexdump(t->vec.kc, sizeof(t->vec.kc)), - VTY_NEWLINE); + llist_for_each_entry(msub, &msub_list, entry) { + vty_out(vty, " Connection #%02u: %s", i++, VTY_NEWLINE); + vty_dump_one_conn(vty, msub, 4, flags); } - vty_out(vty, " Paging: %s paging for %d requests%s", - vsub->cs.is_paging ? "is" : "not", - llist_count(&vsub->cs.requests), - VTY_NEWLINE); - - /* SGs related */ - vty_out(vty, " SGs-state: %s%s", - osmo_fsm_inst_state_name(vsub->sgs_fsm), VTY_NEWLINE); - if (strlen(vsub->sgs.mme_name)) - vty_out(vty, " SGs-MME: %s%s", vsub->sgs.mme_name, VTY_NEWLINE); - else - vty_out(vty, " SGs-MME: (none)%s", VTY_NEWLINE); - - vty_out(vty, " Use: %s%s", osmo_use_count_name_buf(buf, sizeof(buf), &vsub->use_count), VTY_NEWLINE); - - /* Connection */ - if (vsub->msc_conn_ref) { - struct msub *msub = msub_for_vsub(vsub); - int idx = 0; - if (msub) { - vty_dump_one_conn(vty, msub, &idx); - } - } - - /* Transactions */ - vty_trans_hdr(vty); - llist_for_each_entry(trans, &gsmnet->trans_list, entry) { - if (trans->vsub != vsub) - continue; - vty_dump_one_trans(vty, trans); - } + return CMD_SUCCESS; } +#define SUBSCR_FLAGS "[(conn|trans|conn+trans)]" +#define SUBSCR_FLAGS_HELP \ + "Show child connections\n" \ + "Show child transactions\n" \ + "Show child connections and transactions\n" + /* Subscriber */ -DEFUN(show_subscr_cache, - show_subscr_cache_cmd, - "show subscriber cache", +DEFUN(show_subscr_cache, show_subscr_cache_cmd, + "show subscriber cache " SUBSCR_FLAGS, SHOW_STR "Show information about subscribers\n" - "Display contents of subscriber cache\n") + "Display contents of subscriber cache\n" + SUBSCR_FLAGS_HELP) { struct vlr_subscr *vsub; - int count = 0; + unsigned int count = 0; + uint8_t flags = 0x00; + unsigned int i = 0; + + if (argc && strcmp(argv[0], "conn") == 0) + flags |= MSC_VTY_DUMP_F_CONNECTION; + else if (argc && strcmp(argv[0], "trans") == 0) + flags |= MSC_VTY_DUMP_F_TRANSACTION; + else if (argc && strcmp(argv[0], "conn+trans") == 0) + flags |= MSC_VTY_DUMP_F_CONNECTION | MSC_VTY_DUMP_F_TRANSACTION; llist_for_each_entry(vsub, &gsmnet->vlr->subscribers, list) { if (++count > 100) { @@ -850,8 +963,8 @@ " stopping here.%s", count-1, VTY_NEWLINE); break; } - vty_out(vty, " Subscriber:%s", VTY_NEWLINE); - subscr_dump_full_vty(vty, vsub); + vty_out(vty, " Subscriber #%02u: %s", i++, VTY_NEWLINE); + vty_dump_one_subscr(vty, vsub, 4, flags); } return CMD_SUCCESS; @@ -960,14 +1073,14 @@ "Legacy alias for 'imsi'\n" \ "Identifier for the subscriber\n" -DEFUN(show_subscr, - show_subscr_cmd, - "show subscriber " SUBSCR_TYPES " ID", - SHOW_STR SUBSCR_HELP) +DEFUN(show_subscr, show_subscr_cmd, + "show subscriber " SUBSCR_TYPES " ID " SUBSCR_FLAGS, + SHOW_STR SUBSCR_HELP SUBSCR_FLAGS_HELP) { - struct vlr_subscr *vsub = get_vsub_by_argv(gsmnet, argv[0], - argv[1]); + struct vlr_subscr *vsub; + uint8_t flags = 0x00; + vsub = get_vsub_by_argv(gsmnet, argv[0], argv[1]); if (!vsub) { vty_out(vty, "%% No subscriber found for %s %s%s", argv[0], argv[1], VTY_NEWLINE); @@ -979,7 +1092,15 @@ * this, and since this is not multi-threaded, this vlr_subscr_put() cannot possibly reach a count of 0. */ vlr_subscr_put(vsub, VSUB_USE_VTY); - subscr_dump_full_vty(vty, vsub); + if (argc > 2 && strcmp(argv[2], "conn") == 0) + flags |= MSC_VTY_DUMP_F_CONNECTION; + else if (argc > 2 && strcmp(argv[2], "trans") == 0) + flags |= MSC_VTY_DUMP_F_TRANSACTION; + else if (argc > 2 && strcmp(argv[2], "conn+trans") == 0) + flags |= MSC_VTY_DUMP_F_CONNECTION | MSC_VTY_DUMP_F_TRANSACTION; + + vty_out(vty, " Subscriber: %s", VTY_NEWLINE); + vty_dump_one_subscr(vty, vsub, 4, flags); return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/14069 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I5e58b56204c3f3d019e8d4c3c96cefdbb4af4d47 Gerrit-Change-Number: 14069 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Thu May 16 02:57:57 2019 From: admin at opensuse.org (OBS Notification) Date: Thu, 16 May 2019 02:57:57 +0000 Subject: Build failure of network:osmocom:nightly/libosmo-netif in Raspbian_9.0/armv7l In-Reply-To: References: Message-ID: <5cdcd1b9a397b_58803905f86009a@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmo-netif/Raspbian_9.0/armv7l Package network:osmocom:nightly/libosmo-netif failed to build in Raspbian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly libosmo-netif Last lines of build log: [ 280s] | configure:12791: $? = 1 [ 280s] | configure: failed program was: [ 280s] | | /* confdefs.h */ [ 280s] | | #define PACKAGE_NAME "libosmo-netif" [ 280s] | | #define PACKAGE_TARNAME "libosmo-netif" [ 280s] | | #define PACKAGE_VERSION "0.5.0" [ 280s] | | #define PACKAGE_STRING "libosmo-netif 0.5.0" [ 280s] | | #define PACKAGE_BUGREPORT "openbsc-devel at lists.openbsc.org" [ 280s] | | #define PACKAGE_URL "" [ 280s] | | #define PACKAGE "libosmo-netif" [ 280s] | | #define VERSION "0.5.0" [ 280s] | | #define STDC_HEADERS 1 [ 280s] | | #define HAVE_SYS_TYPES_H 1 [ 280s] | | #define HAVE_SYS_STAT_H 1 [ 280s] | | #define HAVE_STDLIB_H 1 [ 280s] | | #define HAVE_STRING_H 1 [ 280s] | | #define HAVE_MEMORY_H 1 [ 280s] | | #define HAVE_STRINGS_H 1 [ 280s] | | #define HAVE_INTTYPES_H 1 [ 280s] | | #define HAVE_STDINT_H 1 [ 280s] | | #define HAVE_UNISTD_H 1 [ 280s] | | #define HAVE_DLFCN_H 1 [ 280s] | | #define LT_OBJDIR ".libs/" [ 282s] | | #define STDC[ 242.608070] sysrq: SysRq : Power Off [ 282s] [ 242.610629] reboot: Power down [ 282s] ### VM INTERACTION END ### [ 282s] [ 282s] armbuild15 failed "build libosmo-netif_0.5.0.dsc" at Thu May 16 02:57:50 UTC 2019. [ 282s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Thu May 16 08:48:17 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 May 2019 08:48:17 +0000 Subject: Change in osmo-msc[master]: libmsc/msc_vty.c: fix: use msub_for_vsub() in subscr_dump_full_vty() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14061 ) Change subject: libmsc/msc_vty.c: fix: use msub_for_vsub() in subscr_dump_full_vty() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14061 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8a099b71b10ebb5d2bccfc7e78b6d37a1e60add8 Gerrit-Change-Number: 14061 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 16 May 2019 08:48:17 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 16 08:48:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 May 2019 08:48:33 +0000 Subject: Change in osmo-msc[master]: libmsc/msc_vty.c: fix documentation of 'show subscriber id' In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14062 ) Change subject: libmsc/msc_vty.c: fix documentation of 'show subscriber id' ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14062 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I3357e71ae54e22b97cbb3707712445d7602c1129 Gerrit-Change-Number: 14062 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 16 May 2019 08:48:33 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 16 08:48:46 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 May 2019 08:48:46 +0000 Subject: Change in osmo-msc[master]: libmsc/msc_vty.c: use llist_count() in subscr_dump_full_vty() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14063 ) Change subject: libmsc/msc_vty.c: use llist_count() in subscr_dump_full_vty() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14063 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9e4814d2b2da7d4e75da074e138f423af850ed49 Gerrit-Change-Number: 14063 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Comment-Date: Thu, 16 May 2019 08:48:46 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 16 08:48:51 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 May 2019 08:48:51 +0000 Subject: Change in osmo-msc[master]: libmsc/msc_vty.c: fix: use msub_for_vsub() in subscr_dump_full_vty() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14061 ) Change subject: libmsc/msc_vty.c: fix: use msub_for_vsub() in subscr_dump_full_vty() ...................................................................... libmsc/msc_vty.c: fix: use msub_for_vsub() in subscr_dump_full_vty() Change-Id: I8a099b71b10ebb5d2bccfc7e78b6d37a1e60add8 Related: OS#4003 --- M src/libmsc/msc_vty.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index bd369ae..67955d3 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -821,7 +821,7 @@ /* Connection */ if (vsub->msc_conn_ref) { - struct msub *msub = vsub->msc_conn_ref; + struct msub *msub = msub_for_vsub(vsub); int idx = 0; if (msub) { vty_dump_one_conn(vty, msub, &idx); -- To view, visit https://gerrit.osmocom.org/14061 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I8a099b71b10ebb5d2bccfc7e78b6d37a1e60add8 Gerrit-Change-Number: 14061 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 16 08:48:51 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 May 2019 08:48:51 +0000 Subject: Change in osmo-msc[master]: libmsc/msc_vty.c: fix documentation of 'show subscriber id' In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14062 ) Change subject: libmsc/msc_vty.c: fix documentation of 'show subscriber id' ...................................................................... libmsc/msc_vty.c: fix documentation of 'show subscriber id' Change-Id: I3357e71ae54e22b97cbb3707712445d7602c1129 --- M src/libmsc/msc_vty.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index 67955d3..8cce7a0 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -960,7 +960,7 @@ "Legacy alias for 'msisdn'\n" \ "Identify subscriber by IMSI\n" \ "Identify subscriber by TMSI\n" \ - "Identify subscriber by database ID\n" \ + "Legacy alias for 'imsi'\n" \ "Identifier for the subscriber\n" DEFUN(show_subscr, -- To view, visit https://gerrit.osmocom.org/14062 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I3357e71ae54e22b97cbb3707712445d7602c1129 Gerrit-Change-Number: 14062 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 16 08:48:52 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 May 2019 08:48:52 +0000 Subject: Change in osmo-msc[master]: libmsc/msc_vty.c: use llist_count() in subscr_dump_full_vty() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14063 ) Change subject: libmsc/msc_vty.c: use llist_count() in subscr_dump_full_vty() ...................................................................... libmsc/msc_vty.c: use llist_count() in subscr_dump_full_vty() Change-Id: I9e4814d2b2da7d4e75da074e138f423af850ed49 --- M src/libmsc/msc_vty.c 1 file changed, 3 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index 8cce7a0..5c58221 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -742,8 +742,6 @@ static void subscr_dump_full_vty(struct vty *vty, struct vlr_subscr *vsub) { struct gsm_trans *trans; - int reqs; - struct llist_head *entry; char buf[128]; if (strlen(vsub->name)) @@ -803,11 +801,10 @@ VTY_NEWLINE); } - reqs = 0; - llist_for_each(entry, &vsub->cs.requests) - reqs += 1; vty_out(vty, " Paging: %s paging for %d requests%s", - vsub->cs.is_paging ? "is" : "not", reqs, VTY_NEWLINE); + vsub->cs.is_paging ? "is" : "not", + llist_count(&vsub->cs.requests), + VTY_NEWLINE); /* SGs related */ vty_out(vty, " SGs-state: %s%s", -- To view, visit https://gerrit.osmocom.org/14063 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I9e4814d2b2da7d4e75da074e138f423af850ed49 Gerrit-Change-Number: 14063 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 16 09:03:34 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 16 May 2019 09:03:34 +0000 Subject: Change in osmo-msc[master]: libmsc/rtp_stream.c: prevent NULL-pointer dereference In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13980 ) Change subject: libmsc/rtp_stream.c: prevent NULL-pointer dereference ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/13980 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie80b9fae490acc9ee8de742e35b6ef59c4388f57 Gerrit-Change-Number: 13980 Gerrit-PatchSet: 5 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 16 May 2019 09:03:34 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 16 09:03:50 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 16 May 2019 09:03:50 +0000 Subject: Change in osmo-msc[master]: libmsc/rtp_stream.c: prevent NULL-pointer dereference In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/13980 ) Change subject: libmsc/rtp_stream.c: prevent NULL-pointer dereference ...................................................................... libmsc/rtp_stream.c: prevent NULL-pointer dereference Change-Id: Ie80b9fae490acc9ee8de742e35b6ef59c4388f57 Fixes: CID#198432 --- M src/libmsc/rtp_stream.c 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/rtp_stream.c b/src/libmsc/rtp_stream.c index 6163a98..afe24ad 100644 --- a/src/libmsc/rtp_stream.c +++ b/src/libmsc/rtp_stream.c @@ -141,6 +141,12 @@ switch (event) { case RTP_STREAM_EV_CRCX_OK: crcx_info = osmo_mgcpc_ep_ci_get_rtp_info(rtps->ci); + if (!crcx_info) { + LOG_RTPS(rtps, LOGL_ERROR, "osmo_mgcpc_ep_ci_get_rtp_info() has " + "failed, ignoring %s\n", osmo_fsm_event_name(fi->fsm, event)); + return; + } + osmo_sockaddr_str_from_str(&rtps->local, crcx_info->addr, crcx_info->port); rtp_stream_update_id(rtps); osmo_fsm_inst_dispatch(fi->proc.parent, CALL_LEG_EV_RTP_STREAM_ADDR_AVAILABLE, rtps); -- To view, visit https://gerrit.osmocom.org/13980 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie80b9fae490acc9ee8de742e35b6ef59c4388f57 Gerrit-Change-Number: 13980 Gerrit-PatchSet: 6 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 16 09:32:55 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 May 2019 09:32:55 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid: Integrate libosmocore logging In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14066 ) Change subject: ccid: Integrate libosmocore logging ...................................................................... ccid: Integrate libosmocore logging Change-Id: I3436827f658653273af21f1deaf030c2a389f91a --- M ccid/Makefile M ccid/ccid_device.c M ccid/ccid_device.h M ccid/ccid_main_functionfs.c 4 files changed, 97 insertions(+), 22 deletions(-) Approvals: Jenkins Builder: Verified diff --git a/ccid/Makefile b/ccid/Makefile index 317fcbd..cd8321f 100644 --- a/ccid/Makefile +++ b/ccid/Makefile @@ -1,7 +1,7 @@ CFLAGS=-Wall -g ccid_functionfs: ccid_main_functionfs.o ccid_proto.o ccid_device.o - $(CC) $(CFLAGS) -lasan -losmocore -laio -o $@ $^ + $(CC) $(CFLAGS) -lasan -losmocore -ltalloc -laio -o $@ $^ %.o: %.c $(CC) $(CFLAGS) -o $@ -c $^ diff --git a/ccid/ccid_device.c b/ccid/ccid_device.c index e3705ae..ffcbacc 100644 --- a/ccid/ccid_device.c +++ b/ccid/ccid_device.c @@ -6,6 +6,7 @@ #include #include +#include #include "ccid_proto.h" #include "ccid_device.h" @@ -157,6 +158,15 @@ /* Send given CCID message */ static int ccid_send(struct ccid_instance *ci, struct msgb *msg) { + struct ccid_header *ch = (struct ccid_header *) msgb_ccid_in(msg); + struct ccid_slot *cs = get_ccid_slot(ci, ch->bSlot); + if (cs) { + LOGPCS(cs, LOGL_DEBUG, "Tx CCID(IN) %s %s\n", + get_value_string(ccid_msg_type_vals, ch->bMessageType), msgb_hexdump(msg)); + } else { + LOGPCI(ci, LOGL_DEBUG, "Tx CCID(IN) %s %s\n", + get_value_string(ccid_msg_type_vals, ch->bMessageType), msgb_hexdump(msg)); + } return ci->ops->send_in(ci, msg); } @@ -470,24 +480,32 @@ switch (spar->bProtocolNum) { case CCID_PROTOCOL_NUM_T0: rc = decode_ccid_pars_t0(&pars_dec, &spar->abProtocolData.t0); - if (rc < 0) + if (rc < 0) { + LOGP(DCCID, LOGL_ERROR, "SetParameters: Unable to parse T0: %d\n", rc); resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_FAILED, -rc); + goto out; + } /* FIXME: validate parameters; abort if they are not supported */ cs->pars = pars_dec; resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_OK, 0); break; case CCID_PROTOCOL_NUM_T1: rc = decode_ccid_pars_t1(&pars_dec, &spar->abProtocolData.t1); - if (rc < 0) + if (rc < 0) { + LOGP(DCCID, LOGL_ERROR, "SetParameters: Unable to parse T1: %d\n", rc); resp = ccid_gen_parameters_t1(cs, seq, CCID_CMD_STATUS_FAILED, -rc); + goto out; + } /* FIXME: validate parameters; abort if they are not supported */ cs->pars = pars_dec; resp = ccid_gen_parameters_t1(cs, seq, CCID_CMD_STATUS_OK, 0); break; default: + LOGP(DCCID, LOGL_ERROR, "SetParameters: Invalid Protocol 0x%02x\n",spar->bProtocolNum); resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_FAILED, 0); break; } +out: return ccid_slot_send_unbusy(cs, resp); } @@ -573,6 +591,7 @@ //case PC_to_RDR_Abort: /* seriously? WTF! */ break; default: + LOGP(DCCID, LOGL_ERROR, "Abort for non-Abortable Message Type\n"); /* CCID spec lists CMD_NOT_ABORTED, but gives no numberic value ?!? */ resp = ccid_gen_slot_status(cs, seq, CCID_CMD_STATUS_FAILED, CCID_ERR_CMD_NOT_SUPPORTED); return ccid_slot_send_unbusy(cs, resp); @@ -617,18 +636,23 @@ /* Check for invalid slot number */ cs = get_ccid_slot(ci, ch->bSlot); if (!cs) { + LOGPCI(ci, LOGL_ERROR, "Invalid bSlot %u\n", ch->bSlot); resp = gen_err_resp(ch->bMessageType, ch->bSlot, CCID_ICC_STATUS_NO_ICC, ch->bSeq, 5); return ccid_send(ci, resp); } /* Check if slot is already busy; Reject any additional commands meanwhile */ if (cs->cmd_busy) { + LOGPCS(cs, LOGL_ERROR, "Slot Busy, but another cmd received\n"); /* FIXME: ABORT logic as per section 5.3.1 of CCID Spec v1.1 */ resp = gen_err_resp(ch->bMessageType, ch->bSlot, get_icc_status(cs), ch->bSeq, CCID_ERR_CMD_SLOT_BUSY); return ccid_send(ci, resp); } + LOGPCS(cs, LOGL_DEBUG, "Rx CCID(OUT) %s %s\n", + get_value_string(ccid_msg_type_vals, ch->bMessageType), msgb_hexdump(msg)); + /* we're now processing a command for the slot; mark slot as busy */ cs->cmd_busy = true; @@ -707,6 +731,7 @@ break; default: /* generic response with bERror = 0 (command not supported) */ + LOGP(DCCID, LOGL_NOTICE, "Unknown CCID Message received: 0x%02x\n", ch->bMessageType); resp = gen_err_resp(ch->bMessageType, ch->bSlot, CCID_ICC_STATUS_NO_ICC, ch->bSeq, CCID_ERR_CMD_NOT_SUPPORTED); return ccid_slot_send_unbusy(cs, resp); @@ -714,7 +739,7 @@ return 0; short_msg: - /* FIXME */ + LOGP(DCCID, LOGL_ERROR, "Short CCID message received: %s; ignoring\n", msgb_hexdump(msg)); return -1; } diff --git a/ccid/ccid_device.h b/ccid/ccid_device.h index 4cdb325..68ec98a 100644 --- a/ccid/ccid_device.h +++ b/ccid/ccid_device.h @@ -2,12 +2,16 @@ #include #include +enum { + DCCID, + DUSB, +}; #define NR_SLOTS 8 #define LOGPCI(ci, lvl, fmt, args ...) LOGP(DCCID, lvl, "%s: " fmt, (ci)->name, ## args) #define LOGPCS(cs, lvl, fmt, args ...) \ - LOGP(DCCID, lvl, "%s(%u): " fmt, (cc)->ci->name, (cc)->slot_nr, ## args) + LOGP(DCCID, lvl, "%s(%u): " fmt, (cs)->ci->name, (cs)->slot_nr, ## args) struct msgb; diff --git a/ccid/ccid_main_functionfs.c b/ccid/ccid_main_functionfs.c index 2b57182..717a6ae 100644 --- a/ccid/ccid_main_functionfs.c +++ b/ccid/ccid_main_functionfs.c @@ -1,4 +1,5 @@ +#include #include #include #include @@ -132,6 +133,9 @@ #include #include #include +#include +#include +#include #include "ccid_device.h" @@ -161,7 +165,7 @@ static int ep_int_cb(struct osmo_fd *ofd, unsigned int what) { - printf("INT\n"); + LOGP(DUSB, LOGL_DEBUG, "%s\n", __func__); return 0; } @@ -171,7 +175,7 @@ struct msgb *msg = msgb_alloc(512, "OUT-Rx"); int rc; - printf("OUT\n"); + LOGP(DUSB, LOGL_DEBUG, "%s\n", __func__); if (what & BSC_FD_READ) { rc = read(ofd->fd, msgb_data(msg), msgb_tailroom(msg)); if (rc <= 0) { @@ -187,7 +191,7 @@ static int ep_in_cb(struct osmo_fd *ofd, unsigned int what) { - printf("IN\n"); + LOGP(DUSB, LOGL_DEBUG, "%s\n", __func__); if (what & BSC_FD_WRITE) { /* write what we have to write */ } @@ -207,11 +211,10 @@ static void handle_setup(const struct usb_ctrlrequest *setup) { - printf("bRequestType = %d\n", setup->bRequestType); - printf("bRequest = %d\n", setup->bRequest); - printf("wValue = %d\n", le16_to_cpu(setup->wValue)); - printf("wIndex = %d\n", le16_to_cpu(setup->wIndex)); - printf("wLength = %d\n", le16_to_cpu(setup->wLength)); + LOGP(DUSB, LOGL_NOTICE, "EP0 SETUP bRequestType=0x%02x, bRequest=0x%02x wValue=0x%04x, " + "wIndex=0x%04x, wLength=%u\n", setup->bRequestType, setup->bRequest, + le16_to_cpu(setup->wValue), le16_to_cpu(setup->wIndex), le16_to_cpu(setup->wLength)); + /* FIXME: Handle control transfer */ } static void aio_refill_out(struct ufunc_handle *uh); @@ -221,14 +224,12 @@ struct ufunc_handle *uh = (struct ufunc_handle *) ofd->data; int rc; - printf("EP0\n"); - if (what & BSC_FD_READ) { struct usb_functionfs_event evt; rc = read(ofd->fd, (uint8_t *)&evt, sizeof(evt)); if (rc < sizeof(evt)) return -23; - printf("\t%s\n", get_value_string(ffs_evt_type_names, evt.type)); + LOGP(DUSB, LOGL_NOTICE, "EP0 %s\n", get_value_string(ffs_evt_type_names, evt.type)); switch (evt.type) { case FUNCTIONFS_ENABLE: aio_refill_out(uh); @@ -248,6 +249,8 @@ { int rc; struct aio_help *ah = &uh->aio_out; + + LOGP(DUSB, LOGL_DEBUG, "%s\n", __func__); msgb_reset(ah->msg); io_prep_pread(ah->iocb, uh->ep_out.fd, msgb_data(ah->msg), msgb_tailroom(ah->msg), 0); io_set_eventfd(ah->iocb, uh->aio_evfd.fd); @@ -266,24 +269,31 @@ assert(rc == sizeof(ev_cnt)); rc = io_getevents(uh->aio_ctx, 1, 3, evt, NULL); - if (rc <= 0) + if (rc <= 0) { + LOGP(DUSB, LOGL_ERROR, "error in io_getevents(): %d\n", rc); return rc; + } for (i = 0; i < rc; i++) { int fd = evt[i].obj->aio_fildes; if (fd == uh->ep_int.fd) { /* interrupt endpoint AIO has completed. This means the IRQ transfer * which we generated has reached the host */ + LOGP(DUSB, LOGL_DEBUG, "IRQ AIO completed, free()ing msgb\n"); + msgb_free(uh->aio_in.msg); + uh->aio_in.msg = NULL; } else if (fd == uh->ep_in.fd) { /* IN endpoint AIO has completed. This means the IN transfer which * we sent to the host has completed */ + LOGP(DUSB, LOGL_DEBUG, "IN AIO completed, free()ing msgb\n"); msgb_free(uh->aio_in.msg); uh->aio_in.msg = NULL; } else if (fd == uh->ep_out.fd) { - /* IN endpoint AIO has completed. This means the host has sent us + /* OUT endpoint AIO has completed. This means the host has sent us * some OUT data */ + LOGP(DUSB, LOGL_DEBUG, "OUT AIO completed, dispatching received msg\n"); msgb_put(uh->aio_out.msg, evt[i].res); - printf("\t%s\n", msgb_hexdump(uh->aio_out.msg)); + //printf("\t%s\n", msgb_hexdump(uh->aio_out.msg)); //ccid_handle_out(uh->ccid_handle, uh->aio_out.buf, evt[i].res); ccid_handle_out(uh->ccid_handle, uh->aio_out.msg); aio_refill_out(uh); @@ -304,11 +314,15 @@ osmo_fd_setup(&uh->ep0, rc, BSC_FD_READ, &ep_0_cb, uh, 0); osmo_fd_register(&uh->ep0); rc = write(uh->ep0.fd, &descriptors, sizeof(descriptors)); - if (rc != sizeof(descriptors)) + if (rc != sizeof(descriptors)) { + LOGP(DUSB, LOGL_ERROR, "Cannot write descriptors: %s\n", strerror(errno)); return -1; + } rc = write(uh->ep0.fd, &strings, sizeof(strings)); - if (rc != sizeof(strings)) + if (rc != sizeof(strings)) { + LOGP(DUSB, LOGL_ERROR, "Cannot write strings: %s\n", strerror(errno)); return -1; + } /* open other endpoint file descriptors */ rc = open("ep1", O_RDWR); @@ -378,20 +392,52 @@ .send_in = ccid_ops_send_in, }; +static const struct log_info_cat log_info_cat[] = { + [DUSB] = { + .name = "USB", + .description = "USB Transport", + .enabled = 1, + .loglevel = LOGL_NOTICE, + }, + [DCCID] = { + .name = "CCID", + .description = "CCID Core", + .color = "\033[1;35m", + .enabled = 1, + .loglevel = LOGL_DEBUG, + }, +}; + +static const struct log_info log_info = { + .cat = log_info_cat, + .num_cat = ARRAY_SIZE(log_info_cat), +}; + +static void *tall_main_ctx; + int main(int argc, char **argv) { struct ufunc_handle ufh = (struct ufunc_handle) { 0, }; struct ccid_instance ci = (struct ccid_instance) { 0, }; int rc; + tall_main_ctx = talloc_named_const(NULL, 0, "ccid_main_functionfs"); + msgb_talloc_ctx_init(tall_main_ctx, 0); + osmo_init_logging2(tall_main_ctx, &log_info); + ccid_instance_init(&ci, &c_ops, "", &ufh); ufh.ccid_handle = &ci; + if (argc < 2) { + fprintf(stderr, "You have to specify the mount-path of the functionfs\n"); + exit(2); + } + chdir(argv[1]); rc = ep0_init(&ufh); if (rc < 0) { fprintf(stderr, "Error %d\n", rc); - exit(2); + exit(1); } while (1) { -- To view, visit https://gerrit.osmocom.org/14066 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I3436827f658653273af21f1deaf030c2a389f91a Gerrit-Change-Number: 14066 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 16 12:06:15 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 16 May 2019 12:06:15 +0000 Subject: Change in osmo-msc[master]: libmsc/msc_vty.c: refactor 'show subscr / conn / trans' commands In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14069 ) Change subject: libmsc/msc_vty.c: refactor 'show subscr / conn / trans' commands ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/14069 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5e58b56204c3f3d019e8d4c3c96cefdbb4af4d47 Gerrit-Change-Number: 14069 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 16 May 2019 12:06:15 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 16 12:56:46 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 16 May 2019 12:56:46 +0000 Subject: Change in libosmocore[master]: Cosmetic: GSUP: fix too long comment line Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/14070 Change subject: Cosmetic: GSUP: fix too long comment line ...................................................................... Cosmetic: GSUP: fix too long comment line Change-Id: I60ba8fef8924e58bc73cff5c7ff77ebb76d8bfaa --- M include/osmocom/gsm/gsup.h 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/70/14070/1 diff --git a/include/osmocom/gsm/gsup.h b/include/osmocom/gsm/gsup.h index 1374e0e..be85662 100644 --- a/include/osmocom/gsm/gsup.h +++ b/include/osmocom/gsm/gsup.h @@ -348,8 +348,8 @@ enum osmo_gsup_imei_result imei_result; /*! Indicate the message class to trivially dispatch incoming GSUP messages to the right code paths. - * Inter-MSC messages are *required* to set a class = OSMO_GSUP_MESSAGE_CLASS_INTER_MSC. For older message classes, this may - * be omitted (for backwards compatibility only -- if in doubt, include it). */ + * Inter-MSC messages are *required* to set a class = OSMO_GSUP_MESSAGE_CLASS_INTER_MSC. For older message + * classes, this may be omitted (for backwards compatibility only -- if in doubt, include it). */ enum osmo_gsup_message_class message_class; /*! For messages routed via another GSUP entity (via HLR), the IPA name of the entity that sent this message. */ -- To view, visit https://gerrit.osmocom.org/14070 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I60ba8fef8924e58bc73cff5c7ff77ebb76d8bfaa Gerrit-Change-Number: 14070 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 16 13:33:50 2019 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 16 May 2019 13:33:50 +0000 Subject: Change in openbsc[master]: nat: Allocate bsc_nat_parsed on the stack instead of heap In-Reply-To: References: Message-ID: Holger Freyther has posted comments on this change. ( https://gerrit.osmocom.org/13843 ) Change subject: nat: Allocate bsc_nat_parsed on the stack instead of heap ...................................................................... Patch Set 4: (1 comment) Looks good. Just found the minor style comment. Will do +2 after it. https://gerrit.osmocom.org/#/c/13843/4/openbsc/src/osmo-bsc_nat/bsc_nat.c File openbsc/src/osmo-bsc_nat/bsc_nat.c: https://gerrit.osmocom.org/#/c/13843/4/openbsc/src/osmo-bsc_nat/bsc_nat.c at 1213 PS4, Line 1213: /* : * Optionally rewrite setup message. This can : * replace the msg and the parsed structure becomes : * invalid. Please update. The structure is now valid but pointers may dangle? -- To view, visit https://gerrit.osmocom.org/13843 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I66c44890952339f15131081e2f629a2824b6d3ba Gerrit-Change-Number: 13843 Gerrit-PatchSet: 4 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 16 May 2019 13:33:50 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 16 13:43:29 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 16 May 2019 13:43:29 +0000 Subject: Change in libosmo-sccp[master]: osmo-stp: refactor handling of both SIGINT and SIGTERM In-Reply-To: References: Message-ID: Vadim Yanitskiy has abandoned this change. ( https://gerrit.osmocom.org/13971 ) Change subject: osmo-stp: refactor handling of both SIGINT and SIGTERM ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/13971 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: I5d8618857c5119d4acca5d65cf1276ab02889c84 Gerrit-Change-Number: 13971 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 16 13:43:56 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 16 May 2019 13:43:56 +0000 Subject: Change in libosmo-sccp[master]: osmo-stp: track the use of NULL talloc-context In-Reply-To: References: Message-ID: Vadim Yanitskiy has abandoned this change. ( https://gerrit.osmocom.org/13972 ) Change subject: osmo-stp: track the use of NULL talloc-context ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/13972 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: I89e7faf8469f5eba9599c9cbc1fec4fe583e7a13 Gerrit-Change-Number: 13972 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 16 15:05:36 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Thu, 16 May 2019 15:05:36 +0000 Subject: Change in osmo-ttcn3-hacks[master]: start-testsuite.sh: remove superflouse `set -e` Message-ID: lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/14071 Change subject: start-testsuite.sh: remove superflouse `set -e` ...................................................................... start-testsuite.sh: remove superflouse `set -e` The set -e will not interfere with the next command, as it's executed and not included. The exit code of the last command is returned with and without -e. Change-Id: I820d59b29b4ba4a1d094c5c2a2af367e6ef4e5b6 --- M start-testsuite.sh 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/71/14071/1 diff --git a/start-testsuite.sh b/start-testsuite.sh index e2da8f0..5740d3d 100755 --- a/start-testsuite.sh +++ b/start-testsuite.sh @@ -42,5 +42,4 @@ exit 1 fi -set -e "$compare" "$expected" "$last_log" $OSMO_TTCN3_COMPARE_ARGS -- To view, visit https://gerrit.osmocom.org/14071 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I820d59b29b4ba4a1d094c5c2a2af367e6ef4e5b6 Gerrit-Change-Number: 14071 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 16 15:11:21 2019 From: gerrit-no-reply at lists.osmocom.org (Daniel Willmann) Date: Thu, 16 May 2019 15:11:21 +0000 Subject: Change in openbsc[master]: nat: Allocate bsc_nat_parsed on the stack instead of heap In-Reply-To: References: Message-ID: Daniel Willmann has posted comments on this change. ( https://gerrit.osmocom.org/13843 ) Change subject: nat: Allocate bsc_nat_parsed on the stack instead of heap ...................................................................... Patch Set 4: (1 comment) https://gerrit.osmocom.org/#/c/13843/4/openbsc/src/osmo-bsc_nat/bsc_nat.c File openbsc/src/osmo-bsc_nat/bsc_nat.c: https://gerrit.osmocom.org/#/c/13843/4/openbsc/src/osmo-bsc_nat/bsc_nat.c at 1213 PS4, Line 1213: /* : * Optionally rewrite setup message. This can : * replace the msg and the parsed structure becomes : * invalid. > Please update. [?] How about "...and the data in parsed becomes invalid." ? -- To view, visit https://gerrit.osmocom.org/13843 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I66c44890952339f15131081e2f629a2824b6d3ba Gerrit-Change-Number: 13843 Gerrit-PatchSet: 4 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 16 May 2019 15:11:21 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 16 15:19:45 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 16 May 2019 15:19:45 +0000 Subject: Change in openbsc[master]: nat: Allocate bsc_nat_parsed on the stack instead of heap In-Reply-To: References: Message-ID: Hello Daniel Willmann, Harald Welte, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13843 to look at the new patch set (#5). Change subject: nat: Allocate bsc_nat_parsed on the stack instead of heap ...................................................................... nat: Allocate bsc_nat_parsed on the stack instead of heap There's no real need to allocate it using talloc. Allocating it on the stack simplifies the code, avoids mem leaks and makes it faster. Change-Id: I66c44890952339f15131081e2f629a2824b6d3ba --- M openbsc/include/openbsc/bsc_nat.h M openbsc/src/osmo-bsc_nat/bsc_filter.c M openbsc/src/osmo-bsc_nat/bsc_nat.c M openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c M openbsc/src/osmo-bsc_nat/bsc_ussd.c M openbsc/tests/bsc-nat/bsc_nat_test.c 6 files changed, 136 insertions(+), 174 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/43/13843/5 -- To view, visit https://gerrit.osmocom.org/13843 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I66c44890952339f15131081e2f629a2824b6d3ba Gerrit-Change-Number: 13843 Gerrit-PatchSet: 5 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 16 15:22:56 2019 From: gerrit-no-reply at lists.osmocom.org (Daniel Willmann) Date: Thu, 16 May 2019 15:22:56 +0000 Subject: Change in openbsc[master]: nat: Allocate bsc_nat_parsed on the stack instead of heap In-Reply-To: References: Message-ID: Daniel Willmann has posted comments on this change. ( https://gerrit.osmocom.org/13843 ) Change subject: nat: Allocate bsc_nat_parsed on the stack instead of heap ...................................................................... Patch Set 5: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/13843 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I66c44890952339f15131081e2f629a2824b6d3ba Gerrit-Change-Number: 13843 Gerrit-PatchSet: 5 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 16 May 2019 15:22:56 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 16 15:39:32 2019 From: gerrit-no-reply at lists.osmocom.org (Daniel Willmann) Date: Thu, 16 May 2019 15:39:32 +0000 Subject: Change in libosmocore[master]: Deprecate usage of osmo_counter_* In-Reply-To: References: Message-ID: Daniel Willmann has posted comments on this change. ( https://gerrit.osmocom.org/13808 ) Change subject: Deprecate usage of osmo_counter_* ...................................................................... Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/13808/3/include/osmocom/core/counter.h File include/osmocom/core/counter.h: https://gerrit.osmocom.org/#/c/13808/3/include/osmocom/core/counter.h at 19 PS3, Line 19: OSMO_DEPRECATED("Implement as osmo_stat_item instead") > is the attribute correctly assigned to the osmo_counter_dec here? Yeah, it needs to be before inline function declarations. -- To view, visit https://gerrit.osmocom.org/13808 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If67f64c6ec7a3f3114c962df9db50107d9ea86e2 Gerrit-Change-Number: 13808 Gerrit-PatchSet: 3 Gerrit-Owner: Daniel Willmann Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Thu, 16 May 2019 15:39:32 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 16 15:41:51 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Thu, 16 May 2019 15:41:51 +0000 Subject: Change in libosmocore[master]: Deprecate usage of osmo_counter_* In-Reply-To: References: Message-ID: lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/13808 ) Change subject: Deprecate usage of osmo_counter_* ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13808 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If67f64c6ec7a3f3114c962df9db50107d9ea86e2 Gerrit-Change-Number: 13808 Gerrit-PatchSet: 3 Gerrit-Owner: Daniel Willmann Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Thu, 16 May 2019 15:41:51 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 16 16:56:07 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Thu, 16 May 2019 16:56:07 +0000 Subject: Change in docker-playground[master]: RFC: allow to set configuration and/or specific testcases Message-ID: lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/14072 Change subject: RFC: allow to set configuration and/or specific testcases ...................................................................... RFC: allow to set configuration and/or specific testcases Allows to pass the configuration file and/or tests to start-testsuite.sh. This way a single test can be specified by the command line. If this RFC gets accepted, I would convert all other Docker.files Change-Id: I17e480321f1e7bfa287349f438ff6990e30f1114 --- M ttcn3-sgsn-test/Dockerfile M ttcn3-sgsn-test/jenkins.sh 2 files changed, 11 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/72/14072/1 diff --git a/ttcn3-sgsn-test/Dockerfile b/ttcn3-sgsn-test/Dockerfile index 4ea5daf..09e4ec6 100644 --- a/ttcn3-sgsn-test/Dockerfile +++ b/ttcn3-sgsn-test/Dockerfile @@ -27,8 +27,5 @@ COPY SGSN_Tests.cfg /data/SGSN_Tests.cfg -CMD cd /data && \ - /osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/sgsn/SGSN_Tests; \ - exit_code=$?; \ - /osmo-ttcn3-hacks/log_merge.sh SGSN_Tests --rm; \ - exit $exit_code +WORKDIR /data +ENTRYPOINT ["/osmo-ttcn3-hacks/start-testsuite.sh", "/osmo-ttcn3-hacks/sgsn/SGSN_Tests"] diff --git a/ttcn3-sgsn-test/jenkins.sh b/ttcn3-sgsn-test/jenkins.sh index 7947132..9505624 100755 --- a/ttcn3-sgsn-test/jenkins.sh +++ b/ttcn3-sgsn-test/jenkins.sh @@ -32,6 +32,15 @@ -e "TTCN3_PCAP_PATH=/data" \ -v $VOL_BASE_DIR/sgsn-tester:/data \ --name ${BUILD_TAG}-ttcn3-sgsn-test \ + $REPO_USER/ttcn3-sgsn-test $@ + +echo Starting container to merge logs +docker run --rm \ + --network $NET_NAME --ip 172.18.8.103 \ + -e "TTCN3_PCAP_PATH=/data" \ + -v $VOL_BASE_DIR/sgsn-tester:/data \ + --name ${BUILD_TAG}-ttcn3-sgsn-test-logmerge \ + --entrypoint /osmo-ttcn3-hacks/log_merge.sh SGSN_Tests --rm \ $REPO_USER/ttcn3-sgsn-test echo Stopping containers -- To view, visit https://gerrit.osmocom.org/14072 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I17e480321f1e7bfa287349f438ff6990e30f1114 Gerrit-Change-Number: 14072 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 16 17:17:07 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Thu, 16 May 2019 17:17:07 +0000 Subject: Change in osmo-ci[master]: Fix oc2g poky SDK installation In-Reply-To: References: Message-ID: lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/14049 ) Change subject: Fix oc2g poky SDK installation ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14049 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If3adf078fd89b9d0c5151cdbf745123df34bbaba Gerrit-Change-Number: 14049 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Thu, 16 May 2019 17:17:07 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 16 18:31:55 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 16 May 2019 18:31:55 +0000 Subject: Change in osmo-ttcn3-hacks[master]: library/PCUIF_Types.ttcn: add explicit ALIGN(left) attribute Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14073 Change subject: library/PCUIF_Types.ttcn: add explicit ALIGN(left) attribute ...................................................................... library/PCUIF_Types.ttcn: add explicit ALIGN(left) attribute In the documentation of Eclipse Titan compiler before [1] it was clearly stated that if the length of the actual value can be determined and it is less than the specified FIELDLENGTH, the remaining bits / bytes will be padded with zeros. The attribute ALIGN specifies the sequence of the actual value and the padding within the encoded field: Attribute syntax: ALIGN(); Parameters allowed: left, right; Default value: 'right'. Since [1], the default value is: 'left' for octetstrings, 'right' for all other types. [1] https://github.com/eclipse/titan.core/commit/3cbafbd31d5f79049afbf69f8dcba0b94cbf20b2 In the most 'BTS_Tests.TC_pcu_*', including both 'TC_pcu_data_req_agch' and 'TC_pcu_data_req_imm_ass_pch' we do pass the payload of length 23 bytes to ts_PCUIF_DATA_REQ(), what is less than the actual field length (162 bytes). Thus when using titan.core <= 6.5.3, the payload appears at the end of the buffer on the BTS side, so it reads 23 zero-bytes from the beginning and does transmit them. Let's explicitly add ALIGN(left) to field 'data' of 'PCUIF_data', so the alignment would be done correctly, as expected by the BTS. Let's also drop 'OCT162' type, as it doesn't make sense outside the message definition. This change makes the following test cases pass: - 'TC_pcu_data_req_agch' and - 'TC_pcu_data_req_imm_ass_pch'. Change-Id: Ic4f358e5053e30e0dd7be8b6ac9c1d86cf9d8065 --- M library/PCUIF_Types.ttcn 1 file changed, 4 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/73/14073/1 diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn index 17adbd1..750e0b4 100644 --- a/library/PCUIF_Types.ttcn +++ b/library/PCUIF_Types.ttcn @@ -67,12 +67,10 @@ PCUIF_Text text } with { variant "" }; -type octetstring OCT162 length(162) with { variant "FIELDLENGTH(162)" }; - type record PCUIF_data { PCUIF_Sapi sapi, uint8_t len, - OCT162 data, + octetstring data length(162), uint32_t fn, uint16_t arfcn, uint8_t trx_nr, @@ -82,7 +80,7 @@ uint16_t ber10k, int16_t ta_offs_qbits, int16_t lqual_cb -} with { variant "" }; +} with { variant (data) "FIELDLENGTH(162), ALIGN(left)" }; type record PCUIF_data_cnf_dt { PCUIF_Sapi sapi, @@ -373,7 +371,7 @@ template (value) uint8_t ts_nr, template (value) uint8_t block_nr, template (value) PCUIF_Sapi sapi, - template (value) OCT162 data, + template (value) octetstring data, template (value) uint32_t fn, template (value) uint16_t arfcn, template (value) int8_t rssi := -80, @@ -405,7 +403,7 @@ template uint8_t ts_nr := ?, template uint8_t block_nr := ?, template PCUIF_Sapi sapi := ?, - template OCT162 data := ?) := { + template octetstring data := ?) := { msg_type := PCU_IF_MSG_DATA_IND, bts_nr := bts_nr, spare := ?, -- To view, visit https://gerrit.osmocom.org/14073 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ic4f358e5053e30e0dd7be8b6ac9c1d86cf9d8065 Gerrit-Change-Number: 14073 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 16 18:35:03 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 May 2019 18:35:03 +0000 Subject: Change in osmo-ttcn3-hacks[master]: library/PCUIF_Types.ttcn: add explicit ALIGN(left) attribute In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14073 ) Change subject: library/PCUIF_Types.ttcn: add explicit ALIGN(left) attribute ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14073 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic4f358e5053e30e0dd7be8b6ac9c1d86cf9d8065 Gerrit-Change-Number: 14073 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 16 May 2019 18:35:03 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 16 18:35:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 16 May 2019 18:35:19 +0000 Subject: Change in osmo-ci[master]: Fix oc2g poky SDK installation In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14049 ) Change subject: Fix oc2g poky SDK installation ...................................................................... Fix oc2g poky SDK installation It's poky_installer_file, not poky_install_file. Also, don't mandate a version from april that's no longer on downloads.sysmocom.de. This was broken since Change-Id I35f34a089311808cb21a064dd50e41cd1887b320 Change-Id: If3adf078fd89b9d0c5151cdbf745123df34bbaba --- M ansible/roles/install-poky-sdk/README.md M ansible/setup-jenkins-slave.yml 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Verified Pau Espin Pedrol: Looks good to me, approved lynxis lazus: Looks good to me, approved diff --git a/ansible/roles/install-poky-sdk/README.md b/ansible/roles/install-poky-sdk/README.md index 7f2c31e..dc2fe7e 100644 --- a/ansible/roles/install-poky-sdk/README.md +++ b/ansible/roles/install-poky-sdk/README.md @@ -10,7 +10,7 @@ ``` - name: install-poky-sdk jenkins_user: osmocom-build - poky_install_file: poky-glibc-x86_64-meta-toolchain-osmo-cortexa15hf-neon-toolchain-osmo-2.3.4-20190426050512.sh + poky_installer_file: poky-glibc-x86_64-meta-toolchain-osmo-cortexa15hf-neon-toolchain-osmo-2.3.4-20190426050512.sh poky_dest: /opt/poky-sdk/2.3.4/ tags: - poky diff --git a/ansible/setup-jenkins-slave.yml b/ansible/setup-jenkins-slave.yml index 1135ab2..39e6f77 100644 --- a/ansible/setup-jenkins-slave.yml +++ b/ansible/setup-jenkins-slave.yml @@ -21,7 +21,7 @@ - name: install-poky-sdk jenkins_user: osmocom-build - poky_install_file: poky-glibc-x86_64-meta-toolchain-osmo-cortexa15hf-neon-toolchain-osmo-2.3.4-20190426050512.sh + poky_installer_file: poky-glibc-x86_64-meta-toolchain-osmo-cortexa15hf-neon-toolchain-osmo-2.3.4.sh poky_dest: /opt/poky-oc2g/2.3.4/ tags: - poky -- To view, visit https://gerrit.osmocom.org/14049 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If3adf078fd89b9d0c5151cdbf745123df34bbaba Gerrit-Change-Number: 14049 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 16 18:41:28 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 16 May 2019 18:41:28 +0000 Subject: Change in osmo-ttcn3-hacks[master]: library/PCUIF_Types.ttcn: add explicit ALIGN(left) attribute In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/14073 ) Change subject: library/PCUIF_Types.ttcn: add explicit ALIGN(left) attribute ...................................................................... library/PCUIF_Types.ttcn: add explicit ALIGN(left) attribute In the documentation of Eclipse Titan compiler before [1] it was clearly stated that if the length of the actual value can be determined and it is less than the specified FIELDLENGTH, the remaining bits / bytes will be padded with zeros. The attribute ALIGN specifies the sequence of the actual value and the padding within the encoded field: Attribute syntax: ALIGN(); Parameters allowed: left, right; Default value: 'right'. Since [1], the default value is: 'left' for octetstrings, 'right' for all other types. [1] https://github.com/eclipse/titan.core/commit/3cbafbd31d5f79049afbf69f8dcba0b94cbf20b2 In the most 'BTS_Tests.TC_pcu_*', including both 'TC_pcu_data_req_agch' and 'TC_pcu_data_req_imm_ass_pch' we do pass the payload of length 23 bytes to ts_PCUIF_DATA_REQ(), what is less than the actual field length (162 bytes). Thus when using titan.core <= 6.5.3, the payload appears at the end of the buffer on the BTS side, so it reads 23 zero-bytes from the beginning and does transmit them. Let's explicitly add ALIGN(left) to field 'data' of 'PCUIF_data', so the alignment would be done correctly, as expected by the BTS. Let's also drop 'OCT162' type, as it doesn't make sense outside the message definition. This change makes the following test cases pass: - 'TC_pcu_data_req_agch' and - 'TC_pcu_data_req_imm_ass_pch'. Change-Id: Ic4f358e5053e30e0dd7be8b6ac9c1d86cf9d8065 --- M library/PCUIF_Types.ttcn 1 file changed, 4 insertions(+), 6 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn index 17adbd1..750e0b4 100644 --- a/library/PCUIF_Types.ttcn +++ b/library/PCUIF_Types.ttcn @@ -67,12 +67,10 @@ PCUIF_Text text } with { variant "" }; -type octetstring OCT162 length(162) with { variant "FIELDLENGTH(162)" }; - type record PCUIF_data { PCUIF_Sapi sapi, uint8_t len, - OCT162 data, + octetstring data length(162), uint32_t fn, uint16_t arfcn, uint8_t trx_nr, @@ -82,7 +80,7 @@ uint16_t ber10k, int16_t ta_offs_qbits, int16_t lqual_cb -} with { variant "" }; +} with { variant (data) "FIELDLENGTH(162), ALIGN(left)" }; type record PCUIF_data_cnf_dt { PCUIF_Sapi sapi, @@ -373,7 +371,7 @@ template (value) uint8_t ts_nr, template (value) uint8_t block_nr, template (value) PCUIF_Sapi sapi, - template (value) OCT162 data, + template (value) octetstring data, template (value) uint32_t fn, template (value) uint16_t arfcn, template (value) int8_t rssi := -80, @@ -405,7 +403,7 @@ template uint8_t ts_nr := ?, template uint8_t block_nr := ?, template PCUIF_Sapi sapi := ?, - template OCT162 data := ?) := { + template octetstring data := ?) := { msg_type := PCU_IF_MSG_DATA_IND, bts_nr := bts_nr, spare := ?, -- To view, visit https://gerrit.osmocom.org/14073 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ic4f358e5053e30e0dd7be8b6ac9c1d86cf9d8065 Gerrit-Change-Number: 14073 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 17 06:58:36 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 May 2019 06:58:36 +0000 Subject: Change in docker-playground[master]: RFC: allow to set configuration and/or specific testcases In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14072 ) Change subject: RFC: allow to set configuration and/or specific testcases ...................................................................... Patch Set 1: looks fine to me, but would be great to have some kind of README about usage patterns both here and in the wiki page about our TTCN3 test suite execution. -- To view, visit https://gerrit.osmocom.org/14072 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I17e480321f1e7bfa287349f438ff6990e30f1114 Gerrit-Change-Number: 14072 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-CC: Harald Welte Gerrit-Comment-Date: Fri, 17 May 2019 06:58:36 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 17 06:58:43 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 May 2019 06:58:43 +0000 Subject: Change in docker-playground[master]: RFC: allow to set configuration and/or specific testcases In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14072 ) Change subject: RFC: allow to set configuration and/or specific testcases ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14072 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I17e480321f1e7bfa287349f438ff6990e30f1114 Gerrit-Change-Number: 14072 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Fri, 17 May 2019 06:58:43 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 17 07:00:02 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 May 2019 07:00:02 +0000 Subject: Change in libosmocore[master]: Deprecate usage of osmo_counter_* In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13808 ) Change subject: Deprecate usage of osmo_counter_* ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13808 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If67f64c6ec7a3f3114c962df9db50107d9ea86e2 Gerrit-Change-Number: 13808 Gerrit-PatchSet: 4 Gerrit-Owner: Daniel Willmann Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Fri, 17 May 2019 07:00:02 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 17 09:03:25 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 May 2019 09:03:25 +0000 Subject: Change in osmo-ccid-firmware[master]: obtain chip-unique serial number and print it during startup. In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13710 to look at the new patch set (#3). Change subject: obtain chip-unique serial number and print it during startup. ...................................................................... obtain chip-unique serial number and print it during startup. Change-Id: I298942e12f9ffd6f571555253fda160baece5c6c --- M sysmoOCTSIM/main.c 1 file changed, 36 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/10/13710/3 -- To view, visit https://gerrit.osmocom.org/13710 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I298942e12f9ffd6f571555253fda160baece5c6c Gerrit-Change-Number: 13710 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 17 09:03:26 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 May 2019 09:03:26 +0000 Subject: Change in osmo-ccid-firmware[master]: obtain chip-unique serial number and print it during startup. In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13710 ) Change subject: obtain chip-unique serial number and print it during startup. ...................................................................... obtain chip-unique serial number and print it during startup. Change-Id: I298942e12f9ffd6f571555253fda160baece5c6c --- M sysmoOCTSIM/main.c 1 file changed, 36 insertions(+), 0 deletions(-) diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 4bda38a..3c189eb 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -738,9 +739,43 @@ return 0; } +/* Section 9.6 of SAMD5x/E5x Family Data Sheet */ +static int get_chip_unique_serial(uint8_t *out, size_t len) +{ + uint32_t *out32 = (uint32_t *)out; + if (len < 16) + return -EINVAL; + + out32[0] = *(uint32_t *)0x008061fc; + out32[1] = *(uint32_t *)0x00806010; + out32[2] = *(uint32_t *)0x00806014; + out32[3] = *(uint32_t *)0x00806018; + + return 0; +} + +/* same as get_chip_unique_serial but in hex-string format */ +static int get_chip_unique_serial_str(char *out, size_t len) +{ + uint8_t buf[16]; + int rc; + + if (len < 16*2 + 1) + return -EINVAL; + + rc = get_chip_unique_serial(buf, sizeof(buf)); + if (rc < 0) + return rc; + osmo_hexdump_buf(out, len, buf, sizeof(buf), NULL, false); + return 0; +} + int main(void) { + char sernr_buf[16*2+1]; + atmel_start_init(); + get_chip_unique_serial_str(sernr_buf, sizeof(sernr_buf)); usb_start(); @@ -760,6 +795,7 @@ command_register(&cmd_talloc_free); printf("\r\n\r\nsysmocom sysmoOCTSIM\r\n"); + printf("Chip-Id %s\r\n", sernr_buf); talloc_enable_null_tracking(); g_tall_ctx = talloc_named_const(NULL, 0, "global"); -- To view, visit https://gerrit.osmocom.org/13710 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I298942e12f9ffd6f571555253fda160baece5c6c Gerrit-Change-Number: 13710 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 17 09:03:26 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 May 2019 09:03:26 +0000 Subject: Change in osmo-ccid-firmware[master]: Re-structure USB descriptors In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13998 ) Change subject: Re-structure USB descriptors ...................................................................... Re-structure USB descriptors Use structures to define the USB descriptors of the sysmoOCTSIM device. While at it, turn it from a pure CDC-ACM to a CDC-ACM + CCID interface, so we can expose a virtual UART at the same time as the chip card reader device. Change-Id: I0423d733476f37c16bdb6abc651b7ad5ca7ac63e --- M sysmoOCTSIM/atmel_start.c M sysmoOCTSIM/config/hpl_usb_config.h M sysmoOCTSIM/gcc/Makefile A sysmoOCTSIM/usb_descriptors.c M sysmoOCTSIM/usb_start.c 5 files changed, 250 insertions(+), 25 deletions(-) diff --git a/sysmoOCTSIM/atmel_start.c b/sysmoOCTSIM/atmel_start.c index fd566dd..bee1ed2 100644 --- a/sysmoOCTSIM/atmel_start.c +++ b/sysmoOCTSIM/atmel_start.c @@ -12,8 +12,8 @@ void atmel_start_init(void) { system_init(); - usb_init(); dma_memory_init(); dma_memory_register_callback(DMA_MEMORY_COMPLETE_CB, M2M_DMA_complete_cb); stdio_redirect_init(); + usb_init(); } diff --git a/sysmoOCTSIM/config/hpl_usb_config.h b/sysmoOCTSIM/config/hpl_usb_config.h index 73a9fea..bbfd99d 100644 --- a/sysmoOCTSIM/config/hpl_usb_config.h +++ b/sysmoOCTSIM/config/hpl_usb_config.h @@ -39,7 +39,7 @@ // Max possible (by "Max Endpoint Number" config) // usbd_num_ep_sp #ifndef CONF_USB_D_NUM_EP_SP -#define CONF_USB_D_NUM_EP_SP CONF_USB_N_4 +#define CONF_USB_D_NUM_EP_SP CONF_USB_N_6 #endif // @@ -60,7 +60,7 @@ // The number of physical endpoints - 1 // usbd_arch_max_ep_n #ifndef CONF_USB_D_MAX_EP_N -#define CONF_USB_D_MAX_EP_N CONF_USB_N_2 +#define CONF_USB_D_MAX_EP_N CONF_USB_N_4 #endif // USB Speed Limit diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index 080aa41..7684204 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -84,6 +84,7 @@ main.o \ manual_test.o \ talloc.o \ +usb_descriptors.o \ i2c_bitbang.o \ octsim_i2c.o \ ncn8025.o \ @@ -136,6 +137,7 @@ "main.o" \ "manual_test.o" \ "talloc.o" \ +"usb_descriptors.o" \ "i2c_bitbang.o" \ "octsim_i2c.o" \ "ncn8025.o" \ @@ -194,6 +196,7 @@ "main.d" \ "manual_test.d" \ "talloc.d" \ +"usb_descriptors.d" \ "i2c_bitbang.d" \ "octsim_i2c.d" \ "ncn8025.d" \ diff --git a/sysmoOCTSIM/usb_descriptors.c b/sysmoOCTSIM/usb_descriptors.c new file mode 100644 index 0000000..429e8c2 --- /dev/null +++ b/sysmoOCTSIM/usb_descriptors.c @@ -0,0 +1,241 @@ +#include "usbd_config.h" +#include "usbdc.h" +#include "usb_protocol.h" +#include "usb_protocol_cdc.h" +#include "ccid_proto.h" +#include "cdcdf_acm_desc.h" + +/* aggregate descriptors for the combined CDC-ACM + CCID device that we expose + * from sysmoQMOD */ + +enum str_desc_num { + STR_DESC_MANUF = 1, + STR_DESC_PRODUCT, + STR_DESC_CONFIG, + STR_DESC_INTF_ACM_COMM, + STR_DESC_INTF_ACM_DATA, + STR_DESC_INTF_CCID, + STR_DESC_SERIAL, +}; + +/* a struct of structs representing the concatenated collection of USB descriptors */ +struct usb_desc_collection { + struct usb_dev_desc dev; + struct usb_config_desc cfg; + + /* CDC-ACM: Two interfaces, one with IRQ EP and one with BULK IN + OUT */ + struct { + struct { + struct usb_iface_desc iface; + struct usb_cdc_hdr_desc cdc_hdr; + struct usb_cdc_call_mgmt_desc cdc_call_mgmt; + struct usb_cdc_acm_desc cdc_acm; + struct usb_cdc_union_desc cdc_union; + struct usb_ep_desc ep[1]; + } comm; + struct { + struct usb_iface_desc iface; + struct usb_ep_desc ep[2]; + } data; + } cdc; + + /* CCID: One interface with CCID class descriptor and three endpoints */ + struct { + struct usb_iface_desc iface; + struct usb_ccid_class_descriptor class; + struct usb_ep_desc ep[3]; + } ccid; + uint8_t str[116]; +} __attribute__((packed)); + +static const struct usb_desc_collection usb_fs_descs = { + .dev = { + .bLength = sizeof(struct usb_dev_desc), + .bDescriptorType = USB_DT_DEVICE, + .bcdUSB = USB_V2_0, + .bDeviceClass = 0x02, + .bDeviceSubClass = 0, + .bDeviceProtocol = 0, + .bMaxPacketSize0 = CONF_USB_CDCD_ACM_BMAXPKSZ0, + .idVendor = CONF_USB_CDCD_ACM_IDVENDER, + .idProduct = CONF_USB_CDCD_ACM_IDPRODUCT, + .iManufacturer = STR_DESC_MANUF, + .iProduct = STR_DESC_PRODUCT, + .iSerialNumber = STR_DESC_SERIAL, + .bNumConfigurations = 1, + }, + .cfg = { + .bLength = sizeof(struct usb_config_desc), + .bDescriptorType = USB_DT_CONFIG, + .wTotalLength = sizeof(usb_fs_descs.cfg) + + sizeof(usb_fs_descs.cdc) + + sizeof(usb_fs_descs.ccid), + .bNumInterfaces = 3, + .bConfigurationValue = CONF_USB_CDCD_ACM_BCONFIGVAL, + .iConfiguration = STR_DESC_CONFIG, + .bmAttributes = CONF_USB_CDCD_ACM_BMATTRI, + .bMaxPower = CONF_USB_CDCD_ACM_BMAXPOWER, + }, + .cdc = { + .comm = { + .iface = { + .bLength = sizeof(struct usb_iface_desc), + .bDescriptorType = USB_DT_INTERFACE, + .bInterfaceNumber = CONF_USB_CDCD_ACM_COMM_BIFCNUM, + .bAlternateSetting = CONF_USB_CDCD_ACM_COMM_BALTSET, + .bNumEndpoints = 1, + .bInterfaceClass = CDC_CLASS_COMM, + .bInterfaceSubClass = CDC_SUBCLASS_ACM, + .bInterfaceProtocol = 0x00, + .iInterface = STR_DESC_INTF_ACM_COMM, + }, + .cdc_hdr = { + .bFunctionLength = sizeof(struct usb_cdc_hdr_desc), + .bDescriptorType = CDC_CS_INTERFACE, + .bDescriptorSubtype = CDC_SCS_HEADER, + .bcdCDC = LE16(0x1001), + }, + .cdc_call_mgmt = { + .bFunctionLength = sizeof(struct usb_cdc_call_mgmt_desc), + .bDescriptorType = CDC_CS_INTERFACE, + .bDescriptorSubtype = CDC_SCS_CALL_MGMT, + .bmCapabilities = 0x01, + .bDataInterface = 0x00, + }, + .cdc_acm = { + .bFunctionLength = sizeof(struct usb_cdc_acm_desc), + .bDescriptorType = CDC_CS_INTERFACE, + .bDescriptorSubtype = CDC_SCS_ACM, + .bmCapabilities = 0x02, + }, + .cdc_union = { + .bFunctionLength = sizeof(struct usb_cdc_union_desc), + .bDescriptorType = CDC_CS_INTERFACE, + .bDescriptorSubtype = CDC_SCS_UNION, + .bMasterInterface = CONF_USB_CDCD_ACM_COMM_BIFCNUM, + .bSlaveInterface0 = 0x01, + }, + .ep = { + { + .bLength = sizeof(struct usb_ep_desc), + .bDescriptorType = USB_DT_ENDPOINT, + .bEndpointAddress = CONF_USB_CDCD_ACM_COMM_INT_EPADDR, + .bmAttributes = USB_EP_TYPE_INTERRUPT, + .wMaxPacketSize = CONF_USB_CDCD_ACM_COMM_INT_MAXPKSZ, + .bInterval = CONF_USB_CDCD_ACM_COMM_INT_INTERVAL, + }, + }, + }, + .data = { + .iface = { + .bLength = sizeof(struct usb_iface_desc), + .bDescriptorType = USB_DT_INTERFACE, + .bInterfaceNumber = CONF_USB_CDCD_ACM_DATA_BIFCNUM, + .bAlternateSetting = CONF_USB_CDCD_ACM_DATA_BALTSET, + .bNumEndpoints = 2, + .bInterfaceClass = CDC_CLASS_DATA, + .bInterfaceSubClass = 0x00, + .bInterfaceProtocol = 0x00, + .iInterface = STR_DESC_INTF_ACM_DATA, + }, + .ep = { + { + .bLength = sizeof(struct usb_ep_desc), + .bDescriptorType = USB_DT_ENDPOINT, + .bEndpointAddress = CONF_USB_CDCD_ACM_DATA_BULKOUT_EPADDR, + .bmAttributes = USB_EP_TYPE_BULK, + .wMaxPacketSize = CONF_USB_CDCD_ACM_DATA_BULKOUT_MAXPKSZ, + .bInterval = 0, + }, + { + .bLength = sizeof(struct usb_ep_desc), + .bDescriptorType = USB_DT_ENDPOINT, + .bEndpointAddress = CONF_USB_CDCD_ACM_DATA_BULKIN_EPADDR, + .bmAttributes = USB_EP_TYPE_BULK, + .wMaxPacketSize = CONF_USB_CDCD_ACM_DATA_BULKIN_MAXPKSZ, + .bInterval = 0, + }, + }, + }, + }, + .ccid = { + .iface = { + .bLength = sizeof(struct usb_iface_desc), + .bDescriptorType = USB_DT_INTERFACE, + .bInterfaceNumber = 2, + .bAlternateSetting = 0, + .bNumEndpoints = 3, + .bInterfaceClass = 11, + .bInterfaceSubClass = 0, + .bInterfaceProtocol = 0, + .iInterface = STR_DESC_INTF_CCID, + }, + .class = { + .bLength = sizeof(struct usb_ccid_class_descriptor), + .bDescriptorType = 33, + .bcdCCID = LE16(0x0110), + .bMaxSlotIndex = 7, + .dwProtocols = 0x07, /* 5/3/1.8V */ + .dwDefaultClock = LE32(2500), + .dwMaximumClock = LE32(20000), + .bNumClockSupported = 4, + .dwDataRate = LE32(9600), + .dwMaxDataRate = LE32(921600), + .bNumDataRatesSupported = 0, + .dwMaxIFSD = LE32(0), + .dwSynchProtocols = LE32(0), + .dwMechanical = LE32(0), + .dwFeatures = LE32(0x10), + .dwMaxCCIDMessageLength = 272, + .bClassGetResponse = 0xff, + .bClassEnvelope = 0xff, + .wLcdLayout = LE16(0), + .bPINSupport = 0, + .bMaxCCIDBusySlots = 8, + }, + .ep = { + { /* Bulk-OUT descriptor */ + .bLength = sizeof(struct usb_ep_desc), + .bDescriptorType = USB_DT_ENDPOINT, + .bEndpointAddress = 0x02, + .bmAttributes = USB_EP_TYPE_BULK, + .wMaxPacketSize = 64, + .bInterval = 0, + }, + { /* Bulk-IN descriptor */ + .bLength = sizeof(struct usb_ep_desc), + .bDescriptorType = USB_DT_ENDPOINT, + .bEndpointAddress = 0x83, + .bmAttributes = USB_EP_TYPE_BULK, + .wMaxPacketSize = 64, + .bInterval = 0, + }, + { /* Interrupt dscriptor */ + .bLength = sizeof(struct usb_ep_desc), + .bDescriptorType = USB_DT_ENDPOINT, + .bEndpointAddress = 0x84, + .bmAttributes = USB_EP_TYPE_INTERRUPT, + .wMaxPacketSize = 64, + .bInterval = 0x10, + }, + }, + }, + //DFURT_IF_DESCRIPTOR, + .str = { +#if 0 + CDCD_ACM_STR_DESCES +#else + 4, 3, 0x09, 0x04, + 18, 3, 's',0, 'y',0, 's',0, 'm',0, 'o',0, 'c',0, 'o',0, 'm',0, + 24, 3, 's',0, 'y',0, 's',0, 'm',0, 'o',0, 'O',0, 'C',0, 'T',0, 'S',0, 'I',0, 'M',0, + 4, 3, 'A', 0, + 22, 3, 'd',0, 'e',0, 'b',0, 'u',0, 'g',0, ' ',0, 'U',0, 'A',0, 'R',0, 'T',0, + 22, 3, 'd',0, 'e',0, 'b',0, 'u',0, 'g',0, ' ',0, 'U',0, 'A',0, 'R',0, 'T',0, + 10, 3, 'C',0, 'C',0, 'I',0, 'D',0, + 12, 3, 'F',0, 'I',0, 'X',0, 'M',0, 'E',0, +#endif + } +}; + +const struct usbd_descriptors usb_descs[] + = {{ (uint8_t *)&usb_fs_descs, (uint8_t *)&usb_fs_descs + sizeof(usb_fs_descs) }}; diff --git a/sysmoOCTSIM/usb_start.c b/sysmoOCTSIM/usb_start.c index d02edc0..83fac81 100644 --- a/sysmoOCTSIM/usb_start.c +++ b/sysmoOCTSIM/usb_start.c @@ -8,28 +8,7 @@ #include "atmel_start.h" #include "usb_start.h" -#if CONF_USBD_HS_SP -static uint8_t single_desc_bytes[] = { - /* Device descriptors and Configuration descriptors list. */ - CDCD_ACM_HS_DESCES_LS_FS}; -static uint8_t single_desc_bytes_hs[] = { - /* Device descriptors and Configuration descriptors list. */ - CDCD_ACM_HS_DESCES_HS}; -#define CDCD_ECHO_BUF_SIZ CONF_USB_CDCD_ACM_DATA_BULKIN_MAXPKSZ_HS -#else -static uint8_t single_desc_bytes[] = { - /* Device descriptors and Configuration descriptors list. */ - CDCD_ACM_DESCES_LS_FS}; #define CDCD_ECHO_BUF_SIZ CONF_USB_CDCD_ACM_DATA_BULKIN_MAXPKSZ -#endif - -static struct usbd_descriptors single_desc[] - = {{single_desc_bytes, single_desc_bytes + sizeof(single_desc_bytes)} -#if CONF_USBD_HS_SP - , - {single_desc_bytes_hs, single_desc_bytes_hs + sizeof(single_desc_bytes_hs)} -#endif -}; /** Buffers to receive and echo the communication bytes. */ static uint32_t usbd_cdc_buffer[CDCD_ECHO_BUF_SIZ / 4]; @@ -77,6 +56,8 @@ return false; } +extern const struct usbd_descriptors usb_descs[]; + /** * \brief CDC ACM Init */ @@ -88,7 +69,7 @@ /* usbdc_register_funcion inside */ cdcdf_acm_init(); - usbdc_start(single_desc); + usbdc_start((struct usbd_descriptors *) usb_descs); usbdc_attach(); } -- To view, visit https://gerrit.osmocom.org/13998 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I0423d733476f37c16bdb6abc651b7ad5ca7ac63e Gerrit-Change-Number: 13998 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 17 09:03:27 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 May 2019 09:03:27 +0000 Subject: Change in osmo-ccid-firmware[master]: Add a new (skeleton of a) USB CCID class driver In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13997 ) Change subject: Add a new (skeleton of a) USB CCID class driver ...................................................................... Add a new (skeleton of a) USB CCID class driver This tries to implement a USB CCID (Chip Card Interface Device) Class core driver in "ASF4 style". Code is currently mainly untested. Change-Id: Ia4d8a6cdc3de26fdc83dcbf89db894b513915a9a --- M sysmoOCTSIM/gcc/Makefile A sysmoOCTSIM/usb/class/ccid/device/ccid_df.c A sysmoOCTSIM/usb/class/ccid/device/ccid_df.h 3 files changed, 314 insertions(+), 3 deletions(-) diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index 2dba3e3..080aa41 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -2,6 +2,8 @@ # Automatically-generated file. Do not edit! ################################################################################ +EXTRA_CFLAGS=-I/usr/local/arm-none-eabi/include -I../../ccid + ifdef SystemRoot SHELL = cmd.exe MK_DIR = mkdir @@ -35,6 +37,7 @@ usb \ hpl/dmac \ usb/class/cdc/device \ +usb/class/ccid/device \ stdio_redirect \ hal/utils/src \ hpl/usb \ @@ -56,6 +59,7 @@ hpl/core/hpl_core_m4.o \ hal/src/hal_cache.o \ usb/class/cdc/device/cdcdf_acm.o \ +usb/class/ccid/device/ccid_df.o \ hal/utils/src/utils_syscalls.o \ stdio_redirect/gcc/read.o \ gcc/system_same54.o \ @@ -107,6 +111,7 @@ "hpl/core/hpl_core_m4.o" \ "hal/src/hal_cache.o" \ "usb/class/cdc/device/cdcdf_acm.o" \ +"usb/class/ccid/device/ccid_df.o" \ "hal/utils/src/utils_syscalls.o" \ "stdio_redirect/gcc/read.o" \ "gcc/system_same54.o" \ @@ -250,7 +255,7 @@ @echo ARM/GNU C Compiler $(QUOTE)arm-none-eabi-gcc$(QUOTE) -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54N19A__ -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ --I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/sercom" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/cdc" -I"../usb/class/cdc/device" -I"../usb/device" -I"../" -I"../config" -I"../stdio_redirect" -I"../" -I"../dma_m2m" -I"../" -I"../CMSIS/Core/Include" -I"../include" \ +-I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/sercom" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/cdc" -I"../usb/class/cdc/device" -I"../usb/class/ccid" -I"../usb/class/ccid/device" -I"../usb/device" -I"../" -I"../config" -I"../stdio_redirect" -I"../" -I"../dma_m2m" -I"../" -I"../CMSIS/Core/Include" -I"../include" \ -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<" @echo Finished building: $< @@ -259,7 +264,7 @@ @echo ARM/GNU Assembler $(QUOTE)arm-none-eabi-as$(QUOTE) -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54N19A__ -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ --I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/sercom" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/cdc" -I"../usb/class/cdc/device" -I"../usb/device" -I"../" -I"../config" -I"../stdio_redirect" -I"../" -I"../dma_m2m" -I"../" -I"../CMSIS/Core/Include" -I"../include" \ +-I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/sercom" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/cdc" -I"../usb/class/cdc/device" -I"../usb/class/ccid" -I"../usb/class/ccid/device" -I"../usb/device" -I"../" -I"../config" -I"../stdio_redirect" -I"../" -I"../dma_m2m" -I"../" -I"../CMSIS/Core/Include" -I"../include" \ -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<" @echo Finished building: $< @@ -268,7 +273,7 @@ @echo ARM/GNU Preprocessing Assembler $(QUOTE)arm-none-eabi-gcc$(QUOTE) -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54N19A__ -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ --I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/sercom" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/cdc" -I"../usb/class/cdc/device" -I"../usb/device" -I"../" -I"../config" -I"../stdio_redirect" -I"../" -I"../dma_m2m" -I"../" -I"../CMSIS/Core/Include" -I"../include" \ +-I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/sercom" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/cdc" -I"../usb/class/cdc/device" -I"../usb/class/ccid" -I"../usb/class/ccid/device" -I"../usb/device" -I"../" -I"../config" -I"../stdio_redirect" -I"../" -I"../dma_m2m" -I"../" -I"../CMSIS/Core/Include" -I"../include" \ -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<" @echo Finished building: $< diff --git a/sysmoOCTSIM/usb/class/ccid/device/ccid_df.c b/sysmoOCTSIM/usb/class/ccid/device/ccid_df.c new file mode 100644 index 0000000..018208a --- /dev/null +++ b/sysmoOCTSIM/usb/class/ccid/device/ccid_df.c @@ -0,0 +1,289 @@ +/** + * \file + * + * \brief USB Device Stack CCID Function Implementation. + * + * Copyroght (c) 2019 by Harald Welte + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "ccid_df.h" +#include "ccid_proto.h" +#include "usb_includes.h" + +#ifndef USB_CLASS_CCID +#define USB_CLASS_CCID 11 +#endif + +struct ccid_df_func_data { + uint8_t func_iface; /*!< interface number */ + uint8_t func_ep_in; /*!< IN endpoint number */ + uint8_t func_ep_out; /*!< OUT endpoint number */ + uint8_t func_ep_irq; /*!< IRQ endpoint number */ + bool enabled; /*!< is this driver/function enabled? */ + const struct usb_ccid_class_descriptor *ccid_cd; +}; + +static struct usbdf_driver _ccid_df; +static struct ccid_df_func_data _ccid_df_funcd; + +/* FIXME: make those configurable, ensure they're sized according to + * bNumClockSupported / bNumDataRatesSupported */ +static uint32_t ccid_clock_frequencies[] = { LE32(20000) }; +static uint32_t ccid_baud_rates[] = { LE32(9600) }; + +static int32_t ccid_df_enable(struct usbdf_driver *drv, struct usbd_descriptors *desc) +{ + struct ccid_df_func_data *func_data = (struct ccid_df_func_data *)(drv->func_data); + usb_iface_desc_t ifc_desc; + uint8_t *ifc, *ep; + + ifc = desc->sod; + /* FIXME: iterate over multiple interfaces? */ + + if (!ifc) + return ERR_NOT_FOUND; + + ifc_desc.bInterfaceNumber = ifc[2]; + ifc_desc.bInterfaceClass = ifc[5]; + + if (ifc_desc.bInterfaceClass != USB_CLASS_CCID) + return ERR_NOT_FOUND; + + if (func_data->func_iface == ifc_desc.bInterfaceNumber) + return ERR_ALREADY_INITIALIZED; + else if (func_data->func_iface != 0xff) + return ERR_NO_RESOURCE; + + func_data->func_iface = ifc_desc.bInterfaceNumber; + + ep = usb_find_desc(ifc, desc->eod, USB_DT_ENDPOINT); + while (NULL != ep) { + usb_ep_desc_t ep_desc; + ep_desc.bEndpointAddress = ep[2]; + ep_desc.bmAttributes = ep[3]; + ep_desc.wMaxPacketSize = usb_get_u16(ep + 4); + if (usb_d_ep_init(ep_desc.bEndpointAddress, ep_desc.bmAttributes, ep_desc.wMaxPacketSize)) + return ERR_NOT_INITIALIZED; + if (ep_desc.bEndpointAddress & USB_EP_DIR_IN) { + if ((ep_desc.bmAttributes & USB_EP_XTYPE_MASK) == USB_EP_XTYPE_INTERRUPT) + func_data->func_ep_irq = ep_desc.bEndpointAddress; + else + func_data->func_ep_in = ep_desc.bEndpointAddress; + } else { + func_data->func_ep_out = ep_desc.bEndpointAddress; + } + usb_d_ep_enable(ep_desc.bEndpointAddress); + desc->sod = ep; + ep = usb_find_ep_desc(usb_desc_next(desc->sod), desc->eod); + } + + ASSERT(func_data->func_ep_irq); + ASSERT(func_data->func_ep_in); + ASSERT(func_data->func_ep_out); + + _ccid_df_funcd.enabled = true; + return ERR_NONE; +} + +static int32_t ccid_df_disable(struct usbdf_driver *drv, struct usbd_descriptors *desc) +{ + struct ccid_df_func_data *func_data = (struct ccid_df_func_data *)(drv->func_data); + usb_iface_desc_t ifc_desc; + + if (desc) { + ifc_desc.bInterfaceClass = desc->sod[5]; + if (ifc_desc.bInterfaceClass != USB_CLASS_CCID) + return ERR_NOT_FOUND; + } + + func_data->func_iface = 0xff; + if (func_data->func_ep_in != 0xff) { + func_data->func_ep_in = 0xff; + usb_d_ep_deinit(func_data->func_ep_in); + } + if (func_data->func_ep_out != 0xff) { + func_data->func_ep_out = 0xff; + usb_d_ep_deinit(func_data->func_ep_out); + } + if (func_data->func_ep_irq != 0xff) { + func_data->func_ep_irq = 0xff; + usb_d_ep_deinit(func_data->func_ep_irq); + } + + _ccid_df_funcd.enabled = true; + return ERR_NONE; +} + +/*! \brief CCID Control Function (callback with USB core) */ +static int32_t ccid_df_ctrl(struct usbdf_driver *drv, enum usbdf_control ctrl, void *param) +{ + switch (ctrl) { + case USBDF_ENABLE: + return ccid_df_enable(drv, (struct usbd_descriptors *)param); + case USBDF_DISABLE: + return ccid_df_disable(drv, (struct usbd_descriptors *)param); + case USBDF_GET_IFACE: + return ERR_UNSUPPORTED_OP; + default: + return ERR_INVALID_ARG; + } +} + +/* Section 5.3.1: ABORT */ +static int32_t ccid_df_ctrl_req_ccid_abort(uint8_t ep, struct usb_req *req, + enum usb_ctrl_stage stage) +{ + const struct usb_ccid_class_descriptor *ccid_cd = _ccid_df_funcd.ccid_cd; + uint8_t slot_nr = req->wValue & 0xff; + + if (slot_nr > ccid_cd->bMaxSlotIndex) + return ERR_INVALID_ARG; + slot_nr = req->wValue; + + /* FIXME: Implement Abort handling, particularly in combination with + * the PC_to_RDR_Abort on the OUT EP */ + return ERR_NONE; +} + +/* Section 5.3.2: return array of DWORD containing clock frequencies in kHz */ +static int32_t ccid_df_ctrl_req_ccid_get_clock_freq(uint8_t ep, struct usb_req *req, + enum usb_ctrl_stage stage) +{ + const struct usb_ccid_class_descriptor *ccid_cd = _ccid_df_funcd.ccid_cd; + + if (stage != USB_DATA_STAGE) + return ERR_NONE; + + if (req->wLength != ccid_cd->bNumClockSupported * sizeof(uint32_t)) + return ERR_INVALID_DATA; + + return usbdc_xfer(ep, (uint8_t *)ccid_clock_frequencies, req->wLength, false); +} + +/* Section 5.3.3: return array of DWORD containing data rates in bps */ +static int32_t ccid_df_ctrl_req_ccid_get_data_rates(uint8_t ep, struct usb_req *req, + enum usb_ctrl_stage stage) +{ + const struct usb_ccid_class_descriptor *ccid_cd = _ccid_df_funcd.ccid_cd; + + if (stage != USB_DATA_STAGE) + return ERR_NONE; + + if (req->wLength != ccid_cd->bNumDataRatesSupported * sizeof(uint32_t)) + return ERR_INVALID_DATA; + + return usbdc_xfer(ep, (uint8_t *)ccid_baud_rates, req->wLength, false); +} + + +/* process a control endpoint request */ +static int32_t ccid_df_ctrl_req(uint8_t ep, struct usb_req *req, enum usb_ctrl_stage stage) +{ + /* verify this is a class-specific request */ + if (0x01 != ((req->bmRequestType >> 5) & 0x03)) + return ERR_NOT_FOUND; + + /* Verify req->wIndex == interface */ + if (req->wIndex != _ccid_df_funcd.func_iface) + return ERR_NOT_FOUND; + + switch (req->bRequest) { + case CLASS_SPEC_CCID_ABORT: + if (req->bmRequestType & USB_EP_DIR_IN) + return ERR_INVALID_ARG; + return ccid_df_ctrl_req_ccid_abort(ep, req, stage); + case CLASS_SPEC_CCID_GET_CLOCK_FREQ: + if (!(req->bmRequestType & USB_EP_DIR_IN)) + return ERR_INVALID_ARG; + return ccid_df_ctrl_req_ccid_get_clock_freq(ep, req, stage); + case CLASS_SPEC_CCID_GET_DATA_RATES: + if (!(req->bmRequestType & USB_EP_DIR_IN)) + return ERR_INVALID_ARG; + return ccid_df_ctrl_req_ccid_get_data_rates(ep, req, stage); + default: + return ERR_NOT_FOUND; + } +} + +static struct usbdc_handler ccid_df_req_h = { NULL, (FUNC_PTR) ccid_df_ctrl_req }; + +int32_t ccid_df_init(void) +{ + if (usbdc_get_state() > USBD_S_POWER) + return ERR_DENIED; + + _ccid_df.ctrl = ccid_df_ctrl; + _ccid_df.func_data = &_ccid_df_funcd; + + /* register the actual USB Function */ + usbdc_register_function(&_ccid_df); + /* register the call-back for control endpoint handling */ + usbdc_register_handler(USBDC_HDL_REQ, &ccid_df_req_h); + + return ERR_NONE; +} + +void ccid_df_deinit(void) +{ + usb_d_ep_deinit(_ccid_df_funcd.func_ep_in); + usb_d_ep_deinit(_ccid_df_funcd.func_ep_out); + usb_d_ep_deinit(_ccid_df_funcd.func_ep_irq); +} + +int32_t ccid_df_read_out(uint8_t *buf, uint32_t size) +{ + if (!ccid_df_is_enabled()) + return ERR_DENIED; + return usbdc_xfer(_ccid_df_funcd.func_ep_out, buf, size, false); +} + +int32_t ccid_df_write_in(uint8_t *buf, uint32_t size) +{ + if (!ccid_df_is_enabled()) + return ERR_DENIED; + return usbdc_xfer(_ccid_df_funcd.func_ep_in, buf, size, true); +} + +int32_t ccid_df_write_irq(uint8_t *buf, uint32_t size) +{ + if (!ccid_df_is_enabled()) + return ERR_DENIED; + return usbdc_xfer(_ccid_df_funcd.func_ep_irq, buf, size, true); +} + +int32_t ccid_df_register_callback(enum ccid_df_cb_type cb_type, FUNC_PTR func) +{ + switch (cb_type) { + case CCID_DF_CB_READ_OUT: + usb_d_ep_register_callback(_ccid_df_funcd.func_ep_out, USB_D_EP_CB_XFER, func); + break; + case CCID_DF_CB_WRITE_IN: + usb_d_ep_register_callback(_ccid_df_funcd.func_ep_in, USB_D_EP_CB_XFER, func); + break; + case CCID_DF_CB_WRITE_IRQ: + usb_d_ep_register_callback(_ccid_df_funcd.func_ep_irq, USB_D_EP_CB_XFER, func); + break; + default: + return ERR_INVALID_ARG; + } + return ERR_NONE; +} + +bool ccid_df_is_enabled(void) +{ + return _ccid_df_funcd.enabled; +} diff --git a/sysmoOCTSIM/usb/class/ccid/device/ccid_df.h b/sysmoOCTSIM/usb/class/ccid/device/ccid_df.h new file mode 100644 index 0000000..21fa99e --- /dev/null +++ b/sysmoOCTSIM/usb/class/ccid/device/ccid_df.h @@ -0,0 +1,17 @@ +#pragma once + +#include "usbdc.h" + +enum ccid_df_cb_type { + CCID_DF_CB_READ_OUT, + CCID_DF_CB_WRITE_IN, + CCID_DF_CB_WRITE_IRQ, +}; + +int32_t ccid_df_init(void); +void ccid_df_deinit(void); +int32_t ccid_df_read_out(uint8_t *buf, uint32_t size); +int32_t ccid_df_write_in(uint8_t *buf, uint32_t size); +int32_t ccid_df_write_irq(uint8_t *buf, uint32_t size); +int32_t ccid_df_register_callback(enum ccid_df_cb_type cb_type, FUNC_PTR ptr); +bool ccid_df_is_enabled(void); -- To view, visit https://gerrit.osmocom.org/13997 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ia4d8a6cdc3de26fdc83dcbf89db894b513915a9a Gerrit-Change-Number: 13997 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 17 12:40:56 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 17 May 2019 12:40:56 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/clck_gen.py: avoid logging \0-terminator Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14074 Change subject: trx_toolkit/clck_gen.py: avoid logging \0-terminator ...................................................................... trx_toolkit/clck_gen.py: avoid logging \0-terminator Change-Id: I93da2e8ba9d3fda944b8171bc42e49063c925f9c --- M src/target/trx_toolkit/clck_gen.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/74/14074/1 diff --git a/src/target/trx_toolkit/clck_gen.py b/src/target/trx_toolkit/clck_gen.py index 6c2cbf8..a4b83b5 100755 --- a/src/target/trx_toolkit/clck_gen.py +++ b/src/target/trx_toolkit/clck_gen.py @@ -82,7 +82,7 @@ link.send(payload) # Debug print - log.debug(payload) + log.debug(payload.rstrip("\0")) # Increase frame count self.clck_src += self.ind_period -- To view, visit https://gerrit.osmocom.org/14074 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I93da2e8ba9d3fda944b8171bc42e49063c925f9c Gerrit-Change-Number: 14074 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 17 12:42:05 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 17 May 2019 12:42:05 +0000 Subject: Change in osmo-mgw[master]: osmux: Fix CID release for non-enabled connections Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14075 Change subject: osmux: Fix CID release for non-enabled connections ...................................................................... osmux: Fix CID release for non-enabled connections Change-Id: If65c70b421476776e20233733722d72aa26d69a8 --- M include/osmocom/mgcp/osmux.h M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_osmux.c 3 files changed, 15 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/75/14075/1 diff --git a/include/osmocom/mgcp/osmux.h b/include/osmocom/mgcp/osmux.h index eb05610..69ba3d0 100644 --- a/include/osmocom/mgcp/osmux.h +++ b/include/osmocom/mgcp/osmux.h @@ -14,7 +14,7 @@ int osmux_init(int role, struct mgcp_config *cfg); int osmux_enable_conn(struct mgcp_endpoint *endp, struct mgcp_conn_rtp *conn, struct in_addr *addr, uint16_t port); -void osmux_disable_conn(struct mgcp_conn_rtp *conn); +void conn_osmux_disable(struct mgcp_conn_rtp *conn); int conn_osmux_allocate_cid(struct mgcp_conn_rtp *conn, int osmux_cid); void conn_osmux_release_cid(struct mgcp_conn_rtp *conn); int osmux_xfrm_to_osmux(char *buf, int buf_len, struct mgcp_conn_rtp *conn); diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index 5300351..232dfee 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -125,7 +125,8 @@ /* Cleanup rtp connection struct */ static void mgcp_rtp_conn_cleanup(struct mgcp_conn_rtp *conn_rtp) { - osmux_disable_conn(conn_rtp); + if(mgcp_conn_rtp_is_osmux(conn_rtp)) + conn_osmux_disable(conn_rtp); mgcp_free_rtp_port(&conn_rtp->end); rate_ctr_group_free(conn_rtp->rate_ctr_group); } diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 3b788b6..38657ee 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -487,26 +487,25 @@ /*! disable OSXMUX circuit for a specified connection. * \param[in] conn connection to disable */ -void osmux_disable_conn(struct mgcp_conn_rtp *conn) +void conn_osmux_disable(struct mgcp_conn_rtp *conn) { - if (!conn) - return; - if (conn->osmux.state != OSMUX_STATE_ENABLED) - return; + OSMO_ASSERT(conn->osmux.state != OSMUX_STATE_DISABLED); LOGPCONN(conn->conn, DLMGCP, LOGL_INFO, - "Releasing connection %s using Osmux CID %u\n", - conn->conn->id, conn->osmux.cid); + "Releasing connection using Osmux CID %u\n", conn->osmux.cid); - /* We are closing, we don't need pending RTP packets to be transmitted */ - osmux_xfrm_output_set_tx_cb(&conn->osmux.out, NULL, NULL); - osmux_xfrm_output_flush(&conn->osmux.out); + if (conn->osmux.state == OSMUX_STATE_ENABLED) { + /* We are closing, we don't need pending RTP packets to be transmitted */ + osmux_xfrm_output_set_tx_cb(&conn->osmux.out, NULL, NULL); + osmux_xfrm_output_flush(&conn->osmux.out); - osmux_xfrm_input_close_circuit(conn->osmux.in, conn->osmux.cid); - conn->osmux.state = OSMUX_STATE_DISABLED; + osmux_xfrm_input_close_circuit(conn->osmux.in, conn->osmux.cid); + conn->osmux.state = OSMUX_STATE_DISABLED; + conn_osmux_release_cid(conn); + osmux_handle_put(conn->osmux.in); + } conn_osmux_release_cid(conn); - osmux_handle_put(conn->osmux.in); } /*! relase OSXMUX cid, that had been allocated to this connection. -- To view, visit https://gerrit.osmocom.org/14075 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If65c70b421476776e20233733722d72aa26d69a8 Gerrit-Change-Number: 14075 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 17 13:29:11 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 17 May 2019 13:29:11 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/clck_gen.py: avoid logging \0-terminator In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14074 ) Change subject: trx_toolkit/clck_gen.py: avoid logging \0-terminator ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14074 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I93da2e8ba9d3fda944b8171bc42e49063c925f9c Gerrit-Change-Number: 14074 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 17 May 2019 13:29:11 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 17 13:29:22 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 17 May 2019 13:29:22 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/clck_gen.py: avoid logging \0-terminator In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/14074 ) Change subject: trx_toolkit/clck_gen.py: avoid logging \0-terminator ...................................................................... trx_toolkit/clck_gen.py: avoid logging \0-terminator Change-Id: I93da2e8ba9d3fda944b8171bc42e49063c925f9c --- M src/target/trx_toolkit/clck_gen.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, approved diff --git a/src/target/trx_toolkit/clck_gen.py b/src/target/trx_toolkit/clck_gen.py index 6c2cbf8..a4b83b5 100755 --- a/src/target/trx_toolkit/clck_gen.py +++ b/src/target/trx_toolkit/clck_gen.py @@ -82,7 +82,7 @@ link.send(payload) # Debug print - log.debug(payload) + log.debug(payload.rstrip("\0")) # Increase frame count self.clck_src += self.ind_period -- To view, visit https://gerrit.osmocom.org/14074 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I93da2e8ba9d3fda944b8171bc42e49063c925f9c Gerrit-Change-Number: 14074 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 17 15:12:12 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 17 May 2019 15:12:12 +0000 Subject: Change in libosmo-netif[master]: osmux: Extend osmux_out_handle and add new API to set rtp payload_type Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14076 Change subject: osmux: Extend osmux_out_handle and add new API to set rtp payload_type ...................................................................... osmux: Extend osmux_out_handle and add new API to set rtp payload_type Previously payload_type was always hardcoded to 98 for generated rtp packets from incoming osmux frame. Change-Id: I5cbeb494a8932953d9fd2dc24dacf8cd97fd84e4 --- M TODO-RELEASE M include/osmocom/netif/osmux.h M src/osmux.c M tests/jibuf/jibuf_tool.c M tests/osmo-pcap-test/osmux_test.c M tests/osmux/osmux_test.c M tests/osmux/osmux_test2.c 7 files changed, 22 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/76/14076/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index d0852fc..45ebb75 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,5 @@ # 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. #library what description / commit summary line +libosmo-netif Add new field to struct osmux_out_handle Breaks ABI with older versions +libosmo-netif Add new API osmux_xfrm_output_init2 Deprecates old osmux_xfrm_output_init diff --git a/include/osmocom/netif/osmux.h b/include/osmocom/netif/osmux.h index dfed66a..7dee438 100644 --- a/include/osmocom/netif/osmux.h +++ b/include/osmocom/netif/osmux.h @@ -80,6 +80,7 @@ uint16_t rtp_seq; uint32_t rtp_timestamp; uint32_t rtp_ssrc; + uint8_t rtp_payload_type; uint8_t osmux_seq_ack; /* Latest received seq num */ struct osmo_timer_list timer; struct llist_head list; @@ -106,7 +107,8 @@ int osmux_xfrm_input(struct osmux_in_handle *h, struct msgb *msg, int ccid); void osmux_xfrm_input_deliver(struct osmux_in_handle *h); -void osmux_xfrm_output_init(struct osmux_out_handle *h, uint32_t rtp_ssrc); +void osmux_xfrm_output_init(struct osmux_out_handle *h, uint32_t rtp_ssrc) OSMO_DEPRECATED("Use osmux_xfrm_output_init2() instead"); +void osmux_xfrm_output_init2(struct osmux_out_handle *h, uint32_t rtp_ssrc, uint8_t rtp_payload_type); void osmux_xfrm_output_set_tx_cb(struct osmux_out_handle *h, void (*tx_cb)(struct msgb *msg, void *data), void *data); int osmux_xfrm_output(struct osmux_hdr *osmuxh, struct osmux_out_handle *h, struct llist_head *list) OSMO_DEPRECATED("Use osmux_xfrm_output_sched() instead"); int osmux_xfrm_output_sched(struct osmux_out_handle *h, struct osmux_hdr *osmuxh); diff --git a/src/osmux.c b/src/osmux.c index 7a6ce60..759d3da 100644 --- a/src/osmux.c +++ b/src/osmux.c @@ -146,7 +146,7 @@ rtph->csrc_count = 0; rtph->extension = 0; rtph->version = RTP_VERSION; - rtph->payload_type = 98; + rtph->payload_type = h->rtp_payload_type; /* ... emulate timestamp and ssrc */ rtph->timestamp = htonl(h->rtp_timestamp); rtph->sequence = htons(h->rtp_seq); @@ -999,16 +999,23 @@ } } -void osmux_xfrm_output_init(struct osmux_out_handle *h, uint32_t rtp_ssrc) +void osmux_xfrm_output_init2(struct osmux_out_handle *h, uint32_t rtp_ssrc, uint8_t rtp_payload_type) { memset(h, 0, sizeof(*h)); h->rtp_seq = (uint16_t)random(); h->rtp_timestamp = (uint32_t)random(); h->rtp_ssrc = rtp_ssrc; + h->rtp_payload_type = rtp_payload_type; /* backward compatibility with old users */ INIT_LLIST_HEAD(&h->list); osmo_timer_setup(&h->timer, osmux_xfrm_output_trigger, h); } +void osmux_xfrm_output_init(struct osmux_out_handle *h, uint32_t rtp_ssrc) +{ + /* backward compatibility with old users, where 98 was harcoded in osmux_rebuild_rtp() */ + osmux_xfrm_output_init2(h, rtp_ssrc, 98); +} + #define SNPRINTF_BUFFER_SIZE(ret, remain, offset) \ if (ret < 0) \ ret = 0; \ diff --git a/tests/jibuf/jibuf_tool.c b/tests/jibuf/jibuf_tool.c index bd444a7..df11131 100644 --- a/tests/jibuf/jibuf_tool.c +++ b/tests/jibuf/jibuf_tool.c @@ -517,7 +517,7 @@ osmo_pcap.timer.cb = pcap_pkt_timer_cb; if(opt_osmux) { - osmux_xfrm_output_init(&pcap_osmux_h, 0); + osmux_xfrm_output_init2(&pcap_osmux_h, 0, 98); osmux_xfrm_output_set_tx_cb(&pcap_osmux_h, glue_cb, NULL); } diff --git a/tests/osmo-pcap-test/osmux_test.c b/tests/osmo-pcap-test/osmux_test.c index 7ec78a0..9163753 100644 --- a/tests/osmo-pcap-test/osmux_test.c +++ b/tests/osmo-pcap-test/osmux_test.c @@ -189,7 +189,7 @@ osmo_pcap.timer.cb = osmo_pcap_pkt_timer_cb; osmux_xfrm_input_init(&h_input); - osmux_xfrm_output_init(&h_output); + osmux_xfrm_output_init2(&h_output, 0, 98); osmux_xfrm_output_set_tx_cb(&h_output, tx_cb, NULL); /* first run */ diff --git a/tests/osmux/osmux_test.c b/tests/osmux/osmux_test.c index 704ccbc..e2eb777 100644 --- a/tests/osmux/osmux_test.c +++ b/tests/osmux/osmux_test.c @@ -269,7 +269,7 @@ osmo_init_logging2(tall_ctx, &osmux_test_log_info); log_set_log_level(osmo_stderr_target, LOGL_DEBUG); - osmux_xfrm_output_init(&h_output, 0x7000000); + osmux_xfrm_output_init2(&h_output, 0x7000000, 98); osmux_xfrm_output_set_tx_cb(&h_output, tx_cb, NULL); /* If the test takes longer than 10 seconds, abort it */ diff --git a/tests/osmux/osmux_test2.c b/tests/osmux/osmux_test2.c index ecd9296..ffe1101 100644 --- a/tests/osmux/osmux_test2.c +++ b/tests/osmux/osmux_test2.c @@ -164,7 +164,7 @@ clock_override_enable(true); clock_override_set(0, 0); osmux_init(32); - osmux_xfrm_output_init(&h_output, 0x7000000); + osmux_xfrm_output_init2(&h_output, 0x7000000, 98); h_output.rtp_seq = (uint16_t)50; h_output.rtp_timestamp = (uint32_t)500; osmux_xfrm_output_set_tx_cb(&h_output, tx_cb, &h_output); @@ -226,7 +226,7 @@ clock_override_enable(true); clock_override_set(0, 0); osmux_init(32); - osmux_xfrm_output_init(&h_output, 0x7000000); + osmux_xfrm_output_init2(&h_output, 0x7000000, 98); h_output.rtp_seq = (uint16_t)50; h_output.rtp_timestamp = (uint32_t)500; osmux_xfrm_output_set_tx_cb(&h_output, tx_cb, &h_output); @@ -263,7 +263,7 @@ clock_override_enable(true); clock_override_set(0, 0); osmux_init(32); - osmux_xfrm_output_init(&h_output, 0x7000000); + osmux_xfrm_output_init2(&h_output, 0x7000000, 98); h_output.rtp_seq = (uint16_t)50; h_output.rtp_timestamp = (uint32_t)500; osmux_xfrm_output_set_tx_cb(&h_output, tx_cb, &h_output); @@ -297,7 +297,7 @@ clock_override_enable(true); clock_override_set(0, 0); osmux_init(32); - osmux_xfrm_output_init(&h_output, 0x7000000); + osmux_xfrm_output_init2(&h_output, 0x7000000, 98); h_output.rtp_seq = (uint16_t)50; h_output.rtp_timestamp = (uint32_t)500; osmux_xfrm_output_set_tx_cb(&h_output, tx_cb, &h_output); @@ -329,7 +329,7 @@ clock_override_enable(true); clock_override_set(0, 0); osmux_init(32); - osmux_xfrm_output_init(&h_output, 0x7000000); + osmux_xfrm_output_init2(&h_output, 0x7000000, 98); h_output.rtp_seq = (uint16_t)50; h_output.rtp_timestamp = (uint32_t)500; osmux_xfrm_output_set_tx_cb(&h_output, tx_cb, &h_output); -- To view, visit https://gerrit.osmocom.org/14076 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I5cbeb494a8932953d9fd2dc24dacf8cd97fd84e4 Gerrit-Change-Number: 14076 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 17 15:12:59 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 17 May 2019 15:12:59 +0000 Subject: Change in libosmo-netif[master]: osmux: Extend osmux_out_handle and add new API to set rtp payload_type In-Reply-To: References: Message-ID: Pau Espin Pedrol has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/14076 ) Change subject: osmux: Extend osmux_out_handle and add new API to set rtp payload_type ...................................................................... osmux: Extend osmux_out_handle and add new API to set rtp payload_type Previously payload_type was always hardcoded to 98 for generated rtp packets from incoming osmux frame. Change-Id: I5cbeb494a8932953d9fd2dc24dacf8cd97fd84e4 --- M TODO-RELEASE M include/osmocom/netif/osmux.h M src/osmux.c M tests/jibuf/jibuf_tool.c M tests/osmo-pcap-test/osmux_test.c M tests/osmux/osmux_test.c M tests/osmux/osmux_test2.c 7 files changed, 22 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/76/14076/2 -- To view, visit https://gerrit.osmocom.org/14076 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I5cbeb494a8932953d9fd2dc24dacf8cd97fd84e4 Gerrit-Change-Number: 14076 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-CC: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 17 15:18:05 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 17 May 2019 15:18:05 +0000 Subject: Change in osmo-mgw[master]: osmux: Fix hadcoded rtp payload_type 98 in osmux conn Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14077 Change subject: osmux: Fix hadcoded rtp payload_type 98 in osmux conn ...................................................................... osmux: Fix hadcoded rtp payload_type 98 in osmux conn Depends on: libosmo-netif.git I5cbeb494a8932953d9fd2dc24dacf8cd97fd84e4 Change-Id: I24698a9613bc0de9460c6ad2d1067c152ebcf0b2 --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/77/14077/1 diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 38657ee..72d3b91 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -473,9 +473,10 @@ return -1; } - osmux_xfrm_output_init(&conn->osmux.out, + osmux_xfrm_output_init2(&conn->osmux.out, (conn->osmux.cid * rtp_ssrc_winlen) + - (random() % rtp_ssrc_winlen)); + (random() % rtp_ssrc_winlen), + conn->end.codec->payload_type); osmux_xfrm_output_set_tx_cb(&conn->osmux.out, scheduled_from_osmux_tx_rtp_cb, conn); -- To view, visit https://gerrit.osmocom.org/14077 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I24698a9613bc0de9460c6ad2d1067c152ebcf0b2 Gerrit-Change-Number: 14077 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 17 17:02:21 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 17 May 2019 17:02:21 +0000 Subject: Change in osmo-ttcn3-hacks[master]: RTP_Emulation: Avoid failure if T_transmit triggers between bind and ... Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14078 Change subject: RTP_Emulation: Avoid failure if T_transmit triggers between bind and connect ...................................................................... RTP_Emulation: Avoid failure if T_transmit triggers between bind and connect During MGCP_Test's f_flow_modify, an RTP socket may be Tx-enabled, and f_flow_modify first calls bind, then connect, with MDCX transaction in the middle (which can take some time). If T_transmit from RTP_Emulation triggers (RTP packet to be send), during that time, TTCN3 will fail to send the packet: RTP_Emulation.ttcn:312 Message enqueued on RTP from system @Socket_API_Definitions.PortEvent : { result := { errorCode := ERROR_SOCKET (4), connId := 2, os_error_code := 89, os_error_text := "Destination address required" } } id 1 Change-Id: I20e7aed35bb28200e30ee5efc718f77e036d8262 --- M library/RTP_Emulation.ttcn 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/78/14078/1 diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn index 2494d74..7b9be68 100644 --- a/library/RTP_Emulation.ttcn +++ b/library/RTP_Emulation.ttcn @@ -85,6 +85,7 @@ /* state variables, change over time */ var boolean g_rx_enabled := false; + var boolean g_tx_connected := false; /* Set to true after connect() */ var LIN2_BO_LAST g_tx_next_seq := 0; var uint32_t g_tx_next_ts := 0; @@ -347,6 +348,8 @@ log("Local Port is not an even port number!"); continue; } + + g_tx_connected := false; /* will set it back to true upon next connect() call */ res := RTP_CodecPort_CtrlFunct.f_IPL4_listen(RTP, g_local_host, g_local_port, {udp:={}}); if (not ispresent(res.connId)) { @@ -387,6 +390,7 @@ setverdict(fail, "Could not connect to RTCP socket, check your configuration"); mtc.stop; } + g_tx_connected := true; CTRL.reply(RTPEM_connect:{g_remote_host, g_remote_port}); } [] CTRL.getcall(RTPEM_mode:{RTPEM_MODE_NONE}) { @@ -466,7 +470,7 @@ } /* transmit if timer has expired */ - [] T_transmit.timeout { + [g_tx_connected] T_transmit.timeout { /* send one RTP frame, re-start timer */ f_tx_rtp(g_cfg.tx_fixed_payload); T_transmit.start; -- To view, visit https://gerrit.osmocom.org/14078 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I20e7aed35bb28200e30ee5efc718f77e036d8262 Gerrit-Change-Number: 14078 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 17 17:05:36 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 17 May 2019 17:05:36 +0000 Subject: Change in osmo-ttcn3-hacks[master]: RTP_Emulation: Avoid failure if T_transmit triggers between bind and ... In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14078 ) Change subject: RTP_Emulation: Avoid failure if T_transmit triggers between bind and connect ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/14078/1/library/RTP_Emulation.ttcn File library/RTP_Emulation.ttcn: https://gerrit.osmocom.org/#/c/14078/1/library/RTP_Emulation.ttcn at 473 PS1, Line 473: [g_tx_connected] T_transmit.timeout { I am not sure if the condition should be here or simply: """" if (g_tx_connected) { f_tx_rtp(g_cfg.tx_fixed_payload); g_stats_rtp.num_pkts_tx := g_stats_rtp.num_pkts_tx+1; g_stats_rtp.bytes_payload_tx := g_stats_rtp.bytes_payload_tx + lengthof(g_cfg.tx_fixed_payload); } T_transmit.start; """" What happens if timer timeout triggers and g_tx_connected is false? is the timeout event delayed until g_tx_connected is true? or is it discarded? In that case the g_tx_connected check should be checked with "if" block as shown above, otherwise T_transmit won't be re-enabled and Tx will stop forever (or until next RTPEM_mode message) and that's not desirable. -- To view, visit https://gerrit.osmocom.org/14078 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I20e7aed35bb28200e30ee5efc718f77e036d8262 Gerrit-Change-Number: 14078 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 17 May 2019 17:05:36 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 17 17:17:39 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 17 May 2019 17:17:39 +0000 Subject: Change in osmo-mgw[master]: osmux: Fix hardcoded rtp payload_type 98 in osmux conn In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14077 to look at the new patch set (#2). Change subject: osmux: Fix hardcoded rtp payload_type 98 in osmux conn ...................................................................... osmux: Fix hardcoded rtp payload_type 98 in osmux conn Depends on: libosmo-netif.git I5cbeb494a8932953d9fd2dc24dacf8cd97fd84e4 Change-Id: I24698a9613bc0de9460c6ad2d1067c152ebcf0b2 --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/77/14077/2 -- To view, visit https://gerrit.osmocom.org/14077 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I24698a9613bc0de9460c6ad2d1067c152ebcf0b2 Gerrit-Change-Number: 14077 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 17 17:32:01 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 May 2019 17:32:01 +0000 Subject: Change in osmo-ttcn3-hacks[master]: RTP_Emulation: Avoid failure if T_transmit triggers between bind and ... In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14078 ) Change subject: RTP_Emulation: Avoid failure if T_transmit triggers between bind and connect ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/14078/1/library/RTP_Emulation.ttcn File library/RTP_Emulation.ttcn: https://gerrit.osmocom.org/#/c/14078/1/library/RTP_Emulation.ttcn at 473 PS1, Line 473: [g_tx_connected] T_transmit.timeout { > I am not sure if the condition should be here or simply: [?] AFAICT: The timeout expiration event is in the inbound port queue until some match statement dequeues it. If there is no matching statement [yet], I would expect it to be delayed until g_tx_connected is true. But the best approach is to write a small 10-line test program and try it out.... -- To view, visit https://gerrit.osmocom.org/14078 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I20e7aed35bb28200e30ee5efc718f77e036d8262 Gerrit-Change-Number: 14078 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Harald Welte Gerrit-Comment-Date: Fri, 17 May 2019 17:32:01 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 17 19:13:57 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 17 May 2019 19:13:57 +0000 Subject: Change in libosmocore[master]: pseudotalloc: turn talloc_steal() into #define Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14079 Change subject: pseudotalloc: turn talloc_steal() into #define ...................................................................... pseudotalloc: turn talloc_steal() into #define Any non-anciant version of talloc implements talloc_steal() as a #define using the _talloc_steal_loc() symbol. Let's be more compatible. This fix is relevant to using osmo_fsm inside the osmo-ccid-firmware builds for Cortex-M4. In this situation, for some strange reason, libosmcoore is compiled using src/pseudotalloc/talloc.h, but later then linked against the real libtalloc. Change-Id: I1ee7f5e9b1002cff37bb8341ad870e1da5f1f9ff --- M src/pseudotalloc/pseudotalloc.c M src/pseudotalloc/talloc.h 2 files changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/79/14079/1 diff --git a/src/pseudotalloc/pseudotalloc.c b/src/pseudotalloc/pseudotalloc.c index 89e6269..c368296 100644 --- a/src/pseudotalloc/pseudotalloc.c +++ b/src/pseudotalloc/pseudotalloc.c @@ -97,7 +97,7 @@ return buf; } -void *talloc_steal(const void *new_ctx, const void *obj) +void *_talloc_steal_loc(const void *new_ctx, const void *obj, const char *location) { /* as we don't do hierarchical allocations, this is simply a NOP */ return (void *)obj; diff --git a/src/pseudotalloc/talloc.h b/src/pseudotalloc/talloc.h index 34088af..fe2efbc 100644 --- a/src/pseudotalloc/talloc.h +++ b/src/pseudotalloc/talloc.h @@ -60,5 +60,6 @@ const char *name); char *talloc_asprintf(const void *ctx, const char *fmt, ...); -void *talloc_steal(const void *new_ctx, const void *obj); +#define talloc_steal(ctx, ptr) _talloc_steal_loc((ctx), (ptr), __location__) +void *_talloc_steal_loc(const void *new_ctx, const void *obj, const char *location); char *talloc_vasprintf(const void *t, const char *fmt, va_list ap); -- To view, visit https://gerrit.osmocom.org/14079 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I1ee7f5e9b1002cff37bb8341ad870e1da5f1f9ff Gerrit-Change-Number: 14079 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 17 23:05:12 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 17 May 2019 23:05:12 +0000 Subject: Change in libosmocore[master]: Change GSM48_PDISC_* to enum type In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/12572 ) Change subject: Change GSM48_PDISC_* to enum type ...................................................................... Change GSM48_PDISC_* to enum type An enum is more clear than an int and #defines for passing around, also in case you have a switch () statement, the compiler will issue warnings for unhandled cases. Change-Id: Icbbe8786a776081d7643193f154e6270224399e6 --- M include/osmocom/gsm/protocol/gsm_04_08.h 1 file changed, 20 insertions(+), 18 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index 16910c3..767af8d 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -1370,30 +1370,32 @@ } __attribute__((packed)); /* Section 10.2 + GSM 04.07 12.2.3.1.1 + 3GPP TS 24.007 11.2.3.1.1 */ -#define GSM48_PDISC_GROUP_CC 0x00 -#define GSM48_PDISC_BCAST_CC 0x01 -#define GSM48_PDISC_PDSS1 0x02 /* 04.07 only */ -#define GSM48_PDISC_CC 0x03 -#define GSM48_PDISC_PDSS2 0x04 /* 04.07 only */ -#define GSM48_PDISC_GTTP 0x04 /* 24.007 only */ -#define GSM48_PDISC_MM 0x05 -#define GSM48_PDISC_RR 0x06 -#define GSM48_PDISC_MM_GPRS 0x08 -#define GSM48_PDISC_SMS 0x09 -#define GSM48_PDISC_SM_GPRS 0x0a -#define GSM48_PDISC_NC_SS 0x0b -#define GSM48_PDISC_LOC 0x0c -#define GSM48_PDISC_EXTEND 0x0e -#define GSM48_PDISC_TEST 0x0f /* as per 11.10, 04.14 */ -#define GSM48_PDISC_MASK 0x0f +enum osmo_gsm48_pdisc { + GSM48_PDISC_GROUP_CC = 0x00, + GSM48_PDISC_BCAST_CC = 0x01, + GSM48_PDISC_PDSS1 = 0x02, /* 04.07 only */ + GSM48_PDISC_CC = 0x03, + GSM48_PDISC_PDSS2 = 0x04, /* 04.07 only */ + GSM48_PDISC_GTTP = 0x04, /* 24.007 only */ + GSM48_PDISC_MM = 0x05, + GSM48_PDISC_RR = 0x06, + GSM48_PDISC_MM_GPRS = 0x08, + GSM48_PDISC_SMS = 0x09, + GSM48_PDISC_SM_GPRS = 0x0a, + GSM48_PDISC_NC_SS = 0x0b, + GSM48_PDISC_LOC = 0x0c, + GSM48_PDISC_EXTEND = 0x0e, + GSM48_PDISC_TEST = 0x0f, /* as per 11.10, 04.14 */ + GSM48_PDISC_MASK = 0x0f, +}; extern const struct value_string gsm48_pdisc_names[]; -static inline const char *gsm48_pdisc_name(uint8_t val) +static inline const char *gsm48_pdisc_name(enum osmo_gsm48_pdisc val) { return get_value_string(gsm48_pdisc_names, val); } bool gsm48_hdr_gmm_cipherable(const struct gsm48_hdr *hdr); -static inline uint8_t gsm48_hdr_pdisc(const struct gsm48_hdr *hdr) +static inline enum osmo_gsm48_pdisc gsm48_hdr_pdisc(const struct gsm48_hdr *hdr) { /* * 3GPP TS 24.007 version 12.0.0 Release 12, -- To view, visit https://gerrit.osmocom.org/12572 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Icbbe8786a776081d7643193f154e6270224399e6 Gerrit-Change-Number: 12572 Gerrit-PatchSet: 8 Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Sat May 18 02:38:41 2019 From: admin at opensuse.org (OBS Notification) Date: Sat, 18 May 2019 02:38:41 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <5cdf704f87f21_58803905f851382e@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-pcu failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 96s] from ./gprs_bssgp_pcu.h:32, [ 96s] from gprs_bssgp_pcu.cpp:22: [ 96s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h: In function 'osmo_gsm48_pdisc gsm48_hdr_pdisc(const gsm48_hdr*)': [ 96s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:1406:15: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'osmo_gsm48_pdisc' [-fpermissive] [ 96s] return hdr->proto_discr; [ 96s] ^ [ 96s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:1407:9: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'osmo_gsm48_pdisc' [-fpermissive] [ 96s] return pdisc; [ 96s] ^ [ 96s] Makefile:803: recipe for target 'gprs_bssgp_pcu.lo' failed [ 96s] make[2]: *** [gprs_bssgp_pcu.lo] Error 1 [ 96s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 96s] Makefile:411: recipe for target 'all-recursive' failed [ 96s] make[1]: *** [all-recursive] Error 1 [ 96s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 96s] dh_auto_build: make -j1 returned exit code 2 [ 96s] debian/rules:12: recipe for target 'build' failed [ 96s] make: *** [build] Error 2 [ 96s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 96s] [ 96s] lamb07 failed "build osmo-pcu_0.6.0.60.41d6.dsc" at Sat May 18 02:38:29 UTC 2019. [ 96s] [ 96s] ### VM INTERACTION START ### [ 99s] [ 87.950790] sysrq: SysRq : Power Off [ 99s] [ 87.957069] reboot: Power down [ 99s] ### VM INTERACTION END ### [ 99s] [ 99s] lamb07 failed "build osmo-pcu_0.6.0.60.41d6.dsc" at Sat May 18 02:38:32 UTC 2019. [ 99s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat May 18 02:39:15 2019 From: admin at opensuse.org (OBS Notification) Date: Sat, 18 May 2019 02:39:15 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5cdf706aa0013_58803905f85139d2@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-pcu failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 91s] from ./gprs_bssgp_pcu.h:32, [ 91s] from gprs_bssgp_pcu.cpp:22: [ 91s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h: In function 'osmo_gsm48_pdisc gsm48_hdr_pdisc(const gsm48_hdr*)': [ 91s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:1406:15: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'osmo_gsm48_pdisc' [-fpermissive] [ 91s] return hdr->proto_discr; [ 91s] ^ [ 91s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:1407:9: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'osmo_gsm48_pdisc' [-fpermissive] [ 91s] return pdisc; [ 91s] ^ [ 91s] Makefile:803: recipe for target 'gprs_bssgp_pcu.lo' failed [ 91s] make[2]: *** [gprs_bssgp_pcu.lo] Error 1 [ 91s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 91s] Makefile:411: recipe for target 'all-recursive' failed [ 91s] make[1]: *** [all-recursive] Error 1 [ 91s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 91s] dh_auto_build: make -j1 returned exit code 2 [ 91s] debian/rules:12: recipe for target 'build' failed [ 91s] make: *** [build] Error 2 [ 91s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 91s] [ 91s] lamb06 failed "build osmo-pcu_0.6.0.60.41d6.dsc" at Sat May 18 02:38:55 UTC 2019. [ 91s] [ 91s] ### VM INTERACTION START ### [ 94s] [ 83.358485] sysrq: SysRq : Power Off [ 94s] [ 83.365160] reboot: Power down [ 94s] ### VM INTERACTION END ### [ 94s] [ 94s] lamb06 failed "build osmo-pcu_0.6.0.60.41d6.dsc" at Sat May 18 02:38:59 UTC 2019. [ 94s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat May 18 02:39:15 2019 From: admin at opensuse.org (OBS Notification) Date: Sat, 18 May 2019 02:39:15 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in xUbuntu_18.04/i586 In-Reply-To: References: Message-ID: <5cdf706b730b7_58803905f851408b@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_18.04/i586 Package network:osmocom:nightly/osmo-pcu failed to build in xUbuntu_18.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 119s] from ./gprs_bssgp_pcu.h:32, [ 119s] from gprs_bssgp_pcu.cpp:22: [ 119s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h: In function 'osmo_gsm48_pdisc gsm48_hdr_pdisc(const gsm48_hdr*)': [ 119s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:1406:15: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'osmo_gsm48_pdisc' [-fpermissive] [ 119s] return hdr->proto_discr; [ 119s] ~~~~~^~~~~~~~~~~ [ 119s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:1407:9: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'osmo_gsm48_pdisc' [-fpermissive] [ 119s] return pdisc; [ 119s] ^~~~~ [ 119s] Makefile:803: recipe for target 'gprs_bssgp_pcu.lo' failed [ 119s] make[2]: *** [gprs_bssgp_pcu.lo] Error 1 [ 119s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 119s] Makefile:411: recipe for target 'all-recursive' failed [ 119s] make[1]: *** [all-recursive] Error 1 [ 119s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 119s] dh_auto_build: make -j1 returned exit code 2 [ 119s] debian/rules:12: recipe for target 'build' failed [ 119s] make: *** [build] Error 2 [ 119s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 119s] [ 119s] lamb05 failed "build osmo-pcu_0.6.0.60.41d6.dsc" at Sat May 18 02:39:07 UTC 2019. [ 119s] [ 119s] ### VM INTERACTION START ### [ 122s] [ 110.323927] sysrq: SysRq : Power Off [ 122s] [ 110.330035] reboot: Power down [ 122s] ### VM INTERACTION END ### [ 122s] [ 122s] lamb05 failed "build osmo-pcu_0.6.0.60.41d6.dsc" at Sat May 18 02:39:11 UTC 2019. [ 122s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat May 18 02:40:24 2019 From: admin at opensuse.org (OBS Notification) Date: Sat, 18 May 2019 02:40:24 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in xUbuntu_17.10/x86_64 In-Reply-To: References: Message-ID: <5cdf70a5d0e6e_58803905f851416a@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_17.10/x86_64 Package network:osmocom:nightly/osmo-pcu failed to build in xUbuntu_17.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 140s] from ./gprs_bssgp_pcu.h:32, [ 140s] from gprs_bssgp_pcu.cpp:22: [ 140s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h: In function 'osmo_gsm48_pdisc gsm48_hdr_pdisc(const gsm48_hdr*)': [ 140s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:1406:15: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'osmo_gsm48_pdisc' [-fpermissive] [ 140s] return hdr->proto_discr; [ 140s] ~~~~~^~~~~~~~~~~ [ 140s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:1407:9: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'osmo_gsm48_pdisc' [-fpermissive] [ 140s] return pdisc; [ 140s] ^~~~~ [ 140s] Makefile:803: recipe for target 'gprs_bssgp_pcu.lo' failed [ 140s] make[2]: *** [gprs_bssgp_pcu.lo] Error 1 [ 140s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 140s] Makefile:411: recipe for target 'all-recursive' failed [ 140s] make[1]: *** [all-recursive] Error 1 [ 140s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 140s] dh_auto_build: make -j1 returned exit code 2 [ 140s] debian/rules:12: recipe for target 'build' failed [ 140s] make: *** [build] Error 2 [ 140s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 140s] [ 140s] cloud121 failed "build osmo-pcu_0.6.0.60.41d6.dsc" at Sat May 18 02:40:10 UTC 2019. [ 140s] [ 140s] ### VM INTERACTION START ### [ 144s] [ 109.998906] sysrq: SysRq : Power Off [ 144s] [ 110.034877] reboot: Power down [ 145s] ### VM INTERACTION END ### [ 145s] [ 145s] cloud121 failed "build osmo-pcu_0.6.0.60.41d6.dsc" at Sat May 18 02:40:15 UTC 2019. [ 145s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat May 18 02:40:41 2019 From: admin at opensuse.org (OBS Notification) Date: Sat, 18 May 2019 02:40:41 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in xUbuntu_17.10/i586 In-Reply-To: References: Message-ID: <5cdf70c4a2644_58803905f85142e2@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_17.10/i586 Package network:osmocom:nightly/osmo-pcu failed to build in xUbuntu_17.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 92s] from ./gprs_bssgp_pcu.h:32, [ 92s] from gprs_bssgp_pcu.cpp:22: [ 92s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h: In function 'osmo_gsm48_pdisc gsm48_hdr_pdisc(const gsm48_hdr*)': [ 92s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:1406:15: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'osmo_gsm48_pdisc' [-fpermissive] [ 92s] return hdr->proto_discr; [ 92s] ~~~~~^~~~~~~~~~~ [ 92s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:1407:9: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'osmo_gsm48_pdisc' [-fpermissive] [ 92s] return pdisc; [ 92s] ^~~~~ [ 92s] Makefile:803: recipe for target 'gprs_bssgp_pcu.lo' failed [ 92s] make[2]: *** [gprs_bssgp_pcu.lo] Error 1 [ 92s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 92s] Makefile:411: recipe for target 'all-recursive' failed [ 92s] make[1]: *** [all-recursive] Error 1 [ 92s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 92s] dh_auto_build: make -j1 returned exit code 2 [ 92s] debian/rules:12: recipe for target 'build' failed [ 92s] make: *** [build] Error 2 [ 92s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 92s] [ 92s] lamb12 failed "build osmo-pcu_0.6.0.60.41d6.dsc" at Sat May 18 02:40:27 UTC 2019. [ 92s] [ 92s] ### VM INTERACTION START ### [ 96s] [ 85.283518] sysrq: SysRq : Power Off [ 96s] [ 85.303876] reboot: Power down [ 96s] ### VM INTERACTION END ### [ 96s] [ 96s] lamb12 failed "build osmo-pcu_0.6.0.60.41d6.dsc" at Sat May 18 02:40:31 UTC 2019. [ 96s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat May 18 02:41:49 2019 From: admin at opensuse.org (OBS Notification) Date: Sat, 18 May 2019 02:41:49 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in Debian_9.0/i586 In-Reply-To: References: Message-ID: <5cdf710439907_58803905f85143a4@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_9.0/i586 Package network:osmocom:nightly/osmo-pcu failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 101s] from ./gprs_bssgp_pcu.h:32, [ 101s] from gprs_bssgp_pcu.cpp:22: [ 101s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h: In function 'osmo_gsm48_pdisc gsm48_hdr_pdisc(const gsm48_hdr*)': [ 101s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:1406:15: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'osmo_gsm48_pdisc' [-fpermissive] [ 101s] return hdr->proto_discr; [ 101s] ~~~~~^~~~~~~~~~~ [ 101s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:1407:9: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'osmo_gsm48_pdisc' [-fpermissive] [ 101s] return pdisc; [ 101s] ^~~~~ [ 101s] Makefile:803: recipe for target 'gprs_bssgp_pcu.lo' failed [ 101s] make[2]: *** [gprs_bssgp_pcu.lo] Error 1 [ 101s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 101s] Makefile:411: recipe for target 'all-recursive' failed [ 101s] make[1]: *** [all-recursive] Error 1 [ 101s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 101s] dh_auto_build: make -j1 returned exit code 2 [ 101s] debian/rules:12: recipe for target 'build' failed [ 101s] make: *** [build] Error 2 [ 101s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 101s] [ 101s] lamb12 failed "build osmo-pcu_0.6.0.60.41d6.dsc" at Sat May 18 02:41:44 UTC 2019. [ 101s] [ 101s] ### VM INTERACTION START ### [ 104s] [ 91.255255] sysrq: SysRq : Power Off [ 104s] [ 91.261153] reboot: Power down [ 105s] ### VM INTERACTION END ### [ 105s] [ 105s] lamb12 failed "build osmo-pcu_0.6.0.60.41d6.dsc" at Sat May 18 02:41:48 UTC 2019. [ 105s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat May 18 02:41:49 2019 From: admin at opensuse.org (OBS Notification) Date: Sat, 18 May 2019 02:41:49 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5cdf7104bbfab_58803905f851449d@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_8.0/i586 Package network:osmocom:nightly/osmo-pcu failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 162s] from ./gprs_bssgp_pcu.h:32, [ 162s] from gprs_bssgp_pcu.cpp:22: [ 162s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h: In function 'osmo_gsm48_pdisc gsm48_hdr_pdisc(const gsm48_hdr*)': [ 162s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:1406:15: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'osmo_gsm48_pdisc' [-fpermissive] [ 162s] return hdr->proto_discr; [ 162s] ^ [ 162s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:1407:9: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'osmo_gsm48_pdisc' [-fpermissive] [ 162s] return pdisc; [ 162s] ^ [ 162s] Makefile:791: recipe for target 'gprs_bssgp_pcu.lo' failed [ 162s] make[2]: *** [gprs_bssgp_pcu.lo] Error 1 [ 162s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 162s] Makefile:399: recipe for target 'all-recursive' failed [ 162s] make[1]: *** [all-recursive] Error 1 [ 162s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 162s] dh_auto_build: make -j1 returned exit code 2 [ 162s] debian/rules:12: recipe for target 'build' failed [ 162s] make: *** [build] Error 2 [ 162s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 162s] [ 162s] cloud128 failed "build osmo-pcu_0.6.0.60.41d6.dsc" at Sat May 18 02:41:33 UTC 2019. [ 162s] [ 162s] ### VM INTERACTION START ### [ 163s] Powering off. [ 163s] [ 123.871604] reboot: Power down [ 165s] ### VM INTERACTION END ### [ 165s] [ 165s] cloud128 failed "build osmo-pcu_0.6.0.60.41d6.dsc" at Sat May 18 02:41:36 UTC 2019. [ 165s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat May 18 02:42:41 2019 From: admin at opensuse.org (OBS Notification) Date: Sat, 18 May 2019 02:42:41 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in Debian_9.0/x86_64 In-Reply-To: References: Message-ID: <5cdf713ebb5fe_58803905f851469b@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_9.0/x86_64 Package network:osmocom:nightly/osmo-pcu failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 101s] from ./gprs_bssgp_pcu.h:32, [ 101s] from gprs_bssgp_pcu.cpp:22: [ 101s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h: In function 'osmo_gsm48_pdisc gsm48_hdr_pdisc(const gsm48_hdr*)': [ 101s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:1406:15: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'osmo_gsm48_pdisc' [-fpermissive] [ 101s] return hdr->proto_discr; [ 101s] ~~~~~^~~~~~~~~~~ [ 101s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:1407:9: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'osmo_gsm48_pdisc' [-fpermissive] [ 101s] return pdisc; [ 101s] ^~~~~ [ 101s] Makefile:803: recipe for target 'gprs_bssgp_pcu.lo' failed [ 101s] make[2]: *** [gprs_bssgp_pcu.lo] Error 1 [ 101s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 101s] Makefile:411: recipe for target 'all-recursive' failed [ 101s] make[1]: *** [all-recursive] Error 1 [ 101s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 101s] dh_auto_build: make -j1 returned exit code 2 [ 101s] debian/rules:12: recipe for target 'build' failed [ 101s] make: *** [build] Error 2 [ 101s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 101s] [ 101s] lamb18 failed "build osmo-pcu_0.6.0.60.41d6.dsc" at Sat May 18 02:42:29 UTC 2019. [ 101s] [ 101s] ### VM INTERACTION START ### [ 104s] [ 90.101842] sysrq: SysRq : Power Off [ 104s] [ 90.116864] reboot: Power down [ 104s] ### VM INTERACTION END ### [ 104s] [ 104s] lamb18 failed "build osmo-pcu_0.6.0.60.41d6.dsc" at Sat May 18 02:42:32 UTC 2019. [ 104s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat May 18 02:43:49 2019 From: admin at opensuse.org (OBS Notification) Date: Sat, 18 May 2019 02:43:49 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in xUbuntu_18.04/x86_64 In-Reply-To: References: Message-ID: <5cdf7179888f1_58803905f85150ec@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_18.04/x86_64 Package network:osmocom:nightly/osmo-pcu failed to build in xUbuntu_18.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 119s] from ./gprs_bssgp_pcu.h:32, [ 119s] from gprs_bssgp_pcu.cpp:22: [ 119s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h: In function 'osmo_gsm48_pdisc gsm48_hdr_pdisc(const gsm48_hdr*)': [ 119s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:1406:15: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'osmo_gsm48_pdisc' [-fpermissive] [ 119s] return hdr->proto_discr; [ 119s] ~~~~~^~~~~~~~~~~ [ 119s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:1407:9: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'osmo_gsm48_pdisc' [-fpermissive] [ 119s] return pdisc; [ 119s] ^~~~~ [ 119s] Makefile:803: recipe for target 'gprs_bssgp_pcu.lo' failed [ 119s] make[2]: *** [gprs_bssgp_pcu.lo] Error 1 [ 119s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 119s] Makefile:411: recipe for target 'all-recursive' failed [ 119s] make[1]: *** [all-recursive] Error 1 [ 119s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 119s] dh_auto_build: make -j1 returned exit code 2 [ 119s] debian/rules:12: recipe for target 'build' failed [ 119s] make: *** [build] Error 2 [ 119s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 119s] [ 119s] lamb10 failed "build osmo-pcu_0.6.0.60.41d6.dsc" at Sat May 18 02:43:28 UTC 2019. [ 119s] [ 119s] ### VM INTERACTION START ### [ 122s] [ 109.565489] sysrq: SysRq : Power Off [ 122s] [ 109.573002] reboot: Power down [ 122s] ### VM INTERACTION END ### [ 122s] [ 122s] lamb10 failed "build osmo-pcu_0.6.0.60.41d6.dsc" at Sat May 18 02:43:32 UTC 2019. [ 122s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat May 18 02:46:41 2019 From: admin at opensuse.org (OBS Notification) Date: Sat, 18 May 2019 02:46:41 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in xUbuntu_18.10/x86_64 In-Reply-To: References: Message-ID: <5cdf722b7a357_58803905f8515190@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_18.10/x86_64 Package network:osmocom:nightly/osmo-pcu failed to build in xUbuntu_18.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 279s] make[2]: Entering directory '/usr/src/packages/BUILD/src' [ 279s] g++ -DPACKAGE_NAME=\"osmo-pcu\" -DPACKAGE_TARNAME=\"osmo-pcu\" -DPACKAGE_VERSION=\"0.6.0.60-41d6\" -DPACKAGE_STRING=\"osmo-pcu\ 0.6.0.60-41d6\" -DPACKAGE_BUGREPORT=\"osmocom-net-gprs at lists.osmocom.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"osmo-pcu\" -DVERSION=\"0.6.0.60-41d6\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -I. -I../include -Wall -I/usr/include/ -fno-strict-aliasing -I/usr/include/ -I/usr/include/ -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -ldl -pthread -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -c -o pcu_main.o pcu_main.cpp [ 279s] In file included from /usr/include/osmocom/gsm/gsm_utils.h:33, [ 279s] from ./pcu_l1_if.h:31, [ 279s] from pcu_main.cpp:20: [ 279s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h: In function 'osmo_gsm48_pdisc gsm48_hdr_pdisc(const gsm48_hdr*)': [ 279s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:1406:15: error: invalid conversion from 'uint8_t' {aka 'unsigned char'} to 'osmo_gsm48_pdisc' [-fpermissive] [ 279s] return hdr->proto_discr; [ 279s] ~~~~~^~~~~~~~~~~ [ 279s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:1407:9: error: invalid conversion from 'uint8_t' {aka 'unsigned char'} to 'osmo_gsm48_pdisc' [-fpermissive] [ 279s] return pdisc; [ 279s] ^~~~~ [ 279s] make[2]: *** [Makefile:821: pcu_main.o] Error 1 [ 279s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 279s] make[1]: *** [Makefile:411: all-recursive] Error 1 [ 279s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 279s] dh_auto_build: make -j1 returned exit code 2 [ 279s] make: *** [debian/rules:12: build] Error 2 [ 279s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 279s] [ 279s] lamb26 failed "build osmo-pcu_0.6.0.60.41d6.dsc" at Sat May 18 02:46:34 UTC 2019. [ 279s] [ 279s] ### VM INTERACTION START ### [ 283s] [ 268.786436] sysrq: SysRq : Power Off [ 283s] [ 268.804655] reboot: Power down [ 283s] ### VM INTERACTION END ### [ 283s] [ 283s] lamb26 failed "build osmo-pcu_0.6.0.60.41d6.dsc" at Sat May 18 02:46:38 UTC 2019. [ 283s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat May 18 02:49:32 2019 From: admin at opensuse.org (OBS Notification) Date: Sat, 18 May 2019 02:49:32 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5cdf72c628dd1_58803905f85155cd@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-pcu failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 518s] from ./gprs_bssgp_pcu.h:32, [ 518s] from gprs_bssgp_pcu.cpp:22: [ 518s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h: In function 'osmo_gsm48_pdisc gsm48_hdr_pdisc(const gsm48_hdr*)': [ 518s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:1406:15: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'osmo_gsm48_pdisc' [-fpermissive] [ 518s] return hdr->proto_discr; [ 518s] ^ [ 518s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:1407:9: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'osmo_gsm48_pdisc' [-fpermissive] [ 518s] return pdisc; [ 518s] ^ [ 518s] Makefile:791: recipe for target 'gprs_bssgp_pcu.lo' failed [ 518s] make[2]: *** [gprs_bssgp_pcu.lo] Error 1 [ 518s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 518s] Makefile:399: recipe for target 'all-recursive' failed [ 518s] make[1]: *** [all-recursive] Error 1 [ 518s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 518s] dh_auto_build: make -j1 returned exit code 2 [ 518s] debian/rules:12: recipe for target 'build' failed [ 518s] make: *** [build] Error 2 [ 518s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 518s] [ 518s] cloud123 failed "build osmo-pcu_0.6.0.60.41d6.dsc" at Sat May 18 02:49:13 UTC 2019. [ 518s] [ 518s] ### VM INTERACTION START ### [ 518s] Powering off. [ 518s] [ 466.574120] reboot: Power down [ 520s] ### VM INTERACTION END ### [ 520s] [ 520s] cloud123 failed "build osmo-pcu_0.6.0.60.41d6.dsc" at Sat May 18 02:49:16 UTC 2019. [ 520s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat May 18 03:06:24 2019 From: admin at opensuse.org (OBS Notification) Date: Sat, 18 May 2019 03:06:24 +0000 Subject: Build failure of network:osmocom:nightly/libosmo-netif in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5cdf76c0481ad_58803905f85161cb@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmo-netif/Debian_9.0/armv7l Package network:osmocom:nightly/libosmo-netif failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly libosmo-netif Last lines of build log: [ 240s] extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9576 timestamp=1681759657 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] [ 240s] extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9577 timestamp=1681759817 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] [ 240s] extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9578 timestamp=1681759977 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] [ 240s] extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9579 timestamp=1681760137 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] [ 240s] extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9580 timestamp=1681760297 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] [ 240s] extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9581 timestamp=1681760457 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] [ 240s] --- expout 2019-05-18 03:05:53.625000000 +0000 [ 240s] +++ /usr/src/packages/BUILD/tests/testsuite.dir/at-groups/2/stdout 2019-05-18 03:06:03.645000000 +0000 [ 240s] @@ -1 +1 @@ [ 240s] -OK: Test passed [ 240s] +FAIL: test did not run successfully [ 240s] ./testsuite.at:14: exit code was 1, expected 0 [ 240s] 2. testsuite.at:11: 2. osmux_test (testsuite.at:11): FAILED (testsuite.at:14) [ 240s] debian/rules:27: recipe for target 'override_dh_auto_test' failed [ 240s] make[1]: *** [override_dh_auto_test] Error 1 [ 240s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 240s] debian/rules:13: recipe for target 'build' failed [ 240s] make: *** [build] Error 2 [ 240s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 240s] [ 240s] armbuild24 failed "build libosmo-netif_0.5.0.dsc" at Sat May 18 03:06:07 UTC 2019. [ 240s] [ 240s] ### VM INTERACTION START ### [ 242s] [ 222.004032] sysrq: SysRq : Power Off [ 242s] [ 222.033382] reboot: Power down [ 243s] ### VM INTERACTION END ### [ 243s] [ 243s] armbuild24 failed "build libosmo-netif_0.5.0.dsc" at Sat May 18 03:06:11 UTC 2019. [ 243s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat May 18 05:15:16 2019 From: admin at opensuse.org (OBS Notification) Date: Sat, 18 May 2019 05:15:16 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5cdf94fa92003_58803905f8527774@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_9.0/armv7l Package network:osmocom:nightly/osmo-pcu failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 242s] from ./gprs_bssgp_pcu.h:32, [ 242s] from gprs_bssgp_pcu.cpp:22: [ 242s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h: In function 'osmo_gsm48_pdisc gsm48_hdr_pdisc(const gsm48_hdr*)': [ 242s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:1406:15: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'osmo_gsm48_pdisc' [-fpermissive] [ 242s] return hdr->proto_discr; [ 242s] ~~~~~^~~~~~~~~~~ [ 242s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:1407:9: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'osmo_gsm48_pdisc' [-fpermissive] [ 242s] return pdisc; [ 242s] ^~~~~ [ 243s] Makefile:803: recipe for target 'gprs_bssgp_pcu.lo' failed [ 243s] make[2]: *** [gprs_bssgp_pcu.lo] Error 1 [ 243s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 243s] Makefile:411: recipe for target 'all-recursive' failed [ 243s] make[1]: *** [all-recursive] Error 1 [ 243s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 243s] dh_auto_build: make -j1 returned exit code 2 [ 243s] debian/rules:12: recipe for target 'build' failed [ 243s] make: *** [build] Error 2 [ 243s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 243s] [ 243s] obs-arm-6 failed "build osmo-pcu_0.6.0.60.41d6.dsc" at Sat May 18 05:15:12 UTC 2019. [ 243s] [ 243s] ### VM INTERACTION START ### [ 246s] [ 219.598684] sysrq: SysRq : Power Off [ 246s] [ 219.620611] reboot: Power down [ 246s] ### VM INTERACTION END ### [ 246s] [ 246s] obs-arm-6 failed "build osmo-pcu_0.6.0.60.41d6.dsc" at Sat May 18 05:15:15 UTC 2019. [ 246s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat May 18 05:27:33 2019 From: admin at opensuse.org (OBS Notification) Date: Sat, 18 May 2019 05:27:33 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in Raspbian_9.0/armv7l In-Reply-To: References: Message-ID: <5cdf97cada78a_58803905f8528743@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Raspbian_9.0/armv7l Package network:osmocom:nightly/osmo-pcu failed to build in Raspbian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 123s] from ./gprs_bssgp_pcu.h:32, [ 123s] from gprs_bssgp_pcu.cpp:22: [ 123s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h: In function 'osmo_gsm48_pdisc gsm48_hdr_pdisc(const gsm48_hdr*)': [ 123s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:1406:15: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'osmo_gsm48_pdisc' [-fpermissive] [ 123s] return hdr->proto_discr; [ 123s] ~~~~~^~~~~~~~~~~ [ 123s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:1407:9: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'osmo_gsm48_pdisc' [-fpermissive] [ 123s] return pdisc; [ 123s] ^~~~~ [ 124s] Makefile:803: recipe for target 'gprs_bssgp_pcu.lo' failed [ 124s] make[2]: *** [gprs_bssgp_pcu.lo] Error 1 [ 124s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 124s] Makefile:411: recipe for target 'all-recursive' failed [ 124s] make[1]: *** [all-recursive] Error 1 [ 124s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 124s] dh_auto_build: make -j1 returned exit code 2 [ 124s] debian/rules:12: recipe for target 'build' failed [ 124s] make: *** [build] Error 2 [ 124s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 124s] [ 124s] armbuild26 failed "build osmo-pcu_0.6.0.60.41d6.dsc" at Sat May 18 05:27:28 UTC 2019. [ 124s] [ 124s] ### VM INTERACTION START ### [ 127s] [ 105.261935] sysrq: SysRq : Power Off [ 127s] [ 105.263291] reboot: Power down [ 127s] ### VM INTERACTION END ### [ 127s] [ 127s] armbuild26 failed "build osmo-pcu_0.6.0.60.41d6.dsc" at Sat May 18 05:27:31 UTC 2019. [ 127s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Sat May 18 09:08:51 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 May 2019 09:08:51 +0000 Subject: Change in libosmocore[master]: Revert "Change GSM48_PDISC_* to enum type" Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14080 Change subject: Revert "Change GSM48_PDISC_* to enum type" ...................................................................... Revert "Change GSM48_PDISC_* to enum type" This reverts commit ece1d8509d5c5af7a60ab5e1a5dddade1b181dc9 which causes build failures due to compile warnings everywhere. Change-Id: Ic131439ea206a0b0f57968ef701667da73711b51 --- M include/osmocom/gsm/protocol/gsm_04_08.h 1 file changed, 18 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/80/14080/1 diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index 767af8d..16910c3 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -1370,32 +1370,30 @@ } __attribute__((packed)); /* Section 10.2 + GSM 04.07 12.2.3.1.1 + 3GPP TS 24.007 11.2.3.1.1 */ -enum osmo_gsm48_pdisc { - GSM48_PDISC_GROUP_CC = 0x00, - GSM48_PDISC_BCAST_CC = 0x01, - GSM48_PDISC_PDSS1 = 0x02, /* 04.07 only */ - GSM48_PDISC_CC = 0x03, - GSM48_PDISC_PDSS2 = 0x04, /* 04.07 only */ - GSM48_PDISC_GTTP = 0x04, /* 24.007 only */ - GSM48_PDISC_MM = 0x05, - GSM48_PDISC_RR = 0x06, - GSM48_PDISC_MM_GPRS = 0x08, - GSM48_PDISC_SMS = 0x09, - GSM48_PDISC_SM_GPRS = 0x0a, - GSM48_PDISC_NC_SS = 0x0b, - GSM48_PDISC_LOC = 0x0c, - GSM48_PDISC_EXTEND = 0x0e, - GSM48_PDISC_TEST = 0x0f, /* as per 11.10, 04.14 */ - GSM48_PDISC_MASK = 0x0f, -}; +#define GSM48_PDISC_GROUP_CC 0x00 +#define GSM48_PDISC_BCAST_CC 0x01 +#define GSM48_PDISC_PDSS1 0x02 /* 04.07 only */ +#define GSM48_PDISC_CC 0x03 +#define GSM48_PDISC_PDSS2 0x04 /* 04.07 only */ +#define GSM48_PDISC_GTTP 0x04 /* 24.007 only */ +#define GSM48_PDISC_MM 0x05 +#define GSM48_PDISC_RR 0x06 +#define GSM48_PDISC_MM_GPRS 0x08 +#define GSM48_PDISC_SMS 0x09 +#define GSM48_PDISC_SM_GPRS 0x0a +#define GSM48_PDISC_NC_SS 0x0b +#define GSM48_PDISC_LOC 0x0c +#define GSM48_PDISC_EXTEND 0x0e +#define GSM48_PDISC_TEST 0x0f /* as per 11.10, 04.14 */ +#define GSM48_PDISC_MASK 0x0f extern const struct value_string gsm48_pdisc_names[]; -static inline const char *gsm48_pdisc_name(enum osmo_gsm48_pdisc val) +static inline const char *gsm48_pdisc_name(uint8_t val) { return get_value_string(gsm48_pdisc_names, val); } bool gsm48_hdr_gmm_cipherable(const struct gsm48_hdr *hdr); -static inline enum osmo_gsm48_pdisc gsm48_hdr_pdisc(const struct gsm48_hdr *hdr) +static inline uint8_t gsm48_hdr_pdisc(const struct gsm48_hdr *hdr) { /* * 3GPP TS 24.007 version 12.0.0 Release 12, -- To view, visit https://gerrit.osmocom.org/14080 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ic131439ea206a0b0f57968ef701667da73711b51 Gerrit-Change-Number: 14080 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 18 09:09:06 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 May 2019 09:09:06 +0000 Subject: Change in libosmocore[master]: Revert "Change GSM48_PDISC_* to enum type" In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14080 ) Change subject: Revert "Change GSM48_PDISC_* to enum type" ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14080 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic131439ea206a0b0f57968ef701667da73711b51 Gerrit-Change-Number: 14080 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Sat, 18 May 2019 09:09:06 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 18 09:09:07 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 May 2019 09:09:07 +0000 Subject: Change in libosmocore[master]: Revert "Change GSM48_PDISC_* to enum type" In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14080 ) Change subject: Revert "Change GSM48_PDISC_* to enum type" ...................................................................... Revert "Change GSM48_PDISC_* to enum type" This reverts commit ece1d8509d5c5af7a60ab5e1a5dddade1b181dc9 which causes build failures due to compile warnings everywhere. Change-Id: Ic131439ea206a0b0f57968ef701667da73711b51 --- M include/osmocom/gsm/protocol/gsm_04_08.h 1 file changed, 18 insertions(+), 20 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index 767af8d..16910c3 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -1370,32 +1370,30 @@ } __attribute__((packed)); /* Section 10.2 + GSM 04.07 12.2.3.1.1 + 3GPP TS 24.007 11.2.3.1.1 */ -enum osmo_gsm48_pdisc { - GSM48_PDISC_GROUP_CC = 0x00, - GSM48_PDISC_BCAST_CC = 0x01, - GSM48_PDISC_PDSS1 = 0x02, /* 04.07 only */ - GSM48_PDISC_CC = 0x03, - GSM48_PDISC_PDSS2 = 0x04, /* 04.07 only */ - GSM48_PDISC_GTTP = 0x04, /* 24.007 only */ - GSM48_PDISC_MM = 0x05, - GSM48_PDISC_RR = 0x06, - GSM48_PDISC_MM_GPRS = 0x08, - GSM48_PDISC_SMS = 0x09, - GSM48_PDISC_SM_GPRS = 0x0a, - GSM48_PDISC_NC_SS = 0x0b, - GSM48_PDISC_LOC = 0x0c, - GSM48_PDISC_EXTEND = 0x0e, - GSM48_PDISC_TEST = 0x0f, /* as per 11.10, 04.14 */ - GSM48_PDISC_MASK = 0x0f, -}; +#define GSM48_PDISC_GROUP_CC 0x00 +#define GSM48_PDISC_BCAST_CC 0x01 +#define GSM48_PDISC_PDSS1 0x02 /* 04.07 only */ +#define GSM48_PDISC_CC 0x03 +#define GSM48_PDISC_PDSS2 0x04 /* 04.07 only */ +#define GSM48_PDISC_GTTP 0x04 /* 24.007 only */ +#define GSM48_PDISC_MM 0x05 +#define GSM48_PDISC_RR 0x06 +#define GSM48_PDISC_MM_GPRS 0x08 +#define GSM48_PDISC_SMS 0x09 +#define GSM48_PDISC_SM_GPRS 0x0a +#define GSM48_PDISC_NC_SS 0x0b +#define GSM48_PDISC_LOC 0x0c +#define GSM48_PDISC_EXTEND 0x0e +#define GSM48_PDISC_TEST 0x0f /* as per 11.10, 04.14 */ +#define GSM48_PDISC_MASK 0x0f extern const struct value_string gsm48_pdisc_names[]; -static inline const char *gsm48_pdisc_name(enum osmo_gsm48_pdisc val) +static inline const char *gsm48_pdisc_name(uint8_t val) { return get_value_string(gsm48_pdisc_names, val); } bool gsm48_hdr_gmm_cipherable(const struct gsm48_hdr *hdr); -static inline enum osmo_gsm48_pdisc gsm48_hdr_pdisc(const struct gsm48_hdr *hdr) +static inline uint8_t gsm48_hdr_pdisc(const struct gsm48_hdr *hdr) { /* * 3GPP TS 24.007 version 12.0.0 Release 12, -- To view, visit https://gerrit.osmocom.org/14080 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ic131439ea206a0b0f57968ef701667da73711b51 Gerrit-Change-Number: 14080 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 18 09:09:11 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 18 May 2019 09:09:11 +0000 Subject: Change in libosmocore[master]: pseudotalloc: turn talloc_steal() into #define In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14079 ) Change subject: pseudotalloc: turn talloc_steal() into #define ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14079 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1ee7f5e9b1002cff37bb8341ad870e1da5f1f9ff Gerrit-Change-Number: 14079 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sat, 18 May 2019 09:09:11 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 18 10:28:13 2019 From: gerrit-no-reply at lists.osmocom.org (Keith Whyte) Date: Sat, 18 May 2019 10:28:13 +0000 Subject: Change in osmo-sgsn[master]: libgtp: don't call sgsn_pdp_ctx_free() with NULL pdp In-Reply-To: References: Message-ID: Hello lynxis lazus, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13929 to look at the new patch set (#3). Change subject: libgtp: don't call sgsn_pdp_ctx_free() with NULL pdp ...................................................................... libgtp: don't call sgsn_pdp_ctx_free() with NULL pdp In [osmo-ggsn]:gtp.c:gtp_delete_pdp_conf(): When the condition pdp_getgtp1(&pdp, get_tei(pack)) returns true we then call gsn->cb_conf(type, EOF, NULL, cbp); This NULL pdp will cause a crash later in delete_pdp_conf() sgsn_pdp_ctx_free() rate_ctr_group_free() So just return on NULL pdp to prevent this crash. Related: OS#3956 Change-Id: I184dcce27b26104c61d80b2d910388d5d3323def --- M src/gprs/sgsn_libgtp.c 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/29/13929/3 -- To view, visit https://gerrit.osmocom.org/13929 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I184dcce27b26104c61d80b2d910388d5d3323def Gerrit-Change-Number: 13929 Gerrit-PatchSet: 3 Gerrit-Owner: Keith Whyte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Keith Whyte Gerrit-Reviewer: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 18 11:05:09 2019 From: gerrit-no-reply at lists.osmocom.org (Keith Whyte) Date: Sat, 18 May 2019 11:05:09 +0000 Subject: Change in osmo-sgsn[master]: libgtp: don't call sgsn_pdp_ctx_free() with NULL pdp In-Reply-To: References: Message-ID: Hello lynxis lazus, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13929 to look at the new patch set (#4). Change subject: libgtp: don't call sgsn_pdp_ctx_free() with NULL pdp ...................................................................... libgtp: don't call sgsn_pdp_ctx_free() with NULL pdp In [osmo-ggsn]:gtp.c:gtp_delete_pdp_conf(): When the condition pdp_getgtp1(&pdp, get_tei(pack)) returns EOF we then call gsn->cb_conf(type, EOF, NULL, cbp); This NULL pdp will cause a crash later in delete_pdp_conf() sgsn_pdp_ctx_free() rate_ctr_group_free() So just return right away from delete_pdp_conf() on NULL pdp to prevent this crash. Related: OS#3956 Change-Id: I184dcce27b26104c61d80b2d910388d5d3323def --- M src/gprs/sgsn_libgtp.c 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/29/13929/4 -- To view, visit https://gerrit.osmocom.org/13929 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I184dcce27b26104c61d80b2d910388d5d3323def Gerrit-Change-Number: 13929 Gerrit-PatchSet: 4 Gerrit-Owner: Keith Whyte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Keith Whyte Gerrit-Reviewer: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 18 13:52:43 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 18 May 2019 13:52:43 +0000 Subject: Change in osmo-sgsn[master]: libgtp: don't call sgsn_pdp_ctx_free() with NULL pdp In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13929 ) Change subject: libgtp: don't call sgsn_pdp_ctx_free() with NULL pdp ...................................................................... Patch Set 4: (1 comment) https://gerrit.osmocom.org/#/c/13929/4/src/gprs/sgsn_libgtp.c File src/gprs/sgsn_libgtp.c: https://gerrit.osmocom.org/#/c/13929/4/src/gprs/sgsn_libgtp.c at 550 PS4, Line 550: pdp Newline is missing here. Also, is it a normal and expected event in general? If not, we should use LOGL_NOTICE, or even LOGL_ERROR. -- To view, visit https://gerrit.osmocom.org/13929 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I184dcce27b26104c61d80b2d910388d5d3323def Gerrit-Change-Number: 13929 Gerrit-PatchSet: 4 Gerrit-Owner: Keith Whyte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Keith Whyte Gerrit-Reviewer: lynxis lazus Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Sat, 18 May 2019 13:52:43 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 18 14:50:15 2019 From: gerrit-no-reply at lists.osmocom.org (Keith Whyte) Date: Sat, 18 May 2019 14:50:15 +0000 Subject: Change in osmo-sgsn[master]: libgtp: don't call sgsn_pdp_ctx_free() with NULL pdp In-Reply-To: References: Message-ID: Keith Whyte has posted comments on this change. ( https://gerrit.osmocom.org/13929 ) Change subject: libgtp: don't call sgsn_pdp_ctx_free() with NULL pdp ...................................................................... Patch Set 4: (1 comment) https://gerrit.osmocom.org/#/c/13929/4/src/gprs/sgsn_libgtp.c File src/gprs/sgsn_libgtp.c: https://gerrit.osmocom.org/#/c/13929/4/src/gprs/sgsn_libgtp.c at 550 PS4, Line 550: pdp > Newline is missing here. [?] Ah Yes, I already did both these things locally after noticing when running.. just didn't push it.. Any comments on the value or not of avoiding the crash this way? thanks! -- To view, visit https://gerrit.osmocom.org/13929 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I184dcce27b26104c61d80b2d910388d5d3323def Gerrit-Change-Number: 13929 Gerrit-PatchSet: 4 Gerrit-Owner: Keith Whyte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Keith Whyte Gerrit-Reviewer: lynxis lazus Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Sat, 18 May 2019 14:50:15 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 18 14:54:39 2019 From: gerrit-no-reply at lists.osmocom.org (Keith Whyte) Date: Sat, 18 May 2019 14:54:39 +0000 Subject: Change in osmo-sgsn[master]: libgtp: don't call sgsn_pdp_ctx_free() with NULL pdp In-Reply-To: References: Message-ID: Hello lynxis lazus, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13929 to look at the new patch set (#5). Change subject: libgtp: don't call sgsn_pdp_ctx_free() with NULL pdp ...................................................................... libgtp: don't call sgsn_pdp_ctx_free() with NULL pdp In [osmo-ggsn]:gtp.c:gtp_delete_pdp_conf(): When the condition pdp_getgtp1(&pdp, get_tei(pack)) returns EOF we then call gsn->cb_conf(type, EOF, NULL, cbp); This NULL pdp will cause a crash later in delete_pdp_conf() sgsn_pdp_ctx_free() rate_ctr_group_free() So just return right away from delete_pdp_conf() on NULL pdp to prevent this crash. Related: OS#3956 Change-Id: I184dcce27b26104c61d80b2d910388d5d3323def --- M src/gprs/sgsn_libgtp.c 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/29/13929/5 -- To view, visit https://gerrit.osmocom.org/13929 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I184dcce27b26104c61d80b2d910388d5d3323def Gerrit-Change-Number: 13929 Gerrit-PatchSet: 5 Gerrit-Owner: Keith Whyte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Keith Whyte Gerrit-Reviewer: lynxis lazus Gerrit-CC: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 18 19:02:04 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 18 May 2019 19:02:04 +0000 Subject: Change in osmo-ggsn[master]: osmo-ggsn: properly show subscriber's MSISDN in the VTY Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14081 Change subject: osmo-ggsn: properly show subscriber's MSISDN in the VTY ...................................................................... osmo-ggsn: properly show subscriber's MSISDN in the VTY Instead of printing subscriber's MSISDN as a hex-string, let's attempt to decode it using gsm48_decode_bcd_number2(). Change-Id: I3f3a105dc8d0d582f2b9d8e1ff6c5785369e569b --- M ggsn/ggsn_vty.c 1 file changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/81/14081/1 diff --git a/ggsn/ggsn_vty.c b/ggsn/ggsn_vty.c index 214e2fa..c6dc0d9 100644 --- a/ggsn/ggsn_vty.c +++ b/ggsn/ggsn_vty.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -736,9 +737,14 @@ struct in46_addr eua46; char name_buf[256]; char *apn_name; + int rc; + + /* Attempt to decode MSISDN */ + rc = gsm48_decode_bcd_number2(name_buf, sizeof(name_buf), + pdp->msisdn.v, pdp->msisdn.l, 0); vty_out(vty, "IMSI: %s, NSAPI: %u, MSISDN: %s%s", imsi_gtp2str(&pdp->imsi), pdp->nsapi, - osmo_hexdump_nospc(pdp->msisdn.v, pdp->msisdn.l), VTY_NEWLINE); + rc ? "(NONE)" : name_buf, VTY_NEWLINE); vty_out(vty, " Control: %s:%08x ", print_gsnaddr(&pdp->gsnlc), pdp->teic_own); vty_out(vty, "<-> %s:%08x%s", print_gsnaddr(&pdp->gsnrc), pdp->teic_gn, VTY_NEWLINE); -- To view, visit https://gerrit.osmocom.org/14081 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I3f3a105dc8d0d582f2b9d8e1ff6c5785369e569b Gerrit-Change-Number: 14081 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Sun May 19 02:46:51 2019 From: admin at opensuse.org (OBS Notification) Date: Sun, 19 May 2019 02:46:51 +0000 Subject: Build failure of network:osmocom:nightly/libosmo-netif in xUbuntu_18.04/x86_64 In-Reply-To: References: Message-ID: <5ce0c3b224c08_58803905f87038fa@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmo-netif/xUbuntu_18.04/x86_64 Package network:osmocom:nightly/libosmo-netif failed to build in xUbuntu_18.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly libosmo-netif Last lines of build log: [ 195s] +non-reconnecting test step 0 [client OK, server OK], FD reg 1 [ 195s] --- expout 2019-05-19 02:46:21.764000000 +0000 [ 195s] +++ /usr/src/packages/BUILD/tests/testsuite.dir/at-groups/1/stdout 2019-05-19 02:46:30.780000000 +0000 [ 195s] @@ -44,8 +44,6 @@ [ 195s] [OK|OK] Server's read_cb_srv(): received 29(29) bytes: 44 6f 68 2c 20 72 65 73 70 6f 6e 64 69 6e 67 20 74 6f 20 73 65 72 76 65 72 20 3a 2d 44 [ 195s] [OK|OK] Server's read_cb_srv(): sent 11 bytes message: 72 65 61 64 5f 63 62 5f 73 72 76 [ 195s] [OK|OK] Server's read_cb_srv(): force client disconnect on subsequent call [ 195s] -[OK] Client's read_cb_cli(): callback triggered [ 195s] -[OK] Client's read_cb_cli(): 0-byte read, auto-reconnect will be triggered if enabled [ 195s] non-reconnecting test complete. [ 195s] [ 195s] Stream tests completed [ 195s] 1. testsuite.at:4: 1. stream_test (testsuite.at:4): FAILED (testsuite.at:8) [ 195s] debian/rules:27: recipe for target 'override_dh_auto_test' failed [ 195s] make[1]: *** [override_dh_auto_test] Error 1 [ 195s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 195s] debian/rules:13: recipe for target 'build' failed [ 195s] make: *** [build] Error 2 [ 195s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 195s] [ 195s] lamb27 failed "build libosmo-netif_0.5.0.dsc" at Sun May 19 02:46:32 UTC 2019. [ 195s] [ 195s] ### VM INTERACTION START ### [ 199s] [ 186.261262] sysrq: SysRq : Power Off [ 199s] [ 186.267774] reboot: Power down [ 199s] ### VM INTERACTION END ### [ 199s] [ 199s] lamb27 failed "build libosmo-netif_0.5.0.dsc" at Sun May 19 02:46:36 UTC 2019. [ 199s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Sun May 19 07:13:41 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:13:41 +0000 Subject: Change in osmo-ggsn[master]: osmo-ggsn: properly show subscriber's MSISDN in the VTY In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14081 ) Change subject: osmo-ggsn: properly show subscriber's MSISDN in the VTY ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14081 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I3f3a105dc8d0d582f2b9d8e1ff6c5785369e569b Gerrit-Change-Number: 14081 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 19 May 2019 07:13:41 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:14:13 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:14:13 +0000 Subject: Change in libosmocore[master]: pseudotalloc: turn talloc_steal() into #define In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14079 ) Change subject: pseudotalloc: turn talloc_steal() into #define ...................................................................... pseudotalloc: turn talloc_steal() into #define Any non-anciant version of talloc implements talloc_steal() as a #define using the _talloc_steal_loc() symbol. Let's be more compatible. This fix is relevant to using osmo_fsm inside the osmo-ccid-firmware builds for Cortex-M4. In this situation, for some strange reason, libosmcoore is compiled using src/pseudotalloc/talloc.h, but later then linked against the real libtalloc. Change-Id: I1ee7f5e9b1002cff37bb8341ad870e1da5f1f9ff --- M src/pseudotalloc/pseudotalloc.c M src/pseudotalloc/talloc.h 2 files changed, 3 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/pseudotalloc/pseudotalloc.c b/src/pseudotalloc/pseudotalloc.c index 89e6269..c368296 100644 --- a/src/pseudotalloc/pseudotalloc.c +++ b/src/pseudotalloc/pseudotalloc.c @@ -97,7 +97,7 @@ return buf; } -void *talloc_steal(const void *new_ctx, const void *obj) +void *_talloc_steal_loc(const void *new_ctx, const void *obj, const char *location) { /* as we don't do hierarchical allocations, this is simply a NOP */ return (void *)obj; diff --git a/src/pseudotalloc/talloc.h b/src/pseudotalloc/talloc.h index 34088af..fe2efbc 100644 --- a/src/pseudotalloc/talloc.h +++ b/src/pseudotalloc/talloc.h @@ -60,5 +60,6 @@ const char *name); char *talloc_asprintf(const void *ctx, const char *fmt, ...); -void *talloc_steal(const void *new_ctx, const void *obj); +#define talloc_steal(ctx, ptr) _talloc_steal_loc((ctx), (ptr), __location__) +void *_talloc_steal_loc(const void *new_ctx, const void *obj, const char *location); char *talloc_vasprintf(const void *t, const char *fmt, va_list ap); -- To view, visit https://gerrit.osmocom.org/14079 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I1ee7f5e9b1002cff37bb8341ad870e1da5f1f9ff Gerrit-Change-Number: 14079 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:14:38 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:14:38 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Allow submitting X-Osmux on CRCX request In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14025 ) Change subject: mgcp-cli: Allow submitting X-Osmux on CRCX request ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14025 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I73b4c62baf39050da81d65553cbea07bc51163de Gerrit-Change-Number: 14025 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 19 May 2019 07:14:38 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:14:56 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:14:56 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Parse X-Osmux on CRCX response In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14026 ) Change subject: mgcp-cli: Parse X-Osmux on CRCX response ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14026 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6174d092b7425b8d3d6d02a55bf294be3e710e6a Gerrit-Change-Number: 14026 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 19 May 2019 07:14:56 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:15:14 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:15:14 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Parse X-Osmux on MDCX response In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14029 ) Change subject: mgcp-cli: Parse X-Osmux on MDCX response ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14029 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If182a48743ebe03f97caf9034e49b9947014bdf9 Gerrit-Change-Number: 14029 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Sun, 19 May 2019 07:15:14 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:15:36 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:15:36 +0000 Subject: Change in osmo-mgw[master]: osmux: Drop unneeded OSMUX_STATE_NEGOTIATING In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14030 ) Change subject: osmux: Drop unneeded OSMUX_STATE_NEGOTIATING ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14030 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I94e7df3287d037975adc16c5ada05adf94269ead Gerrit-Change-Number: 14030 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 19 May 2019 07:15:36 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:15:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:15:47 +0000 Subject: Change in osmo-mgw[master]: vty: Allow enabling Osmux In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14021 ) Change subject: vty: Allow enabling Osmux ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14021 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ica2f82473bf1934502444be2325ee2049d938781 Gerrit-Change-Number: 14021 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Sun, 19 May 2019 07:15:47 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:15:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:15:53 +0000 Subject: Change in osmo-mgw[master]: vty: Allow enabling Osmux In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14021 ) Change subject: vty: Allow enabling Osmux ...................................................................... vty: Allow enabling Osmux Change-Id: Ica2f82473bf1934502444be2325ee2049d938781 --- M src/libosmo-mgcp/mgcp_vty.c 1 file changed, 2 insertions(+), 9 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 25d7a67..06aa7c8 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -1305,14 +1305,7 @@ if (strcmp(argv[0], "off") == 0) { g_cfg->osmux = OSMUX_USAGE_OFF; return CMD_SUCCESS; - } - - /* Since OSMUX support is not finished, we do not - * allow to turn it on yet. */ - vty_out(vty, "OSMUX currently unavailable in this software version.%s", VTY_NEWLINE); - return CMD_WARNING; -#if 0 - if (strcmp(argv[0], "on") == 0) + } else if (strcmp(argv[0], "on") == 0) g_cfg->osmux = OSMUX_USAGE_ON; else if (strcmp(argv[0], "only") == 0) g_cfg->osmux = OSMUX_USAGE_ONLY; @@ -1323,7 +1316,7 @@ } return CMD_SUCCESS; -#endif + } DEFUN(cfg_mgcp_osmux_ip, -- To view, visit https://gerrit.osmocom.org/14021 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ica2f82473bf1934502444be2325ee2049d938781 Gerrit-Change-Number: 14021 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:15:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:15:53 +0000 Subject: Change in osmo-mgw[master]: osmux: Allocate CID during CRCX In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14022 ) Change subject: osmux: Allocate CID during CRCX ...................................................................... osmux: Allocate CID during CRCX Change-Id: Ie0e1835ff7e99421de9a5741a5eb57a11c004f7e --- M src/libosmo-mgcp/mgcp_msg.c M src/libosmo-mgcp/mgcp_protocol.c 2 files changed, 15 insertions(+), 6 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c index 5dae5a2..a31bff4 100644 --- a/src/libosmo-mgcp/mgcp_msg.c +++ b/src/libosmo-mgcp/mgcp_msg.c @@ -354,21 +354,27 @@ /*! Extract OSMUX CID from an MGCP parameter line (string). * \param[in] line single parameter line from the MGCP message - * \returns OSMUX CID, -1 on error */ + * \returns OSMUX CID, -1 wildcard, -2 on error */ int mgcp_parse_osmux_cid(const char *line) { int osmux_cid; + + if (strstr(line + 2, "Osmux: *")) { + LOGP(DLMGCP, LOGL_DEBUG, "Parsed wilcard Osmux CID\n"); + return -1; + } + if (sscanf(line + 2, "Osmux: %u", &osmux_cid) != 1) { LOGP(DLMGCP, LOGL_ERROR, "Failed parsing Osmux in MGCP msg line: %s\n", line); - return -1; + return -2; } if (osmux_cid > OSMUX_CID_MAX) { LOGP(DLMGCP, LOGL_ERROR, "Osmux ID too large: %u > %u\n", osmux_cid, OSMUX_CID_MAX); - return -1; + return -2; } LOGP(DLMGCP, LOGL_DEBUG, "bsc-nat offered Osmux CID %u\n", osmux_cid); diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 807e34a..0ec9c78 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -783,7 +783,7 @@ const char *callid = NULL; const char *mode = NULL; char *line; - int have_sdp = 0, osmux_cid = -1; + int have_sdp = 0, osmux_cid = -2; struct mgcp_conn_rtp *conn = NULL; struct mgcp_conn *_conn = NULL; char conn_name[512]; @@ -917,9 +917,12 @@ /* Annotate Osmux circuit ID and set it to negotiating state until this * is fully set up from the dummy load. */ conn->osmux.state = OSMUX_STATE_DISABLED; - if (osmux_cid >= 0) { - conn->osmux.cid = osmux_cid; + if (osmux_cid >= -1) { /* -1 is wilcard, alloc next avail CID */ conn->osmux.state = OSMUX_STATE_NEGOTIATING; + if (conn_osmux_allocate_cid(conn, osmux_cid) == -1) { + rate_ctr_inc(&rate_ctrs->ctr[MGCP_CRCX_FAIL_NO_OSMUX]); + goto error2; + } } else if (endp->cfg->osmux == OSMUX_USAGE_ONLY) { LOGPCONN(_conn, DLMGCP, LOGL_ERROR, "CRCX: osmux only and no osmux offered\n"); -- To view, visit https://gerrit.osmocom.org/14022 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie0e1835ff7e99421de9a5741a5eb57a11c004f7e Gerrit-Change-Number: 14022 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:15:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:15:53 +0000 Subject: Change in osmo-mgw[master]: osmux: Introduce mgcp_conn_rtp_is_osmux() helper In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14023 ) Change subject: osmux: Introduce mgcp_conn_rtp_is_osmux() helper ...................................................................... osmux: Introduce mgcp_conn_rtp_is_osmux() helper This is going to be useful to know if a conn is to use Osmux without looking at implementation details. Currently we have some duplicated information (type, osmux.state, etc.) which we may want to refactor later. This will allow changing implementation details without caring much about rest of code. Change-Id: Ib5a239fdbc319bcb16317f5e959d9a724b7a444a --- M include/osmocom/mgcp/mgcp_internal.h 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index 82ff6c8..e9d5d2d 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -312,6 +312,11 @@ int mgcp_set_ip_tos(int fd, int tos); +/* Was conn configured to handle Osmux? */ +static inline bool mgcp_conn_rtp_is_osmux(const struct mgcp_conn_rtp *conn) { + return conn->type == MGCP_OSMUX_BSC || conn->type == MGCP_OSMUX_BSC_NAT; +} + enum { MGCP_DEST_NET = 0, MGCP_DEST_BTS, -- To view, visit https://gerrit.osmocom.org/14023 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ib5a239fdbc319bcb16317f5e959d9a724b7a444a Gerrit-Change-Number: 14023 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:15:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:15:53 +0000 Subject: Change in osmo-mgw[master]: osmux: Mark conn_rtp->type as osmux during CRCX In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14024 ) Change subject: osmux: Mark conn_rtp->type as osmux during CRCX ...................................................................... osmux: Mark conn_rtp->type as osmux during CRCX We also update code to allow setting up RTP related fields to succeed during CRCX. We also update code to allow setting up RTP related fields to succeed during CRCX. Change-Id: Ia6e723d9a28ba38fc3382a4fb35ea6e5bab30c09 --- M src/libosmo-mgcp/mgcp_osmux.c M src/libosmo-mgcp/mgcp_protocol.c 2 files changed, 2 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index d91cf68..7290ba3 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -664,6 +664,7 @@ conn->osmux.cid = (uint8_t) osmux_cid; conn->osmux.cid_allocated = true; + conn->type = MGCP_OSMUX_BSC; return osmux_cid; } diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 0ec9c78..e1bf12b 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -147,7 +147,7 @@ struct mgcp_conn_rtp *conn_dst = conn; struct mgcp_conn *_conn; - if (conn->type != MGCP_RTP_DEFAULT) { + if (conn->type != MGCP_RTP_DEFAULT && !mgcp_conn_rtp_is_osmux(conn)) { LOGPENDP(endp, DLMGCP, LOGL_NOTICE, "RTP-setup: Endpoint is not configured as RTP default, stopping here!\n"); return 0; -- To view, visit https://gerrit.osmocom.org/14024 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ia6e723d9a28ba38fc3382a4fb35ea6e5bab30c09 Gerrit-Change-Number: 14024 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:15:54 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:15:54 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Allow submitting X-Osmux on CRCX request In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14025 ) Change subject: mgcp-cli: Allow submitting X-Osmux on CRCX request ...................................................................... mgcp-cli: Allow submitting X-Osmux on CRCX request Change-Id: I73b4c62baf39050da81d65553cbea07bc51163de --- M TODO-RELEASE M include/osmocom/mgcp/mgcp_common.h M include/osmocom/mgcp_client/mgcp_client.h M include/osmocom/mgcp_client/mgcp_client_fsm.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp-client/mgcp_client_fsm.c M tests/mgcp_client/mgcp_client_test.c M tests/mgcp_client/mgcp_client_test.ok 8 files changed, 64 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/TODO-RELEASE b/TODO-RELEASE index 67a1b21..8fa535c 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -24,4 +24,5 @@ # If any interfaces have been removed or changed since the last public release, a=0. # #library what description / commit summary line -libosmo-mgcp-client add struct members AMR SDP/fmtp parameter generation \ No newline at end of file +libosmo-mgcp-client add struct members AMR SDP/fmtp parameter generation +libosmo-mgcp-client add struct members Osmux use+cid fields to struct mgcp_msg and mgcp_conn_peer diff --git a/include/osmocom/mgcp/mgcp_common.h b/include/osmocom/mgcp/mgcp_common.h index 75d5a37..a1bbb19 100644 --- a/include/osmocom/mgcp/mgcp_common.h +++ b/include/osmocom/mgcp/mgcp_common.h @@ -50,6 +50,7 @@ }; #define MGCP_X_OSMO_IGN_HEADER "X-Osmo-IGN:" +#define MGCP_X_OSMO_OSMUX_HEADER "X-Osmux:" /* Values should be bitwise-OR-able */ enum mgcp_x_osmo_ign { diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index 9b57f10..be84356 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -95,6 +95,7 @@ #define MGCP_MSG_PRESENCE_AUDIO_IP 0x0008 #define MGCP_MSG_PRESENCE_AUDIO_PORT 0x0010 #define MGCP_MSG_PRESENCE_CONN_MODE 0x0020 +#define MGCP_MSG_PRESENCE_X_OSMO_OSMUX_CID 0x4000 #define MGCP_MSG_PRESENCE_X_OSMO_IGN 0x8000 struct mgcp_msg { @@ -113,6 +114,8 @@ 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; }; diff --git a/include/osmocom/mgcp_client/mgcp_client_fsm.h b/include/osmocom/mgcp_client/mgcp_client_fsm.h index e170a25..c763d74 100644 --- a/include/osmocom/mgcp_client/mgcp_client_fsm.h +++ b/include/osmocom/mgcp_client/mgcp_client_fsm.h @@ -48,6 +48,11 @@ * name than the BSC. An OsmoMGW will then ignore these and not fail on mismatches. */ uint32_t x_osmo_ign; + /*! send 'X-Osmux: %d' header (or "*" as wildcard). */ + bool x_osmo_osmux_use; + /*! -1 means send wildcard. */ + int x_osmo_osmux_cid; + /*! If left MGCP_CONN_NONE, use MGCP_CONN_RECV_ONLY or MGCP_CONN_RECV_SEND, depending on whether an audio RTP * address is set. If != MGCP_CONN_NONE, force this conn mode. */ enum mgcp_connection_mode conn_mode; diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index c28f5d2..bbef9ef 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -1104,6 +1104,7 @@ int rc = 0; int rc_sdp; bool use_sdp = false; + char buf[32]; msg->l2h = msg->data; msg->cb[MSGB_CB_MGCP_TRANS_ID] = trans_id; @@ -1207,6 +1208,15 @@ msgb_printf(msg, MGCP_X_OSMO_IGN_HEADER "%s\r\n", mgcp_msg->x_osmo_ign & MGCP_X_OSMO_IGN_CALLID ? " C": ""); + /* Add X-Osmo-Osmux */ + if ((mgcp_msg->presence & MGCP_MSG_PRESENCE_X_OSMO_OSMUX_CID)) { + snprintf(buf, sizeof(buf), " %d", mgcp_msg->x_osmo_osmux_cid); + rc += + msgb_printf(msg, MGCP_X_OSMO_OSMUX_HEADER "%s\r\n", + mgcp_msg->x_osmo_osmux_cid == -1 ? " *": buf); + } + + /* Add session description protocol (SDP) */ if (use_sdp && (mgcp_msg->verb == MGCP_VERB_CRCX diff --git a/src/libosmo-mgcp-client/mgcp_client_fsm.c b/src/libosmo-mgcp-client/mgcp_client_fsm.c index 75d583b..0d16720 100644 --- a/src/libosmo-mgcp-client/mgcp_client_fsm.c +++ b/src/libosmo-mgcp-client/mgcp_client_fsm.c @@ -126,6 +126,11 @@ mgcp_msg->x_osmo_ign = info->x_osmo_ign; mgcp_msg->presence |= MGCP_MSG_PRESENCE_X_OSMO_IGN; } + + if (info->x_osmo_osmux_use) { + mgcp_msg->x_osmo_osmux_cid = info->x_osmo_osmux_cid; + mgcp_msg->presence |= MGCP_MSG_PRESENCE_X_OSMO_OSMUX_CID; + } } static void add_audio(struct mgcp_msg *mgcp_msg, struct mgcp_conn_peer *info) diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index d610783..432a09c 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -157,6 +157,7 @@ .ptmap[0].pt = 96, .ptmap_len = 1, .x_osmo_ign = MGCP_X_OSMO_IGN_CALLID, + .x_osmo_osmux_cid = -1, /* wildcard */ }; if (mgcp) @@ -254,6 +255,27 @@ msg = mgcp_msg_gen(mgcp, &mgcp_msg); printf("%s\n", (char *)msg->data); + printf("Generate X-Osmo-Osmux message:\n"); + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + mgcp_msg.verb = MGCP_VERB_CRCX; + mgcp_msg.presence = + (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | + MGCP_MSG_PRESENCE_CONN_ID | MGCP_MSG_PRESENCE_CONN_MODE + | MGCP_MSG_PRESENCE_X_OSMO_OSMUX_CID); + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + printf("%s\n", (char *)msg->data); + + printf("Generate X-Osmo-Osmux message (fixed CID 2):\n"); + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + mgcp_msg.verb = MGCP_VERB_CRCX; + mgcp_msg.x_osmo_osmux_cid = 2; + mgcp_msg.presence = + (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | + MGCP_MSG_PRESENCE_CONN_ID | MGCP_MSG_PRESENCE_CONN_MODE + | MGCP_MSG_PRESENCE_X_OSMO_OSMUX_CID); + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + printf("%s\n", (char *)msg->data); + printf("Overfolow test:\n"); mgcp_msg.verb = MGCP_VERB_MDCX; mgcp_msg.presence = diff --git a/tests/mgcp_client/mgcp_client_test.ok b/tests/mgcp_client/mgcp_client_test.ok index 65b5298..8fbe3ae 100644 --- a/tests/mgcp_client/mgcp_client_test.ok +++ b/tests/mgcp_client/mgcp_client_test.ok @@ -84,6 +84,22 @@ M: sendrecv X-Osmo-IGN: C +Generate X-Osmo-Osmux message: +CRCX 13 23 at mgw MGCP 1.0 +C: 2f +I: 11 +L: p:20, a:GSM, nt:IN +M: sendrecv +X-Osmux: * + +Generate X-Osmo-Osmux message (fixed CID 2): +CRCX 15 23 at mgw MGCP 1.0 +C: 2f +I: 11 +L: p:20, a:GSM, nt:IN +M: sendrecv +X-Osmux: 2 + Overfolow test: -- To view, visit https://gerrit.osmocom.org/14025 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I73b4c62baf39050da81d65553cbea07bc51163de Gerrit-Change-Number: 14025 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:15:54 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:15:54 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Parse X-Osmux on CRCX response In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14026 ) Change subject: mgcp-cli: Parse X-Osmux on CRCX response ...................................................................... mgcp-cli: Parse X-Osmux on CRCX response Change-Id: I6174d092b7425b8d3d6d02a55bf294be3e710e6a --- M TODO-RELEASE M include/osmocom/mgcp_client/mgcp_client.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp-client/mgcp_client_fsm.c 4 files changed, 57 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/TODO-RELEASE b/TODO-RELEASE index 8fa535c..14cb163 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -26,3 +26,4 @@ #library what description / commit summary line libosmo-mgcp-client add struct members AMR SDP/fmtp parameter generation libosmo-mgcp-client add struct members Osmux use+cid fields to struct mgcp_msg and mgcp_conn_peer +libosmo-mgcp-client add struct members Osmux use+cid fields to struct mgcp_response_head diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index be84356..32bd87b 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -67,6 +67,8 @@ 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 { diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index bbef9ef..d65a799 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -393,6 +393,40 @@ return -EINVAL; } +/*! Extract OSMUX CID from an MGCP parameter line (string). + * \param[in] line single parameter line from the MGCP message + * \returns OSMUX CID, -1 wildcard, -2 on error + * FIXME: This is a copy of function in mgcp_msg.c. Have some common.c file between both libs? + */ +static int mgcp_parse_osmux_cid(const char *line) +{ + int osmux_cid; + + + if (strstr(line + 2, "Osmux: *")) { + LOGP(DLMGCP, LOGL_DEBUG, "Parsed wilcard Osmux CID\n"); + return -1; + } + + if (sscanf(line + 2, "Osmux: %u", &osmux_cid) != 1) { + LOGP(DLMGCP, LOGL_ERROR, "Failed parsing Osmux in MGCP msg line: %s\n", + line); + return -2; + } + +#ifndef OSMUX_CID_MAX +#define OSMUX_CID_MAX 255 /* FIXME: use OSMUX_CID_MAX from libosmo-netif? */ +#endif + if (osmux_cid > OSMUX_CID_MAX) { /* OSMUX_CID_MAX from libosmo-netif */ + LOGP(DLMGCP, LOGL_ERROR, "Osmux ID too large: %u > %u\n", + osmux_cid, OSMUX_CID_MAX); + return -2; + } + LOGP(DLMGCP, LOGL_DEBUG, "bsc-nat offered Osmux CID %u\n", osmux_cid); + + return osmux_cid; +} + /* A new section is marked by a double line break, check a few more * patterns as there may be variants */ static char *mgcp_find_section_end(char *string) @@ -567,6 +601,21 @@ if (rc) goto exit; break; + case 'X': + if (strncmp("Osmux: ", line + 2, strlen("Osmux: ")) == 0) { + rc = mgcp_parse_osmux_cid(line); + if (rc < 0) { + /* -1: we don't want wildcards in response. -2: error */ + rc = -EINVAL; + goto exit; + } + r->head.x_osmo_osmux_use = true; + r->head.x_osmo_osmux_cid = (uint8_t) rc; + rc = 0; + break; + } + /* Ignore unknown X-headers */ + break; default: /* skip unhandled parameters */ break; diff --git a/src/libosmo-mgcp-client/mgcp_client_fsm.c b/src/libosmo-mgcp-client/mgcp_client_fsm.c index 0d16720..7ff3a53 100644 --- a/src/libosmo-mgcp-client/mgcp_client_fsm.c +++ b/src/libosmo-mgcp-client/mgcp_client_fsm.c @@ -275,6 +275,11 @@ return; } LOGPFSML(fi, LOGL_DEBUG, "MGW/CRCX: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + if (r->head.x_osmo_osmux_use) { + LOGPFSML(fi, LOGL_DEBUG, "MGW/CRCX: MGW responded using Osmux %u\n", r->head.x_osmo_osmux_cid); + mgcp_ctx->conn_peer_remote.x_osmo_osmux_use = true; + mgcp_ctx->conn_peer_remote.x_osmo_osmux_cid = r->head.x_osmo_osmux_cid; + } osmo_strlcpy(mgcp_ctx->conn_peer_remote.addr, r->audio_ip, sizeof(mgcp_ctx->conn_peer_remote.addr)); mgcp_ctx->conn_peer_remote.port = r->audio_port; -- To view, visit https://gerrit.osmocom.org/14026 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I6174d092b7425b8d3d6d02a55bf294be3e710e6a Gerrit-Change-Number: 14026 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:15:55 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:15:55 +0000 Subject: Change in osmo-mgw[master]: osmux: Handle Osmux MGCP extension in MDCX messages In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14027 ) Change subject: osmux: Handle Osmux MGCP extension in MDCX messages ...................................................................... osmux: Handle Osmux MGCP extension in MDCX messages Change-Id: I65e53bd5dd08b58c253e03d2f358f3be523a2688 --- M src/libosmo-mgcp/mgcp_protocol.c 1 file changed, 30 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index e1bf12b..35141f8 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -1048,6 +1048,7 @@ const char *mode = NULL; struct mgcp_conn_rtp *conn = NULL; const char *conn_id = NULL; + int osmux_cid = -2; int rc; LOGPENDP(endp, DLMGCP, LOGL_NOTICE, "MDCX: modifying existing connection ...\n"); @@ -1095,6 +1096,16 @@ case 'Z': silent = strcmp("noanswer", line + 3) == 0; break; + case 'X': + if (strncmp("Osmux: ", line + 2, strlen("Osmux: ")) == 0) { + /* If osmux is disabled, just skip setting it up */ + if (!p->endp->cfg->osmux) + break; + osmux_cid = mgcp_osmux_setup(endp, line); + break; + } + /* Ignore unknown X-headers */ + break; case '\0': have_sdp = 1; goto mgcp_header_done; @@ -1166,6 +1177,25 @@ goto error3; } + if (mgcp_conn_rtp_is_osmux(conn)) { + OSMO_ASSERT(conn->osmux.cid_allocated); + if (osmux_cid < -1) { + LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, + "MDCX: Failed to parse Osmux CID!\n"); + goto error3; + } else if (osmux_cid == -1) { + LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, + "MDCX: wilcard in MDCX is not supported!\n"); + goto error3; + } else if (osmux_cid != (int) conn->osmux.cid) { + LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, + "MDCX: changing already allocated CID is not supported!\n"); + goto error3; + } + /* TODO: In the future (when we have recvCID!=sendCID), we need to + tell Osmux code that osmux_cid is to be used as sendCID for + that conn. */ + } if (setup_rtp_processing(endp, conn) != 0) { rate_ctr_inc(&rate_ctrs->ctr[MGCP_MDCX_FAIL_START_RTP]); -- To view, visit https://gerrit.osmocom.org/14027 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I65e53bd5dd08b58c253e03d2f358f3be523a2688 Gerrit-Change-Number: 14027 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:16:01 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:16:01 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Allow submitting X-Osmux on MDCX request In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14028 ) Change subject: mgcp-cli: Allow submitting X-Osmux on MDCX request ...................................................................... mgcp-cli: Allow submitting X-Osmux on MDCX request Change-Id: I41243f3ed212ace6087d5b0341e3a52f4069e37d --- M src/libosmo-mgcp-client/mgcp_client_fsm.c M tests/mgcp_client/mgcp_client_test.c M tests/mgcp_client/mgcp_client_test.ok 3 files changed, 24 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libosmo-mgcp-client/mgcp_client_fsm.c b/src/libosmo-mgcp-client/mgcp_client_fsm.c index 7ff3a53..ab7af10 100644 --- a/src/libosmo-mgcp-client/mgcp_client_fsm.c +++ b/src/libosmo-mgcp-client/mgcp_client_fsm.c @@ -173,6 +173,11 @@ set_conn_mode(&mgcp_msg, &mgcp_ctx->conn_peer_local); + if (mgcp_ctx->conn_peer_local.x_osmo_osmux_use) { + mgcp_msg.x_osmo_osmux_cid = mgcp_ctx->conn_peer_local.x_osmo_osmux_cid; + mgcp_msg.presence |= MGCP_MSG_PRESENCE_X_OSMO_OSMUX_CID; + } + /* Note: We take the endpoint and the call_id from the remote * connection info, because we can be confident that the * information there is valid. For the local info, we explicitly diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index 432a09c..9c4392f 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -276,6 +276,17 @@ msg = mgcp_msg_gen(mgcp, &mgcp_msg); printf("%s\n", (char *)msg->data); + printf("Generate X-Osmo-Osmux message (MDCX):\n"); + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + mgcp_msg.verb = MGCP_VERB_MDCX; + mgcp_msg.x_osmo_osmux_cid = 2; + mgcp_msg.presence = + (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | + MGCP_MSG_PRESENCE_CONN_ID | MGCP_MSG_PRESENCE_CONN_MODE + | MGCP_MSG_PRESENCE_X_OSMO_OSMUX_CID); + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + printf("%s\n", (char *)msg->data); + printf("Overfolow test:\n"); mgcp_msg.verb = MGCP_VERB_MDCX; mgcp_msg.presence = diff --git a/tests/mgcp_client/mgcp_client_test.ok b/tests/mgcp_client/mgcp_client_test.ok index 8fbe3ae..8b3e15b 100644 --- a/tests/mgcp_client/mgcp_client_test.ok +++ b/tests/mgcp_client/mgcp_client_test.ok @@ -100,6 +100,14 @@ M: sendrecv X-Osmux: 2 +Generate X-Osmo-Osmux message (MDCX): +MDCX 17 23 at mgw MGCP 1.0 +C: 2f +I: 11 +L: p:20, a:GSM, nt:IN +M: sendrecv +X-Osmux: 2 + Overfolow test: -- To view, visit https://gerrit.osmocom.org/14028 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I41243f3ed212ace6087d5b0341e3a52f4069e37d Gerrit-Change-Number: 14028 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:16:01 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:16:01 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Parse X-Osmux on MDCX response In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14029 ) Change subject: mgcp-cli: Parse X-Osmux on MDCX response ...................................................................... mgcp-cli: Parse X-Osmux on MDCX response During MDCX state is already changed to ACTIVATING but we still want to send the local CID back to announce that we still use same local CID. Change-Id: If182a48743ebe03f97caf9034e49b9947014bdf9 --- M src/libosmo-mgcp-client/mgcp_client_fsm.c M src/libosmo-mgcp/mgcp_protocol.c 2 files changed, 7 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libosmo-mgcp-client/mgcp_client_fsm.c b/src/libosmo-mgcp-client/mgcp_client_fsm.c index ab7af10..e83a119 100644 --- a/src/libosmo-mgcp-client/mgcp_client_fsm.c +++ b/src/libosmo-mgcp-client/mgcp_client_fsm.c @@ -404,6 +404,12 @@ } LOGPFSML(fi, LOGL_DEBUG, "MGW/MDCX: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + if (r->head.x_osmo_osmux_use) { + LOGPFSML(fi, LOGL_DEBUG, "MGW/CRCX: MGW responded using Osmux %u\n", r->head.x_osmo_osmux_cid); + mgcp_ctx->conn_peer_remote.x_osmo_osmux_use = true; + mgcp_ctx->conn_peer_remote.x_osmo_osmux_cid = r->head.x_osmo_osmux_cid; + } + osmo_strlcpy(mgcp_ctx->conn_peer_remote.addr, r->audio_ip, sizeof(mgcp_ctx->conn_peer_remote.addr)); mgcp_ctx->conn_peer_remote.port = r->audio_port; diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 35141f8..555d6c6 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -323,7 +323,7 @@ } /* Attach optional OSMUX parameters */ - if (conn->osmux.state == OSMUX_STATE_NEGOTIATING) { + if (mgcp_conn_rtp_is_osmux(conn)) { rc = msgb_printf(sdp, "X-Osmux: %u\r\n", conn->osmux.cid); if (rc < 0) goto error; -- To view, visit https://gerrit.osmocom.org/14029 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If182a48743ebe03f97caf9034e49b9947014bdf9 Gerrit-Change-Number: 14029 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:16:01 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:16:01 +0000 Subject: Change in osmo-mgw[master]: osmux: Drop unneeded OSMUX_STATE_NEGOTIATING In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14030 ) Change subject: osmux: Drop unneeded OSMUX_STATE_NEGOTIATING ...................................................................... osmux: Drop unneeded OSMUX_STATE_NEGOTIATING Change-Id: I94e7df3287d037975adc16c5ada05adf94269ead --- M include/osmocom/mgcp/osmux.h M src/libosmo-mgcp/mgcp_protocol.c 2 files changed, 1 insertion(+), 3 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/include/osmocom/mgcp/osmux.h b/include/osmocom/mgcp/osmux.h index c080c85..eb05610 100644 --- a/include/osmocom/mgcp/osmux.h +++ b/include/osmocom/mgcp/osmux.h @@ -28,7 +28,6 @@ enum osmux_state { OSMUX_STATE_DISABLED = 0, /* Osmux not being currently used by endp */ - OSMUX_STATE_NEGOTIATING, /* Osmux was locally requested in MGCP CRCX */ OSMUX_STATE_ACTIVATING, /* Osmux was accepted in MGCP CRCX ACK. It can now be enabled by \ref osmux_enable_endpoint. */ OSMUX_STATE_ENABLED, /* Osmux was initialized by \ref osmux_enable_endpoint and can process frames */ }; diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 555d6c6..609b5fb 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -327,7 +327,6 @@ rc = msgb_printf(sdp, "X-Osmux: %u\r\n", conn->osmux.cid); if (rc < 0) goto error; - conn->osmux.state = OSMUX_STATE_ACTIVATING; } /* Attach line break to separate the parameters from the SDP block */ @@ -918,7 +917,7 @@ * is fully set up from the dummy load. */ conn->osmux.state = OSMUX_STATE_DISABLED; if (osmux_cid >= -1) { /* -1 is wilcard, alloc next avail CID */ - conn->osmux.state = OSMUX_STATE_NEGOTIATING; + conn->osmux.state = OSMUX_STATE_ACTIVATING; if (conn_osmux_allocate_cid(conn, osmux_cid) == -1) { rate_ctr_inc(&rate_ctrs->ctr[MGCP_CRCX_FAIL_NO_OSMUX]); goto error2; -- To view, visit https://gerrit.osmocom.org/14030 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I94e7df3287d037975adc16c5ada05adf94269ead Gerrit-Change-Number: 14030 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:16:27 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:16:27 +0000 Subject: Change in osmo-mgw[master]: osmux: Fix hardcoded rtp payload_type 98 in osmux conn In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14077 ) Change subject: osmux: Fix hardcoded rtp payload_type 98 in osmux conn ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14077 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I24698a9613bc0de9460c6ad2d1067c152ebcf0b2 Gerrit-Change-Number: 14077 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 19 May 2019 07:16:27 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:17:24 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:17:24 +0000 Subject: Change in libosmo-netif[master]: osmux: Extend osmux_out_handle and add new API to set rtp payload_type In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14076 ) Change subject: osmux: Extend osmux_out_handle and add new API to set rtp payload_type ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14076 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5cbeb494a8932953d9fd2dc24dacf8cd97fd84e4 Gerrit-Change-Number: 14076 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 19 May 2019 07:17:24 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:17:25 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:17:25 +0000 Subject: Change in libosmo-netif[master]: osmux: Extend osmux_out_handle and add new API to set rtp payload_type In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14076 ) Change subject: osmux: Extend osmux_out_handle and add new API to set rtp payload_type ...................................................................... osmux: Extend osmux_out_handle and add new API to set rtp payload_type Previously payload_type was always hardcoded to 98 for generated rtp packets from incoming osmux frame. Change-Id: I5cbeb494a8932953d9fd2dc24dacf8cd97fd84e4 --- M TODO-RELEASE M include/osmocom/netif/osmux.h M src/osmux.c M tests/jibuf/jibuf_tool.c M tests/osmo-pcap-test/osmux_test.c M tests/osmux/osmux_test.c M tests/osmux/osmux_test2.c 7 files changed, 22 insertions(+), 11 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/TODO-RELEASE b/TODO-RELEASE index d0852fc..45ebb75 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,5 @@ # 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. #library what description / commit summary line +libosmo-netif Add new field to struct osmux_out_handle Breaks ABI with older versions +libosmo-netif Add new API osmux_xfrm_output_init2 Deprecates old osmux_xfrm_output_init diff --git a/include/osmocom/netif/osmux.h b/include/osmocom/netif/osmux.h index dfed66a..7dee438 100644 --- a/include/osmocom/netif/osmux.h +++ b/include/osmocom/netif/osmux.h @@ -80,6 +80,7 @@ uint16_t rtp_seq; uint32_t rtp_timestamp; uint32_t rtp_ssrc; + uint8_t rtp_payload_type; uint8_t osmux_seq_ack; /* Latest received seq num */ struct osmo_timer_list timer; struct llist_head list; @@ -106,7 +107,8 @@ int osmux_xfrm_input(struct osmux_in_handle *h, struct msgb *msg, int ccid); void osmux_xfrm_input_deliver(struct osmux_in_handle *h); -void osmux_xfrm_output_init(struct osmux_out_handle *h, uint32_t rtp_ssrc); +void osmux_xfrm_output_init(struct osmux_out_handle *h, uint32_t rtp_ssrc) OSMO_DEPRECATED("Use osmux_xfrm_output_init2() instead"); +void osmux_xfrm_output_init2(struct osmux_out_handle *h, uint32_t rtp_ssrc, uint8_t rtp_payload_type); void osmux_xfrm_output_set_tx_cb(struct osmux_out_handle *h, void (*tx_cb)(struct msgb *msg, void *data), void *data); int osmux_xfrm_output(struct osmux_hdr *osmuxh, struct osmux_out_handle *h, struct llist_head *list) OSMO_DEPRECATED("Use osmux_xfrm_output_sched() instead"); int osmux_xfrm_output_sched(struct osmux_out_handle *h, struct osmux_hdr *osmuxh); diff --git a/src/osmux.c b/src/osmux.c index 7a6ce60..8b6a115 100644 --- a/src/osmux.c +++ b/src/osmux.c @@ -146,7 +146,7 @@ rtph->csrc_count = 0; rtph->extension = 0; rtph->version = RTP_VERSION; - rtph->payload_type = 98; + rtph->payload_type = h->rtp_payload_type; /* ... emulate timestamp and ssrc */ rtph->timestamp = htonl(h->rtp_timestamp); rtph->sequence = htons(h->rtp_seq); @@ -999,16 +999,23 @@ } } -void osmux_xfrm_output_init(struct osmux_out_handle *h, uint32_t rtp_ssrc) +void osmux_xfrm_output_init2(struct osmux_out_handle *h, uint32_t rtp_ssrc, uint8_t rtp_payload_type) { memset(h, 0, sizeof(*h)); h->rtp_seq = (uint16_t)random(); h->rtp_timestamp = (uint32_t)random(); h->rtp_ssrc = rtp_ssrc; + h->rtp_payload_type = rtp_payload_type; INIT_LLIST_HEAD(&h->list); osmo_timer_setup(&h->timer, osmux_xfrm_output_trigger, h); } +void osmux_xfrm_output_init(struct osmux_out_handle *h, uint32_t rtp_ssrc) +{ + /* backward compatibility with old users, where 98 was harcoded in osmux_rebuild_rtp() */ + osmux_xfrm_output_init2(h, rtp_ssrc, 98); +} + #define SNPRINTF_BUFFER_SIZE(ret, remain, offset) \ if (ret < 0) \ ret = 0; \ diff --git a/tests/jibuf/jibuf_tool.c b/tests/jibuf/jibuf_tool.c index bd444a7..df11131 100644 --- a/tests/jibuf/jibuf_tool.c +++ b/tests/jibuf/jibuf_tool.c @@ -517,7 +517,7 @@ osmo_pcap.timer.cb = pcap_pkt_timer_cb; if(opt_osmux) { - osmux_xfrm_output_init(&pcap_osmux_h, 0); + osmux_xfrm_output_init2(&pcap_osmux_h, 0, 98); osmux_xfrm_output_set_tx_cb(&pcap_osmux_h, glue_cb, NULL); } diff --git a/tests/osmo-pcap-test/osmux_test.c b/tests/osmo-pcap-test/osmux_test.c index 7ec78a0..9163753 100644 --- a/tests/osmo-pcap-test/osmux_test.c +++ b/tests/osmo-pcap-test/osmux_test.c @@ -189,7 +189,7 @@ osmo_pcap.timer.cb = osmo_pcap_pkt_timer_cb; osmux_xfrm_input_init(&h_input); - osmux_xfrm_output_init(&h_output); + osmux_xfrm_output_init2(&h_output, 0, 98); osmux_xfrm_output_set_tx_cb(&h_output, tx_cb, NULL); /* first run */ diff --git a/tests/osmux/osmux_test.c b/tests/osmux/osmux_test.c index 704ccbc..e2eb777 100644 --- a/tests/osmux/osmux_test.c +++ b/tests/osmux/osmux_test.c @@ -269,7 +269,7 @@ osmo_init_logging2(tall_ctx, &osmux_test_log_info); log_set_log_level(osmo_stderr_target, LOGL_DEBUG); - osmux_xfrm_output_init(&h_output, 0x7000000); + osmux_xfrm_output_init2(&h_output, 0x7000000, 98); osmux_xfrm_output_set_tx_cb(&h_output, tx_cb, NULL); /* If the test takes longer than 10 seconds, abort it */ diff --git a/tests/osmux/osmux_test2.c b/tests/osmux/osmux_test2.c index ecd9296..ffe1101 100644 --- a/tests/osmux/osmux_test2.c +++ b/tests/osmux/osmux_test2.c @@ -164,7 +164,7 @@ clock_override_enable(true); clock_override_set(0, 0); osmux_init(32); - osmux_xfrm_output_init(&h_output, 0x7000000); + osmux_xfrm_output_init2(&h_output, 0x7000000, 98); h_output.rtp_seq = (uint16_t)50; h_output.rtp_timestamp = (uint32_t)500; osmux_xfrm_output_set_tx_cb(&h_output, tx_cb, &h_output); @@ -226,7 +226,7 @@ clock_override_enable(true); clock_override_set(0, 0); osmux_init(32); - osmux_xfrm_output_init(&h_output, 0x7000000); + osmux_xfrm_output_init2(&h_output, 0x7000000, 98); h_output.rtp_seq = (uint16_t)50; h_output.rtp_timestamp = (uint32_t)500; osmux_xfrm_output_set_tx_cb(&h_output, tx_cb, &h_output); @@ -263,7 +263,7 @@ clock_override_enable(true); clock_override_set(0, 0); osmux_init(32); - osmux_xfrm_output_init(&h_output, 0x7000000); + osmux_xfrm_output_init2(&h_output, 0x7000000, 98); h_output.rtp_seq = (uint16_t)50; h_output.rtp_timestamp = (uint32_t)500; osmux_xfrm_output_set_tx_cb(&h_output, tx_cb, &h_output); @@ -297,7 +297,7 @@ clock_override_enable(true); clock_override_set(0, 0); osmux_init(32); - osmux_xfrm_output_init(&h_output, 0x7000000); + osmux_xfrm_output_init2(&h_output, 0x7000000, 98); h_output.rtp_seq = (uint16_t)50; h_output.rtp_timestamp = (uint32_t)500; osmux_xfrm_output_set_tx_cb(&h_output, tx_cb, &h_output); @@ -329,7 +329,7 @@ clock_override_enable(true); clock_override_set(0, 0); osmux_init(32); - osmux_xfrm_output_init(&h_output, 0x7000000); + osmux_xfrm_output_init2(&h_output, 0x7000000, 98); h_output.rtp_seq = (uint16_t)50; h_output.rtp_timestamp = (uint32_t)500; osmux_xfrm_output_set_tx_cb(&h_output, tx_cb, &h_output); -- To view, visit https://gerrit.osmocom.org/14076 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I5cbeb494a8932953d9fd2dc24dacf8cd97fd84e4 Gerrit-Change-Number: 14076 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:17:32 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:17:32 +0000 Subject: Change in osmo-ggsn[master]: osmo-ggsn: properly show subscriber's MSISDN in the VTY In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14081 ) Change subject: osmo-ggsn: properly show subscriber's MSISDN in the VTY ...................................................................... osmo-ggsn: properly show subscriber's MSISDN in the VTY Instead of printing subscriber's MSISDN as a hex-string, let's attempt to decode it using gsm48_decode_bcd_number2(). Change-Id: I3f3a105dc8d0d582f2b9d8e1ff6c5785369e569b --- M ggsn/ggsn_vty.c 1 file changed, 7 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/ggsn/ggsn_vty.c b/ggsn/ggsn_vty.c index 214e2fa..c6dc0d9 100644 --- a/ggsn/ggsn_vty.c +++ b/ggsn/ggsn_vty.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -736,9 +737,14 @@ struct in46_addr eua46; char name_buf[256]; char *apn_name; + int rc; + + /* Attempt to decode MSISDN */ + rc = gsm48_decode_bcd_number2(name_buf, sizeof(name_buf), + pdp->msisdn.v, pdp->msisdn.l, 0); vty_out(vty, "IMSI: %s, NSAPI: %u, MSISDN: %s%s", imsi_gtp2str(&pdp->imsi), pdp->nsapi, - osmo_hexdump_nospc(pdp->msisdn.v, pdp->msisdn.l), VTY_NEWLINE); + rc ? "(NONE)" : name_buf, VTY_NEWLINE); vty_out(vty, " Control: %s:%08x ", print_gsnaddr(&pdp->gsnlc), pdp->teic_own); vty_out(vty, "<-> %s:%08x%s", print_gsnaddr(&pdp->gsnrc), pdp->teic_gn, VTY_NEWLINE); -- To view, visit https://gerrit.osmocom.org/14081 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I3f3a105dc8d0d582f2b9d8e1ff6c5785369e569b Gerrit-Change-Number: 14081 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:18:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:18:05 +0000 Subject: Change in libosmocore[master]: Deprecate usage of osmo_counter_* In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13808 ) Change subject: Deprecate usage of osmo_counter_* ...................................................................... Deprecate usage of osmo_counter_* There's not many of those around any more, let's try to move them to osmo_stat_items Change-Id: If67f64c6ec7a3f3114c962df9db50107d9ea86e2 --- M include/osmocom/core/counter.h 1 file changed, 10 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve lynxis lazus: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/core/counter.h b/include/osmocom/core/counter.h index 259f1ed..dc62791 100644 --- a/include/osmocom/core/counter.h +++ b/include/osmocom/core/counter.h @@ -1,5 +1,7 @@ #pragma once +#include + /*! \file counter.h * Common routines regarding counter handling */ @@ -14,6 +16,7 @@ /*! Decrement given counter by one * \param[in] ctr Counter that's to be decremented */ +OSMO_DEPRECATED("Implement as osmo_stat_item instead") static inline void osmo_counter_dec(struct osmo_counter *ctr) { ctr->value--; @@ -21,26 +24,31 @@ /*! Increment counter by one. * \param[in] Counter that's to be incremented */ +OSMO_DEPRECATED("Implement as osmo_stat_item instead") static inline void osmo_counter_inc(struct osmo_counter *ctr) { ctr->value++; } /*! Get current value of counter */ +OSMO_DEPRECATED("Implement as osmo_stat_item instead") static inline unsigned long osmo_counter_get(struct osmo_counter *ctr) { return ctr->value; } /*! Reset current value of counter to 0 */ +OSMO_DEPRECATED("Implement as osmo_stat_item instead") static inline void osmo_counter_reset(struct osmo_counter *ctr) { ctr->value = 0; } -struct osmo_counter *osmo_counter_alloc(const char *name); +struct osmo_counter *osmo_counter_alloc(const char *name) + OSMO_DEPRECATED("Implement as osmo_stat_item instead"); -void osmo_counter_free(struct osmo_counter *ctr); +void osmo_counter_free(struct osmo_counter *ctr) + OSMO_DEPRECATED("Implement as osmo_stat_item instead"); int osmo_counters_for_each(int (*handle_counter)(struct osmo_counter *, void *), void *data); -- To view, visit https://gerrit.osmocom.org/13808 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If67f64c6ec7a3f3114c962df9db50107d9ea86e2 Gerrit-Change-Number: 13808 Gerrit-PatchSet: 5 Gerrit-Owner: Daniel Willmann Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:18:17 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:18:17 +0000 Subject: Change in libosmocore[master]: Cosmetic: GSUP: fix too long comment line In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14070 ) Change subject: Cosmetic: GSUP: fix too long comment line ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14070 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I60ba8fef8924e58bc73cff5c7ff77ebb76d8bfaa Gerrit-Change-Number: 14070 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 19 May 2019 07:18:17 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:18:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:18:19 +0000 Subject: Change in libosmocore[master]: Cosmetic: GSUP: fix too long comment line In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14070 ) Change subject: Cosmetic: GSUP: fix too long comment line ...................................................................... Cosmetic: GSUP: fix too long comment line Change-Id: I60ba8fef8924e58bc73cff5c7ff77ebb76d8bfaa --- M include/osmocom/gsm/gsup.h 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/gsm/gsup.h b/include/osmocom/gsm/gsup.h index 1374e0e..be85662 100644 --- a/include/osmocom/gsm/gsup.h +++ b/include/osmocom/gsm/gsup.h @@ -348,8 +348,8 @@ enum osmo_gsup_imei_result imei_result; /*! Indicate the message class to trivially dispatch incoming GSUP messages to the right code paths. - * Inter-MSC messages are *required* to set a class = OSMO_GSUP_MESSAGE_CLASS_INTER_MSC. For older message classes, this may - * be omitted (for backwards compatibility only -- if in doubt, include it). */ + * Inter-MSC messages are *required* to set a class = OSMO_GSUP_MESSAGE_CLASS_INTER_MSC. For older message + * classes, this may be omitted (for backwards compatibility only -- if in doubt, include it). */ enum osmo_gsup_message_class message_class; /*! For messages routed via another GSUP entity (via HLR), the IPA name of the entity that sent this message. */ -- To view, visit https://gerrit.osmocom.org/14070 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I60ba8fef8924e58bc73cff5c7ff77ebb76d8bfaa Gerrit-Change-Number: 14070 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:18:28 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:18:28 +0000 Subject: Change in osmo-bsc[master]: Make sure to default to AMR octet-aligned mode In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14050 ) Change subject: Make sure to default to AMR octet-aligned mode ...................................................................... Make sure to default to AMR octet-aligned mode In Change-Id If6d40b2407b87aad2227ea7f15533ef01a3771b3 we introduced the support for both octet-aligned and bandwidth-efficient mode, and added a related VTY option about it. However, we accidentially also changed the default behavior. Without any explicit configuration, we should behave just like we behaved all those years before: Continue with octet-aligned mode. Change-Id: I8b6fd8bec05b35d84ad16275d84f9d363e238d2b Closes: OS#4002 --- M src/osmo-bsc/osmo_bsc_msc.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: tnt: Looks good to me, but someone else must approve Vadim Yanitskiy: Looks good to me, but someone else must approve Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_msc.c b/src/osmo-bsc/osmo_bsc_msc.c index 4df1ce4..6a6b1a9 100644 --- a/src/osmo-bsc/osmo_bsc_msc.c +++ b/src/osmo-bsc/osmo_bsc_msc.c @@ -94,6 +94,7 @@ /* Defaults for the audio setup */ msc_data->amr_conf.m5_90 = 1; + msc_data->amr_octet_aligned = true; /* Allow the full set of possible codecs by default */ msc_data->audio_length = 5; -- To view, visit https://gerrit.osmocom.org/14050 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I8b6fd8bec05b35d84ad16275d84f9d363e238d2b Gerrit-Change-Number: 14050 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:19:38 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:19:38 +0000 Subject: Change in osmo-hlr[master]: db_hlr.c: db_subscr_create(): add flags argument In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13711 ) Change subject: db_hlr.c: db_subscr_create(): add flags argument ...................................................................... db_hlr.c: db_subscr_create(): add flags argument Allow creating new subscribers without giving them access to CS or PS. This will be used by the create-subscriber-on-demand feature. Related: OS#2542 Change-Id: I1a6dd85387723dab5487c53b33d2d9ec6d05d006 --- M src/db.c M src/db.h M src/db_hlr.c M src/hlr_db_tool.c M src/hlr_vty_subscr.c M tests/db/db_test.c M tests/db/db_test.err 7 files changed, 99 insertions(+), 37 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, approved diff --git a/src/db.c b/src/db.c index 09e1776..770c3a4 100644 --- a/src/db.c +++ b/src/db.c @@ -66,7 +66,7 @@ [DB_STMT_UPD_PURGE_PS_BY_IMSI] = "UPDATE subscriber SET ms_purged_ps = $val WHERE imsi = $imsi", [DB_STMT_UPD_NAM_CS_BY_IMSI] = "UPDATE subscriber SET nam_cs = $val WHERE imsi = $imsi", [DB_STMT_UPD_NAM_PS_BY_IMSI] = "UPDATE subscriber SET nam_ps = $val WHERE imsi = $imsi", - [DB_STMT_SUBSCR_CREATE] = "INSERT INTO subscriber (imsi) VALUES ($imsi)", + [DB_STMT_SUBSCR_CREATE] = "INSERT INTO subscriber (imsi, nam_cs, nam_ps) VALUES ($imsi, $nam_cs, $nam_ps)", [DB_STMT_DEL_BY_ID] = "DELETE FROM subscriber WHERE id = $subscriber_id", [DB_STMT_SET_MSISDN_BY_IMSI] = "UPDATE subscriber SET msisdn = $msisdn WHERE imsi = $imsi", [DB_STMT_DELETE_MSISDN_BY_IMSI] = "UPDATE subscriber SET msisdn = NULL WHERE imsi = $imsi", diff --git a/src/db.h b/src/db.h index c438b8d..3cb42e4 100644 --- a/src/db.h +++ b/src/db.h @@ -118,7 +118,10 @@ } u; }; -int db_subscr_create(struct db_context *dbc, const char *imsi); +#define DB_SUBSCR_FLAG_NAM_CS (1 << 1) +#define DB_SUBSCR_FLAG_NAM_PS (1 << 2) + +int db_subscr_create(struct db_context *dbc, const char *imsi, uint8_t flags); int db_subscr_delete_by_id(struct db_context *dbc, int64_t subscr_id); int db_subscr_update_msisdn_by_imsi(struct db_context *dbc, const char *imsi, diff --git a/src/db_hlr.c b/src/db_hlr.c index 3ba457c..40209c5 100644 --- a/src/db_hlr.c +++ b/src/db_hlr.c @@ -44,9 +44,10 @@ /*! Add new subscriber record to the HLR database. * \param[in,out] dbc database context. * \param[in] imsi ASCII string of IMSI digits, is validated. + * \param[in] flags Bitmask of DB_SUBSCR_FLAG_*. * \returns 0 on success, -EINVAL on invalid IMSI, -EIO on database error. */ -int db_subscr_create(struct db_context *dbc, const char *imsi) +int db_subscr_create(struct db_context *dbc, const char *imsi, uint8_t flags) { sqlite3_stmt *stmt; int rc; @@ -61,6 +62,10 @@ if (!db_bind_text(stmt, "$imsi", imsi)) return -EIO; + if (!db_bind_int(stmt, "$nam_cs", (flags & DB_SUBSCR_FLAG_NAM_CS) != 0)) + return -EIO; + if (!db_bind_int(stmt, "$nam_ps", (flags & DB_SUBSCR_FLAG_NAM_PS) != 0)) + return -EIO; /* execute the statement */ rc = sqlite3_step(stmt); diff --git a/src/hlr_db_tool.c b/src/hlr_db_tool.c index 516b91e..fcef597 100644 --- a/src/hlr_db_tool.c +++ b/src/hlr_db_tool.c @@ -302,7 +302,7 @@ snprintf(imsi_str, sizeof(imsi_str), "%" PRId64, imsi); - rc = db_subscr_create(dbc, imsi_str); + rc = db_subscr_create(dbc, imsi_str, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS); if (rc < 0) { LOGP(DDB, LOGL_ERROR, "OsmoNITB DB import to %s: failed to create IMSI %s: %d: %s\n", dbc->fname, diff --git a/src/hlr_vty_subscr.c b/src/hlr_vty_subscr.c index 998d1be..3078577 100644 --- a/src/hlr_vty_subscr.c +++ b/src/hlr_vty_subscr.c @@ -220,7 +220,7 @@ return CMD_WARNING; } - rc = db_subscr_create(g_hlr->dbc, imsi); + rc = db_subscr_create(g_hlr->dbc, imsi, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS); if (rc) { if (rc == -EEXIST) diff --git a/tests/db/db_test.c b/tests/db/db_test.c index 56905a9..72feed4 100644 --- a/tests/db/db_test.c +++ b/tests/db/db_test.c @@ -221,37 +221,38 @@ comment("Create with valid / invalid IMSI"); - ASSERT_RC(db_subscr_create(dbc, imsi0), 0); + ASSERT_RC(db_subscr_create(dbc, imsi0, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), 0); ASSERT_SEL(imsi, imsi0, 0); id0 = g_subscr.id; - ASSERT_RC(db_subscr_create(dbc, imsi1), 0); + ASSERT_RC(db_subscr_create(dbc, imsi1, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), 0); ASSERT_SEL(imsi, imsi1, 0); id1 = g_subscr.id; - ASSERT_RC(db_subscr_create(dbc, imsi2), 0); + ASSERT_RC(db_subscr_create(dbc, imsi2, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), 0); ASSERT_SEL(imsi, imsi2, 0); id2 = g_subscr.id; - ASSERT_RC(db_subscr_create(dbc, imsi0), -EIO); + ASSERT_RC(db_subscr_create(dbc, imsi0, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), -EIO); ASSERT_SEL(imsi, imsi0, 0); - ASSERT_RC(db_subscr_create(dbc, imsi1), -EIO); - ASSERT_RC(db_subscr_create(dbc, imsi1), -EIO); + ASSERT_RC(db_subscr_create(dbc, imsi1, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), -EIO); + ASSERT_RC(db_subscr_create(dbc, imsi1, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), -EIO); ASSERT_SEL(imsi, imsi1, 0); - ASSERT_RC(db_subscr_create(dbc, imsi2), -EIO); - ASSERT_RC(db_subscr_create(dbc, imsi2), -EIO); + ASSERT_RC(db_subscr_create(dbc, imsi2, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), -EIO); + ASSERT_RC(db_subscr_create(dbc, imsi2, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), -EIO); ASSERT_SEL(imsi, imsi2, 0); - ASSERT_RC(db_subscr_create(dbc, "123456789 000003"), -EINVAL); + ASSERT_RC(db_subscr_create(dbc, "123456789 000003", DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), -EINVAL); ASSERT_SEL(imsi, "123456789000003", -ENOENT); - ASSERT_RC(db_subscr_create(dbc, "123456789000002123456"), -EINVAL); + ASSERT_RC(db_subscr_create(dbc, "123456789000002123456", DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), + -EINVAL); ASSERT_SEL(imsi, "123456789000002123456", -ENOENT); - ASSERT_RC(db_subscr_create(dbc, "foobar123"), -EINVAL); + ASSERT_RC(db_subscr_create(dbc, "foobar123", DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), -EINVAL); ASSERT_SEL(imsi, "foobar123", -ENOENT); - ASSERT_RC(db_subscr_create(dbc, "123"), -EINVAL); + ASSERT_RC(db_subscr_create(dbc, "123", DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), -EINVAL); ASSERT_SEL(imsi, "123", -ENOENT); - ASSERT_RC(db_subscr_create(dbc, short_imsi), 0); + ASSERT_RC(db_subscr_create(dbc, short_imsi, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), 0); ASSERT_SEL(imsi, short_imsi, 0); id_short = g_subscr.id; @@ -452,6 +453,22 @@ ASSERT_RC(db_subscr_delete_by_id(dbc, id_short), 0); ASSERT_SEL(imsi, short_imsi, -ENOENT); + comment("Create and delete subscribers with non-default nam_cs and nam_ps"); + + ASSERT_RC(db_subscr_create(dbc, imsi0, 0x00), 0); + ASSERT_SEL(imsi, imsi0, 0); + id0 = g_subscr.id; + ASSERT_RC(db_subscr_create(dbc, imsi1, DB_SUBSCR_FLAG_NAM_CS), 0); + ASSERT_SEL(imsi, imsi1, 0); + id1 = g_subscr.id; + ASSERT_RC(db_subscr_create(dbc, imsi2, DB_SUBSCR_FLAG_NAM_PS), 0); + ASSERT_SEL(imsi, imsi2, 0); + id2 = g_subscr.id; + + ASSERT_RC(db_subscr_delete_by_id(dbc, id0), 0); + ASSERT_RC(db_subscr_delete_by_id(dbc, id1), 0); + ASSERT_RC(db_subscr_delete_by_id(dbc, id2), 0); + comment_end(); } @@ -495,7 +512,7 @@ comment("Create subscriber"); - ASSERT_RC(db_subscr_create(dbc, imsi0), 0); + ASSERT_RC(db_subscr_create(dbc, imsi0, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), 0); ASSERT_SEL(imsi, imsi0, 0); id = g_subscr.id; @@ -707,7 +724,7 @@ comment("Re-add subscriber and verify auth data didn't come back"); - ASSERT_RC(db_subscr_create(dbc, imsi0), 0); + ASSERT_RC(db_subscr_create(dbc, imsi0, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), 0); ASSERT_SEL(imsi, imsi0, 0); /* For this test to work, we want to get the same subscriber ID back, @@ -739,7 +756,7 @@ comment("Create subscriber"); - ASSERT_RC(db_subscr_create(dbc, imsi0), 0); + ASSERT_RC(db_subscr_create(dbc, imsi0, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), 0); ASSERT_SEL(imsi, imsi0, 0); id = g_subscr.id; diff --git a/tests/db/db_test.err b/tests/db/db_test.err index 6ebdae2..979562e 100644 --- a/tests/db/db_test.err +++ b/tests/db/db_test.err @@ -3,7 +3,7 @@ --- Create with valid / invalid IMSI -db_subscr_create(dbc, imsi0) --> 0 +db_subscr_create(dbc, imsi0, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> 0 db_subscr_get_by_imsi(dbc, imsi0, &g_subscr) --> 0 struct hlr_subscriber { @@ -11,7 +11,7 @@ .imsi = '123456789000000', } -db_subscr_create(dbc, imsi1) --> 0 +db_subscr_create(dbc, imsi1, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> 0 db_subscr_get_by_imsi(dbc, imsi1, &g_subscr) --> 0 struct hlr_subscriber { @@ -19,7 +19,7 @@ .imsi = '123456789000001', } -db_subscr_create(dbc, imsi2) --> 0 +db_subscr_create(dbc, imsi2, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> 0 db_subscr_get_by_imsi(dbc, imsi2, &g_subscr) --> 0 struct hlr_subscriber { @@ -27,7 +27,7 @@ .imsi = '123456789000002', } -db_subscr_create(dbc, imsi0) --> -EIO +db_subscr_create(dbc, imsi0, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> -EIO DAUC IMSI='123456789000000': Cannot create subscriber: SQL error: (2067) UNIQUE constraint failed: subscriber.imsi db_subscr_get_by_imsi(dbc, imsi0, &g_subscr) --> 0 @@ -36,10 +36,10 @@ .imsi = '123456789000000', } -db_subscr_create(dbc, imsi1) --> -EIO +db_subscr_create(dbc, imsi1, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> -EIO DAUC IMSI='123456789000001': Cannot create subscriber: SQL error: (2067) UNIQUE constraint failed: subscriber.imsi -db_subscr_create(dbc, imsi1) --> -EIO +db_subscr_create(dbc, imsi1, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> -EIO DAUC IMSI='123456789000001': Cannot create subscriber: SQL error: (2067) UNIQUE constraint failed: subscriber.imsi db_subscr_get_by_imsi(dbc, imsi1, &g_subscr) --> 0 @@ -48,10 +48,10 @@ .imsi = '123456789000001', } -db_subscr_create(dbc, imsi2) --> -EIO +db_subscr_create(dbc, imsi2, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> -EIO DAUC IMSI='123456789000002': Cannot create subscriber: SQL error: (2067) UNIQUE constraint failed: subscriber.imsi -db_subscr_create(dbc, imsi2) --> -EIO +db_subscr_create(dbc, imsi2, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> -EIO DAUC IMSI='123456789000002': Cannot create subscriber: SQL error: (2067) UNIQUE constraint failed: subscriber.imsi db_subscr_get_by_imsi(dbc, imsi2, &g_subscr) --> 0 @@ -60,31 +60,31 @@ .imsi = '123456789000002', } -db_subscr_create(dbc, "123456789 000003") --> -EINVAL +db_subscr_create(dbc, "123456789 000003", DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> -EINVAL DAUC Cannot create subscriber: invalid IMSI: '123456789 000003' db_subscr_get_by_imsi(dbc, "123456789000003", &g_subscr) --> -ENOENT DAUC Cannot read subscriber from db: IMSI='123456789000003': No such subscriber -db_subscr_create(dbc, "123456789000002123456") --> -EINVAL +db_subscr_create(dbc, "123456789000002123456", DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> -EINVAL DAUC Cannot create subscriber: invalid IMSI: '123456789000002123456' db_subscr_get_by_imsi(dbc, "123456789000002123456", &g_subscr) --> -ENOENT DAUC Cannot read subscriber from db: IMSI='123456789000002123456': No such subscriber -db_subscr_create(dbc, "foobar123") --> -EINVAL +db_subscr_create(dbc, "foobar123", DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> -EINVAL DAUC Cannot create subscriber: invalid IMSI: 'foobar123' db_subscr_get_by_imsi(dbc, "foobar123", &g_subscr) --> -ENOENT DAUC Cannot read subscriber from db: IMSI='foobar123': No such subscriber -db_subscr_create(dbc, "123") --> -EINVAL +db_subscr_create(dbc, "123", DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> -EINVAL DAUC Cannot create subscriber: invalid IMSI: '123' db_subscr_get_by_imsi(dbc, "123", &g_subscr) --> -ENOENT DAUC Cannot read subscriber from db: IMSI='123': No such subscriber -db_subscr_create(dbc, short_imsi) --> 0 +db_subscr_create(dbc, short_imsi, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> 0 db_subscr_get_by_imsi(dbc, short_imsi, &g_subscr) --> 0 struct hlr_subscriber { @@ -752,6 +752,43 @@ db_subscr_get_by_imsi(dbc, short_imsi, &g_subscr) --> -ENOENT DAUC Cannot read subscriber from db: IMSI='123456': No such subscriber + +--- Create and delete subscribers with non-default nam_cs and nam_ps + +db_subscr_create(dbc, imsi0, 0x00) --> 0 + +db_subscr_get_by_imsi(dbc, imsi0, &g_subscr) --> 0 +struct hlr_subscriber { + .id = 1, + .imsi = '123456789000000', + .nam_cs = false, + .nam_ps = false, +} + +db_subscr_create(dbc, imsi1, DB_SUBSCR_FLAG_NAM_CS) --> 0 + +db_subscr_get_by_imsi(dbc, imsi1, &g_subscr) --> 0 +struct hlr_subscriber { + .id = 2, + .imsi = '123456789000001', + .nam_ps = false, +} + +db_subscr_create(dbc, imsi2, DB_SUBSCR_FLAG_NAM_PS) --> 0 + +db_subscr_get_by_imsi(dbc, imsi2, &g_subscr) --> 0 +struct hlr_subscriber { + .id = 3, + .imsi = '123456789000002', + .nam_cs = false, +} + +db_subscr_delete_by_id(dbc, id0) --> 0 + +db_subscr_delete_by_id(dbc, id1) --> 0 + +db_subscr_delete_by_id(dbc, id2) --> 0 + ===== test_subscr_create_update_sel_delete: SUCCESS @@ -769,7 +806,7 @@ --- Create subscriber -db_subscr_create(dbc, imsi0) --> 0 +db_subscr_create(dbc, imsi0, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> 0 db_subscr_get_by_imsi(dbc, imsi0, &g_subscr) --> 0 struct hlr_subscriber { @@ -1259,7 +1296,7 @@ --- Re-add subscriber and verify auth data didn't come back -db_subscr_create(dbc, imsi0) --> 0 +db_subscr_create(dbc, imsi0, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> 0 db_subscr_get_by_imsi(dbc, imsi0, &g_subscr) --> 0 struct hlr_subscriber { @@ -1306,7 +1343,7 @@ --- Create subscriber -db_subscr_create(dbc, imsi0) --> 0 +db_subscr_create(dbc, imsi0, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> 0 db_subscr_get_by_imsi(dbc, imsi0, &g_subscr) --> 0 struct hlr_subscriber { -- To view, visit https://gerrit.osmocom.org/13711 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I1a6dd85387723dab5487c53b33d2d9ec6d05d006 Gerrit-Change-Number: 13711 Gerrit-PatchSet: 5 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:19:50 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:19:50 +0000 Subject: Change in osmo-hlr[master]: db_hlr.c: add db_subscr_exists_by_imsi() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13712 ) Change subject: db_hlr.c: add db_subscr_exists_by_imsi() ...................................................................... db_hlr.c: add db_subscr_exists_by_imsi() Check if a subscriber exists without generating an error log entry if it does not. This is cheaper than db_subscr_get_by_imsi(), as it does not fetch the subscriber entry. subscriber-create-on-demand will use this function. Related: OS#2542 Change-Id: I63818c0dd4fd22b41dadeeba2a07a651b5454c54 --- M src/db.c M src/db.h M src/db_hlr.c M tests/db/db_test.c M tests/db/db_test.err 5 files changed, 40 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve diff --git a/src/db.c b/src/db.c index 770c3a4..9cad263 100644 --- a/src/db.c +++ b/src/db.c @@ -79,6 +79,7 @@ " VALUES($subscriber_id, $algo_id_3g, $k, $op, $opc, $ind_bitlen)", [DB_STMT_AUC_3G_DELETE] = "DELETE FROM auc_3g WHERE subscriber_id = $subscriber_id", [DB_STMT_SET_LAST_LU_SEEN] = "UPDATE subscriber SET last_lu_seen = datetime($val, 'unixepoch') WHERE id = $subscriber_id", + [DB_STMT_EXISTS_BY_IMSI] = "SELECT 1 FROM subscriber WHERE imsi = $imsi", }; static void sql3_error_log_cb(void *arg, int err_code, const char *msg) diff --git a/src/db.h b/src/db.h index 3cb42e4..8543085 100644 --- a/src/db.h +++ b/src/db.h @@ -28,6 +28,7 @@ DB_STMT_AUC_3G_INSERT, DB_STMT_AUC_3G_DELETE, DB_STMT_SET_LAST_LU_SEEN, + DB_STMT_EXISTS_BY_IMSI, _NUM_DB_STMT }; @@ -130,6 +131,8 @@ const struct sub_auth_data_str *aud); int db_subscr_update_imei_by_imsi(struct db_context *dbc, const char* imsi, const char *imei); +int db_subscr_exists_by_imsi(struct db_context *dbc, const char *imsi); + int db_subscr_get_by_imsi(struct db_context *dbc, const char *imsi, struct hlr_subscriber *subscr); int db_subscr_get_by_msisdn(struct db_context *dbc, const char *msisdn, diff --git a/src/db_hlr.c b/src/db_hlr.c index 40209c5..c59daf7 100644 --- a/src/db_hlr.c +++ b/src/db_hlr.c @@ -511,6 +511,31 @@ return ret; } +/*! Check if a subscriber exists in the HLR database. + * \param[in, out] dbc database context. + * \param[in] imsi ASCII string of IMSI digits. + * \returns 0 if it exists, -ENOENT if it does not exist, -EIO on database error. + */ +int db_subscr_exists_by_imsi(struct db_context *dbc, const char *imsi) { + sqlite3_stmt *stmt = dbc->stmt[DB_STMT_EXISTS_BY_IMSI]; + const char *err; + int rc; + + if (!db_bind_text(stmt, NULL, imsi)) + return -EIO; + + rc = sqlite3_step(stmt); + db_remove_reset(stmt); + if (rc == SQLITE_ROW) + return 0; /* exists */ + if (rc == SQLITE_DONE) + return -ENOENT; /* does not exist */ + + err = sqlite3_errmsg(dbc->db); + LOGP(DAUC, LOGL_ERROR, "Failed to check if subscriber exists by IMSI='%s': %s\n", imsi, err); + return rc; +} + /*! Retrieve subscriber data from the HLR database. * \param[in,out] dbc database context. * \param[in] imsi ASCII string of IMSI digits. diff --git a/tests/db/db_test.c b/tests/db/db_test.c index 72feed4..217a8c5 100644 --- a/tests/db/db_test.c +++ b/tests/db/db_test.c @@ -256,6 +256,10 @@ ASSERT_SEL(imsi, short_imsi, 0); id_short = g_subscr.id; + comment("Check if subscriber exists (by IMSI)"); + + ASSERT_RC(db_subscr_exists_by_imsi(dbc, imsi0), 0); + ASSERT_RC(db_subscr_exists_by_imsi(dbc, unknown_imsi), -ENOENT); comment("Set valid / invalid MSISDN"); diff --git a/tests/db/db_test.err b/tests/db/db_test.err index 979562e..0701089 100644 --- a/tests/db/db_test.err +++ b/tests/db/db_test.err @@ -93,6 +93,13 @@ } +--- Check if subscriber exists (by IMSI) + +db_subscr_exists_by_imsi(dbc, imsi0) --> 0 + +db_subscr_exists_by_imsi(dbc, unknown_imsi) --> -ENOENT + + --- Set valid / invalid MSISDN db_subscr_get_by_imsi(dbc, imsi0, &g_subscr) --> 0 -- To view, visit https://gerrit.osmocom.org/13712 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I63818c0dd4fd22b41dadeeba2a07a651b5454c54 Gerrit-Change-Number: 13712 Gerrit-PatchSet: 5 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:19:54 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:19:54 +0000 Subject: Change in osmo-hlr[master]: db_hlr.c: add db_subscr_exists_by_msisdn() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13719 ) Change subject: db_hlr.c: add db_subscr_exists_by_msisdn() ...................................................................... db_hlr.c: add db_subscr_exists_by_msisdn() Check if a subscriber exists without generating an error log entry if it does not. This is cheaper than db_subscr_get_by_msisdn(), as it does not fetch the subscriber entry. subscriber-create-on-demand will use this function to generate a random unique MSISDN for new subscribers. Related: OS#2542 Change-Id: Ibfbc408c966197682ba2b12d166ade4bfeb7abc2 --- M src/db.c M src/db.h M src/db_hlr.c M tests/db/db_test.c M tests/db/db_test.err 5 files changed, 42 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve diff --git a/src/db.c b/src/db.c index 9cad263..7de61a2 100644 --- a/src/db.c +++ b/src/db.c @@ -80,6 +80,7 @@ [DB_STMT_AUC_3G_DELETE] = "DELETE FROM auc_3g WHERE subscriber_id = $subscriber_id", [DB_STMT_SET_LAST_LU_SEEN] = "UPDATE subscriber SET last_lu_seen = datetime($val, 'unixepoch') WHERE id = $subscriber_id", [DB_STMT_EXISTS_BY_IMSI] = "SELECT 1 FROM subscriber WHERE imsi = $imsi", + [DB_STMT_EXISTS_BY_MSISDN] = "SELECT 1 FROM subscriber WHERE msisdn = $msisdn", }; static void sql3_error_log_cb(void *arg, int err_code, const char *msg) diff --git a/src/db.h b/src/db.h index 8543085..12e74f8 100644 --- a/src/db.h +++ b/src/db.h @@ -29,6 +29,7 @@ DB_STMT_AUC_3G_DELETE, DB_STMT_SET_LAST_LU_SEEN, DB_STMT_EXISTS_BY_IMSI, + DB_STMT_EXISTS_BY_MSISDN, _NUM_DB_STMT }; @@ -132,6 +133,7 @@ int db_subscr_update_imei_by_imsi(struct db_context *dbc, const char* imsi, const char *imei); int db_subscr_exists_by_imsi(struct db_context *dbc, const char *imsi); +int db_subscr_exists_by_msisdn(struct db_context *dbc, const char *msisdn); int db_subscr_get_by_imsi(struct db_context *dbc, const char *imsi, struct hlr_subscriber *subscr); diff --git a/src/db_hlr.c b/src/db_hlr.c index c59daf7..362dcf2 100644 --- a/src/db_hlr.c +++ b/src/db_hlr.c @@ -560,6 +560,33 @@ return rc; } +/*! Check if a subscriber exists in the HLR database. + * \param[in, out] dbc database context. + * \param[in] msisdn ASCII string of MSISDN digits. + * \returns 0 if it exists, -ENOENT if it does not exist, -EIO on database error. + */ +int db_subscr_exists_by_msisdn(struct db_context *dbc, const char *msisdn) +{ + sqlite3_stmt *stmt = dbc->stmt[DB_STMT_EXISTS_BY_MSISDN]; + const char *err; + int rc; + + if (!db_bind_text(stmt, NULL, msisdn)) + return -EIO; + + rc = sqlite3_step(stmt); + db_remove_reset(stmt); + if (rc == SQLITE_ROW) + return 0; /* exists */ + if (rc == SQLITE_DONE) + return -ENOENT; /* does not exist */ + + err = sqlite3_errmsg(dbc->db); + LOGP(DAUC, LOGL_ERROR, "Failed to check if subscriber exists " + "by MSISDN='%s': %s\n", msisdn, err); + return rc; +} + /*! Retrieve subscriber data from the HLR database. * \param[in,out] dbc database context. * \param[in] msisdn ASCII string of MSISDN digits. diff --git a/tests/db/db_test.c b/tests/db/db_test.c index 217a8c5..fdd62c5 100644 --- a/tests/db/db_test.c +++ b/tests/db/db_test.c @@ -294,6 +294,11 @@ ASSERT_SEL(imsi, imsi0, 0); ASSERT_SEL(msisdn, "5432101234567891", -ENOENT); + comment("Check if subscriber exists (by MSISDN)"); + + ASSERT_RC(db_subscr_exists_by_msisdn(dbc, "543210123456789"), 0); + ASSERT_RC(db_subscr_exists_by_msisdn(dbc, "5432101234567891"), -ENOENT); + comment("Set MSISDN on non-existent / invalid IMSI"); ASSERT_RC(db_subscr_update_msisdn_by_imsi(dbc, unknown_imsi, "99"), -ENOENT); diff --git a/tests/db/db_test.err b/tests/db/db_test.err index 0701089..4dc77e8 100644 --- a/tests/db/db_test.err +++ b/tests/db/db_test.err @@ -219,6 +219,13 @@ DAUC Cannot read subscriber from db: MSISDN='5432101234567891': No such subscriber +--- Check if subscriber exists (by MSISDN) + +db_subscr_exists_by_msisdn(dbc, "543210123456789") --> 0 + +db_subscr_exists_by_msisdn(dbc, "5432101234567891") --> -ENOENT + + --- Set MSISDN on non-existent / invalid IMSI db_subscr_update_msisdn_by_imsi(dbc, unknown_imsi, "99") --> -ENOENT -- To view, visit https://gerrit.osmocom.org/13719 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ibfbc408c966197682ba2b12d166ade4bfeb7abc2 Gerrit-Change-Number: 13719 Gerrit-PatchSet: 5 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:22:29 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:22:29 +0000 Subject: Change in osmo-hlr[master]: Create subscribers on demand In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13713 ) Change subject: Create subscribers on demand ...................................................................... Patch Set 7: Code-Review-1 (3 comments) let's use this chance to get rid of old mistakes in terms of naming https://gerrit.osmocom.org/#/c/13713/7//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/#/c/13713/7//COMMIT_MSG at 12 PS7, Line 12: -extension we don't call it an 'extension' anymore in the post-NITB world. Let's call it MSISDN, i.e. what it truly is. https://gerrit.osmocom.org/#/c/13713/7/src/hlr_vty.c File src/hlr_vty.c: https://gerrit.osmocom.org/#/c/13713/7/src/hlr_vty.c at 358 PS7, Line 358: extension msisdn https://gerrit.osmocom.org/#/c/13713/7/src/hlr_vty.c at 360 PS7, Line 360: extension MSISDN -- To view, visit https://gerrit.osmocom.org/13713 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd Gerrit-Change-Number: 13713 Gerrit-PatchSet: 7 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Sun, 19 May 2019 07:22:29 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:22:50 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:22:50 +0000 Subject: Change in osmo-hlr[master]: Document subscribers create on demand feature In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13715 ) Change subject: Document subscribers create on demand feature ...................................................................... Patch Set 8: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13715 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2dd4a56f7b8be8b5d0e6fc32e04459e5e278d0a9 Gerrit-Change-Number: 13715 Gerrit-PatchSet: 8 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Sun, 19 May 2019 07:22:50 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:23:57 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:23:57 +0000 Subject: Change in osmo-msc[master]: gsm_04_11: Log MT sms dst subscriber In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13555 ) Change subject: gsm_04_11: Log MT sms dst subscriber ...................................................................... Patch Set 5: Code-Review-1 vadim is right, let's abandon this. -- To view, visit https://gerrit.osmocom.org/13555 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I483ac61067f51d03f6f476821d8664da3d1f17b2 Gerrit-Change-Number: 13555 Gerrit-PatchSet: 5 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 19 May 2019 07:23:57 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:24:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:24:09 +0000 Subject: Change in osmo-msc[master]: gsm_04_11: Log MT sms dst subscriber In-Reply-To: References: Message-ID: Harald Welte has abandoned this change. ( https://gerrit.osmocom.org/13555 ) Change subject: gsm_04_11: Log MT sms dst subscriber ...................................................................... Abandoned LOG_TRANS is logging the MSISDN anyway. -- To view, visit https://gerrit.osmocom.org/13555 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: I483ac61067f51d03f6f476821d8664da3d1f17b2 Gerrit-Change-Number: 13555 Gerrit-PatchSet: 5 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:25:03 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:25:03 +0000 Subject: Change in osmo-msc[master]: build osmo-msc: add "missing" LIBASN1C_LIBS In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/7306 ) Change subject: build osmo-msc: add "missing" LIBASN1C_LIBS ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7306 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I39ae5e3f0f7661ca9ee5c17a500be28c461d7ec7 Gerrit-Change-Number: 7306 Gerrit-PatchSet: 4 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Comment-Date: Sun, 19 May 2019 07:25:03 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:25:04 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:25:04 +0000 Subject: Change in osmo-msc[master]: build osmo-msc: add "missing" LIBASN1C_LIBS In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/7306 ) Change subject: build osmo-msc: add "missing" LIBASN1C_LIBS ...................................................................... build osmo-msc: add "missing" LIBASN1C_LIBS in osmo-msc/Makefile.am, osmo-msc was actually missing the LIBASN1C_LIBS even though it included LIBASN1C_CFLAGS. Probably libasn1c is implicitly linked from libranap.so, but doesn't hurt to name it. When building without Iu support, the LIBOSMORANAP* and LIBASN1C* vars are empty, so no need to explicitly switch on BUILD_IU, just name them. Change-Id: I39ae5e3f0f7661ca9ee5c17a500be28c461d7ec7 --- M src/osmo-msc/Makefile.am 1 file changed, 2 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-msc/Makefile.am b/src/osmo-msc/Makefile.am index 9b54716..7b56c74 100644 --- a/src/osmo-msc/Makefile.am +++ b/src/osmo-msc/Makefile.am @@ -43,15 +43,11 @@ $(LIBOSMOABIS_LIBS) \ $(LIBOSMONETIF_LIBS) \ $(LIBSMPP34_LIBS) \ + $(LIBOSMORANAP_LIBS) \ + $(LIBASN1C_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ $(LIBOSMOMGCPCLIENT_LIBS) \ $(LIBOSMOGSUPCLIENT_LIBS) \ -ldbi \ -lsctp \ $(NULL) -if BUILD_IU -osmo_msc_LDADD += \ - $(LIBASN1C_LIBS) \ - $(LIBOSMORANAP_LIBS) \ - $(NULL) -endif -- To view, visit https://gerrit.osmocom.org/7306 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I39ae5e3f0f7661ca9ee5c17a500be28c461d7ec7 Gerrit-Change-Number: 7306 Gerrit-PatchSet: 5 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:26:28 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:26:28 +0000 Subject: Change in osmo-bsc[master]: vty: Add option to enable osmux towards MSC In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13922 ) Change subject: vty: Add option to enable osmux towards MSC ...................................................................... vty: Add option to enable osmux towards MSC Change-Id: I30c485c022f2d55e0a004f69b2503da7f91ecb74 --- M include/osmocom/bsc/Makefile.am M include/osmocom/bsc/bsc_msc_data.h A include/osmocom/bsc/osmux.h M src/osmo-bsc/osmo_bsc_vty.c 4 files changed, 36 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 89323c0..f44e7fc 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -41,6 +41,7 @@ osmo_bsc_rf.h \ osmo_bsc_sigtran.h \ bsc_msc_data.h \ + osmux.h \ paging.h \ pcu_if.h \ pcuif_proto.h \ diff --git a/include/osmocom/bsc/bsc_msc_data.h b/include/osmocom/bsc/bsc_msc_data.h index debd240..271bdd4 100644 --- a/include/osmocom/bsc/bsc_msc_data.h +++ b/include/osmocom/bsc/bsc_msc_data.h @@ -30,6 +30,7 @@ #include "debug.h" #include "osmo_bsc_lcls.h" +#include "osmux.h" #include #include @@ -129,6 +130,9 @@ uint32_t x_osmo_ign; bool x_osmo_ign_configured; + + /* Whether we want to use Osmux against this MSC. Controlled via VTY */ + enum osmux_usage use_osmux; }; /* diff --git a/include/osmocom/bsc/osmux.h b/include/osmocom/bsc/osmux.h new file mode 100644 index 0000000..aa3d1ab --- /dev/null +++ b/include/osmocom/bsc/osmux.h @@ -0,0 +1,7 @@ +#pragma once + +enum osmux_usage { + OSMUX_USAGE_OFF = 0, + OSMUX_USAGE_ON = 1, + OSMUX_USAGE_ONLY = 2, +}; diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c index 78196cf..4591ad1 100644 --- a/src/osmo-bsc/osmo_bsc_vty.c +++ b/src/osmo-bsc/osmo_bsc_vty.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -197,6 +198,11 @@ else vty_out(vty, " mgw x-osmo-ign call-id%s", VTY_NEWLINE); } + + if (msc->use_osmux != OSMUX_USAGE_OFF) { + vty_out(vty, " osmux %s%s", msc->use_osmux == OSMUX_USAGE_ON ? "on" : "only", + VTY_NEWLINE); + } } static int config_write_msc(struct vty *vty) @@ -708,6 +714,23 @@ return CMD_SUCCESS; } +#define OSMUX_STR "RTP multiplexing\n" +DEFUN(cfg_msc_osmux, + cfg_msc_osmux_cmd, + "osmux (on|off|only)", + OSMUX_STR "Enable OSMUX\n" "Disable OSMUX\n" "Only use OSMUX\n") +{ + struct bsc_msc_data *msc = bsc_msc_data(vty); + if (strcmp(argv[0], "off") == 0) + msc->use_osmux = OSMUX_USAGE_OFF; + else if (strcmp(argv[0], "on") == 0) + msc->use_osmux = OSMUX_USAGE_ON; + else if (strcmp(argv[0], "only") == 0) + msc->use_osmux = OSMUX_USAGE_ONLY; + + return CMD_SUCCESS; +} + DEFUN(cfg_net_bsc_mid_call_text, cfg_net_bsc_mid_call_text_cmd, "mid-call-text .TEXT", @@ -1045,6 +1068,7 @@ mgcp_client_vty_init(net, MSC_NODE, net->mgw.conf); install_element(MSC_NODE, &cfg_msc_mgw_x_osmo_ign_cmd); install_element(MSC_NODE, &cfg_msc_no_mgw_x_osmo_ign_cmd); + install_element(MSC_NODE, &cfg_msc_osmux_cmd); return 0; } -- To view, visit https://gerrit.osmocom.org/13922 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I30c485c022f2d55e0a004f69b2503da7f91ecb74 Gerrit-Change-Number: 13922 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:26:28 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:26:28 +0000 Subject: Change in osmo-bsc[master]: bssap: Detect MSC Osmux support on RESET (ACK) recv In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13923 ) Change subject: bssap: Detect MSC Osmux support on RESET (ACK) recv ...................................................................... bssap: Detect MSC Osmux support on RESET (ACK) recv Related: OS#2551 Depends on: libosmocore I28f83e2e32b9533c99e65ccc1562900ac2aec74e Change-Id: I830e38cc1ffb8b6ebbe299567507160f19beb528 --- M include/osmocom/bsc/bsc_msc_data.h M src/osmo-bsc/osmo_bsc_bssap.c 2 files changed, 25 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/bsc_msc_data.h b/include/osmocom/bsc/bsc_msc_data.h index 271bdd4..4720845 100644 --- a/include/osmocom/bsc/bsc_msc_data.h +++ b/include/osmocom/bsc/bsc_msc_data.h @@ -133,6 +133,8 @@ /* Whether we want to use Osmux against this MSC. Controlled via VTY */ enum osmux_usage use_osmux; + /* Whether we detected the MSC supports Osmux (during BSSMAP_RESET) */ + bool remote_supports_osmux; }; /* diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index e79a344..9dee265 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -51,6 +51,25 @@ * helpers for the assignment command */ +/* We expect MSC to provide use with an Osmocom extension TLV in BSSMAP_RESET to + * announce Osmux support */ +static void update_msc_osmux_support(struct bsc_msc_data *msc, + struct msgb *msg, unsigned int length) +{ + struct tlv_parsed tp; + int rc; + bool old_value = msc->remote_supports_osmux; + + rc = tlv_parse(&tp, gsm0808_att_tlvdef(), msg->l4h + 1, length - 1, 0, 0); + if (rc < 0) + LOGP(DMSC, LOGL_NOTICE, "Failed parsing TLV looking for Osmux support\n"); + + msc->remote_supports_osmux = !!TLVP_PRESENT(&tp, GSM0808_IE_OSMO_OSMUX_SUPPORT); + + if (old_value != msc->remote_supports_osmux) + LOGP(DMSC, LOGL_INFO, "MSC detected AoIP Osmux support changed: %d->%d\n", + old_value, msc->remote_supports_osmux); +} static int bssmap_handle_reset_ack(struct bsc_msc_data *msc, struct msgb *msg, unsigned int length) @@ -63,6 +82,8 @@ * that we have successfully received the reset-ack message */ a_reset_ack_confirm(msc); + update_msc_osmux_support(msc, msg, length); + return 0; } @@ -81,6 +102,8 @@ /* Drop all ongoing paging requests that this MSC has created on any BTS */ paging_flush_network(msc->network, msc); + update_msc_osmux_support(msc, msg, length); + /* Inform the MSC that we have received the reset request and * that we acted accordingly */ osmo_bsc_sigtran_tx_reset_ack(msc); -- To view, visit https://gerrit.osmocom.org/13923 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I830e38cc1ffb8b6ebbe299567507160f19beb528 Gerrit-Change-Number: 13923 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:26:29 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:26:29 +0000 Subject: Change in osmo-bsc[master]: bssap: Announce Osmux support on RESET (ACK) send In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13924 ) Change subject: bssap: Announce Osmux support on RESET (ACK) send ...................................................................... bssap: Announce Osmux support on RESET (ACK) send Related: OS#2551 Depends on: libosmocore I28f83e2e32b9533c99e65ccc1562900ac2aec74e Change-Id: I6b5b475b6109a2882051445762e27046d015b770 --- M src/osmo-bsc/osmo_bsc_sigtran.c 1 file changed, 16 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index f2a6d08..5d61c32 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -82,6 +82,14 @@ return -1; } +/* Patch regular BSSMAP RESET to add extra T to announce Osmux support (osmocom extension) */ +static void _gsm0808_extend_announce_osmux(struct msgb *msg) +{ + OSMO_ASSERT(msg->l3h[1] == msgb_l3len(msg) - 2); /*TL not in len */ + msgb_put_u8(msg, GSM0808_IE_OSMO_OSMUX_SUPPORT); + msg->l3h[1] = msgb_l3len(msg) - 2; +} + /* Send reset to MSC */ static void osmo_bsc_sigtran_tx_reset(const struct bsc_msc_data *msc) { @@ -92,6 +100,10 @@ OSMO_ASSERT(ss7); LOGP(DMSC, LOGL_NOTICE, "Sending RESET to MSC: %s\n", osmo_sccp_addr_name(ss7, &msc->a.msc_addr)); msg = gsm0808_create_reset(); + + if (msc->use_osmux != OSMUX_USAGE_OFF) + _gsm0808_extend_announce_osmux(msg); + osmo_sccp_tx_unitdata_msg(msc->a.sccp_user, &msc->a.bsc_addr, &msc->a.msc_addr, msg); } @@ -107,6 +119,10 @@ OSMO_ASSERT(ss7); LOGP(DMSC, LOGL_NOTICE, "Sending RESET ACK to MSC: %s\n", osmo_sccp_addr_name(ss7, &msc->a.msc_addr)); msg = gsm0808_create_reset_ack(); + + if (msc->use_osmux != OSMUX_USAGE_OFF) + _gsm0808_extend_announce_osmux(msg); + osmo_sccp_tx_unitdata_msg(msc->a.sccp_user, &msc->a.bsc_addr, &msc->a.msc_addr, msg); } -- To view, visit https://gerrit.osmocom.org/13924 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I6b5b475b6109a2882051445762e27046d015b770 Gerrit-Change-Number: 13924 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:27:24 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:27:24 +0000 Subject: Change in osmo-msc[master]: vty: Add option to enable osmux towards BSCs In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14038 ) Change subject: vty: Add option to enable osmux towards BSCs ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14038 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6de1be0322ddbdc115074ebb6be2598ebf6c95db Gerrit-Change-Number: 14038 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 19 May 2019 07:27:24 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:27:52 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:27:52 +0000 Subject: Change in osmo-msc[master]: bssap: Detect BSC Osmux support on RESET (ACK) recv In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14039 ) Change subject: bssap: Detect BSC Osmux support on RESET (ACK) recv ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14039 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If4f33da9b414ab194098755d2c5be85e1fce5d31 Gerrit-Change-Number: 14039 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 19 May 2019 07:27:52 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:28:02 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:28:02 +0000 Subject: Change in osmo-msc[master]: vty: Add option to enable osmux towards BSCs In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14038 ) Change subject: vty: Add option to enable osmux towards BSCs ...................................................................... vty: Add option to enable osmux towards BSCs Change-Id: I6de1be0322ddbdc115074ebb6be2598ebf6c95db --- M include/osmocom/msc/Makefile.am M include/osmocom/msc/gsm_data.h A include/osmocom/msc/osmux.h M src/libmsc/msc_vty.c M tests/test_nodes.vty 5 files changed, 40 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am index 9ca4c38..0d7d45c 100644 --- a/include/osmocom/msc/Makefile.am +++ b/include/osmocom/msc/Makefile.am @@ -28,6 +28,7 @@ msc_t_remote.h \ msub.h \ neighbor_ident.h \ + osmux.h \ paging.h \ ran_conn.h \ ran_infra.h \ diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 42bb69a..f6e3ed9 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -19,6 +19,7 @@ #include #include "gsm_data_shared.h" +#include "osmux.h" /** annotations for msgb ownership */ #define __uses @@ -231,6 +232,9 @@ uint64_t range_end; uint64_t next; } handover_number; + + /* Whether we want to use Osmux against BSCs. Controlled via VTY */ + enum osmux_usage use_osmux; }; struct osmo_esme; diff --git a/include/osmocom/msc/osmux.h b/include/osmocom/msc/osmux.h new file mode 100644 index 0000000..7af32fc --- /dev/null +++ b/include/osmocom/msc/osmux.h @@ -0,0 +1,11 @@ +#pragma once + +enum osmux_usage { + /* MSC won't use Osmux in call legs towards its RAN */ + OSMUX_USAGE_OFF = 0, + /* MSC will use Osmux in call legs towards RAN as long as RAN announced support for it */ + OSMUX_USAGE_ON = 1, + /* MSC will always use Osmux in call legs towards its RAN, and will + reject calls for RANs which didn't announce support for it */ + OSMUX_USAGE_ONLY = 2, +}; diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index 5c58221..0c07bc2 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -59,6 +59,7 @@ #include #include #include +#include #include #include #include @@ -565,6 +566,22 @@ return CMD_SUCCESS; } +#define OSMUX_STR "RTP multiplexing\n" +DEFUN(cfg_msc_osmux, + cfg_msc_osmux_cmd, + "osmux (on|off|only)", + OSMUX_STR "Enable OSMUX\n" "Disable OSMUX\n" "Only use OSMUX\n") +{ + if (strcmp(argv[0], "off") == 0) + gsmnet->use_osmux = OSMUX_USAGE_OFF; + else if (strcmp(argv[0], "on") == 0) + gsmnet->use_osmux = OSMUX_USAGE_ON; + else if (strcmp(argv[0], "only") == 0) + gsmnet->use_osmux = OSMUX_USAGE_ONLY; + + return CMD_SUCCESS; +} + static int config_write_msc(struct vty *vty) { vty_out(vty, "msc%s", VTY_NEWLINE); @@ -615,6 +632,11 @@ gsmnet->handover_number.range_start, gsmnet->handover_number.range_end, VTY_NEWLINE); + if (gsmnet->use_osmux != OSMUX_USAGE_OFF) { + vty_out(vty, " osmux %s%s", gsmnet->use_osmux == OSMUX_USAGE_ON ? "on" : "only", + VTY_NEWLINE); + } + mgcp_client_config_write(vty, " "); #ifdef BUILD_IU ranap_iu_vty_config_write(vty, " "); @@ -1757,6 +1779,7 @@ install_element(MSC_NODE, &cfg_msc_emergency_msisdn_cmd); install_element(MSC_NODE, &cfg_msc_sms_over_gsup_cmd); install_element(MSC_NODE, &cfg_msc_no_sms_over_gsup_cmd); + install_element(MSC_NODE, &cfg_msc_osmux_cmd); install_element(MSC_NODE, &cfg_msc_handover_number_range_cmd); neighbor_ident_vty_init(msc_network); diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty index cdb3f8a..fb7b1c5 100644 --- a/tests/test_nodes.vty +++ b/tests/test_nodes.vty @@ -45,6 +45,7 @@ emergency-call route-to-msisdn MSISDN sms-over-gsup no sms-over-gsup + osmux (on|off|only) handover-number range MSISDN_FIRST MSISDN_LAST neighbor (a|iu) lac <0-65535> (ran-pc|msc-ipa-name) RAN_PC_OR_MSC_IPA_NAME neighbor (a|iu) lac-ci <0-65535> <0-65535> (ran-pc|msc-ipa-name) RAN_PC_OR_MSC_IPA_NAME -- To view, visit https://gerrit.osmocom.org/14038 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I6de1be0322ddbdc115074ebb6be2598ebf6c95db Gerrit-Change-Number: 14038 Gerrit-PatchSet: 4 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:28:02 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:28:02 +0000 Subject: Change in osmo-msc[master]: bssap: Detect BSC Osmux support on RESET (ACK) recv In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14039 ) Change subject: bssap: Detect BSC Osmux support on RESET (ACK) recv ...................................................................... bssap: Detect BSC Osmux support on RESET (ACK) recv Related: OS#2551 Depends: libosmocore.git I28f83e2e32b9533c99e65ccc1562900ac2aec74e Change-Id: If4f33da9b414ab194098755d2c5be85e1fce5d31 --- M include/osmocom/msc/ran_peer.h M src/libmsc/ran_peer.c 2 files changed, 45 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/msc/ran_peer.h b/include/osmocom/msc/ran_peer.h index e3ff59d..06ab500 100644 --- a/include/osmocom/msc/ran_peer.h +++ b/include/osmocom/msc/ran_peer.h @@ -51,6 +51,9 @@ /* See cell_id_list.h */ struct llist_head cells_seen; + + /* Whether we detected the BSC supports Osmux (during BSSMAP_RESET) */ + bool remote_supports_osmux; }; #define ran_peer_for_each_ran_conn(RAN_CONN, RAN_PEER) \ diff --git a/src/libmsc/ran_peer.c b/src/libmsc/ran_peer.c index 35f2842..ce26794 100644 --- a/src/libmsc/ran_peer.c +++ b/src/libmsc/ran_peer.c @@ -122,13 +122,41 @@ } } +/* TODO: create an sccp_ran_ops.rx_reset(_ack) to handle this differently on 2g and 3G */ +/* We expect RAN peer to provide use with an Osmocom extension TLV in BSSMAP_RESET to + * announce Osmux support */ +static void ran_peer_update_osmux_support(struct ran_peer *rp, struct msgb *msg) +{ + struct tlv_parsed tp; + int rc; + bool old_value = rp->remote_supports_osmux; + + OSMO_ASSERT(msg); + msg->l3h = msg->l2h + sizeof(struct bssmap_header); + rc = tlv_parse(&tp, gsm0808_att_tlvdef(), msg->l3h + 1, msgb_l3len(msg) - 1, 0, 0); + if (rc < 0) + LOG_RAN_PEER(rp, LOGL_NOTICE, "Failed parsing TLV looking for Osmux support\n"); + + if (TLVP_PRESENT(&tp, GSM0808_IE_OSMO_OSMUX_SUPPORT)) { + rp->remote_supports_osmux = true; + } else { + rp->remote_supports_osmux = false; + } + + if (old_value != rp->remote_supports_osmux) + LOG_RAN_PEER(rp, LOGL_INFO, "BSC detected AoIP Osmux support changed: %d->%d\n", + old_value, rp->remote_supports_osmux); +} + /* Drop all SCCP connections for this ran_peer, respond with RESET ACKNOWLEDGE and move to READY state. */ -static void ran_peer_rx_reset(struct ran_peer *rp) +static void ran_peer_rx_reset(struct ran_peer *rp, struct msgb* msg) { struct msgb *reset_ack; ran_peer_discard_all_conns(rp); + ran_peer_update_osmux_support(rp, msg); + reset_ack = rp->sri->ran->sccp_ran_ops.make_reset_msg(rp->sri, SCCP_RAN_MSG_RESET_ACK); if (!reset_ack) { @@ -152,9 +180,10 @@ ran_peer_state_chg(rp, RAN_PEER_ST_READY); } -static void ran_peer_rx_reset_ack(struct ran_peer *rp) +static void ran_peer_rx_reset_ack(struct ran_peer *rp, struct msgb* msg) { ran_peer_state_chg(rp, RAN_PEER_ST_READY); + ran_peer_update_osmux_support(rp, msg); } void ran_peer_reset(struct ran_peer *rp) @@ -228,6 +257,7 @@ { struct ran_peer *rp = fi->priv; struct ran_peer_ev_ctx *ctx; + struct msgb *msg; switch (event) { @@ -257,7 +287,8 @@ return; case RAN_PEER_EV_RX_RESET: - ran_peer_rx_reset(rp); + msg = (struct msgb*)data; + ran_peer_rx_reset(rp, msg); return; default: @@ -270,11 +301,13 @@ { struct ran_peer *rp = fi->priv; struct ran_peer_ev_ctx *ctx; + struct msgb *msg; switch (event) { case RAN_PEER_EV_RX_RESET_ACK: - ran_peer_rx_reset_ack(rp); + msg = (struct msgb*)data; + ran_peer_rx_reset_ack(rp, msg); return; case RAN_PEER_EV_MSG_UP_CO: @@ -289,7 +322,8 @@ return; case RAN_PEER_EV_RX_RESET: - ran_peer_rx_reset(rp); + msg = (struct msgb*)data; + ran_peer_rx_reset(rp, msg); return; default: @@ -330,6 +364,7 @@ struct ran_peer_ev_ctx *ctx; struct ran_conn *conn; struct an_apdu an_apdu; + struct msgb *msg; switch (event) { @@ -397,7 +432,8 @@ return; case RAN_PEER_EV_RX_RESET: - ran_peer_rx_reset(rp); + msg = (struct msgb*)data; + ran_peer_rx_reset(rp, msg); return; default: -- To view, visit https://gerrit.osmocom.org/14039 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If4f33da9b414ab194098755d2c5be85e1fce5d31 Gerrit-Change-Number: 14039 Gerrit-PatchSet: 4 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:28:03 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:28:03 +0000 Subject: Change in osmo-msc[master]: a_iface: Announce Osmux support on RESET (ACK) send In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14040 ) Change subject: a_iface: Announce Osmux support on RESET (ACK) send ...................................................................... a_iface: Announce Osmux support on RESET (ACK) send Related: OS#2551 Depends: libosmocore.git I28f83e2e32b9533c99e65ccc1562900ac2aec74e Change-Id: Id607f60749e923755cb38179bc283a7957670653 --- M src/libmsc/ran_msg_a.c 1 file changed, 24 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c index 805308c..64590a1 100644 --- a/src/libmsc/ran_msg_a.c +++ b/src/libmsc/ran_msg_a.c @@ -34,6 +34,7 @@ #include #include #include +#include #define LOG_RAN_A_DEC(RAN_DEC, level, fmt, args...) \ LOG_RAN_DEC(RAN_DEC, DBSSAP, level, "BSSMAP: " fmt, ## args) @@ -1239,16 +1240,37 @@ } } +/* Patch regular BSSMAP RESET to add extra T to announce Osmux support (osmocom extension) */ +static void _gsm0808_extend_announce_osmux(struct msgb *msg) +{ + OSMO_ASSERT(msg->l3h[1] == msgb_l3len(msg) - 2); /*TL not in len */ + msgb_put_u8(msg, GSM0808_IE_OSMO_OSMUX_SUPPORT); + msg->l3h[1] = msgb_l3len(msg) - 2; +} + struct msgb *bssmap_make_reset_msg(const struct sccp_ran_inst *sri, enum reset_msg_type type) { + struct gsm_network *net = sri->user_data; + struct msgb *msg; + switch (type) { case SCCP_RAN_MSG_RESET: - return gsm0808_create_reset(); + msg = gsm0808_create_reset(); + break; case SCCP_RAN_MSG_RESET_ACK: - return gsm0808_create_reset_ack(); + msg = gsm0808_create_reset_ack(); + break; default: return NULL; } + + if (!msg) + return NULL; + + if (net->use_osmux != OSMUX_USAGE_OFF) + _gsm0808_extend_announce_osmux(msg); + + return msg; } struct msgb *bssmap_make_paging_msg(const struct sccp_ran_inst *sri, const struct gsm0808_cell_id *page_cell_id, -- To view, visit https://gerrit.osmocom.org/14040 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id607f60749e923755cb38179bc283a7957670653 Gerrit-Change-Number: 14040 Gerrit-PatchSet: 4 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:28:32 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:28:32 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: endpoint_fsm: Add API to retrieve Osmux CID from MGW In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14031 ) Change subject: mgcp-cli: endpoint_fsm: Add API to retrieve Osmux CID from MGW ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14031 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic80d47f8eedda1c6ac8c33f1cafeb55c65e74692 Gerrit-Change-Number: 14031 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 19 May 2019 07:28:32 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:28:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:28:47 +0000 Subject: Change in osmo-mgw[master]: osmux: Redo read/write osmux glue code to have data routed correctly In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14036 ) Change subject: osmux: Redo read/write osmux glue code to have data routed correctly ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14036 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I60b6ba3ffdc74efff945ba13a0b736798bdf5d8c Gerrit-Change-Number: 14036 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 19 May 2019 07:28:47 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:28:49 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:28:49 +0000 Subject: Change in osmo-mgw[master]: osmux: Delay osmux enable of conn until remote addr is configured by ... In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14035 ) Change subject: osmux: Delay osmux enable of conn until remote addr is configured by MDCX ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14035 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I243e53681ebeb3d9cd8ed38bb132172b41745795 Gerrit-Change-Number: 14035 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 19 May 2019 07:28:49 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:28:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:28:53 +0000 Subject: Change in osmo-mgw[master]: osmux: Provide correct local port during mgcp resp In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14032 ) Change subject: osmux: Provide correct local port during mgcp resp ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14032 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I12c8fcdc8b772b9f92a70774406d4662f44bd9a9 Gerrit-Change-Number: 14032 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 19 May 2019 07:28:53 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:29:02 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:29:02 +0000 Subject: Change in osmo-mgw[master]: osmux: Use remote port to send osmux frames In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14033 ) Change subject: osmux: Use remote port to send osmux frames ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14033 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I01e590465fa247185d74103578681e9041249099 Gerrit-Change-Number: 14033 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 19 May 2019 07:29:02 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:29:07 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:29:07 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: endpoint_fsm: Add API to retrieve Osmux CID from MGW In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14031 ) Change subject: mgcp-cli: endpoint_fsm: Add API to retrieve Osmux CID from MGW ...................................................................... mgcp-cli: endpoint_fsm: Add API to retrieve Osmux CID from MGW Change-Id: Ic80d47f8eedda1c6ac8c33f1cafeb55c65e74692 --- M include/osmocom/mgcp_client/mgcp_client_endpoint_fsm.h M src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c 2 files changed, 15 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/include/osmocom/mgcp_client/mgcp_client_endpoint_fsm.h b/include/osmocom/mgcp_client/mgcp_client_endpoint_fsm.h index 73de292..d77371a 100644 --- a/include/osmocom/mgcp_client/mgcp_client_endpoint_fsm.h +++ b/include/osmocom/mgcp_client/mgcp_client_endpoint_fsm.h @@ -21,6 +21,7 @@ struct osmo_mgcpc_ep_ci *osmo_mgcpc_ep_ci_add(struct osmo_mgcpc_ep *ep, const char *label_fmt, ...); const struct mgcp_conn_peer *osmo_mgcpc_ep_ci_get_rtp_info(const struct osmo_mgcpc_ep_ci *ci); bool osmo_mgcpc_ep_ci_get_crcx_info_to_sockaddr(const struct osmo_mgcpc_ep_ci *ci, struct sockaddr_storage *dest); +bool osmo_mgcpc_ep_ci_get_crcx_info_to_osmux_cid(const struct osmo_mgcpc_ep_ci *ci, uint8_t* cid); void osmo_mgcpc_ep_ci_request(struct osmo_mgcpc_ep_ci *ci, enum mgcp_verb verb, const struct mgcp_conn_peer *verb_info, diff --git a/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c b/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c index a9bab87..420fc0f 100644 --- a/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c +++ b/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c @@ -489,6 +489,20 @@ return true; } +bool osmo_mgcpc_ep_ci_get_crcx_info_to_osmux_cid(const struct osmo_mgcpc_ep_ci *ci, uint8_t* cid) +{ + const struct mgcp_conn_peer *rtp_info; + + rtp_info = osmo_mgcpc_ep_ci_get_rtp_info(ci); + if (!rtp_info) + return false; + + if (!rtp_info->x_osmo_osmux_use) + return false; + + *cid = rtp_info->x_osmo_osmux_cid; + return true; +} static const struct osmo_tdef_state_timeout osmo_mgcpc_ep_fsm_timeouts[32] = { [OSMO_MGCPC_EP_ST_WAIT_MGW_RESPONSE] = { .T=2427001 }, -- To view, visit https://gerrit.osmocom.org/14031 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ic80d47f8eedda1c6ac8c33f1cafeb55c65e74692 Gerrit-Change-Number: 14031 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:29:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:29:08 +0000 Subject: Change in osmo-mgw[master]: osmux: Provide correct local port during mgcp resp In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14032 ) Change subject: osmux: Provide correct local port during mgcp resp ...................................................................... osmux: Provide correct local port during mgcp resp Also document some possible future improvements for local addr. Change-Id: I12c8fcdc8b772b9f92a70774406d4662f44bd9a9 --- M src/libosmo-mgcp/mgcp_network.c M src/libosmo-mgcp/mgcp_protocol.c M src/libosmo-mgcp/mgcp_sdp.c 3 files changed, 10 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index dbed156..650d4c0 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -86,7 +86,7 @@ } } - /* Select from preconfigured IP-Addresses */ + /* Select from preconfigured IP-Addresses. We don't have bind_addr for Osmux (yet?). */ if (endp->cfg->net_ports.bind_addr) { /* Check there is a bind IP for the RTP traffic configured, * if so, use that IP-Address */ diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 609b5fb..0831abb 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -300,6 +300,9 @@ const char *trans_id, bool add_conn_params) { + /* TODO: we may want to define another local_ip_osmux var to us for + OSMUX connections. Perhaps adding a new internal API to get it based + on conn type */ const char *addr = endp->cfg->local_ip; struct msgb *sdp; int rc; diff --git a/src/libosmo-mgcp/mgcp_sdp.c b/src/libosmo-mgcp/mgcp_sdp.c index 6b41f50..99e764b 100644 --- a/src/libosmo-mgcp/mgcp_sdp.c +++ b/src/libosmo-mgcp/mgcp_sdp.c @@ -512,6 +512,7 @@ struct sdp_fmtp_param fmtp_param; int rc; int payload_types[1]; + int local_port; struct sdp_fmtp_param fmtp_params[1]; unsigned int fmtp_params_len = 0; @@ -541,7 +542,11 @@ if (payload_type >= 0) { payload_types[0] = payload_type; - rc = add_audio(sdp, payload_types, 1, conn->end.local_port); + if (mgcp_conn_rtp_is_osmux(conn)) + local_port = endp->cfg->osmux_port; + else + local_port = conn->end.local_port; + rc = add_audio(sdp, payload_types, 1, local_port); if (rc < 0) goto buffer_too_small; -- To view, visit https://gerrit.osmocom.org/14032 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I12c8fcdc8b772b9f92a70774406d4662f44bd9a9 Gerrit-Change-Number: 14032 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:29:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:29:08 +0000 Subject: Change in osmo-mgw[master]: osmux: Use remote port to send osmux frames In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14033 ) Change subject: osmux: Use remote port to send osmux frames ...................................................................... osmux: Use remote port to send osmux frames Previously the local one was used but nobody cared because probably everybody was using default 1984 on different IP addresses. Change-Id: I01e590465fa247185d74103578681e9041249099 --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 7290ba3..9bbc1b2 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -323,7 +323,7 @@ { switch(conn->osmux.state) { case OSMUX_STATE_ACTIVATING: - if (osmux_enable_conn(endp, conn, &conn->end.addr, htons(endp->cfg->osmux_port)) < 0) { + if (osmux_enable_conn(endp, conn, &conn->end.addr, conn->end.rtp_port) < 0) { LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, "Could not enable osmux for conn:%s\n", mgcp_conn_dump(conn->conn)); @@ -332,7 +332,7 @@ LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, "Osmux CID %u for %s:%u is now enabled\n", conn->osmux.cid, inet_ntoa(conn->end.addr), - endp->cfg->osmux_port); + ntohs(conn->end.rtp_port)); return 0; case OSMUX_STATE_ENABLED: return 0; @@ -701,7 +701,7 @@ inet_ntoa(conn->end.addr), conn->osmux.cid); return mgcp_udp_send(osmux_fd.fd, &conn->end.addr, - htons(endp->cfg->osmux_port), buf, sizeof(buf)); + conn->end.rtp_port, buf, sizeof(buf)); } /* bsc-nat allocates/releases the Osmux circuit ID. +7 to round up to 8 bit boundary. */ -- To view, visit https://gerrit.osmocom.org/14033 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I01e590465fa247185d74103578681e9041249099 Gerrit-Change-Number: 14033 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:29:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:29:08 +0000 Subject: Change in osmo-mgw[master]: osmux: Improve logging around osmux enabling events In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14034 ) Change subject: osmux: Improve logging around osmux enabling events ...................................................................... osmux: Improve logging around osmux enabling events Change-Id: Iab687b97010fd484cb353b240b120c9c382066fa --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 6 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 9bbc1b2..4423194 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -325,12 +325,14 @@ case OSMUX_STATE_ACTIVATING: if (osmux_enable_conn(endp, conn, &conn->end.addr, conn->end.rtp_port) < 0) { LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, - "Could not enable osmux for conn:%s\n", + "Could not enable osmux for conn on %s: %s\n", + sending ? "sent" : "received", mgcp_conn_dump(conn->conn)); return -1; } LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, - "Osmux CID %u for %s:%u is now enabled\n", + "Osmux %s CID %u towards %s:%u is now enabled\n", + sending ? "sent" : "received", conn->osmux.cid, inet_ntoa(conn->end.addr), ntohs(conn->end.rtp_port)); return 0; @@ -697,8 +699,8 @@ return 0; LOGPCONN(conn->conn, DLMGCP, LOGL_DEBUG, - "sending OSMUX dummy load to %s CID %u\n", - inet_ntoa(conn->end.addr), conn->osmux.cid); + "sending OSMUX dummy load to %s:%u CID %u\n", + inet_ntoa(conn->end.addr), ntohs(conn->end.rtp_port), conn->osmux.cid); return mgcp_udp_send(osmux_fd.fd, &conn->end.addr, conn->end.rtp_port, buf, sizeof(buf)); -- To view, visit https://gerrit.osmocom.org/14034 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iab687b97010fd484cb353b240b120c9c382066fa Gerrit-Change-Number: 14034 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:29:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:29:09 +0000 Subject: Change in osmo-mgw[master]: osmux: Delay osmux enable of conn until remote addr is configured by ... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14035 ) Change subject: osmux: Delay osmux enable of conn until remote addr is configured by MDCX ...................................................................... osmux: Delay osmux enable of conn until remote addr is configured by MDCX Change-Id: I243e53681ebeb3d9cd8ed38bb132172b41745795 --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 8 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 4423194..536b65b 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -559,6 +559,7 @@ * overlapping RTP SSRC traveling to the BTSes behind the BSC, * similarly, for flows traveling to the MSC. */ + struct in_addr addr_unset = {}; static const uint32_t rtp_ssrc_winlen = UINT32_MAX / (OSMUX_CID_MAX + 1); uint16_t osmux_dummy = endp->cfg->osmux_dummy; @@ -570,6 +571,13 @@ return -1; } + /* Wait until we have the connection information from MDCX */ + if (memcmp(&conn->end.addr, &addr_unset, sizeof(addr_unset)) == 0) { + LOGPCONN(conn->conn, DLMGCP, LOGL_INFO, + "Osmux remote address/port still unknown\n"); + return -1; + } + conn->osmux.in = osmux_handle_lookup(endp->cfg, addr, port); if (!conn->osmux.in) { LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, -- To view, visit https://gerrit.osmocom.org/14035 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I243e53681ebeb3d9cd8ed38bb132172b41745795 Gerrit-Change-Number: 14035 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:29:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:29:09 +0000 Subject: Change in osmo-mgw[master]: osmux: Redo read/write osmux glue code to have data routed correctly In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14036 ) Change subject: osmux: Redo read/write osmux glue code to have data routed correctly ...................................................................... osmux: Redo read/write osmux glue code to have data routed correctly Remove old BTS/NET no longer in use and meaningless. Use new osmo-mgw APIs to inject payload RTP<->Osmux on the correct socket and conn. Change-Id: I60b6ba3ffdc74efff945ba13a0b736798bdf5d8c --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 78 insertions(+), 208 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 536b65b..7a817f8 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -178,6 +178,12 @@ memcpy(msg->data, buf, buf_len); msgb_put(msg, buf_len); + if (conn->osmux.state != OSMUX_STATE_ENABLED) { + LOGPCONN(conn->conn, DLMGCP, LOGL_INFO, "forwarding RTP to Osmux conn not yet enabled, dropping (cid=%d)\n", + conn->osmux.cid); + return -1; + } + while ((ret = osmux_xfrm_input(conn->osmux.in, msg, conn->osmux.cid)) > 0) { /* batch full, build and deliver it */ osmux_xfrm_input_deliver(conn->osmux.in); @@ -186,111 +192,54 @@ } /* Lookup the endpoint that corresponds to the specified address (port) */ -static struct mgcp_endpoint * -endpoint_lookup(struct mgcp_config *cfg, int cid, - struct in_addr *from_addr, int type) +static struct mgcp_conn_rtp* +osmux_conn_lookup(struct mgcp_config *cfg, uint8_t cid, + struct in_addr *from_addr) { - struct mgcp_endpoint *endp = NULL; + struct mgcp_endpoint *endp; + struct mgcp_conn *conn = NULL; + struct mgcp_conn_rtp * conn_rtp; int i; - struct mgcp_conn_rtp *conn_net = NULL; - struct mgcp_conn_rtp *conn_bts = NULL; for (i=0; itrunk.number_endpoints; i++) { - struct in_addr *this; endp = &cfg->trunk.endpoints[i]; -#if 0 - if (!tmp->allocated) - continue; -#endif + llist_for_each_entry(conn, &endp->conns, entry) { + if (conn->type != MGCP_CONN_TYPE_RTP) + continue; - switch(type) { - case MGCP_DEST_NET: - /* FIXME: Get rid of CONN_ID_XXX! */ - conn_net = mgcp_conn_get_rtp(endp, CONN_ID_NET); - if (conn_net) - this = &conn_net->end.addr; - else - this = NULL; - break; - case MGCP_DEST_BTS: - /* FIXME: Get rid of CONN_ID_XXX! */ - conn_bts = mgcp_conn_get_rtp(endp, CONN_ID_BTS); - if (conn_bts) - this = &conn_bts->end.addr; - else - this = NULL; - break; - default: - /* Should not ever happen */ - LOGP(DLMGCP, LOGL_ERROR, "Bad type %d. Fix your code.\n", type); - return NULL; + conn_rtp = &conn->u.rtp; + if (!mgcp_conn_rtp_is_osmux(conn_rtp)) + continue; + + if (conn_rtp->osmux.cid == cid) + return conn_rtp; } - - /* FIXME: Get rid of CONN_ID_XXX! */ - conn_net = mgcp_conn_get_rtp(endp, CONN_ID_NET); - if (conn_net && this && conn_net->osmux.cid == cid - && this->s_addr == from_addr->s_addr) - return endp; } - LOGP(DLMGCP, LOGL_ERROR, "Cannot find endpoint with cid=%d\n", cid); + LOGP(DLMGCP, LOGL_ERROR, "Cannot find osmux conn with cid=%d\n", cid); return NULL; } -static void scheduled_tx_net_cb(struct msgb *msg, void *data) +/* FIXME: this is declared and used in mgcp_network.c, but documentation of mgcp_dispatch_rtp_bridge_cb() states another enum is to be used */ +enum { + MGCP_PROTO_RTP, + MGCP_PROTO_RTCP, +}; + +static void scheduled_from_osmux_tx_rtp_cb(struct msgb *msg, void *data) { - struct mgcp_endpoint *endp = data; - struct mgcp_conn_rtp *conn_net = NULL; - struct mgcp_conn_rtp *conn_bts = NULL; - - /* FIXME: Get rid of CONN_ID_XXX! */ - conn_bts = mgcp_conn_get_rtp(endp, CONN_ID_BTS); - conn_net = mgcp_conn_get_rtp(endp, CONN_ID_NET); - if (!conn_bts || !conn_net) - return; - + struct mgcp_conn_rtp *conn = data; + struct mgcp_endpoint *endp = conn->conn->endp; struct sockaddr_in addr = { - .sin_addr = conn_net->end.addr, - .sin_port = conn_net->end.rtp_port, - }; + .sin_addr = conn->end.addr, + .sin_port = conn->end.rtp_port, + }; /* FIXME: not set/used in cb */ - rate_ctr_inc(&conn_bts->rate_ctr_group->ctr[RTP_PACKETS_TX_CTR]); - rate_ctr_add(&conn_bts->rate_ctr_group->ctr[RTP_OCTETS_TX_CTR], msg->len); - /* Send RTP data to NET */ - /* FIXME: Get rid of conn_bts and conn_net! */ - mgcp_send(endp, 1, &addr, (char *)msg->data, msg->len, - conn_bts, conn_net); - msgb_free(msg); -} - -static void scheduled_tx_bts_cb(struct msgb *msg, void *data) -{ - struct mgcp_endpoint *endp = data; - struct mgcp_conn_rtp *conn_net = NULL; - struct mgcp_conn_rtp *conn_bts = NULL; - - /* FIXME: Get rid of CONN_ID_XXX! */ - conn_bts = mgcp_conn_get_rtp(endp, CONN_ID_BTS); - conn_net = mgcp_conn_get_rtp(endp, CONN_ID_NET); - if (!conn_bts || !conn_net) - return; - - struct sockaddr_in addr = { - .sin_addr = conn_bts->end.addr, - .sin_port = conn_bts->end.rtp_port, - }; - - rate_ctr_inc(&conn_net->rate_ctr_group->ctr[RTP_PACKETS_TX_CTR]); - rate_ctr_add(&conn_net->rate_ctr_group->ctr[RTP_OCTETS_TX_CTR], msg->len); - - /* Send RTP data to BTS */ - /* FIXME: Get rid of conn_bts and conn_net! */ - mgcp_send(endp, 1, &addr, (char *)msg->data, msg->len, - conn_net, conn_bts); + endp->type->dispatch_rtp_cb(MGCP_PROTO_RTP, &addr, (char *)msg->data, msg->len, conn->conn); msgb_free(msg); } @@ -361,16 +310,40 @@ return 0; } +/* This is called from the bsc-nat */ +static int osmux_handle_dummy(struct mgcp_config *cfg, struct sockaddr_in *addr, + struct msgb *msg) +{ + uint8_t osmux_cid; + struct mgcp_conn_rtp *conn; + + if (osmux_legacy_dummy_parse_cid(addr, msg, &osmux_cid) < 0) + goto out; + + conn = osmux_conn_lookup(cfg, osmux_cid, &addr->sin_addr); + if (!conn) { + LOGP(DLMGCP, LOGL_ERROR, + "Cannot find conn for Osmux CID %d\n", osmux_cid); + goto out; + } + + endp_osmux_state_check(conn->conn->endp, conn, false); + /* Only needed to punch hole in firewall, it can be dropped */ +out: + msgb_free(msg); + return 0; +} + #define osmux_chunk_length(msg, rem) (rem - msg->len); -int osmux_read_from_bsc_nat_cb(struct osmo_fd *ofd, unsigned int what) +static int osmux_read_fd_cb(struct osmo_fd *ofd, unsigned int what) { struct msgb *msg; struct osmux_hdr *osmuxh; struct sockaddr_in addr; struct mgcp_config *cfg = ofd->data; uint32_t rem; - struct mgcp_conn_rtp *conn_bts = NULL; + struct mgcp_conn_rtp *conn_src; msg = osmux_recv(ofd, &addr); if (!msg) @@ -384,115 +357,32 @@ /* not any further processing dummy messages */ if (msg->data[0] == MGCP_DUMMY_LOAD) - goto out; + return osmux_handle_dummy(cfg, &addr, msg); rem = msg->len; while((osmuxh = osmux_xfrm_output_pull(msg)) != NULL) { - struct mgcp_endpoint *endp; - /* Yes, we use MGCP_DEST_NET to locate the origin */ - endp = endpoint_lookup(cfg, osmuxh->circuit_id, - &addr.sin_addr, MGCP_DEST_NET); - - /* FIXME: Get rid of CONN_ID_XXX! */ - conn_bts = mgcp_conn_get_rtp(endp, CONN_ID_BTS); - if (!conn_bts) - continue; - - if (!endp) { + conn_src = osmux_conn_lookup(cfg, osmuxh->circuit_id, + &addr.sin_addr); + if (!conn_src) { LOGP(DLMGCP, LOGL_ERROR, - "Cannot find an endpoint for circuit_id=%d\n", + "Cannot find a src conn for circuit_id=%d\n", osmuxh->circuit_id); goto out; } - if (endp_osmux_state_check(endp, conn_bts, false) == 0) { - conn_bts->osmux.stats.octets += osmux_chunk_length(msg, rem); - conn_bts->osmux.stats.chunks++; - osmux_xfrm_output_sched(&conn_bts->osmux.out, osmuxh); - } - rem = msg->len; - } -out: - msgb_free(msg); - return 0; -} -/* This is called from the bsc-nat */ -static int osmux_handle_dummy(struct mgcp_config *cfg, struct sockaddr_in *addr, - struct msgb *msg, int endp_type) -{ - struct mgcp_endpoint *endp; - uint8_t osmux_cid; - struct mgcp_conn_rtp *conn = NULL; - - if (osmux_legacy_dummy_parse_cid(addr, msg, &osmux_cid) < 0) - goto out; - - endp = endpoint_lookup(cfg, osmux_cid, &addr->sin_addr, endp_type); - if (!endp) { - LOGP(DLMGCP, LOGL_ERROR, - "Cannot find endpoint for Osmux CID %d\n", osmux_cid); - goto out; - } - - /* FIXME: Get rid of CONN_ID_XXX! */ - conn = mgcp_conn_get_rtp(endp, endp_type == MGCP_DEST_BTS ? CONN_ID_NET : CONN_ID_BTS); - if (!conn) - goto out; - - endp_osmux_state_check(endp, conn, false); - /* Only needed to punch hole in firewall, it can be dropped */ -out: - msgb_free(msg); - return 0; -} - -int osmux_read_from_bsc_cb(struct osmo_fd *ofd, unsigned int what) -{ - struct msgb *msg; - struct osmux_hdr *osmuxh; - struct sockaddr_in addr; - struct mgcp_config *cfg = ofd->data; - uint32_t rem; - struct mgcp_conn_rtp *conn_net = NULL; - - msg = osmux_recv(ofd, &addr); - if (!msg) - return -1; - - if (!cfg->osmux) { - LOGP(DLMGCP, LOGL_ERROR, - "bsc wants to use Osmux but bsc-nat did not request it\n"); - goto out; - } - - /* not any further processing dummy messages */ - if (msg->data[0] == MGCP_DUMMY_LOAD) - return osmux_handle_dummy(cfg, &addr, msg, MGCP_DEST_BTS); - - rem = msg->len; - while((osmuxh = osmux_xfrm_output_pull(msg)) != NULL) { - struct mgcp_endpoint *endp; - - /* Yes, we use MGCP_DEST_BTS to locate the origin */ - endp = endpoint_lookup(cfg, osmuxh->circuit_id, - &addr.sin_addr, MGCP_DEST_BTS); - - /* FIXME: Get rid of CONN_ID_XXX! */ - conn_net = mgcp_conn_get_rtp(endp, CONN_ID_NET); - if (!conn_net) - continue; - - if (!endp) { + /*conn_dst = mgcp_find_dst_conn(conn_src->conn); + if (!conn_dst) { LOGP(DLMGCP, LOGL_ERROR, - "Cannot find an endpoint for circuit_id=%d\n", + "Cannot find a dst conn for circuit_id=%d\n", osmuxh->circuit_id); goto out; - } - if (endp_osmux_state_check(endp, conn_net, false) == 0) { - conn_net->osmux.stats.octets += osmux_chunk_length(msg, rem); - conn_net->osmux.stats.chunks++; - osmux_xfrm_output_sched(&conn_net->osmux.out, osmuxh); + }*/ + + if (endp_osmux_state_check(conn_src->conn->endp, conn_src, false) == 0) { + conn_src->osmux.stats.octets += osmux_chunk_length(msg, rem); + conn_src->osmux.stats.chunks++; + osmux_xfrm_output_sched(&conn_src->osmux.out, osmuxh); } rem = msg->len; } @@ -505,17 +395,7 @@ { int ret; - switch(role) { - case OSMUX_ROLE_BSC: - osmux_fd.cb = osmux_read_from_bsc_nat_cb; - break; - case OSMUX_ROLE_BSC_NAT: - osmux_fd.cb = osmux_read_from_bsc_cb; - break; - default: - LOGP(DLMGCP, LOGL_ERROR, "wrong role for OSMUX\n"); - return -1; - } + osmux_fd.cb = osmux_read_fd_cb; osmux_fd.data = cfg; ret = mgcp_create_bind(cfg->osmux_addr, &osmux_fd, cfg->osmux_port); @@ -596,18 +476,8 @@ (conn->osmux.cid * rtp_ssrc_winlen) + (random() % rtp_ssrc_winlen)); - switch (endp->cfg->role) { - case MGCP_BSC_NAT: - conn->type = MGCP_OSMUX_BSC_NAT; - osmux_xfrm_output_set_tx_cb(&conn->osmux.out, - scheduled_tx_net_cb, endp); - break; - case MGCP_BSC: - conn->type = MGCP_OSMUX_BSC; - osmux_xfrm_output_set_tx_cb(&conn->osmux.out, - scheduled_tx_bts_cb, endp); - break; - } + osmux_xfrm_output_set_tx_cb(&conn->osmux.out, + scheduled_from_osmux_tx_rtp_cb, conn); conn->osmux.state = OSMUX_STATE_ENABLED; -- To view, visit https://gerrit.osmocom.org/14036 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I60b6ba3ffdc74efff945ba13a0b736798bdf5d8c Gerrit-Change-Number: 14036 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:29:27 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:29:27 +0000 Subject: Change in osmo-mgw[master]: osmux: Use DUMMY ft msg as per Osmux spec In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14067 ) Change subject: osmux: Use DUMMY ft msg as per Osmux spec ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14067 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib17d20b87b28aade49ba60519b56a96e694819af Gerrit-Change-Number: 14067 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 19 May 2019 07:29:27 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:30:44 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:30:44 +0000 Subject: Change in osmo-mgw[master]: mgw, mgcp-li: Handle X-Osmux param name as case insensitive In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14043 ) Change subject: mgw, mgcp-li: Handle X-Osmux param name as case insensitive ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14043 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iac073f1db46569b46eddeaecc9934a2986bd50f1 Gerrit-Change-Number: 14043 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 19 May 2019 07:30:44 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:30:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:30:47 +0000 Subject: Change in osmo-mgw[master]: mgw, mgcp-li: Handle X-Osmux param name as case insensitive In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14043 ) Change subject: mgw, mgcp-li: Handle X-Osmux param name as case insensitive ...................................................................... mgw, mgcp-li: Handle X-Osmux param name as case insensitive RFC3435 states most text (except SDP) must be handled as case insensitive. Related: OS#4001 Change-Id: Iac073f1db46569b46eddeaecc9934a2986bd50f1 --- M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/mgcp_msg.c M src/libosmo-mgcp/mgcp_protocol.c 3 files changed, 10 insertions(+), 7 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index d65a799..7074328 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -403,12 +403,12 @@ int osmux_cid; - if (strstr(line + 2, "Osmux: *")) { + if (strcasecmp(line + 2, "Osmux: *") == 0) { LOGP(DLMGCP, LOGL_DEBUG, "Parsed wilcard Osmux CID\n"); return -1; } - if (sscanf(line + 2, "Osmux: %u", &osmux_cid) != 1) { + if (sscanf(line + 2 + 7, "%u", &osmux_cid) != 1) { LOGP(DLMGCP, LOGL_ERROR, "Failed parsing Osmux in MGCP msg line: %s\n", line); return -2; @@ -602,7 +602,8 @@ goto exit; break; case 'X': - if (strncmp("Osmux: ", line + 2, strlen("Osmux: ")) == 0) { + case 'x': + if (strncasecmp("Osmux: ", line + 2, strlen("Osmux: ")) == 0) { rc = mgcp_parse_osmux_cid(line); if (rc < 0) { /* -1: we don't want wildcards in response. -2: error */ diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c index a31bff4..59e0e91 100644 --- a/src/libosmo-mgcp/mgcp_msg.c +++ b/src/libosmo-mgcp/mgcp_msg.c @@ -360,12 +360,12 @@ int osmux_cid; - if (strstr(line + 2, "Osmux: *")) { + if (strcasecmp(line + 2, "Osmux: *") == 0) { LOGP(DLMGCP, LOGL_DEBUG, "Parsed wilcard Osmux CID\n"); return -1; } - if (sscanf(line + 2, "Osmux: %u", &osmux_cid) != 1) { + if (sscanf(line + 2 + 7, "%u", &osmux_cid) != 1) { LOGP(DLMGCP, LOGL_ERROR, "Failed parsing Osmux in MGCP msg line: %s\n", line); return -2; diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 0831abb..74926ad 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -816,7 +816,8 @@ mode = (const char *)line + 3; break; case 'X': - if (strncmp("Osmux: ", line + 2, strlen("Osmux: ")) == 0) { + case 'x': + if (strncasecmp("Osmux: ", line + 2, strlen("Osmux: ")) == 0) { /* If osmux is disabled, just skip setting it up */ if (!p->endp->cfg->osmux) break; @@ -1099,7 +1100,8 @@ silent = strcmp("noanswer", line + 3) == 0; break; case 'X': - if (strncmp("Osmux: ", line + 2, strlen("Osmux: ")) == 0) { + case 'x': + if (strncasecmp("Osmux: ", line + 2, strlen("Osmux: ")) == 0) { /* If osmux is disabled, just skip setting it up */ if (!p->endp->cfg->osmux) break; -- To view, visit https://gerrit.osmocom.org/14043 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iac073f1db46569b46eddeaecc9934a2986bd50f1 Gerrit-Change-Number: 14043 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:30:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:30:47 +0000 Subject: Change in osmo-mgw[master]: osmux: Use DUMMY ft msg as per Osmux spec In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14067 ) Change subject: osmux: Use DUMMY ft msg as per Osmux spec ...................................................................... osmux: Use DUMMY ft msg as per Osmux spec That MGCP_DUMMY_LOAD is an old hack prior to Osmux spec update, and it's not nice since it cannot be 100% distinguished from a usual AMR ft frame. Let's use the correct DUMMY ft type and build it according spec. Allow handling differently the old format for a while until we are sure no old implementations (like bsc-nat) exist sending that kind of message. Change-Id: Ib17d20b87b28aade49ba60519b56a96e694819af --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 11 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 7a817f8..3b788b6 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -20,6 +20,7 @@ #include #include +#include #include #include @@ -554,7 +555,8 @@ * \returns bytes sent, -1 on error */ int osmux_send_dummy(struct mgcp_endpoint *endp, struct mgcp_conn_rtp *conn) { - char buf[1 + sizeof(uint8_t)]; + struct osmux_hdr *osmuxh; + int buf_len; struct in_addr addr_unset = {}; /*! The dummy packet will not be sent via the actual OSMUX connection, @@ -566,9 +568,6 @@ * endpoint may have already punched the hole in the firewall. This * approach is simple though. */ - buf[0] = MGCP_DUMMY_LOAD; - memcpy(&buf[1], &conn->osmux.cid, sizeof(conn->osmux.cid)); - /* Wait until we have the connection information from MDCX */ if (memcmp(&conn->end.addr, &addr_unset, sizeof(addr_unset)) == 0) return 0; @@ -576,12 +575,19 @@ if (endp_osmux_state_check(endp, conn, true) < 0) return 0; + buf_len = sizeof(struct osmux_hdr) + osmo_amr_bytes(AMR_FT_0); + osmuxh = (struct osmux_hdr *) alloca(buf_len); + memset(osmuxh, 0, buf_len); + osmuxh->ft = OSMUX_FT_DUMMY; + osmuxh->amr_ft = AMR_FT_0; + osmuxh->circuit_id = conn->osmux.cid; + LOGPCONN(conn->conn, DLMGCP, LOGL_DEBUG, "sending OSMUX dummy load to %s:%u CID %u\n", inet_ntoa(conn->end.addr), ntohs(conn->end.rtp_port), conn->osmux.cid); return mgcp_udp_send(osmux_fd.fd, &conn->end.addr, - conn->end.rtp_port, buf, sizeof(buf)); + conn->end.rtp_port, (char*)osmuxh, buf_len); } /* bsc-nat allocates/releases the Osmux circuit ID. +7 to round up to 8 bit boundary. */ -- To view, visit https://gerrit.osmocom.org/14067 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ib17d20b87b28aade49ba60519b56a96e694819af Gerrit-Change-Number: 14067 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:31:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:31:05 +0000 Subject: Change in osmo-mgw[master]: osmux: Fix loopback for Osmux connections In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14068 ) Change subject: osmux: Fix loopback for Osmux connections ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14068 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia30f5a14f150e4d151eac4d1046ea834f1685a5f Gerrit-Change-Number: 14068 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 19 May 2019 07:31:05 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:31:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:31:53 +0000 Subject: Change in osmo-mgw[master]: osmux: Fix CID release for non-enabled connections In-Reply-To: References: Message-ID: Harald Welte has uploaded a new patch set (#2) to the change originally created by Pau Espin Pedrol. ( https://gerrit.osmocom.org/14075 ) Change subject: osmux: Fix CID release for non-enabled connections ...................................................................... osmux: Fix CID release for non-enabled connections Change-Id: If65c70b421476776e20233733722d72aa26d69a8 --- M include/osmocom/mgcp/osmux.h M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_osmux.c 3 files changed, 15 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/75/14075/2 -- To view, visit https://gerrit.osmocom.org/14075 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: If65c70b421476776e20233733722d72aa26d69a8 Gerrit-Change-Number: 14075 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:32:07 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:32:07 +0000 Subject: Change in osmo-mgw[master]: osmux: Fix CID release for non-enabled connections In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14075 ) Change subject: osmux: Fix CID release for non-enabled connections ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14075 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If65c70b421476776e20233733722d72aa26d69a8 Gerrit-Change-Number: 14075 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 19 May 2019 07:32:07 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:32:10 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:32:10 +0000 Subject: Change in osmo-mgw[master]: osmux: Fix loopback for Osmux connections In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14068 ) Change subject: osmux: Fix loopback for Osmux connections ...................................................................... osmux: Fix loopback for Osmux connections Move code in RTP specific path to generic dispatch_rtp_cb. This way loopback logic is applied both for Osmux and RTP connections. Change-Id: Ia30f5a14f150e4d151eac4d1046ea834f1685a5f --- M src/libosmo-mgcp/mgcp_network.c 1 file changed, 16 insertions(+), 15 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 650d4c0..bb29d2b 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -1233,6 +1233,22 @@ * destination connection is known the RTP packet is sent via * the destination connection. */ + + /* Check if the connection is in loopback mode, if yes, just send the + * incoming data back to the origin */ + if (conn->mode == MGCP_CONN_LOOPBACK) { + /* When we are in loopback mode, we loop back all incoming + * packets back to their origin. We will use the originating + * address data from the UDP packet header to patch the + * outgoing address in connection on the fly */ + if (conn->u.rtp.end.rtp_port == 0) { + conn->u.rtp.end.addr = addr->sin_addr; + conn->u.rtp.end.rtp_port = addr->sin_port; + } + return mgcp_send_rtp(proto, addr, buf, + buf_size, &conn->u.rtp, &conn->u.rtp); + } + /* Find a destination connection. */ /* NOTE: This code path runs every time an RTP packet is received. The * function mgcp_find_dst_conn() we use to determine the detination @@ -1319,21 +1335,6 @@ mgcp_conn_watchdog_kick(conn_src->conn); - /* Check if the connection is in loopback mode, if yes, just send the - * incoming data back to the origin */ - if (conn_src->conn->mode == MGCP_CONN_LOOPBACK) { - /* When we are in loopback mode, we loop back all incoming - * packets back to their origin. We will use the originating - * address data from the UDP packet header to patch the - * outgoing address in connection on the fly */ - if (conn_src->end.rtp_port == 0) { - conn_src->end.addr = addr.sin_addr; - conn_src->end.rtp_port = addr.sin_port; - } - return mgcp_send_rtp(proto, &addr, buf, - len, conn_src, conn_src); - } - /* If AMR is configured for the ingress connection a conversion of the * framing mode (octet-aligned vs. bandwith-efficient is explicitly * define, then we check if the incoming payload matches that -- To view, visit https://gerrit.osmocom.org/14068 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ia30f5a14f150e4d151eac4d1046ea834f1685a5f Gerrit-Change-Number: 14068 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:33:27 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:33:27 +0000 Subject: Change in libosmocore[master]: TLV: Add one-shot TLV encoder In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/12900 ) Change subject: TLV: Add one-shot TLV encoder ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/12900 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I761a30bf20355a9f80a4a8e0c60b0b0f78515efe Gerrit-Change-Number: 12900 Gerrit-PatchSet: 7 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 19 May 2019 07:33:27 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:33:32 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:33:32 +0000 Subject: Change in libosmocore[master]: TLV: Add one-shot TLV encoder In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/12900 ) Change subject: TLV: Add one-shot TLV encoder ...................................................................... TLV: Add one-shot TLV encoder So far, the TLV code contained two types of functions * tlp_parse() to parse all TLVs according to definition into tlvp_parsed * various helper functions to encode individual TLVs during message generation This patch implements the inverse of tlv_parse(): tlv_encode(), which takes a full 'struct tlv_pared' and encodes all IEs found in it. The order of IEs is in numerically ascending order of the tag. As many protocols have different IE/TLV ordering requirements, let's add a tlv_encode_ordered() function where the caller can specify the TLV ordering during the one-shot encode. Change-Id: I761a30bf20355a9f80a4a8e0c60b0b0f78515efe --- M include/osmocom/gsm/tlv.h M src/gsm/libosmogsm.map M src/gsm/tlv_parser.c M tests/tlv/tlv_test.c M tests/tlv/tlv_test.ok 5 files changed, 155 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/gsm/tlv.h b/include/osmocom/gsm/tlv.h index d0c9552..bb0e8fc 100644 --- a/include/osmocom/gsm/tlv.h +++ b/include/osmocom/gsm/tlv.h @@ -457,6 +457,12 @@ /* take a master (src) tlv def and fill up all empty slots in 'dst' */ void tlv_def_patch(struct tlv_definition *dst, const struct tlv_definition *src); +int tlv_encode_one(struct msgb *msg, enum tlv_type type, uint8_t tag, + unsigned int len, const uint8_t *val); +int tlv_encode(struct msgb *msg, const struct tlv_definition *def, const struct tlv_parsed *tp); +int tlv_encode_ordered(struct msgb *msg, const struct tlv_definition *def, const struct tlv_parsed *tp, + const uint8_t *tag_order, unsigned int tag_order_len); + #define TLVP_PRESENT(x, y) ((x)->lv[y].val) #define TLVP_LEN(x, y) (x)->lv[y].len #define TLVP_VAL(x, y) (x)->lv[y].val diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 0f4a0db..299504e 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -537,6 +537,9 @@ tlv_parse; tlv_parse2; tlv_parse_one; +tlv_encode; +tlv_encode_ordered; +tlv_encode_one; tvlv_att_def; vtvlv_gan_att_def; diff --git a/src/gsm/tlv_parser.c b/src/gsm/tlv_parser.c index 6e089f7..159b42b 100644 --- a/src/gsm/tlv_parser.c +++ b/src/gsm/tlv_parser.c @@ -120,6 +120,103 @@ return 0; } + +/*! Encode a single TLV into given message buffer + * \param[inout] msg Caller-allocated message buffer with sufficient tailroom + * \param[in] type TLV type/format to use during encode + * \param[in] tag Tag of TLV to be encoded + * \parma[in] len Length of TLV to be encoded + * \param[in] val Value part of TLV to be encoded + * \returns 0 on success; negative in case of error */ +int tlv_encode_one(struct msgb *msg, enum tlv_type type, uint8_t tag, + unsigned int len, const uint8_t *val) +{ + switch (type) { + case TLV_TYPE_NONE: + break; + case TLV_TYPE_FIXED: + msgb_tv_fixed_put(msg, tag, len, val); + break; + case TLV_TYPE_T: + msgb_v_put(msg, tag); + break; + case TLV_TYPE_TV: + msgb_tv_put(msg, tag, val[0]); + break; + case TLV_TYPE_TLV: + msgb_tlv_put(msg, tag, len, val); + break; + case TLV_TYPE_TL16V: + msgb_tl16v_put(msg, tag, len, val); + break; + case TLV_TYPE_TvLV: + msgb_tvlv_put(msg, tag, len, val); + break; + case TLV_TYPE_SINGLE_TV: + msgb_v_put(msg, (tag << 4) | (val[0] & 0xf)); + break; + case TLV_TYPE_vTvLV_GAN: + msgb_vtvlv_gan_put(msg, tag, len, val); + break; + default: + return -EINVAL; + } + return 0; +} + +/*! Encode a set of decoded TLVs according to a given definition into a message buffer + * \param[inout] msg Caller-allocated message buffer with sufficient tailroom + * \param[in] def structure defining the valid TLV tags / configurations + * \param[in] tp decoded values to be encoded + * \returns number of bytes consumed in msg; negative in case of error */ +int tlv_encode(struct msgb *msg, const struct tlv_definition *def, const struct tlv_parsed *tp) +{ + unsigned int tailroom_before = msgb_tailroom(msg); + unsigned int i; + int rc; + + for (i = 0; i < ARRAY_SIZE(tp->lv); i++) { + /* skip entries in the array that aren't used/filled */ + if (!TLVP_PRESENT(tp, i)) + continue; + + rc = tlv_encode_one(msg, def->def[i].type, i, TLVP_LEN(tp, i), TLVP_VAL(tp, i)); + if (rc < 0) + return rc; + } + + return tailroom_before - msgb_tailroom(msg); +} + +/*! Encode a set of decoded TLVs according to a given definition and IE order into a message buffer + * \param[inout] msg Caller-allocated message buffer with sufficient tailroom + * \param[in] def structure defining the valid TLV tags / configurations + * \param[in] tp decoded values to be encoded + * \param[in] tag_order array of tags determining the IE encoding order + * \param[in] tag_order_len length of tag_order + * \returns number of bytes consumed in msg; negative in case of error */ +int tlv_encode_ordered(struct msgb *msg, const struct tlv_definition *def, const struct tlv_parsed *tp, + const uint8_t *tag_order, unsigned int tag_order_len) +{ + + unsigned int tailroom_before = msgb_tailroom(msg); + unsigned int i; + int rc; + + for (i = 0; i < tag_order_len; i++) { + uint8_t tag = tag_order[i]; + + /* skip entries in the array that aren't used/filled */ + if (!TLVP_PRESENT(tp, tag)) + continue; + + rc = tlv_encode_one(msg, def->def[tag].type, tag, TLVP_LEN(tp, tag), TLVP_VAL(tp, tag)); + if (rc < 0) + return rc; + } + return tailroom_before - msgb_tailroom(msg); +} + /*! Parse a single TLV encoded IE * \param[out] o_tag the tag of the IE that was found * \param[out] o_len length of the IE that was found diff --git a/tests/tlv/tlv_test.c b/tests/tlv/tlv_test.c index e2065b0..925d762 100644 --- a/tests/tlv/tlv_test.c +++ b/tests/tlv/tlv_test.c @@ -1,4 +1,6 @@ +#include #include +#include static void check_tlv_parse(uint8_t **data, size_t *data_len, uint8_t exp_tag, size_t exp_len, const uint8_t *exp_val) @@ -286,12 +288,57 @@ OSMO_ASSERT(dec3[2].lv[tag].val == &test_data[2 + 3 + 3]); } +static void test_tlv_encoder() +{ + const uint8_t enc_ies[] = { + 0x17, 0x14, 0x06, 0x2b, 0x12, 0x2b, 0x0b, 0x40, 0x2b, 0xb7, 0x05, 0xd0, 0x63, 0x82, 0x95, 0x03, 0x05, 0x40, + 0x07, 0x08, 0x43, 0x90, + 0x2c, 0x04, + 0x40, 0x42, + }; + const uint8_t ie_order[] = { 0x2c, 0x40, 0x17 }; + const uint8_t enc_ies_reordered[] = { + 0x2c, 0x04, + 0x40, 0x42, + 0x17, 0x14, 0x06, 0x2b, 0x12, 0x2b, 0x0b, 0x40, 0x2b, 0xb7, 0x05, 0xd0, 0x63, 0x82, 0x95, 0x03, 0x05, 0x40, + 0x07, 0x08, 0x43, 0x90, + }; + struct tlv_parsed tp; + struct msgb *msg = msgb_alloc(1024, __func__); + int rc; + + printf("Testing TLV encoder by decoding + re-encoding binary\n"); + + OSMO_ASSERT(msg); + + /* decode BSSAP IEs specified above */ + rc = osmo_bssap_tlv_parse(&tp, enc_ies, ARRAY_SIZE(enc_ies)); + OSMO_ASSERT(rc == 3); + + /* re-encode it */ + rc = tlv_encode(msg, gsm0808_att_tlvdef(), &tp); + OSMO_ASSERT(rc == ARRAY_SIZE(enc_ies)); + OSMO_ASSERT(!memcmp(msgb_data(msg), enc_ies, ARRAY_SIZE(enc_ies))); + + msgb_reset(msg); + + printf("Testing TLV encoder with IE ordering\n"); + + /* re-encodei in different order */ + rc = tlv_encode_ordered(msg, gsm0808_att_tlvdef(), &tp, ie_order, ARRAY_SIZE(ie_order)); + OSMO_ASSERT(rc == ARRAY_SIZE(enc_ies)); + OSMO_ASSERT(!memcmp(msgb_data(msg), enc_ies_reordered, ARRAY_SIZE(enc_ies_reordered))); + + msgb_free(msg); +} + int main(int argc, char **argv) { //osmo_init_logging2(ctx, &info); test_tlv_shift_functions(); test_tlv_repeated_ie(); + test_tlv_encoder(); printf("Done.\n"); return EXIT_SUCCESS; diff --git a/tests/tlv/tlv_test.ok b/tests/tlv/tlv_test.ok index de159bf..f3f0fd4 100644 --- a/tests/tlv/tlv_test.ok +++ b/tests/tlv/tlv_test.ok @@ -1,2 +1,4 @@ Test shift functions +Testing TLV encoder by decoding + re-encoding binary +Testing TLV encoder with IE ordering Done. -- To view, visit https://gerrit.osmocom.org/12900 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I761a30bf20355a9f80a4a8e0c60b0b0f78515efe Gerrit-Change-Number: 12900 Gerrit-PatchSet: 8 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:33:55 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:33:55 +0000 Subject: Change in osmo-ttcn3-hacks[master]: start-testsuite.sh: remove superflouse `set -e` In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14071 ) Change subject: start-testsuite.sh: remove superflouse `set -e` ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14071 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I820d59b29b4ba4a1d094c5c2a2af367e6ef4e5b6 Gerrit-Change-Number: 14071 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 19 May 2019 07:33:55 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:33:56 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:33:56 +0000 Subject: Change in osmo-ttcn3-hacks[master]: start-testsuite.sh: remove superflouse `set -e` In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14071 ) Change subject: start-testsuite.sh: remove superflouse `set -e` ...................................................................... start-testsuite.sh: remove superflouse `set -e` The set -e will not interfere with the next command, as it's executed and not included. The exit code of the last command is returned with and without -e. Change-Id: I820d59b29b4ba4a1d094c5c2a2af367e6ef4e5b6 --- M start-testsuite.sh 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/start-testsuite.sh b/start-testsuite.sh index e2da8f0..5740d3d 100755 --- a/start-testsuite.sh +++ b/start-testsuite.sh @@ -42,5 +42,4 @@ exit 1 fi -set -e "$compare" "$expected" "$last_log" $OSMO_TTCN3_COMPARE_ARGS -- To view, visit https://gerrit.osmocom.org/14071 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I820d59b29b4ba4a1d094c5c2a2af367e6ef4e5b6 Gerrit-Change-Number: 14071 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:33:57 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 19 May 2019 07:33:57 +0000 Subject: Change in osmo-hlr[master]: Create subscribers on demand In-Reply-To: References: Message-ID: Vadim Yanitskiy has removed a vote on this change. Change subject: Create subscribers on demand ...................................................................... Removed Code-Review+2 by Vadim Yanitskiy -- To view, visit https://gerrit.osmocom.org/13713 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: deleteVote Gerrit-Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd Gerrit-Change-Number: 13713 Gerrit-PatchSet: 7 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:34:34 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:34:34 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_11.c: properly handle MMTS indication In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/12059 ) Change subject: libmsc/gsm_04_11.c: properly handle MMTS indication ...................................................................... Patch Set 10: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/12059 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic46b04913b2e8cc5d11a39426dcc1bfe11f1d31e Gerrit-Change-Number: 12059 Gerrit-PatchSet: 10 Gerrit-Owner: Vadim Yanitskiy Gerrit-Assignee: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Sun, 19 May 2019 07:34:34 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:34:35 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 07:34:35 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_11.c: properly handle MMTS indication In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/12059 ) Change subject: libmsc/gsm_04_11.c: properly handle MMTS indication ...................................................................... libmsc/gsm_04_11.c: properly handle MMTS indication According to 3GPP TS 29.002, section 7.6.8.7, MMS (More Messages to Send) is an optional IE of MT-ForwardSM-Req message which is used by SMSC to indicate that there are more (multi-part) MT SMS messages to be sent. The MSC needs to use this indication in order to decide whether to keep the RAN connection with a given subscriber open. Related Change-Id: (TTCN) I6308586a70c4fb3254c519330a61a9667372149f Change-Id: Ic46b04913b2e8cc5d11a39426dcc1bfe11f1d31e Related: OS#3587 --- M include/osmocom/msc/gsm_04_11.h M include/osmocom/msc/msc_a.h M include/osmocom/msc/transaction.h M src/libmsc/gsm_04_11.c M src/libmsc/gsm_04_11_gsup.c 5 files changed, 47 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved osmith: Looks good to me, approved Jenkins Builder: Verified Vadim Yanitskiy: Verified diff --git a/include/osmocom/msc/gsm_04_11.h b/include/osmocom/msc/gsm_04_11.h index be8bff3..c504c7f 100644 --- a/include/osmocom/msc/gsm_04_11.h +++ b/include/osmocom/msc/gsm_04_11.h @@ -45,7 +45,8 @@ struct gsm_sms *sms); int gsm411_send_rp_data(struct gsm_network *net, struct vlr_subscr *vsub, size_t sm_rp_oa_len, const uint8_t *sm_rp_oa, - size_t sm_rp_ud_len, const uint8_t *sm_rp_ud); + size_t sm_rp_ud_len, const uint8_t *sm_rp_ud, + bool sm_rp_mmts_ind); void gsm411_sapi_n_reject(struct msc_a *msc_a); diff --git a/include/osmocom/msc/msc_a.h b/include/osmocom/msc/msc_a.h index c732695..a4d3226 100644 --- a/include/osmocom/msc/msc_a.h +++ b/include/osmocom/msc/msc_a.h @@ -45,6 +45,7 @@ #define MSC_A_USE_PAGING_RESPONSE "paging-response" #define MSC_A_USE_CC "cc" #define MSC_A_USE_SMS "sms" +#define MSC_A_USE_SMS_MMTS "sms_mmts" #define MSC_A_USE_NC_SS "nc_ss" #define MSC_A_USE_SILENT_CALL "silent_call" diff --git a/include/osmocom/msc/transaction.h b/include/osmocom/msc/transaction.h index 9278b64..ba609ea 100644 --- a/include/osmocom/msc/transaction.h +++ b/include/osmocom/msc/transaction.h @@ -110,6 +110,8 @@ /* SM-RP-MR, Message Reference (see GSM TS 04.11, section 8.2.3) */ uint8_t sm_rp_mr; + /* More Messages to Send (see 3GPP TS 29.002, section 7.6.8.7) */ + bool sm_rp_mmts_ind; struct gsm_sms *sms; } sms; diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c index a3b3830..3a3ec8c 100644 --- a/src/libmsc/gsm_04_11.c +++ b/src/libmsc/gsm_04_11.c @@ -129,6 +129,28 @@ return msc_a_tx_dtap_to_i(trans->msc_a, msg); } +/* Handle MMTS (More Messages to Send) indication */ +static void gsm411_handle_mmts_ind(const struct gsm_trans *trans) +{ + int32_t use_count; + + OSMO_ASSERT(trans); + OSMO_ASSERT(trans->msc_a); + + use_count = osmo_use_count_by(&trans->msc_a->use_count, MSC_A_USE_SMS_MMTS); + OSMO_ASSERT(use_count >= 0); /* Shall not be negative */ + + if (trans->sms.sm_rp_mmts_ind && use_count == 0) { + LOG_TRANS(trans, LOGL_INFO, "Multi-part SMS delivery is initiated\n"); + msc_a_get(trans->msc_a, MSC_A_USE_SMS_MMTS); + } else if (trans->sms.sm_rp_mmts_ind && use_count > 0) { + LOG_TRANS(trans, LOGL_INFO, "Continuing multi-part SMS delivery\n"); + } else if (!trans->sms.sm_rp_mmts_ind && use_count > 0) { + LOG_TRANS(trans, LOGL_INFO, "Multi-part SMS delivery has been completed\n"); + msc_a_put(trans->msc_a, MSC_A_USE_SMS_MMTS); + } +} + /* Paging callback for MT SMS (Paging is triggered by SMC) */ static void mmsms_paging_cb(struct msc_a *msc_a, struct gsm_trans *trans) { @@ -141,6 +163,10 @@ /* Associate transaction with established connection */ msc_a_get(msc_a, MSC_A_USE_SMS); trans->msc_a = msc_a; + + /* Multi-part SMS: handle MMTS (More Messages to Send) indication */ + gsm411_handle_mmts_ind(trans); + /* Confirm successful connection establishment */ gsm411_smc_recv(&trans->sms.smc_inst, GSM411_MMSMS_EST_CNF, NULL, 0); } else { @@ -1180,7 +1206,8 @@ /* Low-level function to send raw RP-DATA to a given subscriber */ int gsm411_send_rp_data(struct gsm_network *net, struct vlr_subscr *vsub, size_t sm_rp_oa_len, const uint8_t *sm_rp_oa, - size_t sm_rp_ud_len, const uint8_t *sm_rp_ud) + size_t sm_rp_ud_len, const uint8_t *sm_rp_ud, + bool sm_rp_mmts_ind) { struct gsm_trans *trans; struct msgb *msg; @@ -1190,6 +1217,11 @@ if (!trans) return -ENOMEM; + /* Multi-part SMS: handle MMTS (More Messages to Send) indication */ + trans->sms.sm_rp_mmts_ind = sm_rp_mmts_ind; + if (trans->msc_a != NULL) + gsm411_handle_mmts_ind(trans); + /* Allocate a message buffer for to be encoded SMS */ msg = gsm411_msgb_alloc(); if (!msg) { diff --git a/src/libmsc/gsm_04_11_gsup.c b/src/libmsc/gsm_04_11_gsup.c index 9f5175b..a1ec634 100644 --- a/src/libmsc/gsm_04_11_gsup.c +++ b/src/libmsc/gsm_04_11_gsup.c @@ -234,6 +234,7 @@ const struct osmo_gsup_message *gsup_msg) { struct gsm_network *net; + bool sm_rp_mmts_ind; int rc; /* Obtain required pointers */ @@ -267,10 +268,17 @@ if (gsup_msg->sm_rp_oa_type != OSMO_GSUP_SMS_SM_RP_ODA_SMSC_ADDR) goto msg_error; + /* MMS (More Messages to Send) IE is optional */ + if (gsup_msg->sm_rp_mms) + sm_rp_mmts_ind = *gsup_msg->sm_rp_mms > 0; + else + sm_rp_mmts_ind = false; + /* Send RP-DATA */ rc = gsm411_send_rp_data(net, vsub, gsup_msg->sm_rp_oa_len, gsup_msg->sm_rp_oa, - gsup_msg->sm_rp_ui_len, gsup_msg->sm_rp_ui); + gsup_msg->sm_rp_ui_len, gsup_msg->sm_rp_ui, + sm_rp_mmts_ind); if (rc) { LOGP(DLSMS, LOGL_NOTICE, "Failed to send MT SMS, " "ignoring MT-forwardSM-Req message...\n"); -- To view, visit https://gerrit.osmocom.org/12059 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ic46b04913b2e8cc5d11a39426dcc1bfe11f1d31e Gerrit-Change-Number: 12059 Gerrit-PatchSet: 11 Gerrit-Owner: Vadim Yanitskiy Gerrit-Assignee: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 07:43:53 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 19 May 2019 07:43:53 +0000 Subject: Change in osmo-hlr[master]: Create subscribers on demand In-Reply-To: References: Message-ID: Hello Harald Welte, osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13713 to look at the new patch set (#8). Change subject: Create subscribers on demand ...................................................................... Create subscribers on demand Add a new vty option and allow to optionally generate a random msisdn, as well as setting the default NAM: subscriber-create-on-demand (no-msisdn|<3-15>) (none|cs|ps|both) Thanks to Vadim for the random MSISDN patch [1], which was squashed into this one. [1] Change-Id: I475c71f9902950fa7498855a616e1ec231fad6ac Depends on: Idc74f4d94ad44b9fc1b6d43178f5f33d551ebfb1 (libosmocore) Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd Related: OS#2542 --- M src/hlr.c M src/hlr.h M src/hlr_vty.c M tests/test_nodes.vty A tests/test_subscr_create_on_demand.vty 5 files changed, 186 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/13/13713/8 -- To view, visit https://gerrit.osmocom.org/13713 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd Gerrit-Change-Number: 13713 Gerrit-PatchSet: 8 Gerrit-Owner: Vadim Yanitskiy Gerrit-Assignee: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 10:19:27 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 10:19:27 +0000 Subject: Change in libosmocore[master]: lapdm_rslms_recvmsg: Fix memory leak in error path Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14082 Change subject: lapdm_rslms_recvmsg: Fix memory leak in error path ...................................................................... lapdm_rslms_recvmsg: Fix memory leak in error path The caller of lapdm_rslms_recvmsg() (e.g. osmo-bts/src/common/rsl.c) assumes the message ownership is transferred. However, in one of the two error paths, msgb_free() was not called and hence we had a memory leak. Also clarify the msgb ownership transfer in a comment. Related: OS#3750 Change-Id: Id60cb45e50bfc89224d97df6c68fcd2949751895 --- M src/gsm/lapdm.c 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/82/14082/1 diff --git a/src/gsm/lapdm.c b/src/gsm/lapdm.c index ba9b3df..d76175b 100644 --- a/src/gsm/lapdm.c +++ b/src/gsm/lapdm.c @@ -1269,7 +1269,8 @@ return rc; } -/*! Receive a RSLms \ref msgb from Layer 3 */ +/*! Receive a RSLms \ref msgb from Layer 3. 'msg' ownership is transferred, + * i.e. caller must not free it */ int lapdm_rslms_recvmsg(struct msgb *msg, struct lapdm_channel *lc) { struct abis_rsl_common_hdr *rslh = msgb_l2(msg); @@ -1277,6 +1278,7 @@ if (msgb_l2len(msg) < sizeof(*rslh)) { LOGP(DLLAPD, LOGL_ERROR, "Message too short RSL hdr!\n"); + msgb_free(msg); return -EINVAL; } -- To view, visit https://gerrit.osmocom.org/14082 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id60cb45e50bfc89224d97df6c68fcd2949751895 Gerrit-Change-Number: 14082 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 12:18:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 12:18:53 +0000 Subject: Change in osmo-bts[master]: rsl: Send RSL Error Report in case of unknown/unsupported msg_type Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14083 Change subject: rsl: Send RSL Error Report in case of unknown/unsupported msg_type ...................................................................... rsl: Send RSL Error Report in case of unknown/unsupported msg_type Send an RSL Error Report in case of unknown/unsupported msg_type, as describedi in section 7.3 of 3GPP TS 48.058. Related: OS#3789 Change-Id: Ib2918007410e635b144a7535cec30b9f3378c755 --- M src/common/rsl.c 1 file changed, 14 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/83/14083/1 diff --git a/src/common/rsl.c b/src/common/rsl.c index c2a7db6..1be6e52 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -2523,7 +2523,9 @@ static int rsl_rx_rll(struct gsm_bts_trx *trx, struct msgb *msg) { struct abis_rsl_rll_hdr *rh = msgb_l2(msg); + struct abis_rsl_rll_hdr rh2; struct gsm_lchan *lchan; + int rc; if (msgb_l2len(msg) < sizeof(*rh)) { LOGP(DRSL, LOGL_NOTICE, "RSL Radio Link Layer message too short\n"); @@ -2546,9 +2548,14 @@ DEBUGP(DRLL, "%s Rx RLL %s Abis -> LAPDm\n", gsm_lchan_name(lchan), rsl_msg_name(rh->c.msg_type)); + /* make copy of RLL header, as the message will be free'd in case of erroneous return */ + rh2 = *rh; /* exception: RLL messages are _NOT_ freed as they are now * owned by LAPDm which might have queued them */ - return lapdm_rslms_recvmsg(msg, &lchan->lapdm_ch); + rc = lapdm_rslms_recvmsg(msg, &lchan->lapdm_ch); + if (rc < 0) + rsl_tx_error_report(trx, RSL_ERR_MSG_TYPE, &rh2.chan_nr, &rh2.link_id, NULL); + return rc; } static inline int rsl_link_id_is_sacch(uint8_t link_id) @@ -2823,10 +2830,12 @@ case RSL_MT_NOT_CMD: LOGP(DRSL, LOGL_NOTICE, "unimplemented RSL cchan msg_type %s\n", rsl_msg_name(cch->c.msg_type)); + rsl_tx_error_report(trx, RSL_ERR_MSG_TYPE, &cch->chan_nr, NULL, msg); break; default: LOGP(DRSL, LOGL_NOTICE, "undefined RSL cchan msg_type 0x%02x\n", cch->c.msg_type); + rsl_tx_error_report(trx, RSL_ERR_MSG_TYPE, &cch->chan_nr, NULL, msg); ret = -EINVAL; break; } @@ -2898,10 +2907,12 @@ case RSL_MT_TFO_MOD_REQ: LOGP(DRSL, LOGL_NOTICE, "unimplemented RSL dchan msg_type %s\n", rsl_msg_name(dch->c.msg_type)); + rsl_tx_error_report(trx, RSL_ERR_MSG_TYPE, &dch->chan_nr, NULL, msg); break; default: LOGP(DRSL, LOGL_NOTICE, "undefined RSL dchan msg_type 0x%02x\n", dch->c.msg_type); + rsl_tx_error_report(trx, RSL_ERR_MSG_TYPE, &dch->chan_nr, NULL, msg); ret = -EINVAL; } @@ -2931,6 +2942,7 @@ default: LOGP(DRSL, LOGL_NOTICE, "undefined RSL TRX msg_type 0x%02x\n", th->msg_type); + rsl_tx_error_report(trx, RSL_ERR_MSG_TYPE, NULL, NULL, msg); ret = -EINVAL; } @@ -2977,6 +2989,7 @@ default: LOGP(DRSL, LOGL_NOTICE, "unsupported RSL ip.access msg_type 0x%02x\n", dch->c.msg_type); + rsl_tx_error_report(trx, RSL_ERR_MSG_TYPE, &dch->chan_nr, NULL, msg); ret = -EINVAL; } -- To view, visit https://gerrit.osmocom.org/14083 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ib2918007410e635b144a7535cec30b9f3378c755 Gerrit-Change-Number: 14083 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 12:18:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 12:18:53 +0000 Subject: Change in osmo-bts[master]: rsl: Include Channel Nr and Link ID in Error reports whenever possible Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14084 Change subject: rsl: Include Channel Nr and Link ID in Error reports whenever possible ...................................................................... rsl: Include Channel Nr and Link ID in Error reports whenever possible While the CHAN_NR and LINK_ID IEs in ERROR REPORRT are optional, we still should include it whenever possible to help error analysis. Related: OS#3789 Change-Id: I8155e0d37096bd7bf3563e4f7853171ca4b3aa58 --- M src/common/rsl.c 1 file changed, 27 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/84/14084/1 diff --git a/src/common/rsl.c b/src/common/rsl.c index 1be6e52..0fe50e0 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -291,6 +291,7 @@ /* 8.5.1 BCCH INFOrmation is received */ static int rsl_rx_bcch_info(struct gsm_bts_trx *trx, struct msgb *msg) { + struct abis_rsl_cchan_hdr *cch = msgb_l2(msg); struct gsm_bts *bts = trx->bts; struct tlv_parsed tp; uint8_t rsl_si, count; @@ -301,16 +302,16 @@ /* 9.3.30 System Info Type */ if (!TLVP_PRESENT(&tp, RSL_IE_SYSINFO_TYPE)) - return rsl_tx_error_report(trx, RSL_ERR_MAND_IE_ERROR, NULL, NULL, msg); + return rsl_tx_error_report(trx, RSL_ERR_MAND_IE_ERROR, &cch->chan_nr, NULL, msg); rsl_si = *TLVP_VAL(&tp, RSL_IE_SYSINFO_TYPE); if (OSMO_IN_ARRAY(rsl_si, rsl_sacch_sitypes)) - return rsl_tx_error_report(trx, RSL_ERR_IE_CONTENT, NULL, NULL, msg); + return rsl_tx_error_report(trx, RSL_ERR_IE_CONTENT, &cch->chan_nr, NULL, msg); osmo_si = osmo_rsl2sitype(rsl_si); if (osmo_si == SYSINFO_TYPE_NONE) { LOGP(DRSL, LOGL_NOTICE, " Rx RSL SI 0x%02x not supported.\n", rsl_si); - return rsl_tx_error_report(trx, RSL_ERR_IE_CONTENT, NULL, NULL, msg); + return rsl_tx_error_report(trx, RSL_ERR_IE_CONTENT, &cch->chan_nr, NULL, msg); } /* 9.3.39 Full BCCH Information */ if (TLVP_PRESENT(&tp, RSL_IE_FULL_BCCH_INFO)) { @@ -341,13 +342,13 @@ if (bts->si2q_index > bts->si2q_count) { LOGP(DRSL, LOGL_ERROR, " Rx RSL SI2quater with index %u > count %u\n", bts->si2q_index, bts->si2q_count); - return rsl_tx_error_report(trx, RSL_ERR_IE_CONTENT, NULL, NULL, msg); + return rsl_tx_error_report(trx, RSL_ERR_IE_CONTENT, &cch->chan_nr, NULL, msg); } if (bts->si2q_index > SI2Q_MAX_NUM || bts->si2q_count > SI2Q_MAX_NUM) { LOGP(DRSL, LOGL_ERROR, " Rx RSL SI2quater with impossible parameters: index %u, count %u" "should be <= %u\n", bts->si2q_index, bts->si2q_count, SI2Q_MAX_NUM); - return rsl_tx_error_report(trx, RSL_ERR_IE_CONTENT, NULL, NULL, msg); + return rsl_tx_error_report(trx, RSL_ERR_IE_CONTENT, &cch->chan_nr, NULL, msg); } memset(GSM_BTS_SI2Q(bts, bts->si2q_index), GSM_MACBLOCK_PADDING, sizeof(sysinfo_buf_t)); @@ -447,6 +448,7 @@ /* 8.5.5 PAGING COMMAND */ static int rsl_rx_paging_cmd(struct gsm_bts_trx *trx, struct msgb *msg) { + struct abis_rsl_cchan_hdr *cch = msgb_l2(msg); struct tlv_parsed tp; struct gsm_bts *bts = trx->bts; uint8_t chan_needed = 0, paging_group; @@ -457,7 +459,7 @@ if (!TLVP_PRESENT(&tp, RSL_IE_PAGING_GROUP) || !TLVP_PRESENT(&tp, RSL_IE_MS_IDENTITY)) - return rsl_tx_error_report(trx, RSL_ERR_MAND_IE_ERROR, NULL, NULL, msg); + return rsl_tx_error_report(trx, RSL_ERR_MAND_IE_ERROR, &cch->chan_nr, NULL, msg); paging_group = *TLVP_VAL(&tp, RSL_IE_PAGING_GROUP); identity_lv = TLVP_VAL(&tp, RSL_IE_MS_IDENTITY)-1; @@ -482,6 +484,7 @@ /* 8.5.8 SMS BROADCAST COMMAND */ static int rsl_rx_sms_bcast_cmd(struct gsm_bts_trx *trx, struct msgb *msg) { + struct abis_rsl_cchan_hdr *cch = msgb_l2(msg); struct tlv_parsed tp; struct rsl_ie_cb_cmd_type *cb_cmd_type; @@ -489,7 +492,7 @@ if (!TLVP_PRESENT(&tp, RSL_IE_CB_CMD_TYPE) || !TLVP_PRESENT(&tp, RSL_IE_SMSCB_MSG)) - return rsl_tx_error_report(trx, RSL_ERR_MAND_IE_ERROR, NULL, NULL, msg); + return rsl_tx_error_report(trx, RSL_ERR_MAND_IE_ERROR, &cch->chan_nr, NULL, msg); cb_cmd_type = (struct rsl_ie_cb_cmd_type *) TLVP_VAL(&tp, RSL_IE_CB_CMD_TYPE); @@ -617,12 +620,13 @@ /* 8.5.6 IMMEDIATE ASSIGN COMMAND is received */ static int rsl_rx_imm_ass(struct gsm_bts_trx *trx, struct msgb *msg) { + struct abis_rsl_cchan_hdr *cch = msgb_l2(msg); struct tlv_parsed tp; rsl_tlv_parse(&tp, msgb_l3(msg), msgb_l3len(msg)); if (!TLVP_PRESENT(&tp, RSL_IE_FULL_IMM_ASS_INFO)) - return rsl_tx_error_report(trx, RSL_ERR_MAND_IE_ERROR, NULL, NULL, msg); + return rsl_tx_error_report(trx, RSL_ERR_MAND_IE_ERROR, &cch->chan_nr, NULL, msg); rate_ctr_inc2(trx->bts->ctrs, BTS_CTR_AGCH_RCVD); @@ -2475,6 +2479,8 @@ { struct abis_rsl_common_hdr *rh = msgb_l2(msg); struct abis_rsl_dchan_hdr *dch; + struct abis_rsl_cchan_hdr *cch; + struct abis_rsl_rll_hdr *rllh; int rc; /* Handle GSM 08.58 7 Error Handling for the given input. This method will @@ -2483,6 +2489,8 @@ /* TS 48.058 Section 7 explains how to do error handling */ switch (rh->msg_discr & 0xfe) { + case ABIS_RSL_MDISC_IPACCESS: + /* fall-through */ case ABIS_RSL_MDISC_DED_CHAN: dch = msgb_l2(msg); switch (dch->c.msg_type) { @@ -2495,18 +2503,24 @@ RSL_ERR_MAND_IE_ERROR, NULL); break; default: - rc = rsl_tx_error_report(msg->trx, RSL_ERR_MAND_IE_ERROR, NULL, NULL, msg); + rc = rsl_tx_error_report(msg->trx, RSL_ERR_MAND_IE_ERROR, &dch->chan_nr, + NULL, msg); break; } break; case ABIS_RSL_MDISC_RLL: - /* fall-through */ + rllh = msgb_l2(msg); + /* ERROR REPORT */ + rc = rsl_tx_error_report(msg->trx, RSL_ERR_MAND_IE_ERROR, + &rllh->chan_nr, &rllh->link_id, msg); + break; case ABIS_RSL_MDISC_COM_CHAN: - /* fall-through */ + cch = msgb_l2(msg); + /* ERROR REPORT */ + rc = rsl_tx_error_report(msg->trx, RSL_ERR_MAND_IE_ERROR, &cch->chan_nr, NULL, msg); + break; case ABIS_RSL_MDISC_TRX: /* fall-through */ - case ABIS_RSL_MDISC_IPACCESS: - /* fall-through */ default: /* ERROR REPORT */ rc = rsl_tx_error_report(msg->trx, RSL_ERR_MAND_IE_ERROR, NULL, NULL, msg); -- To view, visit https://gerrit.osmocom.org/14084 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I8155e0d37096bd7bf3563e4f7853171ca4b3aa58 Gerrit-Change-Number: 14084 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 12:18:54 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 12:18:54 +0000 Subject: Change in osmo-bts[master]: RSL: Reject RLL messages for lchans that are not active yet Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14085 Change subject: RSL: Reject RLL messages for lchans that are not active yet ...................................................................... RSL: Reject RLL messages for lchans that are not active yet The Radio Link Layer (RLL) messages only make sense when a given logical channel is active. If it isn't active, let's reject the messages with an RSL ERROR REPORT with cause "Message sequence error", wich according to spec means: "A message with an existing message type which is not possible according to the specification and to the state of the BTS is erroneous." Related: OS#3789 Change-Id: I68dbb622aeaee657471664cdc0b69c2ac316d77e --- M src/common/rsl.c 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/85/14085/1 diff --git a/src/common/rsl.c b/src/common/rsl.c index 0fe50e0..829a4e6 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -2559,6 +2559,14 @@ return rsl_reject_unknown_lchan(msg); } + if (lchan->state != LCHAN_S_ACTIVE) { + LOGP(DRLL, LOGL_NOTICE, "x RLL %s for lchan which isn't active\n", + rsl_msg_name(rh->c.msg_type)); + rsl_tx_error_report(trx, RSL_ERR_MSG_SEQ, &rh->chan_nr, &rh->link_id, msg); + msgb_free(msg); + return -1; + } + DEBUGP(DRLL, "%s Rx RLL %s Abis -> LAPDm\n", gsm_lchan_name(lchan), rsl_msg_name(rh->c.msg_type)); -- To view, visit https://gerrit.osmocom.org/14085 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I68dbb622aeaee657471664cdc0b69c2ac316d77e Gerrit-Change-Number: 14085 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 12:36:13 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 12:36:13 +0000 Subject: Change in osmo-bts[master]: rsl: Send RSL Error Report in case of unknown/unsupported msg_type In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14083 to look at the new patch set (#2). Change subject: rsl: Send RSL Error Report in case of unknown/unsupported msg_type ...................................................................... rsl: Send RSL Error Report in case of unknown/unsupported msg_type Send an RSL Error Report in case of unknown/unsupported msg_type, as describedi in section 7.3 of 3GPP TS 48.058. Related: OS#3750 Change-Id: Ib2918007410e635b144a7535cec30b9f3378c755 --- M src/common/rsl.c 1 file changed, 14 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/83/14083/2 -- To view, visit https://gerrit.osmocom.org/14083 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib2918007410e635b144a7535cec30b9f3378c755 Gerrit-Change-Number: 14083 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 12:36:13 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 12:36:13 +0000 Subject: Change in osmo-bts[master]: rsl: Include Channel Nr and Link ID in Error reports whenever possible In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14084 to look at the new patch set (#2). Change subject: rsl: Include Channel Nr and Link ID in Error reports whenever possible ...................................................................... rsl: Include Channel Nr and Link ID in Error reports whenever possible While the CHAN_NR and LINK_ID IEs in ERROR REPORRT are optional, we still should include it whenever possible to help error analysis. Related: OS#3750 Change-Id: I8155e0d37096bd7bf3563e4f7853171ca4b3aa58 --- M src/common/rsl.c 1 file changed, 27 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/84/14084/2 -- To view, visit https://gerrit.osmocom.org/14084 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8155e0d37096bd7bf3563e4f7853171ca4b3aa58 Gerrit-Change-Number: 14084 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 12:36:13 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 12:36:13 +0000 Subject: Change in osmo-bts[master]: RSL: Reject RLL messages for lchans that are not active yet In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14085 to look at the new patch set (#2). Change subject: RSL: Reject RLL messages for lchans that are not active yet ...................................................................... RSL: Reject RLL messages for lchans that are not active yet The Radio Link Layer (RLL) messages only make sense when a given logical channel is active. If it isn't active, let's reject the messages with an RSL ERROR REPORT with cause "Message sequence error", wich according to spec means: "A message with an existing message type which is not possible according to the specification and to the state of the BTS is erroneous." Related: OS#3750 Change-Id: I68dbb622aeaee657471664cdc0b69c2ac316d77e --- M src/common/rsl.c 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/85/14085/2 -- To view, visit https://gerrit.osmocom.org/14085 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I68dbb622aeaee657471664cdc0b69c2ac316d77e Gerrit-Change-Number: 14085 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 12:36:24 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 12:36:24 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Extend BTS_Tests.ttcn with test for RSL error handling Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14086 Change subject: bts: Extend BTS_Tests.ttcn with test for RSL error handling ...................................................................... bts: Extend BTS_Tests.ttcn with test for RSL error handling Section 7 of the RSL specification (3GPP TS 48.058) describes how the BTS shall respond in various error situations, including wrong message type, wrong message discriminator and invalid message sequences. Let's add three test cases for the above three scenarios. Change-Id: If507a14bbed9cdcc62cd966468222186590fc965 Related: OS##3750 --- M bts/BTS_Tests.ttcn 1 file changed, 93 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/86/14086/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index e1c64d6..5b69b5d 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -2571,6 +2571,95 @@ f_exp_err_rep(RSL_ERR_IE_CONTENT); } +/* attempt to activate channel with wrong RSL Message Discriminator IE */ +function f_TC_chan_act_wrong_mdisc(charstring id) runs on ConnHdlr { + var template RSL_Message rsl := ts_RSL_CHAN_ACT(g_chan_nr, g_pars.chan_mode); + rsl.msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RESERVED, false); + RSL.send(rsl); + f_rslem_unregister(0, g_chan_nr); +} +testcase TC_err_rep_wrong_mdisc() runs on test_CT { + var ConnHdlr vc_conn; + var ConnHdlrPars pars := valueof(t_Pars(ts_RslChanNr_SDCCH4(0,0), ts_RSL_ChanMode_SIGN)); + + f_init(testcasename()); + + vc_conn := f_start_handler(refers(f_TC_chan_act_wrong_mdisc), pars); + vc_conn.done; + f_exp_err_rep(RSL_ERR_MSG_DISCR); + + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + +/* Send messages with wrong message type */ +function f_TC_wrong_msg_type_dchan(charstring id) runs on ConnHdlr { + var template (value) RSL_Message rsl_tx; + rsl_tx := ts_RSL_CHAN_ACT(g_chan_nr, g_pars.chan_mode); + rsl_tx.msg_type := RSL_MT_NOT_CMD; + RSL.send(rsl_tx); + f_rslem_unregister(0, g_chan_nr); +} +function f_TC_wrong_msg_type_rll(charstring id) runs on ConnHdlr { + var template (value) RSL_Message rsl_tx; + /* we first have to activate the dedicated channel */ + f_rsl_chan_act(g_pars.chan_mode); + /* ... to then send an invalid RLL message */ + rsl_tx := ts_RSL_UNITDATA_REQ(g_chan_nr, ts_RslLinkID_DCCH(0), '0102'O); + rsl_tx.msg_type := RSL_MT_CBCH_LOAD_IND; + RSL.send(rsl_tx); + f_rslem_unregister(0, g_chan_nr); +} +testcase TC_err_rep_wrong_msg_type() runs on test_CT { + var ConnHdlr vc_conn; + var ConnHdlrPars pars := valueof(t_Pars(ts_RslChanNr_SDCCH4(0,0), ts_RSL_ChanMode_SIGN)); + var template (value) RSL_Message rsl_tx; + + f_init(testcasename()); + + /* Common Channel with wrong message type */ + RSL_CCHAN.clear; + rsl_tx := valueof(ts_RSL_BCCH_INFO(RSL_SYSTEM_INFO_1, ''O)); + rsl_tx.msg_type := RSL_MT_LOCATION_INFO; + RSL_CCHAN.send(ts_RSL_UD(rsl_tx)); + f_exp_err_rep(RSL_ERR_MSG_TYPE); + + /* TRX Management */ + RSL_CCHAN.clear; + rsl_tx := ts_RSL_SACCH_FILL(RSL_SYSTEM_INFO_5, ''O); + rsl_tx.msg_type := RSL_MT_UNIT_DATA_IND; + RSL_CCHAN.send(ts_RSL_UD(rsl_tx)); + f_exp_err_rep(RSL_ERR_MSG_TYPE); + + /* Dedicated Channel */ + RSL_CCHAN.clear; + vc_conn := f_start_handler(refers(f_TC_wrong_msg_type_dchan), pars); + vc_conn.done; + f_exp_err_rep(RSL_ERR_MSG_TYPE); + + /* RLL */ + RSL_CCHAN.clear; + vc_conn := f_start_handler(refers(f_TC_wrong_msg_type_rll), pars); + vc_conn.done; + f_exp_err_rep(RSL_ERR_MSG_TYPE); +} + +/* Send messages in wrong sequence (RLL to an inactive lchan) */ +function f_TC_err_rep_wrong_sequence(charstring id) runs on ConnHdlr { + RSL.send(ts_RSL_UNITDATA_REQ(g_chan_nr, ts_RslLinkID_DCCH(0), '0102'O)); + f_rslem_unregister(0, g_chan_nr); +} +testcase TC_err_rep_wrong_sequence() runs on test_CT { + var ConnHdlr vc_conn; + var ConnHdlrPars pars := valueof(t_Pars(ts_RslChanNr_SDCCH4(0,0), ts_RSL_ChanMode_SIGN)); + + f_init(testcasename()); + + RSL_CCHAN.clear; + vc_conn := f_start_handler(refers(f_TC_err_rep_wrong_sequence), pars); + vc_conn.done; + f_exp_err_rep(RSL_ERR_MSG_SEQ); +} + /*********************************************************************** * IPA CRCX/MDCX/DLCS media stream handling ***********************************************************************/ @@ -4311,9 +4400,6 @@ * SMS Broadcast Req / Cmd / CBCH LOad Ind * RF resource ind * error handling -** discriminator error -** type error -** sequence error ** IE duplicated? * PCU interface ** TIME_IND from BTS->PCU @@ -4416,6 +4502,10 @@ execute( TC_encr_cmd_a52() ); execute( TC_encr_cmd_a53() ); + execute( TC_err_rep_wrong_mdisc() ); + execute( TC_err_rep_wrong_msg_type() ); + execute( TC_err_rep_wrong_sequence() ); + execute( TC_lapdm_selftest() ); execute( TC_tch_sign_l2_fill_frame() ); -- To view, visit https://gerrit.osmocom.org/14086 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If507a14bbed9cdcc62cd966468222186590fc965 Gerrit-Change-Number: 14086 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 14:15:11 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 14:15:11 +0000 Subject: Change in osmo-bts[master]: RSL: Fix off-by-one error when parsing SACCH INFO IE in RSL CHAN ACT Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14087 Change subject: RSL: Fix off-by-one error when parsing SACCH INFO IE in RSL CHAN ACT ...................................................................... RSL: Fix off-by-one error when parsing SACCH INFO IE in RSL CHAN ACT This off-by-one error in length verification caused all SACCH INFO IE to be deemed invalid and hence any RSL CHAN ACT with that IE to be rejected. Change-Id: I6436caf5c2caefbf7c089d66e37d8d1babe1c24e Related: OS#3750 --- M src/common/rsl.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/87/14087/1 diff --git a/src/common/rsl.c b/src/common/rsl.c index 829a4e6..99e38b0 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1133,7 +1133,7 @@ lapdm_ui_prefix_lchan(lchan, cur, osmo_si, si_len); cur += si_len; - if (cur >= val + tot_len) { + if (cur > val + tot_len) { LOGP(DRSL, LOGL_ERROR, "Error parsing SACCH INFO IE\n"); rsl_tx_error_report(msg->trx, RSL_ERR_IE_CONTENT, &dch->chan_nr, NULL, msg); -- To view, visit https://gerrit.osmocom.org/14087 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I6436caf5c2caefbf7c089d66e37d8d1babe1c24e Gerrit-Change-Number: 14087 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 16:04:21 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 19 May 2019 16:04:21 +0000 Subject: Change in osmo-bts[master]: rsl: Send RSL Error Report in case of unknown/unsupported msg_type In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14083 ) Change subject: rsl: Send RSL Error Report in case of unknown/unsupported msg_type ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14083 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib2918007410e635b144a7535cec30b9f3378c755 Gerrit-Change-Number: 14083 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 19 May 2019 16:04:21 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 16:06:50 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 19 May 2019 16:06:50 +0000 Subject: Change in osmo-bts[master]: rsl: Include Channel Nr and Link ID in Error reports whenever possible In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14084 ) Change subject: rsl: Include Channel Nr and Link ID in Error reports whenever possible ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14084 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8155e0d37096bd7bf3563e4f7853171ca4b3aa58 Gerrit-Change-Number: 14084 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 19 May 2019 16:06:50 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 16:08:24 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 19 May 2019 16:08:24 +0000 Subject: Change in osmo-bts[master]: RSL: Reject RLL messages for lchans that are not active yet In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14085 ) Change subject: RSL: Reject RLL messages for lchans that are not active yet ...................................................................... Patch Set 2: (2 comments) https://gerrit.osmocom.org/#/c/14085/2/src/common/rsl.c File src/common/rsl.c: https://gerrit.osmocom.org/#/c/14085/2/src/common/rsl.c at 2563 PS2, Line 2563: lchan We can also print gsm_lchan_name(lchan) here. https://gerrit.osmocom.org/#/c/14085/2/src/common/rsl.c at 2563 PS2, Line 2563: x Rx -- To view, visit https://gerrit.osmocom.org/14085 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I68dbb622aeaee657471664cdc0b69c2ac316d77e Gerrit-Change-Number: 14085 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 19 May 2019 16:08:24 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 16:15:04 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 19 May 2019 16:15:04 +0000 Subject: Change in libosmocore[master]: lapdm_rslms_recvmsg: Fix memory leak in error path In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14082 ) Change subject: lapdm_rslms_recvmsg: Fix memory leak in error path ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14082 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id60cb45e50bfc89224d97df6c68fcd2949751895 Gerrit-Change-Number: 14082 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 19 May 2019 16:15:04 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 17:28:17 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Sun, 19 May 2019 17:28:17 +0000 Subject: Change in osmo-mgw[master]: osmux: Fix CID release for non-enabled connections In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/14075 ) Change subject: osmux: Fix CID release for non-enabled connections ...................................................................... osmux: Fix CID release for non-enabled connections Change-Id: If65c70b421476776e20233733722d72aa26d69a8 --- M include/osmocom/mgcp/osmux.h M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_osmux.c 3 files changed, 15 insertions(+), 15 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/mgcp/osmux.h b/include/osmocom/mgcp/osmux.h index eb05610..69ba3d0 100644 --- a/include/osmocom/mgcp/osmux.h +++ b/include/osmocom/mgcp/osmux.h @@ -14,7 +14,7 @@ int osmux_init(int role, struct mgcp_config *cfg); int osmux_enable_conn(struct mgcp_endpoint *endp, struct mgcp_conn_rtp *conn, struct in_addr *addr, uint16_t port); -void osmux_disable_conn(struct mgcp_conn_rtp *conn); +void conn_osmux_disable(struct mgcp_conn_rtp *conn); int conn_osmux_allocate_cid(struct mgcp_conn_rtp *conn, int osmux_cid); void conn_osmux_release_cid(struct mgcp_conn_rtp *conn); int osmux_xfrm_to_osmux(char *buf, int buf_len, struct mgcp_conn_rtp *conn); diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index 5300351..772584b 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -125,7 +125,8 @@ /* Cleanup rtp connection struct */ static void mgcp_rtp_conn_cleanup(struct mgcp_conn_rtp *conn_rtp) { - osmux_disable_conn(conn_rtp); + if (mgcp_conn_rtp_is_osmux(conn_rtp)) + conn_osmux_disable(conn_rtp); mgcp_free_rtp_port(&conn_rtp->end); rate_ctr_group_free(conn_rtp->rate_ctr_group); } diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 3b788b6..38657ee 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -487,26 +487,25 @@ /*! disable OSXMUX circuit for a specified connection. * \param[in] conn connection to disable */ -void osmux_disable_conn(struct mgcp_conn_rtp *conn) +void conn_osmux_disable(struct mgcp_conn_rtp *conn) { - if (!conn) - return; - if (conn->osmux.state != OSMUX_STATE_ENABLED) - return; + OSMO_ASSERT(conn->osmux.state != OSMUX_STATE_DISABLED); LOGPCONN(conn->conn, DLMGCP, LOGL_INFO, - "Releasing connection %s using Osmux CID %u\n", - conn->conn->id, conn->osmux.cid); + "Releasing connection using Osmux CID %u\n", conn->osmux.cid); - /* We are closing, we don't need pending RTP packets to be transmitted */ - osmux_xfrm_output_set_tx_cb(&conn->osmux.out, NULL, NULL); - osmux_xfrm_output_flush(&conn->osmux.out); + if (conn->osmux.state == OSMUX_STATE_ENABLED) { + /* We are closing, we don't need pending RTP packets to be transmitted */ + osmux_xfrm_output_set_tx_cb(&conn->osmux.out, NULL, NULL); + osmux_xfrm_output_flush(&conn->osmux.out); - osmux_xfrm_input_close_circuit(conn->osmux.in, conn->osmux.cid); - conn->osmux.state = OSMUX_STATE_DISABLED; + osmux_xfrm_input_close_circuit(conn->osmux.in, conn->osmux.cid); + conn->osmux.state = OSMUX_STATE_DISABLED; + conn_osmux_release_cid(conn); + osmux_handle_put(conn->osmux.in); + } conn_osmux_release_cid(conn); - osmux_handle_put(conn->osmux.in); } /*! relase OSXMUX cid, that had been allocated to this connection. -- To view, visit https://gerrit.osmocom.org/14075 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If65c70b421476776e20233733722d72aa26d69a8 Gerrit-Change-Number: 14075 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 18:41:46 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 18:41:46 +0000 Subject: Change in osmo-ttcn3-hacks[master]: RSL_Types: Add support for RSL_IE_MSG_ID as used in ERROR REPORT Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14088 Change subject: RSL_Types: Add support for RSL_IE_MSG_ID as used in ERROR REPORT ...................................................................... RSL_Types: Add support for RSL_IE_MSG_ID as used in ERROR REPORT Change-Id: I5f971dc7ec797a311841ac5b947c5c493780786f --- M library/RSL_Types.ttcn 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/88/14088/1 diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index 3b1a311..39ba3d3 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -688,6 +688,7 @@ RSL_IE_MS_Power ms_power, uint8_t timing_adv, RSL_IE_MultirateCtrl multirate_ctrl, + uint8_t msg_id, RSL_IE_FrameNumber frame_nr, RSL_IE_Cause cause, uint8_t access_delay, @@ -738,6 +739,7 @@ ms_power, iei = RSL_IE_MS_POWER; timing_adv, iei = RSL_IE_TIMING_ADVANCE; multirate_ctrl, iei = RSL_IE_MR_CONTROL; + msg_id, iei = RSL_IE_MSG_ID; frame_nr, iei = RSL_IE_FRAME_NUMBER; cause, iei = RSL_IE_CAUSE; -- To view, visit https://gerrit.osmocom.org/14088 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I5f971dc7ec797a311841ac5b947c5c493780786f Gerrit-Change-Number: 14088 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 18:41:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 18:41:47 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_sacch_chan_act() to test SACCH INFO at RSL CHAN ACT Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14089 Change subject: bts: Add TC_sacch_chan_act() to test SACCH INFO at RSL CHAN ACT ...................................................................... bts: Add TC_sacch_chan_act() to test SACCH INFO at RSL CHAN ACT According to 3GPP Ts 48.058, every logical channel can receive some specific SACCH filling at the time of RSL channel activation. This overrides the global SACCH FILLING. Related: OS#3750 Change-Id: I8adb371a7e0b80792dd2fa35e5204802068df5ba --- M bts/BTS_Tests.ttcn M library/RSL_Types.ttcn 2 files changed, 81 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/89/14089/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 5b69b5d..06e274e 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -497,7 +497,7 @@ var RSL_Message rx := f_rsl_transceive_ret(tx, exp_rx, id, ignore_other); } -function f_rsl_chan_act(RSL_IE_ChannelMode mode, boolean encr_enable := false) +function f_rsl_chan_act(RSL_IE_ChannelMode mode, boolean encr_enable := false, RSL_IE_List more_ies := {}) runs on ConnHdlr { var RSL_Message ch_act := valueof(ts_RSL_CHAN_ACT(g_chan_nr, mode)); if (encr_enable) { @@ -507,6 +507,7 @@ ch_act.ies := ch_act.ies & { valueof(t_RSL_IE(RSL_IE_ENCR_INFO, RSL_IE_Body:{encr_info := encr_info})) }; } + ch_act.ies := ch_act.ies & more_ies; f_rsl_transceive(ch_act, tr_RSL_CHAN_ACT_ACK(g_chan_nr), "RSL CHAN ACT"); } @@ -961,6 +962,51 @@ } /* TODO: Test for SACCH information present in RSL CHAN ACT (overrides FILLING) */ +private function f_TC_sacch_chan_act(charstring id) runs on ConnHdlr { + var octetstring si5 := f_rnd_octstring(19); + var octetstring si6 := f_rnd_octstring(19); + var octetstring si5_specific := f_rnd_octstring(19); + var octetstring si6_specific := f_rnd_octstring(19); + + /* First, configure both SI5 and SI6 to be transmitted */ + RSL.send(ts_RSL_SACCH_FILL(RSL_SYSTEM_INFO_5, si5)); + RSL.send(ts_RSL_SACCH_FILL(RSL_SYSTEM_INFO_6, si6)); + + f_l1_tune(L1CTL); + RSL.clear; + + /* activate channel with different SACCH filling */ + var RSL_SacchInfo sacch_info := valueof(ts_RSL_SacchInfo({ + ts_RSL_SacchInfoElem(RSL_SYSTEM_INFO_5, si5_specific), + ts_RSL_SacchInfoElem(RSL_SYSTEM_INFO_6, si6_specific) + })); + var RSL_IE_List addl_ies := { valueof(t_RSL_IE(RSL_IE_SACCH_INFO, + RSL_IE_Body:{sacch_info := sacch_info})) }; + f_est_dchan(more_ies := addl_ies); + + /* check that SACCH actually are received as expected */ + f_sacch_present(si5_specific); + f_sacch_present(si6_specific); + + /* release the channel */ + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); +} +testcase TC_sacch_chan_act() runs on test_CT { + var ConnHdlr vc_conn; + var ConnHdlrPars pars; + f_init(); + + for (var integer i := 0; i < sizeof(g_AllChannels); i := i+1) { + pars := valueof(t_Pars(g_AllChannels[i], ts_RSL_ChanMode_SIGN)); + log(testcasename(), ": Starting for ", g_AllChannels[i]); + vc_conn := f_start_handler(refers(f_TC_sacch_chan_act), pars); + vc_conn.done; + } + /* TODO: do the above in parallel, rather than sequentially? */ + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + /* TODO: Test for SACCH transmission rules in the context of special CHAN ACT (HO) */ @@ -1386,7 +1432,7 @@ } /* Establish dedicated channel: L1CTL + RSL side */ -private function f_est_dchan(boolean encr_enable := false) runs on ConnHdlr { +private function f_est_dchan(boolean encr_enable := false, RSL_IE_List more_ies := {}) runs on ConnHdlr { var GsmFrameNumber fn; var ImmediateAssignment imm_ass; var integer ra := 23; @@ -1395,7 +1441,7 @@ fn := f_rach_req_wait_chan_rqd(ra); /* Activate channel on BTS side */ - f_rsl_chan_act(g_pars.chan_mode, encr_enable); + f_rsl_chan_act(g_pars.chan_mode, encr_enable, more_ies); /* Send IMM.ASS via CCHAN */ var ChannelDescription ch_desc := { @@ -4418,6 +4464,7 @@ execute( TC_sacch_info_mod() ); execute( TC_sacch_multi() ); execute( TC_sacch_multi_chg() ); + execute( TC_sacch_chan_act() ); execute( TC_rach_content() ); execute( TC_rach_count() ); execute( TC_rach_max_ta() ); diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index 39ba3d3..0d772b3 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -565,6 +565,35 @@ cause_ext := omit } + /* 9.3.29 */ + type record RSL_SacchInfo { + uint8_t len, + uint8_t num_msgs, + RSL_SacchInfoElements elems + } with { + variant (len) "LENGTHTO(num_msgs,elems)"; + variant (num_msgs) "LENGTHTO(elems)"; + variant (num_msgs) "UNIT(elements)" + }; + type record RSL_SacchInfoElement { + RSL_IE_SysinfoType si_type, + uint8_t len, + octetstring msg + } with { + variant (len) "LENGTHTO(msg)"; + }; + type record of RSL_SacchInfoElement RSL_SacchInfoElements; + template (value) RSL_SacchInfo ts_RSL_SacchInfo(template (value) RSL_SacchInfoElements elems) := { + len := 0, /* overwritten */ + num_msgs := 0, /* overwritten */ + elems := elems + } + template (value) RSL_SacchInfoElement ts_RSL_SacchInfoElem(RSL_IE_SysinfoType tp, octetstring msg) := { + si_type := tp, + len := lengthof(msg), + msg := msg + } + /* 9.3.40 */ type enumerated RSL_ChanNeeded { RSL_CHANNEED_ANY ('00'B), @@ -703,6 +732,7 @@ RSL_IE_ChanNeeded chan_needed, RSL_IE_CbCommandType cb_cmd_type, RSL_LV smscb_message, + RSL_SacchInfo sacch_info, RSL_IE_StartingTime starting_time, RSL_IE_EncryptionInfo encr_info, @@ -755,6 +785,7 @@ chan_needed, iei = RSL_IE_CHAN_NEEDED; cb_cmd_type, iei = RSL_IE_CB_CMD_TYPE; smscb_message, iei = RSL_IE_SMSCB_MSG; + sacch_info, iei = RSL_IE_SACCH_INFO; starting_time, iei = RSL_IE_STARTNG_TIME; encr_info, iei = RSL_IE_ENCR_INFO; -- To view, visit https://gerrit.osmocom.org/14089 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I8adb371a7e0b80792dd2fa35e5204802068df5ba Gerrit-Change-Number: 14089 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 18:44:12 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 18:44:12 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_sacch_chan_act() to test SACCH INFO at RSL CHAN ACT In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14089 to look at the new patch set (#2). Change subject: bts: Add TC_sacch_chan_act() to test SACCH INFO at RSL CHAN ACT ...................................................................... bts: Add TC_sacch_chan_act() to test SACCH INFO at RSL CHAN ACT According to 3GPP Ts 48.058, every logical channel can receive some specific SACCH filling at the time of RSL channel activation. This overrides the global SACCH FILLING. Related: OS#3750 Change-Id: I8adb371a7e0b80792dd2fa35e5204802068df5ba --- M bts/BTS_Tests.ttcn M library/RSL_Types.ttcn 2 files changed, 82 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/89/14089/2 -- To view, visit https://gerrit.osmocom.org/14089 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8adb371a7e0b80792dd2fa35e5204802068df5ba Gerrit-Change-Number: 14089 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 22:13:31 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 22:13:31 +0000 Subject: Change in osmo-bts[master]: cbch: Implement handling of "Schedule" message Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14090 Change subject: cbch: Implement handling of "Schedule" message ...................................................................... cbch: Implement handling of "Schedule" message The first block of "schedule" messages must be advertised with a special sequence number coding, see Table 1 of 3GPP TS 44.012. Change-Id: I473edf698eba7ff5008f2fd1ec1776f0aa013858 Closes: OS#4012 --- M src/common/cbch.c 1 file changed, 10 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/90/14090/1 diff --git a/src/common/cbch.c b/src/common/cbch.c index c628cb5..cde1a0c 100644 --- a/src/common/cbch.c +++ b/src/common/cbch.c @@ -1,6 +1,6 @@ /* Cell Broadcast routines */ -/* (C) 2014 by Harald Welte +/* (C) 2014,2018-2019 by Harald Welte * * All Rights Reserved * @@ -31,6 +31,7 @@ struct smscb_msg { struct llist_head list; /* list in smscb_state.queue */ + bool is_schedule; /* is this a schedule message? */ uint8_t msg[GSM412_MSG_LEN]; /* message buffer */ uint8_t next_seg; /* next segment number */ uint8_t num_segs; /* total number of segments */ @@ -78,7 +79,11 @@ memcpy(out, &msg->msg[msg->next_seg * GSM412_BLOCK_LEN], to_copy); /* set + increment sequence number */ - block_type->seq_nr = msg->next_seg++; + if (msg->next_seg == 0 && msg->is_schedule) { + block_type->seq_nr = 8; /* first schedule block */ + msg->next_seg++; + } else + block_type->seq_nr = msg->next_seg++; /* determine if this is the last block */ if (block_type->seq_nr + 1 == msg->num_segs) @@ -126,6 +131,9 @@ /* next segment is first segment */ scm->next_seg = 0; + if (cmd_type.command == RSL_CB_CMD_TYPE_SCHEDULE) + scm->is_schedule = true; + switch (cmd_type.command) { case RSL_CB_CMD_TYPE_NORMAL: case RSL_CB_CMD_TYPE_SCHEDULE: -- To view, visit https://gerrit.osmocom.org/14090 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I473edf698eba7ff5008f2fd1ec1776f0aa013858 Gerrit-Change-Number: 14090 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 22:15:26 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 22:15:26 +0000 Subject: Change in osmo-ttcn3-hacks[master]: L1CTL: Add f_L1CTL_DM_EST_REQ() for activation without IMM.ASS Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14091 Change subject: L1CTL: Add f_L1CTL_DM_EST_REQ() for activation without IMM.ASS ...................................................................... L1CTL: Add f_L1CTL_DM_EST_REQ() for activation without IMM.ASS In any normal or handover related assignments, we don't have an ImmediateAssignment that we can hand to f_L1CTL_DM_EST_REQ_IA(), so let's intrduce a version that works with arfcn, chan_nr and TSC directly. Change-Id: Ie5b85d3bac57032f4762ea9cdc21fdcd70fd5c2a --- M library/L1CTL_PortType.ttcn 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/91/14091/1 diff --git a/library/L1CTL_PortType.ttcn b/library/L1CTL_PortType.ttcn index 7dac4c3..a366a1b 100644 --- a/library/L1CTL_PortType.ttcn +++ b/library/L1CTL_PortType.ttcn @@ -177,10 +177,14 @@ } T.stop; } + function f_L1CTL_DM_EST_REQ(L1CTL_PT pt, Arfcn arfcn, RslChannelNr chan_nr, GsmTsc tsc) { + pt.send(ts_L1CTL_DM_EST_REQ(arfcn, chan_nr, tsc)); + } /* Send DM_EST_REQ from parameters derived from IMM ASS */ function f_L1CTL_DM_EST_REQ_IA(L1CTL_PT pt, ImmediateAssignment imm_ass) { - pt.send(ts_L1CTL_DM_EST_REQ({ false, imm_ass.chan_desc.arfcn }, imm_ass.chan_desc.chan_nr, imm_ass.chan_desc.tsc)); + f_L1CTL_DM_EST_REQ(pt, { false, imm_ass.chan_desc.arfcn }, imm_ass.chan_desc.chan_nr, + imm_ass.chan_desc.tsc); } /* Send DM_REL_REQ from parameters derived from IMM ASS */ -- To view, visit https://gerrit.osmocom.org/14091 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ie5b85d3bac57032f4762ea9cdc21fdcd70fd5c2a Gerrit-Change-Number: 14091 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 22:15:26 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 22:15:26 +0000 Subject: Change in osmo-ttcn3-hacks[master]: RSL_Types: Add dissected RSL_IE_ActivationType and related templates Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14092 Change subject: RSL_Types: Add dissected RSL_IE_ActivationType and related templates ...................................................................... RSL_Types: Add dissected RSL_IE_ActivationType and related templates This is required for supporting normal and handover assignments. Change-Id: I116d589d0ec4aa6bffba4da6e3bfe1974dd04db2 --- M library/RSL_Types.ttcn 1 file changed, 36 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/92/14092/1 diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index 0d772b3..cfe2845 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -273,20 +273,44 @@ type record RSL_IE_ActivationType { boolean reactivation, uint4_t reserved, - uint3_t a_bits - } + RSL_ActivationAbits a_bits + }; + type enumerated RSL_ActivationAbits { + ACT_REL_TO_IMM_ASSIGN ('000'B), + ACT_REL_TO_NORM_ASSIGN ('001'B), + ACT_REL_TO_ASYNC_HANDOVER ('010'B), + ACT_REL_TO_SYNC_HANDOVER ('011'B), + ACT_REL_TO_ADDL_ASSIGN ('100'B), + ACT_REL_TO_MSLOT_CONFIG ('101'B), + ACT_REL_TO_OSMO_PDCH ('111'B) + } with { variant "FIELDLENGTH(3)" }; - template RSL_IE_ActivationType t_RSL_IE_ActType := { + const RSL_IE_ActivationType t_RSL_IE_ActType_IA := { reactivation := false, reserved := 0, - a_bits := 0 /* related to immediate assignment */ + a_bits := ACT_REL_TO_IMM_ASSIGN + } + const RSL_IE_ActivationType t_RSL_IE_ActType_ASS := { + reactivation := false, + reserved := 0, + a_bits := ACT_REL_TO_NORM_ASSIGN + } + const RSL_IE_ActivationType t_RSL_IE_ActType_HO_ASYNC := { + reactivation := false, + reserved := 0, + a_bits := ACT_REL_TO_ASYNC_HANDOVER + } + const RSL_IE_ActivationType t_RSL_IE_ActType_HO_SYNC := { + reactivation := false, + reserved := 0, + a_bits := ACT_REL_TO_SYNC_HANDOVER } /* osmocom-style dynamic PDCH */ - template RSL_IE_ActivationType t_RSL_IE_ActType_PDCH := { + const RSL_IE_ActivationType t_RSL_IE_ActType_PDCH := { reactivation := false, reserved := 1, - a_bits := 7 /* related to immediate assignment */ + a_bits := ACT_REL_TO_OSMO_PDCH } /* 9.3.6 */ @@ -1122,23 +1146,25 @@ /* 8.4.1 BSC -> BTS */ template (value) RSL_Message ts_RSL_CHAN_ACT(template (value) RslChannelNr chan_nr, - template (value) RSL_IE_ChannelMode mode) := { + template (value) RSL_IE_ChannelMode mode, + template (value) RSL_IE_ActivationType at := t_RSL_IE_ActType_IA) := { msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), msg_type := RSL_MT_CHAN_ACTIV, ies :={ t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), - t_RSL_IE(RSL_IE_ACT_TYPE, RSL_IE_Body:{act_type := t_RSL_IE_ActType}), + t_RSL_IE(RSL_IE_ACT_TYPE, RSL_IE_Body:{act_type := at}), t_RSL_IE(RSL_IE_CHAN_MODE, RSL_IE_Body:{chan_mode := mode}) /* lots of optional IEs */ } } template RSL_Message tr_RSL_CHAN_ACT(template RslChannelNr chan_nr, - template RSL_IE_ChannelMode mode) := { + template RSL_IE_ChannelMode mode, + template (value) RSL_IE_ActivationType at := t_RSL_IE_ActType_IA) := { msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), msg_type := RSL_MT_CHAN_ACTIV, ies :={ tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), - tr_RSL_IE(RSL_IE_Body:{act_type := t_RSL_IE_ActType}), + tr_RSL_IE(RSL_IE_Body:{act_type := at}), tr_RSL_IE(RSL_IE_Body:{chan_mode := mode}), /* lots of optional IEs */ * -- To view, visit https://gerrit.osmocom.org/14092 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I116d589d0ec4aa6bffba4da6e3bfe1974dd04db2 Gerrit-Change-Number: 14092 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 22:15:27 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 22:15:27 +0000 Subject: Change in osmo-ttcn3-hacks[master]: RSL_Types: Add ts_RSL_IE_MS_Power() template for MS Power IE Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14093 Change subject: RSL_Types: Add ts_RSL_IE_MS_Power() template for MS Power IE ...................................................................... RSL_Types: Add ts_RSL_IE_MS_Power() template for MS Power IE Change-Id: I646208c3c6e755978162e207a4f2030be117883d --- M library/RSL_Types.ttcn 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/93/14093/1 diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index cfe2845..955e92c 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -442,6 +442,12 @@ boolean fpc_epc, uint5_t power_level } + template (value) RSL_IE_MS_Power ts_RSL_IE_MS_Power(uint5_t power_level, + boolean fpc_epc := false) := { + reserved := 0, + fpc_epc := fpc_epc, + power_level := power_level + } /* 9.3.18 */ type record RSL_IE_RachLoad { -- To view, visit https://gerrit.osmocom.org/14093 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I646208c3c6e755978162e207a4f2030be117883d Gerrit-Change-Number: 14093 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 22:15:27 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 22:15:27 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_sacch_chan_act_ho_async + TC_sacch_chan_act_ho_sync Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14094 Change subject: bts: Add TC_sacch_chan_act_ho_async + TC_sacch_chan_act_ho_sync ...................................................................... bts: Add TC_sacch_chan_act_ho_async + TC_sacch_chan_act_ho_sync Those two new tests test the subtle rules related to how the presence of certain IEs in the RSL CHAN ACT influence when exactly DL SACCH transmission should start during hand-over related channel activation. Change-Id: Ia88f3ab160891cdbbb8fa6e765f137edd04c6e81 Related: OS#3570 Related: OS#4008 Related: OS#4009 --- M bts/BTS_Tests.ttcn 1 file changed, 152 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/94/14094/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 0ee3cd4..076476f 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -497,9 +497,9 @@ var RSL_Message rx := f_rsl_transceive_ret(tx, exp_rx, id, ignore_other); } -function f_rsl_chan_act(RSL_IE_ChannelMode mode, boolean encr_enable := false, RSL_IE_List more_ies := {}) -runs on ConnHdlr { - var RSL_Message ch_act := valueof(ts_RSL_CHAN_ACT(g_chan_nr, mode)); +function f_rsl_chan_act(RSL_IE_ChannelMode mode, boolean encr_enable := false, RSL_IE_List more_ies := {}, + RSL_IE_ActivationType act_type := t_RSL_IE_ActType_IA) runs on ConnHdlr { + var RSL_Message ch_act := valueof(ts_RSL_CHAN_ACT(g_chan_nr, mode, act_type)); if (encr_enable) { /* append encryption related IEs, if requested */ var RSL_IE_EncryptionInfo encr_info; @@ -1007,7 +1007,153 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } -/* TODO: Test for SACCH transmission rules in the context of special CHAN ACT (HO) */ +/* verify that SACCH DL transmission is started only if MS power IE present + * see section 4.1.3 of 3GPP TS 48.058 */ +private function f_TC_sacch_chan_act_ho_async(charstring id) runs on ConnHdlr { + var octetstring si5 := f_rnd_octstring(19); + + f_l1_tune(L1CTL); + RSL.clear; + + /* Step 1: Activate ASYNC HO channel without MS power IE */ + + /* Activate channel on BTS side */ + f_rsl_chan_act(g_pars.chan_mode, act_type := t_RSL_IE_ActType_HO_ASYNC); + /* don't perform immediate assignment here, as we're testing non-IA case */ + /* enable dedicated mode */ + f_L1CTL_DM_EST_REQ(L1CTL, {false, mp_trx0_arfcn }, g_pars.chan_nr, 7); + + /* Verify that no DL SACCH is being received */ + f_sacch_missing(?); + + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); + + + /* Step 2: Activate ASYNC HO channel with MS power IE */ + + /* Activate channel on BTS side */ + var RSL_IE_List addl_ies := { + valueof(t_RSL_IE(RSL_IE_MS_POWER, RSL_IE_Body:{ms_power := ts_RSL_IE_MS_Power(0)})) + }; + f_rsl_chan_act(g_pars.chan_mode, more_ies := addl_ies, act_type := t_RSL_IE_ActType_HO_ASYNC); + /* don't perform immediate assignment here, as we're testing non-IA case */ + /* enable dedicated mode */ + f_L1CTL_DM_EST_REQ(L1CTL, {false, mp_trx0_arfcn }, g_pars.chan_nr, 7); + + /* Verify that DL SACCH is being received */ + f_sacch_present(si5); + + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); +} +testcase TC_sacch_chan_act_ho_async() runs on test_CT { + var ConnHdlr vc_conn; + var ConnHdlrPars pars; + f_init(); + + for (var integer i := 0; i < sizeof(g_AllChannels); i := i+1) { + pars := valueof(t_Pars(g_AllChannels[i], ts_RSL_ChanMode_SIGN)); + log(testcasename(), ": Starting for ", g_AllChannels[i]); + vc_conn := f_start_handler(refers(f_TC_sacch_chan_act_ho_async), pars); + vc_conn.done; + } + /* TODO: do the above in parallel, rather than sequentially? */ + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + +/* verify that SACCH DL transmission is started only if TA + MS power IEs present, + * see section 4.1.4 of 3GPP TS 48.058 */ +private function f_TC_sacch_chan_act_ho_sync(charstring id) runs on ConnHdlr { + var octetstring si5 := f_rnd_octstring(19); + var RSL_IE_List addl_ies; + + f_l1_tune(L1CTL); + RSL.clear; + + /* Step 1: Activate SYNC HO channel without MS power IE */ + + /* Activate channel on BTS side */ + f_rsl_chan_act(g_pars.chan_mode, act_type := t_RSL_IE_ActType_HO_SYNC); + /* don't perform immediate assignment here, as we're testing non-IA case */ + /* enable dedicated mode */ + f_L1CTL_DM_EST_REQ(L1CTL, {false, mp_trx0_arfcn }, g_pars.chan_nr, 7); + + /* Verify that no DL SACCH is being received */ + f_sacch_missing(?); + + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); + + + /* Step 2a: Activate SYNC HO channel with only MS power IE */ + + /* Activate channel on BTS side */ + addl_ies := { + valueof(t_RSL_IE(RSL_IE_MS_POWER, RSL_IE_Body:{ms_power := ts_RSL_IE_MS_Power(0)})) + }; + f_rsl_chan_act(g_pars.chan_mode, more_ies := addl_ies, act_type := t_RSL_IE_ActType_HO_SYNC); + /* don't perform immediate assignment here, as we're testing non-IA case */ + /* enable dedicated mode */ + f_L1CTL_DM_EST_REQ(L1CTL, {false, mp_trx0_arfcn }, g_pars.chan_nr, 7); + + /* Verify that no DL SACCH is being received */ + f_sacch_missing(?); + + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); + + + /* Step 2b: Activate SYNC HO channel with TA IE */ + + /* Activate channel on BTS side */ + addl_ies := { + valueof(t_RSL_IE(RSL_IE_TIMING_ADVANCE, RSL_IE_Body:{timing_adv := 0})) + }; + f_rsl_chan_act(g_pars.chan_mode, more_ies := addl_ies, act_type := t_RSL_IE_ActType_HO_SYNC); + /* don't perform immediate assignment here, as we're testing non-IA case */ + /* enable dedicated mode */ + f_L1CTL_DM_EST_REQ(L1CTL, {false, mp_trx0_arfcn }, g_pars.chan_nr, 7); + + /* Verify that no DL SACCH is being received */ + f_sacch_missing(?); + + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); + + + /* Step 3: Activate SYNC HO channel with MS power IE and TA IE */ + + /* Activate channel on BTS side */ + addl_ies := { + valueof(t_RSL_IE(RSL_IE_TIMING_ADVANCE, RSL_IE_Body:{timing_adv := 0})), + valueof(t_RSL_IE(RSL_IE_MS_POWER, RSL_IE_Body:{ms_power := ts_RSL_IE_MS_Power(0)})) + }; + f_rsl_chan_act(g_pars.chan_mode, more_ies := addl_ies, act_type := t_RSL_IE_ActType_HO_SYNC); + /* don't perform immediate assignment here, as we're testing non-IA case */ + /* enable dedicated mode */ + f_L1CTL_DM_EST_REQ(L1CTL, {false, mp_trx0_arfcn }, g_pars.chan_nr, 7); + + /* Verify that DL SACCH is being received */ + f_sacch_present(si5); + + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); +} +testcase TC_sacch_chan_act_ho_sync() runs on test_CT { + var ConnHdlr vc_conn; + var ConnHdlrPars pars; + f_init(); + + for (var integer i := 0; i < sizeof(g_AllChannels); i := i+1) { + pars := valueof(t_Pars(g_AllChannels[i], ts_RSL_ChanMode_SIGN)); + log(testcasename(), ": Starting for ", g_AllChannels[i]); + vc_conn := f_start_handler(refers(f_TC_sacch_chan_act_ho_sync), pars); + vc_conn.done; + } + /* TODO: do the above in parallel, rather than sequentially? */ + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} /*********************************************************************** @@ -4465,6 +4611,8 @@ execute( TC_sacch_multi() ); execute( TC_sacch_multi_chg() ); execute( TC_sacch_chan_act() ); + execute( TC_sacch_chan_act_ho_async() ); + execute( TC_sacch_chan_act_ho_sync() ); execute( TC_rach_content() ); execute( TC_rach_count() ); execute( TC_rach_max_ta() ); -- To view, visit https://gerrit.osmocom.org/14094 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ia88f3ab160891cdbbb8fa6e765f137edd04c6e81 Gerrit-Change-Number: 14094 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 22:28:56 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 22:28:56 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_sms_cb_cmd_cbch_sdcch{4, 8}_multi() Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14095 Change subject: bts: Add TC_sms_cb_cmd_cbch_sdcch{4,8}_multi() ...................................................................... bts: Add TC_sms_cb_cmd_cbch_sdcch{4,8}_multi() These new tests verify that multiple SMSCB commands are equeued, and that each related message is sent exactly once. Change-Id: Ice22fd2689a42c3b1951a02e65664102d4eaccc2 Related: OS#4011 --- M bts/BTS_Tests.ttcn 1 file changed, 39 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/95/14095/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 8e28b50..b833693 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -4665,7 +4665,7 @@ var L1ctlDlMessage dl; var boolean cmd_seen_once := false; var integer i, j; - timer T := 5.0; + timer T := 5.0 * int2float(lengthof(pars.msgs)); f_cbch_compute_exp_blocks(pars); @@ -4785,6 +4785,26 @@ omit } } +private const CbchTestMsgs msgs_3m_4b_norm := { + { RSL_CB_CMD_NORMAL, 3, '001000320f1141660c344dd3cba09a0c000000000000'O & + '000102030405060708090a0b0c0d0e0f101213141516'O & + '101112131415161718191a1b1c1d1e1f202223242526'O & + '201122232425262728292a2b2c2d2e2f303233343536'O, + omit }, + { RSL_CB_CMD_NORMAL, 3, '002000320f1141660c344dd3cba09a0c000000000000'O & + '002102030405060708090a0b0c0d0e0f101213141516'O & + '102112131415161718191a1b1c1d1e1f202223242526'O & + '202122232425262728292a2b2c2d2e2f303233343536'O, + omit }, + { RSL_CB_CMD_NORMAL, 3, '003000320f1141660c344dd3cba09a0c000000000000'O & + '003102030405060708090a0b0c0d0e0f101213141516'O & + '103112131415161718191a1b1c1d1e1f202223242526'O & + '203122232425262728292a2b2c2d2e2f303233343536'O, + omit } +} + + + /* transmit single-block SMSCB COMMAND */ testcase TC_sms_cb_cmd_cbch_sdcch4_1block() runs on test_CT { var CbchTestPars pars := { @@ -4849,6 +4869,22 @@ f_TC_smscb(pars); } +/* transmit multiple commands of each 4 blocks */ +testcase TC_sms_cb_cmd_cbch_sdcch4_multi() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := true, + msgs := msgs_3m_4b_norm + }; + f_TC_smscb(pars); +} +testcase TC_sms_cb_cmd_cbch_sdcch8_multi() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := false, + msgs := msgs_3m_4b_norm + }; + f_TC_smscb(pars); +} + /* transmit SMSCB COMMAND with SCHEDULE payload */ testcase TC_sms_cb_cmd_cbch_sdcch4_schedule() runs on test_CT { var CbchTestPars pars := { @@ -5008,11 +5044,13 @@ execute( TC_sms_cb_cmd_cbch_sdcch4_2block() ); execute( TC_sms_cb_cmd_cbch_sdcch4_3block() ); execute( TC_sms_cb_cmd_cbch_sdcch4_4block() ); + execute( TC_sms_cb_cmd_cbch_sdcch4_multi() ); execute( TC_sms_cb_cmd_cbch_sdcch4_schedule() ); execute( TC_sms_cb_cmd_cbch_sdcch8_1block() ); execute( TC_sms_cb_cmd_cbch_sdcch8_2block() ); execute( TC_sms_cb_cmd_cbch_sdcch8_3block() ); execute( TC_sms_cb_cmd_cbch_sdcch8_4block() ); + execute( TC_sms_cb_cmd_cbch_sdcch8_multi() ); execute( TC_sms_cb_cmd_cbch_sdcch8_schedule() ); -- To view, visit https://gerrit.osmocom.org/14095 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ice22fd2689a42c3b1951a02e65664102d4eaccc2 Gerrit-Change-Number: 14095 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 22:34:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 22:34:16 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: CBCH related tests for OsmoBTS In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/10983 ) Change subject: bts: CBCH related tests for OsmoBTS ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/10983 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I955b4000c12180a39b0205b69b7b2c8cee8c9da3 Gerrit-Change-Number: 10983 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 19 May 2019 22:34:16 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 22:35:36 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 22:35:36 +0000 Subject: Change in osmo-bsc[master]: bssap: Parse Osmux CID on BSSAP Assign Req recv and use it in MGCP In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13925 ) Change subject: bssap: Parse Osmux CID on BSSAP Assign Req recv and use it in MGCP ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13925 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I86e7e13fc7921e3209fb764c0e7797e7ec09b79e Gerrit-Change-Number: 13925 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Sun, 19 May 2019 22:35:36 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 22:36:15 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 22:36:15 +0000 Subject: Change in osmo-bsc[master]: bssap: Feed Assign Complete with Osmux CID retrieved from MGW In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13927 ) Change subject: bssap: Feed Assign Complete with Osmux CID retrieved from MGW ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13927 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I77dfdd965ae828c39a9818669177aefd22bc02f2 Gerrit-Change-Number: 13927 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 19 May 2019 22:36:15 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 22:36:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 22:36:18 +0000 Subject: Change in osmo-bsc[master]: bssap: Parse Osmux CID on BSSAP Assign Req recv and use it in MGCP In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13925 ) Change subject: bssap: Parse Osmux CID on BSSAP Assign Req recv and use it in MGCP ...................................................................... bssap: Parse Osmux CID on BSSAP Assign Req recv and use it in MGCP The Osmux CID obtained from the MSC is passed to the co-located BSC MGW to configure the MSC-side MGW conn of a call leg. Depends on: osmo-mgw.git I73b4c62baf39050da81d65553cbea07bc51163de Change-Id: I86e7e13fc7921e3209fb764c0e7797e7ec09b79e --- M include/osmocom/bsc/gsm_data.h M src/osmo-bsc/bsc_subscr_conn_fsm.c M src/osmo-bsc/osmo_bsc_bssap.c 3 files changed, 33 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index dc686c3..68c95e1 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -33,6 +33,7 @@ #include #include #include +#include #define GSM_T3122_DEFAULT 10 @@ -120,6 +121,8 @@ char msc_rtp_addr[INET_ADDRSTRLEN]; uint16_t msc_rtp_port; + bool use_osmux; + uint8_t osmux_cid; /* Rate/codec setting in preference order (need at least 1 !) */ int n_ch_mode_rate; diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c index f944431..87ad567 100644 --- a/src/osmo-bsc/bsc_subscr_conn_fsm.c +++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c @@ -519,6 +519,8 @@ .port = port, .call_id = conn->sccp.conn_id, .ptime = 20, + .x_osmo_osmux_use = conn->assignment.req.use_osmux, + .x_osmo_osmux_cid = conn->assignment.req.osmux_cid, }; mgcp_pick_codec(&mgw_info, for_lchan, false); diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 9dee265..dcd06f3 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -776,6 +776,8 @@ struct tlv_parsed tp; uint16_t cic = 0; bool aoip = false; + bool use_osmux = false; + uint8_t osmux_cid = 0; struct sockaddr_storage rtp_addr; struct gsm0808_channel_type ct; uint8_t cause; @@ -853,6 +855,30 @@ goto reject; } + if (TLVP_PRESENT(&tp, GSM0808_IE_OSMO_OSMUX_CID)) { + if (conn->sccp.msc->use_osmux == OSMUX_USAGE_OFF) { + LOGP(DMSC, LOGL_ERROR, "MSC using Osmux but we have it disabled.\n"); + cause = GSM0808_CAUSE_INCORRECT_VALUE; + goto reject; + } + use_osmux = true; + rc = gsm0808_dec_osmux_cid(&osmux_cid, + TLVP_VAL(&tp, GSM0808_IE_OSMO_OSMUX_CID), + TLVP_LEN(&tp, GSM0808_IE_OSMO_OSMUX_CID)); + if (rc < 0) { + LOGP(DMSC, LOGL_ERROR, "Unable to decode Osmux CID.\n"); + cause = GSM0808_CAUSE_INCORRECT_VALUE; + goto reject; + } + } else { + if (conn->sccp.msc->use_osmux == OSMUX_USAGE_ONLY) { + LOGP(DMSC, LOGL_ERROR, "MSC not using Osmux but we are forced to use it.\n"); + cause = GSM0808_CAUSE_INCORRECT_VALUE; + goto reject; + } else if (conn->sccp.msc->use_osmux == OSMUX_USAGE_ON) + LOGP(DMSC, LOGL_NOTICE, "MSC not using Osmux but we have Osmux enabled.\n"); + } + /* Decode speech codec list. First set len = 0. */ conn->codec_list = (struct gsm0808_speech_codec_list){}; /* Check for speech codec list element */ @@ -878,6 +904,8 @@ req = (struct assignment_request){ .aoip = aoip, .msc_assigned_cic = cic, + .use_osmux = use_osmux, + .osmux_cid = osmux_cid, }; /* Match codec information from the assignment command against the -- To view, visit https://gerrit.osmocom.org/13925 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I86e7e13fc7921e3209fb764c0e7797e7ec09b79e Gerrit-Change-Number: 13925 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 22:36:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 22:36:19 +0000 Subject: Change in osmo-bsc[master]: bssap: Feed Assign Complete with Osmux CID retrieved from MGW In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13927 ) Change subject: bssap: Feed Assign Complete with Osmux CID retrieved from MGW ...................................................................... bssap: Feed Assign Complete with Osmux CID retrieved from MGW The CID is sent back to the MSC so it can configure its MGW to send Osmux frames to the BSC MGW using this CID. Change-Id: I77dfdd965ae828c39a9818669177aefd22bc02f2 --- M src/osmo-bsc/assignment_fsm.c 1 file changed, 24 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c index 834b58b..aefa4af 100644 --- a/src/osmo-bsc/assignment_fsm.c +++ b/src/osmo-bsc/assignment_fsm.c @@ -128,6 +128,13 @@ } } +static void _gsm0808_ass_compl_extend_osmux(struct msgb *msg, uint8_t cid) +{ + OSMO_ASSERT(msg->l3h[1] == msgb_l3len(msg) - 2); /*TL not in len */ + msgb_tv_put(msg, GSM0808_IE_OSMO_OSMUX_CID, cid); + msg->l3h[1] = msgb_l3len(msg) - 2; +} + static void send_assignment_complete(struct gsm_subscriber_connection *conn) { int rc; @@ -135,6 +142,7 @@ struct gsm0808_speech_codec *sc_ptr = NULL; struct sockaddr_storage addr_local; struct sockaddr_storage *addr_local_p = NULL; + uint8_t osmux_cid = 0; int perm_spch = 0; uint8_t chosen_channel; struct msgb *resp; @@ -164,6 +172,15 @@ addr_local_p = &addr_local; } + if (gscon_is_aoip(conn) && conn->assignment.req.use_osmux) { + if (!osmo_mgcpc_ep_ci_get_crcx_info_to_osmux_cid(conn->user_plane.mgw_endpoint_ci_msc, + &osmux_cid)) { + assignment_fail(GSM0808_CAUSE_EQUIPMENT_FAILURE, + "Unable to compose Osmux CID of MGW -> MSC"); + return; + } + } + /* Only AoIP networks include a speech codec (choosen) in the * assignment complete message. */ if (gscon_is_aoip(conn)) { @@ -185,6 +202,10 @@ return; } + if (gscon_is_aoip(conn) && conn->assignment.requires_voice_stream && + conn->assignment.req.use_osmux) + _gsm0808_ass_compl_extend_osmux(resp, osmux_cid); + rc = gscon_sigtran_send(conn, resp); if (rc) { assignment_fail(GSM0808_CAUSE_EQUIPMENT_FAILURE, @@ -466,10 +487,11 @@ assignment_fsm_update_id(conn); LOG_ASSIGNMENT(conn, LOGL_INFO, "Starting Assignment: chan_mode=%s, chan_type=%s," - " aoip=%s MSC-rtp=%s:%u\n", + " aoip=%s MSC-rtp=%s:%u (osmux=%s)\n", gsm48_chan_mode_name(conn->lchan->ch_mode_rate.chan_mode), rate_names[conn->lchan->ch_mode_rate.chan_rate], - req->aoip ? "yes" : "no", req->msc_rtp_addr, req->msc_rtp_port); + req->aoip ? "yes" : "no", req->msc_rtp_addr, req->msc_rtp_port, + req->use_osmux ? "yes" : "no"); assignment_fsm_state_chg(ASSIGNMENT_ST_WAIT_LCHAN_ACTIVE); info = (struct lchan_activate_info){ -- To view, visit https://gerrit.osmocom.org/13927 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I77dfdd965ae828c39a9818669177aefd22bc02f2 Gerrit-Change-Number: 13927 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 19 22:37:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 19 May 2019 22:37:18 +0000 Subject: Change in osmo-msc[master]: Request Osmux CID and forward it in Assign Req and Assign Compl In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14041 ) Change subject: Request Osmux CID and forward it in Assign Req and Assign Compl ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14041 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5b14e34481e890669c9ee02dba81eba84293cebb Gerrit-Change-Number: 14041 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Comment-Date: Sun, 19 May 2019 22:37:18 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 07:03:27 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 20 May 2019 07:03:27 +0000 Subject: Change in osmo-hlr[master]: Create subscribers on demand In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/13713 ) Change subject: Create subscribers on demand ...................................................................... Patch Set 8: Code-Review+1 Thanks Vadim, for replacing "extension" with MSISDN. :) -- To view, visit https://gerrit.osmocom.org/13713 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd Gerrit-Change-Number: 13713 Gerrit-PatchSet: 8 Gerrit-Owner: Vadim Yanitskiy Gerrit-Assignee: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 20 May 2019 07:03:27 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 07:50:40 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 20 May 2019 07:50:40 +0000 Subject: Change in osmo-ttcn3-hacks[master]: RTP_Emulation: Avoid failure if T_transmit triggers between bind and ... In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14078 ) Change subject: RTP_Emulation: Avoid failure if T_transmit triggers between bind and connect ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/14078/1/library/RTP_Emulation.ttcn File library/RTP_Emulation.ttcn: https://gerrit.osmocom.org/#/c/14078/1/library/RTP_Emulation.ttcn at 473 PS1, Line 473: [g_tx_connected] T_transmit.timeout { > AFAICT: The timeout expiration event is in the inbound port queue until some match statement dequeue [?] Tested it works as you described, so we can merge this patch. Tested with following snippet: """ var boolean g_tx_connected := false; var boolean cont := true; timer T_transmit := 1.0; timer T_foo := 5.0; T_transmit.start; T_foo.start; while (cont) { alt { [] T_foo.timeout { log("pespin: foo enabling other timer..."); g_tx_connected := true; } [g_tx_connected] T_transmit.timeout { log("pespin: TIMER TRIGGERS!"); cont := false; } } } setverdict(pass); """ Output: """ 09:47:43.230378 mtc MGCP_Test.ttcn:1049 Start timer T_transmit: 1 s 09:47:43.230397 mtc MGCP_Test.ttcn:1050 Start timer T_foo: 5 s 09:47:48.246562 mtc MGCP_Test.ttcn:1054 Timeout T_foo: 5 s 09:47:48.246829 mtc MGCP_Test.ttcn:1055 pespin: foo enabling other timer... 09:47:48.247020 mtc MGCP_Test.ttcn:1054 Timeout operation on timer T_foo failed: The timer is not started. 09:47:48.247132 mtc MGCP_Test.ttcn:1058 Timeout T_transmit: 1 s 09:47:48.247217 mtc MGCP_Test.ttcn:1059 pespin: TIMER TRIGGERS! 09:47:48.247416 mtc MGCP_Test.ttcn:1065 setverdict(pass): none -> pass """ -- To view, visit https://gerrit.osmocom.org/14078 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I20e7aed35bb28200e30ee5efc718f77e036d8262 Gerrit-Change-Number: 14078 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Harald Welte Gerrit-Comment-Date: Mon, 20 May 2019 07:50:40 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 08:10:19 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 20 May 2019 08:10:19 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Add Osmux support and tests for MGW In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14046 to look at the new patch set (#2). Change subject: Add Osmux support and tests for MGW ...................................................................... Add Osmux support and tests for MGW Depends: osmo-mgw.git Iac073f1db46569b46eddeaecc9934a2986bd50f1 Change-Id: Ibb58b2a4e08d6f30cfe347c217794d0d1310954f --- M library/MGCP_Templates.ttcn M library/MGCP_Types.ttcn A library/OSMUX_CodecPort.ttcn A library/OSMUX_CodecPort_CtrlFunct.ttcn A library/OSMUX_CodecPort_CtrlFunctDef.cc A library/OSMUX_Emulation.ttcn A library/OSMUX_Types.ttcn M mgw/MGCP_Test.ttcn M mgw/expected-results.xml M mgw/gen_links.sh M mgw/regen_makefile.sh 11 files changed, 1,553 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/46/14046/2 -- To view, visit https://gerrit.osmocom.org/14046 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibb58b2a4e08d6f30cfe347c217794d0d1310954f Gerrit-Change-Number: 14046 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 08:10:46 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 20 May 2019 08:10:46 +0000 Subject: Change in docker-playground[master]: mgw: Enable osmux in osmo-mgw.cfg In-Reply-To: References: Message-ID: Pau Espin Pedrol has abandoned this change. ( https://gerrit.osmocom.org/14047 ) Change subject: mgw: Enable osmux in osmo-mgw.cfg ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/14047 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: Ic380b4cfff8be3cbab95a376ca5eabdb8d682477 Gerrit-Change-Number: 14047 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 09:24:00 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 20 May 2019 09:24:00 +0000 Subject: Change in osmo-gsm-manuals[master]: GSUP: document inter-MSC handover additions Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/14096 Change subject: GSUP: document inter-MSC handover additions ...................................................................... GSUP: document inter-MSC handover additions Message formats of the new messages look mostly the same (IMSI, Message Class, Source Name, Destination Name, AN-APDU). That is, because AN-APDU is storing results, error reasons etc. This can be seen clearly in osmo-msc.git: * src/libmsc/msc_a_remote.c:msc_a_remote_fsm_communicating() * src/libmsc/msc_i_remote.c:msc_i_remote_fsm_ready() The message squence charts in the E Procedures section are directly based on Neels' interMSC_HO_GSUP_msgs.txt [1]. It seems that using AN-APDU made some other new IEs redundant: RR Cause, BSSAP Cause, Session Management Cause had been added to GSUP for the MSC handover, and are documented now, but they are currently not used in osmo-msc.git. The new message OSMO_GSUP_MSGT_E_ABORT is not used either, so I left a stub for it in the message format section. [1] https://osmocom.org/attachments/3720/interMSC_HO_GSUP_msgs.txt Related: OS#3774, OS#3619 Change-Id: I6b9f23d08cfe53c8b77f51c6afb900c2badc9e2c --- M common/chapters/gsup.adoc 1 file changed, 410 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/96/14096/1 diff --git a/common/chapters/gsup.adoc b/common/chapters/gsup.adoc index 1fd0bb6..679ee2d 100644 --- a/common/chapters/gsup.adoc +++ b/common/chapters/gsup.adoc @@ -219,6 +219,112 @@ } ---- +=== Procedures (E Interface) + +The E interface connects two MSCs in the traditional GSM MAP world. It is used +for the inter-MSC handover. In GSUP, we don't need that extra connection, as we +route the messages over the GSUP server (OsmoHLR) instead. + +Whenever MSC-A is sending to MSC-B, and vice-versa, the message needs to pass +through the GSUP server. In order to make the following message sequence charts +easier to read, this step has been omitted. + +==== E Handover + +MSC-A has an active RAN connection and hands it over to MSC-B. + +.E Handover (Normal Case) +["mscgen"] +---- +msc { + hscale="1.5"; + A [label="MSC-A"], B [label="MSC-B"]; + + A => B [label="E Prepare Handover Request\n\n(AN-APDU: Handover Request)"]; + |||; + A <= B [label="E Prepare Handover Result\n\n(AN-APDU: Handover Request Ack)"]; + |||; + A <= B [label="E Process Access Signalling Request\n\n(AN-APDU: Handover Detect)"]; + |||; + A <= B [label="E Send End Signal Request\n\n(AN-APDU: Handover Complete)"]; +} +---- + +==== E Subsequent Handover + +MSC-B has an active RAN connection, and asks MSC-A to hand it over to MSC-B'. + +.E Subsequent Handover (Normal Case) +["mscgen"] +---- +msc { + hscale="1.5"; + A [label="MSC-A"], B [label="MSC-B"], B_ [label="MSC-B'"]; + + B => A [label="E Prepare Subsequent Handover Request\n\n(AN-APDU: Handover Required)"]; + |||; + A => B_ [label="E Prepare Handover Request\n\n(AN-APDU: Handover Request)"]; + |||; + B_ => A [label="E Prepare Handover Response\n\n(AN-APDU: Handover Request Ack)"]; + |||; + A => B [label="E Prepare Subsequent Handover Response\n\n(AN-APDU: Handover Request Ack)"]; + |||; + B_ => A [label="E Process Access Signalling Request\n\n(AN-APDU: Handover Detect)"]; + |||; + B_ => A [label="E Process Access Signalling Request\n\n(AN-APDU: Handover Complete)"]; + |||; + A => B [label="E Close"]; +} +---- + +==== E Forward and Process Access Signalling + +MSC-A is forwarding a message from its BSS (Base Station Subsystem) to MSC-B. +MSC-B forwards the message to its BSS, and answers to MSC-A with a Process +Access Signalling Request. + +.E Process and Forward Access Signalling (Normal Case) +["mscgen"] +---- +msc { + hscale="1.5"; + A [label="MSC-A"], B [label="MSC-B"]; + + A => B [label="E Forward Access Signalling Request\n\n(AN-APDU: DTAP, e.g. CC, SMS, ...)"]; + |||; + B => A [label="E Process Access Signalling Request\n\n(AN-APDU: DTAP, e.g. CC, SMS, ...)"]; +} +---- + +==== E Routing Error + +The GSUP server can not route any of the requests above, and responds with an +E Routing Error. Possible reasons for not being able to route the message are +missing routing IEs, a mismatching source name IE (<>), +the destination not being connected to the GSUP server or a failed attempt to +send the message from the GSUP sever to the destination. To figure out, what +went wrong in detail, refer to the GSUP server's logs. + +In the traditional GSM MAP world, the participants of an E procedure are +directly connected, hence this routing error message does not exist in MAP. + +.E Routing Error example +["mscgen"] +---- +msc { + hscale="1.5"; + A [label="MSC-A"], HLR [label="GSUP Server (OsmoHLR)"], B [label="MSC-B"]; + + A => HLR [label="E Prepare Handover Request"]; + HLR => A [label="E Routing Error"]; +} +---- + +//// +End of "Procedures (E Interface)" chapter. Remember to place unrelated +procedures at the end of the "Procedures" chapter, not here! +//// + === Message Format ==== General @@ -722,6 +828,207 @@ |51|IMEI Check Result|<>|M|TLV|3 |=== +==== E Prepare Handover Request + +Direction: MSC-A=MSC-I => MSC-B=MSC-T (via HLR) + +[options="header",cols="5%,45%,20%,10%,10%,10%"] +|=== +|IEI|IE|Type|Presence|Format|Length +| |Message Type|<>|M|V|1 +|01|IMSI|<>|M|TLV|2-10 +|0a|Message Class|<>|M|TLV|3 +|60|Source Name|<>|M|TLV|2-... +|61|Destination Name|<>|M|TLV|2-... +|62|AN-APDU|<>|M|TLV|2-... +|=== + +==== E Prepare Handover Error + +Direction: MSC-B=MSC-T => MSC-A=MSC-I (via HLR) + +[options="header",cols="5%,45%,20%,10%,10%,10%"] +|=== +|IEI|IE|Type|Presence|Format|Length +| |Message Type|<>|M|V|1 +|01|IMSI|<>|M|TLV|2-10 +|0a|Message Class|<>|M|TLV|3 +|60|Source Name|<>|M|TLV|2-... +|61|Destination Name|<>|M|TLV|2-... +|62|AN-APDU|<>|M|TLV|2-... +|=== + +==== E Prepare Handover Result + +Direction: MSC-B=MSC-T => MSC-A=MSC-I (via HLR) + +[options="header",cols="5%,45%,20%,10%,10%,10%"] +|=== +|IEI|IE|Type|Presence|Format|Length +| |Message Type|<>|M|V|1 +|01|IMSI|<>|M|TLV|2-10 +|0a|Message Class|<>|M|TLV|3 +|60|Source Name|<>|M|TLV|2-... +|61|Destination Name|<>|M|TLV|2-... +|62|AN-APDU|<>|M|TLV|2-... +|=== + +==== E Prepare Subsequent Handover Request + +Direction: MSC-B=MSC-I => MSC-A (via HLR) + +[options="header",cols="5%,45%,20%,10%,10%,10%"] +|=== +|IEI|IE|Type|Presence|Format|Length +| |Message Type|<>|M|V|1 +|01|IMSI|<>|M|TLV|2-10 +|0a|Message Class|<>|M|TLV|3 +|60|Source Name|<>|M|TLV|2-... +|61|Destination Name|<>|M|TLV|2-... +|62|AN-APDU|<>|M|TLV|2-... +|=== + +==== E Prepare Subsequent Handover Error + +Direction: MSC-A => MSC-B=MSC-I (via HLR) + +[options="header",cols="5%,45%,20%,10%,10%,10%"] +|=== +|IEI|IE|Type|Presence|Format|Length +| |Message Type|<>|M|V|1 +|01|IMSI|<>|M|TLV|2-10 +|0a|Message Class|<>|M|TLV|3 +|60|Source Name|<>|M|TLV|2-... +|61|Destination Name|<>|M|TLV|2-... +|62|AN-APDU|<>|M|TLV|2-... +|=== + +==== E Prepare Subsequent Handover Result + +Direction: MSC-A => MSC-B=MSC-I (via HLR) + +[options="header",cols="5%,45%,20%,10%,10%,10%"] +|=== +|IEI|IE|Type|Presence|Format|Length +| |Message Type|<>|M|V|1 +|01|IMSI|<>|M|TLV|2-10 +|0a|Message Class|<>|M|TLV|3 +|60|Source Name|<>|M|TLV|2-... +|61|Destination Name|<>|M|TLV|2-... +|62|AN-APDU|<>|M|TLV|2-... +|=== + +==== E Send End Signal Request + +Direction: MSC-B=MSC-T => MSC-A=MSC-I (via HLR) + +[options="header",cols="5%,45%,20%,10%,10%,10%"] +|=== +|IEI|IE|Type|Presence|Format|Length +| |Message Type|<>|M|V|1 +|01|IMSI|<>|M|TLV|2-10 +|0a|Message Class|<>|M|TLV|3 +|60|Source Name|<>|M|TLV|2-... +|61|Destination Name|<>|M|TLV|2-... +|62|AN-APDU|<>|M|TLV|2-... +|=== + +==== E Send End Signal Error + +Direction: MSC-A=MSC-I => MSC-B=MSC-T (via HLR) + +[options="header",cols="5%,45%,20%,10%,10%,10%"] +|=== +|IEI|IE|Type|Presence|Format|Length +| |Message Type|<>|M|V|1 +|01|IMSI|<>|M|TLV|2-10 +|0a|Message Class|<>|M|TLV|3 +|60|Source Name|<>|M|TLV|2-... +|61|Destination Name|<>|M|TLV|2-... +|62|AN-APDU|<>|M|TLV|2-... +|=== + +==== E Send End Signal Result + +Direction: MSC-A => MSC-B=MSC-I (via HLR) + +[options="header",cols="5%,45%,20%,10%,10%,10%"] +|=== +|IEI|IE|Type|Presence|Format|Length +| |Message Type|<>|M|V|1 +|01|IMSI|<>|M|TLV|2-10 +|0a|Message Class|<>|M|TLV|3 +|60|Source Name|<>|M|TLV|2-... +|61|Destination Name|<>|M|TLV|2-... +|62|AN-APDU|<>|M|TLV|2-... +|=== + +==== E Process Access Signalling Request + +Direction: MSC-B=MSC-T => MSC-A=MSC-I (via HLR) + +[options="header",cols="5%,45%,20%,10%,10%,10%"] +|=== +|IEI|IE|Type|Presence|Format|Length +| |Message Type|<>|M|V|1 +|01|IMSI|<>|M|TLV|2-10 +|0a|Message Class|<>|M|TLV|3 +|60|Source Name|<>|M|TLV|2-... +|61|Destination Name|<>|M|TLV|2-... +|62|AN-APDU|<>|M|TLV|2-... +|=== + +==== E Forward Access Signalling Request + +Direction: MSC-A => MSC-B=MSC-I (via HLR) + +[options="header",cols="5%,45%,20%,10%,10%,10%"] +|=== +|IEI|IE|Type|Presence|Format|Length +| |Message Type|<>|M|V|1 +|01|IMSI|<>|M|TLV|2-10 +|0a|Message Class|<>|M|TLV|3 +|60|Source Name|<>|M|TLV|2-... +|61|Destination Name|<>|M|TLV|2-... +|62|AN-APDU|<>|M|TLV|2-... +|=== + +==== E Close + +Direction: MSC-A => MSC-B (via HLR) + +[options="header",cols="5%,45%,20%,10%,10%,10%"] +|=== +|IEI|IE|Type|Presence|Format|Length +| |Message Type|<>|M|V|1 +|01|IMSI|<>|M|TLV|2-10 +|0a|Message Class|<>|M|TLV|3 +|60|Source Name|<>|M|TLV|2-... +|61|Destination Name|<>|M|TLV|2-... +|=== + +==== E Abort + +This message was added to GSUP for the inter-MSC handover. But so far it is not +used yet. + +==== E Routing Error + +Direction: GSUP Server (HLR) => GSUP Client (MSC) + +[options="header",cols="5%,45%,20%,10%,10%,10%"] +|=== +|IEI|IE|Type|Presence|Format|Length +| |Message Type|<>|M|V|1 +|01|IMSI|<>|M|TLV|2-10 +|0a|Message Class|<>|M|TLV|3 +|60|Source Name|<>|M|TLV|2-... +|61|Destination Name|<>|M|TLV|2-... +|30|Session ID|<>|M|TLV|6 +|31|Session State|<>|M|TLV|3 +|=== + + === Information Elements [[gsup-ie-msgtype]] @@ -986,6 +1293,7 @@ |0x07|Freeze P-TMSI|<> |0x08|MSISDN|ISDN-AddressString/octet, <> |0x09|HLR Number|<> +|0x0a|Message Class| <> |0x10|PDP Context ID|<> |0x11|PDP Type|<> |0x12|Access Point Name|<> @@ -1012,6 +1320,12 @@ |0x46|SM Alert Reason|<> |0x50|IMEI|<> |0x51|IMEI Check Result|<> +|0x60|Source Name|<> +|0x61|Destination Name|<> +|0x62|AN-APDU|<> +|0x63|RR Cause|<> +|0x64|BSSAP Cause|<> +|0x65|Session Management Cause|<> |=== [[gsup-ie-empty]] @@ -1192,6 +1506,102 @@ |0x02|NACK |=== +[[gsup-ie-message-class]] +==== Message Class + +Indicate, which kind of message is being sent. This allows to trivially dispatch +incoming GSUP messages to the right code paths, and should make writing a GSUP +to MAP converter easier. + +This IE was introduced together with inter-MSC handover code. Inter-MSC messages +must include this IE and set it to the appropriate type. The intention of +creating this IE was to use it with all GSUP messages eventually. + +[options="header",cols="10%,20%,70%"] +|=== +|Type|Always present|Description +|1|no |Subscriber Management +|2|no |SMS +|3|no |USSD +|4|yes|Inter-MSC +|=== + +[[gsup-ie-source-name]] +==== Source Name + +When the GSUP server is asked to forward a message between two GSUP clients, the +source name is the IPA name of the client where the message is coming from. The +source name IE is present, when the GSUP server forwards the message to the +destination. Although redundant, the source name IE is also sent from the source +to the GSUP server (so it is easier to follow the network traces). + +Source and destination names are sent as strings. + +.Message forwarding example +["mscgen"] +---- +msc { + hscale="1.5"; + A [label="GSUP Client A"], + HLR [label="GSUP Server (OsmoHLR)"], + B [label="GSUP Client B"]; + + A => HLR [label="Source: A, Destination: B"]; + HLR => B [label="Source: A, Destination: B"]; +} +---- + + +[[gsup-ie-destination-name]] +==== Destination Name + +The receiving counterpart to source name (<>). + +[[gsup-ie-an-apdu]] +==== AN-APDU + +This IE encodes the AN-APDU parameter described in 3GPP TS 29.002 7.6.9.1. + +.Access Network Protocol +[options="header",cols="10%,90%"] +|=== +|Type|Description +|0x01|BSSAP +|0x02|RANAP +|=== + +[packetdiag] +---- +{ + colwidth = 8 + node_height = 24 + + 0-6: AN-APDU IEI + 7: Res + 8-15: Length of IE content + 16-23: Access Network Protocol + 24-31: Data +} +---- + +[[gsup-ie-cause-rr]] +==== RR Cause + +This IE contains the reason for release or completion of an assignment or +handover. See 3GPP TS 44.018 10.5.2.31 for reference. + +[[gsup-ie-cause-bssap]] +==== BSSAP Cause + +This IE indicates why an event is happening on the BSSAP interface. See 3GPP TS +48.008 3.2.2.5 for reference. + +[[gsup-ie-cause-sm]] +==== Session Management Cause + +This IE contains the reason for rejecting a session management request. See 3GPP +TS 24.008 10.5.6.6 / Table 10.5.157 for reference. + === Session (transaction) management Unlike TCAP/MAP, GSUP is just a transport layer without the -- To view, visit https://gerrit.osmocom.org/14096 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I6b9f23d08cfe53c8b77f51c6afb900c2badc9e2c Gerrit-Change-Number: 14096 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 09:46:41 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 20 May 2019 09:46:41 +0000 Subject: Change in osmo-gsm-manuals[master]: GSUP: document inter-MSC handover additions In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Pau Espin Pedrol, Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14096 to look at the new patch set (#2). Change subject: GSUP: document inter-MSC handover additions ...................................................................... GSUP: document inter-MSC handover additions Message formats of the new messages look mostly the same (IMSI, Message Class, Source Name, Destination Name, AN-APDU). That is, because AN-APDU is storing results, error reasons etc. This can be seen clearly in osmo-msc.git: * src/libmsc/msc_a_remote.c:msc_a_remote_fsm_communicating() * src/libmsc/msc_i_remote.c:msc_i_remote_fsm_ready() The message squence charts in the E Procedures section are directly based on Neels' interMSC_HO_GSUP_msgs.txt [1]. It seems that using AN-APDU made some other new IEs redundant: RR Cause, BSSAP Cause, Session Management Cause had been added to GSUP for the MSC handover, and are documented now, but they are currently not used in osmo-msc.git. The new message OSMO_GSUP_MSGT_E_ABORT is not used either, so I left a stub for it in the message format section. I mentioned in the Source Name IE section, that source and destination names are sent as nul-terminated strings. This is for legacy reasons, Neels wrote a nice summary in the commit message of [2]. [1] https://osmocom.org/attachments/3720/interMSC_HO_GSUP_msgs.txt [2] Change-Id: I9ca8c9eef104519ed1ea46e2fef46dcdc0d554eb (osmo-msc.git) Related: OS#3774, OS#3619 Change-Id: I6b9f23d08cfe53c8b77f51c6afb900c2badc9e2c --- M common/chapters/gsup.adoc 1 file changed, 410 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/96/14096/2 -- To view, visit https://gerrit.osmocom.org/14096 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6b9f23d08cfe53c8b77f51c6afb900c2badc9e2c Gerrit-Change-Number: 14096 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 09:47:07 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 20 May 2019 09:47:07 +0000 Subject: Change in osmo-gsm-manuals[master]: GSUP: document inter-MSC handover additions In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Pau Espin Pedrol, Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14096 to look at the new patch set (#3). Change subject: GSUP: document inter-MSC handover additions ...................................................................... GSUP: document inter-MSC handover additions Message formats of the new messages look mostly the same (IMSI, Message Class, Source Name, Destination Name, AN-APDU). That is, because AN-APDU is storing results, error reasons etc. This can be seen clearly in osmo-msc.git: * src/libmsc/msc_a_remote.c:msc_a_remote_fsm_communicating() * src/libmsc/msc_i_remote.c:msc_i_remote_fsm_ready() The message squence charts in the E Procedures section are directly based on Neels' interMSC_HO_GSUP_msgs.txt [1]. It seems that using AN-APDU made some other new IEs redundant: RR Cause, BSSAP Cause, Session Management Cause had been added to GSUP for the MSC handover, and are documented now, but they are currently not used in osmo-msc.git. The new message OSMO_GSUP_MSGT_E_ABORT is not used either, so I left a stub for it in the message format section. I mentioned in the Source Name IE section, that source and destination names are sent as nul-terminated strings. This is for legacy reasons, Neels wrote a nice summary in the commit message of [2]. [1] https://osmocom.org/attachments/3720/interMSC_HO_GSUP_msgs.txt [2] Change-Id: I9ca8c9eef104519ed1ea46e2fef46dcdc0d554eb (osmo-msc) Related: OS#3774, OS#3619 Change-Id: I6b9f23d08cfe53c8b77f51c6afb900c2badc9e2c --- M common/chapters/gsup.adoc 1 file changed, 410 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/96/14096/3 -- To view, visit https://gerrit.osmocom.org/14096 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6b9f23d08cfe53c8b77f51c6afb900c2badc9e2c Gerrit-Change-Number: 14096 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 10:28:39 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 20 May 2019 10:28:39 +0000 Subject: Change in osmo-bts[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/13601 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/13601 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4c184c62804c0b805a0a2425a5bd0312e94e49ab Gerrit-Change-Number: 13601 Gerrit-PatchSet: 5 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 20 May 2019 10:28:39 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 10:28:45 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 20 May 2019 10:28:45 +0000 Subject: Change in osmo-bts[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: osmith has submitted this change and it was merged. ( https://gerrit.osmocom.org/13601 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... debian: create -doc subpackage with pdf manuals Related: OS#3899 Depends: I7edb5093e5b58eb3b0f7af2376476db4026db735 (osmo-gsm-manuals.git) Depends: Ideeae4f7846fa5626fe2c1f5a77e07a3c6e626fe (osmo-ci.git) Change-Id: I4c184c62804c0b805a0a2425a5bd0312e94e49ab --- M debian/control A debian/osmo-bts-doc.install M debian/rules M doc/manuals/Makefile.am 4 files changed, 18 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Pau Espin Pedrol: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/debian/control b/debian/control index 0377d9f..2b66716 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,8 @@ libosmocore-dev, libosmo-abis-dev, libgps-dev, - txt2man + txt2man, + osmo-gsm-manuals-dev Standards-Version: 3.9.8 Vcs-Browser: http://git.osmocom.org/osmo-bts/ Vcs-Git: git://git.osmocom.org/osmo-bts @@ -48,3 +49,12 @@ Depends: osmo-bts-virtual (= ${binary:Version}), ${misc:Depends} Description: Debug symbols for the osmo-bts-virtual Make debugging possible + +Package: osmo-bts-doc +Architecture: all +Section: doc +Priority: optional +Depends: ${misc:Depends} +Description: ${misc:Package} PDF documentation + Various manuals: user manual, VTY reference manual and/or + protocol/interface manuals. diff --git a/debian/osmo-bts-doc.install b/debian/osmo-bts-doc.install new file mode 100644 index 0000000..65aaaf7 --- /dev/null +++ b/debian/osmo-bts-doc.install @@ -0,0 +1 @@ +usr/share/doc/osmo-bts-doc/*.pdf diff --git a/debian/rules b/debian/rules index 27de11b..94bed0e 100755 --- a/debian/rules +++ b/debian/rules @@ -16,7 +16,7 @@ dh_strip --package=osmo-bts-trx --dbg-package=osmo-bts-trx-dbg override_dh_auto_configure: - dh_auto_configure -- --enable-trx --with-systemdsystemunitdir=/lib/systemd/system + dh_auto_configure -- --enable-trx --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals override_dh_clean: dh_clean @@ -26,3 +26,7 @@ # Print test results in case of a failure override_dh_auto_test: dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false) + +# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers) +override_dh_compress: + dh_compress -X.pdf diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am index 90fff57..1d8125f 100644 --- a/doc/manuals/Makefile.am +++ b/doc/manuals/Makefile.am @@ -20,5 +20,6 @@ VTY_REFERENCE = osmobts-vty-reference.xml include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc + OSMO_REPOSITORY = osmo-bts include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc endif -- To view, visit https://gerrit.osmocom.org/13601 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I4c184c62804c0b805a0a2425a5bd0312e94e49ab Gerrit-Change-Number: 13601 Gerrit-PatchSet: 6 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Mon May 20 10:46:11 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 20 May 2019 10:46:11 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bts in Debian_9.0/x86_64 In-Reply-To: References: Message-ID: <5ce28591ece9f_58803905f8865995@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bts/Debian_9.0/x86_64 Package network:osmocom:nightly/osmo-bts failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bts Last lines of build log: [ 168s] #define HAVE_STDLIB_H 1 [ 168s] #define HAVE_STRING_H 1 [ 168s] #define HAVE_MEMORY_H 1 [ 168s] #define HAVE_STRINGS_H 1 [ 168s] #define HAVE_INTTYPES_H 1 [ 168s] #define HAVE_STDINT_H 1 [ 168s] #define HAVE_UNISTD_H 1 [ 168s] #define HAVE_DLFCN_H 1 [ 168s] #define LT_OBJDIR ".libs/" [ 168s] #define STDC_HEADERS 1 [ 168s] [ 168s] configure: exit 1 [ 168s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-trx --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals returned exit code 1 [ 168s] debian/rules:19: recipe for target 'override_dh_auto_configure' failed [ 168s] make[1]: *** [override_dh_auto_configure] Error 2 [ 168s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 168s] debian/rules:12: recipe for target 'build' failed [ 168s] make: *** [build] Error 2 [ 168s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 168s] [ 168s] lamb02 failed "build osmo-bts_0.8.1.276.ad7b.dsc" at Mon May 20 10:45:49 UTC 2019. [ 168s] [ 168s] ### VM INTERACTION START ### [ 172s] [ 157.909607] sysrq: SysRq : Power Off [ 172s] [ 157.914609] reboot: Power down [ 172s] ### VM INTERACTION END ### [ 172s] [ 172s] lamb02 failed "build osmo-bts_0.8.1.276.ad7b.dsc" at Mon May 20 10:45:53 UTC 2019. [ 172s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon May 20 10:47:02 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 20 May 2019 10:47:02 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bts in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5ce285b21e2d5_58803905f8866079@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bts/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-bts failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bts Last lines of build log: [ 121s] #define HAVE_STDLIB_H 1 [ 121s] #define HAVE_STRING_H 1 [ 121s] #define HAVE_MEMORY_H 1 [ 121s] #define HAVE_STRINGS_H 1 [ 121s] #define HAVE_INTTYPES_H 1 [ 121s] #define HAVE_STDINT_H 1 [ 121s] #define HAVE_UNISTD_H 1 [ 121s] #define HAVE_DLFCN_H 1 [ 121s] #define LT_OBJDIR ".libs/" [ 121s] #define STDC_HEADERS 1 [ 121s] [ 121s] configure: exit 1 [ 121s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-trx --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals returned exit code 1 [ 121s] debian/rules:19: recipe for target 'override_dh_auto_configure' failed [ 121s] make[1]: *** [override_dh_auto_configure] Error 255 [ 121s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 121s] debian/rules:12: recipe for target 'build' failed [ 121s] make: *** [build] Error 2 [ 121s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 121s] [ 121s] sheep83 failed "build osmo-bts_0.8.1.276.ad7b.dsc" at Mon May 20 10:46:48 UTC 2019. [ 121s] [ 121s] ### VM INTERACTION START ### [ 124s] [ 115.132176] sysrq: SysRq : Power Off [ 124s] [ 115.139044] reboot: Power down [ 124s] ### VM INTERACTION END ### [ 124s] [ 124s] sheep83 failed "build osmo-bts_0.8.1.276.ad7b.dsc" at Mon May 20 10:46:52 UTC 2019. [ 124s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon May 20 10:48:45 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 20 May 2019 10:48:45 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bts in Debian_9.0/i586 In-Reply-To: References: Message-ID: <5ce2862b13f1b_58803905f88667f@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bts/Debian_9.0/i586 Package network:osmocom:nightly/osmo-bts failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bts Last lines of build log: [ 209s] #define HAVE_STDLIB_H 1 [ 209s] #define HAVE_STRING_H 1 [ 209s] #define HAVE_MEMORY_H 1 [ 209s] #define HAVE_STRINGS_H 1 [ 209s] #define HAVE_INTTYPES_H 1 [ 209s] #define HAVE_STDINT_H 1 [ 209s] #define HAVE_UNISTD_H 1 [ 209s] #define HAVE_DLFCN_H 1 [ 209s] #define LT_OBJDIR ".libs/" [ 209s] #define STDC_HEADERS 1 [ 209s] [ 209s] configure: exit 1 [ 209s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-trx --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals returned exit code 1 [ 209s] debian/rules:19: recipe for target 'override_dh_auto_configure' failed [ 209s] make[1]: *** [override_dh_auto_configure] Error 2 [ 209s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 209s] debian/rules:12: recipe for target 'build' failed [ 209s] make: *** [build] Error 2 [ 209s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 209s] [ 209s] wildcard2 failed "build osmo-bts_0.8.1.276.ad7b.dsc" at Mon May 20 10:48:27 UTC 2019. [ 209s] [ 209s] ### VM INTERACTION START ### [ 212s] [ 179.505806] sysrq: SysRq : Power Off [ 212s] [ 179.509219] reboot: Power down [ 215s] ### VM INTERACTION END ### [ 215s] [ 215s] wildcard2 failed "build osmo-bts_0.8.1.276.ad7b.dsc" at Mon May 20 10:48:34 UTC 2019. [ 215s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon May 20 10:49:02 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 20 May 2019 10:49:02 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bts in xUbuntu_18.10/x86_64 In-Reply-To: References: Message-ID: <5ce2862b969e9_58803905f886689d@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bts/xUbuntu_18.10/x86_64 Package network:osmocom:nightly/osmo-bts failed to build in xUbuntu_18.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bts Last lines of build log: [ 152s] #define HAVE_SYS_TYPES_H 1 [ 152s] #define HAVE_SYS_STAT_H 1 [ 152s] #define HAVE_STDLIB_H 1 [ 152s] #define HAVE_STRING_H 1 [ 152s] #define HAVE_MEMORY_H 1 [ 152s] #define HAVE_STRINGS_H 1 [ 152s] #define HAVE_INTTYPES_H 1 [ 152s] #define HAVE_STDINT_H 1 [ 152s] #define HAVE_UNISTD_H 1 [ 152s] #define HAVE_DLFCN_H 1 [ 152s] #define LT_OBJDIR ".libs/" [ 152s] #define STDC_HEADERS 1 [ 152s] [ 152s] configure: exit 1 [ 152s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/x86_64-linux-gnu --libexecdir=\${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-trx --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals returned exit code 1 [ 152s] make[1]: *** [debian/rules:19: override_dh_auto_configure] Error 2 [ 152s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 152s] make: *** [debian/rules:12: build] Error 2 [ 152s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 152s] [ 152s] build77 failed "build osmo-bts_0.8.1.276.ad7b.dsc" at Mon May 20 10:48:44 UTC 2019. [ 152s] [ 152s] ### VM INTERACTION START ### [ 155s] [ 146.148949] sysrq: SysRq : Power Off [ 155s] [ 146.150617] reboot: Power down [ 155s] ### VM INTERACTION END ### [ 155s] [ 155s] build77 failed "build osmo-bts_0.8.1.276.ad7b.dsc" at Mon May 20 10:48:47 UTC 2019. [ 155s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon May 20 10:49:02 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 20 May 2019 10:49:02 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bts in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5ce2862c6d5b7_58803905f886708a@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bts/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-bts failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bts Last lines of build log: [ 158s] #define HAVE_STRING_H 1 [ 158s] #define HAVE_MEMORY_H 1 [ 158s] #define HAVE_STRINGS_H 1 [ 158s] #define HAVE_INTTYPES_H 1 [ 158s] #define HAVE_STDINT_H 1 [ 158s] #define HAVE_UNISTD_H 1 [ 158s] #define HAVE_DLFCN_H 1 [ 158s] #define LT_OBJDIR ".libs/" [ 158s] #define STDC_HEADERS 1 [ 158s] [ 158s] configure: exit 1 [ 158s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-trx --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals returned exit code 1 [ 158s] debian/rules:19: recipe for target 'override_dh_auto_configure' failed [ 158s] make[1]: *** [override_dh_auto_configure] Error 255 [ 158s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 158s] debian/rules:12: recipe for target 'build' failed [ 158s] make: *** [build] Error 2 [ 158s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 158s] [ 158s] lamb21 failed "build osmo-bts_0.8.1.276.ad7b.dsc" at Mon May 20 10:48:52 UTC 2019. [ 158s] [ 158s] ### VM INTERACTION START #[ 144.332384] serial8250: too much work for irq4 [ 158s] ## [ 159s] Powering off. [ 159s] [ 145.542152] reboot: Power down [ 159s] ### VM INTERACTION END ### [ 159s] [ 159s] lamb21 failed "build osmo-bts_0.8.1.276.ad7b.dsc" at Mon May 20 10:48:54 UTC 2019. [ 159s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon May 20 10:49:19 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 20 May 2019 10:49:19 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bts in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <5ce2864623522_58803905f8867153@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bts/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-bts failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bts Last lines of build log: [ 128s] #define HAVE_STDLIB_H 1 [ 128s] #define HAVE_STRING_H 1 [ 128s] #define HAVE_MEMORY_H 1 [ 128s] #define HAVE_STRINGS_H 1 [ 128s] #define HAVE_INTTYPES_H 1 [ 128s] #define HAVE_STDINT_H 1 [ 128s] #define HAVE_UNISTD_H 1 [ 128s] #define HAVE_DLFCN_H 1 [ 128s] #define LT_OBJDIR ".libs/" [ 128s] #define STDC_HEADERS 1 [ 128s] [ 128s] configure: exit 1 [ 128s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-trx --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals returned exit code 1 [ 128s] debian/rules:19: recipe for target 'override_dh_auto_configure' failed [ 128s] make[1]: *** [override_dh_auto_configure] Error 255 [ 128s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 128s] debian/rules:12: recipe for target 'build' failed [ 128s] make: *** [build] Error 2 [ 128s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 128s] [ 128s] sheep82 failed "build osmo-bts_0.8.1.276.ad7b.dsc" at Mon May 20 10:49:07 UTC 2019. [ 128s] [ 128s] ### VM INTERACTION START ### [ 131s] [ 122.215218] sysrq: SysRq : Power Off [ 131s] [ 122.221974] reboot: Power down [ 131s] ### VM INTERACTION END ### [ 131s] [ 131s] sheep82 failed "build osmo-bts_0.8.1.276.ad7b.dsc" at Mon May 20 10:49:11 UTC 2019. [ 131s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon May 20 10:49:19 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 20 May 2019 10:49:19 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bts in xUbuntu_17.10/x86_64 In-Reply-To: References: Message-ID: <5ce28646a6e00_58803905f88672b7@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bts/xUbuntu_17.10/x86_64 Package network:osmocom:nightly/osmo-bts failed to build in xUbuntu_17.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bts Last lines of build log: [ 165s] #define HAVE_STDLIB_H 1 [ 165s] #define HAVE_STRING_H 1 [ 165s] #define HAVE_MEMORY_H 1 [ 165s] #define HAVE_STRINGS_H 1 [ 165s] #define HAVE_INTTYPES_H 1 [ 165s] #define HAVE_STDINT_H 1 [ 165s] #define HAVE_UNISTD_H 1 [ 165s] #define HAVE_DLFCN_H 1 [ 165s] #define LT_OBJDIR ".libs/" [ 165s] #define STDC_HEADERS 1 [ 165s] [ 165s] configure: exit 1 [ 165s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/x86_64-linux-gnu --libexecdir=\${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-trx --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals returned exit code 1 [ 165s] debian/rules:19: recipe for target 'override_dh_auto_configure' failed [ 165s] make[1]: *** [override_dh_auto_configure] Error 2 [ 165s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 165s] debian/rules:12: recipe for target 'build' failed [ 165s] make: *** [build] Error 2 [ 165s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 165s] [ 165s] morla5 failed "build osmo-bts_0.8.1.276.ad7b.dsc" at Mon May 20 10:49:05 UTC 2019. [ 165s] [ 165s] ### VM INTERACTION START ### [ 168s] [ 154.653296] sysrq: SysRq : Power Off [ 168s] [ 154.659757] reboot: Power down [ 168s] ### VM INTERACTION END ### [ 168s] [ 168s] morla5 failed "build osmo-bts_0.8.1.276.ad7b.dsc" at Mon May 20 10:49:08 UTC 2019. [ 168s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon May 20 10:50:11 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 20 May 2019 10:50:11 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bts in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5ce286665162f_58803905f8867310@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bts/Debian_8.0/i586 Package network:osmocom:nightly/osmo-bts failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bts Last lines of build log: [ 260s] #define HAVE_STDLIB_H 1 [ 260s] #define HAVE_STRING_H 1 [ 260s] #define HAVE_MEMORY_H 1 [ 260s] #define HAVE_STRINGS_H 1 [ 260s] #define HAVE_INTTYPES_H 1 [ 260s] #define HAVE_STDINT_H 1 [ 260s] #define HAVE_UNISTD_H 1 [ 260s] #define HAVE_DLFCN_H 1 [ 260s] #define LT_OBJDIR ".libs/" [ 260s] #define STDC_HEADERS 1 [ 260s] [ 260s] configure: exit 1 [ 260s] dh_auto_configure: ./configure --build=i586-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-trx --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals returned exit code 1 [ 260s] debian/rules:19: recipe for target 'override_dh_auto_configure' failed [ 260s] make[1]: *** [override_dh_auto_configure] Error 255 [ 260s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 260s] debian/rules:12: recipe for target 'build' failed [ 260s] make: *** [build] Error 2 [ 260s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 260s] [ 260s] cloud103 failed "build osmo-bts_0.8.1.276.ad7b.dsc" at Mon May 20 10:49:53 UTC 2019. [ 260s] [ 260s] ### VM INTERACTION START ### [ 261s] Powering off. [ 261s] [ 216.075733] reboot: Power down [ 263s] ### VM INTERACTION END ### [ 263s] [ 263s] cloud103 failed "build osmo-bts_0.8.1.276.ad7b.dsc" at Mon May 20 10:49:57 UTC 2019. [ 263s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon May 20 10:51:19 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 20 May 2019 10:51:19 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bts in xUbuntu_18.04/x86_64 In-Reply-To: References: Message-ID: <5ce286bea3fb8_58803905f88679a4@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bts/xUbuntu_18.04/x86_64 Package network:osmocom:nightly/osmo-bts failed to build in xUbuntu_18.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bts Last lines of build log: [ 338s] #define HAVE_STDLIB_H 1 [ 338s] #define HAVE_STRING_H 1 [ 338s] #define HAVE_MEMORY_H 1 [ 338s] #define HAVE_STRINGS_H 1 [ 338s] #define HAVE_INTTYPES_H 1 [ 338s] #define HAVE_STDINT_H 1 [ 338s] #define HAVE_UNISTD_H 1 [ 338s] #define HAVE_DLFCN_H 1 [ 338s] #define LT_OBJDIR ".libs/" [ 338s] #define STDC_HEADERS 1 [ 338s] [ 338s] configure: exit 1 [ 338s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/x86_64-linux-gnu --libexecdir=\${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-trx --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals returned exit code 1 [ 338s] debian/rules:19: recipe for target 'override_dh_auto_configure' failed [ 338s] make[1]: *** [override_dh_auto_configure] Error 2 [ 338s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 338s] debian/rules:12: recipe for target 'build' failed [ 338s] make: *** [build] Error 2 [ 338s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 338s] [ 338s] cloud105 failed "build osmo-bts_0.8.1.276.ad7b.dsc" at Mon May 20 10:51:10 UTC 2019. [ 338s] [ 338s] ### VM INTERACTION START ### [ 341s] [ 309.716269] sysrq: SysRq : Power Off [ 341s] [ 309.779031] reboot: Power down [ 344s] ### VM INTERACTION END ### [ 344s] [ 344s] cloud105 failed "build osmo-bts_0.8.1.276.ad7b.dsc" at Mon May 20 10:51:16 UTC 2019. [ 344s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon May 20 10:53:53 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 20 May 2019 10:53:53 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bts in xUbuntu_18.04/i586 In-Reply-To: References: Message-ID: <5ce28754df234_58803905f88681bd@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bts/xUbuntu_18.04/i586 Package network:osmocom:nightly/osmo-bts failed to build in xUbuntu_18.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bts Last lines of build log: [ 353s] #define HAVE_STDLIB_H 1 [ 353s] #define HAVE_STRING_H 1 [ 353s] #define HAVE_MEMORY_H 1 [ 353s] #define HAVE_STRINGS_H 1 [ 353s] #define HAVE_INTTYPES_H 1 [ 353s] #define HAVE_STDINT_H 1 [ 353s] #define HAVE_UNISTD_H 1 [ 353s] #define HAVE_DLFCN_H 1 [ 353s] #define LT_OBJDIR ".libs/" [ 353s] #define STDC_HEADERS 1 [ 353s] [ 353s] configure: exit 1 [ 353s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/i386-linux-gnu --libexecdir=\${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-trx --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals returned exit code 1 [ 353s] debian/rules:19: recipe for target 'override_dh_auto_configure' failed [ 353s] make[1]: *** [override_dh_auto_configure] Error 2 [ 353s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 353s] debian/rules:12: recipe for target 'build' failed [ 353s] make: *** [build] Error 2 [ 353s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 353s] [ 353s] cloud119 failed "build osmo-bts_0.8.1.276.ad7b.dsc" at Mon May 20 10:53:39 UTC 2019. [ 353s] [ 353s] ### VM INTERACTION START ### [ 356s] [ 319.967803] sysrq: SysRq : Power Off [ 356s] [ 320.053859] reboot: Power down [ 358s] ### VM INTERACTION END ### [ 358s] [ 358s] cloud119 failed "build osmo-bts_0.8.1.276.ad7b.dsc" at Mon May 20 10:53:45 UTC 2019. [ 358s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Mon May 20 11:59:58 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 20 May 2019 11:59:58 +0000 Subject: Change in osmo-bts[master]: Revert "debian: create -doc subpackage with pdf manuals" Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/14097 Change subject: Revert "debian: create -doc subpackage with pdf manuals" ...................................................................... Revert "debian: create -doc subpackage with pdf manuals" This reverts commit ad7b8bee71e78e5a046b65898e181b8c48be3974. Unfortunately the osmo-gsm-manuals-dev package isn't working properly yet, therefore osmo-bts fails to build on nightly OBS now. My apologies for not testing enough in my own OBS namespace, before merging. I'll do that in the future. I'm reverting the patch now, so osmo-bts isn't missing from the nightly repository until I've fixed the osmo-gsm-manuals package. Change-Id: I89c2b92c8ae6331d6fff95a378fb58d82059af13 --- M debian/control D debian/osmo-bts-doc.install M debian/rules M doc/manuals/Makefile.am 4 files changed, 2 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/97/14097/1 diff --git a/debian/control b/debian/control index 2b66716..0377d9f 100644 --- a/debian/control +++ b/debian/control @@ -11,8 +11,7 @@ libosmocore-dev, libosmo-abis-dev, libgps-dev, - txt2man, - osmo-gsm-manuals-dev + txt2man Standards-Version: 3.9.8 Vcs-Browser: http://git.osmocom.org/osmo-bts/ Vcs-Git: git://git.osmocom.org/osmo-bts @@ -49,12 +48,3 @@ Depends: osmo-bts-virtual (= ${binary:Version}), ${misc:Depends} Description: Debug symbols for the osmo-bts-virtual Make debugging possible - -Package: osmo-bts-doc -Architecture: all -Section: doc -Priority: optional -Depends: ${misc:Depends} -Description: ${misc:Package} PDF documentation - Various manuals: user manual, VTY reference manual and/or - protocol/interface manuals. diff --git a/debian/osmo-bts-doc.install b/debian/osmo-bts-doc.install deleted file mode 100644 index 65aaaf7..0000000 --- a/debian/osmo-bts-doc.install +++ /dev/null @@ -1 +0,0 @@ -usr/share/doc/osmo-bts-doc/*.pdf diff --git a/debian/rules b/debian/rules index 94bed0e..27de11b 100755 --- a/debian/rules +++ b/debian/rules @@ -16,7 +16,7 @@ dh_strip --package=osmo-bts-trx --dbg-package=osmo-bts-trx-dbg override_dh_auto_configure: - dh_auto_configure -- --enable-trx --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals + dh_auto_configure -- --enable-trx --with-systemdsystemunitdir=/lib/systemd/system override_dh_clean: dh_clean @@ -26,7 +26,3 @@ # Print test results in case of a failure override_dh_auto_test: dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false) - -# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers) -override_dh_compress: - dh_compress -X.pdf diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am index 1d8125f..90fff57 100644 --- a/doc/manuals/Makefile.am +++ b/doc/manuals/Makefile.am @@ -20,6 +20,5 @@ VTY_REFERENCE = osmobts-vty-reference.xml include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc - OSMO_REPOSITORY = osmo-bts include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc endif -- To view, visit https://gerrit.osmocom.org/14097 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I89c2b92c8ae6331d6fff95a378fb58d82059af13 Gerrit-Change-Number: 14097 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 12:06:02 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 20 May 2019 12:06:02 +0000 Subject: Change in osmo-bts[master]: Revert "debian: create -doc subpackage with pdf manuals" In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/14097 ) Change subject: Revert "debian: create -doc subpackage with pdf manuals" ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14097 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I89c2b92c8ae6331d6fff95a378fb58d82059af13 Gerrit-Change-Number: 14097 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 20 May 2019 12:06:02 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 12:06:04 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 20 May 2019 12:06:04 +0000 Subject: Change in osmo-bts[master]: Revert "debian: create -doc subpackage with pdf manuals" In-Reply-To: References: Message-ID: osmith has submitted this change and it was merged. ( https://gerrit.osmocom.org/14097 ) Change subject: Revert "debian: create -doc subpackage with pdf manuals" ...................................................................... Revert "debian: create -doc subpackage with pdf manuals" This reverts commit ad7b8bee71e78e5a046b65898e181b8c48be3974. Unfortunately the osmo-gsm-manuals-dev package isn't working properly yet, therefore osmo-bts fails to build on nightly OBS now. My apologies for not testing enough in my own OBS namespace, before merging. I'll do that in the future. I'm reverting the patch now, so osmo-bts isn't missing from the nightly repository until I've fixed the osmo-gsm-manuals package. Change-Id: I89c2b92c8ae6331d6fff95a378fb58d82059af13 --- M debian/control D debian/osmo-bts-doc.install M debian/rules M doc/manuals/Makefile.am 4 files changed, 2 insertions(+), 18 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved diff --git a/debian/control b/debian/control index 2b66716..0377d9f 100644 --- a/debian/control +++ b/debian/control @@ -11,8 +11,7 @@ libosmocore-dev, libosmo-abis-dev, libgps-dev, - txt2man, - osmo-gsm-manuals-dev + txt2man Standards-Version: 3.9.8 Vcs-Browser: http://git.osmocom.org/osmo-bts/ Vcs-Git: git://git.osmocom.org/osmo-bts @@ -49,12 +48,3 @@ Depends: osmo-bts-virtual (= ${binary:Version}), ${misc:Depends} Description: Debug symbols for the osmo-bts-virtual Make debugging possible - -Package: osmo-bts-doc -Architecture: all -Section: doc -Priority: optional -Depends: ${misc:Depends} -Description: ${misc:Package} PDF documentation - Various manuals: user manual, VTY reference manual and/or - protocol/interface manuals. diff --git a/debian/osmo-bts-doc.install b/debian/osmo-bts-doc.install deleted file mode 100644 index 65aaaf7..0000000 --- a/debian/osmo-bts-doc.install +++ /dev/null @@ -1 +0,0 @@ -usr/share/doc/osmo-bts-doc/*.pdf diff --git a/debian/rules b/debian/rules index 94bed0e..27de11b 100755 --- a/debian/rules +++ b/debian/rules @@ -16,7 +16,7 @@ dh_strip --package=osmo-bts-trx --dbg-package=osmo-bts-trx-dbg override_dh_auto_configure: - dh_auto_configure -- --enable-trx --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals + dh_auto_configure -- --enable-trx --with-systemdsystemunitdir=/lib/systemd/system override_dh_clean: dh_clean @@ -26,7 +26,3 @@ # Print test results in case of a failure override_dh_auto_test: dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false) - -# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers) -override_dh_compress: - dh_compress -X.pdf diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am index 1d8125f..90fff57 100644 --- a/doc/manuals/Makefile.am +++ b/doc/manuals/Makefile.am @@ -20,6 +20,5 @@ VTY_REFERENCE = osmobts-vty-reference.xml include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc - OSMO_REPOSITORY = osmo-bts include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc endif -- To view, visit https://gerrit.osmocom.org/14097 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I89c2b92c8ae6331d6fff95a378fb58d82059af13 Gerrit-Change-Number: 14097 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 12:39:30 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 12:39:30 +0000 Subject: Change in osmo-bts[master]: rsl: Send RSL Error Report in case of unknown/unsupported msg_type In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14083 to look at the new patch set (#3). Change subject: rsl: Send RSL Error Report in case of unknown/unsupported msg_type ...................................................................... rsl: Send RSL Error Report in case of unknown/unsupported msg_type Send an RSL Error Report in case of unknown/unsupported msg_type, as describedi in section 7.3 of 3GPP TS 48.058. Related: OS#3750 Change-Id: Ib2918007410e635b144a7535cec30b9f3378c755 --- M src/common/rsl.c 1 file changed, 14 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/83/14083/3 -- To view, visit https://gerrit.osmocom.org/14083 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib2918007410e635b144a7535cec30b9f3378c755 Gerrit-Change-Number: 14083 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 12:39:30 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 12:39:30 +0000 Subject: Change in osmo-bts[master]: RSL: Fix off-by-one error when parsing SACCH INFO IE in RSL CHAN ACT In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14087 to look at the new patch set (#2). Change subject: RSL: Fix off-by-one error when parsing SACCH INFO IE in RSL CHAN ACT ...................................................................... RSL: Fix off-by-one error when parsing SACCH INFO IE in RSL CHAN ACT This off-by-one error in length verification caused all SACCH INFO IE to be deemed invalid and hence any RSL CHAN ACT with that IE to be rejected. Change-Id: I6436caf5c2caefbf7c089d66e37d8d1babe1c24e Related: OS#3750 --- M src/common/rsl.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/87/14087/2 -- To view, visit https://gerrit.osmocom.org/14087 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6436caf5c2caefbf7c089d66e37d8d1babe1c24e Gerrit-Change-Number: 14087 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 12:39:30 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 12:39:30 +0000 Subject: Change in osmo-bts[master]: cbch: Implement handling of "Schedule" message In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14090 to look at the new patch set (#2). Change subject: cbch: Implement handling of "Schedule" message ...................................................................... cbch: Implement handling of "Schedule" message The first block of "schedule" messages must be advertised with a special sequence number coding, see Table 1 of 3GPP TS 44.012. Change-Id: I473edf698eba7ff5008f2fd1ec1776f0aa013858 Closes: OS#4012 --- M src/common/cbch.c 1 file changed, 10 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/90/14090/2 -- To view, visit https://gerrit.osmocom.org/14090 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I473edf698eba7ff5008f2fd1ec1776f0aa013858 Gerrit-Change-Number: 14090 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 12:39:30 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 12:39:30 +0000 Subject: Change in osmo-bts[master]: rsl: Include Channel Nr and Link ID in Error reports whenever possible In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14084 to look at the new patch set (#3). Change subject: rsl: Include Channel Nr and Link ID in Error reports whenever possible ...................................................................... rsl: Include Channel Nr and Link ID in Error reports whenever possible While the CHAN_NR and LINK_ID IEs in ERROR REPORRT are optional, we still should include it whenever possible to help error analysis. Related: OS#3750 Change-Id: I8155e0d37096bd7bf3563e4f7853171ca4b3aa58 --- M src/common/rsl.c 1 file changed, 27 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/84/14084/3 -- To view, visit https://gerrit.osmocom.org/14084 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8155e0d37096bd7bf3563e4f7853171ca4b3aa58 Gerrit-Change-Number: 14084 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 12:39:30 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 12:39:30 +0000 Subject: Change in osmo-bts[master]: RSL: Reject RLL messages for lchans that are not active yet In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14085 to look at the new patch set (#3). Change subject: RSL: Reject RLL messages for lchans that are not active yet ...................................................................... RSL: Reject RLL messages for lchans that are not active yet The Radio Link Layer (RLL) messages only make sense when a given logical channel is active. If it isn't active, let's reject the messages with an RSL ERROR REPORT with cause "Message sequence error", wich according to spec means: "A message with an existing message type which is not possible according to the specification and to the state of the BTS is erroneous." Related: OS#3750 Change-Id: I68dbb622aeaee657471664cdc0b69c2ac316d77e --- M src/common/rsl.c 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/85/14085/3 -- To view, visit https://gerrit.osmocom.org/14085 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I68dbb622aeaee657471664cdc0b69c2ac316d77e Gerrit-Change-Number: 14085 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 12:39:32 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 12:39:32 +0000 Subject: Change in osmo-bts[master]: cbch: Implement support for DEFAULT message Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14100 Change subject: cbch: Implement support for DEFAULT message ...................................................................... cbch: Implement support for DEFAULT message The BSC can not only send us each to-be-sent message separately, but it can also configure a DEFAULT message, which is then to be sent instead of the NULL message. Let's add support for this Change-Id: I65a79215b54155d128c26d2ca11ff9ff3ed2cdba Closes: OS#4013 --- M include/osmo-bts/gsm_data_shared.h M src/common/cbch.c 2 files changed, 38 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/00/14100/1 diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index 72d9710..6974e62 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -737,6 +737,7 @@ struct { struct llist_head queue; /* list of struct smscb_msg */ struct smscb_msg *cur_msg; /* current SMS-CB */ + struct smscb_msg *default_msg; /* default broadcast message; NULL if none */ } smscb_state; float min_qual_rach; /* minimum quality for RACH bursts */ diff --git a/src/common/cbch.c b/src/common/cbch.c index 817489f..185386a 100644 --- a/src/common/cbch.c +++ b/src/common/cbch.c @@ -101,9 +101,14 @@ block_type->lb = 0; if (block_nr == 4) { - /* delete any fully-transmitted normal message (or superseded default) */ - talloc_free(bts->smscb_state.cur_msg); - bts->smscb_state.cur_msg = NULL; + if (msg != bts->smscb_state.default_msg) { + DEBUGPGT(DLSMS, g_time, "deleting fully-transmitted message %p\n", msg); + /* delete any fully-transmitted normal message (or superseded default) */ + talloc_free(bts->smscb_state.cur_msg); + bts->smscb_state.cur_msg = NULL; + } else { + DEBUGPGT(DLSMS, g_time, "keeping fully-transmitted default message %p\n", msg); + } } return block_type->lb; @@ -160,16 +165,25 @@ case RSL_CB_CMD_TYPE_SCHEDULE: case RSL_CB_CMD_TYPE_NULL: /* def_bcast is ignored as per Section 9.3.41 of 3GPP TS 48.058 */ + llist_add_tail(&scm->list, &bts->smscb_state.queue); + /* FIXME: limit queue size and optionally send CBCH LOAD Information (overflow) via RSL */ break; case RSL_CB_CMD_TYPE_DEFAULT: - /* use def_bcast, ignore command */ - /* def_bcast == 0: normal mess */ + /* old default msg will be free'd in get_smscb_block() if it is currently in transit + * and we set a new default_msg here */ + if (bts->smscb_state.cur_msg && bts->smscb_state.cur_msg == bts->smscb_state.default_msg) + talloc_free(bts->smscb_state.cur_msg); + if (cmd_type.def_bcast == RSL_CB_CMD_DEFBCAST_NORMAL) + /* def_bcast == 0: normal message */ + bts->smscb_state.default_msg = scm; + else { + /* def_bcast == 1: NULL message */ + bts->smscb_state.default_msg = NULL; + talloc_free(scm); + } break; } - llist_add_tail(&scm->list, &bts->smscb_state.queue); - /* FIXME: limit queue size and optionally send CBCH LOAD Information (overflow) via RSL */ - return 0; } @@ -178,13 +192,23 @@ struct smscb_msg *msg; msg = llist_first_entry_or_null(&bts->smscb_state.queue, struct smscb_msg, list); - if (!msg) { - /* FIXME: send CBCH LOAD Information (underflow) via RSL */ - return NULL; + if (msg) { + llist_del(&msg->list); + DEBUGP(DLSMS, "%s: Dequeued msg\n", __func__); + return msg; } - llist_del(&msg->list); - return msg; + /* FIXME: send CBCH LOAD Information (underflow) via RSL */ + + /* choose the default message, if any */ + msg = bts->smscb_state.default_msg; + if (msg) { + DEBUGP(DLSMS, "%s: Using default msg\n", __func__); + return msg; + } + + DEBUGP(DLSMS, "%s: No queued msg nor default\n", __func__); + return NULL; } /* call-back from bts model specific code when it wants to obtain a CBCH -- To view, visit https://gerrit.osmocom.org/14100 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I65a79215b54155d128c26d2ca11ff9ff3ed2cdba Gerrit-Change-Number: 14100 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 12:39:32 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 12:39:32 +0000 Subject: Change in osmo-bts[master]: cbch: Refactor get_smscb_block() / remove smscb_msg.next_seg Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14098 Change subject: cbch: Refactor get_smscb_block() / remove smscb_msg.next_seg ...................................................................... cbch: Refactor get_smscb_block() / remove smscb_msg.next_seg There's no need to keep around a pointer to the next segment in a SMSCB message. The way how the multiframe structure is laid out (and how the tb number works), we can use the result of a modulo-division on the frame number to determine which of the segments/blocks inside a SMSCB message (page) we have to transmit. This also acts as a simplification in preparation of support for the SMSCB DEFAULT type. Change-Id: I48faa19fec4a0852e6112ca2faa98960c678d4c5 Related: OS#4013 --- M src/common/cbch.c 1 file changed, 25 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/98/14098/1 diff --git a/src/common/cbch.c b/src/common/cbch.c index cde1a0c..c253805 100644 --- a/src/common/cbch.c +++ b/src/common/cbch.c @@ -28,15 +28,16 @@ #include #include +/* internal representation of one SMS-CB message (e.g. in the pending queue */ struct smscb_msg { struct llist_head list; /* list in smscb_state.queue */ bool is_schedule; /* is this a schedule message? */ uint8_t msg[GSM412_MSG_LEN]; /* message buffer */ - uint8_t next_seg; /* next segment number */ uint8_t num_segs; /* total number of segments */ }; +/* construct a SMSCB NULL block in the user-provided output buffer at 'out' */ static int get_smscb_null_block(uint8_t *out) { struct gsm412_block_type *block_type = (struct gsm412_block_type *) out; @@ -51,17 +52,26 @@ } /* get the next block of the current CB message */ -static int get_smscb_block(struct gsm_bts *bts, uint8_t *out) +static int get_smscb_block(struct gsm_bts *bts, uint8_t *out, uint8_t block_nr, + const struct gsm_time *g_time) { int to_copy; struct gsm412_block_type *block_type; struct smscb_msg *msg = bts->smscb_state.cur_msg; if (!msg) { - /* No message: Send NULL mesage */ + /* No message: Send NULL block */ + DEBUGPGT(DLSMS, g_time, "No cur_msg; requesting NULL block\n"); return get_smscb_null_block(out); } - OSMO_ASSERT(msg->next_seg < 4); + OSMO_ASSERT(block_nr < 4); + + if (block_nr >= msg->num_segs) { + /* Higher block number than this message has blocks: Send NULL block */ + DEBUGPGT(DLSMS, g_time, "cur_msg has only %u blocks; requesting NULL block\n", + msg->num_segs); + return get_smscb_null_block(out); + } block_type = (struct gsm412_block_type *) out++; @@ -70,29 +80,28 @@ block_type->lpd = 1; /* determine how much data to copy */ - to_copy = GSM412_MSG_LEN - (msg->next_seg * GSM412_BLOCK_LEN); + to_copy = GSM412_MSG_LEN - (block_nr * GSM412_BLOCK_LEN); if (to_copy > GSM412_BLOCK_LEN) - to_copy = GSM412_BLOCK_LEN; + to_copy = GSM412_BLOCK_LEN; OSMO_ASSERT(to_copy >= 0); /* copy data and increment index */ - memcpy(out, &msg->msg[msg->next_seg * GSM412_BLOCK_LEN], to_copy); + memcpy(out, &msg->msg[block_nr * GSM412_BLOCK_LEN], to_copy); /* set + increment sequence number */ - if (msg->next_seg == 0 && msg->is_schedule) { + if (block_nr == 0 && msg->is_schedule) block_type->seq_nr = 8; /* first schedule block */ - msg->next_seg++; - } else - block_type->seq_nr = msg->next_seg++; + else + block_type->seq_nr = block_nr; /* determine if this is the last block */ - if (block_type->seq_nr + 1 == msg->num_segs) + if (block_nr + 1 == msg->num_segs) block_type->lb = 1; else block_type->lb = 0; - if (block_type->lb == 1) { - /* remove/release the message memory */ + if (block_nr == 4) { + /* delete any fully-transmitted normal message (or superseded default) */ talloc_free(bts->smscb_state.cur_msg); bts->smscb_state.cur_msg = NULL; } @@ -128,8 +137,6 @@ /* initialize entire message with default padding */ memset(scm->msg, GSM_MACBLOCK_PADDING, sizeof(scm->msg)); - /* next segment is first segment */ - scm->next_seg = 0; if (cmd_type.command == RSL_CB_CMD_TYPE_SCHEDULE) scm->is_schedule = true; @@ -165,7 +172,6 @@ } llist_del(&msg->list); - return msg; } @@ -191,10 +197,10 @@ case 0: /* select a new SMSCB message */ bts->smscb_state.cur_msg = select_next_smscb(bts); - rc = get_smscb_block(bts, outbuf); + rc = get_smscb_block(bts, outbuf, tb, g_time); break; case 1: case 2: case 3: - rc = get_smscb_block(bts, outbuf); + rc = get_smscb_block(bts, outbuf, tb, g_time); break; case 4: case 5: case 6: case 7: /* always send NULL frame in extended CBCH for now */ -- To view, visit https://gerrit.osmocom.org/14098 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I48faa19fec4a0852e6112ca2faa98960c678d4c5 Gerrit-Change-Number: 14098 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 12:39:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 12:39:33 +0000 Subject: Change in osmo-bts[master]: cbch: Fix memory leak and send error message on invalid SMSCB command Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14101 Change subject: cbch: Fix memory leak and send error message on invalid SMSCB command ...................................................................... cbch: Fix memory leak and send error message on invalid SMSCB command Change-Id: I411d1fb3693a2f7cf7bba3d38b1aaf276a4137ba Related: OS#4011 --- M src/common/cbch.c M src/common/rsl.c 2 files changed, 10 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/01/14101/1 diff --git a/src/common/cbch.c b/src/common/cbch.c index 185386a..c75b510 100644 --- a/src/common/cbch.c +++ b/src/common/cbch.c @@ -182,6 +182,9 @@ talloc_free(scm); } break; + default: + talloc_free(scm); + return -EINVAL; } return 0; diff --git a/src/common/rsl.c b/src/common/rsl.c index 99e38b0..9284e6f 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -487,6 +487,7 @@ struct abis_rsl_cchan_hdr *cch = msgb_l2(msg); struct tlv_parsed tp; struct rsl_ie_cb_cmd_type *cb_cmd_type; + int rc; rsl_tlv_parse(&tp, msgb_l3(msg), msgb_l3len(msg)); @@ -497,9 +498,12 @@ cb_cmd_type = (struct rsl_ie_cb_cmd_type *) TLVP_VAL(&tp, RSL_IE_CB_CMD_TYPE); - return bts_process_smscb_cmd(trx->bts, *cb_cmd_type, - TLVP_LEN(&tp, RSL_IE_SMSCB_MSG), - TLVP_VAL(&tp, RSL_IE_SMSCB_MSG)); + rc = bts_process_smscb_cmd(trx->bts, *cb_cmd_type, TLVP_LEN(&tp, RSL_IE_SMSCB_MSG), + TLVP_VAL(&tp, RSL_IE_SMSCB_MSG)); + if (rc < 0) + return rsl_tx_error_report(trx, RSL_ERR_IE_CONTENT, &cch->chan_nr, NULL, msg); + + return 0; } /*! Prefix a given SACCH frame with a L2/LAPDm UI header and store it in given output buffer. -- To view, visit https://gerrit.osmocom.org/14101 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I411d1fb3693a2f7cf7bba3d38b1aaf276a4137ba Gerrit-Change-Number: 14101 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 12:39:32 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 12:39:32 +0000 Subject: Change in osmo-bts[master]: cbch: Log every RSL SMSCB COMMAND with type and number of blocks Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14099 Change subject: cbch: Log every RSL SMSCB COMMAND with type and number of blocks ...................................................................... cbch: Log every RSL SMSCB COMMAND with type and number of blocks Change-Id: I20efe0aa5a67f011d6b6bead57236366c2f45ecf --- M src/common/cbch.c 1 file changed, 15 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/99/14099/1 diff --git a/src/common/cbch.c b/src/common/cbch.c index c253805..817489f 100644 --- a/src/common/cbch.c +++ b/src/common/cbch.c @@ -116,6 +116,14 @@ [RSL_CB_CMD_LASTBLOCK_3] = 3, }; +static const struct value_string rsl_cb_cmd_names[] = { + { RSL_CB_CMD_TYPE_NORMAL, "NORMAL" }, + { RSL_CB_CMD_TYPE_SCHEDULE, "SCHEDULE" }, + { RSL_CB_CMD_TYPE_DEFAULT, "DEFAULT" }, + { RSL_CB_CMD_TYPE_NULL, "NULL" }, + { 0, NULL } +}; + /* incoming SMS broadcast command from RSL */ int bts_process_smscb_cmd(struct gsm_bts *bts, @@ -141,13 +149,17 @@ if (cmd_type.command == RSL_CB_CMD_TYPE_SCHEDULE) scm->is_schedule = true; + scm->num_segs = last_block_rsl2um[cmd_type.last_block&3]; + memcpy(scm->msg, msg, msg_len); + + LOGP(DLSMS, LOGL_INFO, "RSL SMSCB COMMAND (type=%s, num_blocks=%u)\n", + get_value_string(rsl_cb_cmd_names, cmd_type.command), scm->num_segs); + switch (cmd_type.command) { case RSL_CB_CMD_TYPE_NORMAL: case RSL_CB_CMD_TYPE_SCHEDULE: case RSL_CB_CMD_TYPE_NULL: - scm->num_segs = last_block_rsl2um[cmd_type.last_block&3]; - memcpy(scm->msg, msg, msg_len); - /* def_bcast is ignored */ + /* def_bcast is ignored as per Section 9.3.41 of 3GPP TS 48.058 */ break; case RSL_CB_CMD_TYPE_DEFAULT: /* use def_bcast, ignore command */ -- To view, visit https://gerrit.osmocom.org/14099 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I20efe0aa5a67f011d6b6bead57236366c2f45ecf Gerrit-Change-Number: 14099 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 13:14:37 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 13:14:37 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: CBCH related tests for OsmoBTS In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/10983 to look at the new patch set (#3). Change subject: bts: CBCH related tests for OsmoBTS ...................................................................... bts: CBCH related tests for OsmoBTS This introduces a set of CBCH related tests for osmo-bts. Warning: Those tests currently require a patched trxcon to work. Related: OS#4011 Change-Id: I955b4000c12180a39b0205b69b7b2c8cee8c9da3 --- M bts/BTS_Tests.cfg M bts/BTS_Tests.ttcn A bts/BTS_Tests_SMSCB.ttcn 3 files changed, 337 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/83/10983/3 -- To view, visit https://gerrit.osmocom.org/10983 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I955b4000c12180a39b0205b69b7b2c8cee8c9da3 Gerrit-Change-Number: 10983 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 13:14:37 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 13:14:37 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_sms_cb_cmd_cbch_sdcch{4, 8}_multi() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14095 to look at the new patch set (#2). Change subject: bts: Add TC_sms_cb_cmd_cbch_sdcch{4,8}_multi() ...................................................................... bts: Add TC_sms_cb_cmd_cbch_sdcch{4,8}_multi() These new tests verify that multiple SMSCB commands are equeued, and that each related message is sent exactly once. Change-Id: Ice22fd2689a42c3b1951a02e65664102d4eaccc2 Related: OS#4011 --- M bts/BTS_Tests_SMSCB.ttcn 1 file changed, 36 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/95/14095/2 -- To view, visit https://gerrit.osmocom.org/14095 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ice22fd2689a42c3b1951a02e65664102d4eaccc2 Gerrit-Change-Number: 14095 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 13:16:17 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 13:16:17 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_sms_cb_cmd_cbch_sdcch{4, 8}_default_only Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14102 Change subject: bts: Add TC_sms_cb_cmd_cbch_sdcch{4,8}_default_only ...................................................................... bts: Add TC_sms_cb_cmd_cbch_sdcch{4,8}_default_only Add a most basic CBCH DEFAULT message test: Ensure *only* the default message is sent if a default is set. Related: OS#4011 Change-Id: Iab03fa88b759759a493516d43090c4df63f7b06f --- M bts/BTS_Tests_SMSCB.ttcn 1 file changed, 101 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/02/14102/1 diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn index c27eae6..b33159b 100644 --- a/bts/BTS_Tests_SMSCB.ttcn +++ b/bts/BTS_Tests_SMSCB.ttcn @@ -85,10 +85,15 @@ mtc.stop; } +private function f_cbch_fn2tb(uint32_t fn) return integer +{ + return (fn/51) mod 8; /* TS 05.02 Section 6.5.4 */ +} + /* Verify the CBCH TB scheduling rules of TS 05.02 Section 6.5.4 */ private function f_cbch_fn_verify(uint32_t fn, CBCH_Block cb) { - var integer tb := (fn/51) mod 8; /* TS 05.02 Section 6.5.4 */ + var integer tb := f_cbch_fn2tb(fn); if (cb.block_type.seq_nr == 15 /* null */) { /* always permitted */ return; @@ -103,12 +108,8 @@ } } -/* shared function doing the heavy lifting for most CBCH tests */ -private function f_TC_smscb(CbchTestPars pars) runs on test_CT { - var L1ctlDlMessage dl; - var boolean cmd_seen_once := false; - var integer i, j; - timer T := 5.0; +private function f_smscb_setup(inout CbchTestPars pars) runs on test_CT { + var integer i; f_cbch_compute_exp_blocks(pars); @@ -140,6 +141,24 @@ valueof(ts_RSL_IE_CbCmdType(msg.rsl_cb_cmd, rsl_last_block)); RSL_CCHAN.send(ts_RSL_UD(ts_RSL_SMSCB_CMD(cmd_type, msg.payload))); } +} + +private function f_smscb_cleanup() runs on test_CT { + /* reset timeslot 0 channel combination to default */ + f_vty_config2(BSCVTY, {"network", "bts 0", "trx 0", "timeslot 0"}, + "phys_chan_config CCCH+SDCCH4"); + f_vty_config2(BSCVTY, {"network", "bts 0", "trx 0", "timeslot 6"}, + "phys_chan_config SDCCH8"); +} + +/* shared function doing the heavy lifting for most CBCH tests */ +private function f_TC_smscb(CbchTestPars pars) runs on test_CT { + var L1ctlDlMessage dl; + var integer i, j; + timer T := 5.0 * int2float(lengthof(pars.msgs)); + + f_smscb_setup(pars); + T.start; /* Expect this to show up exactly once on the basic CBCH (four blocks) */ alt { @@ -188,11 +207,55 @@ } } - /* reset timeslot 0 channel combination to default */ - f_vty_config2(BSCVTY, {"network", "bts 0", "trx 0", "timeslot 0"}, - "phys_chan_config CCCH+SDCCH4"); - f_vty_config2(BSCVTY, {"network", "bts 0", "trx 0", "timeslot 6"}, - "phys_chan_config SDCCH8"); + f_smscb_cleanup(); +} + +private function f_TC_smscb_default_only(CbchTestPars pars) runs on test_CT { + var L1ctlDlMessage dl; + timer T := 5.0; + + f_smscb_setup(pars); + + /* ensure whatever initial NULL messages have all been drained */ + f_sleep(5.0); + L1CTL.clear; + + T.start; + alt { + [] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_CBCH(0))) -> value dl { + var integer tb := f_cbch_fn2tb(dl.dl_info.frame_nr); + log("CBCH: ", dl); + var CBCH_Block cb := dec_CBCH_Block(dl.payload.data_ind.payload); + /* detect the proper CBCH messages; check frame number */ + f_cbch_fn_verify(dl.dl_info.frame_nr, cb); + if (tb >= 4) { + /* skip extended CBCH for now */ + repeat; + } + if (not match(cb, tr_CBCH_Block)) { + setverdict(fail, "Illegal CBCH Block received: ", cb); + } else { + var uint4_t rx_seq_nr := cb.block_type.seq_nr; + var template CBCH_Block tr; + if (rx_seq_nr < lengthof(pars.msgs[0].blocks)) { + var CbchBlock b := pars.msgs[0].blocks[rx_seq_nr]; + tr := tr_CBCH_Block(b.seq_nr, b.is_last, b.payload); + } else { + tr := tr_CBCH_Block(15, ?, ?); + } + if (match(cb, tr)) { + setverdict(pass); /* FIXME: check that all blocks are received? */ + repeat; + } else { + setverdict(fail, "Unexpected CBCH block ", cb, ", expected ", tr); + } + } + } + [] L1CTL.receive { repeat; } + [] T.timeout {} + } + + f_smscb_cleanup(); } private const CbchTestMsgs msgs_1m_1b_norm := { @@ -246,6 +309,13 @@ omit } } +private const CbchTestMsgs msgs_1m_3b_default := { + { RSL_CB_CMD_DEFAULT, 2, '001000320f1141660c344dd3cba09a0c000000000000'O & + '000102030405060708090a0b0c0d0e0f101213141516'O & + '101112131415161718191a1b1c1d1e1f202223242526'O, + omit } +} + /* transmit single-block SMSCB COMMAND */ testcase TC_sms_cb_cmd_sdcch4_1block() runs on test_CT { var CbchTestPars pars := { @@ -342,6 +412,23 @@ f_TC_smscb(pars); } +/* set a DEFAULT message; verify it gets transmitted all the time */ +testcase TC_sms_cb_cmd_sdcch4_default_only() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := true, + msgs := msgs_1m_3b_default + }; + f_TC_smscb_default_only(pars); +} +testcase TC_sms_cb_cmd_sdcch8_default_only() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := true, + msgs := msgs_1m_3b_default + }; + f_TC_smscb_default_only(pars); +} + + /* SMSCB TODO: * multiple SMS BC CMD at the same time: Ensure all of them are sent exactly once * extended CBCH vs. normal CBCH @@ -355,12 +442,14 @@ execute( TC_sms_cb_cmd_sdcch4_4block() ); execute( TC_sms_cb_cmd_sdcch4_multi() ); execute( TC_sms_cb_cmd_sdcch4_schedule() ); + execute( TC_sms_cb_cmd_sdcch4_default_only() ); execute( TC_sms_cb_cmd_sdcch8_1block() ); execute( TC_sms_cb_cmd_sdcch8_2block() ); execute( TC_sms_cb_cmd_sdcch8_3block() ); execute( TC_sms_cb_cmd_sdcch8_4block() ); execute( TC_sms_cb_cmd_sdcch8_multi() ); execute( TC_sms_cb_cmd_sdcch8_schedule() ); + execute( TC_sms_cb_cmd_sdcch8_default_only() ); } -- To view, visit https://gerrit.osmocom.org/14102 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Iab03fa88b759759a493516d43090c4df63f7b06f Gerrit-Change-Number: 14102 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 16:46:38 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 20 May 2019 16:46:38 +0000 Subject: Change in osmo-bts[master]: cbch: Fix memory leak and send error message on invalid SMSCB command In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14101 ) Change subject: cbch: Fix memory leak and send error message on invalid SMSCB command ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14101 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I411d1fb3693a2f7cf7bba3d38b1aaf276a4137ba Gerrit-Change-Number: 14101 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Mon, 20 May 2019 16:46:38 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 17:15:52 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 20 May 2019 17:15:52 +0000 Subject: Change in titan.ProtocolModules.BSSMAP[master]: BSSAP_Types: Introduce Osmocom Osmux extension IEs Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14103 Change subject: BSSAP_Types: Introduce Osmocom Osmux extension IEs ...................................................................... BSSAP_Types: Introduce Osmocom Osmux extension IEs These IEs are extensions from Osmocom to signal Osmux support during BSSMAP RESET and to pass Osmux allocated CID during Assign Req/compl. Change-Id: Iaf1e137269c0da20b2c96fd104b57edf336693af Related: libosmocore.git 18506c850c3bbcbfa814e07dc02a17fdb5f7bb9a Related: OS#2551 --- M src/BSSAP_Types.ttcn 1 file changed, 21 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/titan.ProtocolModules.BSSMAP refs/changes/03/14103/1 diff --git a/src/BSSAP_Types.ttcn b/src/BSSAP_Types.ttcn index f7d91bd..fa3a9c5 100644 --- a/src/BSSAP_Types.ttcn +++ b/src/BSSAP_Types.ttcn @@ -1873,6 +1873,19 @@ BSSMAP_IE_ClassmarkInformationType2 classmarkInformationType2 } +/////////////////////////////////////////////////////// +// Osmocom extensions +type record BSSMAP_IE_Osmo_OsmuxSupport +{ + OCT1 elementIdentifier //F0 +} with { variant "PRESENCE (elementIdentifier = 'F0'O)";} + +type record BSSMAP_IE_Osmo_OsmuxCID +{ + OCT1 elementIdentifier, //F1 + INT1 osmuxCID +} with { variant "PRESENCE (elementIdentifier = 'F1'O)";} + /////////////////////////////////////////// // BSSMAP message definition @@ -1903,7 +1916,8 @@ BSSMAP_IE_GlobalCallReference globalCallReference optional, BSSMAP_IE_LCLS_Configuration lCLS_Configuration optional, BSSMAP_IE_LCLS_ConnectionStatusControl lCLS_ConnectionStatusControl optional, - BSSMAP_IE_LCLS_CorrelationNotNeeded lCLS_CorrelationNotNeeded optional + BSSMAP_IE_LCLS_CorrelationNotNeeded lCLS_CorrelationNotNeeded optional, + BSSMAP_IE_Osmo_OsmuxCID osmuxCID optional } with { variant "PRESENCE (messageType = '01'O)" } @@ -1923,7 +1937,8 @@ BSSMAP_IE_AoIP_TransportLayerAddress aoIPTransportLayer optional, BSSMAP_IE_SpeechCodec speechCodec optional, BSSMAP_IE_SpeechCodecList codecList optional, - BSSMAP_IE_LCLS_BSS_Status lCLS_BSS_Status optional + BSSMAP_IE_LCLS_BSS_Status lCLS_BSS_Status optional, + BSSMAP_IE_Osmo_OsmuxCID osmuxCID optional } with { variant "PRESENCE (messageType = '02'O)" } // ASSIGNMENT FAILURE - 48.008 subclause 3.2.1.3 @@ -2192,7 +2207,8 @@ { OCT1 messageType, // H'30 BSSMAP_IE_Cause cause, - BSSMAP_IE_A_InterfaceSelectorForReset a_InterfaceSelectorForReset optional + BSSMAP_IE_A_InterfaceSelectorForReset a_InterfaceSelectorForReset optional, + BSSMAP_IE_Osmo_OsmuxSupport osmuxSupport optional } with { variant "PRESENCE (messageType = '30'O)" } @@ -2200,7 +2216,8 @@ type record PDU_BSSMAP_ResetAck { OCT1 messageType, // H'31 - BSSMAP_IE_A_InterfaceSelectorForReset a_InterfaceSelectorForReset optional + BSSMAP_IE_A_InterfaceSelectorForReset a_InterfaceSelectorForReset optional, + BSSMAP_IE_Osmo_OsmuxSupport osmuxSupport optional } with { variant "PRESENCE (messageType = '31'O)" } -- To view, visit https://gerrit.osmocom.org/14103 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: titan.ProtocolModules.BSSMAP Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Iaf1e137269c0da20b2c96fd104b57edf336693af Gerrit-Change-Number: 14103 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 17:36:48 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 20 May 2019 17:36:48 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Depend on our own fork of titan.ProtocolModules.BSSMAP Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14104 Change subject: Depend on our own fork of titan.ProtocolModules.BSSMAP ...................................................................... Depend on our own fork of titan.ProtocolModules.BSSMAP Since we use some BSSMAP extensions to signal Osmux, we need to maintain our own fork of BSSMAP_Types in order to supports those IEs in BSSMAP RESET and BSSMAP Assin Req/Compl. Hence, switch all build componenets to fetch and use our fork. Depends: titan.ProtocolModules.BSSMAP Iaf1e137269c0da20b2c96fd104b57edf336693af Change-Id: Ic8debe5f3ffe8e1d4258fa6b4632a3871b99af40 --- M bsc-nat/gen_links.sh M bsc/gen_links.sh M deps/Makefile M msc/gen_links.sh M selftest/gen_links.sh 5 files changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/04/14104/1 diff --git a/bsc-nat/gen_links.sh b/bsc-nat/gen_links.sh index 16e32b7..7b7f928 100755 --- a/bsc-nat/gen_links.sh +++ b/bsc-nat/gen_links.sh @@ -29,7 +29,7 @@ FILES="SCCP_Emulation.ttcn SCCP_EncDec.cc SCCP_Mapping.ttcnpp SCCP_Types.ttcn SCCPasp_Types.ttcn" gen_links $DIR $FILES -DIR=$BASEDIR/titan.ProtocolModules.BSSMAP_v11.2.0/src +DIR=$BASEDIR/titan.ProtocolModules.BSSMAP/src FILES="BSSAP_Types.ttcn" gen_links $DIR $FILES diff --git a/bsc/gen_links.sh b/bsc/gen_links.sh index a4f09f4..c71b31a 100755 --- a/bsc/gen_links.sh +++ b/bsc/gen_links.sh @@ -45,7 +45,7 @@ FILES="SCCP_Emulation.ttcn SCCP_Mapping.ttcnpp SCCP_Types.ttcn SCCPasp_Types.ttcn" gen_links $DIR $FILES -DIR=$BASEDIR/titan.ProtocolModules.BSSMAP_v11.2.0/src +DIR=$BASEDIR/titan.ProtocolModules.BSSMAP/src FILES="BSSAP_Types.ttcn" gen_links $DIR $FILES diff --git a/deps/Makefile b/deps/Makefile index 6b19cf3..23f7b64 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -33,7 +33,6 @@ titan.TestPorts.GPIO \ titan.ProtocolModules.BSSAPP_v7.3.0 \ titan.ProtocolModules.BSSGP_v13.0.0 \ - titan.ProtocolModules.BSSMAP_v11.2.0 \ titan.ProtocolModules.GTP_v13.5.0 \ titan.ProtocolModules.GTPv2_v13.7.0 \ titan.ProtocolModules.ISUP_Q.762 \ @@ -48,7 +47,8 @@ titan.TestPorts.MTP3asp \ titan.ProtocolEmulations.M3UA -OSMOGIT_REPOS= titan.ProtocolModules.MAP +OSMOGIT_REPOS= titan.ProtocolModules.MAP \ + titan.ProtocolModules.BSSMAP ALL_REPOS=$(ECLIPSEGIT_REPOS) $(ECLIPSEGIT2_REPOS) $(OSMOGITHUB_REPOS) $(OSMOGIT_REPOS) @@ -60,7 +60,7 @@ titan.ProtocolEmulations.SCCP_commit= R.7.A-2-g724c83f titan.ProtocolModules.BSSAPP_v7.3.0_commit= R.2.A titan.ProtocolModules.BSSGP_v13.0.0_commit= R.2.A -titan.ProtocolModules.BSSMAP_v11.2.0_commit= R.2.A +titan.ProtocolModules.BSSMAP_commit= master titan.ProtocolModules.GRE_commit= R.2.A titan.ProtocolModules.GTP_v13.5.0_commit= R.2.A titan.ProtocolModules.GTPv2_v13.7.0_commit= R.2.A diff --git a/msc/gen_links.sh b/msc/gen_links.sh index 7ba190a..7aaba2b 100755 --- a/msc/gen_links.sh +++ b/msc/gen_links.sh @@ -46,7 +46,7 @@ FILES="SCCP_Emulation.ttcn SCCP_EncDec.cc SCCP_Mapping.ttcnpp SCCP_Types.ttcn SCCPasp_Types.ttcn" gen_links $DIR $FILES -DIR=$BASEDIR/titan.ProtocolModules.BSSMAP_v11.2.0/src +DIR=$BASEDIR/titan.ProtocolModules.BSSMAP/src FILES="BSSAP_Types.ttcn" gen_links $DIR $FILES diff --git a/selftest/gen_links.sh b/selftest/gen_links.sh index 09d2f26..c590de6 100755 --- a/selftest/gen_links.sh +++ b/selftest/gen_links.sh @@ -30,7 +30,7 @@ FILES="SCCP_Emulation.ttcn SCCP_Mapping.ttcnpp SCCP_Types.ttcn SCCPasp_Types.ttcn" gen_links $DIR $FILES -DIR=$BASEDIR/titan.ProtocolModules.BSSMAP_v11.2.0/src +DIR=$BASEDIR/titan.ProtocolModules.BSSMAP/src FILES="BSSAP_Types.ttcn" gen_links $DIR $FILES -- To view, visit https://gerrit.osmocom.org/14104 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ic8debe5f3ffe8e1d4258fa6b4632a3871b99af40 Gerrit-Change-Number: 14104 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 17:36:48 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 20 May 2019 17:36:48 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bsc: Introduce Osmux infra and one test for osmo-bsc Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14105 Change subject: bsc: Introduce Osmux infra and one test for osmo-bsc ...................................................................... bsc: Introduce Osmux infra and one test for osmo-bsc Test verifies once osmux is enabled in osmo-bsc, BSSMAP RESET (ACK) contains Osmux Support IE and that it correctly handles BSSMAP ASsign Req with Osmux CID. Related: OS#2551 Depends: osmo-bsc 6de754cdde5319af3059d8fc6abf85037ec7eacc Change-Id: If69c716dc06d61d810c32d1720a237c7535baca8 --- M bsc/BSC_Tests.ttcn M bsc/MSC_ConnectionHandler.ttcn M bsc/expected-results.xml M library/BSSMAP_Templates.ttcn M library/MGCP_Templates.ttcn M library/RAN_Emulation.ttcnpp 6 files changed, 170 insertions(+), 50 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/05/14105/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 0583b30..c731b7c 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -89,6 +89,9 @@ /* are we initialized yet */ var boolean g_initialized := false; + /* Osmux is enabled through VTY */ + var boolean g_osmux_enabled := false; + /* global test case guard timer */ timer T_guard := 30.0; @@ -140,16 +143,16 @@ private function f_legacy_bssap_reset() runs on test_CT { var BSSAP_N_UNITDATA_ind ud_ind; timer T := 5.0; - BSSAP.send(ts_BSSAP_UNITDATA_req(g_bssap.sccp_addr_peer, g_bssap.sccp_addr_own, ts_BSSMAP_Reset(0))); + BSSAP.send(ts_BSSAP_UNITDATA_req(g_bssap.sccp_addr_peer, g_bssap.sccp_addr_own, ts_BSSMAP_Reset(0, g_osmux_enabled))); T.start; alt { - [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(g_bssap.sccp_addr_own, g_bssap.sccp_addr_peer, tr_BSSMAP_ResetAck)) { + [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(g_bssap.sccp_addr_own, g_bssap.sccp_addr_peer, tr_BSSMAP_ResetAck(g_osmux_enabled))) { log("Received RESET-ACK in response to RESET, we're ready to go!"); } - [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset)) -> value ud_ind { + [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset(g_osmux_enabled))) -> value ud_ind { log("Respoding to inbound RESET with RESET-ACK"); BSSAP.send(ts_BSSAP_UNITDATA_req(ud_ind.callingAddress, ud_ind.calledAddress, - ts_BSSMAP_ResetAck)); + ts_BSSMAP_ResetAck(g_osmux_enabled))); repeat; } [] BSSAP.receive { repeat; } @@ -257,15 +260,15 @@ mtc.stop; } /* always respond with RESET ACK to RESET */ - [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset)) -> value ud_ind { + [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset(g_osmux_enabled))) -> value ud_ind { BSSAP.send(ts_BSSAP_UNITDATA_req(ud_ind.callingAddress, ud_ind.calledAddress, - ts_BSSMAP_ResetAck)); + ts_BSSMAP_ResetAck(g_osmux_enabled))); repeat; } } altstep no_bssmap_reset() runs on test_CT { - [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset)) { + [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset(g_osmux_enabled))) { setverdict(fail, "unexpected BSSMAP Reset"); mtc.stop; } @@ -289,6 +292,22 @@ vc_MGCP.start(MGCP_Emulation.main(ops, mgcp_pars, id)); } +/* Enable or disable (current default) Osmux. When enabling, BSSMAP Reset + * contains extra IE (OsmuxSupport) and osmo-bsc will handle AssignReq with + * OsmuxCID IE. + */ +private function f_vty_allow_osmux(boolean allow) runs on test_CT { + f_vty_enter_cfg_msc(BSCVTY, 0); + if (allow) { + f_vty_transceive(BSCVTY, "osmux on"); + } else { + f_vty_transceive(BSCVTY, "osmux off"); + } + f_vty_transceive(BSCVTY, "exit"); + f_vty_transceive(BSCVTY, "exit"); + g_osmux_enabled := allow; +} + function f_init_vty(charstring id := "foo") runs on test_CT { if (BSCVTY.checkstate("Mapped")) { /* skip initialization if already executed once */ @@ -302,7 +321,7 @@ /* global initialization function * \param nr_bts Number of BTSs we should start/bring up * \param handler_mode Start an RSL_Emulation_CT component (true) or not (false) */ -function f_init(integer nr_bts := NUM_BTS, boolean handler_mode := false) runs on test_CT { +function f_init(integer nr_bts := NUM_BTS, boolean handler_mode := false, boolean allow_osmux := false) runs on test_CT { var integer i; if (g_initialized) { @@ -313,10 +332,15 @@ T_guard.start; activate(as_Tguard()); + f_init_vty("VirtMSC"); + f_vty_allow_osmux(allow_osmux); + /* Call a function of our 'parent component' RAN_Adapter_CT to start the * MSC-side BSSAP emulation */ if (handler_mode) { - f_ran_adapter_init(g_bssap, mp_bssap_cfg, "VirtMSC", MSC_RanOps); + var RanOps ranops := MSC_RanOps; + ranops.use_osmux := g_osmux_enabled; + f_ran_adapter_init(g_bssap, mp_bssap_cfg, "VirtMSC", ranops); f_ran_adapter_start(g_bssap); } else { f_ran_adapter_init(g_bssap, mp_bssap_cfg, "VirtMSC", omit); @@ -328,7 +352,6 @@ f_ipa_ctrl_start(mp_bsc_ip, mp_bsc_ctrl_port); f_init_mgcp("VirtMSC"); - f_init_vty("VirtMSC"); for (i := 0; i < nr_bts; i := i+1) { /* wait until osmo-bts-omldummy has respawned */ @@ -605,15 +628,24 @@ } /* generate an assignment request for either AoIP or SCCPlite */ -function f_gen_ass_req() return PDU_BSSAP { +function f_gen_ass_req(boolean osmux_enabled := false) return PDU_BSSAP { var PDU_BSSAP ass_cmd; + var BSSMAP_IE_Osmo_OsmuxCID osmux_cid := valueof(ts_OsmuxCID(0)); if (mp_bssap_cfg.transport == BSSAP_TRANSPORT_AoIP) { var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); - ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + if (osmux_enabled) { + ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla, osmux_cid)); + } else { + ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + } } else { var BSSMAP_IE_CircuitIdentityCode cic := valueof(ts_BSSMAP_IE_CIC(0,1)); - ass_cmd := valueof(ts_BSSMAP_AssignmentReq(cic, omit)); + if (osmux_enabled) { + ass_cmd := valueof(ts_BSSMAP_AssignmentReq(cic, omit, osmux_cid)); + } else { + ass_cmd := valueof(ts_BSSMAP_AssignmentReq(cic, omit)); + } } return ass_cmd; } @@ -632,13 +664,22 @@ } /* generate an assignment complete template for either AoIP or SCCPlite */ -function f_gen_exp_compl() return template PDU_BSSAP { +function f_gen_exp_compl(boolean expect_osmux := false) return template PDU_BSSAP { var template PDU_BSSAP exp_compl; + var BSSMAP_IE_Osmo_OsmuxCID osmux_cid := valueof(ts_OsmuxCID(0)); if (mp_bssap_cfg.transport == BSSAP_TRANSPORT_AoIP) { - exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); + if (expect_osmux) { + exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?, osmux_cid); + } else { + exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?, omit); + } } else { /* CIC is optional "*" as the MSC allocated it */ - exp_compl := tr_BSSMAP_AssignmentComplete(*, omit); + if (expect_osmux) { + exp_compl := tr_BSSMAP_AssignmentComplete(*, omit, osmux_cid); + } else { + exp_compl := tr_BSSMAP_AssignmentComplete(*, omit); + } } return exp_compl; } @@ -1002,9 +1043,9 @@ IPA_RSL[0].clear; /* perform BSSAP RESET, expect RESET ACK and DISC.ind on connection */ - BSSAP.send(ts_BSSAP_UNITDATA_req(g_bssap.sccp_addr_peer, g_bssap.sccp_addr_own, ts_BSSMAP_Reset(0))); + BSSAP.send(ts_BSSAP_UNITDATA_req(g_bssap.sccp_addr_peer, g_bssap.sccp_addr_own, ts_BSSMAP_Reset(0, g_osmux_enabled))); interleave { - [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(g_bssap.sccp_addr_own, g_bssap.sccp_addr_peer, tr_BSSMAP_ResetAck)) { } + [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(g_bssap.sccp_addr_own, g_bssap.sccp_addr_peer, tr_BSSMAP_ResetAck(g_osmux_enabled))) { } [] BSSAP.receive(tr_BSSAP_DISC_ind(dt.sccp_conn_id, ?, ?)) { } } @@ -1491,9 +1532,9 @@ f_pageing_helper('001010123456789'H, cid_list, c_BtsId_all); /* Perform a BSSMAP Reset and wait for ACK */ - BSSAP.send(ts_BSSAP_UNITDATA_req(g_bssap.sccp_addr_peer, g_bssap.sccp_addr_own, ts_BSSMAP_Reset(0))); + BSSAP.send(ts_BSSAP_UNITDATA_req(g_bssap.sccp_addr_peer, g_bssap.sccp_addr_own, ts_BSSMAP_Reset(0, g_osmux_enabled))); alt { - [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(g_bssap.sccp_addr_own, g_bssap.sccp_addr_peer, tr_BSSMAP_ResetAck)) { } + [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(g_bssap.sccp_addr_own, g_bssap.sccp_addr_peer, tr_BSSMAP_ResetAck(g_osmux_enabled))) { } [] BSSAP.receive { repeat; } } @@ -1945,8 +1986,8 @@ type record of CodecListTest CodecListTests private function f_TC_assignment_codec(charstring id) runs on MSC_ConnHdlr { - var PDU_BSSAP ass_cmd := f_gen_ass_req(); - var template PDU_BSSAP exp_compl := f_gen_exp_compl(); + var PDU_BSSAP ass_cmd := f_gen_ass_req(g_pars.use_osmux); + var template PDU_BSSAP exp_compl := f_gen_exp_compl(g_pars.use_osmux); /* puzzle together the ASSIGNMENT REQ for given codec[s] */ if (mp_bssap_cfg.transport == BSSAP_TRANSPORT_AoIP) { @@ -2568,6 +2609,31 @@ setverdict(pass); } +testcase TC_assignment_osmux() runs on test_CT { + var TestHdlrParams pars := f_gen_test_hdlr_pars(); + var MSC_ConnHdlr vc_conn; + + /* See note above */ + var RSL_IE_Body mr_conf := { + other := { + len := 2, + payload := '2804'O + } + }; + + pars.ass_codec_list := valueof(ts_BSSMAP_IE_CodecList({ts_CodecAMR_H})); + pars.ass_codec_list.codecElements[0].s0_7 := '00000100'B; /* 5,90k */ + pars.ass_codec_list.codecElements[0].s8_15 := '00000111'B; + pars.expect_mr_conf_ie := mr_conf; + pars.use_osmux := true; + + f_init(1, true, true); + f_sleep(1.0); + + vc_conn := f_start_handler(refers(f_TC_assignment_codec), pars); + vc_conn.done; +} + /* test the procedure of the MSC requesting a Classmark Update: * a) BSSMAP Classmark Request should result in RR CLASSMARK ENQUIRY, * b) L3 RR CLASSMARK CHANGE should result in BSSMAP CLASSMARK UPDATE */ @@ -3993,6 +4059,8 @@ execute( TC_assignment_codec_req_hr_fr() ); execute( TC_assignment_codec_req_fr_hr() ); + execute( TC_assignment_osmux() ); + /* RLL Establish Indication on inactive DCHAN / SAPI */ execute( TC_rll_est_ind_inact_lchan() ); execute( TC_rll_est_ind_inval_sapi1() ); diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 520cc3e..0db5630 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -263,6 +263,7 @@ * MGW level media handling */ altstep as_Media_mgw(boolean norepeat := false) runs on MSC_ConnHdlr { var MgcpCommand mgcp_cmd; + var MgcpOsmuxCID osmux_cid; [] MGCP.receive(tr_CRCX) -> value mgcp_cmd { var SDP_Message sdp; @@ -289,7 +290,12 @@ int2str(mgcp_conn.sample_rate))), valueof(ts_SDP_ptime(mgcp_conn.ptime)) } )); var template MgcpResponse mgcp_resp; - mgcp_resp := ts_CRCX_ACK(mgcp_cmd.line.trans_id, mgcp_conn.conn_id, sdp); + if (g_pars.use_osmux and f_MgcpCmd_contains_par(mgcp_cmd, "X-OSMUX")) { + osmux_cid := f_MgcpCmd_extract_osmux_cid(mgcp_cmd); + mgcp_resp := ts_CRCX_ACK_osmux(mgcp_cmd.line.trans_id, mgcp_conn.conn_id, osmux_cid, sdp); + } else { + mgcp_resp := ts_CRCX_ACK(mgcp_cmd.line.trans_id, mgcp_conn.conn_id, sdp); + } f_mgcp_par_append(mgcp_resp.params, ts_MgcpParSpecEP(g_media.mgcp_ep)); MGCP.send(mgcp_resp); g_media.mgcp_conn[cid].crcx_seen := g_media.mgcp_conn[cid].crcx_seen + 1; @@ -364,8 +370,8 @@ var template PDU_BSSAP resp := omit; /* answer all RESET with a RESET ACK */ - if (match(bssap, tr_BSSMAP_Reset)) { - resp := ts_BSSMAP_ResetAck; + if (match(bssap, tr_BSSMAP_Reset(g_ran_ops.use_osmux))) { + resp := ts_BSSMAP_ResetAck(g_ran_ops.use_osmux); } return resp; @@ -377,6 +383,7 @@ decode_dtap := false, role_ms := false, protocol := RAN_PROTOCOL_BSSAP, + use_osmux := false, sccp_addr_local := omit, sccp_addr_peer := omit } @@ -431,7 +438,8 @@ TestHdlrEncrParams encr optional, TestHdlrParamsLcls lcls, TestHdlrParamsHandover handover optional, - boolean aoip + boolean aoip, + boolean use_osmux }; /* Note: Do not use valueof() to get a value of this template, use @@ -455,7 +463,8 @@ adjust_cx_exp := true }, handover := omit, - aoip := true + aoip := true, + use_osmux := false } function f_create_chan_and_exp() runs on MSC_ConnHdlr { diff --git a/bsc/expected-results.xml b/bsc/expected-results.xml index 33bf677..ff3cce0 100644 --- a/bsc/expected-results.xml +++ b/bsc/expected-results.xml @@ -1,5 +1,5 @@ - + @@ -46,6 +46,7 @@ + diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index 02c84e2..ad314a3 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -164,47 +164,62 @@ oldToNewBSSIEs := val } -template (value) PDU_BSSAP ts_BSSMAP_Reset(BssmapCause cause) modifies ts_BSSAP_BSSMAP := { +template BSSMAP_IE_Osmo_OsmuxSupport tr_BSSMAP_IE_Osmo_OsmuxSupport := { + elementIdentifier := 'F0'O +} + +private function f_enc_osmux_support(boolean osmux_enabled) return template BSSMAP_IE_Osmo_OsmuxSupport { + if (osmux_enabled) { + return tr_BSSMAP_IE_Osmo_OsmuxSupport; + } + return omit; +} + +template (value) PDU_BSSAP ts_BSSMAP_Reset(BssmapCause cause, boolean osmux_enabled := false) modifies ts_BSSAP_BSSMAP := { pdu := { bssmap := { reset := { messageType := '30'O, cause := ts_BSSMAP_IE_Cause(cause), - a_InterfaceSelectorForReset := omit + a_InterfaceSelectorForReset := omit, + osmuxSupport := f_enc_osmux_support(osmux_enabled) } } } } -template PDU_BSSAP tr_BSSMAP_Reset modifies tr_BSSAP_BSSMAP := { +template PDU_BSSAP tr_BSSMAP_Reset(boolean osmux_enabled := false) modifies tr_BSSAP_BSSMAP := { pdu := { bssmap := { reset := { messageType := '30'O, cause := ?, - a_InterfaceSelectorForReset := * + a_InterfaceSelectorForReset := *, + osmuxSupport := f_enc_osmux_support(osmux_enabled) } } } } -template (value) PDU_BSSAP ts_BSSMAP_ResetAck modifies ts_BSSAP_BSSMAP := { +template (value) PDU_BSSAP ts_BSSMAP_ResetAck(boolean osmux_enabled := false) modifies ts_BSSAP_BSSMAP := { pdu := { bssmap := { resetAck := { messageType := '31'O, - a_InterfaceSelectorForReset := omit + a_InterfaceSelectorForReset := omit, + osmuxSupport := f_enc_osmux_support(osmux_enabled) } } } } -template PDU_BSSAP tr_BSSMAP_ResetAck modifies tr_BSSAP_BSSMAP := { +template PDU_BSSAP tr_BSSMAP_ResetAck(boolean osmux_enabled := false) modifies tr_BSSAP_BSSMAP := { pdu := { bssmap := { resetAck := { messageType := '31'O, - a_InterfaceSelectorForReset := * + a_InterfaceSelectorForReset := *, + osmuxSupport := f_enc_osmux_support(osmux_enabled) } } } @@ -443,9 +458,15 @@ codecElements := valueof(elem) } +template (value) BSSMAP_IE_Osmo_OsmuxCID ts_OsmuxCID(INT1 cid) := { + elementIdentifier := 'F1'O, + osmuxCID := cid +} + template PDU_BSSAP ts_BSSMAP_AssignmentReq(template BSSMAP_IE_CircuitIdentityCode cic := omit, - template BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit) + template BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit, + template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := omit) modifies ts_BSSAP_BSSMAP := { pdu := { bssmap := { @@ -472,14 +493,16 @@ globalCallReference := omit, lCLS_Configuration := omit, lCLS_ConnectionStatusControl := omit, - lCLS_CorrelationNotNeeded := omit + lCLS_CorrelationNotNeeded := omit, + osmuxCID := osmuxCID } } } } template PDU_BSSAP tr_BSSMAP_AssignmentReq(template BSSMAP_IE_CircuitIdentityCode cic := *, - template BSSMAP_IE_AoIP_TransportLayerAddress aoip := *) + template BSSMAP_IE_AoIP_TransportLayerAddress aoip := *, + template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := *) modifies tr_BSSAP_BSSMAP := { pdu := { bssmap := { @@ -506,7 +529,8 @@ globalCallReference := *, lCLS_Configuration := *, lCLS_ConnectionStatusControl := *, - lCLS_CorrelationNotNeeded := * + lCLS_CorrelationNotNeeded := *, + osmuxCID := osmuxCID } } } @@ -515,7 +539,8 @@ template PDU_BSSAP ts_BSSMAP_AssignmentComplete(template BSSMAP_IE_CircuitIdentityCode cic := omit, template BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit, - template BSSMAP_IE_SpeechCodec speechCodec := omit) + template BSSMAP_IE_SpeechCodec speechCodec := omit, + template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := omit) modifies ts_BSSAP_BSSMAP := { pdu := { bssmap := { @@ -533,14 +558,16 @@ aoIPTransportLayer := aoip, speechCodec := speechCodec, codecList := omit, - lCLS_BSS_Status := omit + lCLS_BSS_Status := omit, + osmuxCID := osmuxCID } } } } template PDU_BSSAP tr_BSSMAP_AssignmentComplete(template BSSMAP_IE_CircuitIdentityCode cic := *, - template BSSMAP_IE_AoIP_TransportLayerAddress aoip := *) + template BSSMAP_IE_AoIP_TransportLayerAddress aoip := *, + template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := *) modifies tr_BSSAP_BSSMAP := { pdu := { bssmap := { @@ -558,7 +585,8 @@ aoIPTransportLayer := aoip, speechCodec := *, codecList := *, - lCLS_BSS_Status := * + lCLS_BSS_Status := *, + osmuxCID := osmuxCID } } } diff --git a/library/MGCP_Templates.ttcn b/library/MGCP_Templates.ttcn index 123ea5b..fe2863d 100644 --- a/library/MGCP_Templates.ttcn +++ b/library/MGCP_Templates.ttcn @@ -143,6 +143,19 @@ sdp := sdp } + template MgcpResponse ts_CRCX_ACK_osmux(MgcpTransId trans_id, MgcpConnectionId conn_id, MgcpOsmuxCID osmux_cid, template SDP_Message sdp := omit) := { + line := { + code := "200", + trans_id := trans_id, + string := "OK" + }, + params:= { + ts_MgcpParConnectionId(conn_id), + ts_MgcpParOsmuxCID(osmux_cid) + }, + sdp := sdp + } + template MgcpCommand ts_MDCX(MgcpTransId trans_id, charstring ep, MgcpConnectionMode mode, MgcpCallId call_id, MgcpConnectionId conn_id, template SDP_Message sdp := omit) := { line := t_MgcpCmdLine("MDCX", trans_id, ep), params := { diff --git a/library/RAN_Emulation.ttcnpp b/library/RAN_Emulation.ttcnpp index 9a65eb7..41aec47 100644 --- a/library/RAN_Emulation.ttcnpp +++ b/library/RAN_Emulation.ttcnpp @@ -465,9 +465,9 @@ T.start; alt { - [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset)) -> value ud_ind { + [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset(g_ran_ops.use_osmux))) -> value ud_ind { BSSAP.send(ts_BSSAP_UNITDATA_req(ud_ind.callingAddress, ud_ind.calledAddress, - ts_BSSMAP_ResetAck)); + ts_BSSMAP_ResetAck(g_ran_ops.use_osmux))); } [] as_reset_ack(); [] BSSAP.receive { @@ -483,10 +483,10 @@ function f_bssap_reset(SCCP_PAR_Address peer, SCCP_PAR_Address own) runs on RAN_Emulation_CT { timer T := 5.0; - BSSAP.send(ts_BSSAP_UNITDATA_req(peer, own, ts_BSSMAP_Reset(0))); + BSSAP.send(ts_BSSAP_UNITDATA_req(peer, own, ts_BSSMAP_Reset(0, g_ran_ops.use_osmux))); T.start; alt { - [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(own, peer, tr_BSSMAP_ResetAck)) { + [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(own, peer, tr_BSSMAP_ResetAck(g_ran_ops.use_osmux))) { log("Received RESET-ACK in response to RESET, we're ready to go!"); } [] as_reset_ack(); @@ -650,6 +650,7 @@ boolean decode_dtap, boolean role_ms, RanProtocol protocol, + boolean use_osmux, /* needed for performing BSSMAP RESET */ SCCP_PAR_Address sccp_addr_local optional, SCCP_PAR_Address sccp_addr_peer optional @@ -727,10 +728,10 @@ var RANAP_N_UNITDATA_ind rud_ind; #endif #ifdef RAN_EMULATION_BSSAP - [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset)) -> value ud_ind { + [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset(g_ran_ops.use_osmux))) -> value ud_ind { log("Respoding to inbound RESET with RESET-ACK"); BSSAP.send(ts_BSSAP_UNITDATA_req(ud_ind.callingAddress, ud_ind.calledAddress, - ts_BSSMAP_ResetAck)); + ts_BSSMAP_ResetAck(g_ran_ops.use_osmux))); repeat; } #endif -- To view, visit https://gerrit.osmocom.org/14105 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If69c716dc06d61d810c32d1720a237c7535baca8 Gerrit-Change-Number: 14105 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 17:39:30 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 20 May 2019 17:39:30 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bsc: Introduce Osmux infra and one test for osmo-bsc In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14105 to look at the new patch set (#2). Change subject: bsc: Introduce Osmux infra and one test for osmo-bsc ...................................................................... bsc: Introduce Osmux infra and one test for osmo-bsc Test verifies once osmux is enabled in osmo-bsc, BSSMAP RESET (ACK) contains Osmux Support IE and that it correctly handles BSSMAP ASsign Req with Osmux CID. Related: OS#2551 Depends: osmo-bsc 6de754cdde5319af3059d8fc6abf85037ec7eacc Depends: titan.ProtocolModules.BSSMAP Iaf1e137269c0da20b2c96fd104b57edf336693af Change-Id: If69c716dc06d61d810c32d1720a237c7535baca8 --- M bsc/BSC_Tests.ttcn M bsc/MSC_ConnectionHandler.ttcn M bsc/expected-results.xml M library/BSSMAP_Templates.ttcn M library/MGCP_Templates.ttcn M library/RAN_Emulation.ttcnpp 6 files changed, 170 insertions(+), 50 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/05/14105/2 -- To view, visit https://gerrit.osmocom.org/14105 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: If69c716dc06d61d810c32d1720a237c7535baca8 Gerrit-Change-Number: 14105 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 18:15:30 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 18:15:30 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: CBCH related tests for OsmoBTS In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/10983 to look at the new patch set (#4). Change subject: bts: CBCH related tests for OsmoBTS ...................................................................... bts: CBCH related tests for OsmoBTS This introduces a set of CBCH related tests for osmo-bts. Warning: Those tests currently require a patched trxcon to work. Related: OS#4011 Change-Id: I955b4000c12180a39b0205b69b7b2c8cee8c9da3 --- M bts/BTS_Tests.cfg M bts/BTS_Tests.ttcn A bts/BTS_Tests_SMSCB.ttcn 3 files changed, 349 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/83/10983/4 -- To view, visit https://gerrit.osmocom.org/10983 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I955b4000c12180a39b0205b69b7b2c8cee8c9da3 Gerrit-Change-Number: 10983 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 18:15:30 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 18:15:30 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_sms_cb_cmd_cbch_sdcch{4, 8}_default_only In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14102 to look at the new patch set (#2). Change subject: bts: Add TC_sms_cb_cmd_cbch_sdcch{4,8}_default_only ...................................................................... bts: Add TC_sms_cb_cmd_cbch_sdcch{4,8}_default_only Add a most basic CBCH DEFAULT message test: Ensure *only* the default message is sent if a default is set. Related: OS#4011 Change-Id: Iab03fa88b759759a493516d43090c4df63f7b06f --- M bts/BTS_Tests_SMSCB.ttcn 1 file changed, 105 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/02/14102/2 -- To view, visit https://gerrit.osmocom.org/14102 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iab03fa88b759759a493516d43090c4df63f7b06f Gerrit-Change-Number: 14102 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 18:15:31 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 18:15:31 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Test for removal of CBCH DEFAULT message Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14106 Change subject: bts: Test for removal of CBCH DEFAULT message ...................................................................... bts: Test for removal of CBCH DEFAULT message Add a new testcase TC_sms_cb_cmd_sdcch4_default_then_null() which first installes a DEFAULT message, verifies that, then removes the default message and verifies only NULL CBCH blocks are sent anymore. Change-Id: I9608d42a164a6210f100d10cb3ccfb7735975011 Related: OS#4011 --- M bts/BTS_Tests_SMSCB.ttcn 1 file changed, 46 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/06/14106/1 diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn index 8efeb2d..9ea60dd 100644 --- a/bts/BTS_Tests_SMSCB.ttcn +++ b/bts/BTS_Tests_SMSCB.ttcn @@ -444,6 +444,51 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass); } +/* first set a DEFAULT message, then disable it again */ +testcase TC_sms_cb_cmd_sdcch4_default_then_null() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := true, + basic := valueof(t_CbchPC(msgs_1m_3b_default)), + extended := omit + }; + var L1ctlDlMessage dl; + timer T := 5.0; + + f_TC_smscb_default_only(pars); + + /* disable DEFAULT message; switch back to NULL */ + f_rsl_smscb_default_null(); + + /* ensure whatever initial non-NULL messages have all been drained */ + f_sleep(5.0); + L1CTL.clear; + + T.start; + alt { + [] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_CBCH(0))) -> value dl { + log("CBCH: ", dl); + var CBCH_Block cb := dec_CBCH_Block(dl.payload.data_ind.payload); + /* detect the proper CBCH messages; check frame number */ + f_cbch_fn_verify(dl.dl_info.frame_nr, cb); + if (not match(cb, tr_CBCH_Block)) { + setverdict(fail, "Illegal CBCH Block received: ", cb); + } else { + if (not match(cb, tr_CBCH_Block(15, ?, ?))) { + setverdict(fail, "Unexpected non-NULL CBCH block received"); + } + repeat; + } + } + [] L1CTL.receive { repeat; } + [] T.timeout { + setverdict(pass); + } + } + + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass); +} + + /* SMSCB TODO: * multiple SMS BC CMD at the same time: Ensure all of them are sent exactly once @@ -459,6 +504,7 @@ execute( TC_sms_cb_cmd_sdcch4_multi() ); execute( TC_sms_cb_cmd_sdcch4_schedule() ); execute( TC_sms_cb_cmd_sdcch4_default_only() ); + execute( TC_sms_cb_cmd_sdcch4_default_then_null() ); execute( TC_sms_cb_cmd_sdcch8_1block() ); execute( TC_sms_cb_cmd_sdcch8_2block() ); execute( TC_sms_cb_cmd_sdcch8_3block() ); -- To view, visit https://gerrit.osmocom.org/14106 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I9608d42a164a6210f100d10cb3ccfb7735975011 Gerrit-Change-Number: 14106 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 18:15:31 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 18:15:31 +0000 Subject: Change in osmo-ttcn3-hacks[master]: cbch: Refactor code to support mixed DEFAULT + NORMAL and EXTENDED CBCH Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14107 Change subject: cbch: Refactor code to support mixed DEFAULT + NORMAL and EXTENDED CBCH ...................................................................... cbch: Refactor code to support mixed DEFAULT + NORMAL and EXTENDED CBCH The existing code structure could only test for normal messages with a NULL default, but didn't handle situations where normal and/or schedule messages were superimposed on top of DEFAULT messages. Also, prepare the infrastructure for testing both CBCH BASIC and CBCH EXTENDED. No new tests are introduced, the code should behave identical before and after this patch. Change-Id: I144c7d833b79c648b1ac69a6155f3603025ede5c Related: OS#4011 --- M bts/BTS_Tests_SMSCB.ttcn 1 file changed, 209 insertions(+), 62 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/07/14107/1 diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn index 9ea60dd..24f5fd2 100644 --- a/bts/BTS_Tests_SMSCB.ttcn +++ b/bts/BTS_Tests_SMSCB.ttcn @@ -30,9 +30,28 @@ * Cell Broadcast related tests ***********************************************************************/ +/* Test parameters for one channel (e.g. Basic, Extended) */ +type record CbchTestParsChan { + /* list of "normal" (sent-once) SMSCB messages */ + CbchTestMsgs msgs, + /* default message, if any */ + CbchTestMsg default_msg optional +} + +private template (value) CbchTestParsChan +t_CbchPC(template (value) CbchTestMsgs msgs, template (omit) CbchTestMsg def := omit) := { + msgs := msgs, + default_msg := def +} + +/* CBCH test parameters for most of our tests */ type record CbchTestPars { + /* should we execute on SDCCH4 (true) or SDCCH8 (false) ? */ boolean use_sdcch4, - CbchTestMsgs msgs + /* Parameters for BASIC CBCH */ + CbchTestParsChan basic, + /* Parameters for EXTENDED CBCH */ + CbchTestParsChan extended optional }; type record CbchTestMsg { @@ -56,12 +75,18 @@ /* compute the expected blocks for given test parameters */ private function f_cbch_compute_exp_blocks(inout CbchTestPars pars) { - var integer i; - - for (i := 0; i < lengthof(pars.msgs); i := i+1) { - pars.msgs[i].blocks := f_comp_blocks(pars.msgs[i]); + f_cbch_compute_exp_blocks_chan(pars.basic); + if (ispresent(pars.extended)) { + f_cbch_compute_exp_blocks_chan(pars.extended); } } +private function f_cbch_compute_exp_blocks_chan(inout CbchTestParsChan pars_chan) { + var integer i; + for (i := 0; i < lengthof(pars_chan.msgs); i := i+1) { + pars_chan.msgs[i].blocks := f_comp_blocks(pars_chan.msgs[i]); + } + pars_chan.default_msg.blocks := f_comp_blocks(pars_chan.default_msg); +} private function f_comp_blocks(in CbchTestMsg msg) return CbchBlocks { var CbchBlocks blocks := {}; var integer i; @@ -120,9 +145,34 @@ } } -private function f_smscb_setup(inout CbchTestPars pars) runs on test_CT { +private function f_rsl_smscb_default_null() runs on test_CT +{ + var RSL_IE_CbCommandType cmd_type := + valueof(ts_RSL_IE_CbCmdType(RSL_CB_CMD_DEFAULT, 1, true)); + RSL_CCHAN.send(ts_RSL_UD(ts_RSL_SMSCB_CMD(cmd_type, ''O))); +} + +private function f_smscb_setup_rsl_chan(inout CbchTestParsChan pars_chan) runs on test_CT { var integer i; + /* send SMSCB[s] via RSL */ + for (i := 0; i < lengthof(pars_chan.msgs); i := i+1) { + var CbchTestMsg msg := pars_chan.msgs[i]; + var uint2_t rsl_last_block := f_cbch_block_nr2rsl(msg.last_block); + var RSL_IE_CbCommandType cmd_type := + valueof(ts_RSL_IE_CbCmdType(msg.rsl_cb_cmd, rsl_last_block)); + RSL_CCHAN.send(ts_RSL_UD(ts_RSL_SMSCB_CMD(cmd_type, msg.payload))); + } + if (ispresent(pars_chan.default_msg)) { + var CbchTestMsg msg := pars_chan.default_msg; + var uint2_t rsl_last_block := f_cbch_block_nr2rsl(msg.last_block); + var RSL_IE_CbCommandType cmd_type := + valueof(ts_RSL_IE_CbCmdType(msg.rsl_cb_cmd, rsl_last_block, false)); + RSL_CCHAN.send(ts_RSL_UD(ts_RSL_SMSCB_CMD(cmd_type, msg.payload))); + } +} +private function f_smscb_setup(inout CbchTestPars pars) runs on test_CT { + f_cbch_compute_exp_blocks(pars); f_init_vty_bsc(); @@ -146,12 +196,9 @@ f_l1_tune(L1CTL); /* send SMSCB[s] via RSL */ - for (i := 0; i < lengthof(pars.msgs); i := i+1) { - var CbchTestMsg msg := pars.msgs[i]; - var uint2_t rsl_last_block := f_cbch_block_nr2rsl(msg.last_block); - var RSL_IE_CbCommandType cmd_type := - valueof(ts_RSL_IE_CbCmdType(msg.rsl_cb_cmd, rsl_last_block)); - RSL_CCHAN.send(ts_RSL_UD(ts_RSL_SMSCB_CMD(cmd_type, msg.payload))); + f_smscb_setup_rsl_chan(pars.basic); + if (ispresent(pars.extended)) { + f_smscb_setup_rsl_chan(pars.extended); } } @@ -163,58 +210,140 @@ "phys_chan_config SDCCH8"); } +/* construct a receive/match template for given block_nr in given msg */ +private function f_get_block_template(CbchTestMsg msg, integer block_nr) return template CBCH_Block { + var template CBCH_Block tr; + if (block_nr < lengthof(msg.blocks)) { + var CbchBlock b := msg.blocks[block_nr]; + tr := tr_CBCH_Block(b.seq_nr, b.is_last, b.payload); + } else { + tr := tr_CBCH_Block(15, ?, ?); + } + return tr; +} + +/* the heart of the CBCH test case matching engine for one channel (basic, extended) */ +private function f_cbch_match(inout CbchTestParsChan pars_chan, CBCH_Block cb, integer tb) +{ + var integer block_nr := tb mod 4; + var integer i; + + if (not match(cb, tr_CBCH_Block)) { + setverdict(fail, "Illegal CBCH Block received: ", cb); + } else { + var boolean matched := false; + /* check if it's any of our expected blocks */ + for (i := 0; i < lengthof(pars_chan.msgs); i := i+1) { + if (block_nr < lengthof(pars_chan.msgs[i].blocks)) { + if (match(cb, f_get_block_template(pars_chan.msgs[i], block_nr))) { + log("Found block_nr ", block_nr, " of msg ", i); + if (not pars_chan.msgs[i].blocks[block_nr].seen_once) { + pars_chan.msgs[i].blocks[block_nr].seen_once := true; + setverdict(pass); + } else { + setverdict(fail, "Received SMSCB twice! ", cb); + } + matched := true; + break; + } + } + } + if (not matched) { + var template CBCH_Block tr; + if (ispresent(pars_chan.default_msg)) { + /* it must be a block of the default message */ + tr := f_get_block_template(pars_chan.default_msg, block_nr); + } else { + /* it must be a NULL block */ + tr := tr_CBCH_Block(15, ?, ?); + } + if (not match(cb, tr)) { + setverdict(fail, "Received unexpected CBCH block: ", cb); + } else { + log("Found block_nr ", block_nr, " of DEFAULT/NULL"); + if (ispresent(pars_chan.default_msg) and + block_nr < lengthof(pars_chan.default_msg.blocks)) { + pars_chan.default_msg.blocks[block_nr].seen_once := true; + } + } + } + } +} + +/* Report/Evaluate the per-channel CBCH test results */ +private function f_cbch_report(CbchTestParsChan pars_chan, charstring id) +{ + var integer i, j; + + /* verify that each block of each message has been seen once */ + for (i := 0; i < lengthof(pars_chan.msgs); i := i+1) { + for (j := 0; j < lengthof(pars_chan.msgs[i].blocks); j := j+1) { + var CbchBlock b := pars_chan.msgs[i].blocks[j]; + if (not b.seen_once) { + setverdict(fail, "Timeout waiting for ", id, " CBCH block ", + j, " of msg ", i); + } + } + } + if (ispresent(pars_chan.default_msg)) { + /* verify that each block of default message has been seen at least once */ + for (j := 0; j < lengthof(pars_chan.default_msg.blocks); j := j+1) { + var CbchBlock b := pars_chan.default_msg.blocks[j]; + if (not b.seen_once) { + setverdict(fail, "Timeout waiting for at leaset one instance of ", + "CBCH block ", j, " of DEFAULT msg"); + } + } + } +} + /* shared function doing the heavy lifting for most CBCH tests */ private function f_TC_smscb(CbchTestPars pars) runs on test_CT { var L1ctlDlMessage dl; - var integer i, j; - timer T := 5.0 * int2float(lengthof(pars.msgs)); + var integer msg_count; + timer T; + + msg_count := lengthof(pars.basic.msgs); + if (ispresent(pars.basic.default_msg)) { + msg_count := msg_count + 1; + } + if (ispresent(pars.extended)) { + msg_count := msg_count + lengthof(pars.extended.msgs); + if (ispresent(pars.extended.default_msg)) { + msg_count := msg_count + 1; + } + } f_smscb_setup(pars); - T.start; + /* dynamically adjust timeout based on number of messages */ + T.start(5.0 + 3.0 * int2float(msg_count)); /* Expect this to show up exactly once on the basic CBCH (four blocks) */ alt { [] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_CBCH(0))) -> value dl { - log("CBCH: ", dl); + var integer tb := f_cbch_fn2tb(dl.dl_info.frame_nr); var CBCH_Block cb := dec_CBCH_Block(dl.payload.data_ind.payload); + log("Tb=", tb, ", CBCH: ", dl, ", block: ", cb); + /* detect the proper CBCH messages; check frame number */ f_cbch_fn_verify(dl.dl_info.frame_nr, cb); - if (not match(cb, tr_CBCH_Block)) { - setverdict(fail, "Illegal CBCH Block received: ", cb); + + if (tb < 4) { + f_cbch_match(pars.basic, cb, tb); } else { - var boolean matched := false; - /* ignore NULL messages */ - if (match(cb, tr_CBCH_Block(15, ?, ?))) { repeat; } - for (i := 0; i < lengthof(pars.msgs); i := i+1) { - for (j := 0; j < lengthof(pars.msgs[i].blocks); j := j+1) { - var CbchBlock b := pars.msgs[i].blocks[j]; - if (match(cb, tr_CBCH_Block(b.seq_nr, b.is_last, b.payload))) { - if (not pars.msgs[i].blocks[j].seen_once) { - pars.msgs[i].blocks[j].seen_once := true; - setverdict(pass); - } else { - setverdict(fail, "Received SMSCB twice! ", cb); - } - matched := true; - continue; - } - } + if (not ispresent(pars.extended)) { + /* no parameters for ext. BCCH given: ignore */ + repeat; } - if (not matched) { - setverdict(fail, "Received unexpected CBCH block: ", cb); - } - repeat; + f_cbch_match(pars.extended, cb, tb); } + repeat; } [] L1CTL.receive { repeat; } [] T.timeout { - for (i := 0; i < lengthof(pars.msgs); i := i+1) { - for (j := 0; j < lengthof(pars.msgs[i].blocks); j := j+1) { - var CbchBlock b := pars.msgs[i].blocks[j]; - if (not b.seen_once) { - setverdict(fail, "Timeout waiting for CBCH"); - } - } + f_cbch_report(pars.basic, "Basic"); + if (ispresent(pars.extended)) { + f_cbch_report(pars.extended, "Extended"); } } } @@ -250,8 +379,8 @@ } else { var uint4_t rx_seq_nr := cb.block_type.seq_nr; var template CBCH_Block tr; - if (rx_seq_nr < lengthof(pars.msgs[0].blocks)) { - var CbchBlock b := pars.msgs[0].blocks[rx_seq_nr]; + if (rx_seq_nr < lengthof(pars.basic.msgs[0].blocks)) { + var CbchBlock b := pars.basic.msgs[0].blocks[rx_seq_nr]; tr := tr_CBCH_Block(b.seq_nr, b.is_last, b.payload); } else { tr := tr_CBCH_Block(15, ?, ?); @@ -329,19 +458,25 @@ '101112131415161718191a1b1c1d1e1f202223242526'O, omit } } +private const CbchTestMsg msg_default := { + RSL_CB_CMD_DEFAULT, 0, '010203040506070708090a0b0c0d0e0f101112131415'O, + omit +} /* transmit single-block SMSCB COMMAND */ testcase TC_sms_cb_cmd_sdcch4_1block() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := true, - msgs := msgs_1m_1b_norm + basic := valueof(t_CbchPC(msgs_1m_1b_norm)), + extended := omit }; f_TC_smscb(pars); } testcase TC_sms_cb_cmd_sdcch8_1block() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := false, - msgs := msgs_1m_1b_norm + basic := valueof(t_CbchPC(msgs_1m_1b_norm)), + extended := omit }; f_TC_smscb(pars); } @@ -350,14 +485,16 @@ testcase TC_sms_cb_cmd_sdcch4_2block() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := true, - msgs := msgs_1m_2b_norm + basic := valueof(t_CbchPC(msgs_1m_2b_norm)), + extended := omit }; f_TC_smscb(pars); } testcase TC_sms_cb_cmd_sdcch8_2block() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := false, - msgs := msgs_1m_2b_norm + basic := valueof(t_CbchPC(msgs_1m_2b_norm)), + extended := omit }; f_TC_smscb(pars); } @@ -366,14 +503,16 @@ testcase TC_sms_cb_cmd_sdcch4_3block() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := true, - msgs := msgs_1m_3b_norm + basic := valueof(t_CbchPC(msgs_1m_3b_norm)), + extended := omit }; f_TC_smscb(pars); } testcase TC_sms_cb_cmd_sdcch8_3block() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := false, - msgs := msgs_1m_3b_norm + basic := valueof(t_CbchPC(msgs_1m_3b_norm)), + extended := omit }; f_TC_smscb(pars); } @@ -382,14 +521,16 @@ testcase TC_sms_cb_cmd_sdcch4_4block() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := true, - msgs := msgs_1m_4b_norm + basic := valueof(t_CbchPC(msgs_1m_4b_norm)), + extended := omit }; f_TC_smscb(pars); } testcase TC_sms_cb_cmd_sdcch8_4block() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := false, - msgs := msgs_1m_4b_norm + basic := valueof(t_CbchPC(msgs_1m_4b_norm)), + extended := omit }; f_TC_smscb(pars); } @@ -398,14 +539,16 @@ testcase TC_sms_cb_cmd_sdcch4_multi() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := true, - msgs := msgs_3m_4b_norm + basic := valueof(t_CbchPC(msgs_3m_4b_norm)), + extended := omit }; f_TC_smscb(pars); } testcase TC_sms_cb_cmd_sdcch8_multi() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := false, - msgs := msgs_3m_4b_norm + basic := valueof(t_CbchPC(msgs_3m_4b_norm)), + extended := omit }; f_TC_smscb(pars); } @@ -414,14 +557,16 @@ testcase TC_sms_cb_cmd_sdcch4_schedule() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := true, - msgs := msgs_1m_4b_sched + basic := valueof(t_CbchPC(msgs_1m_4b_sched)), + extended := omit }; f_TC_smscb(pars); } testcase TC_sms_cb_cmd_sdcch8_schedule() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := false, - msgs := msgs_1m_4b_sched + basic := valueof(t_CbchPC(msgs_1m_4b_sched)), + extended := omit }; f_TC_smscb(pars); } @@ -430,7 +575,8 @@ testcase TC_sms_cb_cmd_sdcch4_default_only() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := true, - msgs := msgs_1m_3b_default + basic := valueof(t_CbchPC(msgs_1m_3b_default)), + extended := omit }; f_TC_smscb_default_only(pars); Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass); @@ -438,7 +584,8 @@ testcase TC_sms_cb_cmd_sdcch8_default_only() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := true, - msgs := msgs_1m_3b_default + basic := valueof(t_CbchPC(msgs_1m_3b_default)), + extended := omit }; f_TC_smscb_default_only(pars); Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass); -- To view, visit https://gerrit.osmocom.org/14107 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I144c7d833b79c648b1ac69a6155f3603025ede5c Gerrit-Change-Number: 14107 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 18:15:31 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 18:15:31 +0000 Subject: Change in osmo-ttcn3-hacks[master]: cbch: Test case for mixed NORMAL and DEFAULT SMSCB Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14108 Change subject: cbch: Test case for mixed NORMAL and DEFAULT SMSCB ...................................................................... cbch: Test case for mixed NORMAL and DEFAULT SMSCB This adds TC_sms_cb_cmd_sdcch{4,8]_default_and_normal() which test the correct behavior in case of a DEFAULT SMSCB and normal one-shot SMSCBs. Change-Id: I0782b121cd69158903b09f935b298ddbf5a9ffb5 Related: OS#4011 --- M bts/BTS_Tests_SMSCB.ttcn 1 file changed, 19 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/08/14108/1 diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn index 24f5fd2..1710d26 100644 --- a/bts/BTS_Tests_SMSCB.ttcn +++ b/bts/BTS_Tests_SMSCB.ttcn @@ -591,6 +591,23 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass); } +testcase TC_sms_cb_cmd_sdcch4_default_and_normal() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := true, + basic := valueof(t_CbchPC(msgs_1m_3b_norm, msg_default)), + extended := omit + }; + f_TC_smscb(pars); +} +testcase TC_sms_cb_cmd_sdcch8_default_and_normal() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := true, + basic := valueof(t_CbchPC(msgs_1m_3b_norm, msg_default)), + extended := omit + }; + f_TC_smscb(pars); +} + /* first set a DEFAULT message, then disable it again */ testcase TC_sms_cb_cmd_sdcch4_default_then_null() runs on test_CT { var CbchTestPars pars := { @@ -651,6 +668,7 @@ execute( TC_sms_cb_cmd_sdcch4_multi() ); execute( TC_sms_cb_cmd_sdcch4_schedule() ); execute( TC_sms_cb_cmd_sdcch4_default_only() ); + execute( TC_sms_cb_cmd_sdcch4_default_and_normal() ); execute( TC_sms_cb_cmd_sdcch4_default_then_null() ); execute( TC_sms_cb_cmd_sdcch8_1block() ); execute( TC_sms_cb_cmd_sdcch8_2block() ); @@ -659,6 +677,7 @@ execute( TC_sms_cb_cmd_sdcch8_multi() ); execute( TC_sms_cb_cmd_sdcch8_schedule() ); execute( TC_sms_cb_cmd_sdcch8_default_only() ); + execute( TC_sms_cb_cmd_sdcch8_default_and_normal() ); } -- To view, visit https://gerrit.osmocom.org/14108 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I0782b121cd69158903b09f935b298ddbf5a9ffb5 Gerrit-Change-Number: 14108 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 19:36:28 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 19:36:28 +0000 Subject: Change in osmo-bts[master]: cbch: Support Extended CBCH Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14109 Change subject: cbch: Support Extended CBCH ...................................................................... cbch: Support Extended CBCH The logic for Extended CBCH are the same as for the Basic CBCH, we just need to * duplicate our related state * parse the optional RSL_IE_SMSCB_CHAN_INDICATOR IE * start to send data on the Extended CBCH (TB=4..7) Change-Id: If2c6dc7da1e2185ab75fc957f8d305ad8db22429 Closes: OS#3535 --- M include/osmo-bts/cbch.h M include/osmo-bts/gsm_data_shared.h M src/common/bts.c M src/common/cbch.c M src/common/rsl.c M src/common/vty.c 6 files changed, 69 insertions(+), 37 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/09/14109/1 diff --git a/include/osmo-bts/cbch.h b/include/osmo-bts/cbch.h index b4ac409..af5fd9a 100644 --- a/include/osmo-bts/cbch.h +++ b/include/osmo-bts/cbch.h @@ -7,9 +7,8 @@ #include /* incoming SMS broadcast command from RSL */ -int bts_process_smscb_cmd(struct gsm_bts *bts, - struct rsl_ie_cb_cmd_type cmd_type, - uint8_t msg_len, const uint8_t *msg); +int bts_process_smscb_cmd(struct gsm_bts *bts, struct rsl_ie_cb_cmd_type cmd_type, + bool extended_cbch, uint8_t msg_len, const uint8_t *msg); /* call-back from bts model specific code when it wants to obtain a CBCH * block for a given gsm_time. outbuf must have 23 bytes of space. */ diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index 6974e62..9378730 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -539,6 +539,12 @@ uint8_t initial_mcs; }; +struct bts_smscb_state { + struct llist_head queue; /* list of struct smscb_msg */ + struct smscb_msg *cur_msg; /* current SMS-CB */ + struct smscb_msg *default_msg; /* default broadcast message; NULL if none */ +}; + /* The amount of time within which a sudden disconnect of a newly established * OML connection will cause a special warning to be logged. */ #define OSMO_BTS_OML_CONN_EARLY_DISCONNECT 10 /* in seconds */ @@ -734,11 +740,9 @@ /* used by the sysmoBTS to adjust band */ uint8_t auto_band; - struct { - struct llist_head queue; /* list of struct smscb_msg */ - struct smscb_msg *cur_msg; /* current SMS-CB */ - struct smscb_msg *default_msg; /* default broadcast message; NULL if none */ - } smscb_state; + /* State for SMSCB (Cell Broadcast) for BASIC and EXTENDED channel */ + struct bts_smscb_state smscb_basic; + struct bts_smscb_state smscb_extended; float min_qual_rach; /* minimum quality for RACH bursts */ float min_qual_norm; /* minimum quality for normal daata */ diff --git a/src/common/bts.c b/src/common/bts.c index 5851e9b..4af219b 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -190,7 +190,8 @@ initialized = 1; } - INIT_LLIST_HEAD(&bts->smscb_state.queue); + INIT_LLIST_HEAD(&bts->smscb_basic.queue); + INIT_LLIST_HEAD(&bts->smscb_extended.queue); INIT_LLIST_HEAD(&bts->oml_queue); /* register DTX DL FSM */ diff --git a/src/common/cbch.c b/src/common/cbch.c index c75b510..6092e46 100644 --- a/src/common/cbch.c +++ b/src/common/cbch.c @@ -37,6 +37,17 @@ uint8_t num_segs; /* total number of segments */ }; +/* determine SMSCB state by tb number */ +static struct bts_smscb_state *bts_smscb_state(struct gsm_bts *bts, uint8_t tb) +{ + if (tb < 4) + return &bts->smscb_basic; + else if (tb < 8) + return &bts->smscb_extended; + else + OSMO_ASSERT(0); +} + /* construct a SMSCB NULL block in the user-provided output buffer at 'out' */ static int get_smscb_null_block(uint8_t *out) { @@ -52,12 +63,12 @@ } /* get the next block of the current CB message */ -static int get_smscb_block(struct gsm_bts *bts, uint8_t *out, uint8_t block_nr, +static int get_smscb_block(struct bts_smscb_state *bts_ss, uint8_t *out, uint8_t block_nr, const struct gsm_time *g_time) { int to_copy; struct gsm412_block_type *block_type; - struct smscb_msg *msg = bts->smscb_state.cur_msg; + struct smscb_msg *msg = bts_ss->cur_msg; if (!msg) { /* No message: Send NULL block */ @@ -101,11 +112,11 @@ block_type->lb = 0; if (block_nr == 4) { - if (msg != bts->smscb_state.default_msg) { + if (msg != bts_ss->default_msg) { DEBUGPGT(DLSMS, g_time, "deleting fully-transmitted message %p\n", msg); /* delete any fully-transmitted normal message (or superseded default) */ - talloc_free(bts->smscb_state.cur_msg); - bts->smscb_state.cur_msg = NULL; + talloc_free(bts_ss->cur_msg); + bts_ss->cur_msg = NULL; } else { DEBUGPGT(DLSMS, g_time, "keeping fully-transmitted default message %p\n", msg); } @@ -131,11 +142,16 @@ /* incoming SMS broadcast command from RSL */ -int bts_process_smscb_cmd(struct gsm_bts *bts, - struct rsl_ie_cb_cmd_type cmd_type, - uint8_t msg_len, const uint8_t *msg) +int bts_process_smscb_cmd(struct gsm_bts *bts, struct rsl_ie_cb_cmd_type cmd_type, + bool extended_cbch, uint8_t msg_len, const uint8_t *msg) { struct smscb_msg *scm; + struct bts_smscb_state *bts_ss; + + if (extended_cbch) + bts_ss = &bts->smscb_extended; + else + bts_ss = &bts->smscb_basic; if (msg_len > sizeof(scm->msg)) { LOGP(DLSMS, LOGL_ERROR, @@ -157,7 +173,8 @@ scm->num_segs = last_block_rsl2um[cmd_type.last_block&3]; memcpy(scm->msg, msg, msg_len); - LOGP(DLSMS, LOGL_INFO, "RSL SMSCB COMMAND (type=%s, num_blocks=%u)\n", + LOGP(DLSMS, LOGL_INFO, "RSL SMSCB COMMAND (chan=%s, type=%s, num_blocks=%u)\n", + extended_cbch ? "EXTENDED" : "BASIC", get_value_string(rsl_cb_cmd_names, cmd_type.command), scm->num_segs); switch (cmd_type.command) { @@ -165,20 +182,20 @@ case RSL_CB_CMD_TYPE_SCHEDULE: case RSL_CB_CMD_TYPE_NULL: /* def_bcast is ignored as per Section 9.3.41 of 3GPP TS 48.058 */ - llist_add_tail(&scm->list, &bts->smscb_state.queue); + llist_add_tail(&scm->list, &bts_ss->queue); /* FIXME: limit queue size and optionally send CBCH LOAD Information (overflow) via RSL */ break; case RSL_CB_CMD_TYPE_DEFAULT: /* old default msg will be free'd in get_smscb_block() if it is currently in transit * and we set a new default_msg here */ - if (bts->smscb_state.cur_msg && bts->smscb_state.cur_msg == bts->smscb_state.default_msg) - talloc_free(bts->smscb_state.cur_msg); + if (bts_ss->cur_msg && bts_ss->cur_msg == bts_ss->default_msg) + talloc_free(bts_ss->cur_msg); if (cmd_type.def_bcast == RSL_CB_CMD_DEFBCAST_NORMAL) /* def_bcast == 0: normal message */ - bts->smscb_state.default_msg = scm; + bts_ss->default_msg = scm; else { /* def_bcast == 1: NULL message */ - bts->smscb_state.default_msg = NULL; + bts_ss->default_msg = NULL; talloc_free(scm); } break; @@ -190,11 +207,12 @@ return 0; } -static struct smscb_msg *select_next_smscb(struct gsm_bts *bts) +static struct smscb_msg *select_next_smscb(struct gsm_bts *bts, uint8_t tb) { + struct bts_smscb_state *bts_ss = bts_smscb_state(bts, tb); struct smscb_msg *msg; - msg = llist_first_entry_or_null(&bts->smscb_state.queue, struct smscb_msg, list); + msg = llist_first_entry_or_null(&bts_ss->queue, struct smscb_msg, list); if (msg) { llist_del(&msg->list); DEBUGP(DLSMS, "%s: Dequeued msg\n", __func__); @@ -204,7 +222,7 @@ /* FIXME: send CBCH LOAD Information (underflow) via RSL */ /* choose the default message, if any */ - msg = bts->smscb_state.default_msg; + msg = bts_ss->default_msg; if (msg) { DEBUGP(DLSMS, "%s: Using default msg\n", __func__); return msg; @@ -219,10 +237,14 @@ int bts_cbch_get(struct gsm_bts *bts, uint8_t *outbuf, struct gsm_time *g_time) { uint32_t fn = gsm_gsmtime2fn(g_time); + struct bts_smscb_state *bts_ss; /* According to 05.02 Section 6.5.4 */ uint32_t tb = (fn / 51) % 8; + uint8_t block_nr = tb % 4; int rc = 0; + bts_ss = bts_smscb_state(bts, tb); + /* The multiframes used for the basic cell broadcast channel * shall be those in * which TB = 0,1,2 and 3. The multiframes * used for the extended cell broadcast channel shall be those @@ -234,16 +256,14 @@ switch (tb) { case 0: + case 4: /* select a new SMSCB message */ - bts->smscb_state.cur_msg = select_next_smscb(bts); - rc = get_smscb_block(bts, outbuf, tb, g_time); + bts_ss->cur_msg = select_next_smscb(bts, tb); + rc = get_smscb_block(bts_ss, outbuf, block_nr, g_time); break; case 1: case 2: case 3: - rc = get_smscb_block(bts, outbuf, tb, g_time); - break; - case 4: case 5: case 6: case 7: - /* always send NULL frame in extended CBCH for now */ - rc = get_smscb_null_block(outbuf); + case 5: case 6: case 7: + rc = get_smscb_block(bts_ss, outbuf, block_nr, g_time); break; } diff --git a/src/common/rsl.c b/src/common/rsl.c index 9284e6f..fda1c32 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -487,6 +487,7 @@ struct abis_rsl_cchan_hdr *cch = msgb_l2(msg); struct tlv_parsed tp; struct rsl_ie_cb_cmd_type *cb_cmd_type; + bool extended_cbch = false; int rc; rsl_tlv_parse(&tp, msgb_l3(msg), msgb_l3len(msg)); @@ -495,11 +496,16 @@ !TLVP_PRESENT(&tp, RSL_IE_SMSCB_MSG)) return rsl_tx_error_report(trx, RSL_ERR_MAND_IE_ERROR, &cch->chan_nr, NULL, msg); + if (TLVP_PRESENT(&tp, RSL_IE_SMSCB_CHAN_INDICATOR)) { + if ((*TLVP_VAL(&tp, RSL_IE_SMSCB_CHAN_INDICATOR) & 0x0f) == 0x01) + extended_cbch = true; + } + cb_cmd_type = (struct rsl_ie_cb_cmd_type *) TLVP_VAL(&tp, RSL_IE_CB_CMD_TYPE); - rc = bts_process_smscb_cmd(trx->bts, *cb_cmd_type, TLVP_LEN(&tp, RSL_IE_SMSCB_MSG), - TLVP_VAL(&tp, RSL_IE_SMSCB_MSG)); + rc = bts_process_smscb_cmd(trx->bts, *cb_cmd_type, extended_cbch, + TLVP_LEN(&tp, RSL_IE_SMSCB_MSG), TLVP_VAL(&tp, RSL_IE_SMSCB_MSG)); if (rc < 0) return rsl_tx_error_report(trx, RSL_ERR_IE_CONTENT, &cch->chan_nr, NULL, msg); diff --git a/src/common/vty.c b/src/common/vty.c index 9e900b2..53a8674 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -865,8 +865,10 @@ bts->agch_queue.rejected_msgs, bts->agch_queue.agch_msgs, bts->agch_queue.pch_msgs, VTY_NEWLINE); - vty_out(vty, " CBCH backlog queue length: %u%s", - llist_length(&bts->smscb_state.queue), VTY_NEWLINE); + vty_out(vty, " CBCH backlog queue length (BASIC): %u%s", + llist_length(&bts->smscb_basic.queue), VTY_NEWLINE); + vty_out(vty, " CBCH backlog queue length (EXTENDED): %u%s", + llist_length(&bts->smscb_extended.queue), VTY_NEWLINE); vty_out(vty, " Paging: queue length %d, buffer space %d%s", paging_queue_length(bts->paging_state), paging_buffer_space(bts->paging_state), VTY_NEWLINE); -- To view, visit https://gerrit.osmocom.org/14109 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If2c6dc7da1e2185ab75fc957f8d305ad8db22429 Gerrit-Change-Number: 14109 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 19:39:35 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 19:39:35 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Extend BTS_Tests.ttcn with test for RSL error handling In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14086 ) Change subject: bts: Extend BTS_Tests.ttcn with test for RSL error handling ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14086 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If507a14bbed9cdcc62cd966468222186590fc965 Gerrit-Change-Number: 14086 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 20 May 2019 19:39:35 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 19:39:43 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 19:39:43 +0000 Subject: Change in osmo-ttcn3-hacks[master]: RSL_Types: Add support for RSL_IE_MSG_ID as used in ERROR REPORT In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14088 ) Change subject: RSL_Types: Add support for RSL_IE_MSG_ID as used in ERROR REPORT ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14088 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5f971dc7ec797a311841ac5b947c5c493780786f Gerrit-Change-Number: 14088 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 20 May 2019 19:39:43 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 19:39:54 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 19:39:54 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_sacch_chan_act() to test SACCH INFO at RSL CHAN ACT In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14089 ) Change subject: bts: Add TC_sacch_chan_act() to test SACCH INFO at RSL CHAN ACT ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14089 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8adb371a7e0b80792dd2fa35e5204802068df5ba Gerrit-Change-Number: 14089 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 20 May 2019 19:39:54 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 19:40:12 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 19:40:12 +0000 Subject: Change in osmo-ttcn3-hacks[master]: L1CTL: Add f_L1CTL_DM_EST_REQ() for activation without IMM.ASS In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14091 ) Change subject: L1CTL: Add f_L1CTL_DM_EST_REQ() for activation without IMM.ASS ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14091 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie5b85d3bac57032f4762ea9cdc21fdcd70fd5c2a Gerrit-Change-Number: 14091 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 20 May 2019 19:40:12 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 19:40:22 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 19:40:22 +0000 Subject: Change in osmo-ttcn3-hacks[master]: RSL_Types: Add dissected RSL_IE_ActivationType and related templates In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14092 ) Change subject: RSL_Types: Add dissected RSL_IE_ActivationType and related templates ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14092 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I116d589d0ec4aa6bffba4da6e3bfe1974dd04db2 Gerrit-Change-Number: 14092 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 20 May 2019 19:40:22 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 19:40:29 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 19:40:29 +0000 Subject: Change in osmo-ttcn3-hacks[master]: RSL_Types: Add ts_RSL_IE_MS_Power() template for MS Power IE In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14093 ) Change subject: RSL_Types: Add ts_RSL_IE_MS_Power() template for MS Power IE ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14093 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I646208c3c6e755978162e207a4f2030be117883d Gerrit-Change-Number: 14093 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 20 May 2019 19:40:29 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 19:40:46 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 19:40:46 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_sacch_chan_act_ho_async + TC_sacch_chan_act_ho_sync In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14094 ) Change subject: bts: Add TC_sacch_chan_act_ho_async + TC_sacch_chan_act_ho_sync ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14094 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia88f3ab160891cdbbb8fa6e765f137edd04c6e81 Gerrit-Change-Number: 14094 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 20 May 2019 19:40:46 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 19:40:50 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 19:40:50 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Extend BTS_Tests.ttcn with test for RSL error handling In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14086 ) Change subject: bts: Extend BTS_Tests.ttcn with test for RSL error handling ...................................................................... bts: Extend BTS_Tests.ttcn with test for RSL error handling Section 7 of the RSL specification (3GPP TS 48.058) describes how the BTS shall respond in various error situations, including wrong message type, wrong message discriminator and invalid message sequences. Let's add three test cases for the above three scenarios. Change-Id: If507a14bbed9cdcc62cd966468222186590fc965 Related: OS##3750 --- M bts/BTS_Tests.ttcn 1 file changed, 93 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index e1c64d6..5b69b5d 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -2571,6 +2571,95 @@ f_exp_err_rep(RSL_ERR_IE_CONTENT); } +/* attempt to activate channel with wrong RSL Message Discriminator IE */ +function f_TC_chan_act_wrong_mdisc(charstring id) runs on ConnHdlr { + var template RSL_Message rsl := ts_RSL_CHAN_ACT(g_chan_nr, g_pars.chan_mode); + rsl.msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RESERVED, false); + RSL.send(rsl); + f_rslem_unregister(0, g_chan_nr); +} +testcase TC_err_rep_wrong_mdisc() runs on test_CT { + var ConnHdlr vc_conn; + var ConnHdlrPars pars := valueof(t_Pars(ts_RslChanNr_SDCCH4(0,0), ts_RSL_ChanMode_SIGN)); + + f_init(testcasename()); + + vc_conn := f_start_handler(refers(f_TC_chan_act_wrong_mdisc), pars); + vc_conn.done; + f_exp_err_rep(RSL_ERR_MSG_DISCR); + + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + +/* Send messages with wrong message type */ +function f_TC_wrong_msg_type_dchan(charstring id) runs on ConnHdlr { + var template (value) RSL_Message rsl_tx; + rsl_tx := ts_RSL_CHAN_ACT(g_chan_nr, g_pars.chan_mode); + rsl_tx.msg_type := RSL_MT_NOT_CMD; + RSL.send(rsl_tx); + f_rslem_unregister(0, g_chan_nr); +} +function f_TC_wrong_msg_type_rll(charstring id) runs on ConnHdlr { + var template (value) RSL_Message rsl_tx; + /* we first have to activate the dedicated channel */ + f_rsl_chan_act(g_pars.chan_mode); + /* ... to then send an invalid RLL message */ + rsl_tx := ts_RSL_UNITDATA_REQ(g_chan_nr, ts_RslLinkID_DCCH(0), '0102'O); + rsl_tx.msg_type := RSL_MT_CBCH_LOAD_IND; + RSL.send(rsl_tx); + f_rslem_unregister(0, g_chan_nr); +} +testcase TC_err_rep_wrong_msg_type() runs on test_CT { + var ConnHdlr vc_conn; + var ConnHdlrPars pars := valueof(t_Pars(ts_RslChanNr_SDCCH4(0,0), ts_RSL_ChanMode_SIGN)); + var template (value) RSL_Message rsl_tx; + + f_init(testcasename()); + + /* Common Channel with wrong message type */ + RSL_CCHAN.clear; + rsl_tx := valueof(ts_RSL_BCCH_INFO(RSL_SYSTEM_INFO_1, ''O)); + rsl_tx.msg_type := RSL_MT_LOCATION_INFO; + RSL_CCHAN.send(ts_RSL_UD(rsl_tx)); + f_exp_err_rep(RSL_ERR_MSG_TYPE); + + /* TRX Management */ + RSL_CCHAN.clear; + rsl_tx := ts_RSL_SACCH_FILL(RSL_SYSTEM_INFO_5, ''O); + rsl_tx.msg_type := RSL_MT_UNIT_DATA_IND; + RSL_CCHAN.send(ts_RSL_UD(rsl_tx)); + f_exp_err_rep(RSL_ERR_MSG_TYPE); + + /* Dedicated Channel */ + RSL_CCHAN.clear; + vc_conn := f_start_handler(refers(f_TC_wrong_msg_type_dchan), pars); + vc_conn.done; + f_exp_err_rep(RSL_ERR_MSG_TYPE); + + /* RLL */ + RSL_CCHAN.clear; + vc_conn := f_start_handler(refers(f_TC_wrong_msg_type_rll), pars); + vc_conn.done; + f_exp_err_rep(RSL_ERR_MSG_TYPE); +} + +/* Send messages in wrong sequence (RLL to an inactive lchan) */ +function f_TC_err_rep_wrong_sequence(charstring id) runs on ConnHdlr { + RSL.send(ts_RSL_UNITDATA_REQ(g_chan_nr, ts_RslLinkID_DCCH(0), '0102'O)); + f_rslem_unregister(0, g_chan_nr); +} +testcase TC_err_rep_wrong_sequence() runs on test_CT { + var ConnHdlr vc_conn; + var ConnHdlrPars pars := valueof(t_Pars(ts_RslChanNr_SDCCH4(0,0), ts_RSL_ChanMode_SIGN)); + + f_init(testcasename()); + + RSL_CCHAN.clear; + vc_conn := f_start_handler(refers(f_TC_err_rep_wrong_sequence), pars); + vc_conn.done; + f_exp_err_rep(RSL_ERR_MSG_SEQ); +} + /*********************************************************************** * IPA CRCX/MDCX/DLCS media stream handling ***********************************************************************/ @@ -4311,9 +4400,6 @@ * SMS Broadcast Req / Cmd / CBCH LOad Ind * RF resource ind * error handling -** discriminator error -** type error -** sequence error ** IE duplicated? * PCU interface ** TIME_IND from BTS->PCU @@ -4416,6 +4502,10 @@ execute( TC_encr_cmd_a52() ); execute( TC_encr_cmd_a53() ); + execute( TC_err_rep_wrong_mdisc() ); + execute( TC_err_rep_wrong_msg_type() ); + execute( TC_err_rep_wrong_sequence() ); + execute( TC_lapdm_selftest() ); execute( TC_tch_sign_l2_fill_frame() ); -- To view, visit https://gerrit.osmocom.org/14086 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If507a14bbed9cdcc62cd966468222186590fc965 Gerrit-Change-Number: 14086 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 19:40:50 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 19:40:50 +0000 Subject: Change in osmo-ttcn3-hacks[master]: RSL_Types: Add support for RSL_IE_MSG_ID as used in ERROR REPORT In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14088 ) Change subject: RSL_Types: Add support for RSL_IE_MSG_ID as used in ERROR REPORT ...................................................................... RSL_Types: Add support for RSL_IE_MSG_ID as used in ERROR REPORT Change-Id: I5f971dc7ec797a311841ac5b947c5c493780786f --- M library/RSL_Types.ttcn 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index 3b1a311..39ba3d3 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -688,6 +688,7 @@ RSL_IE_MS_Power ms_power, uint8_t timing_adv, RSL_IE_MultirateCtrl multirate_ctrl, + uint8_t msg_id, RSL_IE_FrameNumber frame_nr, RSL_IE_Cause cause, uint8_t access_delay, @@ -738,6 +739,7 @@ ms_power, iei = RSL_IE_MS_POWER; timing_adv, iei = RSL_IE_TIMING_ADVANCE; multirate_ctrl, iei = RSL_IE_MR_CONTROL; + msg_id, iei = RSL_IE_MSG_ID; frame_nr, iei = RSL_IE_FRAME_NUMBER; cause, iei = RSL_IE_CAUSE; -- To view, visit https://gerrit.osmocom.org/14088 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I5f971dc7ec797a311841ac5b947c5c493780786f Gerrit-Change-Number: 14088 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 19:40:50 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 19:40:50 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_sacch_chan_act() to test SACCH INFO at RSL CHAN ACT In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14089 ) Change subject: bts: Add TC_sacch_chan_act() to test SACCH INFO at RSL CHAN ACT ...................................................................... bts: Add TC_sacch_chan_act() to test SACCH INFO at RSL CHAN ACT According to 3GPP Ts 48.058, every logical channel can receive some specific SACCH filling at the time of RSL channel activation. This overrides the global SACCH FILLING. Related: OS#3750 Change-Id: I8adb371a7e0b80792dd2fa35e5204802068df5ba --- M bts/BTS_Tests.ttcn M library/RSL_Types.ttcn 2 files changed, 82 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 5b69b5d..0ee3cd4 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -497,7 +497,7 @@ var RSL_Message rx := f_rsl_transceive_ret(tx, exp_rx, id, ignore_other); } -function f_rsl_chan_act(RSL_IE_ChannelMode mode, boolean encr_enable := false) +function f_rsl_chan_act(RSL_IE_ChannelMode mode, boolean encr_enable := false, RSL_IE_List more_ies := {}) runs on ConnHdlr { var RSL_Message ch_act := valueof(ts_RSL_CHAN_ACT(g_chan_nr, mode)); if (encr_enable) { @@ -507,6 +507,7 @@ ch_act.ies := ch_act.ies & { valueof(t_RSL_IE(RSL_IE_ENCR_INFO, RSL_IE_Body:{encr_info := encr_info})) }; } + ch_act.ies := ch_act.ies & more_ies; f_rsl_transceive(ch_act, tr_RSL_CHAN_ACT_ACK(g_chan_nr), "RSL CHAN ACT"); } @@ -960,7 +961,52 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } -/* TODO: Test for SACCH information present in RSL CHAN ACT (overrides FILLING) */ +/* Test for SACCH information present in RSL CHAN ACT (overrides FILLING) */ +private function f_TC_sacch_chan_act(charstring id) runs on ConnHdlr { + var octetstring si5 := f_rnd_octstring(19); + var octetstring si6 := f_rnd_octstring(19); + var octetstring si5_specific := f_rnd_octstring(19); + var octetstring si6_specific := f_rnd_octstring(19); + + /* First, configure both SI5 and SI6 to be transmitted */ + RSL.send(ts_RSL_SACCH_FILL(RSL_SYSTEM_INFO_5, si5)); + RSL.send(ts_RSL_SACCH_FILL(RSL_SYSTEM_INFO_6, si6)); + + f_l1_tune(L1CTL); + RSL.clear; + + /* activate channel with different SACCH filling */ + var RSL_SacchInfo sacch_info := valueof(ts_RSL_SacchInfo({ + ts_RSL_SacchInfoElem(RSL_SYSTEM_INFO_5, si5_specific), + ts_RSL_SacchInfoElem(RSL_SYSTEM_INFO_6, si6_specific) + })); + var RSL_IE_List addl_ies := { valueof(t_RSL_IE(RSL_IE_SACCH_INFO, + RSL_IE_Body:{sacch_info := sacch_info})) }; + f_est_dchan(more_ies := addl_ies); + + /* check that SACCH actually are received as expected */ + f_sacch_present(si5_specific); + f_sacch_present(si6_specific); + + /* release the channel */ + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); +} +testcase TC_sacch_chan_act() runs on test_CT { + var ConnHdlr vc_conn; + var ConnHdlrPars pars; + f_init(); + + for (var integer i := 0; i < sizeof(g_AllChannels); i := i+1) { + pars := valueof(t_Pars(g_AllChannels[i], ts_RSL_ChanMode_SIGN)); + log(testcasename(), ": Starting for ", g_AllChannels[i]); + vc_conn := f_start_handler(refers(f_TC_sacch_chan_act), pars); + vc_conn.done; + } + /* TODO: do the above in parallel, rather than sequentially? */ + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + /* TODO: Test for SACCH transmission rules in the context of special CHAN ACT (HO) */ @@ -1386,7 +1432,7 @@ } /* Establish dedicated channel: L1CTL + RSL side */ -private function f_est_dchan(boolean encr_enable := false) runs on ConnHdlr { +private function f_est_dchan(boolean encr_enable := false, RSL_IE_List more_ies := {}) runs on ConnHdlr { var GsmFrameNumber fn; var ImmediateAssignment imm_ass; var integer ra := 23; @@ -1395,7 +1441,7 @@ fn := f_rach_req_wait_chan_rqd(ra); /* Activate channel on BTS side */ - f_rsl_chan_act(g_pars.chan_mode, encr_enable); + f_rsl_chan_act(g_pars.chan_mode, encr_enable, more_ies); /* Send IMM.ASS via CCHAN */ var ChannelDescription ch_desc := { @@ -4418,6 +4464,7 @@ execute( TC_sacch_info_mod() ); execute( TC_sacch_multi() ); execute( TC_sacch_multi_chg() ); + execute( TC_sacch_chan_act() ); execute( TC_rach_content() ); execute( TC_rach_count() ); execute( TC_rach_max_ta() ); diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index 39ba3d3..0d772b3 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -565,6 +565,35 @@ cause_ext := omit } + /* 9.3.29 */ + type record RSL_SacchInfo { + uint8_t len, + uint8_t num_msgs, + RSL_SacchInfoElements elems + } with { + variant (len) "LENGTHTO(num_msgs,elems)"; + variant (num_msgs) "LENGTHTO(elems)"; + variant (num_msgs) "UNIT(elements)" + }; + type record RSL_SacchInfoElement { + RSL_IE_SysinfoType si_type, + uint8_t len, + octetstring msg + } with { + variant (len) "LENGTHTO(msg)"; + }; + type record of RSL_SacchInfoElement RSL_SacchInfoElements; + template (value) RSL_SacchInfo ts_RSL_SacchInfo(template (value) RSL_SacchInfoElements elems) := { + len := 0, /* overwritten */ + num_msgs := 0, /* overwritten */ + elems := elems + } + template (value) RSL_SacchInfoElement ts_RSL_SacchInfoElem(RSL_IE_SysinfoType tp, octetstring msg) := { + si_type := tp, + len := lengthof(msg), + msg := msg + } + /* 9.3.40 */ type enumerated RSL_ChanNeeded { RSL_CHANNEED_ANY ('00'B), @@ -703,6 +732,7 @@ RSL_IE_ChanNeeded chan_needed, RSL_IE_CbCommandType cb_cmd_type, RSL_LV smscb_message, + RSL_SacchInfo sacch_info, RSL_IE_StartingTime starting_time, RSL_IE_EncryptionInfo encr_info, @@ -755,6 +785,7 @@ chan_needed, iei = RSL_IE_CHAN_NEEDED; cb_cmd_type, iei = RSL_IE_CB_CMD_TYPE; smscb_message, iei = RSL_IE_SMSCB_MSG; + sacch_info, iei = RSL_IE_SACCH_INFO; starting_time, iei = RSL_IE_STARTNG_TIME; encr_info, iei = RSL_IE_ENCR_INFO; -- To view, visit https://gerrit.osmocom.org/14089 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I8adb371a7e0b80792dd2fa35e5204802068df5ba Gerrit-Change-Number: 14089 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 19:40:50 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 19:40:50 +0000 Subject: Change in osmo-ttcn3-hacks[master]: L1CTL: Add f_L1CTL_DM_EST_REQ() for activation without IMM.ASS In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14091 ) Change subject: L1CTL: Add f_L1CTL_DM_EST_REQ() for activation without IMM.ASS ...................................................................... L1CTL: Add f_L1CTL_DM_EST_REQ() for activation without IMM.ASS In any normal or handover related assignments, we don't have an ImmediateAssignment that we can hand to f_L1CTL_DM_EST_REQ_IA(), so let's intrduce a version that works with arfcn, chan_nr and TSC directly. Change-Id: Ie5b85d3bac57032f4762ea9cdc21fdcd70fd5c2a --- M library/L1CTL_PortType.ttcn 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/library/L1CTL_PortType.ttcn b/library/L1CTL_PortType.ttcn index 7dac4c3..a366a1b 100644 --- a/library/L1CTL_PortType.ttcn +++ b/library/L1CTL_PortType.ttcn @@ -177,10 +177,14 @@ } T.stop; } + function f_L1CTL_DM_EST_REQ(L1CTL_PT pt, Arfcn arfcn, RslChannelNr chan_nr, GsmTsc tsc) { + pt.send(ts_L1CTL_DM_EST_REQ(arfcn, chan_nr, tsc)); + } /* Send DM_EST_REQ from parameters derived from IMM ASS */ function f_L1CTL_DM_EST_REQ_IA(L1CTL_PT pt, ImmediateAssignment imm_ass) { - pt.send(ts_L1CTL_DM_EST_REQ({ false, imm_ass.chan_desc.arfcn }, imm_ass.chan_desc.chan_nr, imm_ass.chan_desc.tsc)); + f_L1CTL_DM_EST_REQ(pt, { false, imm_ass.chan_desc.arfcn }, imm_ass.chan_desc.chan_nr, + imm_ass.chan_desc.tsc); } /* Send DM_REL_REQ from parameters derived from IMM ASS */ -- To view, visit https://gerrit.osmocom.org/14091 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie5b85d3bac57032f4762ea9cdc21fdcd70fd5c2a Gerrit-Change-Number: 14091 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 19:40:51 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 19:40:51 +0000 Subject: Change in osmo-ttcn3-hacks[master]: RSL_Types: Add dissected RSL_IE_ActivationType and related templates In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14092 ) Change subject: RSL_Types: Add dissected RSL_IE_ActivationType and related templates ...................................................................... RSL_Types: Add dissected RSL_IE_ActivationType and related templates This is required for supporting normal and handover assignments. Change-Id: I116d589d0ec4aa6bffba4da6e3bfe1974dd04db2 --- M library/RSL_Types.ttcn 1 file changed, 36 insertions(+), 10 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index 0d772b3..cfe2845 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -273,20 +273,44 @@ type record RSL_IE_ActivationType { boolean reactivation, uint4_t reserved, - uint3_t a_bits - } + RSL_ActivationAbits a_bits + }; + type enumerated RSL_ActivationAbits { + ACT_REL_TO_IMM_ASSIGN ('000'B), + ACT_REL_TO_NORM_ASSIGN ('001'B), + ACT_REL_TO_ASYNC_HANDOVER ('010'B), + ACT_REL_TO_SYNC_HANDOVER ('011'B), + ACT_REL_TO_ADDL_ASSIGN ('100'B), + ACT_REL_TO_MSLOT_CONFIG ('101'B), + ACT_REL_TO_OSMO_PDCH ('111'B) + } with { variant "FIELDLENGTH(3)" }; - template RSL_IE_ActivationType t_RSL_IE_ActType := { + const RSL_IE_ActivationType t_RSL_IE_ActType_IA := { reactivation := false, reserved := 0, - a_bits := 0 /* related to immediate assignment */ + a_bits := ACT_REL_TO_IMM_ASSIGN + } + const RSL_IE_ActivationType t_RSL_IE_ActType_ASS := { + reactivation := false, + reserved := 0, + a_bits := ACT_REL_TO_NORM_ASSIGN + } + const RSL_IE_ActivationType t_RSL_IE_ActType_HO_ASYNC := { + reactivation := false, + reserved := 0, + a_bits := ACT_REL_TO_ASYNC_HANDOVER + } + const RSL_IE_ActivationType t_RSL_IE_ActType_HO_SYNC := { + reactivation := false, + reserved := 0, + a_bits := ACT_REL_TO_SYNC_HANDOVER } /* osmocom-style dynamic PDCH */ - template RSL_IE_ActivationType t_RSL_IE_ActType_PDCH := { + const RSL_IE_ActivationType t_RSL_IE_ActType_PDCH := { reactivation := false, reserved := 1, - a_bits := 7 /* related to immediate assignment */ + a_bits := ACT_REL_TO_OSMO_PDCH } /* 9.3.6 */ @@ -1122,23 +1146,25 @@ /* 8.4.1 BSC -> BTS */ template (value) RSL_Message ts_RSL_CHAN_ACT(template (value) RslChannelNr chan_nr, - template (value) RSL_IE_ChannelMode mode) := { + template (value) RSL_IE_ChannelMode mode, + template (value) RSL_IE_ActivationType at := t_RSL_IE_ActType_IA) := { msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), msg_type := RSL_MT_CHAN_ACTIV, ies :={ t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), - t_RSL_IE(RSL_IE_ACT_TYPE, RSL_IE_Body:{act_type := t_RSL_IE_ActType}), + t_RSL_IE(RSL_IE_ACT_TYPE, RSL_IE_Body:{act_type := at}), t_RSL_IE(RSL_IE_CHAN_MODE, RSL_IE_Body:{chan_mode := mode}) /* lots of optional IEs */ } } template RSL_Message tr_RSL_CHAN_ACT(template RslChannelNr chan_nr, - template RSL_IE_ChannelMode mode) := { + template RSL_IE_ChannelMode mode, + template (value) RSL_IE_ActivationType at := t_RSL_IE_ActType_IA) := { msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), msg_type := RSL_MT_CHAN_ACTIV, ies :={ tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), - tr_RSL_IE(RSL_IE_Body:{act_type := t_RSL_IE_ActType}), + tr_RSL_IE(RSL_IE_Body:{act_type := at}), tr_RSL_IE(RSL_IE_Body:{chan_mode := mode}), /* lots of optional IEs */ * -- To view, visit https://gerrit.osmocom.org/14092 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I116d589d0ec4aa6bffba4da6e3bfe1974dd04db2 Gerrit-Change-Number: 14092 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 19:40:51 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 19:40:51 +0000 Subject: Change in osmo-ttcn3-hacks[master]: RSL_Types: Add ts_RSL_IE_MS_Power() template for MS Power IE In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14093 ) Change subject: RSL_Types: Add ts_RSL_IE_MS_Power() template for MS Power IE ...................................................................... RSL_Types: Add ts_RSL_IE_MS_Power() template for MS Power IE Change-Id: I646208c3c6e755978162e207a4f2030be117883d --- M library/RSL_Types.ttcn 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index cfe2845..955e92c 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -442,6 +442,12 @@ boolean fpc_epc, uint5_t power_level } + template (value) RSL_IE_MS_Power ts_RSL_IE_MS_Power(uint5_t power_level, + boolean fpc_epc := false) := { + reserved := 0, + fpc_epc := fpc_epc, + power_level := power_level + } /* 9.3.18 */ type record RSL_IE_RachLoad { -- To view, visit https://gerrit.osmocom.org/14093 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I646208c3c6e755978162e207a4f2030be117883d Gerrit-Change-Number: 14093 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 19:40:51 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 19:40:51 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_sacch_chan_act_ho_async + TC_sacch_chan_act_ho_sync In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14094 ) Change subject: bts: Add TC_sacch_chan_act_ho_async + TC_sacch_chan_act_ho_sync ...................................................................... bts: Add TC_sacch_chan_act_ho_async + TC_sacch_chan_act_ho_sync Those two new tests test the subtle rules related to how the presence of certain IEs in the RSL CHAN ACT influence when exactly DL SACCH transmission should start during hand-over related channel activation. Change-Id: Ia88f3ab160891cdbbb8fa6e765f137edd04c6e81 Related: OS#3570 Related: OS#4008 Related: OS#4009 --- M bts/BTS_Tests.ttcn 1 file changed, 152 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 0ee3cd4..076476f 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -497,9 +497,9 @@ var RSL_Message rx := f_rsl_transceive_ret(tx, exp_rx, id, ignore_other); } -function f_rsl_chan_act(RSL_IE_ChannelMode mode, boolean encr_enable := false, RSL_IE_List more_ies := {}) -runs on ConnHdlr { - var RSL_Message ch_act := valueof(ts_RSL_CHAN_ACT(g_chan_nr, mode)); +function f_rsl_chan_act(RSL_IE_ChannelMode mode, boolean encr_enable := false, RSL_IE_List more_ies := {}, + RSL_IE_ActivationType act_type := t_RSL_IE_ActType_IA) runs on ConnHdlr { + var RSL_Message ch_act := valueof(ts_RSL_CHAN_ACT(g_chan_nr, mode, act_type)); if (encr_enable) { /* append encryption related IEs, if requested */ var RSL_IE_EncryptionInfo encr_info; @@ -1007,7 +1007,153 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } -/* TODO: Test for SACCH transmission rules in the context of special CHAN ACT (HO) */ +/* verify that SACCH DL transmission is started only if MS power IE present + * see section 4.1.3 of 3GPP TS 48.058 */ +private function f_TC_sacch_chan_act_ho_async(charstring id) runs on ConnHdlr { + var octetstring si5 := f_rnd_octstring(19); + + f_l1_tune(L1CTL); + RSL.clear; + + /* Step 1: Activate ASYNC HO channel without MS power IE */ + + /* Activate channel on BTS side */ + f_rsl_chan_act(g_pars.chan_mode, act_type := t_RSL_IE_ActType_HO_ASYNC); + /* don't perform immediate assignment here, as we're testing non-IA case */ + /* enable dedicated mode */ + f_L1CTL_DM_EST_REQ(L1CTL, {false, mp_trx0_arfcn }, g_pars.chan_nr, 7); + + /* Verify that no DL SACCH is being received */ + f_sacch_missing(?); + + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); + + + /* Step 2: Activate ASYNC HO channel with MS power IE */ + + /* Activate channel on BTS side */ + var RSL_IE_List addl_ies := { + valueof(t_RSL_IE(RSL_IE_MS_POWER, RSL_IE_Body:{ms_power := ts_RSL_IE_MS_Power(0)})) + }; + f_rsl_chan_act(g_pars.chan_mode, more_ies := addl_ies, act_type := t_RSL_IE_ActType_HO_ASYNC); + /* don't perform immediate assignment here, as we're testing non-IA case */ + /* enable dedicated mode */ + f_L1CTL_DM_EST_REQ(L1CTL, {false, mp_trx0_arfcn }, g_pars.chan_nr, 7); + + /* Verify that DL SACCH is being received */ + f_sacch_present(si5); + + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); +} +testcase TC_sacch_chan_act_ho_async() runs on test_CT { + var ConnHdlr vc_conn; + var ConnHdlrPars pars; + f_init(); + + for (var integer i := 0; i < sizeof(g_AllChannels); i := i+1) { + pars := valueof(t_Pars(g_AllChannels[i], ts_RSL_ChanMode_SIGN)); + log(testcasename(), ": Starting for ", g_AllChannels[i]); + vc_conn := f_start_handler(refers(f_TC_sacch_chan_act_ho_async), pars); + vc_conn.done; + } + /* TODO: do the above in parallel, rather than sequentially? */ + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + +/* verify that SACCH DL transmission is started only if TA + MS power IEs present, + * see section 4.1.4 of 3GPP TS 48.058 */ +private function f_TC_sacch_chan_act_ho_sync(charstring id) runs on ConnHdlr { + var octetstring si5 := f_rnd_octstring(19); + var RSL_IE_List addl_ies; + + f_l1_tune(L1CTL); + RSL.clear; + + /* Step 1: Activate SYNC HO channel without MS power IE */ + + /* Activate channel on BTS side */ + f_rsl_chan_act(g_pars.chan_mode, act_type := t_RSL_IE_ActType_HO_SYNC); + /* don't perform immediate assignment here, as we're testing non-IA case */ + /* enable dedicated mode */ + f_L1CTL_DM_EST_REQ(L1CTL, {false, mp_trx0_arfcn }, g_pars.chan_nr, 7); + + /* Verify that no DL SACCH is being received */ + f_sacch_missing(?); + + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); + + + /* Step 2a: Activate SYNC HO channel with only MS power IE */ + + /* Activate channel on BTS side */ + addl_ies := { + valueof(t_RSL_IE(RSL_IE_MS_POWER, RSL_IE_Body:{ms_power := ts_RSL_IE_MS_Power(0)})) + }; + f_rsl_chan_act(g_pars.chan_mode, more_ies := addl_ies, act_type := t_RSL_IE_ActType_HO_SYNC); + /* don't perform immediate assignment here, as we're testing non-IA case */ + /* enable dedicated mode */ + f_L1CTL_DM_EST_REQ(L1CTL, {false, mp_trx0_arfcn }, g_pars.chan_nr, 7); + + /* Verify that no DL SACCH is being received */ + f_sacch_missing(?); + + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); + + + /* Step 2b: Activate SYNC HO channel with TA IE */ + + /* Activate channel on BTS side */ + addl_ies := { + valueof(t_RSL_IE(RSL_IE_TIMING_ADVANCE, RSL_IE_Body:{timing_adv := 0})) + }; + f_rsl_chan_act(g_pars.chan_mode, more_ies := addl_ies, act_type := t_RSL_IE_ActType_HO_SYNC); + /* don't perform immediate assignment here, as we're testing non-IA case */ + /* enable dedicated mode */ + f_L1CTL_DM_EST_REQ(L1CTL, {false, mp_trx0_arfcn }, g_pars.chan_nr, 7); + + /* Verify that no DL SACCH is being received */ + f_sacch_missing(?); + + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); + + + /* Step 3: Activate SYNC HO channel with MS power IE and TA IE */ + + /* Activate channel on BTS side */ + addl_ies := { + valueof(t_RSL_IE(RSL_IE_TIMING_ADVANCE, RSL_IE_Body:{timing_adv := 0})), + valueof(t_RSL_IE(RSL_IE_MS_POWER, RSL_IE_Body:{ms_power := ts_RSL_IE_MS_Power(0)})) + }; + f_rsl_chan_act(g_pars.chan_mode, more_ies := addl_ies, act_type := t_RSL_IE_ActType_HO_SYNC); + /* don't perform immediate assignment here, as we're testing non-IA case */ + /* enable dedicated mode */ + f_L1CTL_DM_EST_REQ(L1CTL, {false, mp_trx0_arfcn }, g_pars.chan_nr, 7); + + /* Verify that DL SACCH is being received */ + f_sacch_present(si5); + + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); +} +testcase TC_sacch_chan_act_ho_sync() runs on test_CT { + var ConnHdlr vc_conn; + var ConnHdlrPars pars; + f_init(); + + for (var integer i := 0; i < sizeof(g_AllChannels); i := i+1) { + pars := valueof(t_Pars(g_AllChannels[i], ts_RSL_ChanMode_SIGN)); + log(testcasename(), ": Starting for ", g_AllChannels[i]); + vc_conn := f_start_handler(refers(f_TC_sacch_chan_act_ho_sync), pars); + vc_conn.done; + } + /* TODO: do the above in parallel, rather than sequentially? */ + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} /*********************************************************************** @@ -4465,6 +4611,8 @@ execute( TC_sacch_multi() ); execute( TC_sacch_multi_chg() ); execute( TC_sacch_chan_act() ); + execute( TC_sacch_chan_act_ho_async() ); + execute( TC_sacch_chan_act_ho_sync() ); execute( TC_rach_content() ); execute( TC_rach_count() ); execute( TC_rach_max_ta() ); -- To view, visit https://gerrit.osmocom.org/14094 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ia88f3ab160891cdbbb8fa6e765f137edd04c6e81 Gerrit-Change-Number: 14094 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 20:02:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 20:02:53 +0000 Subject: Change in osmo-ttcn3-hacks[master]: cbch: Refactor code to support mixed DEFAULT + NORMAL and EXTENDED CBCH In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14107 to look at the new patch set (#2). Change subject: cbch: Refactor code to support mixed DEFAULT + NORMAL and EXTENDED CBCH ...................................................................... cbch: Refactor code to support mixed DEFAULT + NORMAL and EXTENDED CBCH The existing code structure could only test for normal messages with a NULL default, but didn't handle situations where normal and/or schedule messages were superimposed on top of DEFAULT messages. Also, prepare the infrastructure for testing both CBCH BASIC and CBCH EXTENDED. No new tests are introduced, the code should behave identical before and after this patch. Change-Id: I144c7d833b79c648b1ac69a6155f3603025ede5c Related: OS#4011 --- M bts/BTS_Tests_SMSCB.ttcn M library/RSL_Types.ttcn 2 files changed, 225 insertions(+), 61 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/07/14107/2 -- To view, visit https://gerrit.osmocom.org/14107 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I144c7d833b79c648b1ac69a6155f3603025ede5c Gerrit-Change-Number: 14107 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 20:02:54 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 20:02:54 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_sms_cb_cmd_sdcch{4, 8}_extd_multi Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14110 Change subject: bts: Add TC_sms_cb_cmd_sdcch{4,8}_extd_multi ...................................................................... bts: Add TC_sms_cb_cmd_sdcch{4,8}_extd_multi Those tests verify operation of the EXTENDED CBCH. Change-Id: I06c193d59f21472fb5e4c69a7af1ccb18fba7487 Related: OS#4011 Related: OS#3535 --- M bts/BTS_Tests_SMSCB.ttcn 1 file changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/10/14110/1 diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn index c0443e4..302607c 100644 --- a/bts/BTS_Tests_SMSCB.ttcn +++ b/bts/BTS_Tests_SMSCB.ttcn @@ -568,6 +568,24 @@ f_TC_smscb(pars); } +/* transmit multiple commands of each 4 blocks on CBCH EXTD */ +testcase TC_sms_cb_cmd_sdcch4_extd_multi() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := true, + basic := valueof(t_CbchPC({})), + extended := valueof(t_CbchPC(msgs_3m_4b_norm)) + }; + f_TC_smscb(pars); +} +testcase TC_sms_cb_cmd_sdcch8_extd_multi() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := false, + basic := valueof(t_CbchPC({})), + extended := valueof(t_CbchPC(msgs_3m_4b_norm)) + }; + f_TC_smscb(pars); +} + /* transmit SMSCB COMMAND with SCHEDULE payload */ testcase TC_sms_cb_cmd_sdcch4_schedule() runs on test_CT { var CbchTestPars pars := { -- To view, visit https://gerrit.osmocom.org/14110 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I06c193d59f21472fb5e4c69a7af1ccb18fba7487 Gerrit-Change-Number: 14110 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 20:27:27 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 20 May 2019 20:27:27 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: CBCH related tests for OsmoBTS In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/10983 ) Change subject: bts: CBCH related tests for OsmoBTS ...................................................................... Patch Set 4: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/10983/4/bts/BTS_Tests_SMSCB.ttcn File bts/BTS_Tests_SMSCB.ttcn: https://gerrit.osmocom.org/#/c/10983/4/bts/BTS_Tests_SMSCB.ttcn at 158 PS4, Line 158: t_RslChanNr_CBCH(0) You should use the proper timeslot number here depending on pars.use_sdcch4. The same bug is present in OsmoBSC - it always does send CB Command on TS0. Also, please note that trxcon is using different RSL_CHAN_NR for both GSM_PCHAN_CCCH_SDCCH4_CBCH and GSM_PCHAN_SDCCH8_SACCH8C_CBCH, see https://git.osmocom.org/osmocom-bb/tree/src/host/trxcon/sched_trx.c#n529. I don't remember why I decided to have two different values. Most likely, because I wanted to be able do distinguish CCCH+SDCCH4+CBCH on TS0/C0 and SDCCH8+CBCH on TS0/CX. I hope this helps. -- To view, visit https://gerrit.osmocom.org/10983 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I955b4000c12180a39b0205b69b7b2c8cee8c9da3 Gerrit-Change-Number: 10983 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Mon, 20 May 2019 20:27:27 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 22:22:37 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 22:22:37 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: CBCH related tests for OsmoBTS In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/10983 ) Change subject: bts: CBCH related tests for OsmoBTS ...................................................................... Patch Set 4: (1 comment) https://gerrit.osmocom.org/#/c/10983/4/bts/BTS_Tests_SMSCB.ttcn File bts/BTS_Tests_SMSCB.ttcn: https://gerrit.osmocom.org/#/c/10983/4/bts/BTS_Tests_SMSCB.ttcn at 158 PS4, Line 158: t_RslChanNr_CBCH(0) > You should use the proper timeslot number here depending on pars.use_sdcch4. [?] as discussed on IRC, there's some lack of agreement on interpretation of channel numbers. I'll simply add a FIXME to the code for now and disable the SDCCH8 tests until this is resolved. -- To view, visit https://gerrit.osmocom.org/10983 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I955b4000c12180a39b0205b69b7b2c8cee8c9da3 Gerrit-Change-Number: 10983 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Mon, 20 May 2019 22:22:37 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 22:27:28 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 22:27:28 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: CBCH related tests for OsmoBTS In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/10983 to look at the new patch set (#5). Change subject: bts: CBCH related tests for OsmoBTS ...................................................................... bts: CBCH related tests for OsmoBTS This introduces a set of CBCH related tests for osmo-bts. Warning: Those tests currently require a patched trxcon to work. Related: OS#4011 Change-Id: I955b4000c12180a39b0205b69b7b2c8cee8c9da3 --- M bts/BTS_Tests.cfg M bts/BTS_Tests.ttcn A bts/BTS_Tests_SMSCB.ttcn 3 files changed, 353 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/83/10983/5 -- To view, visit https://gerrit.osmocom.org/10983 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I955b4000c12180a39b0205b69b7b2c8cee8c9da3 Gerrit-Change-Number: 10983 Gerrit-PatchSet: 5 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 22:27:28 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 22:27:28 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_sms_cb_cmd_cbch_sdcch{4, 8}_default_only In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14102 to look at the new patch set (#3). Change subject: bts: Add TC_sms_cb_cmd_cbch_sdcch{4,8}_default_only ...................................................................... bts: Add TC_sms_cb_cmd_cbch_sdcch{4,8}_default_only Add a most basic CBCH DEFAULT message test: Ensure *only* the default message is sent if a default is set. Related: OS#4011 Change-Id: Iab03fa88b759759a493516d43090c4df63f7b06f --- M bts/BTS_Tests_SMSCB.ttcn 1 file changed, 105 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/02/14102/3 -- To view, visit https://gerrit.osmocom.org/14102 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iab03fa88b759759a493516d43090c4df63f7b06f Gerrit-Change-Number: 14102 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 22:27:28 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 22:27:28 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Test for removal of CBCH DEFAULT message In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14106 to look at the new patch set (#2). Change subject: bts: Test for removal of CBCH DEFAULT message ...................................................................... bts: Test for removal of CBCH DEFAULT message Add a new testcase TC_sms_cb_cmd_sdcch4_default_then_null() which first installes a DEFAULT message, verifies that, then removes the default message and verifies only NULL CBCH blocks are sent anymore. Change-Id: I9608d42a164a6210f100d10cb3ccfb7735975011 Related: OS#4011 --- M bts/BTS_Tests_SMSCB.ttcn 1 file changed, 52 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/06/14106/2 -- To view, visit https://gerrit.osmocom.org/14106 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9608d42a164a6210f100d10cb3ccfb7735975011 Gerrit-Change-Number: 14106 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 22:27:28 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 22:27:28 +0000 Subject: Change in osmo-ttcn3-hacks[master]: cbch: Refactor code to support mixed DEFAULT + NORMAL and EXTENDED CBCH In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14107 to look at the new patch set (#3). Change subject: cbch: Refactor code to support mixed DEFAULT + NORMAL and EXTENDED CBCH ...................................................................... cbch: Refactor code to support mixed DEFAULT + NORMAL and EXTENDED CBCH The existing code structure could only test for normal messages with a NULL default, but didn't handle situations where normal and/or schedule messages were superimposed on top of DEFAULT messages. Also, prepare the infrastructure for testing both CBCH BASIC and CBCH EXTENDED. No new tests are introduced, the code should behave identical before and after this patch. Change-Id: I144c7d833b79c648b1ac69a6155f3603025ede5c Related: OS#4011 --- M bts/BTS_Tests_SMSCB.ttcn M library/RSL_Types.ttcn 2 files changed, 220 insertions(+), 62 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/07/14107/3 -- To view, visit https://gerrit.osmocom.org/14107 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I144c7d833b79c648b1ac69a6155f3603025ede5c Gerrit-Change-Number: 14107 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 22:27:28 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 22:27:28 +0000 Subject: Change in osmo-ttcn3-hacks[master]: cbch: Test case for mixed NORMAL and DEFAULT SMSCB In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14108 to look at the new patch set (#3). Change subject: cbch: Test case for mixed NORMAL and DEFAULT SMSCB ...................................................................... cbch: Test case for mixed NORMAL and DEFAULT SMSCB This adds TC_sms_cb_cmd_sdcch{4,8]_default_and_normal() which test the correct behavior in case of a DEFAULT SMSCB and normal one-shot SMSCBs. Change-Id: I0782b121cd69158903b09f935b298ddbf5a9ffb5 Related: OS#4011 --- M bts/BTS_Tests_SMSCB.ttcn 1 file changed, 19 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/08/14108/3 -- To view, visit https://gerrit.osmocom.org/14108 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0782b121cd69158903b09f935b298ddbf5a9ffb5 Gerrit-Change-Number: 14108 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 22:31:26 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 22:31:26 +0000 Subject: Change in osmo-bts[master]: RSL: Reject RLL messages for lchans that are not active yet In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14085 to look at the new patch set (#4). Change subject: RSL: Reject RLL messages for lchans that are not active yet ...................................................................... RSL: Reject RLL messages for lchans that are not active yet The Radio Link Layer (RLL) messages only make sense when a given logical channel is active. If it isn't active, let's reject the messages with an RSL ERROR REPORT with cause "Message sequence error", wich according to spec means: "A message with an existing message type which is not possible according to the specification and to the state of the BTS is erroneous." Related: OS#3750 Change-Id: I68dbb622aeaee657471664cdc0b69c2ac316d77e --- M src/common/rsl.c 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/85/14085/4 -- To view, visit https://gerrit.osmocom.org/14085 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I68dbb622aeaee657471664cdc0b69c2ac316d77e Gerrit-Change-Number: 14085 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 20 23:15:15 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 20 May 2019 23:15:15 +0000 Subject: Change in osmo-bts[master]: Use LOGPLCHAN whenever possible Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14111 Change subject: Use LOGPLCHAN whenever possible ...................................................................... Use LOGPLCHAN whenever possible There's no point in open-coding what LOGPLCHAN was created to do: Log some event while stating the name of the logical channel. Change-Id: I6913ac8fb543811126b85a54118333155c03bc03 --- M src/common/handover.c M src/common/l1sap.c M src/common/msg_utils.c M src/common/oml.c M src/common/rsl.c M src/common/sysinfo.c 6 files changed, 150 insertions(+), 210 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/11/14111/1 diff --git a/src/common/handover.c b/src/common/handover.c index 54b131f..63a9832 100644 --- a/src/common/handover.c +++ b/src/common/handover.c @@ -44,9 +44,7 @@ if (!msg) return -ENOMEM; - LOGP(DHO, LOGL_INFO, - "%s Sending PHYSICAL INFORMATION to MS.\n", - gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DHO, LOGL_INFO, "Sending PHYSICAL INFORMATION to MS.\n"); /* Build RSL UNITDATA REQUEST message with 04.08 PHYS INFO */ msg->l3h = msg->data; @@ -68,20 +66,18 @@ struct gsm_lchan *lchan = data; struct gsm_bts *bts = lchan->ts->trx->bts; - LOGP(DHO, LOGL_INFO, "%s T3105 timeout (%d resends left)\n", - gsm_lchan_name(lchan), bts->ny1 - lchan->ho.phys_info_count); + LOGPLCHAN(lchan, DHO, LOGL_INFO, "T3105 timeout (%d resends left)\n", + bts->ny1 - lchan->ho.phys_info_count); if (lchan->state != LCHAN_S_ACTIVE) { - LOGP(DHO, LOGL_NOTICE, - "%s is in not active. It is in state %s. Ignoring\n", - gsm_lchan_name(lchan), gsm_lchans_name(lchan->state)); + LOGPLCHAN(lchan, DHO, LOGL_NOTICE, "is in not active. It is in state %s. Ignoring\n", + gsm_lchans_name(lchan->state)); return; } if (lchan->ho.phys_info_count >= bts->ny1) { /* HO Abort */ - LOGP(DHO, LOGL_NOTICE, "%s NY1 reached, sending CONNection " - "FAILure to BSC.\n", gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DHO, LOGL_NOTICE, "NY1 reached, sending CONNection FAILure to BSC.\n"); rsl_tx_conn_fail(lchan, RSL_ERR_HANDOVER_ACC_FAIL); return; } @@ -98,23 +94,21 @@ /* Ignore invalid handover ref */ if (lchan->ho.ref != ra) { - LOGP(DHO, LOGL_INFO, "%s RACH on dedicated channel received, but " - "ra=0x%02x != expected ref=0x%02x. (This is no bug)\n", - gsm_lchan_name(lchan), ra, lchan->ho.ref); + LOGPLCHAN(lchan, DHO, LOGL_INFO, "RACH on dedicated channel received, but " + "ra=0x%02x != expected ref=0x%02x. (This is no bug)\n", ra, lchan->ho.ref); return; } /* Ignore handover on channels other than DCCH and SACCH */ if (lchan->type != GSM_LCHAN_SDCCH && lchan->type != GSM_LCHAN_TCH_H && lchan->type != GSM_LCHAN_TCH_F) { - LOGP(DHO, LOGL_ERROR, "%s handover RACH received on %s?!\n", - gsm_lchan_name(lchan), gsm_lchant_name(lchan->type)); + LOGPLCHAN(lchan, DHO, LOGL_ERROR, "handover RACH received on %s?!\n", + gsm_lchant_name(lchan->type)); return; } - LOGP(DHO, LOGL_NOTICE, - "%s RACH on dedicated channel type %s received with TA=%u, ref=%u\n", - gsm_lchan_name(lchan), gsm_lchant_name(lchan->type), acc_delay, ra); + LOGPLCHAN(lchan, DHO, LOGL_NOTICE, "RACH on dedicated channel type %s received with " + "TA=%u, ref=%u\n", gsm_lchant_name(lchan->type), acc_delay, ra); /* Set timing advance */ lchan->rqd_ta = acc_delay; @@ -122,9 +116,7 @@ /* Stop handover detection, wait for valid frame */ lchan->ho.active = HANDOVER_WAIT_FRAME; if (l1sap_chan_modify(lchan->ts->trx, gsm_lchan2chan_nr(lchan)) != 0) { - LOGP(DHO, LOGL_ERROR, - "%s failed to modify channel after handover\n", - gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DHO, LOGL_ERROR, "failed to modify channel after handover\n"); rsl_tx_conn_fail(lchan, RSL_ERR_HANDOVER_ACC_FAIL); return; } @@ -137,9 +129,7 @@ ho_tx_phys_info(lchan); /* Start T3105 */ - LOGP(DHO, LOGL_DEBUG, - "%s Starting T3105 with %u ms\n", - gsm_lchan_name(lchan), bts->t3105_ms); + LOGPLCHAN(lchan, DHO, LOGL_DEBUG, "Starting T3105 with %u ms\n", bts->t3105_ms); lchan->ho.t3105.cb = ho_t3105_cb; lchan->ho.t3105.data = lchan; osmo_timer_schedule(&lchan->ho.t3105, 0, bts->t3105_ms * 1000); @@ -148,8 +138,7 @@ /* received frist valid data frame on dedicated channel */ void handover_frame(struct gsm_lchan *lchan) { - LOGP(DHO, LOGL_INFO, - "%s First valid frame detected\n", gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DHO, LOGL_INFO, "First valid frame detected\n"); handover_reset(lchan); } diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 247763e..f31d822 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -114,9 +114,8 @@ struct gsm_lchan *lchan = get_lchan_by_chan_nr(trx, chan_nr); if (lchan && lchan->state != LCHAN_S_ACTIVE) { - LOGP(DL1P, LOGL_NOTICE, "%s: assuming active lchan, but " - "state is %s\n", gsm_lchan_name(lchan), - gsm_lchans_name(lchan->state)); + LOGPLCHAN(lchan, DL1P, LOGL_NOTICE, "assuming active lchan, but state is %s\n", + gsm_lchans_name(lchan->state)); return NULL; } return lchan; @@ -139,9 +138,9 @@ r -= r % GSM_RTP_DURATION; if (r != GSM_RTP_DURATION) - LOGP(DRTP, LOGL_ERROR, "RTP clock out of sync with lower layer:" - " %"PRIu32" vs %d (%"PRIu32"->%"PRIu32")\n", - r, GSM_RTP_DURATION, lchan->tch.last_fn, fn); + LOGPLCHAN(lchan, DRTP, LOGL_ERROR, "RTP clock out of sync with lower layer:" + " %"PRIu32" vs %d (%"PRIu32"->%"PRIu32")\n", + r, GSM_RTP_DURATION, lchan->tch.last_fn, fn); } return GSM_RTP_DURATION; } @@ -183,8 +182,7 @@ { struct osmo_phsap_prim *l1sap; - LOGP(DL1P, LOGL_DEBUG, "%s Rx -> RTP: %s\n", - gsm_lchan_name(lchan), osmo_hexdump(rmsg->data, rmsg->len)); + LOGPLCHAN(lchan, DL1P, LOGL_DEBUG, "Rx -> RTP: %s\n", osmo_hexdump(rmsg->data, rmsg->len)); rmsg->l2h = rmsg->data; rmsg->l1h = msgb_push(rmsg, sizeof(*l1sap)); @@ -530,8 +528,8 @@ return; if (data + 63 > 255) { /* According to 3GPP TS 48.058 ?9.3.37 Timing Offset field cannot exceed 255 */ - LOGP(DL1P, LOGL_ERROR, "Attempting to set invalid Timing Offset value %d (MS TO = %u)!\n", - data, set_ms_to); + LOGPLCHAN(lchan, DL1P, LOGL_ERROR, "Attempting to set invalid Timing Offset value " + "%d (MS TO = %u)!\n", data, set_ms_to); return; } @@ -617,12 +615,10 @@ struct osmo_phsap_prim *l1sap, struct info_act_cnf_param *info_act_cnf) { - struct gsm_lchan *lchan; + struct gsm_lchan *lchan = get_lchan_by_chan_nr(trx, info_act_cnf->chan_nr); - LOGP(DL1C, LOGL_INFO, "activate confirm chan_nr=%s trx=%d\n", - rsl_chan_nr_str(info_act_cnf->chan_nr), trx->nr); - - lchan = get_lchan_by_chan_nr(trx, info_act_cnf->chan_nr); + LOGPLCHAN(lchan, DL1C, LOGL_INFO, "activate confirm chan_nr=%s trx=%d\n", + rsl_chan_nr_str(info_act_cnf->chan_nr), trx->nr); rsl_tx_chan_act_acknack(lchan, info_act_cnf->cause); @@ -642,12 +638,10 @@ struct osmo_phsap_prim *l1sap, struct info_act_cnf_param *info_act_cnf) { - struct gsm_lchan *lchan; + struct gsm_lchan *lchan = get_lchan_by_chan_nr(trx, info_act_cnf->chan_nr); - LOGP(DL1C, LOGL_INFO, "deactivate confirm chan_nr=%s trx=%d\n", - rsl_chan_nr_str(info_act_cnf->chan_nr), trx->nr); - - lchan = get_lchan_by_chan_nr(trx, info_act_cnf->chan_nr); + LOGPLCHAN(lchan, DL1C, LOGL_INFO, "deactivate confirm chan_nr=%s trx=%d\n", + rsl_chan_nr_str(info_act_cnf->chan_nr), trx->nr); rsl_tx_rf_rel_ack(lchan); @@ -894,9 +888,9 @@ * don't support it. */ if(lchan->tch_mode == GSM48_CMODE_SPEECH_AMR && !rtppayload_is_octet_aligned(resp_msg->data, resp_msg->len)) { - LOGP(DL1P, LOGL_NOTICE, - "%s RTP->L1: Dropping unexpected AMR encoding (bw-efficient?) %s\n", - gsm_lchan_name(lchan), osmo_hexdump(resp_msg->data, resp_msg->len)); + LOGPLCHAN(lchan, DL1P, LOGL_NOTICE, + "RTP->L1: Dropping unexpected AMR encoding (bw-efficient?) %s\n", + osmo_hexdump(resp_msg->data, resp_msg->len)); return false; } return true; @@ -1469,8 +1463,8 @@ struct gsm48_chan_desc *cd; int rc; - LOGP(DL1C, LOGL_INFO, "activating channel chan_nr=%s trx=%d\n", - rsl_chan_nr_str(chan_nr), trx->nr); + LOGPLCHAN(lchan, DL1C, LOGL_INFO, "activating channel chan_nr=%s trx=%d\n", + rsl_chan_nr_str(chan_nr), trx->nr); /* osmo-pcu calls this without a valid 'tp' parameter, so we * need to make sure ew don't crash here */ @@ -1483,8 +1477,8 @@ * one one TRX, so we need to make sure not to activate * channels with a different TSC!! */ if (cd->h0.tsc != (lchan->ts->trx->bts->bsic & 7)) { - LOGP(DL1C, LOGL_ERROR, "lchan TSC %u != BSIC-TSC %u\n", - cd->h0.tsc, lchan->ts->trx->bts->bsic & 7); + LOGPLCHAN(lchan, DL1C, LOGL_ERROR, "lchan TSC %u != BSIC-TSC %u\n", + cd->h0.tsc, lchan->ts->trx->bts->bsic & 7); return -RSL_ERR_SERV_OPT_UNIMPL; } } @@ -1517,8 +1511,8 @@ int l1sap_chan_rel(struct gsm_bts_trx *trx, uint8_t chan_nr) { struct gsm_lchan *lchan = get_lchan_by_chan_nr(trx, chan_nr); - LOGP(DL1C, LOGL_INFO, "deactivating channel chan_nr=%s trx=%d\n", - rsl_chan_nr_str(chan_nr), trx->nr); + LOGPLCHAN(lchan, DL1C, LOGL_INFO, "deactivating channel chan_nr=%s trx=%d\n", + rsl_chan_nr_str(chan_nr), trx->nr); if (lchan->tch.dtx.dl_amr_fsm) { osmo_fsm_inst_free(lchan->tch.dtx.dl_amr_fsm); @@ -1533,8 +1527,8 @@ { struct gsm_lchan *lchan = get_lchan_by_chan_nr(trx, chan_nr); - LOGP(DL1C, LOGL_INFO, "deactivating sacch chan_nr=%s trx=%d\n", - rsl_chan_nr_str(chan_nr), trx->nr); + LOGPLCHAN(lchan, DL1C, LOGL_INFO, "deactivating sacch chan_nr=%s trx=%d\n", + rsl_chan_nr_str(chan_nr), trx->nr); lchan->sacch_deact = 1; diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index f936c98..52b0566 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -203,8 +203,8 @@ rc = osmo_amr_rtp_dec(rtp_pl, rtp_pl_len, &cmr, &cmi, &ft, &bfi, &sti); if (rc < 0) { - LOGP(DRTP, LOGL_ERROR, "failed to decode AMR RTP (length %zu, " - "%p)\n", rtp_pl_len, rtp_pl); + LOGPLCHAN(lchan, DRTP, LOGL_ERROR, "failed to decode AMR RTP (length %zu, " + "%p)\n", rtp_pl_len, rtp_pl); return rc; } @@ -274,7 +274,7 @@ } if (ft != AMR_NO_DATA) { - LOGP(DRTP, LOGL_ERROR, "unsupported AMR FT 0x%02x\n", ft); + LOGPLCHAN(lchan, DRTP, LOGL_ERROR, "unsupported AMR FT 0x%02x\n", ft); return -ENOTSUP; } @@ -505,9 +505,9 @@ return lchan->tch.dtx.len + 1; } - LOGP(DL1C, LOGL_DEBUG, "Have to send %s frame on TCH but SID buffer " - "is empty - sent nothing\n", - get_value_string(gsm48_chan_mode_names, lchan->tch_mode)); + LOGPLCHAN(lchan, DL1C, LOGL_DEBUG, "Have to send %s frame on TCH but SID buffer " + "is empty - sent nothing\n", + get_value_string(gsm48_chan_mode_names, lchan->tch_mode)); return 0; } diff --git a/src/common/oml.c b/src/common/oml.c index c91d271..7bc7514 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -527,9 +527,8 @@ return -1; } - DEBUGP(DLLAPD, "%s: Setting T200 D0=%u, D3=%u, S0=%u, S3=%u" - "(all in ms)\n", gsm_lchan_name(lchan), t200_dcch, - t200_dcch_sapi3, t200_acch, t200_acch_sapi3); + LOGPLCHAN(lchan, DLLAPD, LOGL_DEBUG, "Setting T200 D0=%u, D3=%u, S0=%u, S3=%u (all in ms)\n", + t200_dcch, t200_dcch_sapi3, t200_acch, t200_acch_sapi3); dl_set_t200(&lc->lapdm_dcch.datalink[DL_SAPI0], t200_dcch); dl_set_t200(&lc->lapdm_dcch.datalink[DL_SAPI3], t200_dcch_sapi3); diff --git a/src/common/rsl.c b/src/common/rsl.c index 364e829..b9c0610 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -695,8 +695,7 @@ switch (lchan->ts->pchan) { case GSM_PCHAN_TCH_F_TCH_H_PDCH: if (lchan->ts->dyn.pchan_is != GSM_PCHAN_PDCH) { - LOGP(DRSL, LOGL_ERROR, - "%s (ss=%d) PDCH release: not in PDCH mode\n", + LOGP(DRSL, LOGL_ERROR, "%s (ss=%d) PDCH release: not in PDCH mode\n", gsm_ts_and_pchan_name(lchan->ts), lchan->nr); /* well, what to do about it ... carry on and hope it's fine. */ } @@ -712,8 +711,8 @@ send_rel_ack = false; break; default: - LOGP(DRSL, LOGL_ERROR, "%s PCU rel ack for unexpected lchan kind %s\n", - gsm_lchan_name(lchan), gsm_pchan_name(lchan->rel_act_kind)); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "PCU rel ack for unexpected lchan kind %s\n", + gsm_pchan_name(lchan->rel_act_kind)); /* Release certainly was not requested by the BSC via RSL, so don't ack. */ send_rel_ack = false; break; @@ -728,8 +727,7 @@ } if (!send_rel_ack) { - LOGP(DRSL, LOGL_NOTICE, "%s not sending REL ACK\n", - gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "%s not sending REL ACK\n", gsm_lchan_name(lchan)); return 0; } @@ -779,7 +777,7 @@ struct msgb *msg; uint8_t chan_nr = gsm_lchan2chan_nr(lchan); - LOGP(DRSL, LOGL_INFO, "Sending HANDOver DETect\n"); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, "Sending HANDOver DETect\n"); msg = rsl_msgb_alloc(sizeof(struct abis_rsl_dchan_hdr)); if (!msg) @@ -826,8 +824,8 @@ int rsl_tx_chan_act_acknack(struct gsm_lchan *lchan, uint8_t cause) { if (lchan->rel_act_kind != LCHAN_REL_ACT_RSL) { - LOGP(DRSL, LOGL_NOTICE, "%s not sending CHAN ACT %s\n", - gsm_lchan_name(lchan), cause ? "NACK" : "ACK"); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "not sending CHAN ACT %s\n", + cause ? "NACK" : "ACK"); return 0; } @@ -842,9 +840,7 @@ struct msgb *msg; uint8_t chan_nr = gsm_lchan2chan_nr(lchan); - LOGP(DRSL, LOGL_NOTICE, - "%s Sending Connection Failure: cause = 0x%02x\n", - gsm_lchan_name(lchan), cause); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "Sending Connection Failure: cause = 0x%02x\n", cause); msg = rsl_msgb_alloc(sizeof(struct abis_rsl_dchan_hdr)); if (!msg) @@ -920,15 +916,13 @@ /* check if the encryption algorithm sent by BSC is supported! */ rc = bts_supports_cipher(bts, *val); if (rc != 1) { - LOGP(DRSL, LOGL_ERROR, "%s: BTS doesn't support cipher %s\n", - gsm_lchan_name(lchan), ciph_name); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "BTS doesn't support cipher %s\n", ciph_name); return -EINVAL; } /* length can be '1' in case of no ciphering */ if (len < 1) { - LOGP(DRSL, LOGL_ERROR, "%s: Encryption Info cannot have len=%d\n", - gsm_lchan_name(lchan), len); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "Encryption Info cannot have len=%d\n", len); return -EINVAL; } @@ -937,8 +931,7 @@ if (lchan->encr.key_len > sizeof(lchan->encr.key)) lchan->encr.key_len = sizeof(lchan->encr.key); memcpy(lchan->encr.key, val, lchan->encr.key_len); - DEBUGP(DRSL, "%s: Setting lchan cipher algorithm %s\n", - gsm_lchan_name(lchan), ciph_name); + LOGPLCHAN(lchan, DRSL, LOGL_DEBUG, "Setting lchan cipher algorithm %s\n", ciph_name); return 0; } @@ -1026,9 +1019,8 @@ int rc; if (lchan->state != LCHAN_S_NONE) { - LOGP(DRSL, LOGL_ERROR, - "%s: error: lchan is not available, but in state: %s.\n", - gsm_lchan_name(lchan), gsm_lchans_name(lchan->state)); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "error: lchan is not available, but in state: %s.\n", + gsm_lchans_name(lchan->state)); return rsl_tx_chan_act_nack(lchan, RSL_ERR_EQUIPMENT_FAIL); } @@ -1050,8 +1042,8 @@ } } - LOGP(DRSL, LOGL_DEBUG, "%s: rx Channel Activation in state: %s.\n", - gsm_lchan_name(lchan), gsm_lchans_name(lchan->state)); + LOGPLCHAN(lchan, DRSL, LOGL_DEBUG, "rx Channel Activation in state: %s.\n", + gsm_lchans_name(lchan->state)); /* Initialize channel defaults */ lchan->ms_power = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0); @@ -1062,7 +1054,7 @@ /* 9.3.3 Activation Type */ if (!TLVP_PRESENT(&tp, RSL_IE_ACT_TYPE)) { - LOGP(DRSL, LOGL_NOTICE, "missing Activation Type\n"); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "missing Activation Type\n"); return rsl_tx_chan_act_nack(lchan, RSL_ERR_MAND_IE_ERROR); } type = *TLVP_VAL(&tp, RSL_IE_ACT_TYPE); @@ -1070,7 +1062,7 @@ /* 9.3.6 Channel Mode */ if (type != RSL_ACT_OSMO_PDCH) { if (!TLVP_PRESENT(&tp, RSL_IE_CHAN_MODE)) { - LOGP(DRSL, LOGL_NOTICE, "missing Channel Mode\n"); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "missing Channel Mode\n"); return rsl_tx_chan_act_nack(lchan, RSL_ERR_MAND_IE_ERROR); } cm = (struct rsl_ie_chan_mode *) TLVP_VAL(&tp, RSL_IE_CHAN_MODE); @@ -1134,7 +1126,7 @@ osmo_si = osmo_rsl2sitype(rsl_si); if (osmo_si == SYSINFO_TYPE_NONE) { - LOGP(DRSL, LOGL_NOTICE, " Rx SACCH SI 0x%02x not supported.\n", rsl_si); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "Rx SACCH SI 0x%02x not supported.\n", rsl_si); rsl_tx_error_report(msg->trx, RSL_ERR_IE_CONTENT, &dch->chan_nr, NULL, msg); return rsl_tx_chan_act_acknack(lchan, RSL_ERR_IE_CONTENT); @@ -1144,7 +1136,7 @@ cur += si_len; if (cur > val + tot_len) { - LOGP(DRSL, LOGL_ERROR, "Error parsing SACCH INFO IE\n"); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "Error parsing SACCH INFO IE\n"); rsl_tx_error_report(msg->trx, RSL_ERR_IE_CONTENT, &dch->chan_nr, NULL, msg); return rsl_tx_chan_act_acknack(lchan, RSL_ERR_IE_CONTENT); @@ -1157,7 +1149,7 @@ /* 9.3.52 MultiRate Configuration */ if (TLVP_PRESENT(&tp, RSL_IE_MR_CONFIG)) { if (TLVP_LEN(&tp, RSL_IE_MR_CONFIG) > sizeof(lchan->mr_bts_lv) - 1) { - LOGP(DRSL, LOGL_ERROR, "Error parsing MultiRate conf IE\n"); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "Error parsing MultiRate conf IE\n"); rsl_tx_error_report(msg->trx, RSL_ERR_IE_CONTENT, &dch->chan_nr, NULL, msg); return rsl_tx_chan_act_acknack(lchan, RSL_ERR_IE_CONTENT); } @@ -1172,9 +1164,8 @@ /* 9.3.53 MultiRate Control */ /* 9.3.54 Supported Codec Types */ - LOGP(DRSL, LOGL_INFO, "%s: chan_nr=%s type=0x%02x mode=%s\n", - gsm_lchan_name(lchan), rsl_chan_nr_str(dch->chan_nr), type, - gsm48_chan_mode_name(lchan->tch_mode)); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, "chan_nr=%s type=0x%02x mode=%s\n", + rsl_chan_nr_str(dch->chan_nr), type, gsm48_chan_mode_name(lchan->tch_mode)); /* Connecting PDCH on dyn TS goes via PCU instead. */ if (ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH @@ -1362,9 +1353,8 @@ struct ciph_mod_compl *cmc = data; const char *imeisv = NULL; - LOGP(DRSL, LOGL_NOTICE, - "%s Sending FAKE CIPHERING MODE COMPLETE to BSC (Alg %u)\n", - gsm_lchan_name(cmc->lchan), cmc->lchan->encr.alg_id); + LOGPLCHAN(cmc->lchan, DRSL, LOGL_NOTICE, "Sending FAKE CIPHERING MODE COMPLETE to BSC (Alg %u)\n", + cmc->lchan->encr.alg_id); if (cmc->send_imeisv) imeisv = "0123456789012345"; @@ -1440,8 +1430,7 @@ } else #endif { - LOGP(DRSL, LOGL_INFO, "%s Fwd RSL ENCR CMD (Alg %u) to LAPDm\n", - gsm_lchan_name(lchan), lchan->encr.alg_id); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, "Fwd RSL ENCR CMD (Alg %u) to LAPDm\n", lchan->encr.alg_id); /* hand it into RSLms for transmission of L3_INFO to the MS */ lapdm_rslms_recvmsg(msg, &lchan->lapdm_ch); /* return 1 to make sure the msgb is not free'd */ @@ -1487,7 +1476,7 @@ struct msgb *msg; uint8_t chan_nr = gsm_lchan2chan_nr(lchan); - LOGP(DRSL, LOGL_INFO, "%s Tx MODE MODIF ACK\n", gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, "Tx MODE MODIF ACK\n"); msg = rsl_msgb_alloc(sizeof(struct abis_rsl_dchan_hdr)); if (!msg) @@ -1511,17 +1500,15 @@ /* 9.3.6 Channel Mode */ if (!TLVP_PRESENT(&tp, RSL_IE_CHAN_MODE)) { - LOGP(DRSL, LOGL_NOTICE, "missing Channel Mode\n"); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "missing Channel Mode\n"); return rsl_tx_mode_modif_nack(lchan, RSL_ERR_MAND_IE_ERROR); } cm = (struct rsl_ie_chan_mode *) TLVP_VAL(&tp, RSL_IE_CHAN_MODE); lchan_tchmode_from_cmode(lchan, cm); if (bts_supports_cm(lchan->ts->trx->bts, ts_pchan(lchan->ts), lchan->tch_mode) != 1) { - LOGP(DRSL, LOGL_ERROR, - "%s %s: invalid mode: %s (wrong BSC configuration?)\n", - gsm_ts_and_pchan_name(lchan->ts), gsm_lchan_name(lchan), - gsm48_chan_mode_name(lchan->tch_mode)); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "%s: invalid mode: %s (wrong BSC configuration?)\n", + gsm_ts_and_pchan_name(lchan->ts), gsm48_chan_mode_name(lchan->tch_mode)); return rsl_tx_mode_modif_nack(lchan, RSL_ERR_SERV_OPT_UNAVAIL); } @@ -1541,7 +1528,7 @@ /* 9.3.52 MultiRate Configuration */ if (TLVP_PRESENT(&tp, RSL_IE_MR_CONFIG)) { if (TLVP_LEN(&tp, RSL_IE_MR_CONFIG) > sizeof(lchan->mr_bts_lv) - 1) { - LOGP(DRSL, LOGL_ERROR, "Error parsing MultiRate conf IE\n"); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "Error parsing MultiRate conf IE\n"); rsl_tx_error_report(msg->trx, RSL_ERR_IE_CONTENT, &dch->chan_nr, NULL, msg); return rsl_tx_mode_modif_nack(lchan, RSL_ERR_IE_CONTENT);; } @@ -1576,8 +1563,7 @@ lchan->ms_power_ctrl.fixed = 1; lchan->ms_power_ctrl.current = pwr; - LOGP(DRSL, LOGL_NOTICE, "%s forcing power to %d\n", - gsm_lchan_name(lchan), lchan->ms_power_ctrl.current); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "forcing power to %d\n", lchan->ms_power_ctrl.current); bts_model_adjst_ms_pwr(lchan); } @@ -1596,7 +1582,7 @@ rsl_tlv_parse(&tp, msgb_l3(msg), msgb_l3len(msg)); if (TLVP_PRESENT(&tp, RSL_IE_STARTNG_TIME)) { - LOGP(DRSL, LOGL_NOTICE, "Starting time not supported\n"); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "Starting time not supported\n"); return rsl_tx_error_report(msg->trx, RSL_ERR_SERV_OPT_UNIMPL, &dch->chan_nr, NULL, msg); } @@ -1610,8 +1596,7 @@ osmo_si = osmo_rsl2sitype(rsl_si); if (osmo_si == SYSINFO_TYPE_NONE) { - LOGP(DRSL, LOGL_NOTICE, "%s Rx SACCH SI 0x%02x not supported.\n", - gsm_lchan_name(lchan), rsl_si); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "Rx SACCH SI 0x%02x not supported.\n", rsl_si); return rsl_tx_error_report(msg->trx, RSL_ERR_IE_CONTENT, &dch->chan_nr, NULL, msg); } if (TLVP_PRESENT(&tp, RSL_IE_L3_INFO)) { @@ -1623,14 +1608,12 @@ else lchan->si.overridden &= ~(1 << osmo_si); - LOGP(DRSL, LOGL_INFO, "%s Rx RSL SACCH FILLING (SI%s)\n", - gsm_lchan_name(lchan), - get_value_string(osmo_sitype_strs, osmo_si)); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, "Rx RSL SACCH FILLING (SI%s)\n", + get_value_string(osmo_sitype_strs, osmo_si)); } else { lchan->si.valid &= ~(1 << osmo_si); - LOGP(DRSL, LOGL_INFO, "%s Rx RSL Disabling SACCH FILLING (SI%s)\n", - gsm_lchan_name(lchan), - get_value_string(osmo_sitype_strs, osmo_si)); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, "Rx RSL Disabling SACCH FILLING (SI%s)\n", + get_value_string(osmo_sitype_strs, osmo_si)); } return 0; @@ -1674,8 +1657,8 @@ { struct msgb *nmsg; - LOGP(DRSL, LOGL_NOTICE, "%s Sending RTP delete indication: cause = %s\n", - gsm_lchan_name(lchan), rsl_err_name(cause)); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "Sending RTP delete indication: cause = %s\n", + rsl_err_name(cause)); nmsg = rsl_msgb_alloc(sizeof(struct abis_rsl_dchan_hdr)); if (!nmsg) @@ -1706,9 +1689,8 @@ name = "MDCX"; ia.s_addr = htonl(lchan->abis_ip.bound_ip); - LOGP(DRSL, LOGL_INFO, "%s RSL Tx IPAC_%s_ACK (local %s:%u, ", - gsm_lchan_name(lchan), name, - inet_ntoa(ia), lchan->abis_ip.bound_port); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, "RSL Tx IPAC_%s_ACK (local %s:%u, ", + name, inet_ntoa(ia), lchan->abis_ip.bound_port); ia.s_addr = htonl(lchan->abis_ip.connect_ip); LOGPC(DRSL, LOGL_INFO, "remote %s:%u)\n", inet_ntoa(ia), lchan->abis_ip.connect_port); @@ -1747,8 +1729,7 @@ struct msgb *msg; uint8_t chan_nr = gsm_lchan2chan_nr(lchan); - LOGP(DRSL, LOGL_INFO, "%s RSL Tx IPAC_DLCX_ACK\n", - gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, "RSL Tx IPAC_DLCX_ACK\n"); msg = rsl_msgb_alloc(sizeof(struct abis_rsl_dchan_hdr)); if (!msg) @@ -1771,8 +1752,7 @@ struct msgb *msg; uint8_t chan_nr = gsm_lchan2chan_nr(lchan); - LOGP(DRSL, LOGL_INFO, "%s RSL Tx IPAC_DLCX_NACK\n", - gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, "RSL Tx IPAC_DLCX_NACK\n"); msg = rsl_msgb_alloc(sizeof(struct abis_rsl_dchan_hdr)); if (!msg) @@ -1799,8 +1779,7 @@ uint8_t chan_nr = gsm_lchan2chan_nr(lchan); /* FIXME: allocate new msgb and copy old over */ - LOGP(DRSL, LOGL_NOTICE, "%s RSL Tx IPAC_BIND_NACK\n", - gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "RSL Tx IPAC_BIND_NACK\n"); msg = rsl_msgb_alloc(sizeof(struct abis_rsl_dchan_hdr)); if (!msg) @@ -1900,7 +1879,7 @@ return tx_ipac_XXcx_nack(lchan, RSL_ERR_MAND_IE_ERROR, 0, dch->c.msg_type); - LOGP(DRSL, LOGL_DEBUG, "%s IPAC_%s: ", gsm_lchan_name(lchan), name); + LOGPLCHAN(lchan, DRSL, LOGL_DEBUG, "IPAC_%s: ", name); if (TLVP_PRES_LEN(&tp, RSL_IE_IPAC_REMOTE_IP, 4)) { connect_ip = tlvp_val32_unal(&tp, RSL_IE_IPAC_REMOTE_IP); addr.s_addr = connect_ip; @@ -1929,9 +1908,8 @@ inc_ip_port = 1; if (payload_type && payload_type2) { - LOGP(DRSL, LOGL_ERROR, "%s Rx RSL IPAC %s, " - "RTP_PT and RTP_PT2 in same msg !?!\n", - gsm_lchan_name(lchan), name); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "Rx RSL IPAC %s, " + "RTP_PT and RTP_PT2 in same msg !?!\n", name); return tx_ipac_XXcx_nack(lchan, RSL_ERR_MAND_IE_ERROR, inc_ip_port, dch->c.msg_type); } @@ -1940,9 +1918,8 @@ char cname[32]; char *ipstr = NULL; if (lchan->abis_ip.rtp_socket) { - LOGP(DRSL, LOGL_ERROR, "%s Rx RSL IPAC CRCX, " - "but we already have socket!\n", - gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "Rx RSL IPAC CRCX, " + "but we already have socket!\n"); return tx_ipac_XXcx_nack(lchan, RSL_ERR_RES_UNAVAIL, inc_ip_port, dch->c.msg_type); } @@ -1952,9 +1929,7 @@ lchan->abis_ip.rtp_socket = osmo_rtp_socket_create(lchan->ts->trx, OSMO_RTP_F_POLL); if (!lchan->abis_ip.rtp_socket) { - LOGP(DRTP, LOGL_ERROR, - "%s IPAC Failed to create RTP/RTCP sockets\n", - gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DRTP, LOGL_ERROR, "IPAC Failed to create RTP/RTCP sockets\n"); oml_tx_failure_event_rep(&lchan->ts->trx->mo, OSMO_EVT_CRIT_RTP_TOUT, "%s IPAC Failed to create RTP/RTCP sockets", @@ -1968,13 +1943,10 @@ OSMO_RTP_P_JITBUF, bts->rtp_jitter_buf_ms); if (rc < 0) - LOGP(DRTP, LOGL_ERROR, - "%s IPAC Failed to set RTP socket parameters: %s\n", - gsm_lchan_name(lchan), strerror(-rc)); + LOGPLCHAN(lchan, DRTP, LOGL_ERROR, + "IPAC Failed to set RTP socket parameters: %s\n", strerror(-rc)); else - LOGP(DRTP, LOGL_INFO, - "%s IPAC set RTP socket parameters: %d\n", - gsm_lchan_name(lchan), rc); + LOGPLCHAN(lchan, DRTP, LOGL_INFO, "IPAC set RTP socket parameters: %d\n", rc); lchan->abis_ip.rtp_socket->priv = lchan; lchan->abis_ip.rtp_socket->rx_cb = &l1sap_rtp_rx_cb; @@ -1994,9 +1966,7 @@ } rc = bind_rtp(bts, lchan->abis_ip.rtp_socket, ipstr); if (rc < 0) { - LOGP(DRTP, LOGL_ERROR, - "%s IPAC Failed to bind RTP/RTCP sockets\n", - gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DRTP, LOGL_ERROR, "IPAC Failed to bind RTP/RTCP sockets\n"); oml_tx_failure_event_rep(&lchan->ts->trx->mo, OSMO_EVT_CRIT_RTP_TOUT, "%s IPAC Failed to bind RTP/RTCP sockets", @@ -2017,9 +1987,8 @@ } else { /* MDCX */ if (!lchan->abis_ip.rtp_socket) { - LOGP(DRSL, LOGL_ERROR, "%s Rx RSL IPAC MDCX, " - "but we have no RTP socket!\n", - gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "Rx RSL IPAC MDCX, " + "but we have no RTP socket!\n"); return tx_ipac_XXcx_nack(lchan, RSL_ERR_RES_UNAVAIL, inc_ip_port, dch->c.msg_type); } @@ -2038,9 +2007,7 @@ rc = osmo_rtp_socket_connect(lchan->abis_ip.rtp_socket, inet_ntoa(ia), ntohs(connect_port)); if (rc < 0) { - LOGP(DRTP, LOGL_ERROR, - "%s Failed to connect RTP/RTCP sockets\n", - gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DRTP, LOGL_ERROR, "Failed to connect RTP/RTCP sockets\n"); osmo_rtp_socket_free(lchan->abis_ip.rtp_socket); lchan->abis_ip.rtp_socket = NULL; msgb_queue_flush(&lchan->dl_tch_queue); @@ -2055,9 +2022,7 @@ &lchan->abis_ip.bound_ip, &port); if (rc < 0) - LOGP(DRTP, LOGL_ERROR, "%s IPAC cannot obtain " - "locally bound IP/port: %d\n", - gsm_lchan_name(lchan), rc); + LOGPLCHAN(lchan, DRTP, LOGL_ERROR, "IPAC cannot obtain locally bound IP/port: %d\n", rc); lchan->abis_ip.bound_port = port; /* Everything has succeeded, we can store new values in lchan */ @@ -2119,8 +2084,7 @@ struct msgb *msg; uint8_t ie[2]; - LOGP(DRSL, LOGL_NOTICE, "%s Tx PDCH %s ACK\n", - gsm_lchan_name(lchan), pdch_act? "ACT" : "DEACT"); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "Tx PDCH %s ACK\n", pdch_act? "ACT" : "DEACT"); msg = rsl_msgb_alloc(sizeof(struct abis_rsl_dchan_hdr)); if (!msg) @@ -2147,8 +2111,8 @@ struct msgb *msg; uint8_t chan_nr = gsm_lchan2chan_nr(lchan); - LOGP(DRSL, LOGL_NOTICE, "%s Tx PDCH %s NACK (cause = 0x%02x)\n", - gsm_lchan_name(lchan), pdch_act? "ACT" : "DEACT", cause); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "Tx PDCH %s NACK (cause = 0x%02x)\n", + pdch_act ? "ACT" : "DEACT", cause); msg = rsl_msgb_alloc(sizeof(struct abis_rsl_dchan_hdr)); if (!msg) @@ -2210,11 +2174,11 @@ if (ts->flags & TS_F_PDCH_PENDING_MASK) { /* Only one of the pending flags should ever be set at the same * time, but just log both in case both should be set. */ - LOGP(DRSL, LOGL_ERROR, - "%s Request to PDCH %s, but PDCH%s%s is still pending\n", - gsm_lchan_name(lchan), pdch_act? "ACT" : "DEACT", - (ts->flags & TS_F_PDCH_ACT_PENDING)? " ACT" : "", - (ts->flags & TS_F_PDCH_DEACT_PENDING)? " DEACT" : ""); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, + "Request to PDCH %s, but PDCH%s%s is still pending\n", + pdch_act? "ACT" : "DEACT", + (ts->flags & TS_F_PDCH_ACT_PENDING)? " ACT" : "", + (ts->flags & TS_F_PDCH_DEACT_PENDING)? " DEACT" : ""); rsl_tx_dyn_pdch_nack(lchan, pdch_act, RSL_ERR_NORMAL_UNSPEC); return; } @@ -2237,18 +2201,16 @@ /* ensure that this is indeed a dynamic-PDCH channel */ if (ts->pchan != GSM_PCHAN_TCH_F_PDCH) { - LOGP(DRSL, LOGL_ERROR, - "%s Attempt to PDCH %s on TS that is not a TCH/F_PDCH (is %s)\n", - gsm_lchan_name(lchan), pdch_act? "ACT" : "DEACT", - gsm_pchan_name(ts->pchan)); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, + "Attempt to PDCH %s on TS that is not a TCH/F_PDCH (is %s)\n", + pdch_act? "ACT" : "DEACT", gsm_pchan_name(ts->pchan)); ipacc_dyn_pdch_complete(ts, -EINVAL); return; } if (is_pdch_act == pdch_act) { - LOGP(DL1C, LOGL_NOTICE, - "%s Request to PDCH %s, but is already so\n", - gsm_lchan_name(lchan), pdch_act? "ACT" : "DEACT"); + LOGPLCHAN(lchan, DL1C, LOGL_NOTICE, "Request to PDCH %s, but is already so\n", + pdch_act? "ACT" : "DEACT"); ipacc_dyn_pdch_complete(ts, 0); return; } @@ -2564,8 +2526,8 @@ lchan = lchan_lookup(trx, rh->chan_nr, "RSL rx RLL: "); if (!lchan) { - LOGP(DRLL, LOGL_NOTICE, "Rx RLL %s for unknown lchan\n", - rsl_msg_name(rh->c.msg_type)); + LOGPLCHAN(lchan, DRLL, LOGL_NOTICE, "Rx RLL %s for unknown lchan\n", + rsl_msg_name(rh->c.msg_type)); return rsl_reject_unknown_lchan(msg); } @@ -2691,9 +2653,8 @@ int res_valid = lchan->meas.flags & LC_UL_M_F_RES_VALID; struct gsm_bts *bts = lchan->ts->trx->bts; - LOGP(DRSL, LOGL_DEBUG, - "%s chan_num:%u Tx MEAS RES valid(%d), flags(%02x)\n", - gsm_lchan_name(lchan), chan_nr, res_valid, lchan->meas.flags); + LOGPLCHAN(lchan, DRSL, LOGL_DEBUG, "chan_num:%u Tx MEAS RES valid(%d), flags(%02x)\n", + chan_nr, res_valid, lchan->meas.flags); if (!res_valid) return -EINPROGRESS; @@ -2702,9 +2663,8 @@ if (!msg) return -ENOMEM; - LOGP(DRSL, LOGL_DEBUG, - "%s Send Meas RES: NUM:%u, RXLEV_FULL:%u, RXLEV_SUB:%u, RXQUAL_FULL:%u, RXQUAL_SUB:%u, MS_PWR:%u, UL_TA:%u, L3_LEN:%d, TimingOff:%u\n", - gsm_lchan_name(lchan), + LOGPLCHAN(lchan, DRSL, LOGL_DEBUG, + "Send Meas RES: NUM:%u, RXLEV_FULL:%u, RXLEV_SUB:%u, RXQUAL_FULL:%u, RXQUAL_SUB:%u, MS_PWR:%u, UL_TA:%u, L3_LEN:%d, TimingOff:%u\n", lchan->meas.res_nr, lchan->meas.ul_res.full.rx_lev, lchan->meas.ul_res.sub.rx_lev, @@ -2768,9 +2728,8 @@ rh = msgb_l2(msg); if (lchan->state != LCHAN_S_ACTIVE) { - LOGP(DRSL, LOGL_ERROR, "%s(%s) is not active. Dropping message (len=%u): %s\n", - gsm_lchan_name(lchan), gsm_lchans_name(lchan->state), - msgb_l2len(msg), msgb_hexdump_l2(msg)); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "(%s) is not active. Dropping message (len=%u): %s\n", + gsm_lchans_name(lchan->state), msgb_l2len(msg), msgb_hexdump_l2(msg)); msgb_free(msg); return 0; } @@ -2783,19 +2742,20 @@ if (rslms_is_meas_rep(msg)) { int rc; - LOGP(DRSL, LOGL_INFO, "%s Handing RLL msg %s from LAPDm to MEAS REP\n", - gsm_lchan_name(lchan), rsl_msg_name(rh->msg_type)); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, "Handing RLL msg %s from LAPDm to MEAS REP\n", + rsl_msg_name(rh->msg_type)); /* REL_IND handling */ if (rh->msg_type == RSL_MT_REL_IND && (lchan->type == GSM_LCHAN_TCH_F || lchan->type == GSM_LCHAN_TCH_H)) { - LOGP(DRSL, LOGL_INFO, "%s Scheduling %s to L3 in next associated TCH-RTS.ind\n", - gsm_lchan_name(lchan), - rsl_msg_name(rh->msg_type)); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, + "Scheduling %s to L3 in next associated TCH-RTS.ind\n", + rsl_msg_name(rh->msg_type)); if(lchan->pending_rel_ind_msg) { - LOGP(DRSL, LOGL_INFO, "Dropping pending release indication message\n"); - msgb_free(lchan->pending_rel_ind_msg); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, + "Dropping pending release indication message\n"); + msgb_free(lchan->pending_rel_ind_msg); } lchan->pending_rel_ind_msg = msg; @@ -2808,8 +2768,8 @@ } else if (rslms_is_gprs_susp_req(msg)) { return handle_gprs_susp_req(msg); } else { - LOGP(DRSL, LOGL_INFO, "%s Fwd RLL msg %s from LAPDm to A-bis\n", - gsm_lchan_name(lchan), rsl_msg_name(rh->msg_type)); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, "Fwd RLL msg %s from LAPDm to A-bis\n", + rsl_msg_name(rh->msg_type)); return abis_bts_rsl_sendmsg(msg); } @@ -2842,8 +2802,7 @@ return rsl_reject_unknown_lchan(msg); } - LOGP(DRSL, LOGL_INFO, "%s Rx RSL %s\n", gsm_lchan_name(msg->lchan), - rsl_msg_name(cch->c.msg_type)); + LOGPLCHAN(msg->lchan, DRSL, LOGL_INFO, "Rx RSL %s\n", rsl_msg_name(cch->c.msg_type)); switch (cch->c.msg_type) { case RSL_MT_BCCH_INFO: @@ -2860,13 +2819,13 @@ break; case RSL_MT_SMS_BC_REQ: case RSL_MT_NOT_CMD: - LOGP(DRSL, LOGL_NOTICE, "unimplemented RSL cchan msg_type %s\n", - rsl_msg_name(cch->c.msg_type)); + LOGPLCHAN(msg->lchan, DRSL, LOGL_NOTICE, "unimplemented RSL cchan msg_type %s\n", + rsl_msg_name(cch->c.msg_type)); rsl_tx_error_report(trx, RSL_ERR_MSG_TYPE, &cch->chan_nr, NULL, msg); break; default: - LOGP(DRSL, LOGL_NOTICE, "undefined RSL cchan msg_type 0x%02x\n", - cch->c.msg_type); + LOGPLCHAN(msg->lchan, DRSL, LOGL_NOTICE, "undefined RSL cchan msg_type 0x%02x\n", + cch->c.msg_type); rsl_tx_error_report(trx, RSL_ERR_MSG_TYPE, &cch->chan_nr, NULL, msg); ret = -EINVAL; break; @@ -2937,13 +2896,13 @@ case RSL_MT_PRE_HANDO_NOTIF: case RSL_MT_MR_CODEC_MOD_REQ: case RSL_MT_TFO_MOD_REQ: - LOGP(DRSL, LOGL_NOTICE, "unimplemented RSL dchan msg_type %s\n", - rsl_msg_name(dch->c.msg_type)); + LOGPLCHAN(msg->lchan, DRSL, LOGL_NOTICE, "unimplemented RSL dchan msg_type %s\n", + rsl_msg_name(dch->c.msg_type)); rsl_tx_error_report(trx, RSL_ERR_MSG_TYPE, &dch->chan_nr, NULL, msg); break; default: - LOGP(DRSL, LOGL_NOTICE, "undefined RSL dchan msg_type 0x%02x\n", - dch->c.msg_type); + LOGPLCHAN(msg->lchan, DRSL, LOGL_NOTICE, "undefined RSL dchan msg_type 0x%02x\n", + dch->c.msg_type); rsl_tx_error_report(trx, RSL_ERR_MSG_TYPE, &dch->chan_nr, NULL, msg); ret = -EINVAL; } @@ -3007,8 +2966,7 @@ return rsl_reject_unknown_lchan(msg); } - LOGP(DRSL, LOGL_INFO, "%s Rx RSL %s\n", gsm_lchan_name(msg->lchan), - rsl_ipac_msg_name(dch->c.msg_type)); + LOGPLCHAN(msg->lchan, DRSL, LOGL_INFO, "Rx RSL %s\n", rsl_ipac_msg_name(dch->c.msg_type)); switch (dch->c.msg_type) { case RSL_MT_IPAC_CRCX: @@ -3019,8 +2977,8 @@ ret = rsl_rx_ipac_dlcx(msg); break; default: - LOGP(DRSL, LOGL_NOTICE, "unsupported RSL ip.access msg_type 0x%02x\n", - dch->c.msg_type); + LOGPLCHAN(msg->lchan, DRSL, LOGL_NOTICE, "unsupported RSL ip.access msg_type 0x%02x\n", + dch->c.msg_type); rsl_tx_error_report(trx, RSL_ERR_MSG_TYPE, &dch->chan_nr, NULL, msg); ret = -EINVAL; } diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c index 5c66e08..e4a05c8 100644 --- a/src/common/sysinfo.c +++ b/src/common/sysinfo.c @@ -172,6 +172,6 @@ lchan->si.last = tmp; return GSM_LCHAN_SI(lchan, tmp); } - LOGP(DL1P, LOGL_NOTICE, "%s SACCH no SI available\n", gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DL1P, LOGL_NOTICE, "SACCH no SI available\n"); return NULL; } -- To view, visit https://gerrit.osmocom.org/14111 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I6913ac8fb543811126b85a54118333155c03bc03 Gerrit-Change-Number: 14111 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 00:42:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 00:42:18 +0000 Subject: Change in osmo-bts[master]: cbch: Keep SMSCB queue length counter Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14112 Change subject: cbch: Keep SMSCB queue length counter ...................................................................... cbch: Keep SMSCB queue length counter This avoids having to iterate the list to count the number of elements. Change-Id: I72c47affeb87c9b898bc2290dc7ed113945f1805 --- M include/osmo-bts/gsm_data_shared.h M src/common/cbch.c M src/common/vty.c 3 files changed, 6 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/12/14112/1 diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index 9378730..860c296 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -541,6 +541,7 @@ struct bts_smscb_state { struct llist_head queue; /* list of struct smscb_msg */ + int queue_len; struct smscb_msg *cur_msg; /* current SMS-CB */ struct smscb_msg *default_msg; /* default broadcast message; NULL if none */ }; diff --git a/src/common/cbch.c b/src/common/cbch.c index 6092e46..2107f11 100644 --- a/src/common/cbch.c +++ b/src/common/cbch.c @@ -183,6 +183,7 @@ case RSL_CB_CMD_TYPE_NULL: /* def_bcast is ignored as per Section 9.3.41 of 3GPP TS 48.058 */ llist_add_tail(&scm->list, &bts_ss->queue); + bts_ss->queue_len++; /* FIXME: limit queue size and optionally send CBCH LOAD Information (overflow) via RSL */ break; case RSL_CB_CMD_TYPE_DEFAULT: @@ -215,6 +216,7 @@ msg = llist_first_entry_or_null(&bts_ss->queue, struct smscb_msg, list); if (msg) { llist_del(&msg->list); + bts_ss->queue_len--; DEBUGP(DLSMS, "%s: Dequeued msg\n", __func__); return msg; } diff --git a/src/common/vty.c b/src/common/vty.c index 53a8674..fab5516 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -803,17 +803,6 @@ abis_nm_avail_name(nms->availability), VTY_NEWLINE); } -static unsigned int llist_length(struct llist_head *list) -{ - unsigned int len = 0; - struct llist_head *pos; - - llist_for_each(pos, list) - len++; - - return len; -} - static void bts_dump_vty_features(struct vty *vty, struct gsm_bts *bts) { unsigned int i; @@ -865,10 +854,10 @@ bts->agch_queue.rejected_msgs, bts->agch_queue.agch_msgs, bts->agch_queue.pch_msgs, VTY_NEWLINE); - vty_out(vty, " CBCH backlog queue length (BASIC): %u%s", - llist_length(&bts->smscb_basic.queue), VTY_NEWLINE); + vty_out(vty, " CBCH backlog queue length (BASIC): %d%s", + bts->smscb_basic.queue_len, VTY_NEWLINE); vty_out(vty, " CBCH backlog queue length (EXTENDED): %u%s", - llist_length(&bts->smscb_extended.queue), VTY_NEWLINE); + bts->smscb_extended.queue_len, VTY_NEWLINE); vty_out(vty, " Paging: queue length %d, buffer space %d%s", paging_queue_length(bts->paging_state), paging_buffer_space(bts->paging_state), VTY_NEWLINE); -- To view, visit https://gerrit.osmocom.org/14112 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I72c47affeb87c9b898bc2290dc7ed113945f1805 Gerrit-Change-Number: 14112 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 00:42:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 00:42:19 +0000 Subject: Change in osmo-bts[master]: cbch: Add counters; queue length limits and CBCH LOAD reporting Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14113 Change subject: cbch: Add counters; queue length limits and CBCH LOAD reporting ...................................................................... cbch: Add counters; queue length limits and CBCH LOAD reporting This adds the final missing part to full CBCH support: * keep a tab on the current queue length for basic + extended CBCH * keep rate counters about the number of sent / transmitted SSMCB * send CBCH LOAD information via RSL to the BSC Change-Id: I7068c7937a60a900c40439115bb84dc3ee0d061f --- M include/osmo-bts/cbch.h M include/osmo-bts/gsm_data_shared.h M include/osmo-bts/rsl.h M src/common/bts.c M src/common/cbch.c M src/common/rsl.c M src/common/vty.c 7 files changed, 137 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/13/14113/1 diff --git a/include/osmo-bts/cbch.h b/include/osmo-bts/cbch.h index af5fd9a..6bba5fa 100644 --- a/include/osmo-bts/cbch.h +++ b/include/osmo-bts/cbch.h @@ -6,6 +6,14 @@ #include #include +enum { + CBCH_CTR_RCVD_QUEUED, + CBCH_CTR_RCVD_DROPPED, + CBCH_CTR_SENT_SINGLE, + CBCH_CTR_SENT_DEFAULT, + CBCH_CTR_SENT_NULL, +}; + /* incoming SMS broadcast command from RSL */ int bts_process_smscb_cmd(struct gsm_bts *bts, struct rsl_ie_cb_cmd_type cmd_type, bool extended_cbch, uint8_t msg_len, const uint8_t *msg); diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index 860c296..415e6bc 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -542,6 +542,7 @@ struct bts_smscb_state { struct llist_head queue; /* list of struct smscb_msg */ int queue_len; + struct rate_ctr_group *ctrs; struct smscb_msg *cur_msg; /* current SMS-CB */ struct smscb_msg *default_msg; /* default broadcast message; NULL if none */ }; @@ -744,6 +745,9 @@ /* State for SMSCB (Cell Broadcast) for BASIC and EXTENDED channel */ struct bts_smscb_state smscb_basic; struct bts_smscb_state smscb_extended; + int smscb_queue_tgt_len; /* ideal/target queue length */ + int smscb_queue_max_len; /* maximum queue length */ + int smscb_queue_hyst; /* hysteresis for CBCH laod indications */ float min_qual_rach; /* minimum quality for RACH bursts */ float min_qual_norm; /* minimum quality for normal daata */ diff --git a/include/osmo-bts/rsl.h b/include/osmo-bts/rsl.h index 0361841..186018e 100644 --- a/include/osmo-bts/rsl.h +++ b/include/osmo-bts/rsl.h @@ -43,4 +43,6 @@ void cb_ts_connected(struct gsm_bts_trx_ts *ts, int rc); void ipacc_dyn_pdch_complete(struct gsm_bts_trx_ts *ts, int rc); +int rsl_tx_cbch_load_indication(struct gsm_bts *bts, bool ext_cbch, bool overflow, uint8_t amount); + #endif // _RSL_H */ diff --git a/src/common/bts.c b/src/common/bts.c index 4af219b..9ac58bd 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -49,6 +49,7 @@ #include #include #include +#include #define MIN_QUAL_RACH 5.0f /* at least 5 dB C/I */ #define MIN_QUAL_NORM -0.5f /* at least -1 dB C/I */ @@ -105,6 +106,22 @@ bts_ctr_desc }; +static const struct rate_ctr_desc cbch_ctr_desc[] = { + [CBCH_CTR_RCVD_QUEUED] = {"cbch:rcvd_queued", "Received + queeud CBCH messages (Abis)" }, + [CBCH_CTR_RCVD_DROPPED] = {"cbch:rcvd_dropped", "Received + dropped CBCH messages (Abis)" }, + + [CBCH_CTR_SENT_SINGLE] = {"cbch:sent_single", "Sent single CBCH messages (Um)" }, + [CBCH_CTR_SENT_DEFAULT] = {"cbch:sent_default", "Sent default CBCH messages (Um)" }, + [CBCH_CTR_SENT_NULL] = {"cbch:sent_null", "Sent NULL CBCH messages (Um)" }, +}; +static const struct rate_ctr_group_desc cbch_ctrg_desc = { + "cbch", + "cell broadcast channel", + OSMO_STATS_CLASS_GLOBAL, + ARRAY_SIZE(cbch_ctr_desc), + cbch_ctr_desc +}; + /* Initialize the BTS data structures, called before config * file reading */ int bts_init(struct gsm_bts *bts) @@ -191,7 +208,15 @@ } INIT_LLIST_HEAD(&bts->smscb_basic.queue); + bts->smscb_basic.ctrs = rate_ctr_group_alloc(bts, &cbch_ctrg_desc, 0); + OSMO_ASSERT(bts->smscb_basic.ctrs); INIT_LLIST_HEAD(&bts->smscb_extended.queue); + bts->smscb_extended.ctrs = rate_ctr_group_alloc(bts, &cbch_ctrg_desc, 1); + OSMO_ASSERT(bts->smscb_extended.ctrs); + bts->smscb_queue_max_len = 15; + bts->smscb_queue_tgt_len = 2; + bts->smscb_queue_hyst = 2; + INIT_LLIST_HEAD(&bts->oml_queue); /* register DTX DL FSM */ diff --git a/src/common/cbch.c b/src/common/cbch.c index 2107f11..cdd30e6 100644 --- a/src/common/cbch.c +++ b/src/common/cbch.c @@ -26,6 +26,7 @@ #include #include +#include #include /* internal representation of one SMS-CB message (e.g. in the pending queue */ @@ -37,6 +38,28 @@ uint8_t num_segs; /* total number of segments */ }; +/* determine if current queue length differes more than permitted hysteresis from target + * queue length. If it does, send CBCH LOAD IND */ +static void check_and_send_cbch_load(struct gsm_bts *bts, struct bts_smscb_state *bts_ss) +{ + int delta = bts_ss->queue_len - bts->smscb_queue_tgt_len; + bool extended_cbch = false; + + if (bts_ss == &bts->smscb_extended) + extended_cbch = true; + + if (abs(delta) < bts->smscb_queue_hyst) + return; + + if (delta < 0) { + /* Overrun */ + rsl_tx_cbch_load_indication(bts, extended_cbch, true, OSMO_MIN(15, -delta)); + } else { + /* Underrun */ + rsl_tx_cbch_load_indication(bts, extended_cbch, false, OSMO_MIN(15, delta)); + } +} + /* determine SMSCB state by tb number */ static struct bts_smscb_state *bts_smscb_state(struct gsm_bts *bts, uint8_t tb) { @@ -182,9 +205,16 @@ case RSL_CB_CMD_TYPE_SCHEDULE: case RSL_CB_CMD_TYPE_NULL: /* def_bcast is ignored as per Section 9.3.41 of 3GPP TS 48.058 */ + /* limit queue size and optionally send CBCH LOAD Information (overflow) via RSL */ + if (bts_ss->queue_len >= bts->smscb_queue_max_len) { + rate_ctr_inc2(bts_ss->ctrs, CBCH_CTR_RCVD_DROPPED); + talloc_free(scm); + break; + } llist_add_tail(&scm->list, &bts_ss->queue); bts_ss->queue_len++; - /* FIXME: limit queue size and optionally send CBCH LOAD Information (overflow) via RSL */ + check_and_send_cbch_load(bts, bts_ss); + rate_ctr_inc2(bts_ss->ctrs, CBCH_CTR_RCVD_QUEUED); break; case RSL_CB_CMD_TYPE_DEFAULT: /* old default msg will be free'd in get_smscb_block() if it is currently in transit @@ -217,20 +247,25 @@ if (msg) { llist_del(&msg->list); bts_ss->queue_len--; + check_and_send_cbch_load(bts, bts_ss); DEBUGP(DLSMS, "%s: Dequeued msg\n", __func__); + rate_ctr_inc2(bts_ss->ctrs, CBCH_CTR_SENT_SINGLE); return msg; } - /* FIXME: send CBCH LOAD Information (underflow) via RSL */ + /* send CBCH LOAD Information (underflow) via RSL */ + check_and_send_cbch_load(bts, bts_ss); /* choose the default message, if any */ msg = bts_ss->default_msg; if (msg) { DEBUGP(DLSMS, "%s: Using default msg\n", __func__); + rate_ctr_inc2(bts_ss->ctrs, CBCH_CTR_SENT_DEFAULT); return msg; } DEBUGP(DLSMS, "%s: No queued msg nor default\n", __func__); + rate_ctr_inc2(bts_ss->ctrs, CBCH_CTR_SENT_NULL); return NULL; } diff --git a/src/common/rsl.c b/src/common/rsl.c index 364e829..af0b72d 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1636,6 +1636,32 @@ return 0; } +/* 8.5.8 CBCH Load Information */ +int rsl_tx_cbch_load_indication(struct gsm_bts *bts, bool ext_cbch, bool overflow, uint8_t amount) +{ + struct gsm_lchan *lchan = gsm_bts_get_cbch(bts); + struct msgb *msg; + uint8_t load_info; + + msg = rsl_msgb_alloc(sizeof(struct abis_rsl_cchan_hdr)); + if (!msg) + return -ENOMEM; + + /* 9.3.1 Channel Number */ + rsl_cch_push_hdr(msg, RSL_MT_CBCH_LOAD_IND, gsm_lchan2chan_nr(lchan)); + + /* 9.3.43 CBCH Load Information */ + load_info = ((overflow & 1) << 7) | (amount & 0x0F); + msgb_tv_put(msg, RSL_IE_CBCH_LOAD_INFO, load_info); + /* 9.3.44 SMSCB Channel Indicator */ + if (ext_cbch) + msgb_tv_put(msg, RSL_IE_SMSCB_CHAN_INDICATOR, 0x01); + + msg->trx = bts->c0; + + return abis_bts_rsl_sendmsg(msg); +} + /* * ip.access related messages */ diff --git a/src/common/vty.c b/src/common/vty.c index fab5516..84a0edd 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -310,6 +310,9 @@ vty_out(vty, " pcu-socket %s%s", bts->pcu.sock_path, VTY_NEWLINE); if (bts->supp_meas_toa256) vty_out(vty, " supp-meas-info toa256%s", VTY_NEWLINE); + vty_out(vty, " smscb queue-max-length %d%s", bts->smscb_queue_max_len, VTY_NEWLINE); + vty_out(vty, " smscb queue-target-length %d%s", bts->smscb_queue_tgt_len, VTY_NEWLINE); + vty_out(vty, " smscb queue-hysteresis %d%s", bts->smscb_queue_hyst, VTY_NEWLINE); bts_model_config_write_bts(vty, bts); @@ -687,6 +690,33 @@ return CMD_SUCCESS; } +DEFUN(cfg_bts_smscb_max_qlen, cfg_bts_smscb_max_qlen_cmd, + "smscb queue-max-length <1-60>", + "Maximum queue length for SMSCB (CBCH) queue. In count of messages/pages") +{ + struct gsm_bts *bts = vty->index; + bts->smscb_queue_max_len = atoi(argv[0]); + return CMD_SUCCESS; +} + +DEFUN(cfg_bts_smscb_tgt_qlen, cfg_bts_smscb_tgt_qlen_cmd, + "smscb queue-target-length <1-30>", + "Target queue length for SMSCB (CBCH) queue. In count of messages/pages") +{ + struct gsm_bts *bts = vty->index; + bts->smscb_queue_tgt_len = atoi(argv[0]); + return CMD_SUCCESS; +} + +DEFUN(cfg_bts_smscb_qhyst, cfg_bts_smscb_qhyst_cmd, + "smscb queue-hysteresis <0-30>", + "Hysteresis for SMSCB (CBCH) queue. In count of messages/pages") +{ + struct gsm_bts *bts = vty->index; + bts->smscb_queue_hyst = atoi(argv[0]); + return CMD_SUCCESS; +} + #define DB_DBM_STR \ "Unit is dB (decibels)\n" \ @@ -854,6 +884,8 @@ bts->agch_queue.rejected_msgs, bts->agch_queue.agch_msgs, bts->agch_queue.pch_msgs, VTY_NEWLINE); + vty_out(vty, " CBCH queue target: %d, hysteresis: %d, maximum: %d%s", + bts->smscb_queue_tgt_len, bts->smscb_queue_max_len, bts->smscb_queue_hyst, VTY_NEWLINE); vty_out(vty, " CBCH backlog queue length (BASIC): %d%s", bts->smscb_basic.queue_len, VTY_NEWLINE); vty_out(vty, " CBCH backlog queue length (EXTENDED): %u%s", @@ -1614,6 +1646,9 @@ install_element(BTS_NODE, &cfg_bts_pcu_sock_cmd); install_element(BTS_NODE, &cfg_bts_supp_meas_toa256_cmd); install_element(BTS_NODE, &cfg_bts_no_supp_meas_toa256_cmd); + install_element(BTS_NODE, &cfg_bts_smscb_max_qlen_cmd); + install_element(BTS_NODE, &cfg_bts_smscb_tgt_qlen_cmd); + install_element(BTS_NODE, &cfg_bts_smscb_qhyst_cmd); install_element(BTS_NODE, &cfg_trx_gsmtap_sapi_cmd); install_element(BTS_NODE, &cfg_trx_no_gsmtap_sapi_cmd); -- To view, visit https://gerrit.osmocom.org/14113 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I7068c7937a60a900c40439115bb84dc3ee0d061f Gerrit-Change-Number: 14113 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 09:59:21 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 21 May 2019 09:59:21 +0000 Subject: Change in osmo-gsm-manuals[master]: debian: fix empty debian package Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/14114 Change subject: debian: fix empty debian package ...................................................................... debian: fix empty debian package Replace '--with autotools_dev' with '--with autoreconf' in debian/rules, so a ./configure file gets generated from configure.ac, and the debian package scripts don't generate an empty package. I did not notice this earlier, because when building the package locally with dpkg-buildpackage, it was not empty. (That is probably, because my local dir already had the configure script generated.) Related: OS#3899 Change-Id: I483136cd28395ae8fc2c112cf659ee83255afe87 --- M debian/rules 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/14/14114/1 diff --git a/debian/rules b/debian/rules index 272596d..c79bbe8 100755 --- a/debian/rules +++ b/debian/rules @@ -2,4 +2,4 @@ #export DH_VERBOSE = 1 %: - dh $@ --with autotools_dev + dh $@ --with autoreconf -- To view, visit https://gerrit.osmocom.org/14114 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I483136cd28395ae8fc2c112cf659ee83255afe87 Gerrit-Change-Number: 14114 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 10:05:20 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 21 May 2019 10:05:20 +0000 Subject: Change in osmo-gsm-manuals[master]: debian: fix empty debian package In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14114 ) Change subject: debian: fix empty debian package ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14114 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I483136cd28395ae8fc2c112cf659ee83255afe87 Gerrit-Change-Number: 14114 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 21 May 2019 10:05:20 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 10:11:46 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 10:11:46 +0000 Subject: Change in osmo-gsm-manuals[master]: debian: fix empty debian package In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14114 ) Change subject: debian: fix empty debian package ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14114 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I483136cd28395ae8fc2c112cf659ee83255afe87 Gerrit-Change-Number: 14114 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 21 May 2019 10:11:46 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 10:11:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 10:11:47 +0000 Subject: Change in osmo-gsm-manuals[master]: debian: fix empty debian package In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14114 ) Change subject: debian: fix empty debian package ...................................................................... debian: fix empty debian package Replace '--with autotools_dev' with '--with autoreconf' in debian/rules, so a ./configure file gets generated from configure.ac, and the debian package scripts don't generate an empty package. I did not notice this earlier, because when building the package locally with dpkg-buildpackage, it was not empty. (That is probably, because my local dir already had the configure script generated.) Related: OS#3899 Change-Id: I483136cd28395ae8fc2c112cf659ee83255afe87 --- M debian/rules 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Pau Espin Pedrol: Looks good to me, approved Harald Welte: Looks good to me, approved diff --git a/debian/rules b/debian/rules index 272596d..c79bbe8 100755 --- a/debian/rules +++ b/debian/rules @@ -2,4 +2,4 @@ #export DH_VERBOSE = 1 %: - dh $@ --with autotools_dev + dh $@ --with autoreconf -- To view, visit https://gerrit.osmocom.org/14114 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I483136cd28395ae8fc2c112cf659ee83255afe87 Gerrit-Change-Number: 14114 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 10:24:59 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 10:24:59 +0000 Subject: Change in titan.ProtocolModules.BSSMAP[master]: BSSAP_Types: Introduce Osmocom Osmux extension IEs In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14103 ) Change subject: BSSAP_Types: Introduce Osmocom Osmux extension IEs ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14103 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: titan.ProtocolModules.BSSMAP Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iaf1e137269c0da20b2c96fd104b57edf336693af Gerrit-Change-Number: 14103 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 21 May 2019 10:24:59 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 10:25:01 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 10:25:01 +0000 Subject: Change in titan.ProtocolModules.BSSMAP[master]: BSSAP_Types: Introduce Osmocom Osmux extension IEs In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14103 ) Change subject: BSSAP_Types: Introduce Osmocom Osmux extension IEs ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/14103 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: titan.ProtocolModules.BSSMAP Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iaf1e137269c0da20b2c96fd104b57edf336693af Gerrit-Change-Number: 14103 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 21 May 2019 10:25:01 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 10:25:02 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 10:25:02 +0000 Subject: Change in titan.ProtocolModules.BSSMAP[master]: BSSAP_Types: Introduce Osmocom Osmux extension IEs In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14103 ) Change subject: BSSAP_Types: Introduce Osmocom Osmux extension IEs ...................................................................... BSSAP_Types: Introduce Osmocom Osmux extension IEs These IEs are extensions from Osmocom to signal Osmux support during BSSMAP RESET and to pass Osmux allocated CID during Assign Req/compl. Change-Id: Iaf1e137269c0da20b2c96fd104b57edf336693af Related: libosmocore.git 18506c850c3bbcbfa814e07dc02a17fdb5f7bb9a Related: OS#2551 --- M src/BSSAP_Types.ttcn 1 file changed, 21 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/src/BSSAP_Types.ttcn b/src/BSSAP_Types.ttcn index f7d91bd..fa3a9c5 100644 --- a/src/BSSAP_Types.ttcn +++ b/src/BSSAP_Types.ttcn @@ -1873,6 +1873,19 @@ BSSMAP_IE_ClassmarkInformationType2 classmarkInformationType2 } +/////////////////////////////////////////////////////// +// Osmocom extensions +type record BSSMAP_IE_Osmo_OsmuxSupport +{ + OCT1 elementIdentifier //F0 +} with { variant "PRESENCE (elementIdentifier = 'F0'O)";} + +type record BSSMAP_IE_Osmo_OsmuxCID +{ + OCT1 elementIdentifier, //F1 + INT1 osmuxCID +} with { variant "PRESENCE (elementIdentifier = 'F1'O)";} + /////////////////////////////////////////// // BSSMAP message definition @@ -1903,7 +1916,8 @@ BSSMAP_IE_GlobalCallReference globalCallReference optional, BSSMAP_IE_LCLS_Configuration lCLS_Configuration optional, BSSMAP_IE_LCLS_ConnectionStatusControl lCLS_ConnectionStatusControl optional, - BSSMAP_IE_LCLS_CorrelationNotNeeded lCLS_CorrelationNotNeeded optional + BSSMAP_IE_LCLS_CorrelationNotNeeded lCLS_CorrelationNotNeeded optional, + BSSMAP_IE_Osmo_OsmuxCID osmuxCID optional } with { variant "PRESENCE (messageType = '01'O)" } @@ -1923,7 +1937,8 @@ BSSMAP_IE_AoIP_TransportLayerAddress aoIPTransportLayer optional, BSSMAP_IE_SpeechCodec speechCodec optional, BSSMAP_IE_SpeechCodecList codecList optional, - BSSMAP_IE_LCLS_BSS_Status lCLS_BSS_Status optional + BSSMAP_IE_LCLS_BSS_Status lCLS_BSS_Status optional, + BSSMAP_IE_Osmo_OsmuxCID osmuxCID optional } with { variant "PRESENCE (messageType = '02'O)" } // ASSIGNMENT FAILURE - 48.008 subclause 3.2.1.3 @@ -2192,7 +2207,8 @@ { OCT1 messageType, // H'30 BSSMAP_IE_Cause cause, - BSSMAP_IE_A_InterfaceSelectorForReset a_InterfaceSelectorForReset optional + BSSMAP_IE_A_InterfaceSelectorForReset a_InterfaceSelectorForReset optional, + BSSMAP_IE_Osmo_OsmuxSupport osmuxSupport optional } with { variant "PRESENCE (messageType = '30'O)" } @@ -2200,7 +2216,8 @@ type record PDU_BSSMAP_ResetAck { OCT1 messageType, // H'31 - BSSMAP_IE_A_InterfaceSelectorForReset a_InterfaceSelectorForReset optional + BSSMAP_IE_A_InterfaceSelectorForReset a_InterfaceSelectorForReset optional, + BSSMAP_IE_Osmo_OsmuxSupport osmuxSupport optional } with { variant "PRESENCE (messageType = '31'O)" } -- To view, visit https://gerrit.osmocom.org/14103 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: titan.ProtocolModules.BSSMAP Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iaf1e137269c0da20b2c96fd104b57edf336693af Gerrit-Change-Number: 14103 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: laforge -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 10:25:40 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 10:25:40 +0000 Subject: Change in osmo-ttcn3-hacks[master]: RTP_Emulation: Avoid failure if T_transmit triggers between bind and ... In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14078 ) Change subject: RTP_Emulation: Avoid failure if T_transmit triggers between bind and connect ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14078 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I20e7aed35bb28200e30ee5efc718f77e036d8262 Gerrit-Change-Number: 14078 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 21 May 2019 10:25:40 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 10:25:42 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 10:25:42 +0000 Subject: Change in osmo-ttcn3-hacks[master]: RTP_Emulation: Avoid failure if T_transmit triggers between bind and ... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14078 ) Change subject: RTP_Emulation: Avoid failure if T_transmit triggers between bind and connect ...................................................................... RTP_Emulation: Avoid failure if T_transmit triggers between bind and connect During MGCP_Test's f_flow_modify, an RTP socket may be Tx-enabled, and f_flow_modify first calls bind, then connect, with MDCX transaction in the middle (which can take some time). If T_transmit from RTP_Emulation triggers (RTP packet to be send), during that time, TTCN3 will fail to send the packet: RTP_Emulation.ttcn:312 Message enqueued on RTP from system @Socket_API_Definitions.PortEvent : { result := { errorCode := ERROR_SOCKET (4), connId := 2, os_error_code := 89, os_error_text := "Destination address required" } } id 1 Change-Id: I20e7aed35bb28200e30ee5efc718f77e036d8262 --- M library/RTP_Emulation.ttcn 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn index 2494d74..7b9be68 100644 --- a/library/RTP_Emulation.ttcn +++ b/library/RTP_Emulation.ttcn @@ -85,6 +85,7 @@ /* state variables, change over time */ var boolean g_rx_enabled := false; + var boolean g_tx_connected := false; /* Set to true after connect() */ var LIN2_BO_LAST g_tx_next_seq := 0; var uint32_t g_tx_next_ts := 0; @@ -347,6 +348,8 @@ log("Local Port is not an even port number!"); continue; } + + g_tx_connected := false; /* will set it back to true upon next connect() call */ res := RTP_CodecPort_CtrlFunct.f_IPL4_listen(RTP, g_local_host, g_local_port, {udp:={}}); if (not ispresent(res.connId)) { @@ -387,6 +390,7 @@ setverdict(fail, "Could not connect to RTCP socket, check your configuration"); mtc.stop; } + g_tx_connected := true; CTRL.reply(RTPEM_connect:{g_remote_host, g_remote_port}); } [] CTRL.getcall(RTPEM_mode:{RTPEM_MODE_NONE}) { @@ -466,7 +470,7 @@ } /* transmit if timer has expired */ - [] T_transmit.timeout { + [g_tx_connected] T_transmit.timeout { /* send one RTP frame, re-start timer */ f_tx_rtp(g_cfg.tx_fixed_payload); T_transmit.start; -- To view, visit https://gerrit.osmocom.org/14078 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I20e7aed35bb28200e30ee5efc718f77e036d8262 Gerrit-Change-Number: 14078 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 10:28:23 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 10:28:23 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Add Osmux support and tests for MGW In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14046 ) Change subject: Add Osmux support and tests for MGW ...................................................................... Patch Set 2: Code-Review+1 looks good to me, we should merge it *just* before merging the MGW side code -- To view, visit https://gerrit.osmocom.org/14046 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibb58b2a4e08d6f30cfe347c217794d0d1310954f Gerrit-Change-Number: 14046 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 21 May 2019 10:28:23 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 10:28:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 10:28:47 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Depend on our own fork of titan.ProtocolModules.BSSMAP In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14104 ) Change subject: Depend on our own fork of titan.ProtocolModules.BSSMAP ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14104 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic8debe5f3ffe8e1d4258fa6b4632a3871b99af40 Gerrit-Change-Number: 14104 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 21 May 2019 10:28:47 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 10:30:37 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 10:30:37 +0000 Subject: Change in osmo-gsm-manuals[master]: GSUP: document inter-MSC handover additions In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14096 ) Change subject: GSUP: document inter-MSC handover additions ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14096 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6b9f23d08cfe53c8b77f51c6afb900c2badc9e2c Gerrit-Change-Number: 14096 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 21 May 2019 10:30:37 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 10:30:38 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 10:30:38 +0000 Subject: Change in osmo-gsm-manuals[master]: GSUP: document inter-MSC handover additions In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14096 ) Change subject: GSUP: document inter-MSC handover additions ...................................................................... GSUP: document inter-MSC handover additions Message formats of the new messages look mostly the same (IMSI, Message Class, Source Name, Destination Name, AN-APDU). That is, because AN-APDU is storing results, error reasons etc. This can be seen clearly in osmo-msc.git: * src/libmsc/msc_a_remote.c:msc_a_remote_fsm_communicating() * src/libmsc/msc_i_remote.c:msc_i_remote_fsm_ready() The message squence charts in the E Procedures section are directly based on Neels' interMSC_HO_GSUP_msgs.txt [1]. It seems that using AN-APDU made some other new IEs redundant: RR Cause, BSSAP Cause, Session Management Cause had been added to GSUP for the MSC handover, and are documented now, but they are currently not used in osmo-msc.git. The new message OSMO_GSUP_MSGT_E_ABORT is not used either, so I left a stub for it in the message format section. I mentioned in the Source Name IE section, that source and destination names are sent as nul-terminated strings. This is for legacy reasons, Neels wrote a nice summary in the commit message of [2]. [1] https://osmocom.org/attachments/3720/interMSC_HO_GSUP_msgs.txt [2] Change-Id: I9ca8c9eef104519ed1ea46e2fef46dcdc0d554eb (osmo-msc) Related: OS#3774, OS#3619 Change-Id: I6b9f23d08cfe53c8b77f51c6afb900c2badc9e2c --- M common/chapters/gsup.adoc 1 file changed, 410 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/common/chapters/gsup.adoc b/common/chapters/gsup.adoc index 1fd0bb6..c67dfca 100644 --- a/common/chapters/gsup.adoc +++ b/common/chapters/gsup.adoc @@ -219,6 +219,112 @@ } ---- +=== Procedures (E Interface) + +The E interface connects two MSCs in the traditional GSM MAP world. It is used +for the inter-MSC handover. In GSUP, we don't need that extra connection, as we +route the messages over the GSUP server (OsmoHLR) instead. + +Whenever MSC-A is sending to MSC-B, and vice-versa, the message needs to pass +through the GSUP server. In order to make the following message sequence charts +easier to read, this step has been omitted. + +==== E Handover + +MSC-A has an active RAN connection and hands it over to MSC-B. + +.E Handover (Normal Case) +["mscgen"] +---- +msc { + hscale="1.5"; + A [label="MSC-A"], B [label="MSC-B"]; + + A => B [label="E Prepare Handover Request\n\n(AN-APDU: Handover Request)"]; + |||; + A <= B [label="E Prepare Handover Result\n\n(AN-APDU: Handover Request Ack)"]; + |||; + A <= B [label="E Process Access Signalling Request\n\n(AN-APDU: Handover Detect)"]; + |||; + A <= B [label="E Send End Signal Request\n\n(AN-APDU: Handover Complete)"]; +} +---- + +==== E Subsequent Handover + +MSC-B has an active RAN connection, and asks MSC-A to hand it over to MSC-B'. + +.E Subsequent Handover (Normal Case) +["mscgen"] +---- +msc { + hscale="1.5"; + A [label="MSC-A"], B [label="MSC-B"], B_ [label="MSC-B'"]; + + B => A [label="E Prepare Subsequent Handover Request\n\n(AN-APDU: Handover Required)"]; + |||; + A => B_ [label="E Prepare Handover Request\n\n(AN-APDU: Handover Request)"]; + |||; + B_ => A [label="E Prepare Handover Response\n\n(AN-APDU: Handover Request Ack)"]; + |||; + A => B [label="E Prepare Subsequent Handover Response\n\n(AN-APDU: Handover Request Ack)"]; + |||; + B_ => A [label="E Process Access Signalling Request\n\n(AN-APDU: Handover Detect)"]; + |||; + B_ => A [label="E Process Access Signalling Request\n\n(AN-APDU: Handover Complete)"]; + |||; + A => B [label="E Close"]; +} +---- + +==== E Forward and Process Access Signalling + +MSC-A is forwarding a message from its BSS (Base Station Subsystem) to MSC-B. +MSC-B forwards the message to its BSS, and answers to MSC-A with a Process +Access Signalling Request. + +.E Process and Forward Access Signalling (Normal Case) +["mscgen"] +---- +msc { + hscale="1.5"; + A [label="MSC-A"], B [label="MSC-B"]; + + A => B [label="E Forward Access Signalling Request\n\n(AN-APDU: DTAP, e.g. CC, SMS, ...)"]; + |||; + B => A [label="E Process Access Signalling Request\n\n(AN-APDU: DTAP, e.g. CC, SMS, ...)"]; +} +---- + +==== E Routing Error + +The GSUP server can not route any of the requests above, and responds with an +E Routing Error. Possible reasons for not being able to route the message are +missing routing IEs, a mismatching source name IE (<>), +the destination not being connected to the GSUP server or a failed attempt to +send the message from the GSUP sever to the destination. To figure out, what +went wrong in detail, refer to the GSUP server's logs. + +In the traditional GSM MAP world, the participants of an E procedure are +directly connected, hence this routing error message does not exist in MAP. + +.E Routing Error example +["mscgen"] +---- +msc { + hscale="1.5"; + A [label="MSC-A"], HLR [label="GSUP Server (OsmoHLR)"], B [label="MSC-B"]; + + A => HLR [label="E Prepare Handover Request"]; + HLR => A [label="E Routing Error"]; +} +---- + +//// +End of "Procedures (E Interface)" chapter. Remember to place unrelated +procedures at the end of the "Procedures" chapter, not here! +//// + === Message Format ==== General @@ -722,6 +828,207 @@ |51|IMEI Check Result|<>|M|TLV|3 |=== +==== E Prepare Handover Request + +Direction: MSC-A=MSC-I => MSC-B=MSC-T (via HLR) + +[options="header",cols="5%,45%,20%,10%,10%,10%"] +|=== +|IEI|IE|Type|Presence|Format|Length +| |Message Type|<>|M|V|1 +|01|IMSI|<>|M|TLV|2-10 +|0a|Message Class|<>|M|TLV|3 +|60|Source Name|<>|M|TLV|2-... +|61|Destination Name|<>|M|TLV|2-... +|62|AN-APDU|<>|M|TLV|2-... +|=== + +==== E Prepare Handover Error + +Direction: MSC-B=MSC-T => MSC-A=MSC-I (via HLR) + +[options="header",cols="5%,45%,20%,10%,10%,10%"] +|=== +|IEI|IE|Type|Presence|Format|Length +| |Message Type|<>|M|V|1 +|01|IMSI|<>|M|TLV|2-10 +|0a|Message Class|<>|M|TLV|3 +|60|Source Name|<>|M|TLV|2-... +|61|Destination Name|<>|M|TLV|2-... +|62|AN-APDU|<>|M|TLV|2-... +|=== + +==== E Prepare Handover Result + +Direction: MSC-B=MSC-T => MSC-A=MSC-I (via HLR) + +[options="header",cols="5%,45%,20%,10%,10%,10%"] +|=== +|IEI|IE|Type|Presence|Format|Length +| |Message Type|<>|M|V|1 +|01|IMSI|<>|M|TLV|2-10 +|0a|Message Class|<>|M|TLV|3 +|60|Source Name|<>|M|TLV|2-... +|61|Destination Name|<>|M|TLV|2-... +|62|AN-APDU|<>|M|TLV|2-... +|=== + +==== E Prepare Subsequent Handover Request + +Direction: MSC-B=MSC-I => MSC-A (via HLR) + +[options="header",cols="5%,45%,20%,10%,10%,10%"] +|=== +|IEI|IE|Type|Presence|Format|Length +| |Message Type|<>|M|V|1 +|01|IMSI|<>|M|TLV|2-10 +|0a|Message Class|<>|M|TLV|3 +|60|Source Name|<>|M|TLV|2-... +|61|Destination Name|<>|M|TLV|2-... +|62|AN-APDU|<>|M|TLV|2-... +|=== + +==== E Prepare Subsequent Handover Error + +Direction: MSC-A => MSC-B=MSC-I (via HLR) + +[options="header",cols="5%,45%,20%,10%,10%,10%"] +|=== +|IEI|IE|Type|Presence|Format|Length +| |Message Type|<>|M|V|1 +|01|IMSI|<>|M|TLV|2-10 +|0a|Message Class|<>|M|TLV|3 +|60|Source Name|<>|M|TLV|2-... +|61|Destination Name|<>|M|TLV|2-... +|62|AN-APDU|<>|M|TLV|2-... +|=== + +==== E Prepare Subsequent Handover Result + +Direction: MSC-A => MSC-B=MSC-I (via HLR) + +[options="header",cols="5%,45%,20%,10%,10%,10%"] +|=== +|IEI|IE|Type|Presence|Format|Length +| |Message Type|<>|M|V|1 +|01|IMSI|<>|M|TLV|2-10 +|0a|Message Class|<>|M|TLV|3 +|60|Source Name|<>|M|TLV|2-... +|61|Destination Name|<>|M|TLV|2-... +|62|AN-APDU|<>|M|TLV|2-... +|=== + +==== E Send End Signal Request + +Direction: MSC-B=MSC-T => MSC-A=MSC-I (via HLR) + +[options="header",cols="5%,45%,20%,10%,10%,10%"] +|=== +|IEI|IE|Type|Presence|Format|Length +| |Message Type|<>|M|V|1 +|01|IMSI|<>|M|TLV|2-10 +|0a|Message Class|<>|M|TLV|3 +|60|Source Name|<>|M|TLV|2-... +|61|Destination Name|<>|M|TLV|2-... +|62|AN-APDU|<>|M|TLV|2-... +|=== + +==== E Send End Signal Error + +Direction: MSC-A=MSC-I => MSC-B=MSC-T (via HLR) + +[options="header",cols="5%,45%,20%,10%,10%,10%"] +|=== +|IEI|IE|Type|Presence|Format|Length +| |Message Type|<>|M|V|1 +|01|IMSI|<>|M|TLV|2-10 +|0a|Message Class|<>|M|TLV|3 +|60|Source Name|<>|M|TLV|2-... +|61|Destination Name|<>|M|TLV|2-... +|62|AN-APDU|<>|M|TLV|2-... +|=== + +==== E Send End Signal Result + +Direction: MSC-A => MSC-B=MSC-I (via HLR) + +[options="header",cols="5%,45%,20%,10%,10%,10%"] +|=== +|IEI|IE|Type|Presence|Format|Length +| |Message Type|<>|M|V|1 +|01|IMSI|<>|M|TLV|2-10 +|0a|Message Class|<>|M|TLV|3 +|60|Source Name|<>|M|TLV|2-... +|61|Destination Name|<>|M|TLV|2-... +|62|AN-APDU|<>|M|TLV|2-... +|=== + +==== E Process Access Signalling Request + +Direction: MSC-B=MSC-T => MSC-A=MSC-I (via HLR) + +[options="header",cols="5%,45%,20%,10%,10%,10%"] +|=== +|IEI|IE|Type|Presence|Format|Length +| |Message Type|<>|M|V|1 +|01|IMSI|<>|M|TLV|2-10 +|0a|Message Class|<>|M|TLV|3 +|60|Source Name|<>|M|TLV|2-... +|61|Destination Name|<>|M|TLV|2-... +|62|AN-APDU|<>|M|TLV|2-... +|=== + +==== E Forward Access Signalling Request + +Direction: MSC-A => MSC-B=MSC-I (via HLR) + +[options="header",cols="5%,45%,20%,10%,10%,10%"] +|=== +|IEI|IE|Type|Presence|Format|Length +| |Message Type|<>|M|V|1 +|01|IMSI|<>|M|TLV|2-10 +|0a|Message Class|<>|M|TLV|3 +|60|Source Name|<>|M|TLV|2-... +|61|Destination Name|<>|M|TLV|2-... +|62|AN-APDU|<>|M|TLV|2-... +|=== + +==== E Close + +Direction: MSC-A => MSC-B (via HLR) + +[options="header",cols="5%,45%,20%,10%,10%,10%"] +|=== +|IEI|IE|Type|Presence|Format|Length +| |Message Type|<>|M|V|1 +|01|IMSI|<>|M|TLV|2-10 +|0a|Message Class|<>|M|TLV|3 +|60|Source Name|<>|M|TLV|2-... +|61|Destination Name|<>|M|TLV|2-... +|=== + +==== E Abort + +This message was added to GSUP for the inter-MSC handover. But so far it is not +used yet. + +==== E Routing Error + +Direction: GSUP Server (HLR) => GSUP Client (MSC) + +[options="header",cols="5%,45%,20%,10%,10%,10%"] +|=== +|IEI|IE|Type|Presence|Format|Length +| |Message Type|<>|M|V|1 +|01|IMSI|<>|M|TLV|2-10 +|0a|Message Class|<>|M|TLV|3 +|60|Source Name|<>|M|TLV|2-... +|61|Destination Name|<>|M|TLV|2-... +|30|Session ID|<>|M|TLV|6 +|31|Session State|<>|M|TLV|3 +|=== + + === Information Elements [[gsup-ie-msgtype]] @@ -986,6 +1293,7 @@ |0x07|Freeze P-TMSI|<> |0x08|MSISDN|ISDN-AddressString/octet, <> |0x09|HLR Number|<> +|0x0a|Message Class| <> |0x10|PDP Context ID|<> |0x11|PDP Type|<> |0x12|Access Point Name|<> @@ -1012,6 +1320,12 @@ |0x46|SM Alert Reason|<> |0x50|IMEI|<> |0x51|IMEI Check Result|<> +|0x60|Source Name|<> +|0x61|Destination Name|<> +|0x62|AN-APDU|<> +|0x63|RR Cause|<> +|0x64|BSSAP Cause|<> +|0x65|Session Management Cause|<> |=== [[gsup-ie-empty]] @@ -1192,6 +1506,102 @@ |0x02|NACK |=== +[[gsup-ie-message-class]] +==== Message Class + +Indicate, which kind of message is being sent. This allows to trivially dispatch +incoming GSUP messages to the right code paths, and should make writing a GSUP +to MAP converter easier. + +This IE was introduced together with inter-MSC handover code. Inter-MSC messages +must include this IE and set it to the appropriate type. The intention of +creating this IE was to use it with all GSUP messages eventually. + +[options="header",cols="10%,20%,70%"] +|=== +|Type|Always present|Description +|1|no |Subscriber Management +|2|no |SMS +|3|no |USSD +|4|yes|Inter-MSC +|=== + +[[gsup-ie-source-name]] +==== Source Name + +When the GSUP server is asked to forward a message between two GSUP clients, the +source name is the IPA name of the client where the message is coming from. The +source name IE is present, when the GSUP server forwards the message to the +destination. Although redundant, the source name IE is also sent from the source +to the GSUP server (so it is easier to follow the network traces). + +Source and destination names are sent as nul-terminated strings. + +.Message forwarding example +["mscgen"] +---- +msc { + hscale="1.5"; + A [label="GSUP Client A"], + HLR [label="GSUP Server (OsmoHLR)"], + B [label="GSUP Client B"]; + + A => HLR [label="Source: A, Destination: B"]; + HLR => B [label="Source: A, Destination: B"]; +} +---- + + +[[gsup-ie-destination-name]] +==== Destination Name + +The receiving counterpart to source name (<>). + +[[gsup-ie-an-apdu]] +==== AN-APDU + +This IE encodes the AN-APDU parameter described in 3GPP TS 29.002 7.6.9.1. + +.Access Network Protocol +[options="header",cols="10%,90%"] +|=== +|Type|Description +|0x01|BSSAP +|0x02|RANAP +|=== + +[packetdiag] +---- +{ + colwidth = 8 + node_height = 24 + + 0-6: AN-APDU IEI + 7: Res + 8-15: Length of IE content + 16-23: Access Network Protocol + 24-31: Data +} +---- + +[[gsup-ie-cause-rr]] +==== RR Cause + +This IE contains the reason for release or completion of an assignment or +handover. See 3GPP TS 44.018 10.5.2.31 for reference. + +[[gsup-ie-cause-bssap]] +==== BSSAP Cause + +This IE indicates why an event is happening on the BSSAP interface. See 3GPP TS +48.008 3.2.2.5 for reference. + +[[gsup-ie-cause-sm]] +==== Session Management Cause + +This IE contains the reason for rejecting a session management request. See 3GPP +TS 24.008 10.5.6.6 / Table 10.5.157 for reference. + === Session (transaction) management Unlike TCAP/MAP, GSUP is just a transport layer without the -- To view, visit https://gerrit.osmocom.org/14096 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I6b9f23d08cfe53c8b77f51c6afb900c2badc9e2c Gerrit-Change-Number: 14096 Gerrit-PatchSet: 4 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 10:31:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 10:31:18 +0000 Subject: Change in osmo-hlr[master]: Create subscribers on demand In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13713 ) Change subject: Create subscribers on demand ...................................................................... Patch Set 8: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13713 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd Gerrit-Change-Number: 13713 Gerrit-PatchSet: 8 Gerrit-Owner: Vadim Yanitskiy Gerrit-Assignee: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Tue, 21 May 2019 10:31:18 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 10:31:20 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 10:31:20 +0000 Subject: Change in osmo-hlr[master]: Create subscribers on demand In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13713 ) Change subject: Create subscribers on demand ...................................................................... Create subscribers on demand Add a new vty option and allow to optionally generate a random msisdn, as well as setting the default NAM: subscriber-create-on-demand (no-msisdn|<3-15>) (none|cs|ps|both) Thanks to Vadim for the random MSISDN patch [1], which was squashed into this one. [1] Change-Id: I475c71f9902950fa7498855a616e1ec231fad6ac Depends on: Idc74f4d94ad44b9fc1b6d43178f5f33d551ebfb1 (libosmocore) Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd Related: OS#2542 --- M src/hlr.c M src/hlr.h M src/hlr_vty.c M tests/test_nodes.vty A tests/test_subscr_create_on_demand.vty 5 files changed, 186 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved diff --git a/src/hlr.c b/src/hlr.c index 0bea590..694ba14 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -34,6 +34,8 @@ #include #include #include +#include +#include #include "db.h" #include "hlr.h" @@ -148,6 +150,78 @@ } } +static int generate_new_msisdn(char *msisdn, const char *imsi, unsigned int len) +{ + int i, j, rc; + uint8_t rand_buf[GSM23003_MSISDN_MAX_DIGITS]; + + OSMO_ASSERT(len <= sizeof(rand_buf)); + + /* Generate a random unique MSISDN (with retry) */ + for (i = 0; i < 10; i++) { + /* Get a random number (with retry) */ + for (j = 0; j < 10; j++) { + rc = osmo_get_rand_id(rand_buf, len); + if (!rc) + break; + } + if (rc) { + LOGP(DMAIN, LOGL_ERROR, "IMSI='%s': Failed to generate new MSISDN, random number generator" + " failed (rc=%d)\n", imsi, rc); + return rc; + } + + /* Shift 0x00 ... 0xff range to 30 ... 39 (ASCII numbers) */ + for (j = 0; j < len; j++) + msisdn[j] = 48 + (rand_buf[j] % 10); + msisdn[j] = '\0'; + + /* Ensure there is no subscriber with such MSISDN */ + if (db_subscr_exists_by_msisdn(g_hlr->dbc, msisdn) == -ENOENT) + return 0; + } + + /* Failure */ + LOGP(DMAIN, LOGL_ERROR, "IMSI='%s': Failed to generate a new MSISDN, consider increasing " + "the length for the automatically assigned MSISDNs " + "(see 'subscriber-create-on-demand' command)\n", imsi); + return -1; +} + +static int subscr_create_on_demand(const char *imsi) +{ + char msisdn[GSM23003_MSISDN_MAX_DIGITS + 1]; + int rc; + unsigned int rand_msisdn_len = g_hlr->subscr_create_on_demand_rand_msisdn_len; + + if (!g_hlr->subscr_create_on_demand) + return -1; + if (db_subscr_exists_by_imsi(g_hlr->dbc, imsi) == 0) + return -1; + if (rand_msisdn_len && generate_new_msisdn(msisdn, imsi, rand_msisdn_len) != 0) + return -1; + + LOGP(DMAIN, LOGL_INFO, "IMSI='%s': Creating subscriber on demand\n", imsi); + rc = db_subscr_create(g_hlr->dbc, imsi, g_hlr->subscr_create_on_demand_flags); + if (rc) { + LOGP(DMAIN, LOGL_ERROR, "Failed to create subscriber on demand (rc=%d): IMSI='%s'\n", rc, imsi); + return rc; + } + + if (!rand_msisdn_len) + return 0; + + /* Update MSISDN of the new (just allocated) subscriber */ + rc = db_subscr_update_msisdn_by_imsi(g_hlr->dbc, imsi, msisdn); + if (rc) { + LOGP(DMAIN, LOGL_ERROR, "IMSI='%s': Failed to assign MSISDN='%s' (rc=%d)\n", imsi, msisdn, rc); + return rc; + } + LOGP(DMAIN, LOGL_INFO, "IMSI='%s': Successfully assigned MSISDN='%s'\n", imsi, msisdn); + + return 0; +} + /*********************************************************************** * Send Auth Info handling ***********************************************************************/ @@ -161,6 +235,8 @@ struct msgb *msg_out; int rc; + subscr_create_on_demand(gsup->imsi); + /* initialize return message structure */ memset(&gsup_out, 0, sizeof(gsup_out)); memcpy(&gsup_out.imsi, &gsup->imsi, sizeof(gsup_out.imsi)); @@ -291,6 +367,8 @@ } llist_add(&luop->list, &g_lu_ops); + subscr_create_on_demand(gsup->imsi); + /* Roughly follwing "Process Update_Location_HLR" of TS 09.02 */ /* check if subscriber is known at all */ @@ -415,6 +493,8 @@ return -1; } + subscr_create_on_demand(gsup->imsi); + /* Save in DB if desired */ if (g_hlr->store_imei) { LOGP(DAUC, LOGL_DEBUG, "IMSI='%s': storing IMEI = %s\n", gsup->imsi, imei); diff --git a/src/hlr.h b/src/hlr.h index e2e96a4..18c4a1d 100644 --- a/src/hlr.h +++ b/src/hlr.h @@ -56,6 +56,11 @@ struct llist_head ss_sessions; bool store_imei; + + bool subscr_create_on_demand; + /* Bitmask of DB_SUBSCR_FLAG_* */ + uint8_t subscr_create_on_demand_flags; + unsigned int subscr_create_on_demand_rand_msisdn_len; }; extern struct hlr *g_hlr; diff --git a/src/hlr_vty.c b/src/hlr_vty.c index e4cc4be..e6567cc 100644 --- a/src/hlr_vty.c +++ b/src/hlr_vty.c @@ -33,6 +33,7 @@ #include #include +#include "db.h" #include "hlr.h" #include "hlr_vty.h" #include "hlr_vty_subscr.h" @@ -76,6 +77,23 @@ vty_out(vty, " store-imei%s", VTY_NEWLINE); if (g_hlr->db_file_path && strcmp(g_hlr->db_file_path, HLR_DEFAULT_DB_FILE_PATH)) vty_out(vty, " database %s%s", g_hlr->db_file_path, VTY_NEWLINE); + if (g_hlr->subscr_create_on_demand) { + const char *flags_str = "none"; + uint8_t flags = g_hlr->subscr_create_on_demand_flags; + unsigned int rand_msisdn_len = g_hlr->subscr_create_on_demand_rand_msisdn_len; + + if ((flags & DB_SUBSCR_FLAG_NAM_CS) && (flags & DB_SUBSCR_FLAG_NAM_PS)) + flags_str = "cs+ps"; + else if (flags & DB_SUBSCR_FLAG_NAM_CS) + flags_str = "cs"; + else if (flags & DB_SUBSCR_FLAG_NAM_PS) + flags_str = "ps"; + + if (rand_msisdn_len) + vty_out(vty, " subscriber-create-on-demand %i %s%s", rand_msisdn_len, flags_str, VTY_NEWLINE); + else + vty_out(vty, " subscriber-create-on-demand no-msisdn %s%s", flags_str, VTY_NEWLINE); + } return CMD_SUCCESS; } @@ -336,6 +354,42 @@ return CMD_SUCCESS; } +DEFUN(cfg_subscr_create_on_demand, cfg_subscr_create_on_demand_cmd, + "subscriber-create-on-demand (no-msisdn|<3-15>) (none|cs|ps|cs+ps)", + "Make a new record when a subscriber is first seen.\n" + "Do not automatically assign MSISDN.\n" + "Length of an automatically assigned MSISDN.\n" + "Do not allow any NAM (Network Access Mode) by default.\n" + "Allow access to circuit switched NAM by default.\n" + "Allow access to packet switched NAM by default.\n" + "Allow access to circuit and packet switched NAM by default.\n") +{ + unsigned int rand_msisdn_len = 0; + uint8_t flags = 0x00; + + if (strcmp(argv[0], "no-msisdn") != 0) + rand_msisdn_len = atoi(argv[0]); + + if (strstr(argv[1], "cs")) + flags |= DB_SUBSCR_FLAG_NAM_CS; + if (strstr(argv[1], "ps")) + flags |= DB_SUBSCR_FLAG_NAM_PS; + + g_hlr->subscr_create_on_demand = true; + g_hlr->subscr_create_on_demand_rand_msisdn_len = rand_msisdn_len; + g_hlr->subscr_create_on_demand_flags = flags; + + return CMD_SUCCESS; +} + +DEFUN(cfg_no_subscr_create_on_demand, cfg_no_subscr_create_on_demand_cmd, + "no subscriber-create-on-demand", + "Do not make a new record when a subscriber is first seen.\n") +{ + g_hlr->subscr_create_on_demand = false; + return CMD_SUCCESS; +} + /*********************************************************************** * Common Code ***********************************************************************/ @@ -404,6 +458,8 @@ install_element(HLR_NODE, &cfg_ncss_guard_timeout_cmd); install_element(HLR_NODE, &cfg_store_imei_cmd); install_element(HLR_NODE, &cfg_no_store_imei_cmd); + install_element(HLR_NODE, &cfg_subscr_create_on_demand_cmd); + install_element(HLR_NODE, &cfg_no_subscr_create_on_demand_cmd); hlr_vty_subscriber_init(); } diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty index a4e53db..bf2afaf 100644 --- a/tests/test_nodes.vty +++ b/tests/test_nodes.vty @@ -86,6 +86,8 @@ ncss-guard-timeout <0-255> store-imei no store-imei + subscriber-create-on-demand (no-msisdn|<3-15>) (none|cs|ps|cs+ps) + no subscriber-create-on-demand OsmoHLR(config-hlr)# gsup OsmoHLR(config-hlr-gsup)# list diff --git a/tests/test_subscr_create_on_demand.vty b/tests/test_subscr_create_on_demand.vty new file mode 100644 index 0000000..fb587ae --- /dev/null +++ b/tests/test_subscr_create_on_demand.vty @@ -0,0 +1,43 @@ +OsmoHLR> enable +OsmoHLR# configure terminal +OsmoHLR(config)# hlr + +OsmoHLR(config-hlr)# subscriber-create-on-demand no-msisdn none +OsmoHLR(config-hlr)# show running-config +... +hlr +... + subscriber-create-on-demand no-msisdn none +... + +OsmoHLR(config-hlr)# subscriber-create-on-demand 3 none +OsmoHLR(config-hlr)# show running-config +... +hlr +... + subscriber-create-on-demand 3 none +... + +OsmoHLR(config-hlr)# subscriber-create-on-demand 4 cs +OsmoHLR(config-hlr)# show running-config +... +hlr +... + subscriber-create-on-demand 4 cs +... + +OsmoHLR(config-hlr)# subscriber-create-on-demand 5 ps +OsmoHLR(config-hlr)# show running-config +... +hlr +... + subscriber-create-on-demand 5 ps +... + +OsmoHLR(config-hlr)# subscriber-create-on-demand 6 cs+ps +OsmoHLR(config-hlr)# show running-config +... +hlr +... + subscriber-create-on-demand 6 cs+ps +... -- To view, visit https://gerrit.osmocom.org/13713 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd Gerrit-Change-Number: 13713 Gerrit-PatchSet: 8 Gerrit-Owner: Vadim Yanitskiy Gerrit-Assignee: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 10:31:22 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 10:31:22 +0000 Subject: Change in osmo-hlr[master]: Document subscribers create on demand feature In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13715 ) Change subject: Document subscribers create on demand feature ...................................................................... Document subscribers create on demand feature Add a new section in the subscribers chapter, with detailed explanation of the use cases and related OsmoHLR and OsmoMSC configuration. Related: OS#2542 Change-Id: I2dd4a56f7b8be8b5d0e6fc32e04459e5e278d0a9 --- M doc/manuals/chapters/subscribers.adoc 1 file changed, 21 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, approved Harald Welte: Looks good to me, approved diff --git a/doc/manuals/chapters/subscribers.adoc b/doc/manuals/chapters/subscribers.adoc index bb57d24..9f87131 100644 --- a/doc/manuals/chapters/subscribers.adoc +++ b/doc/manuals/chapters/subscribers.adoc @@ -67,3 +67,24 @@ |ms_purged_ps|1|3GPP TS 23.008 chapter 2.7.6 |=== +=== Configuring the Subscribers Create on Demand Feature + +Usually a HLR will only allow mobile equipment (ME) on the network, if the HLR +has a subscriber entry with the ME's IMSI. But OsmoHLR can also be configured to +automatically create new entries for new IMSIs, with the +subscriber-create-on-demand VTY option. The obvious use case is creating the +new subscriber entry and then allowing the ME to use both the CS +(Circuit Switched) and PS (Packet Switched) NAM (Network Access Mode). + +On the other hand, operators might only want to give network access to IMSIs, of +which they know the owner. In order to do that, one can set the default NAM to +"none" and manually approve new subscribers by enabling their nam_cs and nam_ps +parameters (e.g. over the VTY). + +Oftentimes it is hard to know, which IMSI belongs to which ME, but the IMEI is +readily available. If you configure your MSC to send IMEI checking requests to +the HLR, before sending location update requests, the subscribers created on +demand can also have the IMEI stored in the HLR database. With OsmoMSC, this +is done by writing "check-imei-rqd early" in the "msc" section of osmo-msc.cfg. +Then enable storing the IMEI when receiving check IMEI requests with +"store-imei" in the OsmoHLR configuration. -- To view, visit https://gerrit.osmocom.org/13715 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I2dd4a56f7b8be8b5d0e6fc32e04459e5e278d0a9 Gerrit-Change-Number: 13715 Gerrit-PatchSet: 9 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 10:32:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 10:32:33 +0000 Subject: Change in openbsc[master]: nat: Allocate bsc_nat_parsed on the stack instead of heap In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13843 ) Change subject: nat: Allocate bsc_nat_parsed on the stack instead of heap ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13843 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I66c44890952339f15131081e2f629a2824b6d3ba Gerrit-Change-Number: 13843 Gerrit-PatchSet: 5 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 21 May 2019 10:32:33 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 10:32:35 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 10:32:35 +0000 Subject: Change in openbsc[master]: nat: Allocate bsc_nat_parsed on the stack instead of heap In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13843 ) Change subject: nat: Allocate bsc_nat_parsed on the stack instead of heap ...................................................................... nat: Allocate bsc_nat_parsed on the stack instead of heap There's no real need to allocate it using talloc. Allocating it on the stack simplifies the code, avoids mem leaks and makes it faster. Change-Id: I66c44890952339f15131081e2f629a2824b6d3ba --- M openbsc/include/openbsc/bsc_nat.h M openbsc/src/osmo-bsc_nat/bsc_filter.c M openbsc/src/osmo-bsc_nat/bsc_nat.c M openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c M openbsc/src/osmo-bsc_nat/bsc_ussd.c M openbsc/tests/bsc-nat/bsc_nat_test.c 6 files changed, 136 insertions(+), 174 deletions(-) Approvals: Daniel Willmann: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h index 3eba70d..86134be 100644 --- a/openbsc/include/openbsc/bsc_nat.h +++ b/openbsc/include/openbsc/bsc_nat.h @@ -356,10 +356,7 @@ const char *bsc_con_type_to_string(int type); -/** - * parse the given message into the above structure - */ -struct bsc_nat_parsed *bsc_nat_parse(struct msgb *msg); +int bsc_nat_parse(struct msgb *msg, struct bsc_nat_parsed *parsed); /** * filter based on IP Access header in both directions diff --git a/openbsc/src/osmo-bsc_nat/bsc_filter.c b/openbsc/src/osmo-bsc_nat/bsc_filter.c index 432529e..a878682 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_filter.c +++ b/openbsc/src/osmo-bsc_nat/bsc_filter.c @@ -72,19 +72,24 @@ { IPAC_PROTO_MGCP_OLD, ALLOW_ANY, ALLOW_ANY, ALLOW_ANY, FILTER_TO_BOTH }, }; -struct bsc_nat_parsed *bsc_nat_parse(struct msgb *msg) + /*! Parse the given message into the parsed structure. + * \param[in] msg the IPA message to parse + * \param[out] parsed the structure to fill with parsed values + * \returns 0 on success, negative on error + */ +int bsc_nat_parse(struct msgb *msg, struct bsc_nat_parsed *parsed) { struct sccp_parse_result result; - struct bsc_nat_parsed *parsed; struct ipaccess_head *hh; /* quick fail */ if (msg->len < 4) - return NULL; + return -1; - parsed = talloc_zero(msg, struct bsc_nat_parsed); if (!parsed) - return NULL; + return -1; + + memset(parsed, 0, sizeof(*parsed)); /* more init */ parsed->ipa_proto = parsed->called_ssn = parsed->calling_ssn = -1; @@ -99,22 +104,19 @@ /* do a size check on the input */ if (ntohs(hh->len) != msgb_l2len(msg)) { LOGP(DLINP, LOGL_ERROR, "Wrong input length?\n"); - talloc_free(parsed); - return NULL; + return -1; } /* analyze sccp down here */ if (parsed->ipa_proto == IPAC_PROTO_SCCP) { memset(&result, 0, sizeof(result)); if (sccp_parse_header(msg, &result) != 0) { - talloc_free(parsed); - return 0; + return -1; } if (msg->l3h && msgb_l3len(msg) < 3) { LOGP(DNAT, LOGL_ERROR, "Not enough space or GSM payload\n"); - talloc_free(parsed); - return 0; + return -1; } parsed->sccp_type = sccp_determine_msg_type(msg); @@ -132,7 +134,7 @@ } } - return parsed; + return 0; } /* Returns 0 if message is whitelisted (has to beforwarded by bsc-nat), 1 if diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c index 30e4b34..2e2eac0 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c @@ -696,24 +696,23 @@ { struct nat_sccp_connection *con = NULL; struct bsc_connection *bsc; - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; int proto; /* filter, drop, patch the message? */ - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { LOGP(DNAT, LOGL_ERROR, "Can not parse msg from BSC.\n"); return -1; } - if (bsc_nat_filter_ipa(DIR_BSC, msg, parsed)) + if (bsc_nat_filter_ipa(DIR_BSC, msg, &parsed)) goto exit; - proto = parsed->ipa_proto; + proto = parsed.ipa_proto; /* Route and modify the SCCP packet */ if (proto == IPAC_PROTO_SCCP) { - switch (parsed->sccp_type) { + switch (parsed.sccp_type) { case SCCP_MSG_TYPE_UDT: /* forward UDT messages to every BSC */ goto send_to_all; @@ -722,8 +721,8 @@ case SCCP_MSG_TYPE_CREF: case SCCP_MSG_TYPE_DT1: case SCCP_MSG_TYPE_IT: - con = patch_sccp_src_ref_to_bsc(msg, parsed, nat); - if (parsed->gsm_type == BSS_MAP_MSG_ASSIGMENT_RQST) { + con = patch_sccp_src_ref_to_bsc(msg, &parsed, nat); + if (parsed.gsm_type == BSS_MAP_MSG_ASSIGMENT_RQST) { osmo_counter_inc(nat->stats.sccp.calls); if (con) { @@ -735,14 +734,14 @@ } else LOGP(DNAT, LOGL_ERROR, "Assignment command but no BSC.\n"); } else if (con && con->con_local == NAT_CON_END_USSD && - parsed->gsm_type == BSS_MAP_MSG_CLEAR_CMD) { + parsed.gsm_type == BSS_MAP_MSG_CLEAR_CMD) { LOGP(DNAT, LOGL_NOTICE, "Clear Command for USSD Connection. Ignoring.\n"); con = NULL; } break; case SCCP_MSG_TYPE_CC: - con = patch_sccp_src_ref_to_bsc(msg, parsed, nat); - if (!con || update_sccp_src_ref(con, parsed) != 0) + con = patch_sccp_src_ref_to_bsc(msg, &parsed, nat); + if (!con || update_sccp_src_ref(con, &parsed) != 0) goto exit; break; case SCCP_MSG_TYPE_RLC: @@ -755,27 +754,24 @@ goto exit; } - if (!con && parsed->sccp_type == SCCP_MSG_TYPE_RLSD) { + if (!con && parsed.sccp_type == SCCP_MSG_TYPE_RLSD) { LOGP(DNAT, LOGL_NOTICE, "Sending fake RLC on RLSD message to network.\n"); /* Exchange src/dest for the reply */ - nat_send_rlc(msc_con, &parsed->original_dest_ref, - parsed->src_local_ref); + nat_send_rlc(msc_con, &parsed.original_dest_ref, + parsed.src_local_ref); } else if (!con) - LOGP(DNAT, LOGL_ERROR, "Unknown connection for msg type: 0x%x from the MSC.\n", parsed->sccp_type); + LOGP(DNAT, LOGL_ERROR, "Unknown connection for msg type: 0x%x from the MSC.\n", parsed.sccp_type); } - if (!con) { - talloc_free(parsed); + if (!con) return -1; - } + if (!con->bsc->authenticated) { - talloc_free(parsed); LOGP(DNAT, LOGL_ERROR, "Selected BSC not authenticated.\n"); return -1; } - update_con_authorize(con, parsed, msg); - talloc_free(parsed); + update_con_authorize(con, &parsed, msg); bsc_send_data(con->bsc, msg->l2h, msgb_l2len(msg), proto); return 0; @@ -786,7 +782,7 @@ * Command to every BSC in our network. We will analys the PAGING * message and then send it to the authenticated messages... */ - if (parsed->ipa_proto == IPAC_PROTO_SCCP && parsed->gsm_type == BSS_MAP_MSG_PAGING) { + if (parsed.ipa_proto == IPAC_PROTO_SCCP && parsed.gsm_type == BSS_MAP_MSG_PAGING) { bsc_nat_handle_paging(nat, msg); goto exit; } @@ -795,11 +791,10 @@ if (!bsc->authenticated) continue; - bsc_send_data(bsc, msg->l2h, msgb_l2len(msg), parsed->ipa_proto); + bsc_send_data(bsc, msg->l2h, msgb_l2len(msg), parsed.ipa_proto); } exit: - talloc_free(parsed); return 0; } @@ -1130,19 +1125,19 @@ struct bsc_msc_connection *con_msc = NULL; struct bsc_connection *con_bsc = NULL; int con_type; - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; struct bsc_filter_reject_cause cause; *bsc_conn_closed = false; /* Parse and filter messages */ - parsed = bsc_nat_parse(msg); - if (!parsed) { + bool parsed_ok = bsc_nat_parse(msg, &parsed) == 0; + if (!parsed_ok) { LOGP(DNAT, LOGL_ERROR, "Can not parse msg from BSC.\n"); msgb_free(msg); return -1; } - if (bsc_nat_filter_ipa(DIR_MSC, msg, parsed)) + if (bsc_nat_filter_ipa(DIR_MSC, msg, &parsed)) goto exit; /* @@ -1157,32 +1152,32 @@ /* modify the SCCP entries */ - if (parsed->ipa_proto == IPAC_PROTO_SCCP) { + if (parsed.ipa_proto == IPAC_PROTO_SCCP) { int filter; struct nat_sccp_connection *con; - switch (parsed->sccp_type) { + switch (parsed.sccp_type) { case SCCP_MSG_TYPE_CR: memset(&cause, 0, sizeof(cause)); - filter = bsc_nat_filter_sccp_cr(bsc, msg, parsed, + filter = bsc_nat_filter_sccp_cr(bsc, msg, &parsed, &con_type, &imsi, &cause); if (filter < 0) { if (imsi) bsc_nat_inform_reject(bsc, imsi); bsc_stat_reject(filter, bsc, 0); /* send a SCCP Connection Refused */ - bsc_send_con_refuse(bsc, parsed, con_type, &cause); + bsc_send_con_refuse(bsc, &parsed, con_type, &cause); goto exit2; } - if (!create_sccp_src_ref(bsc, parsed)) + if (!create_sccp_src_ref(bsc, &parsed)) goto exit2; - con = patch_sccp_src_ref_to_msc(msg, parsed, bsc); + con = patch_sccp_src_ref_to_msc(msg, &parsed, bsc); OSMO_ASSERT(con); con->msc_con = bsc->nat->msc_con; con_msc = con->msc_con; con->filter_state.con_type = con_type; con->filter_state.imsi_checked = filter; - bsc_nat_extract_lac(bsc, con, parsed, msg); + bsc_nat_extract_lac(bsc, con, &parsed, msg); if (imsi) con->filter_state.imsi = talloc_steal(con, imsi); imsi = NULL; @@ -1194,13 +1189,13 @@ case SCCP_MSG_TYPE_DT1: case SCCP_MSG_TYPE_CC: case SCCP_MSG_TYPE_IT: - con = patch_sccp_src_ref_to_msc(msg, parsed, bsc); + con = patch_sccp_src_ref_to_msc(msg, &parsed, bsc); if (con) { /* only filter non local connections */ if (!con->con_local) { memset(&cause, 0, sizeof(cause)); filter = bsc_nat_filter_dt(bsc, msg, - con, parsed, &cause); + con, &parsed, &cause); if (filter < 0) { if (con->filter_state.imsi) bsc_nat_inform_reject(bsc, @@ -1212,20 +1207,19 @@ } /* hand data to a side channel */ - if (bsc_ussd_check(con, parsed, msg) == 1) + if (bsc_ussd_check(con, &parsed, msg) == 1) con->con_local = NAT_CON_END_USSD; /* * Optionally rewrite setup message. This can - * replace the msg and the parsed structure becomes - * invalid. + * replace the msg and hence data in struct parsed + * becomes invalid. */ - msg = bsc_nat_rewrite_msg(bsc->nat, msg, parsed, + msg = bsc_nat_rewrite_msg(bsc->nat, msg, &parsed, con->filter_state.imsi); - talloc_free(parsed); - parsed = NULL; + parsed_ok = false; } else if (con->con_local == NAT_CON_END_USSD) { - bsc_ussd_check(con, parsed, msg); + bsc_ussd_check(con, &parsed, msg); } con_bsc = con->bsc; @@ -1235,13 +1229,13 @@ break; case SCCP_MSG_TYPE_RLC: - con = patch_sccp_src_ref_to_msc(msg, parsed, bsc); + con = patch_sccp_src_ref_to_msc(msg, &parsed, bsc); if (con) { con_bsc = con->bsc; con_msc = con->msc_con; con_filter = con->con_local; } - remove_sccp_src_ref(bsc, msg, parsed); + remove_sccp_src_ref(bsc, msg, &parsed); *bsc_conn_closed = bsc_maybe_close(bsc); break; case SCCP_MSG_TYPE_UDT: @@ -1249,16 +1243,16 @@ con = NULL; break; default: - LOGP(DNAT, LOGL_ERROR, "Not forwarding to msc sccp type: 0x%x\n", parsed->sccp_type); + LOGP(DNAT, LOGL_ERROR, "Not forwarding to msc sccp type: 0x%x\n", parsed.sccp_type); con = NULL; goto exit2; break; } - } else if (parsed->ipa_proto == IPAC_PROTO_MGCP_OLD) { + } else if (parsed.ipa_proto == IPAC_PROTO_MGCP_OLD) { bsc_mgcp_forward(bsc, msg); goto exit2; } else { - LOGP(DNAT, LOGL_ERROR, "Not forwarding unknown stream id: 0x%x\n", parsed->ipa_proto); + LOGP(DNAT, LOGL_ERROR, "Not forwarding unknown stream id: 0x%x\n", parsed.ipa_proto); goto exit2; } @@ -1275,22 +1269,21 @@ if (!con_msc) { LOGP(DNAT, LOGL_ERROR, "Not forwarding data bsc_nr: %d ipa: %d type: 0x%x\n", bsc->cfg->nr, - parsed ? parsed->ipa_proto : -1, - parsed ? parsed->sccp_type : -1); + parsed_ok ? parsed.ipa_proto : -1, + parsed_ok ? parsed.sccp_type : -1); goto exit2; } /* send the non-filtered but maybe modified msg */ - talloc_free(parsed); queue_for_msc(con_msc, msg); return 0; exit: /* if we filter out the reset send an ack to the BSC */ - if (parsed->bssap == 0 && parsed->gsm_type == BSS_MAP_MSG_RESET) { + if (parsed.bssap == 0 && parsed.gsm_type == BSS_MAP_MSG_RESET) { send_reset_ack(bsc); - } else if (parsed->ipa_proto == IPAC_PROTO_IPACCESS) { + } else if (parsed.ipa_proto == IPAC_PROTO_IPACCESS) { /* do we know who is handling this? */ if (msg->l2h[0] == IPAC_MSGT_ID_RESP && msgb_l2len(msg) > 2) { struct tlv_parsed tvp; @@ -1315,7 +1308,6 @@ exit2: if (imsi) talloc_free(imsi); - talloc_free(parsed); msgb_free(msg); return -1; } diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c b/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c index e7c387c..1dd2ada 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c @@ -618,8 +618,6 @@ ipa_prepend_header(sccp, IPAC_PROTO_SCCP); - /* the parsed hangs off from msg but it needs to survive */ - talloc_steal(sccp, parsed); msgb_free(msg); return sccp; } diff --git a/openbsc/src/osmo-bsc_nat/bsc_ussd.c b/openbsc/src/osmo-bsc_nat/bsc_ussd.c index dea1807..d44b1b2 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_ussd.c +++ b/openbsc/src/osmo-bsc_nat/bsc_ussd.c @@ -90,30 +90,27 @@ static int forward_sccp(struct bsc_nat *nat, struct msgb *msg) { struct nat_sccp_connection *con; - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; - - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { LOGP(DNAT, LOGL_ERROR, "Can not parse msg from USSD.\n"); msgb_free(msg); return -1; } - if (!parsed->dest_local_ref) { + if (!parsed.dest_local_ref) { LOGP(DNAT, LOGL_ERROR, "No destination local reference.\n"); msgb_free(msg); return -1; } - con = bsc_nat_find_con_by_bsc(nat, parsed->dest_local_ref); + con = bsc_nat_find_con_by_bsc(nat, parsed.dest_local_ref); if (!con || !con->bsc) { LOGP(DNAT, LOGL_ERROR, "No active connection found.\n"); msgb_free(msg); return -1; } - talloc_free(parsed); bsc_write_msg(&con->bsc->write_queue, msg); return 0; } diff --git a/openbsc/tests/bsc-nat/bsc_nat_test.c b/openbsc/tests/bsc-nat/bsc_nat_test.c index e0d0051..4bee60d 100644 --- a/openbsc/tests/bsc-nat/bsc_nat_test.c +++ b/openbsc/tests/bsc-nat/bsc_nat_test.c @@ -235,20 +235,19 @@ printf("Testing BSS Filtering.\n"); for (i = 0; i < ARRAY_SIZE(results); ++i) { int result; - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; struct msgb *msg = msgb_alloc(4096, "test-message"); printf("Going to test item: %d\n", i); memcpy(msg->data, results[i].data, results[i].length); msg->l2h = msgb_put(msg, results[i].length); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Failed to parse the message\n"); continue; } - result = bsc_nat_filter_ipa(results[i].dir, msg, parsed); + result = bsc_nat_filter_ipa(results[i].dir, msg, &parsed); if (result != results[i].result) { printf("FAIL: Not the expected result got: %d wanted: %d\n", result, results[i].result); @@ -310,7 +309,7 @@ struct bsc_connection *con; struct nat_sccp_connection *con_found; struct nat_sccp_connection *rc_con; - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; struct msgb *msg; printf("Testing connection tracking.\n"); @@ -326,19 +325,19 @@ /* 1.) create a connection */ copy_to_msg(msg, bsc_cr, sizeof(bsc_cr)); - parsed = bsc_nat_parse(msg); - con_found = patch_sccp_src_ref_to_msc(msg, parsed, con); + OSMO_ASSERT(bsc_nat_parse(msg, &parsed) == 0); + con_found = patch_sccp_src_ref_to_msc(msg, &parsed, con); if (con_found != NULL) { printf("Con should not exist realref(%u)\n", sccp_src_ref_to_int(&con_found->real_ref)); abort(); } - rc_con = create_sccp_src_ref(con, parsed); + rc_con = create_sccp_src_ref(con, &parsed); if (!rc_con) { printf("Failed to create a ref\n"); abort(); } - con_found = patch_sccp_src_ref_to_msc(msg, parsed, con); + con_found = patch_sccp_src_ref_to_msc(msg, &parsed, con); if (!con_found) { printf("Failed to find connection.\n"); abort(); @@ -356,40 +355,39 @@ printf("Failed to patch the BSC CR msg.\n"); abort(); } - talloc_free(parsed); /* 2.) get the cc */ copy_to_msg(msg, msc_cc, sizeof(msc_cc)); - parsed = bsc_nat_parse(msg); - con_found = patch_sccp_src_ref_to_bsc(msg, parsed, nat); + OSMO_ASSERT(bsc_nat_parse(msg, &parsed) == 0); + con_found = patch_sccp_src_ref_to_bsc(msg, &parsed, nat); VERIFY(con_found, con, msg, msc_cc_patched, "MSC CC"); - if (update_sccp_src_ref(con_found, parsed) != 0) { + if (update_sccp_src_ref(con_found, &parsed) != 0) { printf("Failed to update the SCCP con.\n"); abort(); } /* 3.) send some data */ copy_to_msg(msg, bsc_dtap, sizeof(bsc_dtap)); - parsed = bsc_nat_parse(msg); - con_found = patch_sccp_src_ref_to_msc(msg, parsed, con); + OSMO_ASSERT(bsc_nat_parse(msg, &parsed) == 0); + con_found = patch_sccp_src_ref_to_msc(msg, &parsed, con); VERIFY(con_found, con, msg, bsc_dtap_patched, "BSC DTAP"); /* 4.) receive some data */ copy_to_msg(msg, msc_dtap, sizeof(msc_dtap)); - parsed = bsc_nat_parse(msg); - con_found = patch_sccp_src_ref_to_bsc(msg, parsed, nat); + OSMO_ASSERT(bsc_nat_parse(msg, &parsed) == 0); + con_found = patch_sccp_src_ref_to_bsc(msg, &parsed, nat); VERIFY(con_found, con, msg, msc_dtap_patched, "MSC DTAP"); /* 5.) close the connection */ copy_to_msg(msg, msc_rlsd, sizeof(msc_rlsd)); - parsed = bsc_nat_parse(msg); - con_found = patch_sccp_src_ref_to_bsc(msg, parsed, nat); + OSMO_ASSERT(bsc_nat_parse(msg, &parsed) == 0); + con_found = patch_sccp_src_ref_to_bsc(msg, &parsed, nat); VERIFY(con_found, con, msg, msc_rlsd_patched, "MSC RLSD"); /* 6.) confirm the connection close */ copy_to_msg(msg, bsc_rlc, sizeof(bsc_rlc)); - parsed = bsc_nat_parse(msg); - con_found = patch_sccp_src_ref_to_msc(msg, parsed, con); + OSMO_ASSERT(bsc_nat_parse(msg, &parsed) == 0); + con_found = patch_sccp_src_ref_to_msc(msg, &parsed, con); if (!con_found) { printf("Failed to find connection.\n"); abort(); @@ -403,12 +401,11 @@ printf("Failed to patch the BSC CR msg.\n"); abort(); } - remove_sccp_src_ref(con, msg, parsed); - talloc_free(parsed); + remove_sccp_src_ref(con, msg, &parsed); copy_to_msg(msg, bsc_rlc, sizeof(bsc_rlc)); - parsed = bsc_nat_parse(msg); - con_found = patch_sccp_src_ref_to_msc(msg, parsed, con); + OSMO_ASSERT(bsc_nat_parse(msg, &parsed) == 0); + con_found = patch_sccp_src_ref_to_msc(msg, &parsed, con); /* verify that it is gone */ if (con_found != NULL) { @@ -416,8 +413,6 @@ sccp_src_ref_to_int(&con_found->real_ref)); abort(); } - talloc_free(parsed); - bsc_config_free(con->cfg); bsc_nat_free(nat); @@ -507,7 +502,7 @@ struct bsc_connection *bsc; struct bsc_nat *nat; struct nat_sccp_connection con; - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; struct msgb *msg; printf("Testing MGCP.\n"); @@ -529,7 +524,7 @@ msg = msgb_alloc(4096, "foo"); copy_to_msg(msg, ass_cmd, sizeof(ass_cmd)); - parsed = bsc_nat_parse(msg); + OSMO_ASSERT(bsc_nat_parse(msg, &parsed) == 0); if (msg->l2h[16] != 0 || msg->l2h[17] != 0x1) { @@ -568,8 +563,6 @@ abort(); } - talloc_free(parsed); - bsc_mgcp_dlcx(&con); if (con.bsc_endp != -1 || con.msc_endp != -1 || con.bsc->_endpoint_status[1] != 0 || con.bsc->last_endpoint != 0x1) { @@ -867,7 +860,7 @@ { int i, res, contype; struct msgb *msg = msgb_alloc(4096, "test_cr_filter"); - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; struct bsc_msg_acc_lst *nat_lst, *bsc_lst; struct bsc_msg_acc_lst_entry *nat_entry, *bsc_entry; struct bsc_filter_reject_cause cause; @@ -912,14 +905,13 @@ &cr_filter[i].bsc_imsi_deny) != 0) abort(); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Failed to parse the message\n"); abort(); } memset(&cause, 0, sizeof(cause)); - res = bsc_nat_filter_sccp_cr(bsc, msg, parsed, &contype, &imsi, &cause); + res = bsc_nat_filter_sccp_cr(bsc, msg, &parsed, &contype, &imsi, &cause); if (res != cr_filter[i].result) { printf("FAIL: Wrong result %d for test %d.\n", res, i); abort(); @@ -934,8 +926,7 @@ abort(); } - talloc_steal(parsed, imsi); - talloc_free(parsed); + talloc_free(imsi); } msgb_free(msg); @@ -946,7 +937,7 @@ { int i; struct msgb *msg = msgb_alloc(4096, "test_dt_filter"); - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; struct bsc_filter_reject_cause cause; struct bsc_nat *nat = bsc_nat_alloc(); @@ -960,26 +951,25 @@ msgb_reset(msg); copy_to_msg(msg, id_resp, ARRAY_SIZE(id_resp)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse ID resp\n"); abort(); } - if (parsed->bssap != BSSAP_MSG_DTAP) { + if (parsed.bssap != BSSAP_MSG_DTAP) { printf("FAIL: It should be dtap\n"); abort(); } /* gsm_type is actually the size of the dtap */ - if (parsed->gsm_type < msgb_l3len(msg) - 3) { + if (parsed.gsm_type < msgb_l3len(msg) - 3) { printf("FAIL: Not enough space for the content\n"); abort(); } memset(&cause, 0, sizeof(cause)); OSMO_ASSERT(!con->filter_state.imsi); - if (bsc_nat_filter_dt(bsc, msg, con, parsed, &cause) != 1) { + if (bsc_nat_filter_dt(bsc, msg, con, &parsed, &cause) != 1) { printf("FAIL: Should have passed..\n"); abort(); } @@ -991,13 +981,13 @@ msgb_reset(msg); copy_to_msg(msg, id_resp, ARRAY_SIZE(id_resp)); - parsed = bsc_nat_parse(msg); - if (!parsed) + if (bsc_nat_parse(msg, &parsed) < 0) continue; + con->filter_state.imsi_checked = 0; memset(&cause, 0, sizeof(cause)); - bsc_nat_filter_dt(bsc, msg, con, parsed, &cause); + bsc_nat_filter_dt(bsc, msg, con, &parsed, &cause); } msgb_free(msg); @@ -1008,7 +998,7 @@ { struct msgb *msg = msgb_alloc(4096, "test_dt_filter"); struct msgb *out; - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; const char *imsi = "27408000001234"; struct bsc_nat *nat = bsc_nat_alloc(); @@ -1028,31 +1018,28 @@ /* verify that nothing changed */ msgb_reset(msg); copy_to_msg(msg, cc_setup_international, ARRAY_SIZE(cc_setup_international)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse ID resp\n"); abort(); } - out = bsc_nat_rewrite_msg(nat, msg, parsed, imsi); + out = bsc_nat_rewrite_msg(nat, msg, &parsed, imsi); if (msg != out) { printf("FAIL: The message should not have been changed\n"); abort(); } verify_msg(out, cc_setup_international, ARRAY_SIZE(cc_setup_international)); - talloc_free(parsed); /* verify that something in the message changes */ msgb_reset(msg); copy_to_msg(msg, cc_setup_national, ARRAY_SIZE(cc_setup_national)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse ID resp\n"); abort(); } - out = bsc_nat_rewrite_msg(nat, msg, parsed, imsi); + out = bsc_nat_rewrite_msg(nat, msg, &parsed, imsi); if (!out) { printf("FAIL: A new message should be created.\n"); abort(); @@ -1071,13 +1058,12 @@ bsc_nat_num_rewr_entry_adapt(nat, &nat->num_rewr, &entries); msg = msgb_alloc(4096, "test_dt_filter"); copy_to_msg(msg, cc_setup_national, ARRAY_SIZE(cc_setup_national)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse ID resp\n"); abort(); } - out = bsc_nat_rewrite_msg(nat, msg, parsed, imsi); + out = bsc_nat_rewrite_msg(nat, msg, &parsed, imsi); if (!out) { printf("FAIL: A new message should be created.\n"); abort(); @@ -1096,13 +1082,12 @@ bsc_nat_num_rewr_entry_adapt(nat, &nat->num_rewr, &entries); msg = msgb_alloc(4096, "test_dt_filter"); copy_to_msg(msg, cc_setup_national, ARRAY_SIZE(cc_setup_national)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse ID resp\n"); abort(); } - out = bsc_nat_rewrite_msg(nat, msg, parsed, imsi); + out = bsc_nat_rewrite_msg(nat, msg, &parsed, imsi); if (out != msg) { printf("FAIL: The message should be unchanged.\n"); abort(); @@ -1118,13 +1103,12 @@ bsc_nat_num_rewr_entry_adapt(nat, &nat->num_rewr, &entries); msg = msgb_alloc(4096, "test_dt_filter"); copy_to_msg(msg, cc_setup_national_patched, ARRAY_SIZE(cc_setup_national_patched)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse ID resp %d\n", __LINE__); abort(); } - out = bsc_nat_rewrite_msg(nat, msg, parsed, imsi); + out = bsc_nat_rewrite_msg(nat, msg, &parsed, imsi); if (!out) { printf("FAIL: A new message should be created %d.\n", __LINE__); abort(); @@ -1146,13 +1130,12 @@ bsc_nat_num_rewr_entry_adapt(nat, &nat->num_rewr, &entries); msg = msgb_alloc(4096, "test_dt_filter"); copy_to_msg(msg, cc_setup_national_patched, ARRAY_SIZE(cc_setup_national_patched)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse ID resp %d\n", __LINE__); abort(); } - out = bsc_nat_rewrite_msg(nat, msg, parsed, imsi); + out = bsc_nat_rewrite_msg(nat, msg, &parsed, imsi); if (!out) { printf("FAIL: A new message should be created %d.\n", __LINE__); abort(); @@ -1174,7 +1157,7 @@ { struct msgb *msg = msgb_alloc(4096, "test_dt_filter"); struct msgb *out; - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; const char *imsi = "27408000001234"; struct bsc_nat *nat = bsc_nat_alloc(); @@ -1195,13 +1178,12 @@ msgb_reset(msg); copy_to_msg(msg, cc_setup_national, ARRAY_SIZE(cc_setup_national)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse ID resp\n"); abort(); } - out = bsc_nat_rewrite_msg(nat, msg, parsed, imsi); + out = bsc_nat_rewrite_msg(nat, msg, &parsed, imsi); if (!out) { printf("FAIL: A new message should be created.\n"); abort(); @@ -1223,7 +1205,7 @@ { struct msgb *msg = msgb_alloc(4096, "test_dt_filter"); struct msgb *out; - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; const char *imsi = "27408000001234"; struct bsc_nat *nat = bsc_nat_alloc(); @@ -1255,13 +1237,12 @@ msgb_reset(msg); copy_to_msg(msg, cc_setup_national, ARRAY_SIZE(cc_setup_national)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse ID resp\n"); abort(); } - out = bsc_nat_rewrite_msg(nat, msg, parsed, imsi); + out = bsc_nat_rewrite_msg(nat, msg, &parsed, imsi); if (!out) { printf("FAIL: A new message should be created.\n"); abort(); @@ -1281,7 +1262,7 @@ static void test_sms_smsc_rewrite() { struct msgb *msg = msgb_alloc(4096, "SMSC rewrite"), *out; - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; const char *imsi = "515039900406700"; struct bsc_nat *nat = bsc_nat_alloc(); @@ -1317,13 +1298,12 @@ * Check if the SMSC address is changed */ copy_to_msg(msg, smsc_rewrite, ARRAY_SIZE(smsc_rewrite)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse SMS\n"); abort(); } - out = bsc_nat_rewrite_msg(nat, msg, parsed, imsi); + out = bsc_nat_rewrite_msg(nat, msg, &parsed, imsi); if (out == msg) { printf("FAIL: This should have changed.\n"); abort(); @@ -1337,13 +1317,12 @@ bsc_nat_num_rewr_entry_adapt(nat, &nat->smsc_rewr, NULL); msg = msgb_alloc(4096, "SMSC rewrite"); copy_to_msg(msg, smsc_rewrite, ARRAY_SIZE(smsc_rewrite)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse SMS\n"); abort(); } - out = bsc_nat_rewrite_msg(nat, msg, parsed, imsi); + out = bsc_nat_rewrite_msg(nat, msg, &parsed, imsi); if (out == msg) { printf("FAIL: This should have changed.\n"); abort(); @@ -1357,13 +1336,12 @@ bsc_nat_num_rewr_entry_adapt(nat, &nat->sms_clear_tp_srr, NULL); msg = msgb_alloc(4096, "SMSC rewrite"); copy_to_msg(msg, smsc_rewrite, ARRAY_SIZE(smsc_rewrite)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse SMS\n"); abort(); } - out = bsc_nat_rewrite_msg(nat, msg, parsed, imsi); + out = bsc_nat_rewrite_msg(nat, msg, &parsed, imsi); if (out != msg) { printf("FAIL: This should not have changed.\n"); abort(); @@ -1377,7 +1355,7 @@ static void test_sms_number_rewrite(void) { struct msgb *msg, *out; - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; const char *imsi = "515039900406700"; struct bsc_nat *nat = bsc_nat_alloc(); @@ -1401,13 +1379,12 @@ */ msg = msgb_alloc(4096, "SMSC rewrite"); copy_to_msg(msg, smsc_rewrite, ARRAY_SIZE(smsc_rewrite)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse SMS\n"); abort(); } - out = bsc_nat_rewrite_msg(nat, msg, parsed, imsi); + out = bsc_nat_rewrite_msg(nat, msg, &parsed, imsi); if (out == msg) { printf("FAIL: This should have changed.\n"); abort(); @@ -1429,13 +1406,12 @@ msg = msgb_alloc(4096, "SMSC rewrite"); copy_to_msg(msg, smsc_rewrite, ARRAY_SIZE(smsc_rewrite)); - parsed = bsc_nat_parse(msg); - if (!parsed) { + if (bsc_nat_parse(msg, &parsed) < 0) { printf("FAIL: Could not parse SMS\n"); abort(); } - out = bsc_nat_rewrite_msg(nat, msg, parsed, imsi); + out = bsc_nat_rewrite_msg(nat, msg, &parsed, imsi); if (out == msg) { printf("FAIL: This should have changed.\n"); abort(); @@ -1520,7 +1496,7 @@ struct bsc_connection *bsc; struct bsc_nat *nat; struct nat_sccp_connection con; - struct bsc_nat_parsed *parsed; + struct bsc_nat_parsed parsed; struct msgb *msg = msgb_alloc(4096, "test-message"); printf("Testing LAC extraction from SCCP CR\n"); @@ -1538,8 +1514,8 @@ memcpy(msg->l2h, bssmap_cr, ARRAY_SIZE(bssmap_cr)); /* parse it and pass it on */ - parsed = bsc_nat_parse(msg); - res = bsc_nat_extract_lac(bsc, &con, parsed, msg); + OSMO_ASSERT(bsc_nat_parse(msg, &parsed) == 0); + res = bsc_nat_extract_lac(bsc, &con, &parsed, msg); OSMO_ASSERT(res == 0); /* verify the LAC */ -- To view, visit https://gerrit.osmocom.org/13843 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I66c44890952339f15131081e2f629a2824b6d3ba Gerrit-Change-Number: 13843 Gerrit-PatchSet: 5 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 10:32:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 10:32:47 +0000 Subject: Change in docker-playground[master]: RFC: allow to set configuration and/or specific testcases In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14072 ) Change subject: RFC: allow to set configuration and/or specific testcases ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14072 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I17e480321f1e7bfa287349f438ff6990e30f1114 Gerrit-Change-Number: 14072 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Tue, 21 May 2019 10:32:47 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 10:32:48 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 10:32:48 +0000 Subject: Change in docker-playground[master]: RFC: allow to set configuration and/or specific testcases In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14072 ) Change subject: RFC: allow to set configuration and/or specific testcases ...................................................................... RFC: allow to set configuration and/or specific testcases Allows to pass the configuration file and/or tests to start-testsuite.sh. This way a single test can be specified by the command line. If this RFC gets accepted, I would convert all other Docker.files Change-Id: I17e480321f1e7bfa287349f438ff6990e30f1114 --- M ttcn3-sgsn-test/Dockerfile M ttcn3-sgsn-test/jenkins.sh 2 files changed, 11 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/ttcn3-sgsn-test/Dockerfile b/ttcn3-sgsn-test/Dockerfile index 4ea5daf..09e4ec6 100644 --- a/ttcn3-sgsn-test/Dockerfile +++ b/ttcn3-sgsn-test/Dockerfile @@ -27,8 +27,5 @@ COPY SGSN_Tests.cfg /data/SGSN_Tests.cfg -CMD cd /data && \ - /osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/sgsn/SGSN_Tests; \ - exit_code=$?; \ - /osmo-ttcn3-hacks/log_merge.sh SGSN_Tests --rm; \ - exit $exit_code +WORKDIR /data +ENTRYPOINT ["/osmo-ttcn3-hacks/start-testsuite.sh", "/osmo-ttcn3-hacks/sgsn/SGSN_Tests"] diff --git a/ttcn3-sgsn-test/jenkins.sh b/ttcn3-sgsn-test/jenkins.sh index 7947132..9505624 100755 --- a/ttcn3-sgsn-test/jenkins.sh +++ b/ttcn3-sgsn-test/jenkins.sh @@ -32,6 +32,15 @@ -e "TTCN3_PCAP_PATH=/data" \ -v $VOL_BASE_DIR/sgsn-tester:/data \ --name ${BUILD_TAG}-ttcn3-sgsn-test \ + $REPO_USER/ttcn3-sgsn-test $@ + +echo Starting container to merge logs +docker run --rm \ + --network $NET_NAME --ip 172.18.8.103 \ + -e "TTCN3_PCAP_PATH=/data" \ + -v $VOL_BASE_DIR/sgsn-tester:/data \ + --name ${BUILD_TAG}-ttcn3-sgsn-test-logmerge \ + --entrypoint /osmo-ttcn3-hacks/log_merge.sh SGSN_Tests --rm \ $REPO_USER/ttcn3-sgsn-test echo Stopping containers -- To view, visit https://gerrit.osmocom.org/14072 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I17e480321f1e7bfa287349f438ff6990e30f1114 Gerrit-Change-Number: 14072 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 10:33:00 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 10:33:00 +0000 Subject: Change in libosmocore[master]: lapdm_rslms_recvmsg: Fix memory leak in error path In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14082 ) Change subject: lapdm_rslms_recvmsg: Fix memory leak in error path ...................................................................... lapdm_rslms_recvmsg: Fix memory leak in error path The caller of lapdm_rslms_recvmsg() (e.g. osmo-bts/src/common/rsl.c) assumes the message ownership is transferred. However, in one of the two error paths, msgb_free() was not called and hence we had a memory leak. Also clarify the msgb ownership transfer in a comment. Related: OS#3750 Change-Id: Id60cb45e50bfc89224d97df6c68fcd2949751895 --- M src/gsm/lapdm.c 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, approved diff --git a/src/gsm/lapdm.c b/src/gsm/lapdm.c index ba9b3df..d76175b 100644 --- a/src/gsm/lapdm.c +++ b/src/gsm/lapdm.c @@ -1269,7 +1269,8 @@ return rc; } -/*! Receive a RSLms \ref msgb from Layer 3 */ +/*! Receive a RSLms \ref msgb from Layer 3. 'msg' ownership is transferred, + * i.e. caller must not free it */ int lapdm_rslms_recvmsg(struct msgb *msg, struct lapdm_channel *lc) { struct abis_rsl_common_hdr *rslh = msgb_l2(msg); @@ -1277,6 +1278,7 @@ if (msgb_l2len(msg) < sizeof(*rslh)) { LOGP(DLLAPD, LOGL_ERROR, "Message too short RSL hdr!\n"); + msgb_free(msg); return -EINVAL; } -- To view, visit https://gerrit.osmocom.org/14082 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id60cb45e50bfc89224d97df6c68fcd2949751895 Gerrit-Change-Number: 14082 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 10:33:12 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 10:33:12 +0000 Subject: Change in osmo-mgw[master]: osmux: Fix hardcoded rtp payload_type 98 in osmux conn In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14077 ) Change subject: osmux: Fix hardcoded rtp payload_type 98 in osmux conn ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14077 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I24698a9613bc0de9460c6ad2d1067c152ebcf0b2 Gerrit-Change-Number: 14077 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 21 May 2019 10:33:12 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 10:33:13 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 10:33:13 +0000 Subject: Change in osmo-mgw[master]: osmux: Fix hardcoded rtp payload_type 98 in osmux conn In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14077 ) Change subject: osmux: Fix hardcoded rtp payload_type 98 in osmux conn ...................................................................... osmux: Fix hardcoded rtp payload_type 98 in osmux conn Depends on: libosmo-netif.git I5cbeb494a8932953d9fd2dc24dacf8cd97fd84e4 Change-Id: I24698a9613bc0de9460c6ad2d1067c152ebcf0b2 --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 38657ee..72d3b91 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -473,9 +473,10 @@ return -1; } - osmux_xfrm_output_init(&conn->osmux.out, + osmux_xfrm_output_init2(&conn->osmux.out, (conn->osmux.cid * rtp_ssrc_winlen) + - (random() % rtp_ssrc_winlen)); + (random() % rtp_ssrc_winlen), + conn->end.codec->payload_type); osmux_xfrm_output_set_tx_cb(&conn->osmux.out, scheduled_from_osmux_tx_rtp_cb, conn); -- To view, visit https://gerrit.osmocom.org/14077 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I24698a9613bc0de9460c6ad2d1067c152ebcf0b2 Gerrit-Change-Number: 14077 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 12:12:41 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 21 May 2019 12:12:41 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Depend on our own fork of titan.ProtocolModules.BSSMAP In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/14104 ) Change subject: Depend on our own fork of titan.ProtocolModules.BSSMAP ...................................................................... Depend on our own fork of titan.ProtocolModules.BSSMAP Since we use some BSSMAP extensions to signal Osmux, we need to maintain our own fork of BSSMAP_Types in order to supports those IEs in BSSMAP RESET and BSSMAP Assin Req/Compl. Hence, switch all build componenets to fetch and use our fork. Depends: titan.ProtocolModules.BSSMAP Iaf1e137269c0da20b2c96fd104b57edf336693af Change-Id: Ic8debe5f3ffe8e1d4258fa6b4632a3871b99af40 --- M bsc-nat/gen_links.sh M bsc/gen_links.sh M deps/Makefile M msc/gen_links.sh M selftest/gen_links.sh 5 files changed, 7 insertions(+), 7 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/bsc-nat/gen_links.sh b/bsc-nat/gen_links.sh index 16e32b7..7b7f928 100755 --- a/bsc-nat/gen_links.sh +++ b/bsc-nat/gen_links.sh @@ -29,7 +29,7 @@ FILES="SCCP_Emulation.ttcn SCCP_EncDec.cc SCCP_Mapping.ttcnpp SCCP_Types.ttcn SCCPasp_Types.ttcn" gen_links $DIR $FILES -DIR=$BASEDIR/titan.ProtocolModules.BSSMAP_v11.2.0/src +DIR=$BASEDIR/titan.ProtocolModules.BSSMAP/src FILES="BSSAP_Types.ttcn" gen_links $DIR $FILES diff --git a/bsc/gen_links.sh b/bsc/gen_links.sh index a4f09f4..c71b31a 100755 --- a/bsc/gen_links.sh +++ b/bsc/gen_links.sh @@ -45,7 +45,7 @@ FILES="SCCP_Emulation.ttcn SCCP_Mapping.ttcnpp SCCP_Types.ttcn SCCPasp_Types.ttcn" gen_links $DIR $FILES -DIR=$BASEDIR/titan.ProtocolModules.BSSMAP_v11.2.0/src +DIR=$BASEDIR/titan.ProtocolModules.BSSMAP/src FILES="BSSAP_Types.ttcn" gen_links $DIR $FILES diff --git a/deps/Makefile b/deps/Makefile index 6b19cf3..23f7b64 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -33,7 +33,6 @@ titan.TestPorts.GPIO \ titan.ProtocolModules.BSSAPP_v7.3.0 \ titan.ProtocolModules.BSSGP_v13.0.0 \ - titan.ProtocolModules.BSSMAP_v11.2.0 \ titan.ProtocolModules.GTP_v13.5.0 \ titan.ProtocolModules.GTPv2_v13.7.0 \ titan.ProtocolModules.ISUP_Q.762 \ @@ -48,7 +47,8 @@ titan.TestPorts.MTP3asp \ titan.ProtocolEmulations.M3UA -OSMOGIT_REPOS= titan.ProtocolModules.MAP +OSMOGIT_REPOS= titan.ProtocolModules.MAP \ + titan.ProtocolModules.BSSMAP ALL_REPOS=$(ECLIPSEGIT_REPOS) $(ECLIPSEGIT2_REPOS) $(OSMOGITHUB_REPOS) $(OSMOGIT_REPOS) @@ -60,7 +60,7 @@ titan.ProtocolEmulations.SCCP_commit= R.7.A-2-g724c83f titan.ProtocolModules.BSSAPP_v7.3.0_commit= R.2.A titan.ProtocolModules.BSSGP_v13.0.0_commit= R.2.A -titan.ProtocolModules.BSSMAP_v11.2.0_commit= R.2.A +titan.ProtocolModules.BSSMAP_commit= master titan.ProtocolModules.GRE_commit= R.2.A titan.ProtocolModules.GTP_v13.5.0_commit= R.2.A titan.ProtocolModules.GTPv2_v13.7.0_commit= R.2.A diff --git a/msc/gen_links.sh b/msc/gen_links.sh index 7ba190a..7aaba2b 100755 --- a/msc/gen_links.sh +++ b/msc/gen_links.sh @@ -46,7 +46,7 @@ FILES="SCCP_Emulation.ttcn SCCP_EncDec.cc SCCP_Mapping.ttcnpp SCCP_Types.ttcn SCCPasp_Types.ttcn" gen_links $DIR $FILES -DIR=$BASEDIR/titan.ProtocolModules.BSSMAP_v11.2.0/src +DIR=$BASEDIR/titan.ProtocolModules.BSSMAP/src FILES="BSSAP_Types.ttcn" gen_links $DIR $FILES diff --git a/selftest/gen_links.sh b/selftest/gen_links.sh index 09d2f26..c590de6 100755 --- a/selftest/gen_links.sh +++ b/selftest/gen_links.sh @@ -30,7 +30,7 @@ FILES="SCCP_Emulation.ttcn SCCP_Mapping.ttcnpp SCCP_Types.ttcn SCCPasp_Types.ttcn" gen_links $DIR $FILES -DIR=$BASEDIR/titan.ProtocolModules.BSSMAP_v11.2.0/src +DIR=$BASEDIR/titan.ProtocolModules.BSSMAP/src FILES="BSSAP_Types.ttcn" gen_links $DIR $FILES -- To view, visit https://gerrit.osmocom.org/14104 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ic8debe5f3ffe8e1d4258fa6b4632a3871b99af40 Gerrit-Change-Number: 14104 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 12:30:28 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 21 May 2019 12:30:28 +0000 Subject: Change in osmo-gsm-manuals[master]: debian: more explicit dependencies for debian 8 Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/14115 Change subject: debian: more explicit dependencies for debian 8 ...................................................................... debian: more explicit dependencies for debian 8 Add dh-autoreconf to build dependencies, and xmllint to dependencies. Both need to be explicitly installed on debian 8. Related: OS#3899 Change-Id: If929fca73e3a88567e144eb296e7fadd32904dd5 --- M debian/control 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/15/14115/1 diff --git a/debian/control b/debian/control index 9dc03cb..0f89d0a 100644 --- a/debian/control +++ b/debian/control @@ -3,6 +3,7 @@ Priority: optional Maintainer: Oliver Smith Build-Depends: autotools-dev, + dh-autoreconf, debhelper (>= 9), pkg-config, # All below also need to be in Depends @@ -11,6 +12,7 @@ dblatex, docbook5-xml, graphviz, + libxml2-utils, mscgen, python, python-nwdiag, @@ -27,6 +29,7 @@ dblatex, docbook5-xml, graphviz, + libxml2-utils, mscgen, python, python-nwdiag, -- To view, visit https://gerrit.osmocom.org/14115 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If929fca73e3a88567e144eb296e7fadd32904dd5 Gerrit-Change-Number: 14115 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 12:31:48 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 21 May 2019 12:31:48 +0000 Subject: Change in osmo-gsm-manuals[master]: debian: more explicit dependencies for debian 8 In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Daniel Willmann, Harald Welte, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14115 to look at the new patch set (#2). Change subject: debian: more explicit dependencies for debian 8 ...................................................................... debian: more explicit dependencies for debian 8 Add dh-autoreconf to build dependencies, and libxml2-utils (provides xmllint) to dependencies. Both need to be explicitly installed on debian 8. Related: OS#3899 Change-Id: If929fca73e3a88567e144eb296e7fadd32904dd5 --- M debian/control 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/15/14115/2 -- To view, visit https://gerrit.osmocom.org/14115 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: If929fca73e3a88567e144eb296e7fadd32904dd5 Gerrit-Change-Number: 14115 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 14:37:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 14:37:05 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Refactor code to support mixed DEFAULT + NORMAL and EXTENDED CBCH In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14107 to look at the new patch set (#4). Change subject: bts: Refactor code to support mixed DEFAULT + NORMAL and EXTENDED CBCH ...................................................................... bts: Refactor code to support mixed DEFAULT + NORMAL and EXTENDED CBCH The existing code structure could only test for normal messages with a NULL default, but didn't handle situations where normal and/or schedule messages were superimposed on top of DEFAULT messages. Also, prepare the infrastructure for testing both CBCH BASIC and CBCH EXTENDED. No new tests are introduced, the code should behave identical before and after this patch. Change-Id: I144c7d833b79c648b1ac69a6155f3603025ede5c Related: OS#4011 --- M bts/BTS_Tests_SMSCB.ttcn M library/RSL_Types.ttcn 2 files changed, 220 insertions(+), 62 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/07/14107/4 -- To view, visit https://gerrit.osmocom.org/14107 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I144c7d833b79c648b1ac69a6155f3603025ede5c Gerrit-Change-Number: 14107 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 14:37:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 14:37:05 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Test case for mixed NORMAL and DEFAULT SMSCB In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14108 to look at the new patch set (#4). Change subject: bts: Test case for mixed NORMAL and DEFAULT SMSCB ...................................................................... bts: Test case for mixed NORMAL and DEFAULT SMSCB This adds TC_sms_cb_cmd_sdcch{4,8]_default_and_normal() which test the correct behavior in case of a DEFAULT SMSCB and normal one-shot SMSCBs. Change-Id: I0782b121cd69158903b09f935b298ddbf5a9ffb5 Related: OS#4011 --- M bts/BTS_Tests_SMSCB.ttcn 1 file changed, 19 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/08/14108/4 -- To view, visit https://gerrit.osmocom.org/14108 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0782b121cd69158903b09f935b298ddbf5a9ffb5 Gerrit-Change-Number: 14108 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 14:37:06 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 14:37:06 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add tests for CBCH LOAD IND (underflow, overflow) Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14116 Change subject: bts: Add tests for CBCH LOAD IND (underflow, overflow) ...................................................................... bts: Add tests for CBCH LOAD IND (underflow, overflow) Change-Id: Ia0a82771ba2912ef06fb0d9ee0816e8150701005 Related: OS#4011 --- M bts/BTS_Tests_SMSCB.ttcn M library/RSL_Types.ttcn 2 files changed, 248 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/16/14116/1 diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn index ac7ec9f..f7f2f91 100644 --- a/bts/BTS_Tests_SMSCB.ttcn +++ b/bts/BTS_Tests_SMSCB.ttcn @@ -19,6 +19,7 @@ import from L1CTL_PortType all; import from L1CTL_Types all; import from LAPDm_Types all; +import from IPA_Emulation all; import from RSL_Types all; @@ -186,13 +187,10 @@ RSL_CCHAN.send(ts_RSL_UD(rsl)); } } -private function f_smscb_setup(inout CbchTestPars pars) runs on test_CT { - f_cbch_compute_exp_blocks(pars); +private function f_vty_cbch_setup(boolean use_sdcch4 := true) runs on test_CT { - f_init_vty_bsc(); - /* ensure that a CBCH is present in channel combination */ - if (pars.use_sdcch4) { + if (use_sdcch4 == true) { f_vty_config2(BSCVTY, {"network", "bts 0", "trx 0", "timeslot 0"}, "phys_chan_config CCCH+SDCCH4+CBCH"); f_vty_config2(BSCVTY, {"network", "bts 0", "trx 0", "timeslot 6"}, @@ -205,6 +203,14 @@ } f_vty_transceive(BSCVTY, "drop bts connection 0 oml"); f_sleep(2.0); +} +private function f_smscb_setup(inout CbchTestPars pars) runs on test_CT { + + f_cbch_compute_exp_blocks(pars); + + f_init_vty_bsc(); + /* ensure that a CBCH is present in channel combination */ + f_vty_cbch_setup(pars.use_sdcch4); f_init(testcasename()); f_init_l1ctl(); @@ -687,6 +693,171 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass); } +/* Verify there are no CBCH load indications if no CBCH is present */ +testcase TC_cbch_load_idle_no_cbch() runs on test_CT { + var ASP_RSL_Unitdata rx_ud; + timer T := 10.0; + + f_init(testcasename()); + f_init_vty_bsc(); + + T.start; + alt { + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CBCH_LOAD_IND_BASIC)) -> value rx_ud { + setverdict(fail, "Received unexpected CBCH LOAD IND: ", rx_ud); + } + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CBCH_LOAD_IND_EXTD)) -> value rx_ud { + setverdict(fail, "Received unexpected CBCH LOAD IND: ", rx_ud); + } + [] RSL_CCHAN.receive { repeat; } + [] T.timeout { + setverdict(pass); + } + } +} + +/* Verify the CBCH load indications of an idle cell (without CBCH load) */ +function f_TC_cbc_load_idle() runs on test_CT { + template integer tr_slot_count := (2 .. 15); + const integer min_load_ind := 4; + var integer basic_count := 0; + var integer extd_count := 0; + var ASP_RSL_Unitdata rx_ud; + timer T := 10.0; + + f_init(testcasename()); + + RSL_CCHAN.clear; + T.start; + alt { + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CBCH_LOAD_IND_BASIC(false, tr_slot_count))) { + basic_count := basic_count + 1; + repeat; + } + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CBCH_LOAD_IND_EXTD(false, tr_slot_count))) -> value rx_ud { + extd_count := extd_count + 1; + repeat; + } + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CBCH_LOAD_IND_BASIC)) -> value rx_ud { + setverdict(fail, "Received unexpected CBCH LOAD IND: ", rx_ud); + } + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CBCH_LOAD_IND_EXTD)) -> value rx_ud { + setverdict(fail, "Received unexpected CBCH LOAD IND: ", rx_ud); + } + [] RSL_CCHAN.receive { repeat; } + [] T.timeout { + if ((basic_count >= min_load_ind) and (extd_count >= min_load_ind)) { + setverdict(pass); + } else { + setverdict(fail, "Insufficient number of CBCH LOAD IND: ", + "BASIC=", basic_count, " EXTD=", extd_count); + } + } + } + f_smscb_cleanup(); +} +testcase TC_cbc_sdcch4_load_idle() runs on test_CT { + f_init_vty_bsc(); + f_vty_cbch_setup(use_sdcch4 := true); + f_TC_cbc_load_idle(); +} +testcase TC_cbc_sdcch8_load_idle() runs on test_CT { + f_init_vty_bsc(); + f_vty_cbch_setup(use_sdcch4 := false); + f_TC_cbc_load_idle(); +} + +/* Verify CBCH overload indications are sent when sending too many SMS CB CMD */ +function f_TC_cbc_load_overload(CbchTestPars pars) runs on test_CT { + template integer tr_slot_count_basic := (11 .. 13); + template integer tr_slot_count_extd := (2 .. 15); + const integer min_load_ind := 4; + var integer basic_count := 0; + var integer extd_count := 0; + var ASP_RSL_Unitdata rx_ud; + timer T_total := 10.0; + timer T_retransmit := 0.2; + timer T_initial_guard := 2.0; + var integer i; + + f_init(testcasename()); + + /* send tons of SMSCB Command */ + for (i := 0; i < 30; i := i+1) { + f_smscb_setup_rsl_chan(pars.basic); + } + + /* keep sending SMSCB Commands for another two seconds */ + T_initial_guard.start; + T_retransmit.start; + alt { + [] T_retransmit.timeout { + f_smscb_setup_rsl_chan(pars.basic); + T_retransmit.start; + repeat; + } + [] T_initial_guard.timeout { } + } + /* clear any pending messages (where load may not have peaked yet) */ + RSL_CCHAN.clear; + + /* keep sending SMSCB Commands while verifying LOAD INDICATIONS */ + T_total.start; + T_retransmit.start; + alt { + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CBCH_LOAD_IND_BASIC(true, tr_slot_count_basic))) { + basic_count := basic_count + 1; + repeat; + } + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CBCH_LOAD_IND_EXTD(false, tr_slot_count_extd))) { + extd_count := extd_count + 1; + repeat; + } + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CBCH_LOAD_IND_BASIC)) -> value rx_ud { + setverdict(fail, "Received unexpected CBCH LOAD IND: ", rx_ud); + } + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CBCH_LOAD_IND_EXTD)) -> value rx_ud { + setverdict(fail, "Received unexpected CBCH LOAD IND: ", rx_ud); + } + [] RSL_CCHAN.receive { repeat; } + [] T_retransmit.timeout { + f_smscb_setup_rsl_chan(pars.basic); + T_retransmit.start; + repeat; + } + [] T_total.timeout { + if ((basic_count >= min_load_ind) and (extd_count >= min_load_ind)) { + setverdict(pass); + } else { + setverdict(fail, "Insufficient number of CBCH LOAD IND: ", + "BASIC=", basic_count, " EXTD=", extd_count); + } + } + } + f_smscb_cleanup(); +} +testcase TC_cbc_sdcch4_load_overload() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := true, + basic := valueof(t_CbchPC(msgs_1m_3b_norm)), + extended := omit + }; + + f_init_vty_bsc(); + f_vty_cbch_setup(use_sdcch4 := true); + f_TC_cbc_load_overload(pars); +} +testcase TC_cbc_sdcch8_load_overload() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := true, + basic := valueof(t_CbchPC(msgs_1m_3b_norm)), + extended := omit + }; + + f_init_vty_bsc(); + f_vty_cbch_setup(use_sdcch4 := true); + f_TC_cbc_load_overload(pars); +} /* SMSCB TODO: @@ -696,6 +867,8 @@ */ control { + execute( TC_cbch_load_idle_no_cbch() ); + execute( TC_sms_cb_cmd_sdcch4_1block() ); execute( TC_sms_cb_cmd_sdcch4_2block() ); execute( TC_sms_cb_cmd_sdcch4_3block() ); @@ -705,6 +878,9 @@ execute( TC_sms_cb_cmd_sdcch4_default_only() ); execute( TC_sms_cb_cmd_sdcch4_default_and_normal() ); execute( TC_sms_cb_cmd_sdcch4_default_then_null() ); + execute( TC_cbc_sdcch4_load_idle() ); + execute( TC_cbc_sdcch4_load_overload() ); + if (false) { /* FIXME: SDCCH/8 support broken, needs trxcon + L1CTL work */ execute( TC_sms_cb_cmd_sdcch8_1block() ); execute( TC_sms_cb_cmd_sdcch8_2block() ); @@ -714,6 +890,8 @@ execute( TC_sms_cb_cmd_sdcch8_schedule() ); execute( TC_sms_cb_cmd_sdcch8_default_only() ); execute( TC_sms_cb_cmd_sdcch8_default_and_normal() ); + execute( TC_cbc_sdcch8_load_idle() ); + execute( TC_cbc_sdcch8_load_overload() ); } } diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index 74de46a..bfa0af4 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -658,6 +658,24 @@ last_block := last_block } + /* 9.4.43 CBCH Load Information */ + type record RSL_IE_CbchLoadInfo { + boolean overflow, + BIT3 spare, + uint4_t slot_count + }; + template RSL_IE_CbchLoadInfo tr_CbchLoadInfo(template boolean overflow, + template uint4_t slot_count) := { + overflow := overflow, + spare := ?, + slot_count := slot_count + } + template (value) RSL_IE_CbchLoadInfo ts_CbchLoadInfo(boolean overflow, uint4_t slot_count) := { + overflow := overflow, + spare := '000'B, + slot_count := slot_count + } + /* 9.3.53 */ type record RSL_IE_MultirateCtrl { uint3_t spare, @@ -762,6 +780,7 @@ RSL_IE_ChanNeeded chan_needed, RSL_IE_CbCommandType cb_cmd_type, RSL_LV smscb_message, + RSL_IE_CbchLoadInfo cbch_load_info, RSL_SacchInfo sacch_info, RSL_IE_StartingTime starting_time, @@ -816,6 +835,7 @@ chan_needed, iei = RSL_IE_CHAN_NEEDED; cb_cmd_type, iei = RSL_IE_CB_CMD_TYPE; smscb_message, iei = RSL_IE_SMSCB_MSG; + cbch_load_info, iei = RSL_IE_CBCH_LOAD_INFO; sacch_info, iei = RSL_IE_SACCH_INFO; starting_time, iei = RSL_IE_STARTNG_TIME; encr_info, iei = RSL_IE_ENCR_INFO; @@ -1600,6 +1620,51 @@ } } + /* 8.5.9 BTS -> BSC CBCH LOAD INDICATION */ + template RSL_Message tr_RSL_CBCH_LOAD_IND_BASIC(template boolean overflow := ?, + template uint4_t slot_count := ?, + template RslChannelNr chan_nr := ?) := { + msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), + msg_type := RSL_MT_CBCH_LOAD_IND, + ies := { + tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), + tr_RSL_IE(RSL_IE_Body:{cbch_load_info := tr_CbchLoadInfo(overflow, slot_count)}) + } + } + template (value) RSL_Message ts_RSL_CBCH_LOAD_IND_BASIC(boolean overflow, uint4_t slot_count, + template (value) RslChannelNr chan_nr := + ts_RslChanNr_SDCCH4(0, 2)) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), + msg_type := RSL_MT_CBCH_LOAD_IND, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + t_RSL_IE(RSL_IE_CBCH_LOAD_INFO, RSL_IE_Body:{cbch_load_info := ts_CbchLoadInfo(overflow, slot_count)}) + } + } + template RSL_Message tr_RSL_CBCH_LOAD_IND_EXTD(template boolean overflow := ?, + template uint4_t slot_count := ?, + template RslChannelNr chan_nr := ?) := { + msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), + msg_type := RSL_MT_CBCH_LOAD_IND, + ies := { + tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), + tr_RSL_IE(RSL_IE_Body:{cbch_load_info := tr_CbchLoadInfo(overflow, slot_count)}), + tr_RSL_IE(RSL_IE_Body:{smscb_chan_ind := 1}) + } + } + template (value) RSL_Message ts_RSL_CBCH_LOAD_IND_EXTD(boolean overflow, uint4_t slot_count, + template (value) RslChannelNr chan_nr := + ts_RslChanNr_SDCCH4(0, 2)) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), + msg_type := RSL_MT_CBCH_LOAD_IND, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + t_RSL_IE(RSL_IE_CBCH_LOAD_INFO, RSL_IE_Body:{cbch_load_info := ts_CbchLoadInfo(overflow, slot_count)}), + t_RSL_IE(RSL_IE_SMSCB_CHAN_INDICATOR, RSL_IE_Body:{smscb_chan_ind := 1}) + } + } + + /* 8.6.2 BTS <- BSC */ template (value) RSL_Message ts_RSL_SACCH_FILL(RSL_IE_SysinfoType si_type, octetstring l3_info) := { msg_disc := ts_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), -- To view, visit https://gerrit.osmocom.org/14116 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ia0a82771ba2912ef06fb0d9ee0816e8150701005 Gerrit-Change-Number: 14116 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 14:41:13 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 14:41:13 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add tests for CBCH LOAD IND (underflow, overflow) In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14116 to look at the new patch set (#2). Change subject: bts: Add tests for CBCH LOAD IND (underflow, overflow) ...................................................................... bts: Add tests for CBCH LOAD IND (underflow, overflow) Change-Id: Ia0a82771ba2912ef06fb0d9ee0816e8150701005 Related: OS#4011 --- M bts/BTS_Tests_SMSCB.ttcn M library/RSL_Types.ttcn 2 files changed, 251 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/16/14116/2 -- To view, visit https://gerrit.osmocom.org/14116 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia0a82771ba2912ef06fb0d9ee0816e8150701005 Gerrit-Change-Number: 14116 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 14:41:51 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 14:41:51 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: CBCH related tests for OsmoBTS In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/10983 ) Change subject: bts: CBCH related tests for OsmoBTS ...................................................................... Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/10983 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I955b4000c12180a39b0205b69b7b2c8cee8c9da3 Gerrit-Change-Number: 10983 Gerrit-PatchSet: 6 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 21 May 2019 14:41:51 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 14:41:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 14:41:53 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_sms_cb_cmd_cbch_sdcch{4, 8}_multi() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14095 ) Change subject: bts: Add TC_sms_cb_cmd_cbch_sdcch{4,8}_multi() ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14095 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ice22fd2689a42c3b1951a02e65664102d4eaccc2 Gerrit-Change-Number: 14095 Gerrit-PatchSet: 5 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 21 May 2019 14:41:53 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 14:41:56 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 14:41:56 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_sms_cb_cmd_cbch_sdcch{4, 8}_default_only In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14102 ) Change subject: bts: Add TC_sms_cb_cmd_cbch_sdcch{4,8}_default_only ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14102 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iab03fa88b759759a493516d43090c4df63f7b06f Gerrit-Change-Number: 14102 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 21 May 2019 14:41:56 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 14:41:58 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 14:41:58 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Test for removal of CBCH DEFAULT message In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14106 ) Change subject: bts: Test for removal of CBCH DEFAULT message ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14106 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9608d42a164a6210f100d10cb3ccfb7735975011 Gerrit-Change-Number: 14106 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 21 May 2019 14:41:58 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 14:42:00 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 14:42:00 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Refactor code to support mixed DEFAULT + NORMAL and EXTENDED CBCH In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14107 ) Change subject: bts: Refactor code to support mixed DEFAULT + NORMAL and EXTENDED CBCH ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14107 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I144c7d833b79c648b1ac69a6155f3603025ede5c Gerrit-Change-Number: 14107 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 21 May 2019 14:42:00 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 14:42:03 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 14:42:03 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Test case for mixed NORMAL and DEFAULT SMSCB In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14108 ) Change subject: bts: Test case for mixed NORMAL and DEFAULT SMSCB ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14108 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0782b121cd69158903b09f935b298ddbf5a9ffb5 Gerrit-Change-Number: 14108 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 21 May 2019 14:42:03 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 14:42:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 14:42:05 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_sms_cb_cmd_sdcch{4, 8}_extd_multi In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14110 ) Change subject: bts: Add TC_sms_cb_cmd_sdcch{4,8}_extd_multi ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14110 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I06c193d59f21472fb5e4c69a7af1ccb18fba7487 Gerrit-Change-Number: 14110 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 21 May 2019 14:42:05 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 14:42:06 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 14:42:06 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add tests for CBCH LOAD IND (underflow, overflow) In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14116 ) Change subject: bts: Add tests for CBCH LOAD IND (underflow, overflow) ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14116 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia0a82771ba2912ef06fb0d9ee0816e8150701005 Gerrit-Change-Number: 14116 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 21 May 2019 14:42:06 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 14:42:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 14:42:08 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: CBCH related tests for OsmoBTS In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/10983 ) Change subject: bts: CBCH related tests for OsmoBTS ...................................................................... bts: CBCH related tests for OsmoBTS This introduces a set of CBCH related tests for osmo-bts. Warning: Those tests currently require a patched trxcon to work. Related: OS#4011 Change-Id: I955b4000c12180a39b0205b69b7b2c8cee8c9da3 --- M bts/BTS_Tests.cfg M bts/BTS_Tests.ttcn A bts/BTS_Tests_SMSCB.ttcn 3 files changed, 353 insertions(+), 6 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/bts/BTS_Tests.cfg b/bts/BTS_Tests.cfg index d365a06..a7ce68d 100644 --- a/bts/BTS_Tests.cfg +++ b/bts/BTS_Tests.cfg @@ -30,3 +30,4 @@ [EXECUTE] BTS_Tests.control +BTS_Tests_SMSCB.control diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 076476f..7912ff6 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -35,6 +35,8 @@ import from Osmocom_VTY_Functions all; import from TELNETasp_PortType all; +friend module BTS_Tests_SMSCB; + /* The tests assume a BTS with the following timeslot configuration: * TS0 : Combined CCCH + SDCCH/4 * TS1 : TCH/F @@ -254,13 +256,13 @@ f_rsl_bcch_fill_raw(rsl_si_type, si_enc); } -private function f_init_vty(charstring id) runs on test_CT { +friend function f_init_vty(charstring id) runs on test_CT { map(self:BTSVTY, system:BTSVTY); f_vty_set_prompts(BTSVTY); f_vty_transceive(BTSVTY, "enable"); } -private function f_init_vty_bsc() runs on test_CT { +friend function f_init_vty_bsc() runs on test_CT { map(self:BSCVTY, system:BSCVTY); f_vty_set_prompts(BSCVTY, "OsmoBSC"); f_vty_transceive(BSCVTY, "enable"); @@ -418,7 +420,7 @@ } } -private function f_l1_tune(L1CTL_PT L1CTL) { +friend function f_l1_tune(L1CTL_PT L1CTL) { f_L1CTL_FBSB(L1CTL, { false, mp_trx0_arfcn }, CCCH_MODE_COMBINED, mp_rxlev_exp); } @@ -4571,9 +4573,6 @@ /* receptiom of SABM in multi-frame established state */ - - - /* TODO Areas: * channel activation diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn new file mode 100644 index 0000000..6cb257c --- /dev/null +++ b/bts/BTS_Tests_SMSCB.ttcn @@ -0,0 +1,347 @@ +module BTS_Tests_SMSCB { + +/* Integration Tests for OsmoBTS + * (C) 2019 by Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * This test suite tests the SMSCB (Cell Broadcast) related functionality of + * OsmoBTS by attaching to the A-bis RSL and Um interface and emulating both + * BSC and MS. + */ + +import from Misc_Helpers all; +import from General_Types all; +import from Osmocom_Types all; +import from GSM_Types all; +import from L1CTL_PortType all; +import from L1CTL_Types all; +import from LAPDm_Types all; + +import from RSL_Types all; + +import from Osmocom_VTY_Functions all; + +import from BTS_Tests all; + +/*********************************************************************** + * Cell Broadcast related tests + ***********************************************************************/ + +type record CbchTestPars { + boolean use_sdcch4, + CbchTestMsgs msgs +}; + +type record CbchTestMsg { + /* config / input data */ + RSL_CbCommand rsl_cb_cmd, + uint2_t last_block, /* 0..3 */ + octetstring payload, + /* computed / result data */ + CbchBlocks blocks optional +}; +type record of CbchTestMsg CbchTestMsgs; + +/* a single 22byte block within a CbchTestMsg */ +type record CbchBlock { + uint4_t seq_nr, /* as per TS 04.12 */ + boolean is_last, + OCT22 payload, + boolean seen_once +}; +type record of CbchBlock CbchBlocks; + +/* compute the expected blocks for given test parameters */ +private function f_cbch_compute_exp_blocks(inout CbchTestPars pars) { + var integer i; + + for (i := 0; i < lengthof(pars.msgs); i := i+1) { + pars.msgs[i].blocks := f_comp_blocks(pars.msgs[i]); + } +} +private function f_comp_blocks(in CbchTestMsg msg) return CbchBlocks { + var CbchBlocks blocks := {}; + var integer i; + + for (i := 0; i <= msg.last_block; i := i+1) { + var CbchBlock block := { + seq_nr := i, + is_last := false, + payload := substr(msg.payload, 22*i, 22), + seen_once := false + }; + if (msg.rsl_cb_cmd == RSL_CB_CMD_SCHEDULE and i == 0) { + block.seq_nr := 8; + } + if (i == msg.last_block) { + block.is_last := true; + } + blocks := blocks & {block}; + } + + return blocks; +}; + +/* TS 48.058 Section 9.3.41 */ +private function f_cbch_block_nr2rsl(uint2_t nr) return uint2_t { + select (nr) { + case (0) { return 1; } + case (1) { return 2; } + case (2) { return 3; } + case (3) { return 0; } + } + setverdict(fail, "Invalid block number"); + mtc.stop; +} + +/* Verify the CBCH TB scheduling rules of TS 05.02 Section 6.5.4 */ +private function f_cbch_fn_verify(uint32_t fn, CBCH_Block cb) +{ + var integer tb := (fn/51) mod 8; /* TS 05.02 Section 6.5.4 */ + if (cb.block_type.seq_nr == 15 /* null */) { + /* always permitted */ + return; + } else if (cb.block_type.seq_nr == 8 /* schedule */) { + if (tb != 0) { + setverdict(fail, "Schedule block at TB=", tb); + } + } else if (cb.block_type.seq_nr < 4) { + if (cb.block_type.seq_nr != tb and cb.block_type.seq_nr+4 != tb) { + setverdict(fail, "Normal block at wrong TB=", tb, ": ", cb); + } + } +} + +/* shared function doing the heavy lifting for most CBCH tests */ +private function f_TC_smscb(CbchTestPars pars) runs on test_CT { + var L1ctlDlMessage dl; + var boolean cmd_seen_once := false; + var integer i, j; + timer T := 5.0; + + f_cbch_compute_exp_blocks(pars); + + f_init_vty_bsc(); + /* ensure that a CBCH is present in channel combination */ + if (pars.use_sdcch4) { + f_vty_config2(BSCVTY, {"network", "bts 0", "trx 0", "timeslot 0"}, + "phys_chan_config CCCH+SDCCH4+CBCH"); + f_vty_config2(BSCVTY, {"network", "bts 0", "trx 0", "timeslot 6"}, + "phys_chan_config SDCCH8"); + } else { + f_vty_config2(BSCVTY, {"network", "bts 0", "trx 0", "timeslot 0"}, + "phys_chan_config CCCH+SDCCH4"); + f_vty_config2(BSCVTY, {"network", "bts 0", "trx 0", "timeslot 6"}, + "phys_chan_config SDCCH8+CBCH"); + } + f_vty_transceive(BSCVTY, "drop bts connection 0 oml"); + f_sleep(2.0); + f_init(testcasename()); + + f_init_l1ctl(); + f_l1_tune(L1CTL); + /* FIXME: switch to dedicated mode for SDCCH/8 */ + + /* send SMSCB[s] via RSL */ + for (i := 0; i < lengthof(pars.msgs); i := i+1) { + var CbchTestMsg msg := pars.msgs[i]; + var uint2_t rsl_last_block := f_cbch_block_nr2rsl(msg.last_block); + var RSL_IE_CbCommandType cmd_type := + valueof(ts_RSL_IE_CbCmdType(msg.rsl_cb_cmd, rsl_last_block)); + RSL_CCHAN.send(ts_RSL_UD(ts_RSL_SMSCB_CMD(cmd_type, msg.payload))); + } + T.start; + /* Expect this to show up exactly once on the basic CBCH (four blocks) */ + alt { + /* FIXME: Channel Nr for SDCCH/8 */ + [] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_CBCH(0))) -> value dl { + log("CBCH: ", dl); + var CBCH_Block cb := dec_CBCH_Block(dl.payload.data_ind.payload); + /* detect the proper CBCH messages; check frame number */ + f_cbch_fn_verify(dl.dl_info.frame_nr, cb); + if (not match(cb, tr_CBCH_Block)) { + setverdict(fail, "Illegal CBCH Block received: ", cb); + } else { + var boolean matched := false; + /* ignore NULL messages */ + if (match(cb, tr_CBCH_Block(15, ?, ?))) { repeat; } + for (i := 0; i < lengthof(pars.msgs); i := i+1) { + for (j := 0; j < lengthof(pars.msgs[i].blocks); j := j+1) { + var CbchBlock b := pars.msgs[i].blocks[j]; + if (match(cb, tr_CBCH_Block(b.seq_nr, b.is_last, b.payload))) { + if (not pars.msgs[i].blocks[j].seen_once) { + pars.msgs[i].blocks[j].seen_once := true; + setverdict(pass); + } else { + setverdict(fail, "Received SMSCB twice! ", cb); + } + matched := true; + continue; + } + } + } + if (not matched) { + setverdict(fail, "Received unexpected CBCH block: ", cb); + } + repeat; + } + } + [] L1CTL.receive { repeat; } + [] T.timeout { + for (i := 0; i < lengthof(pars.msgs); i := i+1) { + for (j := 0; j < lengthof(pars.msgs[i].blocks); j := j+1) { + var CbchBlock b := pars.msgs[i].blocks[j]; + if (not b.seen_once) { + setverdict(fail, "Timeout waiting for CBCH"); + } + } + } + } + } + + /* reset timeslot 0 channel combination to default */ + f_vty_config2(BSCVTY, {"network", "bts 0", "trx 0", "timeslot 0"}, + "phys_chan_config CCCH+SDCCH4"); + f_vty_config2(BSCVTY, {"network", "bts 0", "trx 0", "timeslot 6"}, + "phys_chan_config SDCCH8"); +} + +private const CbchTestMsgs msgs_1m_1b_norm := { + { RSL_CB_CMD_NORMAL, 0, '001000320f1141660c344dd3cba09a0c000000000000'O, omit } +} + +private const CbchTestMsgs msgs_1m_2b_norm := { + { RSL_CB_CMD_NORMAL, 1, '001000320f1141660c344dd3cba09a0c000000000000'O & + '000102030405060708090a0b0c0d0e0f101213141516'O, + omit } +} + +private const CbchTestMsgs msgs_1m_3b_norm := { + { RSL_CB_CMD_NORMAL, 2, '001000320f1141660c344dd3cba09a0c000000000000'O & + '000102030405060708090a0b0c0d0e0f101213141516'O & + '101112131415161718191a1b1c1d1e1f202223242526'O, + omit } +} + +private const CbchTestMsgs msgs_1m_4b_norm := { + { RSL_CB_CMD_NORMAL, 3, '001000320f1141660c344dd3cba09a0c000000000000'O & + '000102030405060708090a0b0c0d0e0f101213141516'O & + '101112131415161718191a1b1c1d1e1f202223242526'O & + '202122232425262728292a2b2c2d2e2f303233343536'O, + omit } +} + +private const CbchTestMsgs msgs_1m_4b_sched := { + { RSL_CB_CMD_SCHEDULE, 3, '001000320f1141660c344dd3cba09a0c000000000000'O & + '000102030405060708090a0b0c0d0e0f101213141516'O & + '101112131415161718191a1b1c1d1e1f202223242526'O & + '202122232425262728292a2b2c2d2e2f303233343536'O, + omit } +} + +/* transmit single-block SMSCB COMMAND */ +testcase TC_sms_cb_cmd_sdcch4_1block() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := true, + msgs := msgs_1m_1b_norm + }; + f_TC_smscb(pars); +} +testcase TC_sms_cb_cmd_sdcch8_1block() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := false, + msgs := msgs_1m_1b_norm + }; + f_TC_smscb(pars); +} + +/* transmit dual-block SMSCB COMMAND */ +testcase TC_sms_cb_cmd_sdcch4_2block() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := true, + msgs := msgs_1m_2b_norm + }; + f_TC_smscb(pars); +} +testcase TC_sms_cb_cmd_sdcch8_2block() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := false, + msgs := msgs_1m_2b_norm + }; + f_TC_smscb(pars); +} + +/* transmit triple-block SMSCB COMMAND */ +testcase TC_sms_cb_cmd_sdcch4_3block() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := true, + msgs := msgs_1m_3b_norm + }; + f_TC_smscb(pars); +} +testcase TC_sms_cb_cmd_sdcch8_3block() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := false, + msgs := msgs_1m_3b_norm + }; + f_TC_smscb(pars); +} + +/* transmit quad-block SMSCB COMMAND */ +testcase TC_sms_cb_cmd_sdcch4_4block() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := true, + msgs := msgs_1m_4b_norm + }; + f_TC_smscb(pars); +} +testcase TC_sms_cb_cmd_sdcch8_4block() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := false, + msgs := msgs_1m_4b_norm + }; + f_TC_smscb(pars); +} + +/* transmit SMSCB COMMAND with SCHEDULE payload */ +testcase TC_sms_cb_cmd_sdcch4_schedule() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := true, + msgs := msgs_1m_4b_sched + }; + f_TC_smscb(pars); +} +testcase TC_sms_cb_cmd_sdcch8_schedule() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := false, + msgs := msgs_1m_4b_sched + }; + f_TC_smscb(pars); +} + +/* SMSCB TODO: + * multiple SMS BC CMD at the same time: Ensure all of them are sent exactly once + * extended CBCH vs. normal CBCH + * + */ + +control { + execute( TC_sms_cb_cmd_sdcch4_1block() ); + execute( TC_sms_cb_cmd_sdcch4_2block() ); + execute( TC_sms_cb_cmd_sdcch4_3block() ); + execute( TC_sms_cb_cmd_sdcch4_4block() ); + execute( TC_sms_cb_cmd_sdcch4_schedule() ); + if (false) { /* FIXME: SDCCH/8 support broken, needs trxcon + L1CTL work */ + execute( TC_sms_cb_cmd_sdcch8_1block() ); + execute( TC_sms_cb_cmd_sdcch8_2block() ); + execute( TC_sms_cb_cmd_sdcch8_3block() ); + execute( TC_sms_cb_cmd_sdcch8_4block() ); + execute( TC_sms_cb_cmd_sdcch8_schedule() ); + } +} + + +} -- To view, visit https://gerrit.osmocom.org/10983 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I955b4000c12180a39b0205b69b7b2c8cee8c9da3 Gerrit-Change-Number: 10983 Gerrit-PatchSet: 6 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 14:42:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 14:42:08 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_sms_cb_cmd_cbch_sdcch{4, 8}_multi() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14095 ) Change subject: bts: Add TC_sms_cb_cmd_cbch_sdcch{4,8}_multi() ...................................................................... bts: Add TC_sms_cb_cmd_cbch_sdcch{4,8}_multi() These new tests verify that multiple SMSCB commands are equeued, and that each related message is sent exactly once. Change-Id: Ice22fd2689a42c3b1951a02e65664102d4eaccc2 Related: OS#4011 --- M bts/BTS_Tests_SMSCB.ttcn 1 file changed, 36 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn index 6cb257c..6835f02 100644 --- a/bts/BTS_Tests_SMSCB.ttcn +++ b/bts/BTS_Tests_SMSCB.ttcn @@ -242,6 +242,24 @@ omit } } +private const CbchTestMsgs msgs_3m_4b_norm := { + { RSL_CB_CMD_NORMAL, 3, '001000320f1141660c344dd3cba09a0c000000000000'O & + '000102030405060708090a0b0c0d0e0f101213141516'O & + '101112131415161718191a1b1c1d1e1f202223242526'O & + '201122232425262728292a2b2c2d2e2f303233343536'O, + omit }, + { RSL_CB_CMD_NORMAL, 3, '002000320f1141660c344dd3cba09a0c000000000000'O & + '002102030405060708090a0b0c0d0e0f101213141516'O & + '102112131415161718191a1b1c1d1e1f202223242526'O & + '202122232425262728292a2b2c2d2e2f303233343536'O, + omit }, + { RSL_CB_CMD_NORMAL, 3, '003000320f1141660c344dd3cba09a0c000000000000'O & + '003102030405060708090a0b0c0d0e0f101213141516'O & + '103112131415161718191a1b1c1d1e1f202223242526'O & + '203122232425262728292a2b2c2d2e2f303233343536'O, + omit } +} + /* transmit single-block SMSCB COMMAND */ testcase TC_sms_cb_cmd_sdcch4_1block() runs on test_CT { var CbchTestPars pars := { @@ -306,6 +324,22 @@ f_TC_smscb(pars); } +/* transmit multiple commands of each 4 blocks */ +testcase TC_sms_cb_cmd_sdcch4_multi() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := true, + msgs := msgs_3m_4b_norm + }; + f_TC_smscb(pars); +} +testcase TC_sms_cb_cmd_sdcch8_multi() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := false, + msgs := msgs_3m_4b_norm + }; + f_TC_smscb(pars); +} + /* transmit SMSCB COMMAND with SCHEDULE payload */ testcase TC_sms_cb_cmd_sdcch4_schedule() runs on test_CT { var CbchTestPars pars := { @@ -333,12 +367,14 @@ execute( TC_sms_cb_cmd_sdcch4_2block() ); execute( TC_sms_cb_cmd_sdcch4_3block() ); execute( TC_sms_cb_cmd_sdcch4_4block() ); + execute( TC_sms_cb_cmd_sdcch4_multi() ); execute( TC_sms_cb_cmd_sdcch4_schedule() ); if (false) { /* FIXME: SDCCH/8 support broken, needs trxcon + L1CTL work */ execute( TC_sms_cb_cmd_sdcch8_1block() ); execute( TC_sms_cb_cmd_sdcch8_2block() ); execute( TC_sms_cb_cmd_sdcch8_3block() ); execute( TC_sms_cb_cmd_sdcch8_4block() ); + execute( TC_sms_cb_cmd_sdcch8_multi() ); execute( TC_sms_cb_cmd_sdcch8_schedule() ); } } -- To view, visit https://gerrit.osmocom.org/14095 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ice22fd2689a42c3b1951a02e65664102d4eaccc2 Gerrit-Change-Number: 14095 Gerrit-PatchSet: 5 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 14:42:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 14:42:08 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_sms_cb_cmd_cbch_sdcch{4, 8}_default_only In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14102 ) Change subject: bts: Add TC_sms_cb_cmd_cbch_sdcch{4,8}_default_only ...................................................................... bts: Add TC_sms_cb_cmd_cbch_sdcch{4,8}_default_only Add a most basic CBCH DEFAULT message test: Ensure *only* the default message is sent if a default is set. Related: OS#4011 Change-Id: Iab03fa88b759759a493516d43090c4df63f7b06f --- M bts/BTS_Tests_SMSCB.ttcn 1 file changed, 105 insertions(+), 12 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn index 6835f02..34e17be 100644 --- a/bts/BTS_Tests_SMSCB.ttcn +++ b/bts/BTS_Tests_SMSCB.ttcn @@ -97,10 +97,15 @@ mtc.stop; } +private function f_cbch_fn2tb(uint32_t fn) return integer +{ + return (fn/51) mod 8; /* TS 05.02 Section 6.5.4 */ +} + /* Verify the CBCH TB scheduling rules of TS 05.02 Section 6.5.4 */ private function f_cbch_fn_verify(uint32_t fn, CBCH_Block cb) { - var integer tb := (fn/51) mod 8; /* TS 05.02 Section 6.5.4 */ + var integer tb := f_cbch_fn2tb(fn); if (cb.block_type.seq_nr == 15 /* null */) { /* always permitted */ return; @@ -115,12 +120,8 @@ } } -/* shared function doing the heavy lifting for most CBCH tests */ -private function f_TC_smscb(CbchTestPars pars) runs on test_CT { - var L1ctlDlMessage dl; - var boolean cmd_seen_once := false; - var integer i, j; - timer T := 5.0; +private function f_smscb_setup(inout CbchTestPars pars) runs on test_CT { + var integer i; f_cbch_compute_exp_blocks(pars); @@ -153,6 +154,24 @@ valueof(ts_RSL_IE_CbCmdType(msg.rsl_cb_cmd, rsl_last_block)); RSL_CCHAN.send(ts_RSL_UD(ts_RSL_SMSCB_CMD(cmd_type, msg.payload))); } +} + +private function f_smscb_cleanup() runs on test_CT { + /* reset timeslot 0 channel combination to default */ + f_vty_config2(BSCVTY, {"network", "bts 0", "trx 0", "timeslot 0"}, + "phys_chan_config CCCH+SDCCH4"); + f_vty_config2(BSCVTY, {"network", "bts 0", "trx 0", "timeslot 6"}, + "phys_chan_config SDCCH8"); +} + +/* shared function doing the heavy lifting for most CBCH tests */ +private function f_TC_smscb(CbchTestPars pars) runs on test_CT { + var L1ctlDlMessage dl; + var integer i, j; + timer T := 5.0 * int2float(lengthof(pars.msgs)); + + f_smscb_setup(pars); + T.start; /* Expect this to show up exactly once on the basic CBCH (four blocks) */ alt { @@ -202,11 +221,57 @@ } } - /* reset timeslot 0 channel combination to default */ - f_vty_config2(BSCVTY, {"network", "bts 0", "trx 0", "timeslot 0"}, - "phys_chan_config CCCH+SDCCH4"); - f_vty_config2(BSCVTY, {"network", "bts 0", "trx 0", "timeslot 6"}, - "phys_chan_config SDCCH8"); + f_smscb_cleanup(); + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass); +} + +private function f_TC_smscb_default_only(CbchTestPars pars) runs on test_CT { + var L1ctlDlMessage dl; + timer T := 5.0; + + f_smscb_setup(pars); + + /* ensure whatever initial NULL messages have all been drained */ + f_sleep(5.0); + L1CTL.clear; + + T.start; + alt { + [] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_CBCH(0))) -> value dl { + var integer tb := f_cbch_fn2tb(dl.dl_info.frame_nr); + log("CBCH: ", dl); + var CBCH_Block cb := dec_CBCH_Block(dl.payload.data_ind.payload); + /* detect the proper CBCH messages; check frame number */ + f_cbch_fn_verify(dl.dl_info.frame_nr, cb); + if (tb >= 4) { + /* skip extended CBCH for now */ + repeat; + } + if (not match(cb, tr_CBCH_Block)) { + setverdict(fail, "Illegal CBCH Block received: ", cb); + } else { + var uint4_t rx_seq_nr := cb.block_type.seq_nr; + var template CBCH_Block tr; + if (rx_seq_nr < lengthof(pars.msgs[0].blocks)) { + var CbchBlock b := pars.msgs[0].blocks[rx_seq_nr]; + tr := tr_CBCH_Block(b.seq_nr, b.is_last, b.payload); + } else { + tr := tr_CBCH_Block(15, ?, ?); + } + if (match(cb, tr)) { + setverdict(pass); /* FIXME: check that all blocks are received? */ + repeat; + } else { + setverdict(fail, "Unexpected CBCH block ", cb, ", expected ", tr); + } + } + } + [] L1CTL.receive { repeat; } + [] T.timeout {} + } + + f_smscb_cleanup(); + /* don't shut down; some tests still want to continue */ } private const CbchTestMsgs msgs_1m_1b_norm := { @@ -260,6 +325,13 @@ omit } } +private const CbchTestMsgs msgs_1m_3b_default := { + { RSL_CB_CMD_DEFAULT, 2, '001000320f1141660c344dd3cba09a0c000000000000'O & + '000102030405060708090a0b0c0d0e0f101213141516'O & + '101112131415161718191a1b1c1d1e1f202223242526'O, + omit } +} + /* transmit single-block SMSCB COMMAND */ testcase TC_sms_cb_cmd_sdcch4_1block() runs on test_CT { var CbchTestPars pars := { @@ -356,6 +428,25 @@ f_TC_smscb(pars); } +/* set a DEFAULT message; verify it gets transmitted all the time */ +testcase TC_sms_cb_cmd_sdcch4_default_only() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := true, + msgs := msgs_1m_3b_default + }; + f_TC_smscb_default_only(pars); + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass); +} +testcase TC_sms_cb_cmd_sdcch8_default_only() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := true, + msgs := msgs_1m_3b_default + }; + f_TC_smscb_default_only(pars); + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass); +} + + /* SMSCB TODO: * multiple SMS BC CMD at the same time: Ensure all of them are sent exactly once * extended CBCH vs. normal CBCH @@ -369,6 +460,7 @@ execute( TC_sms_cb_cmd_sdcch4_4block() ); execute( TC_sms_cb_cmd_sdcch4_multi() ); execute( TC_sms_cb_cmd_sdcch4_schedule() ); + execute( TC_sms_cb_cmd_sdcch4_default_only() ); if (false) { /* FIXME: SDCCH/8 support broken, needs trxcon + L1CTL work */ execute( TC_sms_cb_cmd_sdcch8_1block() ); execute( TC_sms_cb_cmd_sdcch8_2block() ); @@ -376,6 +468,7 @@ execute( TC_sms_cb_cmd_sdcch8_4block() ); execute( TC_sms_cb_cmd_sdcch8_multi() ); execute( TC_sms_cb_cmd_sdcch8_schedule() ); + execute( TC_sms_cb_cmd_sdcch8_default_only() ); } } -- To view, visit https://gerrit.osmocom.org/14102 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iab03fa88b759759a493516d43090c4df63f7b06f Gerrit-Change-Number: 14102 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 14:42:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 14:42:08 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Test for removal of CBCH DEFAULT message In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14106 ) Change subject: bts: Test for removal of CBCH DEFAULT message ...................................................................... bts: Test for removal of CBCH DEFAULT message Add a new testcase TC_sms_cb_cmd_sdcch4_default_then_null() which first installes a DEFAULT message, verifies that, then removes the default message and verifies only NULL CBCH blocks are sent anymore. Change-Id: I9608d42a164a6210f100d10cb3ccfb7735975011 Related: OS#4011 --- M bts/BTS_Tests_SMSCB.ttcn 1 file changed, 52 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn index 34e17be..c991877 100644 --- a/bts/BTS_Tests_SMSCB.ttcn +++ b/bts/BTS_Tests_SMSCB.ttcn @@ -120,6 +120,13 @@ } } +private function f_rsl_smscb_default_null() runs on test_CT +{ + var RSL_IE_CbCommandType cmd_type := + valueof(ts_RSL_IE_CbCmdType(RSL_CB_CMD_DEFAULT, 1, true)); + RSL_CCHAN.send(ts_RSL_UD(ts_RSL_SMSCB_CMD(cmd_type, ''O))); +} + private function f_smscb_setup(inout CbchTestPars pars) runs on test_CT { var integer i; @@ -446,6 +453,50 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass); } +/* first set a DEFAULT message, then disable it again */ +testcase TC_sms_cb_cmd_sdcch4_default_then_null() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := true, + msgs := msgs_1m_3b_default + }; + var L1ctlDlMessage dl; + timer T := 5.0; + + f_TC_smscb_default_only(pars); + + /* disable DEFAULT message; switch back to NULL */ + f_rsl_smscb_default_null(); + + /* ensure whatever initial non-NULL messages have all been drained */ + f_sleep(5.0); + L1CTL.clear; + + T.start; + alt { + [] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_CBCH(0))) -> value dl { + log("CBCH: ", dl); + var CBCH_Block cb := dec_CBCH_Block(dl.payload.data_ind.payload); + /* detect the proper CBCH messages; check frame number */ + f_cbch_fn_verify(dl.dl_info.frame_nr, cb); + if (not match(cb, tr_CBCH_Block)) { + setverdict(fail, "Illegal CBCH Block received: ", cb); + } else { + if (not match(cb, tr_CBCH_Block(15, ?, ?))) { + setverdict(fail, "Unexpected non-NULL CBCH block received"); + } + repeat; + } + } + [] L1CTL.receive { repeat; } + [] T.timeout { + setverdict(pass); + } + } + + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass); +} + + /* SMSCB TODO: * multiple SMS BC CMD at the same time: Ensure all of them are sent exactly once @@ -461,6 +512,7 @@ execute( TC_sms_cb_cmd_sdcch4_multi() ); execute( TC_sms_cb_cmd_sdcch4_schedule() ); execute( TC_sms_cb_cmd_sdcch4_default_only() ); + execute( TC_sms_cb_cmd_sdcch4_default_then_null() ); if (false) { /* FIXME: SDCCH/8 support broken, needs trxcon + L1CTL work */ execute( TC_sms_cb_cmd_sdcch8_1block() ); execute( TC_sms_cb_cmd_sdcch8_2block() ); -- To view, visit https://gerrit.osmocom.org/14106 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I9608d42a164a6210f100d10cb3ccfb7735975011 Gerrit-Change-Number: 14106 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 14:42:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 14:42:09 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Refactor code to support mixed DEFAULT + NORMAL and EXTENDED CBCH In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14107 ) Change subject: bts: Refactor code to support mixed DEFAULT + NORMAL and EXTENDED CBCH ...................................................................... bts: Refactor code to support mixed DEFAULT + NORMAL and EXTENDED CBCH The existing code structure could only test for normal messages with a NULL default, but didn't handle situations where normal and/or schedule messages were superimposed on top of DEFAULT messages. Also, prepare the infrastructure for testing both CBCH BASIC and CBCH EXTENDED. No new tests are introduced, the code should behave identical before and after this patch. Change-Id: I144c7d833b79c648b1ac69a6155f3603025ede5c Related: OS#4011 --- M bts/BTS_Tests_SMSCB.ttcn M library/RSL_Types.ttcn 2 files changed, 220 insertions(+), 62 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn index c991877..e1efd63 100644 --- a/bts/BTS_Tests_SMSCB.ttcn +++ b/bts/BTS_Tests_SMSCB.ttcn @@ -30,9 +30,28 @@ * Cell Broadcast related tests ***********************************************************************/ +/* Test parameters for one channel (e.g. Basic, Extended) */ +type record CbchTestParsChan { + /* list of "normal" (sent-once) SMSCB messages */ + CbchTestMsgs msgs, + /* default message, if any */ + CbchTestMsg default_msg optional +} + +private template (value) CbchTestParsChan +t_CbchPC(template (value) CbchTestMsgs msgs, template (omit) CbchTestMsg def := omit) := { + msgs := msgs, + default_msg := def +} + +/* CBCH test parameters for most of our tests */ type record CbchTestPars { + /* should we execute on SDCCH4 (true) or SDCCH8 (false) ? */ boolean use_sdcch4, - CbchTestMsgs msgs + /* Parameters for BASIC CBCH */ + CbchTestParsChan basic, + /* Parameters for EXTENDED CBCH */ + CbchTestParsChan extended optional }; type record CbchTestMsg { @@ -56,10 +75,18 @@ /* compute the expected blocks for given test parameters */ private function f_cbch_compute_exp_blocks(inout CbchTestPars pars) { + f_cbch_compute_exp_blocks_chan(pars.basic); + if (ispresent(pars.extended)) { + f_cbch_compute_exp_blocks_chan(pars.extended); + } +} +private function f_cbch_compute_exp_blocks_chan(inout CbchTestParsChan pars_chan) { var integer i; - - for (i := 0; i < lengthof(pars.msgs); i := i+1) { - pars.msgs[i].blocks := f_comp_blocks(pars.msgs[i]); + for (i := 0; i < lengthof(pars_chan.msgs); i := i+1) { + pars_chan.msgs[i].blocks := f_comp_blocks(pars_chan.msgs[i]); + } + if (ispresent(pars_chan.default_msg)) { + pars_chan.default_msg.blocks := f_comp_blocks(pars_chan.default_msg); } } private function f_comp_blocks(in CbchTestMsg msg) return CbchBlocks { @@ -127,8 +154,39 @@ RSL_CCHAN.send(ts_RSL_UD(ts_RSL_SMSCB_CMD(cmd_type, ''O))); } -private function f_smscb_setup(inout CbchTestPars pars) runs on test_CT { +template RSL_IE t_RSL_IE_SMSCB_EXT := t_RSL_IE(RSL_IE_SMSCB_CHAN_INDICATOR, {smscb_chan_ind := 1}); + +private function f_smscb_setup_rsl_chan(inout CbchTestParsChan pars_chan, boolean extd := false) +runs on test_CT { var integer i; + var CbchTestMsg msg; + var uint2_t rsl_last_block; + var RSL_IE_CbCommandType cmd_type; + var RSL_Message rsl; + + /* send SMSCB[s] via RSL */ + for (i := 0; i < lengthof(pars_chan.msgs); i := i+1) { + msg := pars_chan.msgs[i]; + rsl_last_block := f_cbch_block_nr2rsl(msg.last_block); + cmd_type := valueof(ts_RSL_IE_CbCmdType(msg.rsl_cb_cmd, rsl_last_block)); + rsl := valueof(ts_RSL_SMSCB_CMD(cmd_type, msg.payload)); + if (extd) { + rsl.ies := rsl.ies & { valueof(t_RSL_IE_SMSCB_EXT) }; + } + RSL_CCHAN.send(ts_RSL_UD(rsl)); + } + if (ispresent(pars_chan.default_msg)) { + msg := pars_chan.default_msg; + rsl_last_block := f_cbch_block_nr2rsl(msg.last_block); + cmd_type := valueof(ts_RSL_IE_CbCmdType(msg.rsl_cb_cmd, rsl_last_block, false)); + rsl := valueof(ts_RSL_SMSCB_CMD(cmd_type, msg.payload)); + if (extd) { + rsl.ies := rsl.ies & { valueof(t_RSL_IE_SMSCB_EXT) }; + } + RSL_CCHAN.send(ts_RSL_UD(rsl)); + } +} +private function f_smscb_setup(inout CbchTestPars pars) runs on test_CT { f_cbch_compute_exp_blocks(pars); @@ -154,12 +212,9 @@ /* FIXME: switch to dedicated mode for SDCCH/8 */ /* send SMSCB[s] via RSL */ - for (i := 0; i < lengthof(pars.msgs); i := i+1) { - var CbchTestMsg msg := pars.msgs[i]; - var uint2_t rsl_last_block := f_cbch_block_nr2rsl(msg.last_block); - var RSL_IE_CbCommandType cmd_type := - valueof(ts_RSL_IE_CbCmdType(msg.rsl_cb_cmd, rsl_last_block)); - RSL_CCHAN.send(ts_RSL_UD(ts_RSL_SMSCB_CMD(cmd_type, msg.payload))); + f_smscb_setup_rsl_chan(pars.basic, false); + if (ispresent(pars.extended)) { + f_smscb_setup_rsl_chan(pars.extended, true); } } @@ -171,59 +226,141 @@ "phys_chan_config SDCCH8"); } +/* construct a receive/match template for given block_nr in given msg */ +private function f_get_block_template(CbchTestMsg msg, integer block_nr) return template CBCH_Block { + var template CBCH_Block tr; + if (block_nr < lengthof(msg.blocks)) { + var CbchBlock b := msg.blocks[block_nr]; + tr := tr_CBCH_Block(b.seq_nr, b.is_last, b.payload); + } else { + tr := tr_CBCH_Block(15, ?, ?); + } + return tr; +} + +/* the heart of the CBCH test case matching engine for one channel (basic, extended) */ +private function f_cbch_match(inout CbchTestParsChan pars_chan, CBCH_Block cb, integer tb) +{ + var integer block_nr := tb mod 4; + var integer i; + + if (not match(cb, tr_CBCH_Block)) { + setverdict(fail, "Illegal CBCH Block received: ", cb); + } else { + var boolean matched := false; + /* check if it's any of our expected blocks */ + for (i := 0; i < lengthof(pars_chan.msgs); i := i+1) { + if (block_nr < lengthof(pars_chan.msgs[i].blocks)) { + if (match(cb, f_get_block_template(pars_chan.msgs[i], block_nr))) { + log("Found block_nr ", block_nr, " of msg ", i); + if (not pars_chan.msgs[i].blocks[block_nr].seen_once) { + pars_chan.msgs[i].blocks[block_nr].seen_once := true; + setverdict(pass); + } else { + setverdict(fail, "Received SMSCB twice! ", cb); + } + matched := true; + break; + } + } + } + if (not matched) { + var template CBCH_Block tr; + if (ispresent(pars_chan.default_msg)) { + /* it must be a block of the default message */ + tr := f_get_block_template(pars_chan.default_msg, block_nr); + } else { + /* it must be a NULL block */ + tr := tr_CBCH_Block(15, ?, ?); + } + if (not match(cb, tr)) { + setverdict(fail, "Received unexpected CBCH block: ", cb); + } else { + log("Found block_nr ", block_nr, " of DEFAULT/NULL"); + if (ispresent(pars_chan.default_msg) and + block_nr < lengthof(pars_chan.default_msg.blocks)) { + pars_chan.default_msg.blocks[block_nr].seen_once := true; + } + } + } + } +} + +/* Report/Evaluate the per-channel CBCH test results */ +private function f_cbch_report(CbchTestParsChan pars_chan, charstring id) +{ + var integer i, j; + + /* verify that each block of each message has been seen once */ + for (i := 0; i < lengthof(pars_chan.msgs); i := i+1) { + for (j := 0; j < lengthof(pars_chan.msgs[i].blocks); j := j+1) { + var CbchBlock b := pars_chan.msgs[i].blocks[j]; + if (not b.seen_once) { + setverdict(fail, "Timeout waiting for ", id, " CBCH block ", + j, " of msg ", i); + } + } + } + if (ispresent(pars_chan.default_msg)) { + /* verify that each block of default message has been seen at least once */ + for (j := 0; j < lengthof(pars_chan.default_msg.blocks); j := j+1) { + var CbchBlock b := pars_chan.default_msg.blocks[j]; + if (not b.seen_once) { + setverdict(fail, "Timeout waiting for at leaset one instance of ", + "CBCH block ", j, " of DEFAULT msg"); + } + } + } +} + /* shared function doing the heavy lifting for most CBCH tests */ private function f_TC_smscb(CbchTestPars pars) runs on test_CT { var L1ctlDlMessage dl; - var integer i, j; - timer T := 5.0 * int2float(lengthof(pars.msgs)); + var integer msg_count; + timer T; + + msg_count := lengthof(pars.basic.msgs); + if (ispresent(pars.basic.default_msg)) { + msg_count := msg_count + 1; + } + if (ispresent(pars.extended)) { + msg_count := msg_count + lengthof(pars.extended.msgs); + if (ispresent(pars.extended.default_msg)) { + msg_count := msg_count + 1; + } + } f_smscb_setup(pars); - T.start; + /* dynamically adjust timeout based on number of messages */ + T.start(5.0 + 3.0 * int2float(msg_count)); /* Expect this to show up exactly once on the basic CBCH (four blocks) */ alt { /* FIXME: Channel Nr for SDCCH/8 */ [] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_CBCH(0))) -> value dl { - log("CBCH: ", dl); + var integer tb := f_cbch_fn2tb(dl.dl_info.frame_nr); var CBCH_Block cb := dec_CBCH_Block(dl.payload.data_ind.payload); + log("Tb=", tb, ", CBCH: ", dl, ", block: ", cb); + /* detect the proper CBCH messages; check frame number */ f_cbch_fn_verify(dl.dl_info.frame_nr, cb); - if (not match(cb, tr_CBCH_Block)) { - setverdict(fail, "Illegal CBCH Block received: ", cb); + + if (tb < 4) { + f_cbch_match(pars.basic, cb, tb); } else { - var boolean matched := false; - /* ignore NULL messages */ - if (match(cb, tr_CBCH_Block(15, ?, ?))) { repeat; } - for (i := 0; i < lengthof(pars.msgs); i := i+1) { - for (j := 0; j < lengthof(pars.msgs[i].blocks); j := j+1) { - var CbchBlock b := pars.msgs[i].blocks[j]; - if (match(cb, tr_CBCH_Block(b.seq_nr, b.is_last, b.payload))) { - if (not pars.msgs[i].blocks[j].seen_once) { - pars.msgs[i].blocks[j].seen_once := true; - setverdict(pass); - } else { - setverdict(fail, "Received SMSCB twice! ", cb); - } - matched := true; - continue; - } - } + if (not ispresent(pars.extended)) { + /* no parameters for ext. BCCH given: ignore */ + repeat; } - if (not matched) { - setverdict(fail, "Received unexpected CBCH block: ", cb); - } - repeat; + f_cbch_match(pars.extended, cb, tb); } + repeat; } [] L1CTL.receive { repeat; } [] T.timeout { - for (i := 0; i < lengthof(pars.msgs); i := i+1) { - for (j := 0; j < lengthof(pars.msgs[i].blocks); j := j+1) { - var CbchBlock b := pars.msgs[i].blocks[j]; - if (not b.seen_once) { - setverdict(fail, "Timeout waiting for CBCH"); - } - } + f_cbch_report(pars.basic, "Basic"); + if (ispresent(pars.extended)) { + f_cbch_report(pars.extended, "Extended"); } } } @@ -259,8 +396,8 @@ } else { var uint4_t rx_seq_nr := cb.block_type.seq_nr; var template CBCH_Block tr; - if (rx_seq_nr < lengthof(pars.msgs[0].blocks)) { - var CbchBlock b := pars.msgs[0].blocks[rx_seq_nr]; + if (rx_seq_nr < lengthof(pars.basic.msgs[0].blocks)) { + var CbchBlock b := pars.basic.msgs[0].blocks[rx_seq_nr]; tr := tr_CBCH_Block(b.seq_nr, b.is_last, b.payload); } else { tr := tr_CBCH_Block(15, ?, ?); @@ -338,19 +475,25 @@ '101112131415161718191a1b1c1d1e1f202223242526'O, omit } } +private const CbchTestMsg msg_default := { + RSL_CB_CMD_DEFAULT, 0, '010203040506070708090a0b0c0d0e0f101112131415'O, + omit +} /* transmit single-block SMSCB COMMAND */ testcase TC_sms_cb_cmd_sdcch4_1block() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := true, - msgs := msgs_1m_1b_norm + basic := valueof(t_CbchPC(msgs_1m_1b_norm)), + extended := omit }; f_TC_smscb(pars); } testcase TC_sms_cb_cmd_sdcch8_1block() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := false, - msgs := msgs_1m_1b_norm + basic := valueof(t_CbchPC(msgs_1m_1b_norm)), + extended := omit }; f_TC_smscb(pars); } @@ -359,14 +502,16 @@ testcase TC_sms_cb_cmd_sdcch4_2block() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := true, - msgs := msgs_1m_2b_norm + basic := valueof(t_CbchPC(msgs_1m_2b_norm)), + extended := omit }; f_TC_smscb(pars); } testcase TC_sms_cb_cmd_sdcch8_2block() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := false, - msgs := msgs_1m_2b_norm + basic := valueof(t_CbchPC(msgs_1m_2b_norm)), + extended := omit }; f_TC_smscb(pars); } @@ -375,14 +520,16 @@ testcase TC_sms_cb_cmd_sdcch4_3block() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := true, - msgs := msgs_1m_3b_norm + basic := valueof(t_CbchPC(msgs_1m_3b_norm)), + extended := omit }; f_TC_smscb(pars); } testcase TC_sms_cb_cmd_sdcch8_3block() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := false, - msgs := msgs_1m_3b_norm + basic := valueof(t_CbchPC(msgs_1m_3b_norm)), + extended := omit }; f_TC_smscb(pars); } @@ -391,14 +538,16 @@ testcase TC_sms_cb_cmd_sdcch4_4block() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := true, - msgs := msgs_1m_4b_norm + basic := valueof(t_CbchPC(msgs_1m_4b_norm)), + extended := omit }; f_TC_smscb(pars); } testcase TC_sms_cb_cmd_sdcch8_4block() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := false, - msgs := msgs_1m_4b_norm + basic := valueof(t_CbchPC(msgs_1m_4b_norm)), + extended := omit }; f_TC_smscb(pars); } @@ -407,14 +556,16 @@ testcase TC_sms_cb_cmd_sdcch4_multi() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := true, - msgs := msgs_3m_4b_norm + basic := valueof(t_CbchPC(msgs_3m_4b_norm)), + extended := omit }; f_TC_smscb(pars); } testcase TC_sms_cb_cmd_sdcch8_multi() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := false, - msgs := msgs_3m_4b_norm + basic := valueof(t_CbchPC(msgs_3m_4b_norm)), + extended := omit }; f_TC_smscb(pars); } @@ -423,14 +574,16 @@ testcase TC_sms_cb_cmd_sdcch4_schedule() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := true, - msgs := msgs_1m_4b_sched + basic := valueof(t_CbchPC(msgs_1m_4b_sched)), + extended := omit }; f_TC_smscb(pars); } testcase TC_sms_cb_cmd_sdcch8_schedule() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := false, - msgs := msgs_1m_4b_sched + basic := valueof(t_CbchPC(msgs_1m_4b_sched)), + extended := omit }; f_TC_smscb(pars); } @@ -439,7 +592,8 @@ testcase TC_sms_cb_cmd_sdcch4_default_only() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := true, - msgs := msgs_1m_3b_default + basic := valueof(t_CbchPC(msgs_1m_3b_default)), + extended := omit }; f_TC_smscb_default_only(pars); Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass); @@ -447,7 +601,8 @@ testcase TC_sms_cb_cmd_sdcch8_default_only() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := true, - msgs := msgs_1m_3b_default + basic := valueof(t_CbchPC(msgs_1m_3b_default)), + extended := omit }; f_TC_smscb_default_only(pars); Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass); @@ -457,7 +612,8 @@ testcase TC_sms_cb_cmd_sdcch4_default_then_null() runs on test_CT { var CbchTestPars pars := { use_sdcch4 := true, - msgs := msgs_1m_3b_default + basic := valueof(t_CbchPC(msgs_1m_3b_default)), + extended := omit }; var L1ctlDlMessage dl; timer T := 5.0; diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index 955e92c..74de46a 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -766,6 +766,7 @@ RSL_IE_StartingTime starting_time, RSL_IE_EncryptionInfo encr_info, + uint8_t smscb_chan_ind, RSL_IE_RequestRef req_ref, RSL_LV full_imm_ass_info, RSL_LV ms_identity, @@ -818,6 +819,7 @@ sacch_info, iei = RSL_IE_SACCH_INFO; starting_time, iei = RSL_IE_STARTNG_TIME; encr_info, iei = RSL_IE_ENCR_INFO; + smscb_chan_ind, iei = RSL_IE_SMSCB_CHAN_INDICATOR; req_ref, iei = RSL_IE_REQ_REFERENCE; full_imm_ass_info, iei = RSL_IE_FULL_IMM_ASS_INFO; -- To view, visit https://gerrit.osmocom.org/14107 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I144c7d833b79c648b1ac69a6155f3603025ede5c Gerrit-Change-Number: 14107 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 14:42:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 14:42:09 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Test case for mixed NORMAL and DEFAULT SMSCB In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14108 ) Change subject: bts: Test case for mixed NORMAL and DEFAULT SMSCB ...................................................................... bts: Test case for mixed NORMAL and DEFAULT SMSCB This adds TC_sms_cb_cmd_sdcch{4,8]_default_and_normal() which test the correct behavior in case of a DEFAULT SMSCB and normal one-shot SMSCBs. Change-Id: I0782b121cd69158903b09f935b298ddbf5a9ffb5 Related: OS#4011 --- M bts/BTS_Tests_SMSCB.ttcn 1 file changed, 19 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn index e1efd63..874acb4 100644 --- a/bts/BTS_Tests_SMSCB.ttcn +++ b/bts/BTS_Tests_SMSCB.ttcn @@ -608,6 +608,23 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass); } +testcase TC_sms_cb_cmd_sdcch4_default_and_normal() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := true, + basic := valueof(t_CbchPC(msgs_1m_3b_norm, msg_default)), + extended := omit + }; + f_TC_smscb(pars); +} +testcase TC_sms_cb_cmd_sdcch8_default_and_normal() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := true, + basic := valueof(t_CbchPC(msgs_1m_3b_norm, msg_default)), + extended := omit + }; + f_TC_smscb(pars); +} + /* first set a DEFAULT message, then disable it again */ testcase TC_sms_cb_cmd_sdcch4_default_then_null() runs on test_CT { var CbchTestPars pars := { @@ -668,6 +685,7 @@ execute( TC_sms_cb_cmd_sdcch4_multi() ); execute( TC_sms_cb_cmd_sdcch4_schedule() ); execute( TC_sms_cb_cmd_sdcch4_default_only() ); + execute( TC_sms_cb_cmd_sdcch4_default_and_normal() ); execute( TC_sms_cb_cmd_sdcch4_default_then_null() ); if (false) { /* FIXME: SDCCH/8 support broken, needs trxcon + L1CTL work */ execute( TC_sms_cb_cmd_sdcch8_1block() ); @@ -677,6 +695,7 @@ execute( TC_sms_cb_cmd_sdcch8_multi() ); execute( TC_sms_cb_cmd_sdcch8_schedule() ); execute( TC_sms_cb_cmd_sdcch8_default_only() ); + execute( TC_sms_cb_cmd_sdcch8_default_and_normal() ); } } -- To view, visit https://gerrit.osmocom.org/14108 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I0782b121cd69158903b09f935b298ddbf5a9ffb5 Gerrit-Change-Number: 14108 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 14:42:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 14:42:09 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_sms_cb_cmd_sdcch{4, 8}_extd_multi In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14110 ) Change subject: bts: Add TC_sms_cb_cmd_sdcch{4,8}_extd_multi ...................................................................... bts: Add TC_sms_cb_cmd_sdcch{4,8}_extd_multi Those tests verify operation of the EXTENDED CBCH. Change-Id: I06c193d59f21472fb5e4c69a7af1ccb18fba7487 Related: OS#4011 Related: OS#3535 --- M bts/BTS_Tests_SMSCB.ttcn 1 file changed, 18 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn index 874acb4..ac7ec9f 100644 --- a/bts/BTS_Tests_SMSCB.ttcn +++ b/bts/BTS_Tests_SMSCB.ttcn @@ -570,6 +570,24 @@ f_TC_smscb(pars); } +/* transmit multiple commands of each 4 blocks on CBCH EXTD */ +testcase TC_sms_cb_cmd_sdcch4_extd_multi() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := true, + basic := valueof(t_CbchPC({})), + extended := valueof(t_CbchPC(msgs_3m_4b_norm)) + }; + f_TC_smscb(pars); +} +testcase TC_sms_cb_cmd_sdcch8_extd_multi() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := false, + basic := valueof(t_CbchPC({})), + extended := valueof(t_CbchPC(msgs_3m_4b_norm)) + }; + f_TC_smscb(pars); +} + /* transmit SMSCB COMMAND with SCHEDULE payload */ testcase TC_sms_cb_cmd_sdcch4_schedule() runs on test_CT { var CbchTestPars pars := { -- To view, visit https://gerrit.osmocom.org/14110 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I06c193d59f21472fb5e4c69a7af1ccb18fba7487 Gerrit-Change-Number: 14110 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 14:42:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 14:42:09 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add tests for CBCH LOAD IND (underflow, overflow) In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14116 ) Change subject: bts: Add tests for CBCH LOAD IND (underflow, overflow) ...................................................................... bts: Add tests for CBCH LOAD IND (underflow, overflow) Change-Id: Ia0a82771ba2912ef06fb0d9ee0816e8150701005 Related: OS#4011 --- M bts/BTS_Tests_SMSCB.ttcn M library/RSL_Types.ttcn 2 files changed, 251 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn index ac7ec9f..801a5fc 100644 --- a/bts/BTS_Tests_SMSCB.ttcn +++ b/bts/BTS_Tests_SMSCB.ttcn @@ -19,6 +19,7 @@ import from L1CTL_PortType all; import from L1CTL_Types all; import from LAPDm_Types all; +import from IPA_Emulation all; import from RSL_Types all; @@ -186,13 +187,10 @@ RSL_CCHAN.send(ts_RSL_UD(rsl)); } } -private function f_smscb_setup(inout CbchTestPars pars) runs on test_CT { - f_cbch_compute_exp_blocks(pars); +private function f_vty_cbch_setup(boolean use_sdcch4 := true) runs on test_CT { - f_init_vty_bsc(); - /* ensure that a CBCH is present in channel combination */ - if (pars.use_sdcch4) { + if (use_sdcch4 == true) { f_vty_config2(BSCVTY, {"network", "bts 0", "trx 0", "timeslot 0"}, "phys_chan_config CCCH+SDCCH4+CBCH"); f_vty_config2(BSCVTY, {"network", "bts 0", "trx 0", "timeslot 6"}, @@ -205,6 +203,14 @@ } f_vty_transceive(BSCVTY, "drop bts connection 0 oml"); f_sleep(2.0); +} +private function f_smscb_setup(inout CbchTestPars pars) runs on test_CT { + + f_cbch_compute_exp_blocks(pars); + + f_init_vty_bsc(); + /* ensure that a CBCH is present in channel combination */ + f_vty_cbch_setup(pars.use_sdcch4); f_init(testcasename()); f_init_l1ctl(); @@ -687,6 +693,174 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass); } +/* Verify there are no CBCH load indications if no CBCH is present */ +testcase TC_cbch_load_idle_no_cbch() runs on test_CT { + var ASP_RSL_Unitdata rx_ud; + timer T := 10.0; + + f_init(testcasename()); + f_init_vty_bsc(); + + T.start; + alt { + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CBCH_LOAD_IND_BASIC)) -> value rx_ud { + setverdict(fail, "Received unexpected CBCH LOAD IND: ", rx_ud); + } + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CBCH_LOAD_IND_EXTD)) -> value rx_ud { + setverdict(fail, "Received unexpected CBCH LOAD IND: ", rx_ud); + } + [] RSL_CCHAN.receive { repeat; } + [] T.timeout { + setverdict(pass); + } + } + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + +/* Verify the CBCH load indications of an idle cell (without CBCH load) */ +function f_TC_cbc_load_idle() runs on test_CT { + template integer tr_slot_count := (2 .. 15); + const integer min_load_ind := 4; + var integer basic_count := 0; + var integer extd_count := 0; + var ASP_RSL_Unitdata rx_ud; + timer T := 10.0; + + f_init(testcasename()); + + RSL_CCHAN.clear; + T.start; + alt { + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CBCH_LOAD_IND_BASIC(false, tr_slot_count))) { + basic_count := basic_count + 1; + repeat; + } + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CBCH_LOAD_IND_EXTD(false, tr_slot_count))) -> value rx_ud { + extd_count := extd_count + 1; + repeat; + } + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CBCH_LOAD_IND_BASIC)) -> value rx_ud { + setverdict(fail, "Received unexpected CBCH LOAD IND: ", rx_ud); + } + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CBCH_LOAD_IND_EXTD)) -> value rx_ud { + setverdict(fail, "Received unexpected CBCH LOAD IND: ", rx_ud); + } + [] RSL_CCHAN.receive { repeat; } + [] T.timeout { + if ((basic_count >= min_load_ind) and (extd_count >= min_load_ind)) { + setverdict(pass); + } else { + setverdict(fail, "Insufficient number of CBCH LOAD IND: ", + "BASIC=", basic_count, " EXTD=", extd_count); + } + } + } + f_smscb_cleanup(); + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} +testcase TC_cbc_sdcch4_load_idle() runs on test_CT { + f_init_vty_bsc(); + f_vty_cbch_setup(use_sdcch4 := true); + f_TC_cbc_load_idle(); +} +testcase TC_cbc_sdcch8_load_idle() runs on test_CT { + f_init_vty_bsc(); + f_vty_cbch_setup(use_sdcch4 := false); + f_TC_cbc_load_idle(); +} + +/* Verify CBCH overload indications are sent when sending too many SMS CB CMD */ +function f_TC_cbc_load_overload(CbchTestPars pars) runs on test_CT { + template integer tr_slot_count_basic := (11 .. 13); + template integer tr_slot_count_extd := (2 .. 15); + const integer min_load_ind := 4; + var integer basic_count := 0; + var integer extd_count := 0; + var ASP_RSL_Unitdata rx_ud; + timer T_total := 10.0; + timer T_retransmit := 0.2; + timer T_initial_guard := 2.0; + var integer i; + + f_init(testcasename()); + + /* send tons of SMSCB Command */ + for (i := 0; i < 30; i := i+1) { + f_smscb_setup_rsl_chan(pars.basic); + } + + /* keep sending SMSCB Commands for another two seconds */ + T_initial_guard.start; + T_retransmit.start; + alt { + [] T_retransmit.timeout { + f_smscb_setup_rsl_chan(pars.basic); + T_retransmit.start; + repeat; + } + [] T_initial_guard.timeout { } + } + /* clear any pending messages (where load may not have peaked yet) */ + RSL_CCHAN.clear; + + /* keep sending SMSCB Commands while verifying LOAD INDICATIONS */ + T_total.start; + T_retransmit.start; + alt { + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CBCH_LOAD_IND_BASIC(true, tr_slot_count_basic))) { + basic_count := basic_count + 1; + repeat; + } + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CBCH_LOAD_IND_EXTD(false, tr_slot_count_extd))) { + extd_count := extd_count + 1; + repeat; + } + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CBCH_LOAD_IND_BASIC)) -> value rx_ud { + setverdict(fail, "Received unexpected CBCH LOAD IND: ", rx_ud); + } + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CBCH_LOAD_IND_EXTD)) -> value rx_ud { + setverdict(fail, "Received unexpected CBCH LOAD IND: ", rx_ud); + } + [] RSL_CCHAN.receive { repeat; } + [] T_retransmit.timeout { + f_smscb_setup_rsl_chan(pars.basic); + T_retransmit.start; + repeat; + } + [] T_total.timeout { + if ((basic_count >= min_load_ind) and (extd_count >= min_load_ind)) { + setverdict(pass); + } else { + setverdict(fail, "Insufficient number of CBCH LOAD IND: ", + "BASIC=", basic_count, " EXTD=", extd_count); + } + } + } + f_smscb_cleanup(); + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} +testcase TC_cbc_sdcch4_load_overload() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := true, + basic := valueof(t_CbchPC(msgs_1m_3b_norm)), + extended := omit + }; + + f_init_vty_bsc(); + f_vty_cbch_setup(use_sdcch4 := true); + f_TC_cbc_load_overload(pars); +} +testcase TC_cbc_sdcch8_load_overload() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := true, + basic := valueof(t_CbchPC(msgs_1m_3b_norm)), + extended := omit + }; + + f_init_vty_bsc(); + f_vty_cbch_setup(use_sdcch4 := true); + f_TC_cbc_load_overload(pars); +} /* SMSCB TODO: @@ -696,6 +870,8 @@ */ control { + execute( TC_cbch_load_idle_no_cbch() ); + execute( TC_sms_cb_cmd_sdcch4_1block() ); execute( TC_sms_cb_cmd_sdcch4_2block() ); execute( TC_sms_cb_cmd_sdcch4_3block() ); @@ -705,6 +881,9 @@ execute( TC_sms_cb_cmd_sdcch4_default_only() ); execute( TC_sms_cb_cmd_sdcch4_default_and_normal() ); execute( TC_sms_cb_cmd_sdcch4_default_then_null() ); + execute( TC_cbc_sdcch4_load_idle() ); + execute( TC_cbc_sdcch4_load_overload() ); + if (false) { /* FIXME: SDCCH/8 support broken, needs trxcon + L1CTL work */ execute( TC_sms_cb_cmd_sdcch8_1block() ); execute( TC_sms_cb_cmd_sdcch8_2block() ); @@ -714,6 +893,8 @@ execute( TC_sms_cb_cmd_sdcch8_schedule() ); execute( TC_sms_cb_cmd_sdcch8_default_only() ); execute( TC_sms_cb_cmd_sdcch8_default_and_normal() ); + execute( TC_cbc_sdcch8_load_idle() ); + execute( TC_cbc_sdcch8_load_overload() ); } } diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index 74de46a..bfa0af4 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -658,6 +658,24 @@ last_block := last_block } + /* 9.4.43 CBCH Load Information */ + type record RSL_IE_CbchLoadInfo { + boolean overflow, + BIT3 spare, + uint4_t slot_count + }; + template RSL_IE_CbchLoadInfo tr_CbchLoadInfo(template boolean overflow, + template uint4_t slot_count) := { + overflow := overflow, + spare := ?, + slot_count := slot_count + } + template (value) RSL_IE_CbchLoadInfo ts_CbchLoadInfo(boolean overflow, uint4_t slot_count) := { + overflow := overflow, + spare := '000'B, + slot_count := slot_count + } + /* 9.3.53 */ type record RSL_IE_MultirateCtrl { uint3_t spare, @@ -762,6 +780,7 @@ RSL_IE_ChanNeeded chan_needed, RSL_IE_CbCommandType cb_cmd_type, RSL_LV smscb_message, + RSL_IE_CbchLoadInfo cbch_load_info, RSL_SacchInfo sacch_info, RSL_IE_StartingTime starting_time, @@ -816,6 +835,7 @@ chan_needed, iei = RSL_IE_CHAN_NEEDED; cb_cmd_type, iei = RSL_IE_CB_CMD_TYPE; smscb_message, iei = RSL_IE_SMSCB_MSG; + cbch_load_info, iei = RSL_IE_CBCH_LOAD_INFO; sacch_info, iei = RSL_IE_SACCH_INFO; starting_time, iei = RSL_IE_STARTNG_TIME; encr_info, iei = RSL_IE_ENCR_INFO; @@ -1600,6 +1620,51 @@ } } + /* 8.5.9 BTS -> BSC CBCH LOAD INDICATION */ + template RSL_Message tr_RSL_CBCH_LOAD_IND_BASIC(template boolean overflow := ?, + template uint4_t slot_count := ?, + template RslChannelNr chan_nr := ?) := { + msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), + msg_type := RSL_MT_CBCH_LOAD_IND, + ies := { + tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), + tr_RSL_IE(RSL_IE_Body:{cbch_load_info := tr_CbchLoadInfo(overflow, slot_count)}) + } + } + template (value) RSL_Message ts_RSL_CBCH_LOAD_IND_BASIC(boolean overflow, uint4_t slot_count, + template (value) RslChannelNr chan_nr := + ts_RslChanNr_SDCCH4(0, 2)) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), + msg_type := RSL_MT_CBCH_LOAD_IND, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + t_RSL_IE(RSL_IE_CBCH_LOAD_INFO, RSL_IE_Body:{cbch_load_info := ts_CbchLoadInfo(overflow, slot_count)}) + } + } + template RSL_Message tr_RSL_CBCH_LOAD_IND_EXTD(template boolean overflow := ?, + template uint4_t slot_count := ?, + template RslChannelNr chan_nr := ?) := { + msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), + msg_type := RSL_MT_CBCH_LOAD_IND, + ies := { + tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), + tr_RSL_IE(RSL_IE_Body:{cbch_load_info := tr_CbchLoadInfo(overflow, slot_count)}), + tr_RSL_IE(RSL_IE_Body:{smscb_chan_ind := 1}) + } + } + template (value) RSL_Message ts_RSL_CBCH_LOAD_IND_EXTD(boolean overflow, uint4_t slot_count, + template (value) RslChannelNr chan_nr := + ts_RslChanNr_SDCCH4(0, 2)) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), + msg_type := RSL_MT_CBCH_LOAD_IND, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + t_RSL_IE(RSL_IE_CBCH_LOAD_INFO, RSL_IE_Body:{cbch_load_info := ts_CbchLoadInfo(overflow, slot_count)}), + t_RSL_IE(RSL_IE_SMSCB_CHAN_INDICATOR, RSL_IE_Body:{smscb_chan_ind := 1}) + } + } + + /* 8.6.2 BTS <- BSC */ template (value) RSL_Message ts_RSL_SACCH_FILL(RSL_IE_SysinfoType si_type, octetstring l3_info) := { msg_disc := ts_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), -- To view, visit https://gerrit.osmocom.org/14116 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ia0a82771ba2912ef06fb0d9ee0816e8150701005 Gerrit-Change-Number: 14116 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 14:45:00 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 14:45:00 +0000 Subject: Change in osmo-bts[master]: cbch: Add counters; queue length limits and CBCH LOAD reporting In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14113 to look at the new patch set (#2). Change subject: cbch: Add counters; queue length limits and CBCH LOAD reporting ...................................................................... cbch: Add counters; queue length limits and CBCH LOAD reporting This adds the final missing part to full CBCH support: * keep a tab on the current queue length for basic + extended CBCH * keep rate counters about the number of sent / transmitted SSMCB * send CBCH LOAD information via RSL to the BSC Change-Id: I7068c7937a60a900c40439115bb84dc3ee0d061f --- M include/osmo-bts/cbch.h M include/osmo-bts/gsm_data_shared.h M include/osmo-bts/rsl.h M src/common/bts.c M src/common/cbch.c M src/common/rsl.c M src/common/vty.c 7 files changed, 137 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/13/14113/2 -- To view, visit https://gerrit.osmocom.org/14113 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I7068c7937a60a900c40439115bb84dc3ee0d061f Gerrit-Change-Number: 14113 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 14:45:01 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 14:45:01 +0000 Subject: Change in osmo-bts[master]: cbch: Improve logging verbosity: Always indicate BASIC/EXTD CBCH Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14117 Change subject: cbch: Improve logging verbosity: Always indicate BASIC/EXTD CBCH ...................................................................... cbch: Improve logging verbosity: Always indicate BASIC/EXTD CBCH Change-Id: I6c8f9fc6215b616371e46c1f4ca4e44b8c7ac096 --- M src/common/cbch.c 1 file changed, 35 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/17/14117/1 diff --git a/src/common/cbch.c b/src/common/cbch.c index 6b65679..7ed11c2 100644 --- a/src/common/cbch.c +++ b/src/common/cbch.c @@ -71,6 +71,14 @@ OSMO_ASSERT(0); } +static const char *tb_to_chan_str(uint8_t tb) +{ + if (tb < 4) + return "CBCH-BASIC"; + else + return "CBCH-EXTENDED"; +} + /* construct a SMSCB NULL block in the user-provided output buffer at 'out' */ static int get_smscb_null_block(uint8_t *out) { @@ -86,24 +94,26 @@ } /* get the next block of the current CB message */ -static int get_smscb_block(struct bts_smscb_state *bts_ss, uint8_t *out, uint8_t block_nr, +static int get_smscb_block(struct bts_smscb_state *bts_ss, uint8_t *out, uint8_t tb, const struct gsm_time *g_time) { int to_copy; struct gsm412_block_type *block_type; struct smscb_msg *msg = bts_ss->cur_msg; + uint8_t block_nr = tb % 4; + const char *chan_name = tb_to_chan_str(tb); if (!msg) { /* No message: Send NULL block */ - DEBUGPGT(DLSMS, g_time, "No cur_msg; requesting NULL block\n"); + DEBUGPGT(DLSMS, g_time, "%s: No cur_msg; requesting NULL block\n", chan_name); return get_smscb_null_block(out); } OSMO_ASSERT(block_nr < 4); if (block_nr >= msg->num_segs) { /* Higher block number than this message has blocks: Send NULL block */ - DEBUGPGT(DLSMS, g_time, "cur_msg has only %u blocks; requesting NULL block\n", - msg->num_segs); + DEBUGPGT(DLSMS, g_time, "%s: cur_msg has only %u blocks; requesting NULL block\n", + chan_name, msg->num_segs); return get_smscb_null_block(out); } @@ -136,12 +146,14 @@ if (block_nr == 4) { if (msg != bts_ss->default_msg) { - DEBUGPGT(DLSMS, g_time, "deleting fully-transmitted message %p\n", msg); + DEBUGPGT(DLSMS, g_time, "%s: deleting fully-transmitted message %p\n", + chan_name, msg); /* delete any fully-transmitted normal message (or superseded default) */ talloc_free(bts_ss->cur_msg); bts_ss->cur_msg = NULL; } else { - DEBUGPGT(DLSMS, g_time, "keeping fully-transmitted default message %p\n", msg); + DEBUGPGT(DLSMS, g_time, "%s: keeping fully-transmitted default message %p\n", + chan_name, msg); } } @@ -170,16 +182,19 @@ { struct smscb_msg *scm; struct bts_smscb_state *bts_ss; + const char *chan_name; - if (extended_cbch) + if (extended_cbch) { + chan_name = tb_to_chan_str(4); bts_ss = &bts->smscb_extended; - else + } else { + chan_name = tb_to_chan_str(0); bts_ss = &bts->smscb_basic; + } if (msg_len > sizeof(scm->msg)) { - LOGP(DLSMS, LOGL_ERROR, - "Cannot process SMSCB of %u bytes (max %zu)\n", - msg_len, sizeof(scm->msg)); + LOGP(DLSMS, LOGL_ERROR, "%s: Cannot process SMSCB of %u bytes (max %zu)\n", + chan_name, msg_len, sizeof(scm->msg)); return -EINVAL; } @@ -197,8 +212,7 @@ memcpy(scm->msg, msg, msg_len); LOGP(DLSMS, LOGL_INFO, "RSL SMSCB COMMAND (chan=%s, type=%s, num_blocks=%u)\n", - extended_cbch ? "EXTENDED" : "BASIC", - get_value_string(rsl_cb_cmd_names, cmd_type.command), scm->num_segs); + chan_name, get_value_string(rsl_cb_cmd_names, cmd_type.command), scm->num_segs); switch (cmd_type.command) { case RSL_CB_CMD_TYPE_NORMAL: @@ -207,6 +221,8 @@ /* def_bcast is ignored as per Section 9.3.41 of 3GPP TS 48.058 */ /* limit queue size and optionally send CBCH LOAD Information (overflow) via RSL */ if (bts_ss->queue_len >= bts->smscb_queue_max_len) { + LOGP(DLSMS, LOGL_NOTICE, "RSL SMSCB COMMAND (chan=%s, type=%s): OVERFLOW\n", + chan_name, get_value_string(rsl_cb_cmd_names, cmd_type.command)); rate_ctr_inc2(bts_ss->ctrs, CBCH_CTR_RCVD_DROPPED); talloc_free(scm); break; @@ -241,6 +257,7 @@ static struct smscb_msg *select_next_smscb(struct gsm_bts *bts, uint8_t tb) { struct bts_smscb_state *bts_ss = bts_smscb_state(bts, tb); + const char *chan_name = tb_to_chan_str(tb); struct smscb_msg *msg; msg = llist_first_entry_or_null(&bts_ss->queue, struct smscb_msg, list); @@ -248,7 +265,7 @@ llist_del(&msg->list); bts_ss->queue_len--; check_and_send_cbch_load(bts, bts_ss); - DEBUGP(DLSMS, "%s: Dequeued msg\n", __func__); + DEBUGP(DLSMS, "%s: %s: Dequeued msg\n", __func__, chan_name); rate_ctr_inc2(bts_ss->ctrs, CBCH_CTR_SENT_SINGLE); return msg; } @@ -259,12 +276,12 @@ /* choose the default message, if any */ msg = bts_ss->default_msg; if (msg) { - DEBUGP(DLSMS, "%s: Using default msg\n", __func__); + DEBUGP(DLSMS, "%s: %s: Using default msg\n", __func__, chan_name); rate_ctr_inc2(bts_ss->ctrs, CBCH_CTR_SENT_DEFAULT); return msg; } - DEBUGP(DLSMS, "%s: No queued msg nor default\n", __func__); + DEBUGP(DLSMS, "%s: %s: No queued msg nor default\n", __func__, chan_name); rate_ctr_inc2(bts_ss->ctrs, CBCH_CTR_SENT_NULL); return NULL; } @@ -277,7 +294,6 @@ struct bts_smscb_state *bts_ss; /* According to 05.02 Section 6.5.4 */ uint32_t tb = (fn / 51) % 8; - uint8_t block_nr = tb % 4; int rc = 0; bts_ss = bts_smscb_state(bts, tb); @@ -296,11 +312,11 @@ case 4: /* select a new SMSCB message */ bts_ss->cur_msg = select_next_smscb(bts, tb); - rc = get_smscb_block(bts_ss, outbuf, block_nr, g_time); + rc = get_smscb_block(bts_ss, outbuf, tb, g_time); break; case 1: case 2: case 3: case 5: case 6: case 7: - rc = get_smscb_block(bts_ss, outbuf, block_nr, g_time); + rc = get_smscb_block(bts_ss, outbuf, tb, g_time); break; } -- To view, visit https://gerrit.osmocom.org/14117 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I6c8f9fc6215b616371e46c1f4ca4e44b8c7ac096 Gerrit-Change-Number: 14117 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 14:45:48 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 14:45:48 +0000 Subject: Change in osmo-gsm-manuals[master]: debian: more explicit dependencies for debian 8 In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14115 ) Change subject: debian: more explicit dependencies for debian 8 ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14115 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If929fca73e3a88567e144eb296e7fadd32904dd5 Gerrit-Change-Number: 14115 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 21 May 2019 14:45:48 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 14:45:50 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 14:45:50 +0000 Subject: Change in osmo-gsm-manuals[master]: debian: more explicit dependencies for debian 8 In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14115 ) Change subject: debian: more explicit dependencies for debian 8 ...................................................................... debian: more explicit dependencies for debian 8 Add dh-autoreconf to build dependencies, and libxml2-utils (provides xmllint) to dependencies. Both need to be explicitly installed on debian 8. Related: OS#3899 Change-Id: If929fca73e3a88567e144eb296e7fadd32904dd5 --- M debian/control 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/control b/debian/control index 9dc03cb..0f89d0a 100644 --- a/debian/control +++ b/debian/control @@ -3,6 +3,7 @@ Priority: optional Maintainer: Oliver Smith Build-Depends: autotools-dev, + dh-autoreconf, debhelper (>= 9), pkg-config, # All below also need to be in Depends @@ -11,6 +12,7 @@ dblatex, docbook5-xml, graphviz, + libxml2-utils, mscgen, python, python-nwdiag, @@ -27,6 +29,7 @@ dblatex, docbook5-xml, graphviz, + libxml2-utils, mscgen, python, python-nwdiag, -- To view, visit https://gerrit.osmocom.org/14115 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If929fca73e3a88567e144eb296e7fadd32904dd5 Gerrit-Change-Number: 14115 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 15:53:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 15:53:19 +0000 Subject: Change in docker-playground[master]: Revert "Simplify git checkout, allow branches and commits" Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14118 Change subject: Revert "Simplify git checkout, allow branches and commits" ...................................................................... Revert "Simplify git checkout, allow branches and commits" Unfortuately this commit will check out *local* master (i.e. the previous checkout) rather than the origin/master as it's supposed to be. This means that ever since merging this patch, our ttcn3 tests were running some "undefined" stale versions and not current master. This reverts commit 26565bb729549152ce8fa89f59df02f37c907c27. Change-Id: Ie6da0f9ea96f11407e38545a6b3cf22ef9cadc25 --- M gr-gsm-master/Dockerfile M osmo-bsc-master/Dockerfile M osmo-bts-master/Dockerfile M osmo-gerrit-libosmo/Dockerfile M osmo-ggsn-master/Dockerfile M osmo-hlr-master/Dockerfile M osmo-hnbgw-master/Dockerfile M osmo-mgw-master/Dockerfile M osmo-msc-master/Dockerfile M osmo-nitb-master/Dockerfile M osmo-pcu-master/Dockerfile M osmo-sgsn-master/Dockerfile M osmo-sip-master/Dockerfile M osmo-stp-master/Dockerfile M osmocom-bb-host-master/Dockerfile M ttcn3-bsc-test/Dockerfile M ttcn3-bscnat-test/Dockerfile M ttcn3-bts-test/Dockerfile M ttcn3-ggsn-test/Dockerfile M ttcn3-hlr-test/Dockerfile M ttcn3-mgw-test/Dockerfile M ttcn3-msc-test/Dockerfile M ttcn3-nitb-sysinfo/Dockerfile M ttcn3-pcu-test/Dockerfile M ttcn3-sgsn-test/Dockerfile M ttcn3-sip-test/Dockerfile 26 files changed, 47 insertions(+), 47 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/18/14118/1 diff --git a/gr-gsm-master/Dockerfile b/gr-gsm-master/Dockerfile index b678dd6..03cf427 100644 --- a/gr-gsm-master/Dockerfile +++ b/gr-gsm-master/Dockerfile @@ -50,7 +50,7 @@ ADD http://git.osmocom.org/libosmocore/patch?h=$LIBOSMOCORE_BRANCH /tmp/commit-libosmocore RUN cd libosmocore \ - && git fetch && git checkout -f $LIBOSMOCORE_BRANCH \ + && git fetch && git checkout -f -B $LIBOSMOCORE_BRANCH origin/$LIBOSMOCORE_BRANCH \ && git rev-parse --abbrev-ref HEAD && git rev-parse HEAD \ && autoreconf -fi \ && ./configure \ @@ -65,7 +65,7 @@ ADD http://git.osmocom.org/gr-gsm/patch?h=$GR_GSM_BRANCH /tmp/commit-gr-gsm RUN cd gr-gsm \ - && git fetch && git checkout -f $GR_GSM_BRANCH \ + && git fetch && git checkout -f -B $GR_GSM_BRANCH origin/$GR_GSM_BRANCH \ && git rev-parse HEAD \ && mkdir build/ \ && cd build/ \ diff --git a/osmo-bsc-master/Dockerfile b/osmo-bsc-master/Dockerfile index cbf80f9..bcd0573 100644 --- a/osmo-bsc-master/Dockerfile +++ b/osmo-bsc-master/Dockerfile @@ -32,7 +32,7 @@ ADD http://git.osmocom.org/osmo-bsc/patch?h=$OSMO_BSC_BRANCH /tmp/commit-osmo-bsc RUN cd osmo-bsc && \ - git fetch && git checkout -f $OSMO_BSC_BRANCH && \ + git fetch && git checkout -f -B $OSMO_BSC_BRANCH $OSMO_BSC_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-bts-master/Dockerfile b/osmo-bts-master/Dockerfile index d7707a3..f4ddf3a 100644 --- a/osmo-bts-master/Dockerfile +++ b/osmo-bts-master/Dockerfile @@ -33,7 +33,7 @@ ADD http://git.osmocom.org/osmo-bts/patch?h=$OSMO_BTS_BRANCH /tmp/commit-osmo-bts RUN cd osmo-bts && \ - git fetch && git checkout -f $OSMO_BTS_BRANCH && \ + git fetch && git checkout -f -B $OSMO_BTS_BRANCH $OSMO_BTS_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-trx && \ diff --git a/osmo-gerrit-libosmo/Dockerfile b/osmo-gerrit-libosmo/Dockerfile index 4db1923..5442703 100644 --- a/osmo-gerrit-libosmo/Dockerfile +++ b/osmo-gerrit-libosmo/Dockerfile @@ -45,7 +45,7 @@ # build libasn1c first, no libosmo* dependency and infrequent changes ADD http://git.osmocom.org/libasn1c/patch /tmp/commit-libasn1c RUN cd libasn1c && \ - git fetch && git checkout -f master && \ + git fetch && git checkout -f -B master origin/master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -56,7 +56,7 @@ # build libsmpp34 first, no libosmo* dependency and infrequent changes ADD http://git.osmocom.org/libsmpp34/patch /tmp/commit-libsmpp34 RUN cd libsmpp34 && \ - git fetch && git checkout -f master && \ + git fetch && git checkout -f -B master origin/master && \ autoreconf -fi && \ ./configure && \ make -j1 && \ @@ -67,7 +67,7 @@ # build libosmocore before any of its downatream dependences ADD http://git.osmocom.org/libosmocore/patch /tmp/commit-libosmocore RUN cd libosmocore && \ - git fetch && git checkout -f master && \ + git fetch && git checkout -f -B master origin/master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -79,7 +79,7 @@ ADD http://git.osmocom.org/libosmo-abis/patch /tmp/commit-libosmo-abis RUN cd libosmo-abis && \ - git fetch && git checkout -f master && \ + git fetch && git checkout -f -B master origin/master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -89,7 +89,7 @@ ADD http://git.osmocom.org/libosmo-netif/patch /tmp/commit-libosmo-netif RUN cd libosmo-netif && \ - git fetch && git checkout -f master && \ + git fetch && git checkout -f -B master origin/master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -99,7 +99,7 @@ ADD http://git.osmocom.org/libosmo-sccp/patch /tmp/commit-libosmo-sccp RUN cd libosmo-sccp && \ - git fetch && git checkout -f master && \ + git fetch && git checkout -f -B master origin/master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -109,7 +109,7 @@ ADD http://git.osmocom.org/osmo-mgw/patch /tmp/commit-osmo-mgw RUN cd osmo-mgw && \ - git fetch && git checkout -f master && \ + git fetch && git checkout -f -B master origin/master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -119,7 +119,7 @@ ADD http://git.osmocom.org/osmo-iuh/patch /tmp/commit-osmo-iuh RUN cd osmo-iuh && \ - git fetch && git checkout -f master && \ + git fetch && git checkout -f -B master origin/master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -129,7 +129,7 @@ ADD http://git.osmocom.org/osmo-ggsn/patch /tmp/commit-osmo-ggsn RUN cd osmo-ggsn && \ - git fetch && git checkout -f master && \ + git fetch && git checkout -f -B master origin/master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -139,4 +139,4 @@ # example command which builds a single osmo-* application at 'docker run' time in tmpfs -CMD /bin/sh -c 'cd /tmpfs && git clone --reference /build/openbsc git://git.osmocom.org/openbsc.git && cd openbsc && git checkout -f master && cd openbsc && autoreconf -fi && ./configure --enable-nat --enable-osmo-bsc --enable-smpp --enable-vty-tests --enable-external-tests && make -j8 check' +CMD /bin/sh -c 'cd /tmpfs && git clone --reference /build/openbsc git://git.osmocom.org/openbsc.git && cd openbsc && git checkout -f -B master origin/master && cd openbsc && autoreconf -fi && ./configure --enable-nat --enable-osmo-bsc --enable-smpp --enable-vty-tests --enable-external-tests && make -j8 check' diff --git a/osmo-ggsn-master/Dockerfile b/osmo-ggsn-master/Dockerfile index 8398fbb..cf84d02 100644 --- a/osmo-ggsn-master/Dockerfile +++ b/osmo-ggsn-master/Dockerfile @@ -25,7 +25,7 @@ RUN git clone git://git.osmocom.org/osmo-ggsn.git ADD http://git.osmocom.org/osmo-ggsn/patch/?h=$OSMO_GGSN_BRANCH /tmp/commit RUN cd osmo-ggsn && \ - git fetch && git checkout -f $OSMO_GGSN_BRANCH && \ + git fetch && git checkout -f -B $OSMO_GGSN_BRANCH $OSMO_GGSN_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-hlr-master/Dockerfile b/osmo-hlr-master/Dockerfile index 84df534..2da7c08 100644 --- a/osmo-hlr-master/Dockerfile +++ b/osmo-hlr-master/Dockerfile @@ -30,7 +30,7 @@ ADD http://git.osmocom.org/osmo-hlr/patch?h=$OSMO_HLR_BRANCH /tmp/commit-osmo-hlr RUN cd osmo-hlr && \ - git fetch && git checkout -f $OSMO_HLR_BRANCH && \ + git fetch && git checkout -f -B $OSMO_HLR_BRANCH $OSMO_HLR_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-hnbgw-master/Dockerfile b/osmo-hnbgw-master/Dockerfile index 347e8d4..c89502b 100644 --- a/osmo-hnbgw-master/Dockerfile +++ b/osmo-hnbgw-master/Dockerfile @@ -30,7 +30,7 @@ ADD http://git.osmocom.org/osmo-iuh/patch?h=$OSMO_IUH_BRANCH /tmp/commit-osmo-mgw RUN cd osmo-iuh && \ - git fetch && git checkout -f $OSMO_IUH_BRANCH && \ + git fetch && git checkout -f -B $OSMO_IUH_BRANCH $OSMO_IUH_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-mgw-master/Dockerfile b/osmo-mgw-master/Dockerfile index 92e499e..4c6d32a 100644 --- a/osmo-mgw-master/Dockerfile +++ b/osmo-mgw-master/Dockerfile @@ -30,7 +30,7 @@ RUN cd osmo-mgw && \ - git fetch && git checkout -f $OSMO_MGW_BRANCH && \ + git fetch && git checkout -f -B $OSMO_MGW_BRANCH $OSMO_MGW_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-msc-master/Dockerfile b/osmo-msc-master/Dockerfile index 83576ea..c8cfd62 100644 --- a/osmo-msc-master/Dockerfile +++ b/osmo-msc-master/Dockerfile @@ -37,7 +37,7 @@ ADD http://git.osmocom.org/osmo-msc/patch?h=$OSMO_MSC_BRANCH /tmp/commit-osmo-msc RUN cd osmo-msc && \ - git fetch && git checkout -f $OSMO_MSC_BRANCH && \ + git fetch && git checkout -f -B $OSMO_MSC_BRANCH $OSMO_MSC_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-smpp --enable-iu && \ diff --git a/osmo-nitb-master/Dockerfile b/osmo-nitb-master/Dockerfile index d0fc8af..d3774da 100644 --- a/osmo-nitb-master/Dockerfile +++ b/osmo-nitb-master/Dockerfile @@ -31,7 +31,7 @@ ADD http://git.osmocom.org/openbsc/patch?h=$OSMO_NITB_BRANCH /tmp/commit-openbsc RUN cd openbsc/openbsc && \ - git fetch && git checkout -f $OSMO_NITB_BRANCH && \ + git fetch && git checkout -f -B $OSMO_NITB_BRANCH $OSMO_NITB_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-nat --enable-osmo-bsc --enable-smpp && \ diff --git a/osmo-pcu-master/Dockerfile b/osmo-pcu-master/Dockerfile index fba8c31..7a294a4 100644 --- a/osmo-pcu-master/Dockerfile +++ b/osmo-pcu-master/Dockerfile @@ -28,7 +28,7 @@ ADD http://git.osmocom.org/osmo-pcu/patch?h=$OSMO_PCU_BRANCH /tmp/commit-osmo-pcu RUN cd osmo-pcu && \ - git fetch && git checkout -f $OSMO_PCU_BRANCH && \ + git fetch && git checkout -f -B $OSMO_PCU_BRANCH $OSMO_PCU_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-trx && \ diff --git a/osmo-sgsn-master/Dockerfile b/osmo-sgsn-master/Dockerfile index 4973240..c373564 100644 --- a/osmo-sgsn-master/Dockerfile +++ b/osmo-sgsn-master/Dockerfile @@ -32,7 +32,7 @@ ADD http://git.osmocom.org/osmo-sgsn/patch?h=$OSMO_SGSN_BRANCH /tmp/commit RUN cd osmo-sgsn && \ - git fetch && git checkout -f $OSMO_SGSN_BRANCH && \ + git fetch && git checkout -f -B $OSMO_SGSN_BRANCH $OSMO_SGSN_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-sip-master/Dockerfile b/osmo-sip-master/Dockerfile index a8d14c7..258b1fe 100644 --- a/osmo-sip-master/Dockerfile +++ b/osmo-sip-master/Dockerfile @@ -36,7 +36,7 @@ ADD http://git.osmocom.org/osmo-sip-connector/patch?h=$OSMO_SIP_BRANCH /tmp/commit-osmo-sip-connector RUN cd osmo-sip-connector && \ - git fetch && git checkout -f $OSMO_SIP_BRANCH && \ + git fetch && git checkout -f -B $OSMO_SIP_BRANCH $OSMO_SIP_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-smpp --enable-iu && \ diff --git a/osmo-stp-master/Dockerfile b/osmo-stp-master/Dockerfile index a1e931f..0a62ed7 100644 --- a/osmo-stp-master/Dockerfile +++ b/osmo-stp-master/Dockerfile @@ -26,7 +26,7 @@ RUN git clone git://git.osmocom.org/libosmo-sccp.git ADD http://git.osmocom.org/libosmo-sccp/patch?h=$OSMO_STP_BRANCH /tmp/commit RUN cd libosmo-sccp && \ - git fetch && git checkout -f $OSMO_STP_BRANCH && \ + git fetch && git checkout -f -B $OSMO_STP_BRANCH $OSMO_STP_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmocom-bb-host-master/Dockerfile b/osmocom-bb-host-master/Dockerfile index ef6ff2d..260f381 100644 --- a/osmocom-bb-host-master/Dockerfile +++ b/osmocom-bb-host-master/Dockerfile @@ -25,7 +25,7 @@ ADD http://git.osmocom.org/osmocom-bb/patch?h=$OSMO_BB_BRANCH /tmp/commit RUN cd osmocom-bb && \ - git fetch && git checkout -f $OSMO_BB_BRANCH && \ + git fetch && git checkout -f -B $OSMO_BB_BRANCH origin/$OSMO_BB_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD RUN cd osmocom-bb/src/host/trxcon && \ diff --git a/ttcn3-bsc-test/Dockerfile b/ttcn3-bsc-test/Dockerfile index 93d65ad..546f33b 100644 --- a/ttcn3-bsc-test/Dockerfile +++ b/ttcn3-bsc-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f master && \ + git checkout -f -B master origin/master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f $OSMO_TTCN3_BRANCH && \ + git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make bsc diff --git a/ttcn3-bscnat-test/Dockerfile b/ttcn3-bscnat-test/Dockerfile index 86422b3..047f21c 100644 --- a/ttcn3-bscnat-test/Dockerfile +++ b/ttcn3-bscnat-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f master && \ + git checkout -f -B master origin/master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f $OSMO_TTCN3_BRANCH && \ + git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make bsc-nat diff --git a/ttcn3-bts-test/Dockerfile b/ttcn3-bts-test/Dockerfile index 387afb0..d8969bb 100644 --- a/ttcn3-bts-test/Dockerfile +++ b/ttcn3-bts-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f master && \ + git checkout -f -B master origin/master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f $OSMO_TTCN3_BRANCH && \ + git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make deps-update bts diff --git a/ttcn3-ggsn-test/Dockerfile b/ttcn3-ggsn-test/Dockerfile index 7bfb0a8..6d6aff6 100644 --- a/ttcn3-ggsn-test/Dockerfile +++ b/ttcn3-ggsn-test/Dockerfile @@ -4,7 +4,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f master && \ + git checkout -f -B master origin/master && \ make deps ARG OSMO_TTCN3_BRANCH="master" @@ -12,7 +12,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f $OSMO_TTCN3_BRANCH && \ + git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make ggsn_tests diff --git a/ttcn3-hlr-test/Dockerfile b/ttcn3-hlr-test/Dockerfile index fa70311..752d442 100644 --- a/ttcn3-hlr-test/Dockerfile +++ b/ttcn3-hlr-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f master && \ + git checkout -f -B master origin/master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f $OSMO_TTCN3_BRANCH && \ + git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make deps-update hlr diff --git a/ttcn3-mgw-test/Dockerfile b/ttcn3-mgw-test/Dockerfile index d6267e8..bf13d12 100644 --- a/ttcn3-mgw-test/Dockerfile +++ b/ttcn3-mgw-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f master && \ + git checkout -f -B master origin/master && \ make deps ARG OSMO_TTCN3_BRANCH="master" @@ -13,7 +13,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f $OSMO_TTCN3_BRANCH && \ + git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make mgw diff --git a/ttcn3-msc-test/Dockerfile b/ttcn3-msc-test/Dockerfile index 92eeee0..53aa393 100644 --- a/ttcn3-msc-test/Dockerfile +++ b/ttcn3-msc-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f master && \ + git checkout -f -B master origin/master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f $OSMO_TTCN3_BRANCH && \ + git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make msc diff --git a/ttcn3-nitb-sysinfo/Dockerfile b/ttcn3-nitb-sysinfo/Dockerfile index 45bf225..d0ec87a 100644 --- a/ttcn3-nitb-sysinfo/Dockerfile +++ b/ttcn3-nitb-sysinfo/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f master && \ + git checkout -f -B master origin/master && \ make deps ARG OSMO_TTCN3_BRANCH="master" @@ -13,7 +13,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f $OSMO_TTCN3_BRANCH && \ + git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make sysinfo diff --git a/ttcn3-pcu-test/Dockerfile b/ttcn3-pcu-test/Dockerfile index fa9e724..fbb64f5 100644 --- a/ttcn3-pcu-test/Dockerfile +++ b/ttcn3-pcu-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f master && \ + git checkout -f -B master origin/master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f $OSMO_TTCN3_BRANCH && \ + git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make pcu diff --git a/ttcn3-sgsn-test/Dockerfile b/ttcn3-sgsn-test/Dockerfile index 09e4ec6..3049d3f 100644 --- a/ttcn3-sgsn-test/Dockerfile +++ b/ttcn3-sgsn-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f master && \ + git checkout -f -B master origin/master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f $OSMO_TTCN3_BRANCH && \ + git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make sgsn diff --git a/ttcn3-sip-test/Dockerfile b/ttcn3-sip-test/Dockerfile index 4ba59be..eead347 100644 --- a/ttcn3-sip-test/Dockerfile +++ b/ttcn3-sip-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f master && \ + git checkout -f -B master origin/master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f $OSMO_TTCN3_BRANCH && \ + git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make sip -- To view, visit https://gerrit.osmocom.org/14118 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ie6da0f9ea96f11407e38545a6b3cf22ef9cadc25 Gerrit-Change-Number: 14118 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 15:53:35 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 15:53:35 +0000 Subject: Change in docker-playground[master]: Revert "Simplify git checkout, allow branches and commits" In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14118 ) Change subject: Revert "Simplify git checkout, allow branches and commits" ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14118 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie6da0f9ea96f11407e38545a6b3cf22ef9cadc25 Gerrit-Change-Number: 14118 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Tue, 21 May 2019 15:53:35 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 15:53:37 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 15:53:37 +0000 Subject: Change in docker-playground[master]: Revert "Simplify git checkout, allow branches and commits" In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14118 ) Change subject: Revert "Simplify git checkout, allow branches and commits" ...................................................................... Revert "Simplify git checkout, allow branches and commits" Unfortuately this commit will check out *local* master (i.e. the previous checkout) rather than the origin/master as it's supposed to be. This means that ever since merging this patch, our ttcn3 tests were running some "undefined" stale versions and not current master. This reverts commit 26565bb729549152ce8fa89f59df02f37c907c27. Change-Id: Ie6da0f9ea96f11407e38545a6b3cf22ef9cadc25 --- M gr-gsm-master/Dockerfile M osmo-bsc-master/Dockerfile M osmo-bts-master/Dockerfile M osmo-gerrit-libosmo/Dockerfile M osmo-ggsn-master/Dockerfile M osmo-hlr-master/Dockerfile M osmo-hnbgw-master/Dockerfile M osmo-mgw-master/Dockerfile M osmo-msc-master/Dockerfile M osmo-nitb-master/Dockerfile M osmo-pcu-master/Dockerfile M osmo-sgsn-master/Dockerfile M osmo-sip-master/Dockerfile M osmo-stp-master/Dockerfile M osmocom-bb-host-master/Dockerfile M ttcn3-bsc-test/Dockerfile M ttcn3-bscnat-test/Dockerfile M ttcn3-bts-test/Dockerfile M ttcn3-ggsn-test/Dockerfile M ttcn3-hlr-test/Dockerfile M ttcn3-mgw-test/Dockerfile M ttcn3-msc-test/Dockerfile M ttcn3-nitb-sysinfo/Dockerfile M ttcn3-pcu-test/Dockerfile M ttcn3-sgsn-test/Dockerfile M ttcn3-sip-test/Dockerfile 26 files changed, 47 insertions(+), 47 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/gr-gsm-master/Dockerfile b/gr-gsm-master/Dockerfile index b678dd6..03cf427 100644 --- a/gr-gsm-master/Dockerfile +++ b/gr-gsm-master/Dockerfile @@ -50,7 +50,7 @@ ADD http://git.osmocom.org/libosmocore/patch?h=$LIBOSMOCORE_BRANCH /tmp/commit-libosmocore RUN cd libosmocore \ - && git fetch && git checkout -f $LIBOSMOCORE_BRANCH \ + && git fetch && git checkout -f -B $LIBOSMOCORE_BRANCH origin/$LIBOSMOCORE_BRANCH \ && git rev-parse --abbrev-ref HEAD && git rev-parse HEAD \ && autoreconf -fi \ && ./configure \ @@ -65,7 +65,7 @@ ADD http://git.osmocom.org/gr-gsm/patch?h=$GR_GSM_BRANCH /tmp/commit-gr-gsm RUN cd gr-gsm \ - && git fetch && git checkout -f $GR_GSM_BRANCH \ + && git fetch && git checkout -f -B $GR_GSM_BRANCH origin/$GR_GSM_BRANCH \ && git rev-parse HEAD \ && mkdir build/ \ && cd build/ \ diff --git a/osmo-bsc-master/Dockerfile b/osmo-bsc-master/Dockerfile index cbf80f9..bcd0573 100644 --- a/osmo-bsc-master/Dockerfile +++ b/osmo-bsc-master/Dockerfile @@ -32,7 +32,7 @@ ADD http://git.osmocom.org/osmo-bsc/patch?h=$OSMO_BSC_BRANCH /tmp/commit-osmo-bsc RUN cd osmo-bsc && \ - git fetch && git checkout -f $OSMO_BSC_BRANCH && \ + git fetch && git checkout -f -B $OSMO_BSC_BRANCH $OSMO_BSC_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-bts-master/Dockerfile b/osmo-bts-master/Dockerfile index d7707a3..f4ddf3a 100644 --- a/osmo-bts-master/Dockerfile +++ b/osmo-bts-master/Dockerfile @@ -33,7 +33,7 @@ ADD http://git.osmocom.org/osmo-bts/patch?h=$OSMO_BTS_BRANCH /tmp/commit-osmo-bts RUN cd osmo-bts && \ - git fetch && git checkout -f $OSMO_BTS_BRANCH && \ + git fetch && git checkout -f -B $OSMO_BTS_BRANCH $OSMO_BTS_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-trx && \ diff --git a/osmo-gerrit-libosmo/Dockerfile b/osmo-gerrit-libosmo/Dockerfile index 4db1923..5442703 100644 --- a/osmo-gerrit-libosmo/Dockerfile +++ b/osmo-gerrit-libosmo/Dockerfile @@ -45,7 +45,7 @@ # build libasn1c first, no libosmo* dependency and infrequent changes ADD http://git.osmocom.org/libasn1c/patch /tmp/commit-libasn1c RUN cd libasn1c && \ - git fetch && git checkout -f master && \ + git fetch && git checkout -f -B master origin/master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -56,7 +56,7 @@ # build libsmpp34 first, no libosmo* dependency and infrequent changes ADD http://git.osmocom.org/libsmpp34/patch /tmp/commit-libsmpp34 RUN cd libsmpp34 && \ - git fetch && git checkout -f master && \ + git fetch && git checkout -f -B master origin/master && \ autoreconf -fi && \ ./configure && \ make -j1 && \ @@ -67,7 +67,7 @@ # build libosmocore before any of its downatream dependences ADD http://git.osmocom.org/libosmocore/patch /tmp/commit-libosmocore RUN cd libosmocore && \ - git fetch && git checkout -f master && \ + git fetch && git checkout -f -B master origin/master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -79,7 +79,7 @@ ADD http://git.osmocom.org/libosmo-abis/patch /tmp/commit-libosmo-abis RUN cd libosmo-abis && \ - git fetch && git checkout -f master && \ + git fetch && git checkout -f -B master origin/master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -89,7 +89,7 @@ ADD http://git.osmocom.org/libosmo-netif/patch /tmp/commit-libosmo-netif RUN cd libosmo-netif && \ - git fetch && git checkout -f master && \ + git fetch && git checkout -f -B master origin/master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -99,7 +99,7 @@ ADD http://git.osmocom.org/libosmo-sccp/patch /tmp/commit-libosmo-sccp RUN cd libosmo-sccp && \ - git fetch && git checkout -f master && \ + git fetch && git checkout -f -B master origin/master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -109,7 +109,7 @@ ADD http://git.osmocom.org/osmo-mgw/patch /tmp/commit-osmo-mgw RUN cd osmo-mgw && \ - git fetch && git checkout -f master && \ + git fetch && git checkout -f -B master origin/master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -119,7 +119,7 @@ ADD http://git.osmocom.org/osmo-iuh/patch /tmp/commit-osmo-iuh RUN cd osmo-iuh && \ - git fetch && git checkout -f master && \ + git fetch && git checkout -f -B master origin/master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -129,7 +129,7 @@ ADD http://git.osmocom.org/osmo-ggsn/patch /tmp/commit-osmo-ggsn RUN cd osmo-ggsn && \ - git fetch && git checkout -f master && \ + git fetch && git checkout -f -B master origin/master && \ autoreconf -fi && \ ./configure && \ make -j8 && \ @@ -139,4 +139,4 @@ # example command which builds a single osmo-* application at 'docker run' time in tmpfs -CMD /bin/sh -c 'cd /tmpfs && git clone --reference /build/openbsc git://git.osmocom.org/openbsc.git && cd openbsc && git checkout -f master && cd openbsc && autoreconf -fi && ./configure --enable-nat --enable-osmo-bsc --enable-smpp --enable-vty-tests --enable-external-tests && make -j8 check' +CMD /bin/sh -c 'cd /tmpfs && git clone --reference /build/openbsc git://git.osmocom.org/openbsc.git && cd openbsc && git checkout -f -B master origin/master && cd openbsc && autoreconf -fi && ./configure --enable-nat --enable-osmo-bsc --enable-smpp --enable-vty-tests --enable-external-tests && make -j8 check' diff --git a/osmo-ggsn-master/Dockerfile b/osmo-ggsn-master/Dockerfile index 8398fbb..cf84d02 100644 --- a/osmo-ggsn-master/Dockerfile +++ b/osmo-ggsn-master/Dockerfile @@ -25,7 +25,7 @@ RUN git clone git://git.osmocom.org/osmo-ggsn.git ADD http://git.osmocom.org/osmo-ggsn/patch/?h=$OSMO_GGSN_BRANCH /tmp/commit RUN cd osmo-ggsn && \ - git fetch && git checkout -f $OSMO_GGSN_BRANCH && \ + git fetch && git checkout -f -B $OSMO_GGSN_BRANCH $OSMO_GGSN_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-hlr-master/Dockerfile b/osmo-hlr-master/Dockerfile index 84df534..2da7c08 100644 --- a/osmo-hlr-master/Dockerfile +++ b/osmo-hlr-master/Dockerfile @@ -30,7 +30,7 @@ ADD http://git.osmocom.org/osmo-hlr/patch?h=$OSMO_HLR_BRANCH /tmp/commit-osmo-hlr RUN cd osmo-hlr && \ - git fetch && git checkout -f $OSMO_HLR_BRANCH && \ + git fetch && git checkout -f -B $OSMO_HLR_BRANCH $OSMO_HLR_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-hnbgw-master/Dockerfile b/osmo-hnbgw-master/Dockerfile index 347e8d4..c89502b 100644 --- a/osmo-hnbgw-master/Dockerfile +++ b/osmo-hnbgw-master/Dockerfile @@ -30,7 +30,7 @@ ADD http://git.osmocom.org/osmo-iuh/patch?h=$OSMO_IUH_BRANCH /tmp/commit-osmo-mgw RUN cd osmo-iuh && \ - git fetch && git checkout -f $OSMO_IUH_BRANCH && \ + git fetch && git checkout -f -B $OSMO_IUH_BRANCH $OSMO_IUH_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-mgw-master/Dockerfile b/osmo-mgw-master/Dockerfile index 92e499e..4c6d32a 100644 --- a/osmo-mgw-master/Dockerfile +++ b/osmo-mgw-master/Dockerfile @@ -30,7 +30,7 @@ RUN cd osmo-mgw && \ - git fetch && git checkout -f $OSMO_MGW_BRANCH && \ + git fetch && git checkout -f -B $OSMO_MGW_BRANCH $OSMO_MGW_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-msc-master/Dockerfile b/osmo-msc-master/Dockerfile index 83576ea..c8cfd62 100644 --- a/osmo-msc-master/Dockerfile +++ b/osmo-msc-master/Dockerfile @@ -37,7 +37,7 @@ ADD http://git.osmocom.org/osmo-msc/patch?h=$OSMO_MSC_BRANCH /tmp/commit-osmo-msc RUN cd osmo-msc && \ - git fetch && git checkout -f $OSMO_MSC_BRANCH && \ + git fetch && git checkout -f -B $OSMO_MSC_BRANCH $OSMO_MSC_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-smpp --enable-iu && \ diff --git a/osmo-nitb-master/Dockerfile b/osmo-nitb-master/Dockerfile index d0fc8af..d3774da 100644 --- a/osmo-nitb-master/Dockerfile +++ b/osmo-nitb-master/Dockerfile @@ -31,7 +31,7 @@ ADD http://git.osmocom.org/openbsc/patch?h=$OSMO_NITB_BRANCH /tmp/commit-openbsc RUN cd openbsc/openbsc && \ - git fetch && git checkout -f $OSMO_NITB_BRANCH && \ + git fetch && git checkout -f -B $OSMO_NITB_BRANCH $OSMO_NITB_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-nat --enable-osmo-bsc --enable-smpp && \ diff --git a/osmo-pcu-master/Dockerfile b/osmo-pcu-master/Dockerfile index fba8c31..7a294a4 100644 --- a/osmo-pcu-master/Dockerfile +++ b/osmo-pcu-master/Dockerfile @@ -28,7 +28,7 @@ ADD http://git.osmocom.org/osmo-pcu/patch?h=$OSMO_PCU_BRANCH /tmp/commit-osmo-pcu RUN cd osmo-pcu && \ - git fetch && git checkout -f $OSMO_PCU_BRANCH && \ + git fetch && git checkout -f -B $OSMO_PCU_BRANCH $OSMO_PCU_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-trx && \ diff --git a/osmo-sgsn-master/Dockerfile b/osmo-sgsn-master/Dockerfile index 4973240..c373564 100644 --- a/osmo-sgsn-master/Dockerfile +++ b/osmo-sgsn-master/Dockerfile @@ -32,7 +32,7 @@ ADD http://git.osmocom.org/osmo-sgsn/patch?h=$OSMO_SGSN_BRANCH /tmp/commit RUN cd osmo-sgsn && \ - git fetch && git checkout -f $OSMO_SGSN_BRANCH && \ + git fetch && git checkout -f -B $OSMO_SGSN_BRANCH $OSMO_SGSN_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-sip-master/Dockerfile b/osmo-sip-master/Dockerfile index a8d14c7..258b1fe 100644 --- a/osmo-sip-master/Dockerfile +++ b/osmo-sip-master/Dockerfile @@ -36,7 +36,7 @@ ADD http://git.osmocom.org/osmo-sip-connector/patch?h=$OSMO_SIP_BRANCH /tmp/commit-osmo-sip-connector RUN cd osmo-sip-connector && \ - git fetch && git checkout -f $OSMO_SIP_BRANCH && \ + git fetch && git checkout -f -B $OSMO_SIP_BRANCH $OSMO_SIP_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-smpp --enable-iu && \ diff --git a/osmo-stp-master/Dockerfile b/osmo-stp-master/Dockerfile index a1e931f..0a62ed7 100644 --- a/osmo-stp-master/Dockerfile +++ b/osmo-stp-master/Dockerfile @@ -26,7 +26,7 @@ RUN git clone git://git.osmocom.org/libosmo-sccp.git ADD http://git.osmocom.org/libosmo-sccp/patch?h=$OSMO_STP_BRANCH /tmp/commit RUN cd libosmo-sccp && \ - git fetch && git checkout -f $OSMO_STP_BRANCH && \ + git fetch && git checkout -f -B $OSMO_STP_BRANCH $OSMO_STP_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmocom-bb-host-master/Dockerfile b/osmocom-bb-host-master/Dockerfile index ef6ff2d..260f381 100644 --- a/osmocom-bb-host-master/Dockerfile +++ b/osmocom-bb-host-master/Dockerfile @@ -25,7 +25,7 @@ ADD http://git.osmocom.org/osmocom-bb/patch?h=$OSMO_BB_BRANCH /tmp/commit RUN cd osmocom-bb && \ - git fetch && git checkout -f $OSMO_BB_BRANCH && \ + git fetch && git checkout -f -B $OSMO_BB_BRANCH origin/$OSMO_BB_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD RUN cd osmocom-bb/src/host/trxcon && \ diff --git a/ttcn3-bsc-test/Dockerfile b/ttcn3-bsc-test/Dockerfile index 93d65ad..546f33b 100644 --- a/ttcn3-bsc-test/Dockerfile +++ b/ttcn3-bsc-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f master && \ + git checkout -f -B master origin/master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f $OSMO_TTCN3_BRANCH && \ + git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make bsc diff --git a/ttcn3-bscnat-test/Dockerfile b/ttcn3-bscnat-test/Dockerfile index 86422b3..047f21c 100644 --- a/ttcn3-bscnat-test/Dockerfile +++ b/ttcn3-bscnat-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f master && \ + git checkout -f -B master origin/master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f $OSMO_TTCN3_BRANCH && \ + git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make bsc-nat diff --git a/ttcn3-bts-test/Dockerfile b/ttcn3-bts-test/Dockerfile index 387afb0..d8969bb 100644 --- a/ttcn3-bts-test/Dockerfile +++ b/ttcn3-bts-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f master && \ + git checkout -f -B master origin/master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f $OSMO_TTCN3_BRANCH && \ + git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make deps-update bts diff --git a/ttcn3-ggsn-test/Dockerfile b/ttcn3-ggsn-test/Dockerfile index 7bfb0a8..6d6aff6 100644 --- a/ttcn3-ggsn-test/Dockerfile +++ b/ttcn3-ggsn-test/Dockerfile @@ -4,7 +4,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f master && \ + git checkout -f -B master origin/master && \ make deps ARG OSMO_TTCN3_BRANCH="master" @@ -12,7 +12,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f $OSMO_TTCN3_BRANCH && \ + git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make ggsn_tests diff --git a/ttcn3-hlr-test/Dockerfile b/ttcn3-hlr-test/Dockerfile index fa70311..752d442 100644 --- a/ttcn3-hlr-test/Dockerfile +++ b/ttcn3-hlr-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f master && \ + git checkout -f -B master origin/master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f $OSMO_TTCN3_BRANCH && \ + git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make deps-update hlr diff --git a/ttcn3-mgw-test/Dockerfile b/ttcn3-mgw-test/Dockerfile index d6267e8..bf13d12 100644 --- a/ttcn3-mgw-test/Dockerfile +++ b/ttcn3-mgw-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f master && \ + git checkout -f -B master origin/master && \ make deps ARG OSMO_TTCN3_BRANCH="master" @@ -13,7 +13,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f $OSMO_TTCN3_BRANCH && \ + git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make mgw diff --git a/ttcn3-msc-test/Dockerfile b/ttcn3-msc-test/Dockerfile index 92eeee0..53aa393 100644 --- a/ttcn3-msc-test/Dockerfile +++ b/ttcn3-msc-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f master && \ + git checkout -f -B master origin/master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f $OSMO_TTCN3_BRANCH && \ + git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make msc diff --git a/ttcn3-nitb-sysinfo/Dockerfile b/ttcn3-nitb-sysinfo/Dockerfile index 45bf225..d0ec87a 100644 --- a/ttcn3-nitb-sysinfo/Dockerfile +++ b/ttcn3-nitb-sysinfo/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f master && \ + git checkout -f -B master origin/master && \ make deps ARG OSMO_TTCN3_BRANCH="master" @@ -13,7 +13,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f $OSMO_TTCN3_BRANCH && \ + git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make sysinfo diff --git a/ttcn3-pcu-test/Dockerfile b/ttcn3-pcu-test/Dockerfile index fa9e724..fbb64f5 100644 --- a/ttcn3-pcu-test/Dockerfile +++ b/ttcn3-pcu-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f master && \ + git checkout -f -B master origin/master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f $OSMO_TTCN3_BRANCH && \ + git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make pcu diff --git a/ttcn3-sgsn-test/Dockerfile b/ttcn3-sgsn-test/Dockerfile index 09e4ec6..3049d3f 100644 --- a/ttcn3-sgsn-test/Dockerfile +++ b/ttcn3-sgsn-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f master && \ + git checkout -f -B master origin/master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f $OSMO_TTCN3_BRANCH && \ + git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make sgsn diff --git a/ttcn3-sip-test/Dockerfile b/ttcn3-sip-test/Dockerfile index 4ba59be..eead347 100644 --- a/ttcn3-sip-test/Dockerfile +++ b/ttcn3-sip-test/Dockerfile @@ -5,7 +5,7 @@ RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git RUN cd osmo-ttcn3-hacks && \ - git checkout -f master && \ + git checkout -f -B master origin/master && \ make deps RUN git config --global user.email docker at dock.er && \ @@ -16,7 +16,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f $OSMO_TTCN3_BRANCH && \ + git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make sip -- To view, visit https://gerrit.osmocom.org/14118 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie6da0f9ea96f11407e38545a6b3cf22ef9cadc25 Gerrit-Change-Number: 14118 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Tue May 21 16:07:25 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 21 May 2019 16:07:25 +0000 Subject: Build failure of network:osmocom:nightly/binutils-arm-osmo-eabi in xUbuntu_19.04/x86_64 In-Reply-To: References: Message-ID: <5ce422571ecb4_58803905f812334d3@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/binutils-arm-osmo-eabi/xUbuntu_19.04/x86_64 Package network:osmocom:nightly/binutils-arm-osmo-eabi failed to build in xUbuntu_19.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly binutils-arm-osmo-eabi Last lines of build log: [ 171s] ../../bfd/tekhex.c:1009:3: note: in expansion of macro 'BFD_JUMP_TABLE_DYNAMIC' [ 171s] BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), [ 171s] ^~~~~~~~~~~~~~~~~~~~~~ [ 171s] cc1: all warnings being treated as errors [ 171s] make[5]: *** [Makefile:1517: tekhex.lo] Error 1 [ 171s] cc1: all warnings being treated as errors [ 171s] make[5]: *** [Makefile:1517: srec.lo] Error 1 [ 171s] make[5]: Leaving directory '/usr/src/packages/BUILD/build/bfd' [ 171s] make[4]: *** [Makefile:1555: all-recursive] Error 1 [ 171s] make[4]: Leaving directory '/usr/src/packages/BUILD/build/bfd' [ 171s] make[3]: *** [Makefile:1066: all] Error 2 [ 171s] make[3]: Leaving directory '/usr/src/packages/BUILD/build/bfd' [ 171s] make[2]: *** [Makefile:3331: all-bfd] Error 2 [ 171s] make[2]: Leaving directory '/usr/src/packages/BUILD/build' [ 171s] make[1]: *** [Makefile:850: all] Error 2 [ 171s] make[1]: Leaving directory '/usr/src/packages/BUILD/build' [ 171s] dh_auto_build: cd build && make -j8 returned exit code 2 [ 171s] make: *** [debian/rules:43: build] Error 2 [ 171s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 171s] [ 171s] lamb06 failed "build binutils-arm-osmo-eabi_2.21.1a.dsc" at Tue May 21 16:07:14 UTC 2019. [ 171s] [ 171s] ### VM INTERACTION START ### [ 174s] [ 160.010687] sysrq: SysRq : Power Off [ 174s] [ 160.017538] reboot: Power down [ 174s] ### VM INTERACTION END ### [ 174s] [ 174s] lamb06 failed "build binutils-arm-osmo-eabi_2.21.1a.dsc" at Tue May 21 16:07:18 UTC 2019. [ 174s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue May 21 16:08:22 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 21 May 2019 16:08:22 +0000 Subject: Build failure of network:osmocom:nightly/binutils-arm-osmo-eabi in xUbuntu_18.10/i586 In-Reply-To: References: Message-ID: <5ce422976f680_58803905f81233574@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/binutils-arm-osmo-eabi/xUbuntu_18.10/i586 Package network:osmocom:nightly/binutils-arm-osmo-eabi failed to build in xUbuntu_18.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly binutils-arm-osmo-eabi Last lines of build log: [ 259s] ../../bfd/tekhex.c:1009:3: note: in expansion of macro 'BFD_JUMP_TABLE_DYNAMIC' [ 259s] BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), [ 259s] ^~~~~~~~~~~~~~~~~~~~~~ [ 259s] cc1: all warnings being treated as errors [ 259s] make[5]: *** [Makefile:1517: srec.lo] Error 1 [ 259s] cc1: all warnings being treated as errors [ 259s] make[5]: *** [Makefile:1517: tekhex.lo] Error 1 [ 259s] make[5]: Leaving directory '/usr/src/packages/BUILD/build/bfd' [ 259s] make[4]: *** [Makefile:1555: all-recursive] Error 1 [ 259s] make[4]: Leaving directory '/usr/src/packages/BUILD/build/bfd' [ 259s] make[3]: *** [Makefile:1066: all] Error 2 [ 259s] make[3]: Leaving directory '/usr/src/packages/BUILD/build/bfd' [ 259s] make[2]: *** [Makefile:3333: all-bfd] Error 2 [ 259s] make[2]: Leaving directory '/usr/src/packages/BUILD/build' [ 259s] make[1]: *** [Makefile:852: all] Error 2 [ 259s] make[1]: Leaving directory '/usr/src/packages/BUILD/build' [ 259s] dh_auto_build: cd build && make -j4 returned exit code 2 [ 259s] make: *** [debian/rules:43: build] Error 2 [ 259s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 259s] [ 259s] cloud113 failed "build binutils-arm-osmo-eabi_2.21.1a.dsc" at Tue May 21 16:08:04 UTC 2019. [ 259s] [ 259s] ### VM INTERACTION START ### [ 262s] [ 237.490841] sysrq: SysRq : Power Off [ 262s] [ 237.515066] reboot: Power down [ 263s] ### VM INTERACTION END ### [ 263s] [ 263s] cloud113 failed "build binutils-arm-osmo-eabi_2.21.1a.dsc" at Tue May 21 16:08:10 UTC 2019. [ 263s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue May 21 16:08:56 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 21 May 2019 16:08:56 +0000 Subject: Build failure of network:osmocom:nightly/binutils-arm-osmo-eabi in Debian_Unstable/x86_64 In-Reply-To: References: Message-ID: <5ce422b5f2a8f_58803905f81233691@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/binutils-arm-osmo-eabi/Debian_Unstable/x86_64 Package network:osmocom:nightly/binutils-arm-osmo-eabi failed to build in Debian_Unstable/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly binutils-arm-osmo-eabi Last lines of build log: [ 231s] NAME##_canonicalize_dynamic_reloc [ 231s] ^~~~ [ 231s] ../../bfd/ihex.c:994:3: note: in expansion of macro 'BFD_JUMP_TABLE_DYNAMIC' [ 231s] BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), [ 231s] ^~~~~~~~~~~~~~~~~~~~~~ [ 231s] cc1: all warnings being treated as errors [ 231s] make[5]: *** [Makefile:1517: ihex.lo] Error 1 [ 231s] make[5]: Leaving directory '/usr/src/packages/BUILD/build/bfd' [ 231s] make[4]: *** [Makefile:1555: all-recursive] Error 1 [ 231s] make[4]: Leaving directory '/usr/src/packages/BUILD/build/bfd' [ 231s] make[3]: *** [Makefile:1066: all] Error 2 [ 231s] make[3]: Leaving directory '/usr/src/packages/BUILD/build/bfd' [ 231s] make[2]: *** [Makefile:3331: all-bfd] Error 2 [ 231s] make[2]: Leaving directory '/usr/src/packages/BUILD/build' [ 231s] make[1]: *** [Makefile:850: all] Error 2 [ 231s] make[1]: Leaving directory '/usr/src/packages/BUILD/build' [ 231s] dh_auto_build: cd build && make -j8 returned exit code 2 [ 231s] make: *** [debian/rules:43: build] Error 2 [ 231s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 231s] [ 231s] lamb56 failed "build binutils-arm-osmo-eabi_2.21.1a.dsc" at Tue May 21 16:08:46 UTC 2019. [ 231s] [ 231s] ### VM INTERACTION START ### [ 234s] [ 219.194996] sysrq: SysRq : Power Off [ 234s] [ 219.200884] reboot: Power down [ 234s] ### VM INTERACTION END ### [ 234s] [ 234s] lamb56 failed "build binutils-arm-osmo-eabi_2.21.1a.dsc" at Tue May 21 16:08:50 UTC 2019. [ 234s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue May 21 16:11:50 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 21 May 2019 16:11:50 +0000 Subject: Build failure of network:osmocom:nightly/binutils-arm-osmo-eabi in Debian_Testing/x86_64 In-Reply-To: References: Message-ID: <5ce423634e062_58803905f8123435b@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/binutils-arm-osmo-eabi/Debian_Testing/x86_64 Package network:osmocom:nightly/binutils-arm-osmo-eabi failed to build in Debian_Testing/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly binutils-arm-osmo-eabi Last lines of build log: [ 313s] make[5]: *** Waiting for unfinished jobs.... [ 313s] cc1: all warnings being treated as errors [ 313s] make[5]: *** [Makefile:1517: tekhex.lo] Error 1 [ 313s] cc1: all warnings being treated as errors [ 313s] make[5]: *** [Makefile:1517: ihex.lo] Error 1 [ 314s] cc1: all warnings being treated as errors [ 314s] make[5]: *** [Makefile:1517: srec.lo] Error 1 [ 314s] make[5]: Leaving directory '/usr/src/packages/BUILD/build/bfd' [ 314s] make[4]: *** [Makefile:1555: all-recursive] Error 1 [ 314s] make[4]: Leaving directory '/usr/src/packages/BUILD/build/bfd' [ 314s] make[3]: *** [Makefile:1066: all] Error 2 [ 314s] make[3]: Leaving directory '/usr/src/packages/BUILD/build/bfd' [ 314s] make[2]: *** [Makefile:3331: all-bfd] Error 2 [ 314s] make[2]: Leaving directory '/usr/src/packages/BUILD/build' [ 314s] make[1]: *** [Makefile:850: all] Error 2 [ 314s] make[1]: Leaving directory '/usr/src/packages/BUILD/build' [ 314s] dh_auto_build: cd build && make -j6 returned exit code 2 [ 314s] make: *** [debian/rules:43: build] Error 2 [ 314s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 314s] [ 314s] morla3 failed "build binutils-arm-osmo-eabi_2.21.1a.dsc" at Tue May 21 16:11:42 UTC 2019. [ 314s] [ 314s] ### VM INTERACTION START ### [ 317s] [ 298.785477] sysrq: SysRq : Power Off [ 317s] [ 298.810826] reboot: Power down [ 317s] ### VM INTERACTION END ### [ 317s] [ 317s] morla3 failed "build binutils-arm-osmo-eabi_2.21.1a.dsc" at Tue May 21 16:11:46 UTC 2019. [ 317s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue May 21 16:18:24 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 21 May 2019 16:18:24 +0000 Subject: Build failure of network:osmocom:latest/osmo-sysmon in xUbuntu_17.10/i586 In-Reply-To: References: Message-ID: <5ce424ea1ee64_58803905f812354be@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sysmon/xUbuntu_17.10/i586 Package network:osmocom:latest/osmo-sysmon failed to build in xUbuntu_17.10/i586 Check out the package for editing: osc checkout network:osmocom:latest osmo-sysmon Last lines of build log: [ 76s] #define VERSION "0.1.0" [ 76s] #define STDC_HEADERS 1 [ 76s] #define HAVE_SYS_TYPES_H 1 [ 76s] #define HAVE_SYS_STAT_H 1 [ 76s] #define HAVE_STDLIB_H 1 [ 76s] #define HAVE_STRING_H 1 [ 76s] #define HAVE_MEMORY_H 1 [ 76s] #define HAVE_STRINGS_H 1 [ 76s] #define HAVE_INTTYPES_H 1 [ 76s] #define HAVE_STDINT_H 1 [ 76s] #define HAVE_UNISTD_H 1 [ 76s] #define HAVE_DLFCN_H 1 [ 76s] #define LT_OBJDIR ".libs/" [ 76s] [ 76s] configure: exit 1 [ 76s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/i386-linux-gnu --libexecdir=\${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 76s] debian/rules:45: recipe for target 'build' failed [ 76s] make: *** [build] Error 2 [ 76s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 76s] [ 76s] lamb17 failed "build osmo-sysmon_0.1.0.dsc" at Tue May 21 16:18:14 UTC 2019. [ 76s] [ 76s] ### VM INTERACTION START ### [ 79s] [ 68.632312] sysrq: SysRq : Power Off [ 79s] [ 68.639305] reboot: Power down [ 79s] ### VM INTERACTION END ### [ 79s] [ 79s] lamb17 failed "build osmo-sysmon_0.1.0.dsc" at Tue May 21 16:18:17 UTC 2019. [ 79s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue May 21 16:27:33 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 21 May 2019 16:27:33 +0000 Subject: Build failure of network:osmocom:latest/osmo-sysmon in xUbuntu_18.10/i586 In-Reply-To: References: Message-ID: <5ce4270a4ecc6_58803905f81238225@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sysmon/xUbuntu_18.10/i586 Package network:osmocom:latest/osmo-sysmon failed to build in xUbuntu_18.10/i586 Check out the package for editing: osc checkout network:osmocom:latest osmo-sysmon Last lines of build log: [ 157s] #define PACKAGE "osmo-sysmon" [ 157s] #define VERSION "0.1.0" [ 157s] #define STDC_HEADERS 1 [ 157s] #define HAVE_SYS_TYPES_H 1 [ 157s] #define HAVE_SYS_STAT_H 1 [ 157s] #define HAVE_STDLIB_H 1 [ 157s] #define HAVE_STRING_H 1 [ 157s] #define HAVE_MEMORY_H 1 [ 157s] #define HAVE_STRINGS_H 1 [ 157s] #define HAVE_INTTYPES_H 1 [ 157s] #define HAVE_STDINT_H 1 [ 157s] #define HAVE_UNISTD_H 1 [ 157s] #define HAVE_DLFCN_H 1 [ 157s] #define LT_OBJDIR ".libs/" [ 157s] [ 157s] configure: exit 1 [ 157s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/i386-linux-gnu --libexecdir=\${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 157s] make: *** [debian/rules:45: build] Error 2 [ 157s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 157s] [ 157s] cloud108 failed "build osmo-sysmon_0.1.0.dsc" at Tue May 21 16:27:19 UTC 2019. [ 157s] [ 157s] ### VM INTERACTION START ### [ 160s] [ 135.500789] sysrq: SysRq : Power Off [ 160s] [ 135.521353] reboot: Power down [ 161s] ### VM INTERACTION END ### [ 161s] [ 161s] cloud108 failed "build osmo-sysmon_0.1.0.dsc" at Tue May 21 16:27:24 UTC 2019. [ 161s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue May 21 16:28:41 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 21 May 2019 16:28:41 +0000 Subject: Build failure of network:osmocom:latest/osmo-sysmon in xUbuntu_19.04/x86_64 In-Reply-To: References: Message-ID: <5ce427442b387_58803905f81238469@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sysmon/xUbuntu_19.04/x86_64 Package network:osmocom:latest/osmo-sysmon failed to build in xUbuntu_19.04/x86_64 Check out the package for editing: osc checkout network:osmocom:latest osmo-sysmon Last lines of build log: [ 119s] #define PACKAGE "osmo-sysmon" [ 119s] #define VERSION "0.1.0" [ 119s] #define STDC_HEADERS 1 [ 119s] #define HAVE_SYS_TYPES_H 1 [ 119s] #define HAVE_SYS_STAT_H 1 [ 119s] #define HAVE_STDLIB_H 1 [ 119s] #define HAVE_STRING_H 1 [ 119s] #define HAVE_MEMORY_H 1 [ 119s] #define HAVE_STRINGS_H 1 [ 119s] #define HAVE_INTTYPES_H 1 [ 119s] #define HAVE_STDINT_H 1 [ 119s] #define HAVE_UNISTD_H 1 [ 119s] #define HAVE_DLFCN_H 1 [ 119s] #define LT_OBJDIR ".libs/" [ 119s] [ 119s] configure: exit 1 [ 119s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/x86_64-linux-gnu --libexecdir=\${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 119s] make: *** [debian/rules:45: build] Error 2 [ 119s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 119s] [ 119s] lamb28 failed "build osmo-sysmon_0.1.0.dsc" at Tue May 21 16:28:20 UTC 2019. [ 119s] [ 119s] ### VM INTERACTION START ### [ 123s] [ 110.039054] sysrq: SysRq : Power Off [ 123s] [ 110.046568] reboot: Power down [ 123s] ### VM INTERACTION END ### [ 123s] [ 123s] lamb28 failed "build osmo-sysmon_0.1.0.dsc" at Tue May 21 16:28:24 UTC 2019. [ 123s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue May 21 16:28:41 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 21 May 2019 16:28:41 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in Debian_Unstable/x86_64 In-Reply-To: References: Message-ID: <5ce42744a410e_58803905f81238550@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_Unstable/x86_64 Package network:osmocom:nightly/openbsc failed to build in Debian_Unstable/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 175s] | #define HAVE_MEMORY_H 1 [ 175s] | #define HAVE_STRINGS_H 1 [ 175s] | #define HAVE_INTTYPES_H 1 [ 175s] | #define HAVE_STDINT_H 1 [ 175s] | #define HAVE_UNISTD_H 1 [ 175s] | #define HAVE_DLFCN_H 1 [ 175s] | #define LT_OBJDIR ".libs/" [ 175s] | #define BUILD_SMPP 1 [ 175s] | #define STDC_HEADERS 1 [ 175s] | #define HAVE_DBI_DBD_H 1 [ 175s] | #define HAVE_PCAP_PCAP_H 1 [ 175s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 175s] | [ 175s] | configure: exit 0 [ 175s] [ 175s] make[1]: *** [debian/rules:30: override_dh_auto_test] Error 1 [ 175s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 175s] make: *** [debian/rules:13: build] Error 2 [ 175s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 175s] [ 175s] lamb05 failed "build openbsc_1.2.0.20190521.dsc" at Tue May 21 16:28:22 UTC 2019. [ 175s] [ 175s] ### VM INTERACTION START ### [ 179s] [ 164.763613] sysrq: SysRq : Power Off [ 179s] [ 164.771236] reboot: Power down [ 179s] ### VM INTERACTION END ### [ 179s] [ 179s] lamb05 failed "build openbsc_1.2.0.20190521.dsc" at Tue May 21 16:28:26 UTC 2019. [ 179s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue May 21 16:29:16 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 21 May 2019 16:29:16 +0000 Subject: Build failure of network:osmocom:latest/osmo-sysmon in Debian_Unstable/x86_64 In-Reply-To: References: Message-ID: <5ce427612e3e9_58803905f8123877a@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sysmon/Debian_Unstable/x86_64 Package network:osmocom:latest/osmo-sysmon failed to build in Debian_Unstable/x86_64 Check out the package for editing: osc checkout network:osmocom:latest osmo-sysmon Last lines of build log: [ 151s] #define PACKAGE "osmo-sysmon" [ 151s] #define VERSION "0.1.0" [ 151s] #define STDC_HEADERS 1 [ 151s] #define HAVE_SYS_TYPES_H 1 [ 151s] #define HAVE_SYS_STAT_H 1 [ 151s] #define HAVE_STDLIB_H 1 [ 151s] #define HAVE_STRING_H 1 [ 151s] #define HAVE_MEMORY_H 1 [ 151s] #define HAVE_STRINGS_H 1 [ 151s] #define HAVE_INTTYPES_H 1 [ 151s] #define HAVE_STDINT_H 1 [ 151s] #define HAVE_UNISTD_H 1 [ 151s] #define HAVE_DLFCN_H 1 [ 151s] #define LT_OBJDIR ".libs/" [ 151s] [ 151s] configure: exit 1 [ 151s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/x86_64-linux-gnu --libexecdir=\${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 151s] make: *** [debian/rules:45: build] Error 2 [ 151s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 151s] [ 151s] lamb51 failed "build osmo-sysmon_0.1.0.dsc" at Tue May 21 16:29:05 UTC 2019. [ 151s] [ 151s] ### VM INTERACTION START ### [ 154s] [ 138.833758] sysrq: SysRq : Power Off [ 154s] [ 138.839104] reboot: Power down [ 154s] ### VM INTERACTION END ### [ 154s] [ 154s] lamb51 failed "build osmo-sysmon_0.1.0.dsc" at Tue May 21 16:29:09 UTC 2019. [ 154s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue May 21 16:32:24 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 21 May 2019 16:32:24 +0000 Subject: Build failure of network:osmocom:latest/osmo-sysmon in xUbuntu_19.04/i586 In-Reply-To: References: Message-ID: <5ce4283490568_58803905f812399fb@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sysmon/xUbuntu_19.04/i586 Package network:osmocom:latest/osmo-sysmon failed to build in xUbuntu_19.04/i586 Check out the package for editing: osc checkout network:osmocom:latest osmo-sysmon Last lines of build log: [ 78s] #define VERSION "0.1.0" [ 78s] #define STDC_HEADERS 1 [ 78s] #define HA[ 70.093586] serial8250: too much work for irq4 [ 78s] VE_SYS_TYPES_H 1 [ 78s] #define HAVE_SYS_STAT_H 1 [ 78s] #define HAVE_STDLIB_H 1 [ 78s] #define HAVE_STRING_H 1 [ 78s] #define HAVE_MEMORY_H 1 [ 78s] #define HAVE_STRINGS_H 1 [ 78s] #define HAVE_INTTYPES_H 1 [ 78s] #define HAVE_STDINT_H 1 [ 78s] #define HAVE_UNISTD_H 1 [ 78s] #define HAVE_DLFCN_H 1 [ 78s] #define LT_OBJDIR ".libs/" [ 78s] [ 78s] configure: exit 1 [ 78s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/i386-linux-gnu --libexecdir=\${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 78s] make: *** [debian/rules:45: build] Error 2 [ 78s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 78s] [ 78s] sheep81 failed "build osmo-sysmon_0.1.0.dsc" at Tue May 21 16:32:12 UTC 2019. [ 78s] [ 78s] ### VM INTERACTION START ### [ 81s] [ 73.257666] sysrq: SysRq : Power Off [ 81s] [ 73.264088] reboot: Power down [ 81s] ### VM INTERACTION END ### [ 81s] [ 81s] sheep81 failed "build osmo-sysmon_0.1.0.dsc" at Tue May 21 16:32:15 UTC 2019. [ 81s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue May 21 16:33:00 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 21 May 2019 16:33:00 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in Debian_Testing/x86_64 In-Reply-To: References: Message-ID: <5ce428514f2a2_58803905f8124013d@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_Testing/x86_64 Package network:osmocom:nightly/openbsc failed to build in Debian_Testing/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 172s] | configure: exit 0 [ 172s] [ 172s] # -*- compilation -*- [ 172s] 4. testsuite.at:23: testing db ... [ 172s] ./testsuite.at:28: $abs_top_builddir/tests/db/db_test [ 172s] --- expout 2019-05-21 16:32:46.116000000 +0000 [ 172s] +++ /usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/4/stdout 2019-05-21 16:32:46.268000000 +0000 [ 172s] @@ -1,4 +1,6 @@ [ 172s] Testing subscriber database code. [ 172s] DB: Database initialized. [ 172s] +no tables in statement ! [ 172s] +no tables in statement ! [ 172s] DB: Database prepared. [ 172s] Done [ 172s] 4. testsuite.at:23: 4. db (testsuite.at:23): FAILED (testsuite.at:28) [ 172s] make[1]: *** [debian/rules:30: override_dh_auto_test] Error 1 [ 172s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 172s] make: *** [debian/rules:13: build] Error 2 [ 172s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 172s] [ 172s] lamb04 failed "build openbsc_1.2.0.20190521.dsc" at Tue May 21 16:32:46 UTC 2019. [ 172s] [ 172s] ### VM INTERACTION START ### [ 174s] [ 160.442789] sysrq: SysRq : Power Off [ 174s] [ 160.451060] reboot: Power down [ 174s] ### VM INTERACTION END ### [ 174s] [ 174s] lamb04 failed "build openbsc_1.2.0.20190521.dsc" at Tue May 21 16:32:50 UTC 2019. [ 174s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue May 21 16:33:33 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 21 May 2019 16:33:33 +0000 Subject: Build failure of network:osmocom:latest/osmo-sysmon in xUbuntu_18.04/i586 In-Reply-To: References: Message-ID: <5ce4286c8ea2c_58803905f81240611@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sysmon/xUbuntu_18.04/i586 Package network:osmocom:latest/osmo-sysmon failed to build in xUbuntu_18.04/i586 Check out the package for editing: osc checkout network:osmocom:latest osmo-sysmon Last lines of build log: [ 354s] #define STDC_HEADERS 1 [ 354s] #define HAVE_SYS_TYPES_H 1 [ 354s] #define HAVE_SYS_STAT_H 1 [ 354s] #define HAVE_STDLIB_H 1 [ 354s] #define HAVE_STRING_H 1 [ 354s] #define HAVE_MEMORY_H 1 [ 354s] #define HAVE_STRINGS_H 1 [ 354s] #define HAVE_INTTYPES_H 1 [ 354s] #define HAVE_STDINT_H 1 [ 354s] #define HAVE_UNISTD_H 1 [ 354s] #define HAVE_DLFCN_H 1 [ 354s] #define LT_OBJDIR ".libs/" [ 354s] [ 354s] configure: exit 1 [ 354s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --[ 335.546373] serial8250: too much work for irq4 [ 354s] localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/i386-linux-gnu --libexecdir=\${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 354s] debian/rules:45: recipe for target 'build' failed [ 354s] make: *** [build] Error 2 [ 354s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 354s] [ 354s] lamb52 failed "build osmo-sysmon_0.1.0.dsc" at Tue May 21 16:33:20 UTC 2019. [ 354s] [ 354s] ### VM INTERACTION START ### [ 357s] [ 338.766019] sysrq: SysRq : Power Off [ 357s] [ 338.775578] reboot: Power down [ 357s] ### VM INTERACTION END ### [ 357s] [ 357s] lamb52 failed "build osmo-sysmon_0.1.0.dsc" at Tue May 21 16:33:23 UTC 2019. [ 357s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue May 21 16:33:50 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 21 May 2019 16:33:50 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in xUbuntu_19.04/x86_64 In-Reply-To: References: Message-ID: <5ce4288bb8cc2_58803905f812407b0@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_19.04/x86_64 Package network:osmocom:nightly/openbsc failed to build in xUbuntu_19.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 167s] | configure: exit 0 [ 167s] [ 167s] # -*- compilation -*- [ 167s] 4. testsuite.at:23: testing db ... [ 167s] ./testsuite.at:28: $abs_top_builddir/tests/db/db_test [ 167s] --- expout 2019-05-21 16:33:31.332000000 +0000 [ 167s] +++ /usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/4/stdout 2019-05-21 16:33:31.488000000 +0000 [ 167s] @@ -1,4 +1,6 @@ [ 167s] Testing subscriber database code. [ 167s] DB: Database initialized. [ 167s] +no tables in statement ! [ 167s] +no tables in statement ! [ 167s] DB: Database prepared. [ 167s] Done [ 167s] 4. testsuite.at:23: 4. db (testsuite.at:23): FAILED (testsuite.at:28) [ 167s] make[1]: *** [debian/rules:30: override_dh_auto_test] Error 1 [ 167s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 167s] make: *** [debian/rules:13: build] Error 2 [ 167s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 167s] [ 167s] lamb11 failed "build openbsc_1.2.0.20190521.dsc" at Tue May 21 16:33:32 UTC 2019. [ 167s] [ 167s] ### VM INTERACTION START ### [ 171s] [ 158.230127] sysrq: SysRq : Power Off [ 171s] [ 158.236191] reboot: Power down [ 171s] ### VM INTERACTION END ### [ 171s] [ 171s] lamb11 failed "build openbsc_1.2.0.20190521.dsc" at Tue May 21 16:33:36 UTC 2019. [ 171s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue May 21 16:33:50 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 21 May 2019 16:33:50 +0000 Subject: Build failure of network:osmocom:latest/osmo-sysmon in Debian_Testing/x86_64 In-Reply-To: References: Message-ID: <5ce4288c27ebf_58803905f81240891@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sysmon/Debian_Testing/x86_64 Package network:osmocom:latest/osmo-sysmon failed to build in Debian_Testing/x86_64 Check out the package for editing: osc checkout network:osmocom:latest osmo-sysmon Last lines of build log: [ 150s] #define PACKAGE "osmo-sysmon" [ 150s] #define VERSION "0.1.0" [ 150s] #define STDC_HEADERS 1 [ 150s] #define HAVE_SYS_TYPES_H 1 [ 150s] #define HAVE_SYS_STAT_H 1 [ 150s] #define HAVE_STDLIB_H 1 [ 150s] #define HAVE_STRING_H 1 [ 150s] #define HAVE_MEMORY_H 1 [ 150s] #define HAVE_STRINGS_H 1 [ 150s] #define HAVE_INTTYPES_H 1 [ 150s] #define HAVE_STDINT_H 1 [ 150s] #define HAVE_UNISTD_H 1 [ 150s] #define HAVE_DLFCN_H 1 [ 150s] #define LT_OBJDIR ".libs/" [ 150s] [ 150s] configure: exit 1 [ 150s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/x86_64-linux-gnu --libexecdir=\${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 150s] make: *** [debian/rules:45: build] Error 2 [ 150s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 150s] [ 150s] cloud115 failed "build osmo-sysmon_0.1.0.dsc" at Tue May 21 16:33:33 UTC 2019. [ 150s] [ 150s] ### VM INTERACTION START ### [ 152s] [ 117.643575] sysrq: SysRq : Power Off [ 152s] [ 117.687574] reboot: Power down [ 153s] ### VM INTERACTION END ### [ 153s] [ 153s] cloud115 failed "build osmo-sysmon_0.1.0.dsc" at Tue May 21 16:33:37 UTC 2019. [ 153s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Tue May 21 16:34:40 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 21 May 2019 16:34:40 +0000 Subject: Change in osmo-msc[master]: Request Osmux CID and forward it in Assign Req and Assign Compl In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14041 ) Change subject: Request Osmux CID and forward it in Assign Req and Assign Compl ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/14041 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5b14e34481e890669c9ee02dba81eba84293cebb Gerrit-Change-Number: 14041 Gerrit-PatchSet: 4 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Comment-Date: Tue, 21 May 2019 16:34:40 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Tue May 21 16:34:24 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 21 May 2019 16:34:24 +0000 Subject: Build failure of network:osmocom:latest/openbsc in Debian_Unstable/x86_64 In-Reply-To: References: Message-ID: <5ce428add43aa_58803905f8124156b@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/openbsc/Debian_Unstable/x86_64 Package network:osmocom:latest/openbsc failed to build in Debian_Unstable/x86_64 Check out the package for editing: osc checkout network:osmocom:latest openbsc Last lines of build log: [ 165s] | #define HAVE_MEMORY_H 1 [ 165s] | #define HAVE_STRINGS_H 1 [ 165s] | #define HAVE_INTTYPES_H 1 [ 165s] | #define HAVE_STDINT_H 1 [ 165s] | #define HAVE_UNISTD_H 1 [ 165s] | #define HAVE_DLFCN_H 1 [ 165s] | #define LT_OBJDIR ".libs/" [ 165s] | #define BUILD_SMPP 1 [ 165s] | #define STDC_HEADERS 1 [ 165s] | #define HAVE_DBI_DBD_H 1 [ 165s] | #define HAVE_PCAP_PCAP_H 1 [ 165s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 165s] | [ 165s] | configure: exit 0 [ 165s] [ 165s] make[1]: *** [debian/rules:30: override_dh_auto_test] Error 1 [ 165s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 165s] make: *** [debian/rules:13: build] Error 2 [ 165s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 165s] [ 165s] lamb64 failed "build openbsc_1.2.0.dsc" at Tue May 21 16:34:20 UTC 2019. [ 165s] [ 165s] ### VM INTERACTION START ### [ 168s] [ 154.651671] sysrq: SysRq : Power Off [ 168s] [ 154.660224] reboot: Power down [ 168s] ### VM INTERACTION END ### [ 168s] [ 168s] lamb64 failed "build openbsc_1.2.0.dsc" at Tue May 21 16:34:23 UTC 2019. [ 168s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue May 21 16:34:24 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 21 May 2019 16:34:24 +0000 Subject: Build failure of network:osmocom:latest/openbsc in xUbuntu_19.04/x86_64 In-Reply-To: References: Message-ID: <5ce428ae8580c_58803905f81241687@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/openbsc/xUbuntu_19.04/x86_64 Package network:osmocom:latest/openbsc failed to build in xUbuntu_19.04/x86_64 Check out the package for editing: osc checkout network:osmocom:latest openbsc Last lines of build log: [ 216s] | #define HAVE_MEMORY_H 1 [ 216s] | #define HAVE_STRINGS_H 1 [ 216s] | #define HAVE_INTTYPES_H 1 [ 216s] | #define HAVE_STDINT_H 1 [ 216s] | #define HAVE_UNISTD_H 1 [ 216s] | #define HAVE_DLFCN_H 1 [ 216s] | #define LT_OBJDIR ".libs/" [ 216s] | #define BUILD_SMPP 1 [ 216s] | #define STDC_HEADERS 1 [ 216s] | #define HAVE_DBI_DBD_H 1 [ 216s] | #define HAVE_PCAP_PCAP_H 1 [ 216s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 216s] | [ 216s] | configure: exit 0 [ 216s] [ 216s] make[1]: *** [debian/rules:30: override_dh_auto_test] Error 1 [ 216s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 216s] make: *** [debian/rules:13: build] Error 2 [ 216s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 216s] [ 216s] morla5 failed "build openbsc_1.2.0.dsc" at Tue May 21 16:34:10 UTC 2019. [ 216s] [ 216s] ### VM INTERACTION START ### [ 219s] [ 206.169458] sysrq: SysRq : Power Off [ 219s] [ 206.179163] reboot: Power down [ 219s] ### VM INTERACTION END ### [ 219s] [ 219s] morla5 failed "build openbsc_1.2.0.dsc" at Tue May 21 16:34:14 UTC 2019. [ 219s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Tue May 21 16:35:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 16:35:19 +0000 Subject: Change in docker-playground[master]: osmo-bts-test: Enable BTS_Tests_SMSCB.control for CBCH testing Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14119 Change subject: osmo-bts-test: Enable BTS_Tests_SMSCB.control for CBCH testing ...................................................................... osmo-bts-test: Enable BTS_Tests_SMSCB.control for CBCH testing Support for this was introdcued in osmo-ttcn3-hacks Change-Id If4b5a906a0841c0a8c3d7c4e9e5a3d1208ecf16a, but as we have a separate .cfg file here, we must update it, too. Change-Id: Iab0e9a46a8ee429619e9ef9159a631dc44ab5aeb --- M ttcn3-bts-test/BTS_Tests.cfg 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/19/14119/1 diff --git a/ttcn3-bts-test/BTS_Tests.cfg b/ttcn3-bts-test/BTS_Tests.cfg index da1c908..37ddde0 100644 --- a/ttcn3-bts-test/BTS_Tests.cfg +++ b/ttcn3-bts-test/BTS_Tests.cfg @@ -18,3 +18,4 @@ [EXECUTE] BTS_Tests.control +BTS_Tests_SMSCB.control -- To view, visit https://gerrit.osmocom.org/14119 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Iab0e9a46a8ee429619e9ef9159a631dc44ab5aeb Gerrit-Change-Number: 14119 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 16:35:27 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 21 May 2019 16:35:27 +0000 Subject: Change in osmo-ttcn3-hacks[master]: MSC_Tests: Remove duplicated structures from BSSMAP_Templates Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14120 Change subject: MSC_Tests: Remove duplicated structures from BSSMAP_Templates ...................................................................... MSC_Tests: Remove duplicated structures from BSSMAP_Templates Change-Id: Ia82b65fe7e53cc0ab73df94b844b9b85aba9468b --- M msc/MSC_Tests.ttcn 1 file changed, 0 insertions(+), 138 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/20/14120/1 diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index f6ab439..b64b872 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -330,144 +330,6 @@ activate(as_Tguard_direct()); } -template PDU_BSSAP ts_BSSAP_BSSMAP := { - discriminator := '0'B, - spare := '0000000'B, - dlci := omit, - lengthIndicator := 0, /* overwritten by codec */ - pdu := ? -} - -template PDU_BSSAP tr_BSSAP_BSSMAP := { - discriminator := '0'B, - spare := '0000000'B, - dlci := omit, - lengthIndicator := ?, - pdu := { - bssmap := ? - } -} - - -type integer BssmapCause; - -template (value) BSSMAP_IE_Cause ts_BSSMAP_IE_Cause(BssmapCause val) := { - elementIdentifier := '04'O, - lengthIndicator := 0, - causeValue := int2bit(val, 7), - extensionCauseValue := '0'B, - spare1 := omit -} - -template (value) PDU_BSSAP ts_BSSMAP_Reset(BssmapCause cause) modifies ts_BSSAP_BSSMAP := { - pdu := { - bssmap := { - reset := { - messageType := '30'O, - cause := ts_BSSMAP_IE_Cause(cause), - a_InterfaceSelectorForReset := omit - } - } - } -} - -template (value) PDU_BSSAP ts_BSSMAP_ResetAck modifies ts_BSSAP_BSSMAP := { - pdu := { - bssmap := { - resetAck := { - messageType := '31'O, - a_InterfaceSelectorForReset := omit - } - } - } -} - -template PDU_BSSAP tr_BSSMAP_ResetAck modifies tr_BSSAP_BSSMAP := { - pdu := { - bssmap := { - resetAck := { - messageType := '31'O, - a_InterfaceSelectorForReset := * - } - } - } -} - -template BSSMAP_IE_CellIdentifier ts_BSSMAP_IE_CellID := { - elementIdentifier := '05'O, - lengthIndicator := 0, - cellIdentifierDiscriminator := '0000'B, - spare1_4 := '0000'B, - cellIdentification := ? -} - -type uint16_t BssmapLAC; -type uint16_t BssmapCI; - -/* -template BSSMAP_IE_CellIdentifier ts_CellId_CGI(mcc, mnc, lac, ci) -modifies ts_BSSMAP_IE_CellID := { - cellIdentification := { - cI_LAC_CGI := { - mnc_mcc := FIXME, - lac := int2oct(lac, 2), - ci := int2oct(ci, 2) - } - } -} -*/ - -template BSSMAP_IE_CellIdentifier ts_CellID_LAC_CI(BssmapLAC lac, BssmapCI ci) -modifies ts_BSSMAP_IE_CellID := { - cellIdentification := { - cI_LAC_CI := { - lac := int2oct(lac, 2), - ci := int2oct(ci, 2) - } - } -} - -template BSSMAP_IE_CellIdentifier ts_CellId_CI(BssmapCI ci) -modifies ts_BSSMAP_IE_CellID := { - cellIdentification := { - cI_CI := int2oct(ci, 2) - } -} - -template BSSMAP_IE_CellIdentifier ts_CellId_none -modifies ts_BSSMAP_IE_CellID := { - cellIdentification := { - cI_noCell := ''O - } -} - - -template BSSMAP_IE_Layer3Information ts_BSSMAP_IE_L3Info(octetstring l3info) := { - elementIdentifier := '17'O, - lengthIndicator := 0, - layer3info := l3info -} - -template PDU_BSSAP ts_BSSMAP_ComplL3(BSSMAP_IE_CellIdentifier cell_id, octetstring l3_info) -modifies ts_BSSAP_BSSMAP := { - pdu := { - bssmap := { - completeLayer3Information := { - messageType := '57'O, - cellIdentifier := cell_id, - layer3Information := ts_BSSMAP_IE_L3Info(l3_info), - chosenChannel := omit, - lSAIdentifier := omit, - aPDU := omit, - codecList := omit, - redirectAttemptFlag := omit, - sendSequenceNumber := omit, - iMSI := omit - } - } - } -} - type function void_fn(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr; /* FIXME: move into BSC_ConnectionHandler? */ -- To view, visit https://gerrit.osmocom.org/14120 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ia82b65fe7e53cc0ab73df94b844b9b85aba9468b Gerrit-Change-Number: 14120 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 16:35:27 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 21 May 2019 16:35:27 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Introduce Osmux infra and one test for osmo-msc Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14121 Change subject: msc: Introduce Osmux infra and one test for osmo-msc ...................................................................... msc: Introduce Osmux infra and one test for osmo-msc Change-Id: Ibcb82d1a2d570c6c0ad0c3b6504bffe2244eccd9 --- M library/MGCP_Templates.ttcn M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn 3 files changed, 127 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/21/14121/1 diff --git a/library/MGCP_Templates.ttcn b/library/MGCP_Templates.ttcn index fe2863d..056e390 100644 --- a/library/MGCP_Templates.ttcn +++ b/library/MGCP_Templates.ttcn @@ -198,6 +198,7 @@ } template MgcpResponse ts_MDCX_ACK(MgcpTransId trans_id, MgcpConnectionId conn_id, template SDP_Message sdp := omit) := ts_CRCX_ACK(trans_id, conn_id, sdp); + template MgcpResponse ts_MDCX_ACK_osmux(MgcpTransId trans_id, MgcpConnectionId conn_id, MgcpOsmuxCID osmux_cid, template SDP_Message sdp := omit) := ts_CRCX_ACK_osmux(trans_id, conn_id, osmux_cid, sdp); /* have a function that generates a template, rather than a template in order to handle * optional parameters */ diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 796b0ce..f83407a 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -83,7 +83,8 @@ boolean gsup_enable, integer ran_idx, boolean use_umts_aka, - boolean ran_is_geran + boolean ran_is_geran, + boolean use_osmux }; /* get a one-octet bitmaks of supported algorithms based on Classmark information */ @@ -172,9 +173,9 @@ log("BSSMAP_BscUnitdataCallback"); /* answer all RESET with RESET ACK */ - if (match(bssap, tr_BSSMAP_Reset)){ + if (match(bssap, tr_BSSMAP_Reset(g_ran_ops.use_osmux))){ log("BSSMAP_BscUnitdataCallback: Responding to RESET with RESET-ACK"); - resp := ts_BSSMAP_ResetAck; + resp := ts_BSSMAP_ResetAck(g_ran_ops.use_osmux); } /* FIXME: Handle paging, etc. */ @@ -187,7 +188,7 @@ log("RANAP_RncUnitdataCallback"); /* answer all RESET with RESET ACK */ - if (match(ranap, tr_RANAP_Reset)) { + if (match(ranap, tr_RANAP_Reset())) { log("RANAP_RncUnitdataCallback: Responding to RESET with RESET-ACK"); var CN_DomainIndicator dom; dom := ranap.initiatingMessage.value_.Reset.protocolIEs[1].value_.cN_DomainIndicator; @@ -209,6 +210,7 @@ decode_dtap := true, role_ms := true, protocol := RAN_PROTOCOL_BSSAP, + use_osmux := false, sccp_addr_local := omit, sccp_addr_peer := omit } @@ -592,7 +594,9 @@ MgcpCallId mgcp_call_id optional, /* MGCP Call ID; CallAgent allocated */ MgcpEndpoint mgcp_ep optional /* MGCP Endpoint, CallAgent or MGW allocated */, MgcpConnectionId mgcp_connection_id_bss, /* MGCP Connection ID BSS Side */ - MgcpConnectionId mgcp_connection_id_mss /* MGCP Connection ID MSS Side */ + MgcpConnectionId mgcp_connection_id_mss, /* MGCP Connection ID MSS Side */ + + boolean use_osmux /* MSC is expected to use Osmux for this call */ } template (value) CallParameters t_CallParams(hexstring called, integer tid) := { @@ -617,7 +621,8 @@ mgcp_call_id := omit, mgcp_ep := omit, mgcp_connection_id_bss := '0'H,// - mgcp_connection_id_mss := '0'H // + mgcp_connection_id_mss := '0'H,// + use_osmux := false }; /* Allocate a call reference and send SETUP via MNCC to MSC */ @@ -642,6 +647,9 @@ runs on BSC_ConnHdlr { var MNCC_PDU mncc; var MgcpCommand mgcp_cmd; + var template MgcpResponse mgcp_resp; + var MgcpOsmuxCID osmux_cid; + var PDU_BSSAP bssap; f_ran_register_imsi(g_pars.imsi, g_pars.tmsi); @@ -681,8 +689,19 @@ { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, cpars.rtp_sdp_format)), valueof(ts_SDP_ptime(20)) })); - var template MgcpResponse mgcp_resp; - mgcp_resp := ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, sdp); + + if (cpars.use_osmux) { + osmux_cid := f_MgcpCmd_extract_osmux_cid(mgcp_cmd); + if (osmux_cid != -1) { /* we expect MSC to use wildcard here */ + setverdict(fail, "MSC using unexpected CID " & int2str(osmux_cid) & " != -1"); + mtc.stop; + } + osmux_cid := 0; + mgcp_resp := ts_CRCX_ACK_osmux(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, osmux_cid, sdp); + } else { + mgcp_resp := ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, sdp); + } + f_mgcp_par_append(mgcp_resp.params, ts_MgcpParSpecEP(cpars.mgcp_ep)); MGCP.send(mgcp_resp); } @@ -706,15 +725,30 @@ } /* expect the MSC to trigger a BSSMAP ASSIGNMENT */ - [] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) { + [] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) -> value bssap { var BSSMAP_IE_AoIP_TransportLayerAddress tla; var BSSMAP_IE_SpeechCodec codec; + var BSSMAP_IE_Osmo_OsmuxCID osmuxCID; log("f_mt_call_complete 6"); tla := valueof(ts_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.bss_rtp_ip), cpars.bss_rtp_port)); codec := valueof(ts_BSSMAP_IE_SpeechCodec({ts_CodecFR})); - BSSAP.send(ts_BSSMAP_AssignmentComplete(omit, tla, codec)); + if (cpars.use_osmux) { + if (not ispresent(bssap.pdu.bssmap.assignmentRequest.osmuxCID)) { + setverdict(fail, "MSC sent AssignReq without expected OsmuxCID IE"); + mtc.stop; + } + osmuxCID := valueof(ts_OsmuxCID(0)); + if (cpars.use_osmux and not match(bssap.pdu.bssmap.assignmentRequest.osmuxCID, osmuxCID)) { + setverdict(fail, "MSC sent AssignReq without expected OsmuxCID IE"); + mtc.stop; + } + bssap := valueof(ts_BSSMAP_AssignmentComplete(omit, tla, codec, osmuxCID)); + } else { + bssap := valueof(ts_BSSMAP_AssignmentComplete(omit, tla, codec)); + } + BSSAP.send(bssap); BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_CONNECT(cpars.transaction_id))); } @@ -736,8 +770,18 @@ { int2str(cpars.rtp_payload_type) }, { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, cpars.rtp_sdp_format)), - valueof(ts_SDP_ptime(20)) })); - MGCP.send(ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp)); + valueof(ts_SDP_ptime(20)) })); + if (cpars.use_osmux) { + osmux_cid := f_MgcpCmd_extract_osmux_cid(mgcp_cmd); + if (osmux_cid != 0) { /* we expect MSC to use specific CID here */ + setverdict(fail, "MSC using unexpected CID " & int2str(osmux_cid) & " != 0"); + mtc.stop; + } + mgcp_resp := ts_MDCX_ACK_osmux(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, osmux_cid, sdp); + } else { + mgcp_resp := ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp); + } + MGCP.send(mgcp_resp); } /* MDCX setting up the CN side remote RTP address received from MNCC CONNECT */ @@ -806,7 +850,10 @@ var MNCC_PDU mncc; var MgcpCommand mgcp_cmd; + var template MgcpResponse mgcp_resp; var boolean respond_to_dlcx; + var PDU_BSSAP bssap; + var MgcpOsmuxCID osmux_cid; if (cpars.emergency) { f_establish_fully(EST_TYPE_EMERG_CALL); @@ -846,6 +893,10 @@ cpars.mgcp_ep := mgcp_cmd.line.ep; } + if (cpars.use_osmux) { + osmux_cid := f_MgcpCmd_extract_osmux_cid(mgcp_cmd); + } + var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_bss, cpars.mgw_rtp_ip_bss, hex2str(cpars.mgcp_call_id), "42", cpars.mgw_rtp_port_bss, @@ -854,8 +905,17 @@ cpars.rtp_sdp_format)), valueof(ts_SDP_ptime(20)) })); - var template MgcpResponse mgcp_resp; - mgcp_resp := ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, sdp); + if (cpars.use_osmux) { + osmux_cid := f_MgcpCmd_extract_osmux_cid(mgcp_cmd); + if (osmux_cid != -1) { /* we expect MSC to use wildcard here */ + setverdict(fail, "MSC using unexpected CID " & int2str(osmux_cid) & " != -1"); + mtc.stop; + } + osmux_cid := 0; + mgcp_resp := ts_CRCX_ACK_osmux(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, osmux_cid, sdp); + } else { + mgcp_resp := ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, sdp); + } f_mgcp_par_append(mgcp_resp.params, ts_MgcpParSpecEP(cpars.mgcp_ep)); MGCP.send(mgcp_resp); } @@ -870,14 +930,30 @@ MNCC.send(ts_MNCC_ALERT_req(cpars.mncc_callref)); } - //[g_pars.ran_is_geran] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) { - [] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) { + //[g_pars.ran_is_geran] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) -> value bssap { + [] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) -> value bssap { log("f_mo_call_establish 4: rx Assignment Request"); var BSSMAP_IE_AoIP_TransportLayerAddress tla; var BSSMAP_IE_SpeechCodec codec; + var BSSMAP_IE_Osmo_OsmuxCID osmuxCID; + tla := valueof(ts_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.bss_rtp_ip), cpars.bss_rtp_port)); codec := valueof(ts_BSSMAP_IE_SpeechCodec({ts_CodecFR})); - BSSAP.send(ts_BSSMAP_AssignmentComplete(omit, tla, codec)); + if (cpars.use_osmux) { + if (not ispresent(bssap.pdu.bssmap.assignmentRequest.osmuxCID)) { + setverdict(fail, "MSC sent AssignReq without expected OsmuxCID IE"); + mtc.stop; + } + osmuxCID := valueof(ts_OsmuxCID(0)); + if (cpars.use_osmux and not match(bssap.pdu.bssmap.assignmentRequest.osmuxCID, osmuxCID)) { + setverdict(fail, "MSC sent AssignReq without expected OsmuxCID IE"); + mtc.stop; + } + bssap := valueof(ts_BSSMAP_AssignmentComplete(omit, tla, codec, osmuxCID)); + } else { + bssap := valueof(ts_BSSMAP_AssignmentComplete(omit, tla, codec)); + } + BSSAP.send(bssap); } /* [!g_pars.ran_is_geran] BSSAP.receive(tr_RANAP_RabAssReq(rab_sml)) { @@ -895,7 +971,18 @@ { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, cpars.rtp_sdp_format)), valueof(ts_SDP_ptime(20)) })); - MGCP.send(ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp)); + + if (cpars.use_osmux) { + osmux_cid := f_MgcpCmd_extract_osmux_cid(mgcp_cmd); + if (osmux_cid != 0) { /* we expect MSC to use specific CID here */ + setverdict(fail, "MSC using unexpected CID " & int2str(osmux_cid) & " != 0"); + mtc.stop; + } + mgcp_resp := ts_MDCX_ACK_osmux(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, osmux_cid, sdp); + } else { + mgcp_resp := ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp); + } + MGCP.send(mgcp_resp); } /* Second MGCP CRCX (this time for MSS/CN side) */ diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index b64b872..0d6083e 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -275,7 +275,7 @@ } } -function f_init(integer num_bsc := 1, boolean sgsap := false, boolean gsup := true) runs on MTC_CT { +function f_init(integer num_bsc := 1, boolean sgsap := false, boolean gsup := true, boolean osmux := false) runs on MTC_CT { if (g_initialized == true) { return; @@ -288,7 +288,9 @@ for (var integer i := 0; i < num_bsc; i := i + 1) { if (isbound(mp_bssap_cfg[i])) { - f_ran_adapter_init(g_bssap[i], mp_bssap_cfg[i], "MSC_Test_" & int2str(i), BSC_RanOps); + var RanOps ranops := BSC_RanOps; + ranops.use_osmux := osmux; + f_ran_adapter_init(g_bssap[i], mp_bssap_cfg[i], "MSC_Test_" & int2str(i), ranops); f_ran_adapter_start(g_bssap[i]); } else { testcase.stop("missing BSSAP configuration"); @@ -334,7 +336,7 @@ /* FIXME: move into BSC_ConnectionHandler? */ function f_init_pars(integer imsi_suffix, boolean sgsap := false, boolean gsup := true, integer ran_idx := 0, - boolean ran_is_geran := true) + boolean ran_is_geran := true, boolean use_osmux := false) runs on MTC_CT return BSC_ConnHdlrPars { var BSC_ConnHdlrNetworkPars net_pars := { kc_support := '0A'O, /* A5/1 and A5/3 enabled */ @@ -364,7 +366,8 @@ gsup_enable := gsup, ran_idx := ran_idx, use_umts_aka := false, - ran_is_geran := ran_is_geran + ran_is_geran := ran_is_geran, + use_osmux := use_osmux }; if (not ran_is_geran) { pars.use_umts_aka := true; @@ -407,9 +410,9 @@ return vc_conn; } -function f_start_handler(void_fn fn, integer imsi_suffix, integer ran_idx := 0, boolean ran_is_geran := true) +function f_start_handler(void_fn fn, integer imsi_suffix, integer ran_idx := 0, boolean ran_is_geran := true, boolean use_osmux := false) runs on MTC_CT return BSC_ConnHdlr { - return f_start_handler_with_pars(fn, f_init_pars(imsi_suffix, ran_idx := ran_idx, ran_is_geran := ran_is_geran)); + return f_start_handler_with_pars(fn, f_init_pars(imsi_suffix, ran_idx := ran_idx, ran_is_geran := ran_is_geran, use_osmux := use_osmux)); } private function f_tc_lu_imsi_noauth_tmsi(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { @@ -1711,6 +1714,7 @@ cpars.bss_rtp_port := 1110; cpars.mgcp_connection_id_bss := '10004'H; cpars.mgcp_connection_id_mss := '10005'H; + cpars.use_osmux := pars.use_osmux; /* Note: This is an optional parameter. When the call-agent (MSC) does * supply a full endpoint name this setting will be overwritten. */ @@ -1727,6 +1731,15 @@ vc_conn.done; } +testcase TC_lu_and_mt_call_osmux() runs on MTC_CT { + var BSC_ConnHdlr vc_conn; + f_init(1, false, true, true); + f_vty_config(MSCVTY, "msc", "osmux on"); + + vc_conn := f_start_handler(refers(f_tc_lu_and_mt_call), 39, 0, true, true); + vc_conn.done; +} + /* Test MO Call SETUP with DTMF */ private function f_tc_mo_setup_dtmf_dup(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { f_init_handler(pars); @@ -5303,6 +5316,8 @@ execute( TC_lu_imsi_auth_tmsi_encr_3_1_log_msc_debug() ); execute( TC_gsup_mt_multi_part_sms() ); execute( TC_mo_cc_bssmap_clear() ); + + execute( TC_lu_and_mt_call_osmux() ); } -- To view, visit https://gerrit.osmocom.org/14121 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ibcb82d1a2d570c6c0ad0c3b6504bffe2244eccd9 Gerrit-Change-Number: 14121 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 16:36:30 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 16:36:30 +0000 Subject: Change in docker-playground[master]: osmo-bts-test: Enable BTS_Tests_SMSCB.control for CBCH testing In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14119 ) Change subject: osmo-bts-test: Enable BTS_Tests_SMSCB.control for CBCH testing ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14119 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iab0e9a46a8ee429619e9ef9159a631dc44ab5aeb Gerrit-Change-Number: 14119 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Tue, 21 May 2019 16:36:30 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 16:36:32 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 16:36:32 +0000 Subject: Change in docker-playground[master]: osmo-bts-test: Enable BTS_Tests_SMSCB.control for CBCH testing In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14119 ) Change subject: osmo-bts-test: Enable BTS_Tests_SMSCB.control for CBCH testing ...................................................................... osmo-bts-test: Enable BTS_Tests_SMSCB.control for CBCH testing Support for this was introdcued in osmo-ttcn3-hacks Change-Id If4b5a906a0841c0a8c3d7c4e9e5a3d1208ecf16a, but as we have a separate .cfg file here, we must update it, too. Change-Id: Iab0e9a46a8ee429619e9ef9159a631dc44ab5aeb --- M ttcn3-bts-test/BTS_Tests.cfg 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/ttcn3-bts-test/BTS_Tests.cfg b/ttcn3-bts-test/BTS_Tests.cfg index da1c908..37ddde0 100644 --- a/ttcn3-bts-test/BTS_Tests.cfg +++ b/ttcn3-bts-test/BTS_Tests.cfg @@ -18,3 +18,4 @@ [EXECUTE] BTS_Tests.control +BTS_Tests_SMSCB.control -- To view, visit https://gerrit.osmocom.org/14119 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iab0e9a46a8ee429619e9ef9159a631dc44ab5aeb Gerrit-Change-Number: 14119 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Tue May 21 16:38:24 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 21 May 2019 16:38:24 +0000 Subject: Build failure of network:osmocom:latest/openbsc in xUbuntu_19.04/i586 In-Reply-To: References: Message-ID: <5ce4299851e7e_58803905f81243376@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/openbsc/xUbuntu_19.04/i586 Package network:osmocom:latest/openbsc failed to build in xUbuntu_19.04/i586 Check out the package for editing: osc checkout network:osmocom:latest openbsc Last lines of build log: [ 191s] | #define HAVE_MEMORY_H 1 [ 191s] | #define HAVE_STRINGS_H 1 [ 191s] | #define HAVE_INTTYPES_H 1 [ 191s] | #define HAVE_STDINT_H 1 [ 191s] | #define HAVE_UNISTD_H 1 [ 191s] | #define HAVE_DLFCN_H 1 [ 191s] | #define LT_OBJDIR ".libs/" [ 191s] | #define BUILD_SMPP 1 [ 191s] | #define STDC_HEADERS 1 [ 191s] | #define HAVE_DBI_DBD_H 1 [ 191s] | #define HAVE_PCAP_PCAP_H 1 [ 191s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 191s] | [ 191s] | configure: exit 0 [ 191s] [ 191s] make[1]: *** [debian/rules:30: override_dh_auto_test] Error 1 [ 191s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 191s] make: *** [debian/rules:13: build] Error 2 [ 191s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 191s] [ 191s] lamb14 failed "build openbsc_1.2.0.dsc" at Tue May 21 16:38:09 UTC 2019. [ 191s] [ 191s] ### VM INTERACTION START ### [ 194s] [ 182.419601] sysrq: SysRq : Power Off [ 194s] [ 182.426678] reboot: Power down [ 194s] ### VM INTERACTION END ### [ 194s] [ 194s] lamb14 failed "build openbsc_1.2.0.dsc" at Tue May 21 16:38:13 UTC 2019. [ 194s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue May 21 16:43:33 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 21 May 2019 16:43:33 +0000 Subject: Build failure of network:osmocom:latest/openbsc in Debian_Testing/x86_64 In-Reply-To: References: Message-ID: <5ce42ac812a52_58803905f81244468@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/openbsc/Debian_Testing/x86_64 Package network:osmocom:latest/openbsc failed to build in Debian_Testing/x86_64 Check out the package for editing: osc checkout network:osmocom:latest openbsc Last lines of build log: [ 404s] | #define HAVE_MEMORY_H 1 [ 404s] | #define HAVE_STRINGS_H 1 [ 404s] | #define HAVE_INTTYPES_H 1 [ 404s] | #define HAVE_STDINT_H 1 [ 404s] | #define HAVE_UNISTD_H 1 [ 404s] | #define HAVE_DLFCN_H 1 [ 404s] | #define LT_OBJDIR ".libs/" [ 404s] | #define BUILD_SMPP 1 [ 404s] | #define STDC_HEADERS 1 [ 404s] | #define HAVE_DBI_DBD_H 1 [ 404s] | #define HAVE_PCAP_PCAP_H 1 [ 404s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 404s] | [ 404s] | configure: exit 0 [ 404s] [ 404s] make[1]: *** [debian/rules:30: override_dh_auto_test] Error 1 [ 404s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 404s] make: *** [debian/rules:13: build] Error 2 [ 404s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 404s] [ 404s] lamb52 failed "build openbsc_1.2.0.dsc" at Tue May 21 16:43:17 UTC 2019. [ 404s] [ 404s] ### VM INTERACTION START ### [ 407s] [ 390.311929] sysrq: SysRq : Power Off [ 408s] [ 390.334635] reboot: Power down [ 408s] ### VM INTERACTION END ### [ 408s] [ 408s] lamb52 failed "build openbsc_1.2.0.dsc" at Tue May 21 16:43:22 UTC 2019. [ 408s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Tue May 21 18:13:24 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 18:13:24 +0000 Subject: Change in osmo-bts[master]: rsl: Send RSL Error Report in case of unknown/unsupported msg_type In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14083 ) Change subject: rsl: Send RSL Error Report in case of unknown/unsupported msg_type ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14083 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib2918007410e635b144a7535cec30b9f3378c755 Gerrit-Change-Number: 14083 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 21 May 2019 18:13:24 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 18:13:26 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 18:13:26 +0000 Subject: Change in osmo-bts[master]: rsl: Include Channel Nr and Link ID in Error reports whenever possible In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14084 ) Change subject: rsl: Include Channel Nr and Link ID in Error reports whenever possible ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14084 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8155e0d37096bd7bf3563e4f7853171ca4b3aa58 Gerrit-Change-Number: 14084 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 21 May 2019 18:13:26 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 18:13:59 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 18:13:59 +0000 Subject: Change in osmo-bts[master]: RSL: Reject RLL messages for lchans that are not active yet In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14085 ) Change subject: RSL: Reject RLL messages for lchans that are not active yet ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14085 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I68dbb622aeaee657471664cdc0b69c2ac316d77e Gerrit-Change-Number: 14085 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 21 May 2019 18:13:59 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 18:14:02 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 18:14:02 +0000 Subject: Change in osmo-bts[master]: RSL: Fix off-by-one error when parsing SACCH INFO IE in RSL CHAN ACT In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14087 ) Change subject: RSL: Fix off-by-one error when parsing SACCH INFO IE in RSL CHAN ACT ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14087 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6436caf5c2caefbf7c089d66e37d8d1babe1c24e Gerrit-Change-Number: 14087 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 21 May 2019 18:14:02 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 18:14:04 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 18:14:04 +0000 Subject: Change in osmo-bts[master]: cbch: Implement handling of "Schedule" message In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14090 ) Change subject: cbch: Implement handling of "Schedule" message ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14090 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I473edf698eba7ff5008f2fd1ec1776f0aa013858 Gerrit-Change-Number: 14090 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 21 May 2019 18:14:04 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 18:14:06 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 18:14:06 +0000 Subject: Change in osmo-bts[master]: cbch: Refactor get_smscb_block() / remove smscb_msg.next_seg In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14098 ) Change subject: cbch: Refactor get_smscb_block() / remove smscb_msg.next_seg ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14098 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I48faa19fec4a0852e6112ca2faa98960c678d4c5 Gerrit-Change-Number: 14098 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 21 May 2019 18:14:06 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 18:14:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 18:14:08 +0000 Subject: Change in osmo-bts[master]: cbch: Log every RSL SMSCB COMMAND with type and number of blocks In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14099 ) Change subject: cbch: Log every RSL SMSCB COMMAND with type and number of blocks ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14099 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I20efe0aa5a67f011d6b6bead57236366c2f45ecf Gerrit-Change-Number: 14099 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 21 May 2019 18:14:08 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 18:14:10 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 18:14:10 +0000 Subject: Change in osmo-bts[master]: cbch: Implement support for DEFAULT message In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14100 ) Change subject: cbch: Implement support for DEFAULT message ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14100 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I65a79215b54155d128c26d2ca11ff9ff3ed2cdba Gerrit-Change-Number: 14100 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 21 May 2019 18:14:10 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 18:14:15 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 18:14:15 +0000 Subject: Change in osmo-bts[master]: cbch: Support Extended CBCH In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14109 ) Change subject: cbch: Support Extended CBCH ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14109 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If2c6dc7da1e2185ab75fc957f8d305ad8db22429 Gerrit-Change-Number: 14109 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 21 May 2019 18:14:15 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 18:14:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 18:14:18 +0000 Subject: Change in osmo-bts[master]: rsl: Send RSL Error Report in case of unknown/unsupported msg_type In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14083 ) Change subject: rsl: Send RSL Error Report in case of unknown/unsupported msg_type ...................................................................... rsl: Send RSL Error Report in case of unknown/unsupported msg_type Send an RSL Error Report in case of unknown/unsupported msg_type, as describedi in section 7.3 of 3GPP TS 48.058. Related: OS#3750 Change-Id: Ib2918007410e635b144a7535cec30b9f3378c755 --- M src/common/rsl.c 1 file changed, 14 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/common/rsl.c b/src/common/rsl.c index c2a7db6..1be6e52 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -2523,7 +2523,9 @@ static int rsl_rx_rll(struct gsm_bts_trx *trx, struct msgb *msg) { struct abis_rsl_rll_hdr *rh = msgb_l2(msg); + struct abis_rsl_rll_hdr rh2; struct gsm_lchan *lchan; + int rc; if (msgb_l2len(msg) < sizeof(*rh)) { LOGP(DRSL, LOGL_NOTICE, "RSL Radio Link Layer message too short\n"); @@ -2546,9 +2548,14 @@ DEBUGP(DRLL, "%s Rx RLL %s Abis -> LAPDm\n", gsm_lchan_name(lchan), rsl_msg_name(rh->c.msg_type)); + /* make copy of RLL header, as the message will be free'd in case of erroneous return */ + rh2 = *rh; /* exception: RLL messages are _NOT_ freed as they are now * owned by LAPDm which might have queued them */ - return lapdm_rslms_recvmsg(msg, &lchan->lapdm_ch); + rc = lapdm_rslms_recvmsg(msg, &lchan->lapdm_ch); + if (rc < 0) + rsl_tx_error_report(trx, RSL_ERR_MSG_TYPE, &rh2.chan_nr, &rh2.link_id, NULL); + return rc; } static inline int rsl_link_id_is_sacch(uint8_t link_id) @@ -2823,10 +2830,12 @@ case RSL_MT_NOT_CMD: LOGP(DRSL, LOGL_NOTICE, "unimplemented RSL cchan msg_type %s\n", rsl_msg_name(cch->c.msg_type)); + rsl_tx_error_report(trx, RSL_ERR_MSG_TYPE, &cch->chan_nr, NULL, msg); break; default: LOGP(DRSL, LOGL_NOTICE, "undefined RSL cchan msg_type 0x%02x\n", cch->c.msg_type); + rsl_tx_error_report(trx, RSL_ERR_MSG_TYPE, &cch->chan_nr, NULL, msg); ret = -EINVAL; break; } @@ -2898,10 +2907,12 @@ case RSL_MT_TFO_MOD_REQ: LOGP(DRSL, LOGL_NOTICE, "unimplemented RSL dchan msg_type %s\n", rsl_msg_name(dch->c.msg_type)); + rsl_tx_error_report(trx, RSL_ERR_MSG_TYPE, &dch->chan_nr, NULL, msg); break; default: LOGP(DRSL, LOGL_NOTICE, "undefined RSL dchan msg_type 0x%02x\n", dch->c.msg_type); + rsl_tx_error_report(trx, RSL_ERR_MSG_TYPE, &dch->chan_nr, NULL, msg); ret = -EINVAL; } @@ -2931,6 +2942,7 @@ default: LOGP(DRSL, LOGL_NOTICE, "undefined RSL TRX msg_type 0x%02x\n", th->msg_type); + rsl_tx_error_report(trx, RSL_ERR_MSG_TYPE, NULL, NULL, msg); ret = -EINVAL; } @@ -2977,6 +2989,7 @@ default: LOGP(DRSL, LOGL_NOTICE, "unsupported RSL ip.access msg_type 0x%02x\n", dch->c.msg_type); + rsl_tx_error_report(trx, RSL_ERR_MSG_TYPE, &dch->chan_nr, NULL, msg); ret = -EINVAL; } -- To view, visit https://gerrit.osmocom.org/14083 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ib2918007410e635b144a7535cec30b9f3378c755 Gerrit-Change-Number: 14083 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 18:14:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 18:14:19 +0000 Subject: Change in osmo-bts[master]: rsl: Include Channel Nr and Link ID in Error reports whenever possible In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14084 ) Change subject: rsl: Include Channel Nr and Link ID in Error reports whenever possible ...................................................................... rsl: Include Channel Nr and Link ID in Error reports whenever possible While the CHAN_NR and LINK_ID IEs in ERROR REPORRT are optional, we still should include it whenever possible to help error analysis. Related: OS#3750 Change-Id: I8155e0d37096bd7bf3563e4f7853171ca4b3aa58 --- M src/common/rsl.c 1 file changed, 27 insertions(+), 13 deletions(-) Approvals: Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/common/rsl.c b/src/common/rsl.c index 1be6e52..0fe50e0 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -291,6 +291,7 @@ /* 8.5.1 BCCH INFOrmation is received */ static int rsl_rx_bcch_info(struct gsm_bts_trx *trx, struct msgb *msg) { + struct abis_rsl_cchan_hdr *cch = msgb_l2(msg); struct gsm_bts *bts = trx->bts; struct tlv_parsed tp; uint8_t rsl_si, count; @@ -301,16 +302,16 @@ /* 9.3.30 System Info Type */ if (!TLVP_PRESENT(&tp, RSL_IE_SYSINFO_TYPE)) - return rsl_tx_error_report(trx, RSL_ERR_MAND_IE_ERROR, NULL, NULL, msg); + return rsl_tx_error_report(trx, RSL_ERR_MAND_IE_ERROR, &cch->chan_nr, NULL, msg); rsl_si = *TLVP_VAL(&tp, RSL_IE_SYSINFO_TYPE); if (OSMO_IN_ARRAY(rsl_si, rsl_sacch_sitypes)) - return rsl_tx_error_report(trx, RSL_ERR_IE_CONTENT, NULL, NULL, msg); + return rsl_tx_error_report(trx, RSL_ERR_IE_CONTENT, &cch->chan_nr, NULL, msg); osmo_si = osmo_rsl2sitype(rsl_si); if (osmo_si == SYSINFO_TYPE_NONE) { LOGP(DRSL, LOGL_NOTICE, " Rx RSL SI 0x%02x not supported.\n", rsl_si); - return rsl_tx_error_report(trx, RSL_ERR_IE_CONTENT, NULL, NULL, msg); + return rsl_tx_error_report(trx, RSL_ERR_IE_CONTENT, &cch->chan_nr, NULL, msg); } /* 9.3.39 Full BCCH Information */ if (TLVP_PRESENT(&tp, RSL_IE_FULL_BCCH_INFO)) { @@ -341,13 +342,13 @@ if (bts->si2q_index > bts->si2q_count) { LOGP(DRSL, LOGL_ERROR, " Rx RSL SI2quater with index %u > count %u\n", bts->si2q_index, bts->si2q_count); - return rsl_tx_error_report(trx, RSL_ERR_IE_CONTENT, NULL, NULL, msg); + return rsl_tx_error_report(trx, RSL_ERR_IE_CONTENT, &cch->chan_nr, NULL, msg); } if (bts->si2q_index > SI2Q_MAX_NUM || bts->si2q_count > SI2Q_MAX_NUM) { LOGP(DRSL, LOGL_ERROR, " Rx RSL SI2quater with impossible parameters: index %u, count %u" "should be <= %u\n", bts->si2q_index, bts->si2q_count, SI2Q_MAX_NUM); - return rsl_tx_error_report(trx, RSL_ERR_IE_CONTENT, NULL, NULL, msg); + return rsl_tx_error_report(trx, RSL_ERR_IE_CONTENT, &cch->chan_nr, NULL, msg); } memset(GSM_BTS_SI2Q(bts, bts->si2q_index), GSM_MACBLOCK_PADDING, sizeof(sysinfo_buf_t)); @@ -447,6 +448,7 @@ /* 8.5.5 PAGING COMMAND */ static int rsl_rx_paging_cmd(struct gsm_bts_trx *trx, struct msgb *msg) { + struct abis_rsl_cchan_hdr *cch = msgb_l2(msg); struct tlv_parsed tp; struct gsm_bts *bts = trx->bts; uint8_t chan_needed = 0, paging_group; @@ -457,7 +459,7 @@ if (!TLVP_PRESENT(&tp, RSL_IE_PAGING_GROUP) || !TLVP_PRESENT(&tp, RSL_IE_MS_IDENTITY)) - return rsl_tx_error_report(trx, RSL_ERR_MAND_IE_ERROR, NULL, NULL, msg); + return rsl_tx_error_report(trx, RSL_ERR_MAND_IE_ERROR, &cch->chan_nr, NULL, msg); paging_group = *TLVP_VAL(&tp, RSL_IE_PAGING_GROUP); identity_lv = TLVP_VAL(&tp, RSL_IE_MS_IDENTITY)-1; @@ -482,6 +484,7 @@ /* 8.5.8 SMS BROADCAST COMMAND */ static int rsl_rx_sms_bcast_cmd(struct gsm_bts_trx *trx, struct msgb *msg) { + struct abis_rsl_cchan_hdr *cch = msgb_l2(msg); struct tlv_parsed tp; struct rsl_ie_cb_cmd_type *cb_cmd_type; @@ -489,7 +492,7 @@ if (!TLVP_PRESENT(&tp, RSL_IE_CB_CMD_TYPE) || !TLVP_PRESENT(&tp, RSL_IE_SMSCB_MSG)) - return rsl_tx_error_report(trx, RSL_ERR_MAND_IE_ERROR, NULL, NULL, msg); + return rsl_tx_error_report(trx, RSL_ERR_MAND_IE_ERROR, &cch->chan_nr, NULL, msg); cb_cmd_type = (struct rsl_ie_cb_cmd_type *) TLVP_VAL(&tp, RSL_IE_CB_CMD_TYPE); @@ -617,12 +620,13 @@ /* 8.5.6 IMMEDIATE ASSIGN COMMAND is received */ static int rsl_rx_imm_ass(struct gsm_bts_trx *trx, struct msgb *msg) { + struct abis_rsl_cchan_hdr *cch = msgb_l2(msg); struct tlv_parsed tp; rsl_tlv_parse(&tp, msgb_l3(msg), msgb_l3len(msg)); if (!TLVP_PRESENT(&tp, RSL_IE_FULL_IMM_ASS_INFO)) - return rsl_tx_error_report(trx, RSL_ERR_MAND_IE_ERROR, NULL, NULL, msg); + return rsl_tx_error_report(trx, RSL_ERR_MAND_IE_ERROR, &cch->chan_nr, NULL, msg); rate_ctr_inc2(trx->bts->ctrs, BTS_CTR_AGCH_RCVD); @@ -2475,6 +2479,8 @@ { struct abis_rsl_common_hdr *rh = msgb_l2(msg); struct abis_rsl_dchan_hdr *dch; + struct abis_rsl_cchan_hdr *cch; + struct abis_rsl_rll_hdr *rllh; int rc; /* Handle GSM 08.58 7 Error Handling for the given input. This method will @@ -2483,6 +2489,8 @@ /* TS 48.058 Section 7 explains how to do error handling */ switch (rh->msg_discr & 0xfe) { + case ABIS_RSL_MDISC_IPACCESS: + /* fall-through */ case ABIS_RSL_MDISC_DED_CHAN: dch = msgb_l2(msg); switch (dch->c.msg_type) { @@ -2495,18 +2503,24 @@ RSL_ERR_MAND_IE_ERROR, NULL); break; default: - rc = rsl_tx_error_report(msg->trx, RSL_ERR_MAND_IE_ERROR, NULL, NULL, msg); + rc = rsl_tx_error_report(msg->trx, RSL_ERR_MAND_IE_ERROR, &dch->chan_nr, + NULL, msg); break; } break; case ABIS_RSL_MDISC_RLL: - /* fall-through */ + rllh = msgb_l2(msg); + /* ERROR REPORT */ + rc = rsl_tx_error_report(msg->trx, RSL_ERR_MAND_IE_ERROR, + &rllh->chan_nr, &rllh->link_id, msg); + break; case ABIS_RSL_MDISC_COM_CHAN: - /* fall-through */ + cch = msgb_l2(msg); + /* ERROR REPORT */ + rc = rsl_tx_error_report(msg->trx, RSL_ERR_MAND_IE_ERROR, &cch->chan_nr, NULL, msg); + break; case ABIS_RSL_MDISC_TRX: /* fall-through */ - case ABIS_RSL_MDISC_IPACCESS: - /* fall-through */ default: /* ERROR REPORT */ rc = rsl_tx_error_report(msg->trx, RSL_ERR_MAND_IE_ERROR, NULL, NULL, msg); -- To view, visit https://gerrit.osmocom.org/14084 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I8155e0d37096bd7bf3563e4f7853171ca4b3aa58 Gerrit-Change-Number: 14084 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 18:14:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 18:14:19 +0000 Subject: Change in osmo-bts[master]: RSL: Reject RLL messages for lchans that are not active yet In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14085 ) Change subject: RSL: Reject RLL messages for lchans that are not active yet ...................................................................... RSL: Reject RLL messages for lchans that are not active yet The Radio Link Layer (RLL) messages only make sense when a given logical channel is active. If it isn't active, let's reject the messages with an RSL ERROR REPORT with cause "Message sequence error", wich according to spec means: "A message with an existing message type which is not possible according to the specification and to the state of the BTS is erroneous." Related: OS#3750 Change-Id: I68dbb622aeaee657471664cdc0b69c2ac316d77e --- M src/common/rsl.c 1 file changed, 8 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/common/rsl.c b/src/common/rsl.c index 0fe50e0..b02f4e6 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -2559,6 +2559,14 @@ return rsl_reject_unknown_lchan(msg); } + if (lchan->state != LCHAN_S_ACTIVE) { + LOGPLCHAN(lchan, DRLL, LOGL_NOTICE, "Rx RLL %s for lchan which isn't active\n", + rsl_msg_name(rh->c.msg_type)); + rsl_tx_error_report(trx, RSL_ERR_MSG_SEQ, &rh->chan_nr, &rh->link_id, msg); + msgb_free(msg); + return -1; + } + DEBUGP(DRLL, "%s Rx RLL %s Abis -> LAPDm\n", gsm_lchan_name(lchan), rsl_msg_name(rh->c.msg_type)); -- To view, visit https://gerrit.osmocom.org/14085 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I68dbb622aeaee657471664cdc0b69c2ac316d77e Gerrit-Change-Number: 14085 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 18:14:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 18:14:19 +0000 Subject: Change in osmo-bts[master]: RSL: Fix off-by-one error when parsing SACCH INFO IE in RSL CHAN ACT In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14087 ) Change subject: RSL: Fix off-by-one error when parsing SACCH INFO IE in RSL CHAN ACT ...................................................................... RSL: Fix off-by-one error when parsing SACCH INFO IE in RSL CHAN ACT This off-by-one error in length verification caused all SACCH INFO IE to be deemed invalid and hence any RSL CHAN ACT with that IE to be rejected. Change-Id: I6436caf5c2caefbf7c089d66e37d8d1babe1c24e Related: OS#3750 --- M src/common/rsl.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/common/rsl.c b/src/common/rsl.c index b02f4e6..76aaef3 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1133,7 +1133,7 @@ lapdm_ui_prefix_lchan(lchan, cur, osmo_si, si_len); cur += si_len; - if (cur >= val + tot_len) { + if (cur > val + tot_len) { LOGP(DRSL, LOGL_ERROR, "Error parsing SACCH INFO IE\n"); rsl_tx_error_report(msg->trx, RSL_ERR_IE_CONTENT, &dch->chan_nr, NULL, msg); -- To view, visit https://gerrit.osmocom.org/14087 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I6436caf5c2caefbf7c089d66e37d8d1babe1c24e Gerrit-Change-Number: 14087 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 18:14:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 18:14:19 +0000 Subject: Change in osmo-bts[master]: cbch: Implement handling of "Schedule" message In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14090 ) Change subject: cbch: Implement handling of "Schedule" message ...................................................................... cbch: Implement handling of "Schedule" message The first block of "schedule" messages must be advertised with a special sequence number coding, see Table 1 of 3GPP TS 44.012. Change-Id: I473edf698eba7ff5008f2fd1ec1776f0aa013858 Closes: OS#4012 --- M src/common/cbch.c 1 file changed, 10 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/common/cbch.c b/src/common/cbch.c index c628cb5..cde1a0c 100644 --- a/src/common/cbch.c +++ b/src/common/cbch.c @@ -1,6 +1,6 @@ /* Cell Broadcast routines */ -/* (C) 2014 by Harald Welte +/* (C) 2014,2018-2019 by Harald Welte * * All Rights Reserved * @@ -31,6 +31,7 @@ struct smscb_msg { struct llist_head list; /* list in smscb_state.queue */ + bool is_schedule; /* is this a schedule message? */ uint8_t msg[GSM412_MSG_LEN]; /* message buffer */ uint8_t next_seg; /* next segment number */ uint8_t num_segs; /* total number of segments */ @@ -78,7 +79,11 @@ memcpy(out, &msg->msg[msg->next_seg * GSM412_BLOCK_LEN], to_copy); /* set + increment sequence number */ - block_type->seq_nr = msg->next_seg++; + if (msg->next_seg == 0 && msg->is_schedule) { + block_type->seq_nr = 8; /* first schedule block */ + msg->next_seg++; + } else + block_type->seq_nr = msg->next_seg++; /* determine if this is the last block */ if (block_type->seq_nr + 1 == msg->num_segs) @@ -126,6 +131,9 @@ /* next segment is first segment */ scm->next_seg = 0; + if (cmd_type.command == RSL_CB_CMD_TYPE_SCHEDULE) + scm->is_schedule = true; + switch (cmd_type.command) { case RSL_CB_CMD_TYPE_NORMAL: case RSL_CB_CMD_TYPE_SCHEDULE: -- To view, visit https://gerrit.osmocom.org/14090 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I473edf698eba7ff5008f2fd1ec1776f0aa013858 Gerrit-Change-Number: 14090 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 18:14:20 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 18:14:20 +0000 Subject: Change in osmo-bts[master]: cbch: Refactor get_smscb_block() / remove smscb_msg.next_seg In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14098 ) Change subject: cbch: Refactor get_smscb_block() / remove smscb_msg.next_seg ...................................................................... cbch: Refactor get_smscb_block() / remove smscb_msg.next_seg There's no need to keep around a pointer to the next segment in a SMSCB message. The way how the multiframe structure is laid out (and how the tb number works), we can use the result of a modulo-division on the frame number to determine which of the segments/blocks inside a SMSCB message (page) we have to transmit. This also acts as a simplification in preparation of support for the SMSCB DEFAULT type. Change-Id: I48faa19fec4a0852e6112ca2faa98960c678d4c5 Related: OS#4013 --- M src/common/cbch.c 1 file changed, 25 insertions(+), 19 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/common/cbch.c b/src/common/cbch.c index cde1a0c..c253805 100644 --- a/src/common/cbch.c +++ b/src/common/cbch.c @@ -28,15 +28,16 @@ #include #include +/* internal representation of one SMS-CB message (e.g. in the pending queue */ struct smscb_msg { struct llist_head list; /* list in smscb_state.queue */ bool is_schedule; /* is this a schedule message? */ uint8_t msg[GSM412_MSG_LEN]; /* message buffer */ - uint8_t next_seg; /* next segment number */ uint8_t num_segs; /* total number of segments */ }; +/* construct a SMSCB NULL block in the user-provided output buffer at 'out' */ static int get_smscb_null_block(uint8_t *out) { struct gsm412_block_type *block_type = (struct gsm412_block_type *) out; @@ -51,17 +52,26 @@ } /* get the next block of the current CB message */ -static int get_smscb_block(struct gsm_bts *bts, uint8_t *out) +static int get_smscb_block(struct gsm_bts *bts, uint8_t *out, uint8_t block_nr, + const struct gsm_time *g_time) { int to_copy; struct gsm412_block_type *block_type; struct smscb_msg *msg = bts->smscb_state.cur_msg; if (!msg) { - /* No message: Send NULL mesage */ + /* No message: Send NULL block */ + DEBUGPGT(DLSMS, g_time, "No cur_msg; requesting NULL block\n"); return get_smscb_null_block(out); } - OSMO_ASSERT(msg->next_seg < 4); + OSMO_ASSERT(block_nr < 4); + + if (block_nr >= msg->num_segs) { + /* Higher block number than this message has blocks: Send NULL block */ + DEBUGPGT(DLSMS, g_time, "cur_msg has only %u blocks; requesting NULL block\n", + msg->num_segs); + return get_smscb_null_block(out); + } block_type = (struct gsm412_block_type *) out++; @@ -70,29 +80,28 @@ block_type->lpd = 1; /* determine how much data to copy */ - to_copy = GSM412_MSG_LEN - (msg->next_seg * GSM412_BLOCK_LEN); + to_copy = GSM412_MSG_LEN - (block_nr * GSM412_BLOCK_LEN); if (to_copy > GSM412_BLOCK_LEN) - to_copy = GSM412_BLOCK_LEN; + to_copy = GSM412_BLOCK_LEN; OSMO_ASSERT(to_copy >= 0); /* copy data and increment index */ - memcpy(out, &msg->msg[msg->next_seg * GSM412_BLOCK_LEN], to_copy); + memcpy(out, &msg->msg[block_nr * GSM412_BLOCK_LEN], to_copy); /* set + increment sequence number */ - if (msg->next_seg == 0 && msg->is_schedule) { + if (block_nr == 0 && msg->is_schedule) block_type->seq_nr = 8; /* first schedule block */ - msg->next_seg++; - } else - block_type->seq_nr = msg->next_seg++; + else + block_type->seq_nr = block_nr; /* determine if this is the last block */ - if (block_type->seq_nr + 1 == msg->num_segs) + if (block_nr + 1 == msg->num_segs) block_type->lb = 1; else block_type->lb = 0; - if (block_type->lb == 1) { - /* remove/release the message memory */ + if (block_nr == 4) { + /* delete any fully-transmitted normal message (or superseded default) */ talloc_free(bts->smscb_state.cur_msg); bts->smscb_state.cur_msg = NULL; } @@ -128,8 +137,6 @@ /* initialize entire message with default padding */ memset(scm->msg, GSM_MACBLOCK_PADDING, sizeof(scm->msg)); - /* next segment is first segment */ - scm->next_seg = 0; if (cmd_type.command == RSL_CB_CMD_TYPE_SCHEDULE) scm->is_schedule = true; @@ -165,7 +172,6 @@ } llist_del(&msg->list); - return msg; } @@ -191,10 +197,10 @@ case 0: /* select a new SMSCB message */ bts->smscb_state.cur_msg = select_next_smscb(bts); - rc = get_smscb_block(bts, outbuf); + rc = get_smscb_block(bts, outbuf, tb, g_time); break; case 1: case 2: case 3: - rc = get_smscb_block(bts, outbuf); + rc = get_smscb_block(bts, outbuf, tb, g_time); break; case 4: case 5: case 6: case 7: /* always send NULL frame in extended CBCH for now */ -- To view, visit https://gerrit.osmocom.org/14098 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I48faa19fec4a0852e6112ca2faa98960c678d4c5 Gerrit-Change-Number: 14098 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 18:14:20 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 18:14:20 +0000 Subject: Change in osmo-bts[master]: cbch: Log every RSL SMSCB COMMAND with type and number of blocks In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14099 ) Change subject: cbch: Log every RSL SMSCB COMMAND with type and number of blocks ...................................................................... cbch: Log every RSL SMSCB COMMAND with type and number of blocks Change-Id: I20efe0aa5a67f011d6b6bead57236366c2f45ecf --- M src/common/cbch.c 1 file changed, 15 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/common/cbch.c b/src/common/cbch.c index c253805..817489f 100644 --- a/src/common/cbch.c +++ b/src/common/cbch.c @@ -116,6 +116,14 @@ [RSL_CB_CMD_LASTBLOCK_3] = 3, }; +static const struct value_string rsl_cb_cmd_names[] = { + { RSL_CB_CMD_TYPE_NORMAL, "NORMAL" }, + { RSL_CB_CMD_TYPE_SCHEDULE, "SCHEDULE" }, + { RSL_CB_CMD_TYPE_DEFAULT, "DEFAULT" }, + { RSL_CB_CMD_TYPE_NULL, "NULL" }, + { 0, NULL } +}; + /* incoming SMS broadcast command from RSL */ int bts_process_smscb_cmd(struct gsm_bts *bts, @@ -141,13 +149,17 @@ if (cmd_type.command == RSL_CB_CMD_TYPE_SCHEDULE) scm->is_schedule = true; + scm->num_segs = last_block_rsl2um[cmd_type.last_block&3]; + memcpy(scm->msg, msg, msg_len); + + LOGP(DLSMS, LOGL_INFO, "RSL SMSCB COMMAND (type=%s, num_blocks=%u)\n", + get_value_string(rsl_cb_cmd_names, cmd_type.command), scm->num_segs); + switch (cmd_type.command) { case RSL_CB_CMD_TYPE_NORMAL: case RSL_CB_CMD_TYPE_SCHEDULE: case RSL_CB_CMD_TYPE_NULL: - scm->num_segs = last_block_rsl2um[cmd_type.last_block&3]; - memcpy(scm->msg, msg, msg_len); - /* def_bcast is ignored */ + /* def_bcast is ignored as per Section 9.3.41 of 3GPP TS 48.058 */ break; case RSL_CB_CMD_TYPE_DEFAULT: /* use def_bcast, ignore command */ -- To view, visit https://gerrit.osmocom.org/14099 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I20efe0aa5a67f011d6b6bead57236366c2f45ecf Gerrit-Change-Number: 14099 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 18:14:20 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 18:14:20 +0000 Subject: Change in osmo-bts[master]: cbch: Implement support for DEFAULT message In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14100 ) Change subject: cbch: Implement support for DEFAULT message ...................................................................... cbch: Implement support for DEFAULT message The BSC can not only send us each to-be-sent message separately, but it can also configure a DEFAULT message, which is then to be sent instead of the NULL message. Let's add support for this Change-Id: I65a79215b54155d128c26d2ca11ff9ff3ed2cdba Closes: OS#4013 --- M include/osmo-bts/gsm_data_shared.h M src/common/cbch.c 2 files changed, 38 insertions(+), 13 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index 72d9710..6974e62 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -737,6 +737,7 @@ struct { struct llist_head queue; /* list of struct smscb_msg */ struct smscb_msg *cur_msg; /* current SMS-CB */ + struct smscb_msg *default_msg; /* default broadcast message; NULL if none */ } smscb_state; float min_qual_rach; /* minimum quality for RACH bursts */ diff --git a/src/common/cbch.c b/src/common/cbch.c index 817489f..185386a 100644 --- a/src/common/cbch.c +++ b/src/common/cbch.c @@ -101,9 +101,14 @@ block_type->lb = 0; if (block_nr == 4) { - /* delete any fully-transmitted normal message (or superseded default) */ - talloc_free(bts->smscb_state.cur_msg); - bts->smscb_state.cur_msg = NULL; + if (msg != bts->smscb_state.default_msg) { + DEBUGPGT(DLSMS, g_time, "deleting fully-transmitted message %p\n", msg); + /* delete any fully-transmitted normal message (or superseded default) */ + talloc_free(bts->smscb_state.cur_msg); + bts->smscb_state.cur_msg = NULL; + } else { + DEBUGPGT(DLSMS, g_time, "keeping fully-transmitted default message %p\n", msg); + } } return block_type->lb; @@ -160,16 +165,25 @@ case RSL_CB_CMD_TYPE_SCHEDULE: case RSL_CB_CMD_TYPE_NULL: /* def_bcast is ignored as per Section 9.3.41 of 3GPP TS 48.058 */ + llist_add_tail(&scm->list, &bts->smscb_state.queue); + /* FIXME: limit queue size and optionally send CBCH LOAD Information (overflow) via RSL */ break; case RSL_CB_CMD_TYPE_DEFAULT: - /* use def_bcast, ignore command */ - /* def_bcast == 0: normal mess */ + /* old default msg will be free'd in get_smscb_block() if it is currently in transit + * and we set a new default_msg here */ + if (bts->smscb_state.cur_msg && bts->smscb_state.cur_msg == bts->smscb_state.default_msg) + talloc_free(bts->smscb_state.cur_msg); + if (cmd_type.def_bcast == RSL_CB_CMD_DEFBCAST_NORMAL) + /* def_bcast == 0: normal message */ + bts->smscb_state.default_msg = scm; + else { + /* def_bcast == 1: NULL message */ + bts->smscb_state.default_msg = NULL; + talloc_free(scm); + } break; } - llist_add_tail(&scm->list, &bts->smscb_state.queue); - /* FIXME: limit queue size and optionally send CBCH LOAD Information (overflow) via RSL */ - return 0; } @@ -178,13 +192,23 @@ struct smscb_msg *msg; msg = llist_first_entry_or_null(&bts->smscb_state.queue, struct smscb_msg, list); - if (!msg) { - /* FIXME: send CBCH LOAD Information (underflow) via RSL */ - return NULL; + if (msg) { + llist_del(&msg->list); + DEBUGP(DLSMS, "%s: Dequeued msg\n", __func__); + return msg; } - llist_del(&msg->list); - return msg; + /* FIXME: send CBCH LOAD Information (underflow) via RSL */ + + /* choose the default message, if any */ + msg = bts->smscb_state.default_msg; + if (msg) { + DEBUGP(DLSMS, "%s: Using default msg\n", __func__); + return msg; + } + + DEBUGP(DLSMS, "%s: No queued msg nor default\n", __func__); + return NULL; } /* call-back from bts model specific code when it wants to obtain a CBCH -- To view, visit https://gerrit.osmocom.org/14100 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I65a79215b54155d128c26d2ca11ff9ff3ed2cdba Gerrit-Change-Number: 14100 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 18:14:20 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 18:14:20 +0000 Subject: Change in osmo-bts[master]: cbch: Fix memory leak and send error message on invalid SMSCB command In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14101 ) Change subject: cbch: Fix memory leak and send error message on invalid SMSCB command ...................................................................... cbch: Fix memory leak and send error message on invalid SMSCB command Change-Id: I411d1fb3693a2f7cf7bba3d38b1aaf276a4137ba Related: OS#4011 --- M src/common/cbch.c M src/common/rsl.c 2 files changed, 10 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, approved diff --git a/src/common/cbch.c b/src/common/cbch.c index 185386a..c75b510 100644 --- a/src/common/cbch.c +++ b/src/common/cbch.c @@ -182,6 +182,9 @@ talloc_free(scm); } break; + default: + talloc_free(scm); + return -EINVAL; } return 0; diff --git a/src/common/rsl.c b/src/common/rsl.c index 76aaef3..8021d2d 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -487,6 +487,7 @@ struct abis_rsl_cchan_hdr *cch = msgb_l2(msg); struct tlv_parsed tp; struct rsl_ie_cb_cmd_type *cb_cmd_type; + int rc; rsl_tlv_parse(&tp, msgb_l3(msg), msgb_l3len(msg)); @@ -497,9 +498,12 @@ cb_cmd_type = (struct rsl_ie_cb_cmd_type *) TLVP_VAL(&tp, RSL_IE_CB_CMD_TYPE); - return bts_process_smscb_cmd(trx->bts, *cb_cmd_type, - TLVP_LEN(&tp, RSL_IE_SMSCB_MSG), - TLVP_VAL(&tp, RSL_IE_SMSCB_MSG)); + rc = bts_process_smscb_cmd(trx->bts, *cb_cmd_type, TLVP_LEN(&tp, RSL_IE_SMSCB_MSG), + TLVP_VAL(&tp, RSL_IE_SMSCB_MSG)); + if (rc < 0) + return rsl_tx_error_report(trx, RSL_ERR_IE_CONTENT, &cch->chan_nr, NULL, msg); + + return 0; } /*! Prefix a given SACCH frame with a L2/LAPDm UI header and store it in given output buffer. -- To view, visit https://gerrit.osmocom.org/14101 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I411d1fb3693a2f7cf7bba3d38b1aaf276a4137ba Gerrit-Change-Number: 14101 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 18:14:21 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 18:14:21 +0000 Subject: Change in osmo-bts[master]: cbch: Support Extended CBCH In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14109 ) Change subject: cbch: Support Extended CBCH ...................................................................... cbch: Support Extended CBCH The logic for Extended CBCH are the same as for the Basic CBCH, we just need to * duplicate our related state * parse the optional RSL_IE_SMSCB_CHAN_INDICATOR IE * start to send data on the Extended CBCH (TB=4..7) Change-Id: If2c6dc7da1e2185ab75fc957f8d305ad8db22429 Closes: OS#3535 --- M include/osmo-bts/cbch.h M include/osmo-bts/gsm_data_shared.h M src/common/bts.c M src/common/cbch.c M src/common/rsl.c M src/common/vty.c 6 files changed, 69 insertions(+), 37 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/include/osmo-bts/cbch.h b/include/osmo-bts/cbch.h index b4ac409..af5fd9a 100644 --- a/include/osmo-bts/cbch.h +++ b/include/osmo-bts/cbch.h @@ -7,9 +7,8 @@ #include /* incoming SMS broadcast command from RSL */ -int bts_process_smscb_cmd(struct gsm_bts *bts, - struct rsl_ie_cb_cmd_type cmd_type, - uint8_t msg_len, const uint8_t *msg); +int bts_process_smscb_cmd(struct gsm_bts *bts, struct rsl_ie_cb_cmd_type cmd_type, + bool extended_cbch, uint8_t msg_len, const uint8_t *msg); /* call-back from bts model specific code when it wants to obtain a CBCH * block for a given gsm_time. outbuf must have 23 bytes of space. */ diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index 6974e62..9378730 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -539,6 +539,12 @@ uint8_t initial_mcs; }; +struct bts_smscb_state { + struct llist_head queue; /* list of struct smscb_msg */ + struct smscb_msg *cur_msg; /* current SMS-CB */ + struct smscb_msg *default_msg; /* default broadcast message; NULL if none */ +}; + /* The amount of time within which a sudden disconnect of a newly established * OML connection will cause a special warning to be logged. */ #define OSMO_BTS_OML_CONN_EARLY_DISCONNECT 10 /* in seconds */ @@ -734,11 +740,9 @@ /* used by the sysmoBTS to adjust band */ uint8_t auto_band; - struct { - struct llist_head queue; /* list of struct smscb_msg */ - struct smscb_msg *cur_msg; /* current SMS-CB */ - struct smscb_msg *default_msg; /* default broadcast message; NULL if none */ - } smscb_state; + /* State for SMSCB (Cell Broadcast) for BASIC and EXTENDED channel */ + struct bts_smscb_state smscb_basic; + struct bts_smscb_state smscb_extended; float min_qual_rach; /* minimum quality for RACH bursts */ float min_qual_norm; /* minimum quality for normal daata */ diff --git a/src/common/bts.c b/src/common/bts.c index 5851e9b..4af219b 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -190,7 +190,8 @@ initialized = 1; } - INIT_LLIST_HEAD(&bts->smscb_state.queue); + INIT_LLIST_HEAD(&bts->smscb_basic.queue); + INIT_LLIST_HEAD(&bts->smscb_extended.queue); INIT_LLIST_HEAD(&bts->oml_queue); /* register DTX DL FSM */ diff --git a/src/common/cbch.c b/src/common/cbch.c index c75b510..6092e46 100644 --- a/src/common/cbch.c +++ b/src/common/cbch.c @@ -37,6 +37,17 @@ uint8_t num_segs; /* total number of segments */ }; +/* determine SMSCB state by tb number */ +static struct bts_smscb_state *bts_smscb_state(struct gsm_bts *bts, uint8_t tb) +{ + if (tb < 4) + return &bts->smscb_basic; + else if (tb < 8) + return &bts->smscb_extended; + else + OSMO_ASSERT(0); +} + /* construct a SMSCB NULL block in the user-provided output buffer at 'out' */ static int get_smscb_null_block(uint8_t *out) { @@ -52,12 +63,12 @@ } /* get the next block of the current CB message */ -static int get_smscb_block(struct gsm_bts *bts, uint8_t *out, uint8_t block_nr, +static int get_smscb_block(struct bts_smscb_state *bts_ss, uint8_t *out, uint8_t block_nr, const struct gsm_time *g_time) { int to_copy; struct gsm412_block_type *block_type; - struct smscb_msg *msg = bts->smscb_state.cur_msg; + struct smscb_msg *msg = bts_ss->cur_msg; if (!msg) { /* No message: Send NULL block */ @@ -101,11 +112,11 @@ block_type->lb = 0; if (block_nr == 4) { - if (msg != bts->smscb_state.default_msg) { + if (msg != bts_ss->default_msg) { DEBUGPGT(DLSMS, g_time, "deleting fully-transmitted message %p\n", msg); /* delete any fully-transmitted normal message (or superseded default) */ - talloc_free(bts->smscb_state.cur_msg); - bts->smscb_state.cur_msg = NULL; + talloc_free(bts_ss->cur_msg); + bts_ss->cur_msg = NULL; } else { DEBUGPGT(DLSMS, g_time, "keeping fully-transmitted default message %p\n", msg); } @@ -131,11 +142,16 @@ /* incoming SMS broadcast command from RSL */ -int bts_process_smscb_cmd(struct gsm_bts *bts, - struct rsl_ie_cb_cmd_type cmd_type, - uint8_t msg_len, const uint8_t *msg) +int bts_process_smscb_cmd(struct gsm_bts *bts, struct rsl_ie_cb_cmd_type cmd_type, + bool extended_cbch, uint8_t msg_len, const uint8_t *msg) { struct smscb_msg *scm; + struct bts_smscb_state *bts_ss; + + if (extended_cbch) + bts_ss = &bts->smscb_extended; + else + bts_ss = &bts->smscb_basic; if (msg_len > sizeof(scm->msg)) { LOGP(DLSMS, LOGL_ERROR, @@ -157,7 +173,8 @@ scm->num_segs = last_block_rsl2um[cmd_type.last_block&3]; memcpy(scm->msg, msg, msg_len); - LOGP(DLSMS, LOGL_INFO, "RSL SMSCB COMMAND (type=%s, num_blocks=%u)\n", + LOGP(DLSMS, LOGL_INFO, "RSL SMSCB COMMAND (chan=%s, type=%s, num_blocks=%u)\n", + extended_cbch ? "EXTENDED" : "BASIC", get_value_string(rsl_cb_cmd_names, cmd_type.command), scm->num_segs); switch (cmd_type.command) { @@ -165,20 +182,20 @@ case RSL_CB_CMD_TYPE_SCHEDULE: case RSL_CB_CMD_TYPE_NULL: /* def_bcast is ignored as per Section 9.3.41 of 3GPP TS 48.058 */ - llist_add_tail(&scm->list, &bts->smscb_state.queue); + llist_add_tail(&scm->list, &bts_ss->queue); /* FIXME: limit queue size and optionally send CBCH LOAD Information (overflow) via RSL */ break; case RSL_CB_CMD_TYPE_DEFAULT: /* old default msg will be free'd in get_smscb_block() if it is currently in transit * and we set a new default_msg here */ - if (bts->smscb_state.cur_msg && bts->smscb_state.cur_msg == bts->smscb_state.default_msg) - talloc_free(bts->smscb_state.cur_msg); + if (bts_ss->cur_msg && bts_ss->cur_msg == bts_ss->default_msg) + talloc_free(bts_ss->cur_msg); if (cmd_type.def_bcast == RSL_CB_CMD_DEFBCAST_NORMAL) /* def_bcast == 0: normal message */ - bts->smscb_state.default_msg = scm; + bts_ss->default_msg = scm; else { /* def_bcast == 1: NULL message */ - bts->smscb_state.default_msg = NULL; + bts_ss->default_msg = NULL; talloc_free(scm); } break; @@ -190,11 +207,12 @@ return 0; } -static struct smscb_msg *select_next_smscb(struct gsm_bts *bts) +static struct smscb_msg *select_next_smscb(struct gsm_bts *bts, uint8_t tb) { + struct bts_smscb_state *bts_ss = bts_smscb_state(bts, tb); struct smscb_msg *msg; - msg = llist_first_entry_or_null(&bts->smscb_state.queue, struct smscb_msg, list); + msg = llist_first_entry_or_null(&bts_ss->queue, struct smscb_msg, list); if (msg) { llist_del(&msg->list); DEBUGP(DLSMS, "%s: Dequeued msg\n", __func__); @@ -204,7 +222,7 @@ /* FIXME: send CBCH LOAD Information (underflow) via RSL */ /* choose the default message, if any */ - msg = bts->smscb_state.default_msg; + msg = bts_ss->default_msg; if (msg) { DEBUGP(DLSMS, "%s: Using default msg\n", __func__); return msg; @@ -219,10 +237,14 @@ int bts_cbch_get(struct gsm_bts *bts, uint8_t *outbuf, struct gsm_time *g_time) { uint32_t fn = gsm_gsmtime2fn(g_time); + struct bts_smscb_state *bts_ss; /* According to 05.02 Section 6.5.4 */ uint32_t tb = (fn / 51) % 8; + uint8_t block_nr = tb % 4; int rc = 0; + bts_ss = bts_smscb_state(bts, tb); + /* The multiframes used for the basic cell broadcast channel * shall be those in * which TB = 0,1,2 and 3. The multiframes * used for the extended cell broadcast channel shall be those @@ -234,16 +256,14 @@ switch (tb) { case 0: + case 4: /* select a new SMSCB message */ - bts->smscb_state.cur_msg = select_next_smscb(bts); - rc = get_smscb_block(bts, outbuf, tb, g_time); + bts_ss->cur_msg = select_next_smscb(bts, tb); + rc = get_smscb_block(bts_ss, outbuf, block_nr, g_time); break; case 1: case 2: case 3: - rc = get_smscb_block(bts, outbuf, tb, g_time); - break; - case 4: case 5: case 6: case 7: - /* always send NULL frame in extended CBCH for now */ - rc = get_smscb_null_block(outbuf); + case 5: case 6: case 7: + rc = get_smscb_block(bts_ss, outbuf, block_nr, g_time); break; } diff --git a/src/common/rsl.c b/src/common/rsl.c index 8021d2d..364e829 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -487,6 +487,7 @@ struct abis_rsl_cchan_hdr *cch = msgb_l2(msg); struct tlv_parsed tp; struct rsl_ie_cb_cmd_type *cb_cmd_type; + bool extended_cbch = false; int rc; rsl_tlv_parse(&tp, msgb_l3(msg), msgb_l3len(msg)); @@ -495,11 +496,16 @@ !TLVP_PRESENT(&tp, RSL_IE_SMSCB_MSG)) return rsl_tx_error_report(trx, RSL_ERR_MAND_IE_ERROR, &cch->chan_nr, NULL, msg); + if (TLVP_PRESENT(&tp, RSL_IE_SMSCB_CHAN_INDICATOR)) { + if ((*TLVP_VAL(&tp, RSL_IE_SMSCB_CHAN_INDICATOR) & 0x0f) == 0x01) + extended_cbch = true; + } + cb_cmd_type = (struct rsl_ie_cb_cmd_type *) TLVP_VAL(&tp, RSL_IE_CB_CMD_TYPE); - rc = bts_process_smscb_cmd(trx->bts, *cb_cmd_type, TLVP_LEN(&tp, RSL_IE_SMSCB_MSG), - TLVP_VAL(&tp, RSL_IE_SMSCB_MSG)); + rc = bts_process_smscb_cmd(trx->bts, *cb_cmd_type, extended_cbch, + TLVP_LEN(&tp, RSL_IE_SMSCB_MSG), TLVP_VAL(&tp, RSL_IE_SMSCB_MSG)); if (rc < 0) return rsl_tx_error_report(trx, RSL_ERR_IE_CONTENT, &cch->chan_nr, NULL, msg); diff --git a/src/common/vty.c b/src/common/vty.c index 9e900b2..53a8674 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -865,8 +865,10 @@ bts->agch_queue.rejected_msgs, bts->agch_queue.agch_msgs, bts->agch_queue.pch_msgs, VTY_NEWLINE); - vty_out(vty, " CBCH backlog queue length: %u%s", - llist_length(&bts->smscb_state.queue), VTY_NEWLINE); + vty_out(vty, " CBCH backlog queue length (BASIC): %u%s", + llist_length(&bts->smscb_basic.queue), VTY_NEWLINE); + vty_out(vty, " CBCH backlog queue length (EXTENDED): %u%s", + llist_length(&bts->smscb_extended.queue), VTY_NEWLINE); vty_out(vty, " Paging: queue length %d, buffer space %d%s", paging_queue_length(bts->paging_state), paging_buffer_space(bts->paging_state), VTY_NEWLINE); -- To view, visit https://gerrit.osmocom.org/14109 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If2c6dc7da1e2185ab75fc957f8d305ad8db22429 Gerrit-Change-Number: 14109 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 18:14:40 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 18:14:40 +0000 Subject: Change in osmo-bts[master]: cbch: Keep SMSCB queue length counter In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14112 ) Change subject: cbch: Keep SMSCB queue length counter ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14112 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I72c47affeb87c9b898bc2290dc7ed113945f1805 Gerrit-Change-Number: 14112 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 21 May 2019 18:14:40 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 18:15:17 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 18:15:17 +0000 Subject: Change in osmo-bts[master]: cbch: Keep SMSCB queue length counter In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14112 ) Change subject: cbch: Keep SMSCB queue length counter ...................................................................... cbch: Keep SMSCB queue length counter This avoids having to iterate the list to count the number of elements. Change-Id: I72c47affeb87c9b898bc2290dc7ed113945f1805 --- M include/osmo-bts/gsm_data_shared.h M src/common/cbch.c M src/common/vty.c 3 files changed, 6 insertions(+), 14 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index 9378730..860c296 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -541,6 +541,7 @@ struct bts_smscb_state { struct llist_head queue; /* list of struct smscb_msg */ + int queue_len; struct smscb_msg *cur_msg; /* current SMS-CB */ struct smscb_msg *default_msg; /* default broadcast message; NULL if none */ }; diff --git a/src/common/cbch.c b/src/common/cbch.c index 6092e46..2107f11 100644 --- a/src/common/cbch.c +++ b/src/common/cbch.c @@ -183,6 +183,7 @@ case RSL_CB_CMD_TYPE_NULL: /* def_bcast is ignored as per Section 9.3.41 of 3GPP TS 48.058 */ llist_add_tail(&scm->list, &bts_ss->queue); + bts_ss->queue_len++; /* FIXME: limit queue size and optionally send CBCH LOAD Information (overflow) via RSL */ break; case RSL_CB_CMD_TYPE_DEFAULT: @@ -215,6 +216,7 @@ msg = llist_first_entry_or_null(&bts_ss->queue, struct smscb_msg, list); if (msg) { llist_del(&msg->list); + bts_ss->queue_len--; DEBUGP(DLSMS, "%s: Dequeued msg\n", __func__); return msg; } diff --git a/src/common/vty.c b/src/common/vty.c index 53a8674..fab5516 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -803,17 +803,6 @@ abis_nm_avail_name(nms->availability), VTY_NEWLINE); } -static unsigned int llist_length(struct llist_head *list) -{ - unsigned int len = 0; - struct llist_head *pos; - - llist_for_each(pos, list) - len++; - - return len; -} - static void bts_dump_vty_features(struct vty *vty, struct gsm_bts *bts) { unsigned int i; @@ -865,10 +854,10 @@ bts->agch_queue.rejected_msgs, bts->agch_queue.agch_msgs, bts->agch_queue.pch_msgs, VTY_NEWLINE); - vty_out(vty, " CBCH backlog queue length (BASIC): %u%s", - llist_length(&bts->smscb_basic.queue), VTY_NEWLINE); + vty_out(vty, " CBCH backlog queue length (BASIC): %d%s", + bts->smscb_basic.queue_len, VTY_NEWLINE); vty_out(vty, " CBCH backlog queue length (EXTENDED): %u%s", - llist_length(&bts->smscb_extended.queue), VTY_NEWLINE); + bts->smscb_extended.queue_len, VTY_NEWLINE); vty_out(vty, " Paging: queue length %d, buffer space %d%s", paging_queue_length(bts->paging_state), paging_buffer_space(bts->paging_state), VTY_NEWLINE); -- To view, visit https://gerrit.osmocom.org/14112 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I72c47affeb87c9b898bc2290dc7ed113945f1805 Gerrit-Change-Number: 14112 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 18:35:04 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 18:35:04 +0000 Subject: Change in osmo-bts[master]: manual: We now support RSL CBCH LOAD INDICATION Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14122 Change subject: manual: We now support RSL CBCH LOAD INDICATION ...................................................................... manual: We now support RSL CBCH LOAD INDICATION Change-Id: Iad7c364863b4de34bcded9f3c1e737ae0ed8e407 --- M doc/manuals/abis/rsl.adoc 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/22/14122/1 diff --git a/doc/manuals/abis/rsl.adoc b/doc/manuals/abis/rsl.adoc index 33ae26d..3c00053 100644 --- a/doc/manuals/abis/rsl.adoc +++ b/doc/manuals/abis/rsl.adoc @@ -48,6 +48,7 @@ | 8.5.5 | <> | PAGING COMMAND | <- | Received | 8.5.6 | - | IMMEDIATE ASSIGN COMMAND | <- | Received | 8.5.8 | <> | SMS BROADCAST COMMAND | <- | Received +| 8.5.9 | - | CBCH LOAD INDICATION | -> | Sent 5+<| *TRX MANAGEMENT MESSAGES* | 8.6.1 | <> | RF RESOURCE INDICATION | -> | Sent | 8.6.2 | <> | SACCH FILLING | <- | Received @@ -106,7 +107,6 @@ 2+<| *COMMON CHANNEL MANAGEMENT MESSAGES* | 8.5.4 | DELETE INDICATION | 8.5.7 | SMS BROADCAST REQUEST -| 8.5.9 | CBCH LOAD INDICATION | 8.5.10 | NOTIFICATION COMMAND 2+<| *TRX MANAGEMENT MESSAGES* | 8.6.3 | OVERLOAD -- To view, visit https://gerrit.osmocom.org/14122 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Iad7c364863b4de34bcded9f3c1e737ae0ed8e407 Gerrit-Change-Number: 14122 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 18:35:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 18:35:05 +0000 Subject: Change in osmo-bts[master]: manual: SMSCB BROADCAST COMMAND has no limitations anymore Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14123 Change subject: manual: SMSCB BROADCAST COMMAND has no limitations anymore ...................................................................... manual: SMSCB BROADCAST COMMAND has no limitations anymore We meanwhile support the SMSCB Channel Indicator IE and hence can send SMSCB on both BASIC as well as EXTENDED CBCH Change-Id: I63cc9c8c4c8c80440a61a0687e1f0cb97cc723b7 --- M doc/manuals/abis/rsl.adoc 1 file changed, 1 insertion(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/23/14123/1 diff --git a/doc/manuals/abis/rsl.adoc b/doc/manuals/abis/rsl.adoc index 3c00053..601ab8c 100644 --- a/doc/manuals/abis/rsl.adoc +++ b/doc/manuals/abis/rsl.adoc @@ -47,7 +47,7 @@ | 8.5.3 | <> | CHANNEL REQUIRED | -> | Sent | 8.5.5 | <> | PAGING COMMAND | <- | Received | 8.5.6 | - | IMMEDIATE ASSIGN COMMAND | <- | Received -| 8.5.8 | <> | SMS BROADCAST COMMAND | <- | Received +| 8.5.8 | - | SMS BROADCAST COMMAND | <- | Received | 8.5.9 | - | CBCH LOAD INDICATION | -> | Sent 5+<| *TRX MANAGEMENT MESSAGES* | 8.6.1 | <> | RF RESOURCE INDICATION | -> | Sent @@ -238,18 +238,6 @@ NOTE: If adding the identity to the paging queue fails, the BSC is not notified in any way. -[[SMS_BROADCAST_COMMAND]] -=== SMS Broadcast Command - -Conforms to 3GPP TS 08.58 ? 8.5.8, with these limitations: - -._Broadcast Command_ message IE details -[options="header",cols="10%,30%,60%"] -|=== -| TS 08.58 ? | IE Name | Handling -| 9.3.44 | SMSCB Channel Indicator | _ignored_ -|=== - [[RF_RESOURCE_INDICATION]] ==== RF Resource Indication -- To view, visit https://gerrit.osmocom.org/14123 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I63cc9c8c4c8c80440a61a0687e1f0cb97cc723b7 Gerrit-Change-Number: 14123 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 18:35:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 18:35:05 +0000 Subject: Change in osmo-bts[master]: README.md: Mention LimeSDR as SDR device Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14124 Change subject: README.md: Mention LimeSDR as SDR device ...................................................................... README.md: Mention LimeSDR as SDR device Change-Id: I0ab5b5721861d7e29c66e849d9e0f4eec2e047e6 --- M README.md 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/24/14124/1 diff --git a/README.md b/README.md index b1d7961..7e26d82 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ * sysmocom sysmoBTS * Octasic octphy * Nutaq litecell 1.5 - * software-defined radio based osmo-bts-trx (e.g. USRP B210, UmTRX) + * software-defined radio based osmo-bts-trx (e.g. USRP B210, UmTRX, LimeSDR) Homepage -------- -- To view, visit https://gerrit.osmocom.org/14124 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I0ab5b5721861d7e29c66e849d9e0f4eec2e047e6 Gerrit-Change-Number: 14124 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 18:50:27 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 21 May 2019 18:50:27 +0000 Subject: Change in osmo-bts[master]: manual: We now support RSL CBCH LOAD INDICATION In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14122 ) Change subject: manual: We now support RSL CBCH LOAD INDICATION ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14122 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iad7c364863b4de34bcded9f3c1e737ae0ed8e407 Gerrit-Change-Number: 14122 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 21 May 2019 18:50:27 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 20:04:31 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 20:04:31 +0000 Subject: Change in osmo-bts[master]: manual: We now support RSL CBCH LOAD INDICATION In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14122 ) Change subject: manual: We now support RSL CBCH LOAD INDICATION ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14122 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iad7c364863b4de34bcded9f3c1e737ae0ed8e407 Gerrit-Change-Number: 14122 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 21 May 2019 20:04:31 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 20:04:39 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 20:04:39 +0000 Subject: Change in osmo-bts[master]: manual: SMSCB BROADCAST COMMAND has no limitations anymore In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14123 ) Change subject: manual: SMSCB BROADCAST COMMAND has no limitations anymore ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14123 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I63cc9c8c4c8c80440a61a0687e1f0cb97cc723b7 Gerrit-Change-Number: 14123 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 21 May 2019 20:04:39 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 20:04:48 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 20:04:48 +0000 Subject: Change in osmo-bts[master]: README.md: Mention LimeSDR as SDR device In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14124 ) Change subject: README.md: Mention LimeSDR as SDR device ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14124 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0ab5b5721861d7e29c66e849d9e0f4eec2e047e6 Gerrit-Change-Number: 14124 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 21 May 2019 20:04:48 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 20:04:51 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 20:04:51 +0000 Subject: Change in osmo-bts[master]: manual: We now support RSL CBCH LOAD INDICATION In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14122 ) Change subject: manual: We now support RSL CBCH LOAD INDICATION ...................................................................... manual: We now support RSL CBCH LOAD INDICATION Change-Id: Iad7c364863b4de34bcded9f3c1e737ae0ed8e407 --- M doc/manuals/abis/rsl.adoc 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Vadim Yanitskiy: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/doc/manuals/abis/rsl.adoc b/doc/manuals/abis/rsl.adoc index 33ae26d..3c00053 100644 --- a/doc/manuals/abis/rsl.adoc +++ b/doc/manuals/abis/rsl.adoc @@ -48,6 +48,7 @@ | 8.5.5 | <> | PAGING COMMAND | <- | Received | 8.5.6 | - | IMMEDIATE ASSIGN COMMAND | <- | Received | 8.5.8 | <> | SMS BROADCAST COMMAND | <- | Received +| 8.5.9 | - | CBCH LOAD INDICATION | -> | Sent 5+<| *TRX MANAGEMENT MESSAGES* | 8.6.1 | <> | RF RESOURCE INDICATION | -> | Sent | 8.6.2 | <> | SACCH FILLING | <- | Received @@ -106,7 +107,6 @@ 2+<| *COMMON CHANNEL MANAGEMENT MESSAGES* | 8.5.4 | DELETE INDICATION | 8.5.7 | SMS BROADCAST REQUEST -| 8.5.9 | CBCH LOAD INDICATION | 8.5.10 | NOTIFICATION COMMAND 2+<| *TRX MANAGEMENT MESSAGES* | 8.6.3 | OVERLOAD -- To view, visit https://gerrit.osmocom.org/14122 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iad7c364863b4de34bcded9f3c1e737ae0ed8e407 Gerrit-Change-Number: 14122 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 20:04:52 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 20:04:52 +0000 Subject: Change in osmo-bts[master]: manual: SMSCB BROADCAST COMMAND has no limitations anymore In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14123 ) Change subject: manual: SMSCB BROADCAST COMMAND has no limitations anymore ...................................................................... manual: SMSCB BROADCAST COMMAND has no limitations anymore We meanwhile support the SMSCB Channel Indicator IE and hence can send SMSCB on both BASIC as well as EXTENDED CBCH Change-Id: I63cc9c8c4c8c80440a61a0687e1f0cb97cc723b7 --- M doc/manuals/abis/rsl.adoc 1 file changed, 1 insertion(+), 13 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/doc/manuals/abis/rsl.adoc b/doc/manuals/abis/rsl.adoc index 3c00053..601ab8c 100644 --- a/doc/manuals/abis/rsl.adoc +++ b/doc/manuals/abis/rsl.adoc @@ -47,7 +47,7 @@ | 8.5.3 | <> | CHANNEL REQUIRED | -> | Sent | 8.5.5 | <> | PAGING COMMAND | <- | Received | 8.5.6 | - | IMMEDIATE ASSIGN COMMAND | <- | Received -| 8.5.8 | <> | SMS BROADCAST COMMAND | <- | Received +| 8.5.8 | - | SMS BROADCAST COMMAND | <- | Received | 8.5.9 | - | CBCH LOAD INDICATION | -> | Sent 5+<| *TRX MANAGEMENT MESSAGES* | 8.6.1 | <> | RF RESOURCE INDICATION | -> | Sent @@ -238,18 +238,6 @@ NOTE: If adding the identity to the paging queue fails, the BSC is not notified in any way. -[[SMS_BROADCAST_COMMAND]] -=== SMS Broadcast Command - -Conforms to 3GPP TS 08.58 ? 8.5.8, with these limitations: - -._Broadcast Command_ message IE details -[options="header",cols="10%,30%,60%"] -|=== -| TS 08.58 ? | IE Name | Handling -| 9.3.44 | SMSCB Channel Indicator | _ignored_ -|=== - [[RF_RESOURCE_INDICATION]] ==== RF Resource Indication -- To view, visit https://gerrit.osmocom.org/14123 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I63cc9c8c4c8c80440a61a0687e1f0cb97cc723b7 Gerrit-Change-Number: 14123 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 20:04:52 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 20:04:52 +0000 Subject: Change in osmo-bts[master]: README.md: Mention LimeSDR as SDR device In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14124 ) Change subject: README.md: Mention LimeSDR as SDR device ...................................................................... README.md: Mention LimeSDR as SDR device Change-Id: I0ab5b5721861d7e29c66e849d9e0f4eec2e047e6 --- M README.md 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/README.md b/README.md index b1d7961..7e26d82 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ * sysmocom sysmoBTS * Octasic octphy * Nutaq litecell 1.5 - * software-defined radio based osmo-bts-trx (e.g. USRP B210, UmTRX) + * software-defined radio based osmo-bts-trx (e.g. USRP B210, UmTRX, LimeSDR) Homepage -------- -- To view, visit https://gerrit.osmocom.org/14124 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I0ab5b5721861d7e29c66e849d9e0f4eec2e047e6 Gerrit-Change-Number: 14124 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 21:31:55 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 21:31:55 +0000 Subject: Change in osmo-bsc[master]: abis_rsl: Add support for extended CBCH to rsl_sms_cb_command() Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14125 Change subject: abis_rsl: Add support for extended CBCH to rsl_sms_cb_command() ...................................................................... abis_rsl: Add support for extended CBCH to rsl_sms_cb_command() Now that OsmoBTS understands about extended CBCH, let's at least update the BSC side function to allow for other code to generate such messages. Change-Id: I77a16b75ce311d63fb022475c8ff25fbbcee7f55 --- M include/osmocom/bsc/abis_rsl.h M src/osmo-bsc/abis_rsl.c M src/osmo-bsc/bsc_vty.c 3 files changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/25/14125/1 diff --git a/include/osmocom/bsc/abis_rsl.h b/include/osmocom/bsc/abis_rsl.h index 098d2e6..ec63090 100644 --- a/include/osmocom/bsc/abis_rsl.h +++ b/include/osmocom/bsc/abis_rsl.h @@ -90,7 +90,7 @@ /* SMSCB functionality */ int rsl_sms_cb_command(struct gsm_bts *bts, uint8_t chan_number, struct rsl_ie_cb_cmd_type cb_command, - const uint8_t *data, int len); + bool use_extended_cbch, const uint8_t *data, int len); /* some Nokia specific stuff */ int rsl_nokia_si_begin(struct gsm_bts_trx *trx); diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index bc07457..5a1c8ff 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -2172,7 +2172,7 @@ int rsl_sms_cb_command(struct gsm_bts *bts, uint8_t chan_number, struct rsl_ie_cb_cmd_type cb_command, - const uint8_t *data, int len) + bool use_extended_cbch, const uint8_t *data, int len) { struct abis_rsl_dchan_hdr *dh; struct msgb *cb_cmd; @@ -2188,6 +2188,8 @@ msgb_tv_put(cb_cmd, RSL_IE_CB_CMD_TYPE, *(uint8_t*)&cb_command); msgb_tlv_put(cb_cmd, RSL_IE_SMSCB_MSG, len, data); + if (use_extended_cbch) + msgb_tv_put(cb_cmd, RSL_IE_SMSCB_CHAN_INDICATOR, 0x01); cb_cmd->dst = bts->c0->rsl_link; diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index dc97d12..88c845b 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -4582,7 +4582,7 @@ return CMD_WARNING; } - rsl_sms_cb_command(bts, RSL_CHAN_SDCCH4_ACCH, cb_cmd, buf, rc); + rsl_sms_cb_command(bts, RSL_CHAN_SDCCH4_ACCH, cb_cmd, false, buf, rc); return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/14125 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I77a16b75ce311d63fb022475c8ff25fbbcee7f55 Gerrit-Change-Number: 14125 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 21:31:56 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 21:31:56 +0000 Subject: Change in osmo-bsc[master]: abis_rsl: Avoid "nimplemented" log message for every CBCH LOAD IND Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14126 Change subject: abis_rsl: Avoid "nimplemented" log message for every CBCH LOAD IND ...................................................................... abis_rsl: Avoid "nimplemented" log message for every CBCH LOAD IND Now that OsmoBTS is generating CBCH LOAD IND messages, let's avoid spamming the BSC log with notices abou receiving this unimplemented message. Change-Id: Ida5045ec7a18c1062a3b80a381db52d5c98e9966 --- M src/osmo-bsc/abis_rsl.c 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/26/14126/1 diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 5a1c8ff..51dc001 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -1532,11 +1532,13 @@ break; case RSL_MT_DELETE_IND: /* CCCH overloaded, IMM_ASSIGN was dropped */ - case RSL_MT_CBCH_LOAD_IND: - /* current load on the CBCH */ LOGP(DRSL, LOGL_NOTICE, "Unimplemented Abis RSL TRX message " "type %s\n", rsl_msg_name(rslh->c.msg_type)); break; + case RSL_MT_CBCH_LOAD_IND: + /* current load on the CBCH */ + /* FIXME: handle this. Ignore for now */ + break; case RSL_MT_ERICSSON_IMM_ASS_SENT: rc = rsl_rx_ericsson_imm_assign_sent(msg); break; -- To view, visit https://gerrit.osmocom.org/14126 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ida5045ec7a18c1062a3b80a381db52d5c98e9966 Gerrit-Change-Number: 14126 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 21 21:31:56 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 21 May 2019 21:31:56 +0000 Subject: Change in osmo-bsc[master]: abis_rs: Fix log message about unimplemented common channel msg Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14127 Change subject: abis_rs: Fix log message about unimplemented common channel msg ...................................................................... abis_rs: Fix log message about unimplemented common channel msg The log is about an unimplementedCChan message, not a TRX message. Change-Id: I52bcf1fd79417ee5bfb054456a0b427e174114dd --- M src/osmo-bsc/abis_rsl.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/27/14127/1 diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 51dc001..39fae50 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -1532,7 +1532,7 @@ break; case RSL_MT_DELETE_IND: /* CCCH overloaded, IMM_ASSIGN was dropped */ - LOGP(DRSL, LOGL_NOTICE, "Unimplemented Abis RSL TRX message " + LOGP(DRSL, LOGL_NOTICE, "Unimplemented Abis RSL CChan message " "type %s\n", rsl_msg_name(rslh->c.msg_type)); break; case RSL_MT_CBCH_LOAD_IND: -- To view, visit https://gerrit.osmocom.org/14127 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I52bcf1fd79417ee5bfb054456a0b427e174114dd Gerrit-Change-Number: 14127 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Wed May 22 02:48:18 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 22 May 2019 02:48:18 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in Debian_Unstable/x86_64 In-Reply-To: References: Message-ID: <5ce4b87b5c626_58803905f813486fa@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_Unstable/x86_64 Package network:osmocom:nightly/openbsc failed to build in Debian_Unstable/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 165s] | #define HAVE_MEMORY_H 1 [ 165s] | #define HAVE_STRINGS_H 1 [ 165s] | #define HAVE_INTTYPES_H 1 [ 165s] | #define HAVE_STDINT_H 1 [ 165s] | #define HAVE_UNISTD_H 1 [ 165s] | #define HAVE_DLFCN_H 1 [ 165s] | #define LT_OBJDIR ".libs/" [ 165s] | #define BUILD_SMPP 1 [ 165s] | #define STDC_HEADERS 1 [ 165s] | #define HAVE_DBI_DBD_H 1 [ 165s] | #define HAVE_PCAP_PCAP_H 1 [ 165s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 165s] | [ 165s] | configure: exit 0 [ 165s] [ 165s] make[1]: *** [debian/rules:30: override_dh_auto_test] Error 1 [ 165s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 165s] make: *** [debian/rules:13: build] Error 2 [ 165s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 165s] [ 165s] lamb18 failed "build openbsc_1.2.0.20190522.dsc" at Wed May 22 02:48:03 UTC 2019. [ 165s] [ 165s] ### VM INTERACTION START ### [ 168s] [ 153.988394] sysrq: SysRq : Power Off [ 168s] [ 153.994549] reboot: Power down [ 168s] ### VM INTERACTION END ### [ 168s] [ 168s] lamb18 failed "build openbsc_1.2.0.20190522.dsc" at Wed May 22 02:48:07 UTC 2019. [ 168s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed May 22 02:49:10 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 22 May 2019 02:49:10 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in xUbuntu_19.04/x86_64 In-Reply-To: References: Message-ID: <5ce4b8b4d4b01_58803905f813488e@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_19.04/x86_64 Package network:osmocom:nightly/openbsc failed to build in xUbuntu_19.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 186s] | configure: exit 0 [ 186s] [ 186s] # -*- compilation -*- [ 186s] 4. testsuite.at:23: testing db ... [ 186s] ./testsuite.at:28: $abs_top_builddir/tests/db/db_test [ 186s] --- expout 2019-05-22 02:48:51.474384986 +0000 [ 186s] +++ /usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/4/stdout 2019-05-22 02:48:51.690384993 +0000 [ 186s] @@ -1,4 +1,6 @@ [ 186s] Testing subscriber database code. [ 186s] DB: Database initialized. [ 186s] +no tables in statement ! [ 186s] +no tables in statement ! [ 186s] DB: Database prepared. [ 186s] Done [ 186s] 4. testsuite.at:23: 4. db (testsuite.at:23): FAILED (testsuite.at:28) [ 186s] make[1]: *** [debian/rules:30: override_dh_auto_test] Error 1 [ 186s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 186s] make: *** [debian/rules:13: build] Error 2 [ 186s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 186s] [ 186s] cloud114 failed "build openbsc_1.2.0.20190522.dsc" at Wed May 22 02:48:53 UTC 2019. [ 186s] [ 186s] ### VM INTERACTION START ### [ 189s] [ 167.752255] sysrq: SysRq : Power Off [ 189s] [ 167.766026] reboot: Power down [ 192s] ### VM INTERACTION END ### [ 192s] [ 192s] cloud114 failed "build openbsc_1.2.0.20190522.dsc" at Wed May 22 02:49:00 UTC 2019. [ 192s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed May 22 02:50:35 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 22 May 2019 02:50:35 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in Debian_Testing/x86_64 In-Reply-To: References: Message-ID: <5ce4b90e7a1bb_58803905f81349261@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_Testing/x86_64 Package network:osmocom:nightly/openbsc failed to build in Debian_Testing/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 163s] | configure: exit 0 [ 163s] [ 163s] # -*- compilation -*- [ 163s] 4. testsuite.at:23: testing db ... [ 163s] ./testsuite.at:28: $abs_top_builddir/tests/db/db_test [ 163s] --- expout 2019-05-22 02:50:13.544000000 +0000 [ 163s] +++ /usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/4/stdout 2019-05-22 02:50:13.756000000 +0000 [ 163s] @@ -1,4 +1,6 @@ [ 163s] Testing subscriber database code. [ 163s] DB: Database initialized. [ 163s] +no tables in statement ! [ 163s] +no tables in statement ! [ 163s] DB: Database prepared. [ 163s] Done [ 163s] 4. testsuite.at:23: 4. db (testsuite.at:23): FAILED (testsuite.at:28) [ 163s] make[1]: *** [debian/rules:30: override_dh_auto_test] Error 1 [ 163s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 163s] make: *** [debian/rules:13: build] Error 2 [ 163s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 163s] [ 163s] lamb20 failed "build openbsc_1.2.0.20190522.dsc" at Wed May 22 02:50:14 UTC 2019. [ 163s] [ 163s] ### VM INTERACTION START ### [ 166s] [ 152.540358] sysrq: SysRq : Power Off [ 166s] [ 152.548940] reboot: Power down [ 166s] ### VM INTERACTION END ### [ 166s] [ 166s] lamb20 failed "build openbsc_1.2.0.20190522.dsc" at Wed May 22 02:50:18 UTC 2019. [ 166s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Wed May 22 09:15:40 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 22 May 2019 09:15:40 +0000 Subject: Change in docker-playground[master]: Fix git checkout for branches and commits Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/14128 Change subject: Fix git checkout for branches and commits ...................................................................... Fix git checkout for branches and commits Replace 'git checkout -f -B $BRANCH origin/$BRANCH && \' in all Dockerfiles that accept branch variables ($OSMO_TTCN3_BRANCH, $OSMO_MGW_BRANCH, ...) with the following: git checkout $BRANCH && \ (git symbolic-ref -q HEAD && git reset --hard origin/$BRANCH || exit 1); \ This allows using branch names and commit hashes in the $BRANCH variables. Using commits is needed for the bisect script added in [1]. The second line ("(git symbolic...") checks if we are in detached HEAD state after the checkout, and if we are not, pulls in all new commits from origin/$BRANCH. Note that it ends in ';' instead of '&&', because the command in the next line should be executed even if "git symbolic-ref" does not exit with 0 (detached HEAD state). Here is an example, to illustrate that the new command does the right thing. Clone a repository and be 50 commits behind origin/master: $ git clone "https://git.osmocom.org/osmo-mgw" $ cd osmo-mgw $ git reset --hard origin/master~50 With BRANCH="master": $ git checkout master && \ (git symbolic-ref -q HEAD && git reset --hard origin/master || exit 1); \ echo "done" Already on 'master' ... done $ git status Your branch is up-to-date with 'origin/master'. With BRANCH="85978d": $ git checkout 85978d && \ (git symbolic-ref -q HEAD && git reset --hard origin/85978d || exit 1); \ echo "done" Note: checking out '85978d'. ... done $ git status HEAD detached at 85978dad Related previous changes: * [2] made it work for commit hashes, but broke using branch names other than master, and pulling in new commits from master * [3] made branches other than master work again, but did not fix pulling in new commits from master * [4] reverted [3] and the git checkout related part from [2] [1] Change-Id: I11f7e61a9b30d58a0fdfcaf77dde447806bf661f [2] Change-Id: If3bc5fae07cf63c4fef68306be4c4328660bc869 [3] Change-Id: I2ff745c8d19b777d876170d5717c082ceb68a1f3 [4] Change-Id: Ie6da0f9ea96f11407e38545a6b3cf22ef9cadc25 Related: OS#4015 Change-Id: I4004980baf0b7d6096702b6f3067ccbdb369a28c --- M gr-gsm-master/Dockerfile M osmo-bsc-master/Dockerfile M osmo-bts-master/Dockerfile M osmo-ggsn-master/Dockerfile M osmo-hlr-master/Dockerfile M osmo-hnbgw-master/Dockerfile M osmo-mgw-master/Dockerfile M osmo-msc-master/Dockerfile M osmo-nitb-master/Dockerfile M osmo-pcu-master/Dockerfile M osmo-sgsn-master/Dockerfile M osmo-sip-master/Dockerfile M osmo-stp-master/Dockerfile M osmocom-bb-host-master/Dockerfile M ttcn3-bsc-test/Dockerfile M ttcn3-bscnat-test/Dockerfile M ttcn3-bts-test/Dockerfile M ttcn3-ggsn-test/Dockerfile M ttcn3-hlr-test/Dockerfile M ttcn3-mgw-test/Dockerfile M ttcn3-msc-test/Dockerfile M ttcn3-nitb-sysinfo/Dockerfile M ttcn3-pcu-test/Dockerfile M ttcn3-sgsn-test/Dockerfile M ttcn3-sip-test/Dockerfile 25 files changed, 52 insertions(+), 26 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/28/14128/1 diff --git a/gr-gsm-master/Dockerfile b/gr-gsm-master/Dockerfile index 03cf427..bb5012b 100644 --- a/gr-gsm-master/Dockerfile +++ b/gr-gsm-master/Dockerfile @@ -50,7 +50,8 @@ ADD http://git.osmocom.org/libosmocore/patch?h=$LIBOSMOCORE_BRANCH /tmp/commit-libosmocore RUN cd libosmocore \ - && git fetch && git checkout -f -B $LIBOSMOCORE_BRANCH origin/$LIBOSMOCORE_BRANCH \ + && git fetch && git checkout $LIBOSMOCORE_BRANCH \ + (git symbolic-ref -q HEAD && git reset --hard origin/$LIBOSMOCORE_BRANCH || exit 1); \ && git rev-parse --abbrev-ref HEAD && git rev-parse HEAD \ && autoreconf -fi \ && ./configure \ @@ -65,7 +66,8 @@ ADD http://git.osmocom.org/gr-gsm/patch?h=$GR_GSM_BRANCH /tmp/commit-gr-gsm RUN cd gr-gsm \ - && git fetch && git checkout -f -B $GR_GSM_BRANCH origin/$GR_GSM_BRANCH \ + && git fetch && git checkout $GR_GSM_BRANCH \ + (git symbolic-ref -q HEAD && git reset --hard origin/$GR_GSM_BRANCH || exit 1); \ && git rev-parse HEAD \ && mkdir build/ \ && cd build/ \ diff --git a/osmo-bsc-master/Dockerfile b/osmo-bsc-master/Dockerfile index bcd0573..cb80c4a 100644 --- a/osmo-bsc-master/Dockerfile +++ b/osmo-bsc-master/Dockerfile @@ -32,7 +32,8 @@ ADD http://git.osmocom.org/osmo-bsc/patch?h=$OSMO_BSC_BRANCH /tmp/commit-osmo-bsc RUN cd osmo-bsc && \ - git fetch && git checkout -f -B $OSMO_BSC_BRANCH $OSMO_BSC_BRANCH && \ + git fetch && git checkout $OSMO_BSC_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_BSC_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-bts-master/Dockerfile b/osmo-bts-master/Dockerfile index f4ddf3a..a7f1145 100644 --- a/osmo-bts-master/Dockerfile +++ b/osmo-bts-master/Dockerfile @@ -33,7 +33,8 @@ ADD http://git.osmocom.org/osmo-bts/patch?h=$OSMO_BTS_BRANCH /tmp/commit-osmo-bts RUN cd osmo-bts && \ - git fetch && git checkout -f -B $OSMO_BTS_BRANCH $OSMO_BTS_BRANCH && \ + git fetch && git checkout $OSMO_BTS_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_BTS_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-trx && \ diff --git a/osmo-ggsn-master/Dockerfile b/osmo-ggsn-master/Dockerfile index cf84d02..f27bef9 100644 --- a/osmo-ggsn-master/Dockerfile +++ b/osmo-ggsn-master/Dockerfile @@ -25,7 +25,8 @@ RUN git clone git://git.osmocom.org/osmo-ggsn.git ADD http://git.osmocom.org/osmo-ggsn/patch/?h=$OSMO_GGSN_BRANCH /tmp/commit RUN cd osmo-ggsn && \ - git fetch && git checkout -f -B $OSMO_GGSN_BRANCH $OSMO_GGSN_BRANCH && \ + git fetch && git checkout $OSMO_GGSN_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_GGSN_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-hlr-master/Dockerfile b/osmo-hlr-master/Dockerfile index 2da7c08..e9f9398 100644 --- a/osmo-hlr-master/Dockerfile +++ b/osmo-hlr-master/Dockerfile @@ -30,7 +30,8 @@ ADD http://git.osmocom.org/osmo-hlr/patch?h=$OSMO_HLR_BRANCH /tmp/commit-osmo-hlr RUN cd osmo-hlr && \ - git fetch && git checkout -f -B $OSMO_HLR_BRANCH $OSMO_HLR_BRANCH && \ + git fetch && git checkout $OSMO_HLR_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_HLR_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-hnbgw-master/Dockerfile b/osmo-hnbgw-master/Dockerfile index c89502b..af5bc91 100644 --- a/osmo-hnbgw-master/Dockerfile +++ b/osmo-hnbgw-master/Dockerfile @@ -30,7 +30,8 @@ ADD http://git.osmocom.org/osmo-iuh/patch?h=$OSMO_IUH_BRANCH /tmp/commit-osmo-mgw RUN cd osmo-iuh && \ - git fetch && git checkout -f -B $OSMO_IUH_BRANCH $OSMO_IUH_BRANCH && \ + git fetch && git checkout $OSMO_IUH_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_IUH_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-mgw-master/Dockerfile b/osmo-mgw-master/Dockerfile index 4c6d32a..3df37c1 100644 --- a/osmo-mgw-master/Dockerfile +++ b/osmo-mgw-master/Dockerfile @@ -30,7 +30,8 @@ RUN cd osmo-mgw && \ - git fetch && git checkout -f -B $OSMO_MGW_BRANCH $OSMO_MGW_BRANCH && \ + git fetch && git checkout $OSMO_MGW_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_MGW_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-msc-master/Dockerfile b/osmo-msc-master/Dockerfile index c8cfd62..21c7eda 100644 --- a/osmo-msc-master/Dockerfile +++ b/osmo-msc-master/Dockerfile @@ -37,7 +37,8 @@ ADD http://git.osmocom.org/osmo-msc/patch?h=$OSMO_MSC_BRANCH /tmp/commit-osmo-msc RUN cd osmo-msc && \ - git fetch && git checkout -f -B $OSMO_MSC_BRANCH $OSMO_MSC_BRANCH && \ + git fetch && git checkout $OSMO_MSC_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_MSC_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-smpp --enable-iu && \ diff --git a/osmo-nitb-master/Dockerfile b/osmo-nitb-master/Dockerfile index d3774da..c7fb008 100644 --- a/osmo-nitb-master/Dockerfile +++ b/osmo-nitb-master/Dockerfile @@ -31,7 +31,8 @@ ADD http://git.osmocom.org/openbsc/patch?h=$OSMO_NITB_BRANCH /tmp/commit-openbsc RUN cd openbsc/openbsc && \ - git fetch && git checkout -f -B $OSMO_NITB_BRANCH $OSMO_NITB_BRANCH && \ + git fetch && git checkout $OSMO_NITB_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_NITB_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-nat --enable-osmo-bsc --enable-smpp && \ diff --git a/osmo-pcu-master/Dockerfile b/osmo-pcu-master/Dockerfile index 7a294a4..01f7755 100644 --- a/osmo-pcu-master/Dockerfile +++ b/osmo-pcu-master/Dockerfile @@ -28,7 +28,8 @@ ADD http://git.osmocom.org/osmo-pcu/patch?h=$OSMO_PCU_BRANCH /tmp/commit-osmo-pcu RUN cd osmo-pcu && \ - git fetch && git checkout -f -B $OSMO_PCU_BRANCH $OSMO_PCU_BRANCH && \ + git fetch && git checkout $OSMO_PCU_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_PCU_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-trx && \ diff --git a/osmo-sgsn-master/Dockerfile b/osmo-sgsn-master/Dockerfile index c373564..4257141 100644 --- a/osmo-sgsn-master/Dockerfile +++ b/osmo-sgsn-master/Dockerfile @@ -32,7 +32,8 @@ ADD http://git.osmocom.org/osmo-sgsn/patch?h=$OSMO_SGSN_BRANCH /tmp/commit RUN cd osmo-sgsn && \ - git fetch && git checkout -f -B $OSMO_SGSN_BRANCH $OSMO_SGSN_BRANCH && \ + git fetch && git checkout $OSMO_SGSN_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_SGSN_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-sip-master/Dockerfile b/osmo-sip-master/Dockerfile index 258b1fe..4a9d49b 100644 --- a/osmo-sip-master/Dockerfile +++ b/osmo-sip-master/Dockerfile @@ -36,7 +36,8 @@ ADD http://git.osmocom.org/osmo-sip-connector/patch?h=$OSMO_SIP_BRANCH /tmp/commit-osmo-sip-connector RUN cd osmo-sip-connector && \ - git fetch && git checkout -f -B $OSMO_SIP_BRANCH $OSMO_SIP_BRANCH && \ + git fetch && git checkout $OSMO_SIP_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_SIP_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-smpp --enable-iu && \ diff --git a/osmo-stp-master/Dockerfile b/osmo-stp-master/Dockerfile index 0a62ed7..fa49085 100644 --- a/osmo-stp-master/Dockerfile +++ b/osmo-stp-master/Dockerfile @@ -26,7 +26,8 @@ RUN git clone git://git.osmocom.org/libosmo-sccp.git ADD http://git.osmocom.org/libosmo-sccp/patch?h=$OSMO_STP_BRANCH /tmp/commit RUN cd libosmo-sccp && \ - git fetch && git checkout -f -B $OSMO_STP_BRANCH $OSMO_STP_BRANCH && \ + git fetch && git checkout $OSMO_STP_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_STP_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmocom-bb-host-master/Dockerfile b/osmocom-bb-host-master/Dockerfile index 260f381..6ec0c9a 100644 --- a/osmocom-bb-host-master/Dockerfile +++ b/osmocom-bb-host-master/Dockerfile @@ -25,7 +25,8 @@ ADD http://git.osmocom.org/osmocom-bb/patch?h=$OSMO_BB_BRANCH /tmp/commit RUN cd osmocom-bb && \ - git fetch && git checkout -f -B $OSMO_BB_BRANCH origin/$OSMO_BB_BRANCH && \ + git fetch && git checkout $OSMO_BB_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_BB_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD RUN cd osmocom-bb/src/host/trxcon && \ diff --git a/ttcn3-bsc-test/Dockerfile b/ttcn3-bsc-test/Dockerfile index 546f33b..9288469 100644 --- a/ttcn3-bsc-test/Dockerfile +++ b/ttcn3-bsc-test/Dockerfile @@ -16,7 +16,8 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout $OSMO_TTCN3_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make bsc diff --git a/ttcn3-bscnat-test/Dockerfile b/ttcn3-bscnat-test/Dockerfile index 047f21c..f927513 100644 --- a/ttcn3-bscnat-test/Dockerfile +++ b/ttcn3-bscnat-test/Dockerfile @@ -16,7 +16,8 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout $OSMO_TTCN3_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make bsc-nat diff --git a/ttcn3-bts-test/Dockerfile b/ttcn3-bts-test/Dockerfile index d8969bb..29185c8 100644 --- a/ttcn3-bts-test/Dockerfile +++ b/ttcn3-bts-test/Dockerfile @@ -16,7 +16,8 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout $OSMO_TTCN3_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make deps-update bts diff --git a/ttcn3-ggsn-test/Dockerfile b/ttcn3-ggsn-test/Dockerfile index 6d6aff6..7e88f28 100644 --- a/ttcn3-ggsn-test/Dockerfile +++ b/ttcn3-ggsn-test/Dockerfile @@ -12,7 +12,8 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout $OSMO_TTCN3_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make ggsn_tests diff --git a/ttcn3-hlr-test/Dockerfile b/ttcn3-hlr-test/Dockerfile index 752d442..0233035 100644 --- a/ttcn3-hlr-test/Dockerfile +++ b/ttcn3-hlr-test/Dockerfile @@ -16,7 +16,8 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout $OSMO_TTCN3_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make deps-update hlr diff --git a/ttcn3-mgw-test/Dockerfile b/ttcn3-mgw-test/Dockerfile index bf13d12..33183d0 100644 --- a/ttcn3-mgw-test/Dockerfile +++ b/ttcn3-mgw-test/Dockerfile @@ -13,7 +13,8 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout $OSMO_TTCN3_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make mgw diff --git a/ttcn3-msc-test/Dockerfile b/ttcn3-msc-test/Dockerfile index 53aa393..ee7e5f0 100644 --- a/ttcn3-msc-test/Dockerfile +++ b/ttcn3-msc-test/Dockerfile @@ -16,7 +16,8 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout $OSMO_TTCN3_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make msc diff --git a/ttcn3-nitb-sysinfo/Dockerfile b/ttcn3-nitb-sysinfo/Dockerfile index d0ec87a..76fd630 100644 --- a/ttcn3-nitb-sysinfo/Dockerfile +++ b/ttcn3-nitb-sysinfo/Dockerfile @@ -13,7 +13,8 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout $OSMO_TTCN3_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make sysinfo diff --git a/ttcn3-pcu-test/Dockerfile b/ttcn3-pcu-test/Dockerfile index fbb64f5..b78fee2 100644 --- a/ttcn3-pcu-test/Dockerfile +++ b/ttcn3-pcu-test/Dockerfile @@ -16,7 +16,8 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout $OSMO_TTCN3_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make pcu diff --git a/ttcn3-sgsn-test/Dockerfile b/ttcn3-sgsn-test/Dockerfile index 3049d3f..42a53f2 100644 --- a/ttcn3-sgsn-test/Dockerfile +++ b/ttcn3-sgsn-test/Dockerfile @@ -16,7 +16,8 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout $OSMO_TTCN3_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make sgsn diff --git a/ttcn3-sip-test/Dockerfile b/ttcn3-sip-test/Dockerfile index eead347..9f1a6df 100644 --- a/ttcn3-sip-test/Dockerfile +++ b/ttcn3-sip-test/Dockerfile @@ -16,7 +16,8 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout $OSMO_TTCN3_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make sip -- To view, visit https://gerrit.osmocom.org/14128 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I4004980baf0b7d6096702b6f3067ccbdb369a28c Gerrit-Change-Number: 14128 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 09:20:23 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 22 May 2019 09:20:23 +0000 Subject: Change in docker-playground[master]: Fix git checkout for branches and commits In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/14128 ) Change subject: Fix git checkout for branches and commits ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/14128 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4004980baf0b7d6096702b6f3067ccbdb369a28c Gerrit-Change-Number: 14128 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Comment-Date: Wed, 22 May 2019 09:20:23 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 09:24:50 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 22 May 2019 09:24:50 +0000 Subject: Change in docker-playground[master]: Fix git checkout for branches and commits In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/14128 ) Change subject: Fix git checkout for branches and commits ...................................................................... Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/14128 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4004980baf0b7d6096702b6f3067ccbdb369a28c Gerrit-Change-Number: 14128 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 22 May 2019 09:24:50 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 09:36:20 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 22 May 2019 09:36:20 +0000 Subject: Change in osmo-bsc[master]: abis_rs: Fix log message about unimplemented common channel msg In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/14127 ) Change subject: abis_rs: Fix log message about unimplemented common channel msg ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14127 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I52bcf1fd79417ee5bfb054456a0b427e174114dd Gerrit-Change-Number: 14127 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 22 May 2019 09:36:20 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 09:38:48 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 22 May 2019 09:38:48 +0000 Subject: Change in osmo-bsc[master]: abis_rsl: Avoid "nimplemented" log message for every CBCH LOAD IND In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/14126 ) Change subject: abis_rsl: Avoid "nimplemented" log message for every CBCH LOAD IND ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/14126/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/#/c/14126/1//COMMIT_MSG at 10 PS1, Line 10: abou about -- To view, visit https://gerrit.osmocom.org/14126 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ida5045ec7a18c1062a3b80a381db52d5c98e9966 Gerrit-Change-Number: 14126 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 22 May 2019 09:38:48 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 09:41:30 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 22 May 2019 09:41:30 +0000 Subject: Change in osmo-bsc[master]: abis_rsl: Add support for extended CBCH to rsl_sms_cb_command() In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/14125 ) Change subject: abis_rsl: Add support for extended CBCH to rsl_sms_cb_command() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14125 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I77a16b75ce311d63fb022475c8ff25fbbcee7f55 Gerrit-Change-Number: 14125 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 22 May 2019 09:41:30 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 09:42:12 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 22 May 2019 09:42:12 +0000 Subject: Change in osmo-bsc[master]: abis_rsl: Avoid "nimplemented" log message for every CBCH LOAD IND In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/14126 ) Change subject: abis_rsl: Avoid "nimplemented" log message for every CBCH LOAD IND ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/14126/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/#/c/14126/1//COMMIT_MSG at 7 PS1, Line 7: abis_rsl: Avoid "nimplemented" log message for every CBCH LOAD IND unimplemented -- To view, visit https://gerrit.osmocom.org/14126 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ida5045ec7a18c1062a3b80a381db52d5c98e9966 Gerrit-Change-Number: 14126 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 22 May 2019 09:42:12 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 09:51:50 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 22 May 2019 09:51:50 +0000 Subject: Change in osmo-bts[master]: cbch: Improve logging verbosity: Always indicate BASIC/EXTD CBCH In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/14117 ) Change subject: cbch: Improve logging verbosity: Always indicate BASIC/EXTD CBCH ...................................................................... Patch Set 2: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/14117/2/src/common/cbch.c File src/common/cbch.c: https://gerrit.osmocom.org/#/c/14117/2/src/common/cbch.c at 225 PS2, Line 225: chan_name, get_value_string(rsl_cb_cmd_names, cmd_type.command)); (This adds a new log message, consider mentioning that in the commit message?) -- To view, visit https://gerrit.osmocom.org/14117 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6c8f9fc6215b616371e46c1f4ca4e44b8c7ac096 Gerrit-Change-Number: 14117 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 22 May 2019 09:51:50 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 10:08:46 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 22 May 2019 10:08:46 +0000 Subject: Change in osmo-bts[master]: Use LOGPLCHAN whenever possible In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/14111 ) Change subject: Use LOGPLCHAN whenever possible ...................................................................... Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14111 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6913ac8fb543811126b85a54118333155c03bc03 Gerrit-Change-Number: 14111 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 22 May 2019 10:08:46 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 10:19:09 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 22 May 2019 10:19:09 +0000 Subject: Change in docker-playground[master]: Fix git checkout for branches and commits In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14128 ) Change subject: Fix git checkout for branches and commits ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14128 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4004980baf0b7d6096702b6f3067ccbdb369a28c Gerrit-Change-Number: 14128 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 22 May 2019 10:19:09 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 11:37:33 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 22 May 2019 11:37:33 +0000 Subject: Change in osmo-bts[master]: cbch: Add counters; queue length limits and CBCH LOAD reporting In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/14113 ) Change subject: cbch: Add counters; queue length limits and CBCH LOAD reporting ...................................................................... Patch Set 3: (5 comments) Mostly looking good, I've commented on some minor things. https://gerrit.osmocom.org/#/c/14113/3//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/#/c/14113/3//COMMIT_MSG at 10 PS3, Line 10: tab tap? https://gerrit.osmocom.org/#/c/14113/3//COMMIT_MSG at 11 PS3, Line 11: SSMCB SMSCB? https://gerrit.osmocom.org/#/c/14113/3/src/common/bts.c File src/common/bts.c: https://gerrit.osmocom.org/#/c/14113/3/src/common/bts.c at 110 PS3, Line 110: queeud queued https://gerrit.osmocom.org/#/c/14113/3/src/common/rsl.c File src/common/rsl.c: https://gerrit.osmocom.org/#/c/14113/3/src/common/rsl.c at 1654 PS3, Line 1654: (overflow & 1) Isn't the result the same as directly using "overflow", as it is a boolean? https://gerrit.osmocom.org/#/c/14113/3/src/common/vty.c File src/common/vty.c: https://gerrit.osmocom.org/#/c/14113/3/src/common/vty.c at 695 PS3, Line 695: "Maximum queue length for SMSCB (CBCH) queue. In count of messages/pages") I'd mention the default value here, same with the options below. -- To view, visit https://gerrit.osmocom.org/14113 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I7068c7937a60a900c40439115bb84dc3ee0d061f Gerrit-Change-Number: 14113 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: osmith Gerrit-Comment-Date: Wed, 22 May 2019 11:37:33 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 12:32:23 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 22 May 2019 12:32:23 +0000 Subject: Change in docker-playground[master]: Fix git checkout for branches and commits In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14128 ) Change subject: Fix git checkout for branches and commits ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14128 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4004980baf0b7d6096702b6f3067ccbdb369a28c Gerrit-Change-Number: 14128 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 22 May 2019 12:32:23 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 12:32:26 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 22 May 2019 12:32:26 +0000 Subject: Change in docker-playground[master]: Fix git checkout for branches and commits In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14128 ) Change subject: Fix git checkout for branches and commits ...................................................................... Fix git checkout for branches and commits Replace 'git checkout -f -B $BRANCH origin/$BRANCH && \' in all Dockerfiles that accept branch variables ($OSMO_TTCN3_BRANCH, $OSMO_MGW_BRANCH, ...) with the following: git checkout $BRANCH && \ (git symbolic-ref -q HEAD && git reset --hard origin/$BRANCH || exit 1); \ This allows using branch names and commit hashes in the $BRANCH variables. Using commits is needed for the bisect script added in [1]. The second line ("(git symbolic...") checks if we are in detached HEAD state after the checkout, and if we are not, pulls in all new commits from origin/$BRANCH. Note that it ends in ';' instead of '&&', because the command in the next line should be executed even if "git symbolic-ref" does not exit with 0 (detached HEAD state). Here is an example, to illustrate that the new command does the right thing. Clone a repository and be 50 commits behind origin/master: $ git clone "https://git.osmocom.org/osmo-mgw" $ cd osmo-mgw $ git reset --hard origin/master~50 With BRANCH="master": $ git checkout master && \ (git symbolic-ref -q HEAD && git reset --hard origin/master || exit 1); \ echo "done" Already on 'master' ... done $ git status Your branch is up-to-date with 'origin/master'. With BRANCH="85978d": $ git checkout 85978d && \ (git symbolic-ref -q HEAD && git reset --hard origin/85978d || exit 1); \ echo "done" Note: checking out '85978d'. ... done $ git status HEAD detached at 85978dad Related previous changes: * [2] made it work for commit hashes, but broke using branch names other than master, and pulling in new commits from master * [3] made branches other than master work again, but did not fix pulling in new commits from master * [4] reverted [3] and the git checkout related part from [2] [1] Change-Id: I11f7e61a9b30d58a0fdfcaf77dde447806bf661f [2] Change-Id: If3bc5fae07cf63c4fef68306be4c4328660bc869 [3] Change-Id: I2ff745c8d19b777d876170d5717c082ceb68a1f3 [4] Change-Id: Ie6da0f9ea96f11407e38545a6b3cf22ef9cadc25 Related: OS#4015 Change-Id: I4004980baf0b7d6096702b6f3067ccbdb369a28c --- M osmo-bsc-master/Dockerfile M osmo-bts-master/Dockerfile M osmo-ggsn-master/Dockerfile M osmo-hlr-master/Dockerfile M osmo-hnbgw-master/Dockerfile M osmo-mgw-master/Dockerfile M osmo-msc-master/Dockerfile M osmo-nitb-master/Dockerfile M osmo-pcu-master/Dockerfile M osmo-sgsn-master/Dockerfile M osmo-sip-master/Dockerfile M osmo-stp-master/Dockerfile M osmocom-bb-host-master/Dockerfile M ttcn3-bsc-test/Dockerfile M ttcn3-bscnat-test/Dockerfile M ttcn3-bts-test/Dockerfile M ttcn3-ggsn-test/Dockerfile M ttcn3-hlr-test/Dockerfile M ttcn3-mgw-test/Dockerfile M ttcn3-msc-test/Dockerfile M ttcn3-nitb-sysinfo/Dockerfile M ttcn3-pcu-test/Dockerfile M ttcn3-sgsn-test/Dockerfile M ttcn3-sip-test/Dockerfile 24 files changed, 48 insertions(+), 24 deletions(-) Approvals: osmith: Verified Pau Espin Pedrol: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved diff --git a/osmo-bsc-master/Dockerfile b/osmo-bsc-master/Dockerfile index bcd0573..cb80c4a 100644 --- a/osmo-bsc-master/Dockerfile +++ b/osmo-bsc-master/Dockerfile @@ -32,7 +32,8 @@ ADD http://git.osmocom.org/osmo-bsc/patch?h=$OSMO_BSC_BRANCH /tmp/commit-osmo-bsc RUN cd osmo-bsc && \ - git fetch && git checkout -f -B $OSMO_BSC_BRANCH $OSMO_BSC_BRANCH && \ + git fetch && git checkout $OSMO_BSC_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_BSC_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-bts-master/Dockerfile b/osmo-bts-master/Dockerfile index f4ddf3a..a7f1145 100644 --- a/osmo-bts-master/Dockerfile +++ b/osmo-bts-master/Dockerfile @@ -33,7 +33,8 @@ ADD http://git.osmocom.org/osmo-bts/patch?h=$OSMO_BTS_BRANCH /tmp/commit-osmo-bts RUN cd osmo-bts && \ - git fetch && git checkout -f -B $OSMO_BTS_BRANCH $OSMO_BTS_BRANCH && \ + git fetch && git checkout $OSMO_BTS_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_BTS_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-trx && \ diff --git a/osmo-ggsn-master/Dockerfile b/osmo-ggsn-master/Dockerfile index cf84d02..f27bef9 100644 --- a/osmo-ggsn-master/Dockerfile +++ b/osmo-ggsn-master/Dockerfile @@ -25,7 +25,8 @@ RUN git clone git://git.osmocom.org/osmo-ggsn.git ADD http://git.osmocom.org/osmo-ggsn/patch/?h=$OSMO_GGSN_BRANCH /tmp/commit RUN cd osmo-ggsn && \ - git fetch && git checkout -f -B $OSMO_GGSN_BRANCH $OSMO_GGSN_BRANCH && \ + git fetch && git checkout $OSMO_GGSN_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_GGSN_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-hlr-master/Dockerfile b/osmo-hlr-master/Dockerfile index 2da7c08..e9f9398 100644 --- a/osmo-hlr-master/Dockerfile +++ b/osmo-hlr-master/Dockerfile @@ -30,7 +30,8 @@ ADD http://git.osmocom.org/osmo-hlr/patch?h=$OSMO_HLR_BRANCH /tmp/commit-osmo-hlr RUN cd osmo-hlr && \ - git fetch && git checkout -f -B $OSMO_HLR_BRANCH $OSMO_HLR_BRANCH && \ + git fetch && git checkout $OSMO_HLR_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_HLR_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-hnbgw-master/Dockerfile b/osmo-hnbgw-master/Dockerfile index c89502b..af5bc91 100644 --- a/osmo-hnbgw-master/Dockerfile +++ b/osmo-hnbgw-master/Dockerfile @@ -30,7 +30,8 @@ ADD http://git.osmocom.org/osmo-iuh/patch?h=$OSMO_IUH_BRANCH /tmp/commit-osmo-mgw RUN cd osmo-iuh && \ - git fetch && git checkout -f -B $OSMO_IUH_BRANCH $OSMO_IUH_BRANCH && \ + git fetch && git checkout $OSMO_IUH_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_IUH_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-mgw-master/Dockerfile b/osmo-mgw-master/Dockerfile index 4c6d32a..3df37c1 100644 --- a/osmo-mgw-master/Dockerfile +++ b/osmo-mgw-master/Dockerfile @@ -30,7 +30,8 @@ RUN cd osmo-mgw && \ - git fetch && git checkout -f -B $OSMO_MGW_BRANCH $OSMO_MGW_BRANCH && \ + git fetch && git checkout $OSMO_MGW_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_MGW_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-msc-master/Dockerfile b/osmo-msc-master/Dockerfile index c8cfd62..21c7eda 100644 --- a/osmo-msc-master/Dockerfile +++ b/osmo-msc-master/Dockerfile @@ -37,7 +37,8 @@ ADD http://git.osmocom.org/osmo-msc/patch?h=$OSMO_MSC_BRANCH /tmp/commit-osmo-msc RUN cd osmo-msc && \ - git fetch && git checkout -f -B $OSMO_MSC_BRANCH $OSMO_MSC_BRANCH && \ + git fetch && git checkout $OSMO_MSC_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_MSC_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-smpp --enable-iu && \ diff --git a/osmo-nitb-master/Dockerfile b/osmo-nitb-master/Dockerfile index d3774da..c7fb008 100644 --- a/osmo-nitb-master/Dockerfile +++ b/osmo-nitb-master/Dockerfile @@ -31,7 +31,8 @@ ADD http://git.osmocom.org/openbsc/patch?h=$OSMO_NITB_BRANCH /tmp/commit-openbsc RUN cd openbsc/openbsc && \ - git fetch && git checkout -f -B $OSMO_NITB_BRANCH $OSMO_NITB_BRANCH && \ + git fetch && git checkout $OSMO_NITB_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_NITB_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-nat --enable-osmo-bsc --enable-smpp && \ diff --git a/osmo-pcu-master/Dockerfile b/osmo-pcu-master/Dockerfile index 7a294a4..01f7755 100644 --- a/osmo-pcu-master/Dockerfile +++ b/osmo-pcu-master/Dockerfile @@ -28,7 +28,8 @@ ADD http://git.osmocom.org/osmo-pcu/patch?h=$OSMO_PCU_BRANCH /tmp/commit-osmo-pcu RUN cd osmo-pcu && \ - git fetch && git checkout -f -B $OSMO_PCU_BRANCH $OSMO_PCU_BRANCH && \ + git fetch && git checkout $OSMO_PCU_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_PCU_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-trx && \ diff --git a/osmo-sgsn-master/Dockerfile b/osmo-sgsn-master/Dockerfile index c373564..4257141 100644 --- a/osmo-sgsn-master/Dockerfile +++ b/osmo-sgsn-master/Dockerfile @@ -32,7 +32,8 @@ ADD http://git.osmocom.org/osmo-sgsn/patch?h=$OSMO_SGSN_BRANCH /tmp/commit RUN cd osmo-sgsn && \ - git fetch && git checkout -f -B $OSMO_SGSN_BRANCH $OSMO_SGSN_BRANCH && \ + git fetch && git checkout $OSMO_SGSN_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_SGSN_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-sip-master/Dockerfile b/osmo-sip-master/Dockerfile index 258b1fe..4a9d49b 100644 --- a/osmo-sip-master/Dockerfile +++ b/osmo-sip-master/Dockerfile @@ -36,7 +36,8 @@ ADD http://git.osmocom.org/osmo-sip-connector/patch?h=$OSMO_SIP_BRANCH /tmp/commit-osmo-sip-connector RUN cd osmo-sip-connector && \ - git fetch && git checkout -f -B $OSMO_SIP_BRANCH $OSMO_SIP_BRANCH && \ + git fetch && git checkout $OSMO_SIP_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_SIP_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure --enable-smpp --enable-iu && \ diff --git a/osmo-stp-master/Dockerfile b/osmo-stp-master/Dockerfile index 0a62ed7..fa49085 100644 --- a/osmo-stp-master/Dockerfile +++ b/osmo-stp-master/Dockerfile @@ -26,7 +26,8 @@ RUN git clone git://git.osmocom.org/libosmo-sccp.git ADD http://git.osmocom.org/libosmo-sccp/patch?h=$OSMO_STP_BRANCH /tmp/commit RUN cd libosmo-sccp && \ - git fetch && git checkout -f -B $OSMO_STP_BRANCH $OSMO_STP_BRANCH && \ + git fetch && git checkout $OSMO_STP_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_STP_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmocom-bb-host-master/Dockerfile b/osmocom-bb-host-master/Dockerfile index 260f381..6ec0c9a 100644 --- a/osmocom-bb-host-master/Dockerfile +++ b/osmocom-bb-host-master/Dockerfile @@ -25,7 +25,8 @@ ADD http://git.osmocom.org/osmocom-bb/patch?h=$OSMO_BB_BRANCH /tmp/commit RUN cd osmocom-bb && \ - git fetch && git checkout -f -B $OSMO_BB_BRANCH origin/$OSMO_BB_BRANCH && \ + git fetch && git checkout $OSMO_BB_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_BB_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD RUN cd osmocom-bb/src/host/trxcon && \ diff --git a/ttcn3-bsc-test/Dockerfile b/ttcn3-bsc-test/Dockerfile index 546f33b..9288469 100644 --- a/ttcn3-bsc-test/Dockerfile +++ b/ttcn3-bsc-test/Dockerfile @@ -16,7 +16,8 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout $OSMO_TTCN3_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make bsc diff --git a/ttcn3-bscnat-test/Dockerfile b/ttcn3-bscnat-test/Dockerfile index 047f21c..f927513 100644 --- a/ttcn3-bscnat-test/Dockerfile +++ b/ttcn3-bscnat-test/Dockerfile @@ -16,7 +16,8 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout $OSMO_TTCN3_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make bsc-nat diff --git a/ttcn3-bts-test/Dockerfile b/ttcn3-bts-test/Dockerfile index d8969bb..29185c8 100644 --- a/ttcn3-bts-test/Dockerfile +++ b/ttcn3-bts-test/Dockerfile @@ -16,7 +16,8 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout $OSMO_TTCN3_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make deps-update bts diff --git a/ttcn3-ggsn-test/Dockerfile b/ttcn3-ggsn-test/Dockerfile index 6d6aff6..7e88f28 100644 --- a/ttcn3-ggsn-test/Dockerfile +++ b/ttcn3-ggsn-test/Dockerfile @@ -12,7 +12,8 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout $OSMO_TTCN3_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make ggsn_tests diff --git a/ttcn3-hlr-test/Dockerfile b/ttcn3-hlr-test/Dockerfile index 752d442..0233035 100644 --- a/ttcn3-hlr-test/Dockerfile +++ b/ttcn3-hlr-test/Dockerfile @@ -16,7 +16,8 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout $OSMO_TTCN3_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make deps-update hlr diff --git a/ttcn3-mgw-test/Dockerfile b/ttcn3-mgw-test/Dockerfile index bf13d12..33183d0 100644 --- a/ttcn3-mgw-test/Dockerfile +++ b/ttcn3-mgw-test/Dockerfile @@ -13,7 +13,8 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout $OSMO_TTCN3_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make mgw diff --git a/ttcn3-msc-test/Dockerfile b/ttcn3-msc-test/Dockerfile index 53aa393..ee7e5f0 100644 --- a/ttcn3-msc-test/Dockerfile +++ b/ttcn3-msc-test/Dockerfile @@ -16,7 +16,8 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout $OSMO_TTCN3_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make msc diff --git a/ttcn3-nitb-sysinfo/Dockerfile b/ttcn3-nitb-sysinfo/Dockerfile index d0ec87a..76fd630 100644 --- a/ttcn3-nitb-sysinfo/Dockerfile +++ b/ttcn3-nitb-sysinfo/Dockerfile @@ -13,7 +13,8 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout $OSMO_TTCN3_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make sysinfo diff --git a/ttcn3-pcu-test/Dockerfile b/ttcn3-pcu-test/Dockerfile index fbb64f5..b78fee2 100644 --- a/ttcn3-pcu-test/Dockerfile +++ b/ttcn3-pcu-test/Dockerfile @@ -16,7 +16,8 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout $OSMO_TTCN3_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make pcu diff --git a/ttcn3-sgsn-test/Dockerfile b/ttcn3-sgsn-test/Dockerfile index 3049d3f..42a53f2 100644 --- a/ttcn3-sgsn-test/Dockerfile +++ b/ttcn3-sgsn-test/Dockerfile @@ -16,7 +16,8 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout $OSMO_TTCN3_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make sgsn diff --git a/ttcn3-sip-test/Dockerfile b/ttcn3-sip-test/Dockerfile index eead347..9f1a6df 100644 --- a/ttcn3-sip-test/Dockerfile +++ b/ttcn3-sip-test/Dockerfile @@ -16,7 +16,8 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit RUN cd osmo-ttcn3-hacks && \ git fetch && \ - git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \ + git checkout $OSMO_TTCN3_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ make sip -- To view, visit https://gerrit.osmocom.org/14128 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I4004980baf0b7d6096702b6f3067ccbdb369a28c Gerrit-Change-Number: 14128 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 12:38:27 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 22 May 2019 12:38:27 +0000 Subject: Change in osmo-bts[master]: cbch: Add counters; queue length limits and CBCH LOAD reporting In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14113 ) Change subject: cbch: Add counters; queue length limits and CBCH LOAD reporting ...................................................................... Patch Set 3: (2 comments) https://gerrit.osmocom.org/#/c/14113/3//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/#/c/14113/3//COMMIT_MSG at 10 PS3, Line 10: tab > tap? no, we don't want to tap into it, but we want to keep a tab[le], we want to tabulate, ... using it in the meaning of https://www.dict.cc/englisch-deutsch/tab.html https://gerrit.osmocom.org/#/c/14113/3/src/common/rsl.c File src/common/rsl.c: https://gerrit.osmocom.org/#/c/14113/3/src/common/rsl.c at 1654 PS3, Line 1654: (overflow & 1) > Isn't the result the same as directly using "overflow", as it is a boolean? yes, due to the fact that true == 1 and false == 0. Still I sometimes like to make things explicit. I'm sure the compiler will remove whatever additional statements that have no effect on the object code. -- To view, visit https://gerrit.osmocom.org/14113 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I7068c7937a60a900c40439115bb84dc3ee0d061f Gerrit-Change-Number: 14113 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: osmith Gerrit-Comment-Date: Wed, 22 May 2019 12:38:27 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 12:39:40 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 22 May 2019 12:39:40 +0000 Subject: Change in osmo-bts[master]: cbch: Add counters; queue length limits and CBCH LOAD reporting In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14113 to look at the new patch set (#4). Change subject: cbch: Add counters; queue length limits and CBCH LOAD reporting ...................................................................... cbch: Add counters; queue length limits and CBCH LOAD reporting This adds the final missing part to full CBCH support: * keep a tab on the current queue length for basic + extended CBCH * keep rate counters about the number of sent / transmitted SMSCB * send CBCH LOAD information via RSL to the BSC Change-Id: I7068c7937a60a900c40439115bb84dc3ee0d061f --- M include/osmo-bts/cbch.h M include/osmo-bts/gsm_data_shared.h M include/osmo-bts/rsl.h M src/common/bts.c M src/common/cbch.c M src/common/rsl.c M src/common/vty.c 7 files changed, 137 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/13/14113/4 -- To view, visit https://gerrit.osmocom.org/14113 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I7068c7937a60a900c40439115bb84dc3ee0d061f Gerrit-Change-Number: 14113 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 12:39:40 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 22 May 2019 12:39:40 +0000 Subject: Change in osmo-bts[master]: cbch: Improve verbosity and extend logging; Always indicate BASIC/EXT... In-Reply-To: References: Message-ID: Hello osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14117 to look at the new patch set (#3). Change subject: cbch: Improve verbosity and extend logging; Always indicate BASIC/EXTD CBCH ...................................................................... cbch: Improve verbosity and extend logging; Always indicate BASIC/EXTD CBCH Change-Id: I6c8f9fc6215b616371e46c1f4ca4e44b8c7ac096 --- M src/common/cbch.c 1 file changed, 35 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/17/14117/3 -- To view, visit https://gerrit.osmocom.org/14117 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6c8f9fc6215b616371e46c1f4ca4e44b8c7ac096 Gerrit-Change-Number: 14117 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 12:42:10 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 22 May 2019 12:42:10 +0000 Subject: Change in osmo-bsc[master]: abis_rsl: Avoid "Unimplemented" log message for every CBCH LOAD IND In-Reply-To: References: Message-ID: Hello osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14126 to look at the new patch set (#2). Change subject: abis_rsl: Avoid "Unimplemented" log message for every CBCH LOAD IND ...................................................................... abis_rsl: Avoid "Unimplemented" log message for every CBCH LOAD IND Now that OsmoBTS is generating CBCH LOAD IND messages, let's avoid spamming the BSC log with notices about receiving this unimplemented message. Change-Id: Ida5045ec7a18c1062a3b80a381db52d5c98e9966 --- M src/osmo-bsc/abis_rsl.c 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/26/14126/2 -- To view, visit https://gerrit.osmocom.org/14126 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ida5045ec7a18c1062a3b80a381db52d5c98e9966 Gerrit-Change-Number: 14126 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 12:42:10 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 22 May 2019 12:42:10 +0000 Subject: Change in osmo-bsc[master]: abis_rs: Fix log message about unimplemented common channel msg In-Reply-To: References: Message-ID: Hello osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14127 to look at the new patch set (#2). Change subject: abis_rs: Fix log message about unimplemented common channel msg ...................................................................... abis_rs: Fix log message about unimplemented common channel msg The log is about an unimplementedCChan message, not a TRX message. Change-Id: I52bcf1fd79417ee5bfb054456a0b427e174114dd --- M src/osmo-bsc/abis_rsl.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/27/14127/2 -- To view, visit https://gerrit.osmocom.org/14127 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I52bcf1fd79417ee5bfb054456a0b427e174114dd Gerrit-Change-Number: 14127 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 12:42:11 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 22 May 2019 12:42:11 +0000 Subject: Change in osmo-bsc[master]: smscb: Allow transmit of SCHEDULE and DEFAULT SMSCB Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14129 Change subject: smscb: Allow transmit of SCHEDULE and DEFAULT SMSCB ...................................................................... smscb: Allow transmit of SCHEDULE and DEFAULT SMSCB Change-Id: Iad41d24c87d091b8eb144544802d44def925ca70 --- M src/osmo-bsc/bsc_vty.c 1 file changed, 19 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/29/14129/1 diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index 88c845b..d24f0c7 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -4533,14 +4533,19 @@ DEFUN(smscb_cmd, smscb_cmd_cmd, - "bts <0-255> smscb-command <1-4> HEXSTRING", + "bts <0-255> smscb-command (normal|schedule|default) <1-4> HEXSTRING", "BTS related commands\n" BTS_NR_STR - "SMS Cell Broadcast\n" "Last Valid Block\n" + "SMS Cell Broadcast\n" + "Normal (one-shot) SMSCB Message; sent once over Abis+Um\n" + "Schedule (one-shot) SMSCB Messag; sent once over Abis+Ume\n" + "Default (repeating) SMSCB Message; sent once over Abis, unlimited ovrer Um\n" + "Last Valid Block\n" "Hex Encoded SMSCB message (up to 88 octets)\n") { struct gsm_bts *bts; int bts_nr = atoi(argv[0]); - int last_block = atoi(argv[1]); + const char *type_str = argv[1]; + int last_block = atoi(argv[2]); struct rsl_ie_cb_cmd_type cb_cmd; uint8_t buf[88]; int rc; @@ -4554,7 +4559,7 @@ vty_out(vty, "%% BTS %d doesn't have a CBCH%s", bts_nr, VTY_NEWLINE); return CMD_WARNING; } - rc = osmo_hexparse(argv[2], buf, sizeof(buf)); + rc = osmo_hexparse(argv[3], buf, sizeof(buf)); if (rc < 0 || rc > sizeof(buf)) { vty_out(vty, "Error parsing HEXSTRING%s", VTY_NEWLINE); return CMD_WARNING; @@ -4562,7 +4567,16 @@ cb_cmd.spare = 0; cb_cmd.def_bcast = 0; - cb_cmd.command = RSL_CB_CMD_TYPE_NORMAL; + if (!strcmp(type_str, "normal")) + cb_cmd.command = RSL_CB_CMD_TYPE_NORMAL; + else if (!strcmp(type_str, "schedule")) + cb_cmd.command = RSL_CB_CMD_TYPE_SCHEDULE; + else if (!strcmp(type_str, "default")) + cb_cmd.command = RSL_CB_CMD_TYPE_DEFAULT; + else { + vty_out(vty, "Error parsing type%s", VTY_NEWLINE); + return CMD_WARNING; + } switch (last_block) { case 1: -- To view, visit https://gerrit.osmocom.org/14129 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Iad41d24c87d091b8eb144544802d44def925ca70 Gerrit-Change-Number: 14129 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 12:42:59 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 22 May 2019 12:42:59 +0000 Subject: Change in osmo-bsc[master]: smscb: Allow transmit of SCHEDULE and DEFAULT SMSCB In-Reply-To: References: Message-ID: Harald Welte has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/14129 ) Change subject: smscb: Allow transmit of SCHEDULE and DEFAULT SMSCB ...................................................................... smscb: Allow transmit of SCHEDULE and DEFAULT SMSCB Change-Id: Iad41d24c87d091b8eb144544802d44def925ca70 --- M src/osmo-bsc/bsc_vty.c 1 file changed, 19 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/29/14129/2 -- To view, visit https://gerrit.osmocom.org/14129 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iad41d24c87d091b8eb144544802d44def925ca70 Gerrit-Change-Number: 14129 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-CC: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 12:52:41 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 22 May 2019 12:52:41 +0000 Subject: Change in osmo-bts[master]: cbch: Improve verbosity and extend logging; Always indicate BASIC/EXT... In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/14117 ) Change subject: cbch: Improve verbosity and extend logging; Always indicate BASIC/EXTD CBCH ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14117 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6c8f9fc6215b616371e46c1f4ca4e44b8c7ac096 Gerrit-Change-Number: 14117 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 22 May 2019 12:52:41 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 12:55:33 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 22 May 2019 12:55:33 +0000 Subject: Change in osmo-bts[master]: cbch: Add counters; queue length limits and CBCH LOAD reporting In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/14113 ) Change subject: cbch: Add counters; queue length limits and CBCH LOAD reporting ...................................................................... Patch Set 4: Code-Review+1 LGTM. Thanks for the explanations :) -- To view, visit https://gerrit.osmocom.org/14113 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I7068c7937a60a900c40439115bb84dc3ee0d061f Gerrit-Change-Number: 14113 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 22 May 2019 12:55:33 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 12:58:23 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 22 May 2019 12:58:23 +0000 Subject: Change in osmo-bsc[master]: abis_rsl: Avoid "Unimplemented" log message for every CBCH LOAD IND In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/14126 ) Change subject: abis_rsl: Avoid "Unimplemented" log message for every CBCH LOAD IND ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14126 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ida5045ec7a18c1062a3b80a381db52d5c98e9966 Gerrit-Change-Number: 14126 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 22 May 2019 12:58:23 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 15:19:52 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 22 May 2019 15:19:52 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bsc: Introduce Osmux infra and one test for osmo-bsc In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14105 ) Change subject: bsc: Introduce Osmux infra and one test for osmo-bsc ...................................................................... Patch Set 4: Code-Review-1 Other suites using RanOps need to be updated to set "use_osmux", otherwise runtime fails because that field is not bound. example: bsc-nat: "const RanOps BSC_MS_RanOps" -- To view, visit https://gerrit.osmocom.org/14105 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If69c716dc06d61d810c32d1720a237c7535baca8 Gerrit-Change-Number: 14105 Gerrit-PatchSet: 4 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 22 May 2019 15:19:52 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 18:18:32 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 22 May 2019 18:18:32 +0000 Subject: Change in docker-playground[master]: ttcn3-bscnat: Prepare cfgs for VTY & Osmux support Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14130 Change subject: ttcn3-bscnat: Prepare cfgs for VTY & Osmux support ...................................................................... ttcn3-bscnat: Prepare cfgs for VTY & Osmux support * Adding "osmux on" for each BSC will be required to enable Osmux later on, but still it doesn't change behavior now because Osmux must be enabled globally too (will be done through VTY). * Set up correct bind and remote IP addr to have VTY working later on. * Use extended timestamp to have subsecond accuracy to match with pcap easily. Change-Id: I794a17bdeaff9ab9316d7a6acb1e58dfd815b645 --- M ttcn3-bscnat-test/BSCNAT_Tests.cfg M ttcn3-bscnat-test/bscs.config M ttcn3-bscnat-test/osmo-bsc-nat.cfg 3 files changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/30/14130/1 diff --git a/ttcn3-bscnat-test/BSCNAT_Tests.cfg b/ttcn3-bscnat-test/BSCNAT_Tests.cfg index e45061d..84e4025 100644 --- a/ttcn3-bscnat-test/BSCNAT_Tests.cfg +++ b/ttcn3-bscnat-test/BSCNAT_Tests.cfg @@ -6,6 +6,7 @@ *.JUnitLogger.testsuite_name := "BSCNAT_Tests" [TESTPORT_PARAMETERS] +*.BSCNATVTY.CTRL_HOSTNAME := "172.18.11.20" [MODULE_PARAMETERS] mp_bsc_port := 49999; diff --git a/ttcn3-bscnat-test/bscs.config b/ttcn3-bscnat-test/bscs.config index 6afa09b..16cfa2b 100644 --- a/ttcn3-bscnat-test/bscs.config +++ b/ttcn3-bscnat-test/bscs.config @@ -5,15 +5,18 @@ description bsc max-endpoints 32 paging forbidden 0 + osmux on bsc 1 token BSC1 location_area_code 2 description bsc max-endpoints 32 paging forbidden 0 + osmux on bsc 2 token BSC2 location_area_code 3 description bsc max-endpoints 32 paging forbidden 0 + osmux on diff --git a/ttcn3-bscnat-test/osmo-bsc-nat.cfg b/ttcn3-bscnat-test/osmo-bsc-nat.cfg index e3398b9..2e55695 100644 --- a/ttcn3-bscnat-test/osmo-bsc-nat.cfg +++ b/ttcn3-bscnat-test/osmo-bsc-nat.cfg @@ -7,10 +7,12 @@ logging color 0 logging print category 1 logging timestamp 1 + logging print extended-timestamp 1 logging level force-all debug ! line vty no login + bind 0.0.0.0 ! mgcp bind ip 172.18.11.20 -- To view, visit https://gerrit.osmocom.org/14130 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I794a17bdeaff9ab9316d7a6acb1e58dfd815b645 Gerrit-Change-Number: 14130 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 19:17:07 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 22 May 2019 19:17:07 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bsc: Introduce Osmux infra and one test for osmo-bsc In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14105 to look at the new patch set (#5). Change subject: bsc: Introduce Osmux infra and one test for osmo-bsc ...................................................................... bsc: Introduce Osmux infra and one test for osmo-bsc Test verifies once osmux is enabled in osmo-bsc, BSSMAP RESET (ACK) contains Osmux Support IE and that it correctly handles BSSMAP ASsign Req with Osmux CID. Related: OS#2551 Depends: osmo-bsc 6de754cdde5319af3059d8fc6abf85037ec7eacc Depends: titan.ProtocolModules.BSSMAP Iaf1e137269c0da20b2c96fd104b57edf336693af Change-Id: If69c716dc06d61d810c32d1720a237c7535baca8 --- M bsc-nat/BSC_MS_ConnectionHandler.ttcn M bsc-nat/MSC_ConnectionHandler.ttcn M bsc/BSC_Tests.ttcn M bsc/MSC_ConnectionHandler.ttcn M bsc/expected-results.xml M library/BSSMAP_Templates.ttcn M library/MGCP_Templates.ttcn M library/RAN_Emulation.ttcnpp M msc/BSC_ConnectionHandler.ttcn 9 files changed, 173 insertions(+), 50 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/05/14105/5 -- To view, visit https://gerrit.osmocom.org/14105 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: If69c716dc06d61d810c32d1720a237c7535baca8 Gerrit-Change-Number: 14105 Gerrit-PatchSet: 5 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 19:49:36 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 22 May 2019 19:49:36 +0000 Subject: Change in osmocom-bb[master]: bcch_scan: Fix compiler warning about undefined functions Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14132 Change subject: bcch_scan: Fix compiler warning about undefined functions ...................................................................... bcch_scan: Fix compiler warning about undefined functions Change-Id: I435ef2032b9cefe844c37f395d9087be6af8934a --- M src/host/layer23/src/misc/Makefile.am M src/host/layer23/src/misc/app_bcch_scan.c A src/host/layer23/src/misc/bcch_scan.h 3 files changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/32/14132/1 diff --git a/src/host/layer23/src/misc/Makefile.am b/src/host/layer23/src/misc/Makefile.am index 9c2bc4d..f3d7e95 100644 --- a/src/host/layer23/src/misc/Makefile.am +++ b/src/host/layer23/src/misc/Makefile.am @@ -4,6 +4,8 @@ bin_PROGRAMS = bcch_scan ccch_scan echo_test cell_log cbch_sniff +noinst_HEADERS = bcch_scan.h + bcch_scan_SOURCES = ../common/main.c app_bcch_scan.c bcch_scan.c ccch_scan_SOURCES = ../common/main.c app_ccch_scan.c rslms.c echo_test_SOURCES = ../common/main.c app_echo_test.c diff --git a/src/host/layer23/src/misc/app_bcch_scan.c b/src/host/layer23/src/misc/app_bcch_scan.c index 7b21ed7..22e6f1b 100644 --- a/src/host/layer23/src/misc/app_bcch_scan.c +++ b/src/host/layer23/src/misc/app_bcch_scan.c @@ -33,6 +33,7 @@ #include #include +#include "bcch_scan.h" static int signal_cb(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data) @@ -53,7 +54,7 @@ int l23_app_init(struct osmocom_ms *ms) { /* don't do layer3_init() as we don't want an actualy L3 */ - fps_init(ms); + fps_init(); l1ctl_tx_reset_req(ms, L1CTL_RES_T_FULL); return osmo_signal_register_handler(SS_L1CTL, &signal_cb, NULL); } diff --git a/src/host/layer23/src/misc/bcch_scan.h b/src/host/layer23/src/misc/bcch_scan.h new file mode 100644 index 0000000..ab861b4 --- /dev/null +++ b/src/host/layer23/src/misc/bcch_scan.h @@ -0,0 +1,6 @@ +#pragma once + +struct osmocom_ms; + +int fps_start(struct osmocom_ms *ms); +int fps_init(void); -- To view, visit https://gerrit.osmocom.org/14132 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I435ef2032b9cefe844c37f395d9087be6af8934a Gerrit-Change-Number: 14132 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 19:49:36 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 22 May 2019 19:49:36 +0000 Subject: Change in osmocom-bb[master]: layer23: Fix 'make distcheck' Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14133 Change subject: layer23: Fix 'make distcheck' ...................................................................... layer23: Fix 'make distcheck' Change-Id: Ic48e240ee1484aaa793af23c62a24d2949900b86 --- M src/host/layer23/include/osmocom/bb/common/Makefile.am M src/host/layer23/include/osmocom/bb/misc/Makefile.am M src/host/layer23/include/osmocom/bb/mobile/Makefile.am M src/host/layer23/src/misc/Makefile.am A src/host/layer23/src/misc/geo.c A src/host/layer23/src/misc/geo.h 6 files changed, 65 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/33/14133/1 diff --git a/src/host/layer23/include/osmocom/bb/common/Makefile.am b/src/host/layer23/include/osmocom/bb/common/Makefile.am index d66be98..f9364cd 100644 --- a/src/host/layer23/include/osmocom/bb/common/Makefile.am +++ b/src/host/layer23/include/osmocom/bb/common/Makefile.am @@ -1,3 +1,3 @@ noinst_HEADERS = l1ctl.h l1l2_interface.h l23_app.h logging.h \ networks.h gps.h sysinfo.h osmocom_data.h utils.h \ - sap_proto.h sap_fsm.h sap_interface.h + sap_proto.h sap_fsm.h sap_interface.h sim.h diff --git a/src/host/layer23/include/osmocom/bb/misc/Makefile.am b/src/host/layer23/include/osmocom/bb/misc/Makefile.am index 71c9d38..5976090 100644 --- a/src/host/layer23/include/osmocom/bb/misc/Makefile.am +++ b/src/host/layer23/include/osmocom/bb/misc/Makefile.am @@ -1 +1 @@ -noinst_HEADERS = layer3.h rslms.h +noinst_HEADERS = layer3.h rslms.h cell_log.h diff --git a/src/host/layer23/include/osmocom/bb/mobile/Makefile.am b/src/host/layer23/include/osmocom/bb/mobile/Makefile.am index 8e4be1a..623964f 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/Makefile.am +++ b/src/host/layer23/include/osmocom/bb/mobile/Makefile.am @@ -1,3 +1,4 @@ noinst_HEADERS = gsm322.h gsm480_ss.h gsm411_sms.h gsm48_cc.h gsm48_mm.h \ gsm48_rr.h mncc.h settings.h subscriber.h support.h \ - transaction.h vty.h mncc_sock.h mncc_ms.h primitives.h + transaction.h vty.h mncc_sock.h mncc_ms.h primitives.h \ + app_mobile.h voice.h diff --git a/src/host/layer23/src/misc/Makefile.am b/src/host/layer23/src/misc/Makefile.am index f3d7e95..78ab962 100644 --- a/src/host/layer23/src/misc/Makefile.am +++ b/src/host/layer23/src/misc/Makefile.am @@ -4,12 +4,11 @@ bin_PROGRAMS = bcch_scan ccch_scan echo_test cell_log cbch_sniff -noinst_HEADERS = bcch_scan.h +noinst_HEADERS = bcch_scan.h geo.h bcch_scan_SOURCES = ../common/main.c app_bcch_scan.c bcch_scan.c ccch_scan_SOURCES = ../common/main.c app_ccch_scan.c rslms.c echo_test_SOURCES = ../common/main.c app_echo_test.c cell_log_LDADD = $(LDADD) -lm -cell_log_SOURCES = ../common/main.c app_cell_log.c cell_log.c \ - ../../../gsmmap/geo.c +cell_log_SOURCES = ../common/main.c app_cell_log.c cell_log.c geo.c cbch_sniff_SOURCES = ../common/main.c app_cbch_sniff.c diff --git a/src/host/layer23/src/misc/geo.c b/src/host/layer23/src/misc/geo.c new file mode 100644 index 0000000..65633d2 --- /dev/null +++ b/src/host/layer23/src/misc/geo.c @@ -0,0 +1,47 @@ +#include +#include "geo.h" + +void geo2space(double *x, double *y, double *z, double lon, double lat) +{ + *z = sin(lat / 180.0 * PI) * POLE_RADIUS; + *x = sin(lon / 180.0 * PI) * cos(lat / 180.0 * PI) * EQUATOR_RADIUS; + *y = -cos(lon / 180.0 * PI) * cos(lat / 180.0 * PI) * EQUATOR_RADIUS; +} + +void space2geo(double *lon, double *lat, double x, double y, double z) +{ + double r; + + /* bring geoid to 1m radius */ + z = z / POLE_RADIUS; + x = x / EQUATOR_RADIUS; + y = y / EQUATOR_RADIUS; + + /* normalize */ + r = sqrt(x * x + y * y + z * z); + z = z / r; + x = x / r; + y = y / r; + + *lat = asin(z) / PI * 180; + *lon = atan2(x, -y) / PI * 180; +} + +double distinspace(double x1, double y1, double z1, double x2, double y2, + double z2) +{ + double x = x1 - x2; + double y = y1 - y2; + double z = z1 - z2; + + return sqrt(x * x + y * y + z * z); +} + +double distonplane(double x1, double y1, double x2, double y2) +{ + double x = x1 - x2; + double y = y1 - y2; + + return sqrt(x * x + y * y); +} + diff --git a/src/host/layer23/src/misc/geo.h b/src/host/layer23/src/misc/geo.h new file mode 100644 index 0000000..25e26cb --- /dev/null +++ b/src/host/layer23/src/misc/geo.h @@ -0,0 +1,12 @@ +/* WGS 84 */ +#define EQUATOR_RADIUS 6378137.0 +#define POLE_RADIUS 6356752.314 + +#define PI 3.1415926536 + +void geo2space(double *x, double *y, double *z, double lat, double lon); +void space2geo(double *lat, double *lon, double x, double y, double z); +double distinspace(double x1, double y1, double z1, double x2, double y2, + double z2); +double distonplane(double x1, double y1, double x2, double y2); + -- To view, visit https://gerrit.osmocom.org/14133 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ic48e240ee1484aaa793af23c62a24d2949900b86 Gerrit-Change-Number: 14133 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 19:49:37 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 22 May 2019 19:49:37 +0000 Subject: Change in osmocom-bb[master]: contrib/jenkins.sh: Build gprsdecode + laye23 with 'make distcheck' Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14134 Change subject: contrib/jenkins.sh: Build gprsdecode + laye23 with 'make distcheck' ...................................................................... contrib/jenkins.sh: Build gprsdecode + laye23 with 'make distcheck' Change-Id: I17c4dfb7bbfcf8da78d688939ee8c0b916cb6b1a --- M contrib/jenkins.sh 1 file changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/34/14134/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index aa02b28..dc8cda6 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -34,7 +34,16 @@ set -x -for dir in gprsdecode gsmmap layer23 osmocon trxcon virt_phy; do +# building those sub-projects where 'distcheck' is known-working +for dir in gprsdecode layer23; do + cd $base/src/host/$dir + autoreconf -fi + ./configure + make distcheck +done + +# TODO: make sure 'distcheck' passes also for these +for dir in gsmmap osmocon trxcon virt_phy; do cd $base/src/host/$dir autoreconf -fi ./configure -- To view, visit https://gerrit.osmocom.org/14134 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I17c4dfb7bbfcf8da78d688939ee8c0b916cb6b1a Gerrit-Change-Number: 14134 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 20:07:38 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 22 May 2019 20:07:38 +0000 Subject: Change in osmocom-bb[master]: sap_fsm: Fix what appears to be a missing pointer dereference Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14135 Change subject: sap_fsm: Fix what appears to be a missing pointer dereference ...................................................................... sap_fsm: Fix what appears to be a missing pointer dereference sap_fsm.c: In function ?sap_negotiate_msg_size?: sap_fsm.c:103:15: warning: passing argument 1 of ?__bswap_16? makes integer from pointer without a cast [-Wint-conversion] size = ntohs((uint16_t *) param->value); ^~~~~~~~~~~~~~~~~~~~~~~~~ Change-Id: Ie58af6162c67ae377809b42daa897ca3f3d72af1 --- M src/host/layer23/src/common/sap_fsm.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/35/14135/1 diff --git a/src/host/layer23/src/common/sap_fsm.c b/src/host/layer23/src/common/sap_fsm.c index f07488f..742e200 100644 --- a/src/host/layer23/src/common/sap_fsm.c +++ b/src/host/layer23/src/common/sap_fsm.c @@ -100,7 +100,7 @@ } /* Parse MaxMsgSize suggested by server */ - size = ntohs((uint16_t *) param->value); + size = ntohs(*(uint16_t *) param->value); if (size > SAP_MAX_MSG_SIZE) { cause = "suggested MaxMsgSize is too big for us"; goto error; -- To view, visit https://gerrit.osmocom.org/14135 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ie58af6162c67ae377809b42daa897ca3f3d72af1 Gerrit-Change-Number: 14135 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 20:07:39 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 22 May 2019 20:07:39 +0000 Subject: Change in osmocom-bb[master]: layer23: fix tons of compiler warnings, mostly OSMO_DEPRECATED related Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14136 Change subject: layer23: fix tons of compiler warnings, mostly OSMO_DEPRECATED related ...................................................................... layer23: fix tons of compiler warnings, mostly OSMO_DEPRECATED related Change-Id: I03918bd864c711b377a795186123c85bb6f4dc4a --- M src/host/layer23/src/common/networks.c M src/host/layer23/src/misc/bcch_scan.c M src/host/layer23/src/mobile/gsm322.c M src/host/layer23/src/mobile/gsm411_sms.c M src/host/layer23/src/mobile/gsm480_ss.c M src/host/layer23/src/mobile/gsm48_rr.c M src/host/layer23/src/mobile/subscriber.c 7 files changed, 36 insertions(+), 26 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/36/14136/1 diff --git a/src/host/layer23/src/common/networks.c b/src/host/layer23/src/common/networks.c index 40b70a1..b4757e9 100644 --- a/src/host/layer23/src/common/networks.c +++ b/src/host/layer23/src/common/networks.c @@ -1822,33 +1822,33 @@ const char *gsm_print_mcc(uint16_t mcc) { - static char string[5] = "000"; + static char string[6] = "000"; - snprintf(string, 4, "%03x", mcc); + snprintf(string, 5, "%03x", mcc); return string; } const char *gsm_print_mnc(uint16_t mnc) { - static char string[7]; + static char string[8]; /* invalid format: return hex value */ if ((mnc & 0xf000) || (mnc & 0x0f00) > 0x0900 || (mnc & 0x00f0) > 0x0090 || ((mnc & 0x000f) > 0x0009 && (mnc & 0x000f) < 0x000f)) { - snprintf(string, 6, "0x%03x", mnc); + snprintf(string, 7, "0x%03x", mnc); return string; } /* two digits */ if ((mnc & 0x000f) == 0x000f) { - snprintf(string, 6, "%02x", mnc >> 4); + snprintf(string, 7, "%02x", mnc >> 4); return string; } /* three digits */ - snprintf(string, 6, "%03x", mnc); + snprintf(string, 7, "%03x", mnc); return string; } diff --git a/src/host/layer23/src/misc/bcch_scan.c b/src/host/layer23/src/misc/bcch_scan.c index 3ba3a1c..5dc0bc3 100644 --- a/src/host/layer23/src/misc/bcch_scan.c +++ b/src/host/layer23/src/misc/bcch_scan.c @@ -199,9 +199,13 @@ case BSCAN_S_WAIT_DATA: cinfo_next_cell(data); break; + case BSCAN_S_NONE: + case BSCAN_S_DONE: + break; } } +#if 0 /* Update cell_info for current cell with received BCCH info */ static int rx_bcch_info(const uint8_t *data) { @@ -233,12 +237,13 @@ static int rx_sch_info() { /* FIXME */ + return 0; } +#endif static int bscan_sig_cb(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data) { - struct cell_info *ci = fps.cur_cell; struct osmocom_ms *ms; struct osmobb_meas_res *mr; uint16_t arfcn; @@ -279,6 +284,9 @@ } _cinfo_start_arfcn(rc); break; + case FPS_S_NONE: + case FPS_S_BINFO: + break; } break; case S_L1CTL_FBSB_RESP: diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index bfe6329..cfd70d8 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -1867,7 +1867,7 @@ /* check C1 criteria not fullfilled */ // TODO: class 3 DCS mobile - band = gsm_arfcn2band(index2arfcn(i)); + gsm_arfcn2band_rc(index2arfcn(i), &band); class = class_of_band(ms, band); c1 = calculate_c1(DCS, rxlev2dbm(cs->list[i].rxlev), s->rxlev_acc_min_db, @@ -4129,7 +4129,8 @@ struct gsm48_sysinfo *s; int i = 0, reselect = 0; uint16_t acc_class; - int band, class; + int class; + enum gsm_band band; struct gsm322_neighbour *nb; time_t now; char arfcn_text[10]; @@ -4200,7 +4201,7 @@ nb->prio_low = 1; /* get C1 & C2 */ - band = gsm_arfcn2band(nb->arfcn); + gsm_arfcn2band_rc(nb->arfcn, &band); class = class_of_band(ms, band); nb->c1 = calculate_c1(DNB, nb->rla_c_dbm, s->rxlev_acc_min_db, ms_pwr_dbm(band, s->ms_txpwr_max_cch), @@ -4697,9 +4698,11 @@ struct llist_head sorted; struct llist_head *lh, *lh2; struct gsm48_sysinfo *s = &cs->sel_si; - int band = gsm_arfcn2band(cs->arfcn); - int class = class_of_band(cs->ms, band); + enum gsm_band band; + int class; + gsm_arfcn2band_rc(cs->arfcn, &band); + class = class_of_band(cs->ms, band); /* calculate the RAL_C of serving cell */ if (cs->rxlev_count) { diff --git a/src/host/layer23/src/mobile/gsm411_sms.c b/src/host/layer23/src/mobile/gsm411_sms.c index c476ff4..08df0f2 100644 --- a/src/host/layer23/src/mobile/gsm411_sms.c +++ b/src/host/layer23/src/mobile/gsm411_sms.c @@ -271,8 +271,8 @@ strcpy(gsms->address, "0"); else gsms->address[0] = '\0'; - gsm48_decode_bcd_number(gsms->address + strlen(gsms->address), - sizeof(gsms->address) - strlen(gsms->address), address_lv, 1); + gsm48_decode_bcd_number2(gsms->address + strlen(gsms->address), + sizeof(gsms->address) - strlen(gsms->address), address_lv, sizeof(address_lv), 1); smsp += oa_len_bytes; gsms->protocol_id = *smsp++; diff --git a/src/host/layer23/src/mobile/gsm480_ss.c b/src/host/layer23/src/mobile/gsm480_ss.c index 5ff3ce6..edc9c97 100644 --- a/src/host/layer23/src/mobile/gsm480_ss.c +++ b/src/host/layer23/src/mobile/gsm480_ss.c @@ -884,9 +884,9 @@ strcpy(number, "0"); else number[0] = '\0'; - gsm48_decode_bcd_number(number + strlen(number), + gsm48_decode_bcd_number2(number + strlen(number), sizeof(number) - strlen(number), - tag_data - 1, 1); + tag_data - 1, tag_len + 1, 1); vty_notify(ms, "Destination: %s\n", number); break; } diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c index c074323..a94fc99 100644 --- a/src/host/layer23/src/mobile/gsm48_rr.c +++ b/src/host/layer23/src/mobile/gsm48_rr.c @@ -1516,6 +1516,9 @@ int slots; uint8_t chan_req; uint8_t tx_power; + enum gsm_band band; + + gsm_arfcn2band_rc(cs->arfcn, &band); /* already assigned */ if (rr->wait_assign == 2) @@ -1657,8 +1660,7 @@ if (set->alter_tx_power) { tx_power = set->alter_tx_power_value; LOGP(DRR, LOGL_INFO, "Use alternative tx-power %d (%d dBm)\n", - tx_power, - ms_pwr_dbm(gsm_arfcn2band(cs->arfcn), tx_power)); + tx_power, ms_pwr_dbm(band, tx_power)); } else { tx_power = s->ms_txpwr_max_cch; /* power offset in case of DCS1800 */ @@ -1666,15 +1668,12 @@ && (cs->arfcn & 1023) <= 885) { LOGP(DRR, LOGL_INFO, "Use MS-TXPWR-MAX-CCH power value " "%d (%d dBm) with offset %d dBm\n", tx_power, - ms_pwr_dbm(gsm_arfcn2band(cs->arfcn), tx_power), - s->po_value * 2); + ms_pwr_dbm(band, tx_power), s->po_value * 2); /* use reserved bits 7,8 for offset (+ X * 2dB) */ tx_power |= s->po_value << 6; } else LOGP(DRR, LOGL_INFO, "Use MS-TXPWR-MAX-CCH power value " - "%d (%d dBm)\n", tx_power, - ms_pwr_dbm(gsm_arfcn2band(cs->arfcn), - tx_power)); + "%d (%d dBm)\n", tx_power, ms_pwr_dbm(band, tx_power)); } ncch->data[7] = tx_power; diff --git a/src/host/layer23/src/mobile/subscriber.c b/src/host/layer23/src/mobile/subscriber.c index e1e6331..b2eacc5 100644 --- a/src/host/layer23/src/mobile/subscriber.c +++ b/src/host/layer23/src/mobile/subscriber.c @@ -348,9 +348,9 @@ strcpy(subscr->sms_sca, "+"); if (((smsp->ts_sca[1] & 0x70) >> 4) == 2) strcpy(subscr->sms_sca, "0"); - gsm48_decode_bcd_number(subscr->sms_sca + - strlen(subscr->sms_sca), sizeof(subscr->sms_sca) - - strlen(subscr->sms_sca), smsp->ts_sca, 1); + gsm48_decode_bcd_number2(subscr->sms_sca + strlen(subscr->sms_sca), + sizeof(subscr->sms_sca) - strlen(subscr->sms_sca), + smsp->ts_sca, sizeof(smsp->ts_sca), 1); } LOGP(DMM, LOGL_INFO, "received SMSP from SIM (sca=%s)\n", -- To view, visit https://gerrit.osmocom.org/14136 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I03918bd864c711b377a795186123c85bb6f4dc4a Gerrit-Change-Number: 14136 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 20:39:01 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 22 May 2019 20:39:01 +0000 Subject: Change in osmo-bts[master]: sysmo: Fix "nominal power" / BS power display in VTY Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14137 Change subject: sysmo: Fix "nominal power" / BS power display in VTY ...................................................................... sysmo: Fix "nominal power" / BS power display in VTY The function get_p_max_out_mdBm() returns a value in 1/1000th of dBm, "milli-dBm", while trx->nominal_power is only whole dBm. We were missing the required divider of 1000 ever since Change-Id Ieff75d5becaa80a2097b6e744c75c2d16259c9a4 was merged in February 2017. The good news is that this really only affected the VTY output and not any actual operational aspect of the system. Change-Id: If92d0b15c48dafc63776b82c7ff5f3c2b3505f68 Closes: SYS#4570 --- M src/osmo-bts-sysmo/l1_if.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/37/14137/1 diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 87cf25a..6f61c67 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -1883,7 +1883,7 @@ LOGP(DL1C, LOGL_NOTICE, "Cannot determine nominal " "transmit power. Assuming 23dBm.\n"); } - bts->c0->nominal_power = rc; + bts->c0->nominal_power = rc / 1000; } hdl = pinst->u.sysmobts.hdl; -- To view, visit https://gerrit.osmocom.org/14137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If92d0b15c48dafc63776b82c7ff5f3c2b3505f68 Gerrit-Change-Number: 14137 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 20:40:49 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 22 May 2019 20:40:49 +0000 Subject: Change in osmocom-bb[master]: bcch_scan: Fix compiler warning about undefined functions In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14132 ) Change subject: bcch_scan: Fix compiler warning about undefined functions ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14132 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I435ef2032b9cefe844c37f395d9087be6af8934a Gerrit-Change-Number: 14132 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 22 May 2019 20:40:49 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 20:41:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 22 May 2019 20:41:05 +0000 Subject: Change in osmocom-bb[master]: layer23: Fix 'make distcheck' In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14133 ) Change subject: layer23: Fix 'make distcheck' ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14133 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic48e240ee1484aaa793af23c62a24d2949900b86 Gerrit-Change-Number: 14133 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 22 May 2019 20:41:05 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 20:41:11 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 22 May 2019 20:41:11 +0000 Subject: Change in osmocom-bb[master]: contrib/jenkins.sh: Build gprsdecode + laye23 with 'make distcheck' In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14134 ) Change subject: contrib/jenkins.sh: Build gprsdecode + laye23 with 'make distcheck' ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14134 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I17c4dfb7bbfcf8da78d688939ee8c0b916cb6b1a Gerrit-Change-Number: 14134 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 22 May 2019 20:41:11 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 20:41:46 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 22 May 2019 20:41:46 +0000 Subject: Change in osmocom-bb[master]: bcch_scan: Fix compiler warning about undefined functions In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14132 ) Change subject: bcch_scan: Fix compiler warning about undefined functions ...................................................................... bcch_scan: Fix compiler warning about undefined functions Change-Id: I435ef2032b9cefe844c37f395d9087be6af8934a --- M src/host/layer23/src/misc/Makefile.am M src/host/layer23/src/misc/app_bcch_scan.c A src/host/layer23/src/misc/bcch_scan.h 3 files changed, 10 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/host/layer23/src/misc/Makefile.am b/src/host/layer23/src/misc/Makefile.am index 9c2bc4d..f3d7e95 100644 --- a/src/host/layer23/src/misc/Makefile.am +++ b/src/host/layer23/src/misc/Makefile.am @@ -4,6 +4,8 @@ bin_PROGRAMS = bcch_scan ccch_scan echo_test cell_log cbch_sniff +noinst_HEADERS = bcch_scan.h + bcch_scan_SOURCES = ../common/main.c app_bcch_scan.c bcch_scan.c ccch_scan_SOURCES = ../common/main.c app_ccch_scan.c rslms.c echo_test_SOURCES = ../common/main.c app_echo_test.c diff --git a/src/host/layer23/src/misc/app_bcch_scan.c b/src/host/layer23/src/misc/app_bcch_scan.c index 7b21ed7..22e6f1b 100644 --- a/src/host/layer23/src/misc/app_bcch_scan.c +++ b/src/host/layer23/src/misc/app_bcch_scan.c @@ -33,6 +33,7 @@ #include #include +#include "bcch_scan.h" static int signal_cb(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data) @@ -53,7 +54,7 @@ int l23_app_init(struct osmocom_ms *ms) { /* don't do layer3_init() as we don't want an actualy L3 */ - fps_init(ms); + fps_init(); l1ctl_tx_reset_req(ms, L1CTL_RES_T_FULL); return osmo_signal_register_handler(SS_L1CTL, &signal_cb, NULL); } diff --git a/src/host/layer23/src/misc/bcch_scan.h b/src/host/layer23/src/misc/bcch_scan.h new file mode 100644 index 0000000..ab861b4 --- /dev/null +++ b/src/host/layer23/src/misc/bcch_scan.h @@ -0,0 +1,6 @@ +#pragma once + +struct osmocom_ms; + +int fps_start(struct osmocom_ms *ms); +int fps_init(void); -- To view, visit https://gerrit.osmocom.org/14132 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I435ef2032b9cefe844c37f395d9087be6af8934a Gerrit-Change-Number: 14132 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 20:41:46 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 22 May 2019 20:41:46 +0000 Subject: Change in osmocom-bb[master]: layer23: Fix 'make distcheck' In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14133 ) Change subject: layer23: Fix 'make distcheck' ...................................................................... layer23: Fix 'make distcheck' Change-Id: Ic48e240ee1484aaa793af23c62a24d2949900b86 --- M src/host/layer23/include/osmocom/bb/common/Makefile.am M src/host/layer23/include/osmocom/bb/misc/Makefile.am M src/host/layer23/include/osmocom/bb/mobile/Makefile.am M src/host/layer23/src/misc/Makefile.am A src/host/layer23/src/misc/geo.c A src/host/layer23/src/misc/geo.h 6 files changed, 65 insertions(+), 6 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/host/layer23/include/osmocom/bb/common/Makefile.am b/src/host/layer23/include/osmocom/bb/common/Makefile.am index d66be98..f9364cd 100644 --- a/src/host/layer23/include/osmocom/bb/common/Makefile.am +++ b/src/host/layer23/include/osmocom/bb/common/Makefile.am @@ -1,3 +1,3 @@ noinst_HEADERS = l1ctl.h l1l2_interface.h l23_app.h logging.h \ networks.h gps.h sysinfo.h osmocom_data.h utils.h \ - sap_proto.h sap_fsm.h sap_interface.h + sap_proto.h sap_fsm.h sap_interface.h sim.h diff --git a/src/host/layer23/include/osmocom/bb/misc/Makefile.am b/src/host/layer23/include/osmocom/bb/misc/Makefile.am index 71c9d38..5976090 100644 --- a/src/host/layer23/include/osmocom/bb/misc/Makefile.am +++ b/src/host/layer23/include/osmocom/bb/misc/Makefile.am @@ -1 +1 @@ -noinst_HEADERS = layer3.h rslms.h +noinst_HEADERS = layer3.h rslms.h cell_log.h diff --git a/src/host/layer23/include/osmocom/bb/mobile/Makefile.am b/src/host/layer23/include/osmocom/bb/mobile/Makefile.am index 8e4be1a..623964f 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/Makefile.am +++ b/src/host/layer23/include/osmocom/bb/mobile/Makefile.am @@ -1,3 +1,4 @@ noinst_HEADERS = gsm322.h gsm480_ss.h gsm411_sms.h gsm48_cc.h gsm48_mm.h \ gsm48_rr.h mncc.h settings.h subscriber.h support.h \ - transaction.h vty.h mncc_sock.h mncc_ms.h primitives.h + transaction.h vty.h mncc_sock.h mncc_ms.h primitives.h \ + app_mobile.h voice.h diff --git a/src/host/layer23/src/misc/Makefile.am b/src/host/layer23/src/misc/Makefile.am index f3d7e95..78ab962 100644 --- a/src/host/layer23/src/misc/Makefile.am +++ b/src/host/layer23/src/misc/Makefile.am @@ -4,12 +4,11 @@ bin_PROGRAMS = bcch_scan ccch_scan echo_test cell_log cbch_sniff -noinst_HEADERS = bcch_scan.h +noinst_HEADERS = bcch_scan.h geo.h bcch_scan_SOURCES = ../common/main.c app_bcch_scan.c bcch_scan.c ccch_scan_SOURCES = ../common/main.c app_ccch_scan.c rslms.c echo_test_SOURCES = ../common/main.c app_echo_test.c cell_log_LDADD = $(LDADD) -lm -cell_log_SOURCES = ../common/main.c app_cell_log.c cell_log.c \ - ../../../gsmmap/geo.c +cell_log_SOURCES = ../common/main.c app_cell_log.c cell_log.c geo.c cbch_sniff_SOURCES = ../common/main.c app_cbch_sniff.c diff --git a/src/host/layer23/src/misc/geo.c b/src/host/layer23/src/misc/geo.c new file mode 100644 index 0000000..65633d2 --- /dev/null +++ b/src/host/layer23/src/misc/geo.c @@ -0,0 +1,47 @@ +#include +#include "geo.h" + +void geo2space(double *x, double *y, double *z, double lon, double lat) +{ + *z = sin(lat / 180.0 * PI) * POLE_RADIUS; + *x = sin(lon / 180.0 * PI) * cos(lat / 180.0 * PI) * EQUATOR_RADIUS; + *y = -cos(lon / 180.0 * PI) * cos(lat / 180.0 * PI) * EQUATOR_RADIUS; +} + +void space2geo(double *lon, double *lat, double x, double y, double z) +{ + double r; + + /* bring geoid to 1m radius */ + z = z / POLE_RADIUS; + x = x / EQUATOR_RADIUS; + y = y / EQUATOR_RADIUS; + + /* normalize */ + r = sqrt(x * x + y * y + z * z); + z = z / r; + x = x / r; + y = y / r; + + *lat = asin(z) / PI * 180; + *lon = atan2(x, -y) / PI * 180; +} + +double distinspace(double x1, double y1, double z1, double x2, double y2, + double z2) +{ + double x = x1 - x2; + double y = y1 - y2; + double z = z1 - z2; + + return sqrt(x * x + y * y + z * z); +} + +double distonplane(double x1, double y1, double x2, double y2) +{ + double x = x1 - x2; + double y = y1 - y2; + + return sqrt(x * x + y * y); +} + diff --git a/src/host/layer23/src/misc/geo.h b/src/host/layer23/src/misc/geo.h new file mode 100644 index 0000000..25e26cb --- /dev/null +++ b/src/host/layer23/src/misc/geo.h @@ -0,0 +1,12 @@ +/* WGS 84 */ +#define EQUATOR_RADIUS 6378137.0 +#define POLE_RADIUS 6356752.314 + +#define PI 3.1415926536 + +void geo2space(double *x, double *y, double *z, double lat, double lon); +void space2geo(double *lat, double *lon, double x, double y, double z); +double distinspace(double x1, double y1, double z1, double x2, double y2, + double z2); +double distonplane(double x1, double y1, double x2, double y2); + -- To view, visit https://gerrit.osmocom.org/14133 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ic48e240ee1484aaa793af23c62a24d2949900b86 Gerrit-Change-Number: 14133 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 22 20:41:46 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 22 May 2019 20:41:46 +0000 Subject: Change in osmocom-bb[master]: contrib/jenkins.sh: Build gprsdecode + laye23 with 'make distcheck' In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14134 ) Change subject: contrib/jenkins.sh: Build gprsdecode + laye23 with 'make distcheck' ...................................................................... contrib/jenkins.sh: Build gprsdecode + laye23 with 'make distcheck' Change-Id: I17c4dfb7bbfcf8da78d688939ee8c0b916cb6b1a --- M contrib/jenkins.sh 1 file changed, 10 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index aa02b28..dc8cda6 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -34,7 +34,16 @@ set -x -for dir in gprsdecode gsmmap layer23 osmocon trxcon virt_phy; do +# building those sub-projects where 'distcheck' is known-working +for dir in gprsdecode layer23; do + cd $base/src/host/$dir + autoreconf -fi + ./configure + make distcheck +done + +# TODO: make sure 'distcheck' passes also for these +for dir in gsmmap osmocon trxcon virt_phy; do cd $base/src/host/$dir autoreconf -fi ./configure -- To view, visit https://gerrit.osmocom.org/14134 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I17c4dfb7bbfcf8da78d688939ee8c0b916cb6b1a Gerrit-Change-Number: 14134 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 06:23:52 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 23 May 2019 06:23:52 +0000 Subject: Change in osmo-ci[master]: jobs/osmocom-obs.yml: set default git branch Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/14138 Change subject: jobs/osmocom-obs.yml: set default git branch ...................................................................... jobs/osmocom-obs.yml: set default git branch I was quite surprised, that the job used "osmith/pdfs-in-doc-subpackage" instead of "master" today [1]. Fix this randomness by adding a branch parameter that defaults to "master". [1] https://jenkins.osmocom.org/jenkins/job/Osmocom_OBS_nightly/98/ Change-Id: I6d1f0e70d5c82ffd551d00ffdf2712cbfaec16cf --- M jobs/osmocom-obs.yml 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/38/14138/1 diff --git a/jobs/osmocom-obs.yml b/jobs/osmocom-obs.yml index 84a4710..5ed67b4 100644 --- a/jobs/osmocom-obs.yml +++ b/jobs/osmocom-obs.yml @@ -19,11 +19,19 @@ (Generated by job-builder) node: obs + parameters: + - string: + name: BRANCH + description: | + osmo-ci.git branch + default: '*/master' builders: - shell: ./scripts/osmocom-{type}-packages.sh scm: - git: + branches: + - '$BRANCH' url: git://git.osmocom.org/osmo-ci git-config-name: 'Jenkins Builder' git-config-email: 'jenkins at osmocom.org' -- To view, visit https://gerrit.osmocom.org/14138 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I6d1f0e70d5c82ffd551d00ffdf2712cbfaec16cf Gerrit-Change-Number: 14138 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 07:19:10 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 23 May 2019 07:19:10 +0000 Subject: Change in osmo-ci[master]: jobs/osmocom-obs.yml: set default git branch In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/14138 ) Change subject: jobs/osmocom-obs.yml: set default git branch ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/14138 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6d1f0e70d5c82ffd551d00ffdf2712cbfaec16cf Gerrit-Change-Number: 14138 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Thu, 23 May 2019 07:19:10 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 07:19:53 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 23 May 2019 07:19:53 +0000 Subject: Change in osmo-ci[master]: jobs/osmocom-obs.yml: set default git branch In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/14138 ) Change subject: jobs/osmocom-obs.yml: set default git branch ...................................................................... Patch Set 3: Verified+1 Clicking on "git" of a previous job shows all the branches it has been building so far, when it should have always built master instead: https://jenkins.osmocom.org/jenkins/job/Osmocom_OBS_nightly/97/git/ -- To view, visit https://gerrit.osmocom.org/14138 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6d1f0e70d5c82ffd551d00ffdf2712cbfaec16cf Gerrit-Change-Number: 14138 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-Comment-Date: Thu, 23 May 2019 07:19:53 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 07:28:04 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 23 May 2019 07:28:04 +0000 Subject: Change in osmo-ci[master]: gitignore: add nightly-rg_* (nightly OBS script) Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/14139 Change subject: gitignore: add nightly-rg_* (nightly OBS script) ...................................................................... gitignore: add nightly-rg_* (nightly OBS script) Change-Id: I943eebc8787b78fef266df5654831e99122a4e6a --- M .gitignore 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/39/14139/1 diff --git a/.gitignore b/.gitignore index 00fe73d..e101b84 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,6 @@ __pycache__/ _temp/ _deps/ + +# osmocom-nightly-packages.sh +nightly-3g_* -- To view, visit https://gerrit.osmocom.org/14139 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I943eebc8787b78fef266df5654831e99122a4e6a Gerrit-Change-Number: 14139 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 07:28:24 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 23 May 2019 07:28:24 +0000 Subject: Change in osmo-ci[master]: gitignore: add nightly-3g_* (nightly OBS script) In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/14139 ) Change subject: gitignore: add nightly-3g_* (nightly OBS script) ...................................................................... gitignore: add nightly-3g_* (nightly OBS script) Change-Id: I943eebc8787b78fef266df5654831e99122a4e6a --- M .gitignore 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/39/14139/2 -- To view, visit https://gerrit.osmocom.org/14139 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I943eebc8787b78fef266df5654831e99122a4e6a Gerrit-Change-Number: 14139 Gerrit-PatchSet: 2 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Thu May 23 07:35:46 2019 From: admin at opensuse.org (OBS Notification) Date: Thu, 23 May 2019 07:35:46 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in xUbuntu_19.04/x86_64 In-Reply-To: References: Message-ID: <5ce64d54217e2_58803905f817393c1@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_19.04/x86_64 Package network:osmocom:nightly/openbsc failed to build in xUbuntu_19.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 166s] | configure: exit 0 [ 166s] [ 166s] # -*- compilation -*- [ 166s] 4. testsuite.at:23: testing db ... [ 166s] ./testsuite.at:28: $abs_top_builddir/tests/db/db_test [ 166s] --- expout 2019-05-23 07:35:24.312000000 +0000 [ 166s] +++ /usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/4/stdout 2019-05-23 07:35:24.468000000 +0000 [ 166s] @@ -1,4 +1,6 @@ [ 166s] Testing subscriber database code. [ 166s] DB: Database initialized. [ 166s] +no tables in statement ! [ 166s] +no tables in statement ! [ 166s] DB: Database prepared. [ 166s] Done [ 166s] 4. testsuite.at:23: 4. db (testsuite.at:23): FAILED (testsuite.at:28) [ 166s] make[1]: *** [debian/rules:30: override_dh_auto_test] Error 1 [ 166s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 166s] make: *** [debian/rules:13: build] Error 2 [ 166s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 166s] [ 166s] lamb01 failed "build openbsc_1.2.0.20190523.dsc" at Thu May 23 07:35:25 UTC 2019. [ 166s] [ 166s] ### VM INTERACTION START ### [ 169s] [ 158.075798] sysrq: SysRq : Power Off [ 169s] [ 158.082209] reboot: Power down [ 170s] ### VM INTERACTION END ### [ 170s] [ 170s] lamb01 failed "build openbsc_1.2.0.20190523.dsc" at Thu May 23 07:35:29 UTC 2019. [ 170s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu May 23 07:39:46 2019 From: admin at opensuse.org (OBS Notification) Date: Thu, 23 May 2019 07:39:46 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in Debian_Unstable/x86_64 In-Reply-To: References: Message-ID: <5ce64e61481c3_58803905f817398dc@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_Unstable/x86_64 Package network:osmocom:nightly/openbsc failed to build in Debian_Unstable/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 191s] | configure: exit 0 [ 191s] [ 191s] # -*- compilation -*- [ 191s] 4. testsuite.at:23: testing db ... [ 191s] ./testsuite.at:28: $abs_top_builddir/tests/db/db_test [ 191s] --- expout 2019-05-23 07:39:36.048000000 +0000 [ 191s] +++ /usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/4/stdout 2019-05-23 07:39:36.204000000 +0000 [ 191s] @@ -1,4 +1,6 @@ [ 191s] Testing subscriber database code. [ 191s] DB: Database initialized. [ 191s] +no tables in statement ! [ 191s] +no tables in statement ! [ 191s] DB: Database prepared. [ 191s] Done [ 191s] 4. testsuite.at:23: 4. db (testsuite.at:23): FAILED (testsuite.at:28) [ 191s] make[1]: *** [debian/rules:30: override_dh_auto_test] Error 1 [ 191s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 191s] make: *** [debian/rules:13: build] Error 2 [ 191s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 191s] [ 191s] lamb24 failed "build openbsc_1.2.0.20190523.dsc" at Thu May 23 07:39:36 UTC 2019. [ 191s] [ 191s] ### VM INTERACTION START ### [ 194s] [ 179.226418] sysrq: SysRq : Power Off [ 194s] [ 179.233844] reboot: Power down [ 194s] ### VM INTERACTION END ### [ 194s] [ 194s] lamb24 failed "build openbsc_1.2.0.20190523.dsc" at Thu May 23 07:39:41 UTC 2019. [ 194s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu May 23 07:40:03 2019 From: admin at opensuse.org (OBS Notification) Date: Thu, 23 May 2019 07:40:03 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in Debian_Testing/x86_64 In-Reply-To: References: Message-ID: <5ce64e63bf442_58803905f81740018@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_Testing/x86_64 Package network:osmocom:nightly/openbsc failed to build in Debian_Testing/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 186s] | configure: exit 0 [ 186s] [ 186s] # -*- compilation -*- [ 186s] 4. testsuite.at:23: testing db ... [ 186s] ./testsuite.at:28: $abs_top_builddir/tests/db/db_test [ 186s] --- expout 2019-05-23 07:39:56.312000000 +0000 [ 186s] +++ /usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/4/stdout 2019-05-23 07:39:56.476000000 +0000 [ 186s] @@ -1,4 +1,6 @@ [ 186s] Testing subscriber database code. [ 186s] DB: Database initialized. [ 186s] +no tables in statement ! [ 186s] +no tables in statement ! [ 186s] DB: Database prepared. [ 186s] Done [ 186s] 4. testsuite.at:23: 4. db (testsuite.at:23): FAILED (testsuite.at:28) [ 186s] make[1]: *** [debian/rules:30: override_dh_auto_test] Error 1 [ 186s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 186s] make: *** [debian/rules:13: build] Error 2 [ 186s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 186s] [ 186s] lamb51 failed "build openbsc_1.2.0.20190523.dsc" at Thu May 23 07:39:57 UTC 2019. [ 186s] [ 186s] ### VM INTERACTION START ### [ 189s] [ 175.182098] sysrq: SysRq : Power Off [ 190s] [ 175.187045] reboot: Power down [ 190s] ### VM INTERACTION END ### [ 190s] [ 190s] lamb51 failed "build openbsc_1.2.0.20190523.dsc" at Thu May 23 07:40:01 UTC 2019. [ 190s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Thu May 23 08:30:53 2019 From: gerrit-no-reply at lists.osmocom.org (Keith Whyte) Date: Thu, 23 May 2019 08:30:53 +0000 Subject: Change in openbsc[master]: tests: Mute stdout during db_prepare() Message-ID: Keith Whyte has uploaded this change for review. ( https://gerrit.osmocom.org/14140 Change subject: tests: Mute stdout during db_prepare() ...................................................................... tests: Mute stdout during db_prepare() libdbi on debian unstable (at least) outputs: "no table in statement !" breaking the db_test. Redirect stdout to /dev/null and restore after the function completes. Closes OS#4016 Change-Id: I8227aa8fa44d3237019db52dd0825f827797261b --- M openbsc/tests/db/db_test.c 1 file changed, 21 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/40/14140/1 diff --git a/openbsc/tests/db/db_test.c b/openbsc/tests/db/db_test.c index 755a6e9..5167185 100644 --- a/openbsc/tests/db/db_test.c +++ b/openbsc/tests/db/db_test.c @@ -30,6 +30,7 @@ #include #include #include +#include static struct gsm_network dummy_net; static struct gsm_subscriber_group dummy_sgrp; @@ -208,6 +209,8 @@ dummy_net.subscr_group = &dummy_sgrp; dummy_sgrp.net = &dummy_net; + int rc; + fpos_t pos; if (db_init("hlr.sqlite3")) { printf("DB: Failed to init database. Please check the option settings.\n"); @@ -215,10 +218,27 @@ } printf("DB: Database initialized.\n"); - if (db_prepare()) { + /* Muting stdout here because libdbi + * may output noise on some platforms */ + + fflush(stdout); + fgetpos(stdout, &pos); + int old_stdout = dup(fileno(stdout)); + freopen("/dev/null", "w", stdout); + + rc = db_prepare(); + + fflush(stdout); + dup2(old_stdout, fileno(stdout)); + close(old_stdout); + clearerr(stdout); + fsetpos(stdout, &pos); + + if (rc) { printf("DB: Failed to prepare database.\n"); return 1; } + printf("DB: Database prepared.\n"); struct gsm_subscriber *alice = NULL; -- To view, visit https://gerrit.osmocom.org/14140 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I8227aa8fa44d3237019db52dd0825f827797261b Gerrit-Change-Number: 14140 Gerrit-PatchSet: 1 Gerrit-Owner: Keith Whyte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 09:47:09 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 May 2019 09:47:09 +0000 Subject: Change in osmo-bts[master]: sysmo: Fix "nominal power" / BS power display in VTY In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14137 ) Change subject: sysmo: Fix "nominal power" / BS power display in VTY ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If92d0b15c48dafc63776b82c7ff5f3c2b3505f68 Gerrit-Change-Number: 14137 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: roh Gerrit-Comment-Date: Thu, 23 May 2019 09:47:09 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 09:53:22 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 May 2019 09:53:22 +0000 Subject: Change in osmo-ci[master]: jobs/osmocom-obs.yml: set default git branch In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14138 ) Change subject: jobs/osmocom-obs.yml: set default git branch ...................................................................... Patch Set 3: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/14138/3/jobs/osmocom-obs.yml File jobs/osmocom-obs.yml: https://gerrit.osmocom.org/#/c/14138/3/jobs/osmocom-obs.yml at 25 PS3, Line 25: description: | why two lines here? -- To view, visit https://gerrit.osmocom.org/14138 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6d1f0e70d5c82ffd551d00ffdf2712cbfaec16cf Gerrit-Change-Number: 14138 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-Comment-Date: Thu, 23 May 2019 09:53:22 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 09:54:19 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 May 2019 09:54:19 +0000 Subject: Change in osmo-ci[master]: gitignore: add nightly-3g_* (nightly OBS script) In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14139 ) Change subject: gitignore: add nightly-3g_* (nightly OBS script) ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14139 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I943eebc8787b78fef266df5654831e99122a4e6a Gerrit-Change-Number: 14139 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Thu, 23 May 2019 09:54:19 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 10:55:51 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 May 2019 10:55:51 +0000 Subject: Change in openbsc[master]: mgcp: Handle CI ad X-Osmux param name as case insensitive In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14131 ) Change subject: mgcp: Handle CI ad X-Osmux param name as case insensitive ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/14131 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iadc004064a5a237c93009f242cb943ebc4d2d7e6 Gerrit-Change-Number: 14131 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Thu, 23 May 2019 10:55:51 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 10:56:18 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 May 2019 10:56:18 +0000 Subject: Change in openbsc[master]: mgcp: Handle CI ad X-Osmux param name as case insensitive In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14131 ) Change subject: mgcp: Handle CI ad X-Osmux param name as case insensitive ...................................................................... Patch Set 2: Issue is fixed now, ready to review. With this patch TTCN3 bsc-nat osmux test runs fine. -- To view, visit https://gerrit.osmocom.org/14131 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iadc004064a5a237c93009f242cb943ebc4d2d7e6 Gerrit-Change-Number: 14131 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Thu, 23 May 2019 10:56:18 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 11:08:30 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 23 May 2019 11:08:30 +0000 Subject: Change in osmo-ci[master]: jobs/osmocom-obs.yml: set default git branch In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Harald Welte, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14138 to look at the new patch set (#4). Change subject: jobs/osmocom-obs.yml: set default git branch ...................................................................... jobs/osmocom-obs.yml: set default git branch I was quite surprised, that the job used "osmith/pdfs-in-doc-subpackage" instead of "master" today [1]. Fix this randomness by adding a branch parameter that defaults to "master". Interestingly, we have to set the default branch to "refs/remotes/origin/master". When using "*/master" (like we do in other jobs), Jenkins would still chose my branch over "origin/master", even though mine does not have "master" in the name. I have also tried "chosing-strategy: 'default'", in case it was using the gerrit strategy for some reason (like in [2]), and setting 'refspec:', but both did not have any effect. [1] https://jenkins.osmocom.org/jenkins/job/Osmocom_OBS_nightly/98/ [2] https://issues.jenkins-ci.org/browse/JENKINS-26981 Change-Id: I6d1f0e70d5c82ffd551d00ffdf2712cbfaec16cf --- M jobs/osmocom-obs.yml 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/38/14138/4 -- To view, visit https://gerrit.osmocom.org/14138 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6d1f0e70d5c82ffd551d00ffdf2712cbfaec16cf Gerrit-Change-Number: 14138 Gerrit-PatchSet: 4 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 11:09:09 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 23 May 2019 11:09:09 +0000 Subject: Change in osmo-ci[master]: jobs/osmocom-obs.yml: set default git branch In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/14138 ) Change subject: jobs/osmocom-obs.yml: set default git branch ...................................................................... Patch Set 4: Verified+1 (1 comment) https://gerrit.osmocom.org/#/c/14138/3/jobs/osmocom-obs.yml File jobs/osmocom-obs.yml: https://gerrit.osmocom.org/#/c/14138/3/jobs/osmocom-obs.yml at 25 PS3, Line 25: description: osmo-ci.git branch > why two lines here? Copy paste from other jenkins-job-builder configs we have. Updated to be in one line. -- To view, visit https://gerrit.osmocom.org/14138 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6d1f0e70d5c82ffd551d00ffdf2712cbfaec16cf Gerrit-Change-Number: 14138 Gerrit-PatchSet: 4 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-Comment-Date: Thu, 23 May 2019 11:09:09 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 11:45:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 11:45:53 +0000 Subject: Change in osmo-ci[master]: jobs/osmocom-obs.yml: set default git branch In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14138 ) Change subject: jobs/osmocom-obs.yml: set default git branch ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14138 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6d1f0e70d5c82ffd551d00ffdf2712cbfaec16cf Gerrit-Change-Number: 14138 Gerrit-PatchSet: 4 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-Comment-Date: Thu, 23 May 2019 11:45:53 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 11:45:54 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 11:45:54 +0000 Subject: Change in osmo-ci[master]: jobs/osmocom-obs.yml: set default git branch In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14138 ) Change subject: jobs/osmocom-obs.yml: set default git branch ...................................................................... jobs/osmocom-obs.yml: set default git branch I was quite surprised, that the job used "osmith/pdfs-in-doc-subpackage" instead of "master" today [1]. Fix this randomness by adding a branch parameter that defaults to "master". Interestingly, we have to set the default branch to "refs/remotes/origin/master". When using "*/master" (like we do in other jobs), Jenkins would still chose my branch over "origin/master", even though mine does not have "master" in the name. I have also tried "chosing-strategy: 'default'", in case it was using the gerrit strategy for some reason (like in [2]), and setting 'refspec:', but both did not have any effect. [1] https://jenkins.osmocom.org/jenkins/job/Osmocom_OBS_nightly/98/ [2] https://issues.jenkins-ci.org/browse/JENKINS-26981 Change-Id: I6d1f0e70d5c82ffd551d00ffdf2712cbfaec16cf --- M jobs/osmocom-obs.yml 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: osmith: Verified Harald Welte: Looks good to me, approved diff --git a/jobs/osmocom-obs.yml b/jobs/osmocom-obs.yml index 84a4710..023ab0c 100644 --- a/jobs/osmocom-obs.yml +++ b/jobs/osmocom-obs.yml @@ -19,11 +19,18 @@ (Generated by job-builder) node: obs + parameters: + - string: + name: BRANCH + description: osmo-ci.git branch + default: 'refs/remotes/origin/master' builders: - shell: ./scripts/osmocom-{type}-packages.sh scm: - git: + branches: + - '$BRANCH' url: git://git.osmocom.org/osmo-ci git-config-name: 'Jenkins Builder' git-config-email: 'jenkins at osmocom.org' -- To view, visit https://gerrit.osmocom.org/14138 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I6d1f0e70d5c82ffd551d00ffdf2712cbfaec16cf Gerrit-Change-Number: 14138 Gerrit-PatchSet: 4 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 11:47:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 11:47:19 +0000 Subject: Change in osmo-ci[master]: gitignore: add nightly-3g_* (nightly OBS script) In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14139 ) Change subject: gitignore: add nightly-3g_* (nightly OBS script) ...................................................................... Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/14139 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I943eebc8787b78fef266df5654831e99122a4e6a Gerrit-Change-Number: 14139 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Thu, 23 May 2019 11:47:19 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 11:47:27 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 11:47:27 +0000 Subject: Change in osmo-ci[master]: gitignore: add nightly-3g_* (nightly OBS script) In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14139 ) Change subject: gitignore: add nightly-3g_* (nightly OBS script) ...................................................................... Patch Set 2: -Verified Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14139 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I943eebc8787b78fef266df5654831e99122a4e6a Gerrit-Change-Number: 14139 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Thu, 23 May 2019 11:47:27 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 11:47:32 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 11:47:32 +0000 Subject: Change in osmo-ci[master]: gitignore: add nightly-3g_* (nightly OBS script) In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14139 ) Change subject: gitignore: add nightly-3g_* (nightly OBS script) ...................................................................... Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/14139 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I943eebc8787b78fef266df5654831e99122a4e6a Gerrit-Change-Number: 14139 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Thu, 23 May 2019 11:47:32 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 11:47:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 11:47:33 +0000 Subject: Change in osmo-ci[master]: gitignore: add nightly-3g_* (nightly OBS script) In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14139 ) Change subject: gitignore: add nightly-3g_* (nightly OBS script) ...................................................................... gitignore: add nightly-3g_* (nightly OBS script) Change-Id: I943eebc8787b78fef266df5654831e99122a4e6a --- M .gitignore 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified Pau Espin Pedrol: Looks good to me, approved diff --git a/.gitignore b/.gitignore index 00fe73d..e101b84 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,6 @@ __pycache__/ _temp/ _deps/ + +# osmocom-nightly-packages.sh +nightly-3g_* -- To view, visit https://gerrit.osmocom.org/14139 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I943eebc8787b78fef266df5654831e99122a4e6a Gerrit-Change-Number: 14139 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 11:47:57 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 11:47:57 +0000 Subject: Change in openbsc[master]: tests: Mute stdout during db_prepare() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14140 ) Change subject: tests: Mute stdout during db_prepare() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14140 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8227aa8fa44d3237019db52dd0825f827797261b Gerrit-Change-Number: 14140 Gerrit-PatchSet: 1 Gerrit-Owner: Keith Whyte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 23 May 2019 11:47:57 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 11:47:58 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 11:47:58 +0000 Subject: Change in openbsc[master]: tests: Mute stdout during db_prepare() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14140 ) Change subject: tests: Mute stdout during db_prepare() ...................................................................... tests: Mute stdout during db_prepare() libdbi on debian unstable (at least) outputs: "no table in statement !" breaking the db_test. Redirect stdout to /dev/null and restore after the function completes. Closes OS#4016 Change-Id: I8227aa8fa44d3237019db52dd0825f827797261b --- M openbsc/tests/db/db_test.c 1 file changed, 21 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/openbsc/tests/db/db_test.c b/openbsc/tests/db/db_test.c index 755a6e9..5167185 100644 --- a/openbsc/tests/db/db_test.c +++ b/openbsc/tests/db/db_test.c @@ -30,6 +30,7 @@ #include #include #include +#include static struct gsm_network dummy_net; static struct gsm_subscriber_group dummy_sgrp; @@ -208,6 +209,8 @@ dummy_net.subscr_group = &dummy_sgrp; dummy_sgrp.net = &dummy_net; + int rc; + fpos_t pos; if (db_init("hlr.sqlite3")) { printf("DB: Failed to init database. Please check the option settings.\n"); @@ -215,10 +218,27 @@ } printf("DB: Database initialized.\n"); - if (db_prepare()) { + /* Muting stdout here because libdbi + * may output noise on some platforms */ + + fflush(stdout); + fgetpos(stdout, &pos); + int old_stdout = dup(fileno(stdout)); + freopen("/dev/null", "w", stdout); + + rc = db_prepare(); + + fflush(stdout); + dup2(old_stdout, fileno(stdout)); + close(old_stdout); + clearerr(stdout); + fsetpos(stdout, &pos); + + if (rc) { printf("DB: Failed to prepare database.\n"); return 1; } + printf("DB: Database prepared.\n"); struct gsm_subscriber *alice = NULL; -- To view, visit https://gerrit.osmocom.org/14140 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I8227aa8fa44d3237019db52dd0825f827797261b Gerrit-Change-Number: 14140 Gerrit-PatchSet: 1 Gerrit-Owner: Keith Whyte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 11:56:58 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 May 2019 11:56:58 +0000 Subject: Change in openbsc[master]: mgcp: Handle CI ad X-Osmux param name as case insensitive In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14131 to look at the new patch set (#3). Change subject: mgcp: Handle CI ad X-Osmux param name as case insensitive ...................................................................... mgcp: Handle CI ad X-Osmux param name as case insensitive RFC3435 states most text (except SDP) must be handled as case insensitive. Since we are no longer using strstr(msg->l2h), we need to iterate per line and call related extract/handle function for that line. Call to bsc_mgcp_osmux_confirm() is left at the end because it needs to be called too in case no matching line is found. In that case, it will release the CID. Similar stuff ocurrs for bsc_mgcp_extract_ci(). Related: OS#4001 Change-Id: Iadc004064a5a237c93009f242cb943ebc4d2d7e6 --- M openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c M openbsc/tests/bsc-nat/bsc_nat_test.c 2 files changed, 62 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/31/14131/3 -- To view, visit https://gerrit.osmocom.org/14131 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iadc004064a5a237c93009f242cb943ebc4d2d7e6 Gerrit-Change-Number: 14131 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 12:42:58 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 May 2019 12:42:58 +0000 Subject: Change in openbsc[master]: mgcp: Handle CI and X-Osmux param name as case insensitive In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14131 to look at the new patch set (#4). Change subject: mgcp: Handle CI and X-Osmux param name as case insensitive ...................................................................... mgcp: Handle CI and X-Osmux param name as case insensitive RFC3435 states most text (except SDP) must be handled as case insensitive. Since we are no longer using strstr(msg->l2h), we need to iterate per line and call related extract/handle function for that line. Call to bsc_mgcp_osmux_confirm() is left at the end because it needs to be called too in case no matching line is found. In that case, it will release the CID. Similar stuff ocurrs for bsc_mgcp_extract_ci(). Related: OS#4001 Change-Id: Iadc004064a5a237c93009f242cb943ebc4d2d7e6 --- M openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c M openbsc/tests/bsc-nat/bsc_nat_test.c 2 files changed, 62 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/31/14131/4 -- To view, visit https://gerrit.osmocom.org/14131 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iadc004064a5a237c93009f242cb943ebc4d2d7e6 Gerrit-Change-Number: 14131 Gerrit-PatchSet: 4 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 13:14:50 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 May 2019 13:14:50 +0000 Subject: Change in osmo-ttcn3-hacks[master]: BSSMAP_templates: Update templates to set Osmux fields Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14141 Change subject: BSSMAP_templates: Update templates to set Osmux fields ...................................................................... BSSMAP_templates: Update templates to set Osmux fields After new fields (osmux osmocom extensions) were added to BSSMAP Reset and BSSMAP AssignReq/AssignCompl in titan.ProtocolModules.BSSMAP, we need to set them in ts_* templates, otherwise TTCN3 runtimes fails with: """ BSC_Tests.ttcn:143 Dynamic test case error: Performing a valueof or send operation on a non-specific template of type @BSSAP_Types.BSSMAP_IE_Osmo_OsmuxSupport. """ Fixes: fe0c6083bd7176b8375fafc6d6399772d85a70a3 Depends: titan.ProtocolModules.BSSMAP Iaf1e137269c0da20b2c96fd104b57edf336693af Change-Id: I568100376cf8a47c01a33bada97bf8eaa7c07fcd --- M library/BSSMAP_Templates.ttcn 1 file changed, 44 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/41/14141/1 diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index 02c84e2..ad314a3 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -164,47 +164,62 @@ oldToNewBSSIEs := val } -template (value) PDU_BSSAP ts_BSSMAP_Reset(BssmapCause cause) modifies ts_BSSAP_BSSMAP := { +template BSSMAP_IE_Osmo_OsmuxSupport tr_BSSMAP_IE_Osmo_OsmuxSupport := { + elementIdentifier := 'F0'O +} + +private function f_enc_osmux_support(boolean osmux_enabled) return template BSSMAP_IE_Osmo_OsmuxSupport { + if (osmux_enabled) { + return tr_BSSMAP_IE_Osmo_OsmuxSupport; + } + return omit; +} + +template (value) PDU_BSSAP ts_BSSMAP_Reset(BssmapCause cause, boolean osmux_enabled := false) modifies ts_BSSAP_BSSMAP := { pdu := { bssmap := { reset := { messageType := '30'O, cause := ts_BSSMAP_IE_Cause(cause), - a_InterfaceSelectorForReset := omit + a_InterfaceSelectorForReset := omit, + osmuxSupport := f_enc_osmux_support(osmux_enabled) } } } } -template PDU_BSSAP tr_BSSMAP_Reset modifies tr_BSSAP_BSSMAP := { +template PDU_BSSAP tr_BSSMAP_Reset(boolean osmux_enabled := false) modifies tr_BSSAP_BSSMAP := { pdu := { bssmap := { reset := { messageType := '30'O, cause := ?, - a_InterfaceSelectorForReset := * + a_InterfaceSelectorForReset := *, + osmuxSupport := f_enc_osmux_support(osmux_enabled) } } } } -template (value) PDU_BSSAP ts_BSSMAP_ResetAck modifies ts_BSSAP_BSSMAP := { +template (value) PDU_BSSAP ts_BSSMAP_ResetAck(boolean osmux_enabled := false) modifies ts_BSSAP_BSSMAP := { pdu := { bssmap := { resetAck := { messageType := '31'O, - a_InterfaceSelectorForReset := omit + a_InterfaceSelectorForReset := omit, + osmuxSupport := f_enc_osmux_support(osmux_enabled) } } } } -template PDU_BSSAP tr_BSSMAP_ResetAck modifies tr_BSSAP_BSSMAP := { +template PDU_BSSAP tr_BSSMAP_ResetAck(boolean osmux_enabled := false) modifies tr_BSSAP_BSSMAP := { pdu := { bssmap := { resetAck := { messageType := '31'O, - a_InterfaceSelectorForReset := * + a_InterfaceSelectorForReset := *, + osmuxSupport := f_enc_osmux_support(osmux_enabled) } } } @@ -443,9 +458,15 @@ codecElements := valueof(elem) } +template (value) BSSMAP_IE_Osmo_OsmuxCID ts_OsmuxCID(INT1 cid) := { + elementIdentifier := 'F1'O, + osmuxCID := cid +} + template PDU_BSSAP ts_BSSMAP_AssignmentReq(template BSSMAP_IE_CircuitIdentityCode cic := omit, - template BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit) + template BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit, + template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := omit) modifies ts_BSSAP_BSSMAP := { pdu := { bssmap := { @@ -472,14 +493,16 @@ globalCallReference := omit, lCLS_Configuration := omit, lCLS_ConnectionStatusControl := omit, - lCLS_CorrelationNotNeeded := omit + lCLS_CorrelationNotNeeded := omit, + osmuxCID := osmuxCID } } } } template PDU_BSSAP tr_BSSMAP_AssignmentReq(template BSSMAP_IE_CircuitIdentityCode cic := *, - template BSSMAP_IE_AoIP_TransportLayerAddress aoip := *) + template BSSMAP_IE_AoIP_TransportLayerAddress aoip := *, + template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := *) modifies tr_BSSAP_BSSMAP := { pdu := { bssmap := { @@ -506,7 +529,8 @@ globalCallReference := *, lCLS_Configuration := *, lCLS_ConnectionStatusControl := *, - lCLS_CorrelationNotNeeded := * + lCLS_CorrelationNotNeeded := *, + osmuxCID := osmuxCID } } } @@ -515,7 +539,8 @@ template PDU_BSSAP ts_BSSMAP_AssignmentComplete(template BSSMAP_IE_CircuitIdentityCode cic := omit, template BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit, - template BSSMAP_IE_SpeechCodec speechCodec := omit) + template BSSMAP_IE_SpeechCodec speechCodec := omit, + template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := omit) modifies ts_BSSAP_BSSMAP := { pdu := { bssmap := { @@ -533,14 +558,16 @@ aoIPTransportLayer := aoip, speechCodec := speechCodec, codecList := omit, - lCLS_BSS_Status := omit + lCLS_BSS_Status := omit, + osmuxCID := osmuxCID } } } } template PDU_BSSAP tr_BSSMAP_AssignmentComplete(template BSSMAP_IE_CircuitIdentityCode cic := *, - template BSSMAP_IE_AoIP_TransportLayerAddress aoip := *) + template BSSMAP_IE_AoIP_TransportLayerAddress aoip := *, + template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := *) modifies tr_BSSAP_BSSMAP := { pdu := { bssmap := { @@ -558,7 +585,8 @@ aoIPTransportLayer := aoip, speechCodec := *, codecList := *, - lCLS_BSS_Status := * + lCLS_BSS_Status := *, + osmuxCID := osmuxCID } } } -- To view, visit https://gerrit.osmocom.org/14141 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I568100376cf8a47c01a33bada97bf8eaa7c07fcd Gerrit-Change-Number: 14141 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 13:15:55 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 13:15:55 +0000 Subject: Change in openbsc[master]: mgcp: Handle CI and X-Osmux param name as case insensitive In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14131 ) Change subject: mgcp: Handle CI and X-Osmux param name as case insensitive ...................................................................... Patch Set 4: (1 comment) https://gerrit.osmocom.org/#/c/14131/4/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c File openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c: https://gerrit.osmocom.org/#/c/14131/4/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c at 695 PS4, Line 695: if (sscanf(str + 9, "%u", &osmux_cid) != 1) { I would suggest to use a variable, i.e. "x_osmux_len = strlen("X-Osmux: "); and then use it both in the strncasecmp avbove and here. This should be optimized away by a good compiler, and it avoids either repeating oneself or magic numbers. Or if you want to use "9", then at least have a #define somewhere -- To view, visit https://gerrit.osmocom.org/14131 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iadc004064a5a237c93009f242cb943ebc4d2d7e6 Gerrit-Change-Number: 14131 Gerrit-PatchSet: 4 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Harald Welte Gerrit-Comment-Date: Thu, 23 May 2019 13:15:55 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 13:31:51 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 May 2019 13:31:51 +0000 Subject: Change in openbsc[master]: mgcp: Handle CI and X-Osmux param name as case insensitive In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14131 to look at the new patch set (#5). Change subject: mgcp: Handle CI and X-Osmux param name as case insensitive ...................................................................... mgcp: Handle CI and X-Osmux param name as case insensitive RFC3435 states most text (except SDP) must be handled as case insensitive. Since we are no longer using strstr(msg->l2h), we need to iterate per line and call related extract/handle function for that line. Call to bsc_mgcp_osmux_confirm() is left at the end because it needs to be called too in case no matching line is found. In that case, it will release the CID. Similar stuff ocurrs for bsc_mgcp_extract_ci(). Related: OS#4001 Change-Id: Iadc004064a5a237c93009f242cb943ebc4d2d7e6 --- M openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c M openbsc/tests/bsc-nat/bsc_nat_test.c 2 files changed, 66 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/31/14131/5 -- To view, visit https://gerrit.osmocom.org/14131 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iadc004064a5a237c93009f242cb943ebc4d2d7e6 Gerrit-Change-Number: 14131 Gerrit-PatchSet: 5 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 13:39:20 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 May 2019 13:39:20 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Introduce Osmux infra and one test for osmo-msc In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14121 to look at the new patch set (#4). Change subject: msc: Introduce Osmux infra and one test for osmo-msc ...................................................................... msc: Introduce Osmux infra and one test for osmo-msc Change-Id: Ibcb82d1a2d570c6c0ad0c3b6504bffe2244eccd9 --- M library/MGCP_Templates.ttcn M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn 3 files changed, 126 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/21/14121/4 -- To view, visit https://gerrit.osmocom.org/14121 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibcb82d1a2d570c6c0ad0c3b6504bffe2244eccd9 Gerrit-Change-Number: 14121 Gerrit-PatchSet: 4 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 13:39:21 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 May 2019 13:39:21 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bsc-nat: Introduce Osmux test Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14142 Change subject: bsc-nat: Introduce Osmux test ...................................................................... bsc-nat: Introduce Osmux test Depends: openbsc.git Iadc004064a5a237c93009f242cb943ebc4d2d7e6 Change-Id: I35f206aab713ccf0a4e074872e291c349c903b9d --- M bsc-nat/BSCNAT_Tests.default M bsc-nat/BSCNAT_Tests.ttcn M bsc-nat/BSC_MS_ConnectionHandler.ttcn M bsc-nat/BSC_MS_Simulation.ttcn M bsc-nat/gen_links.sh M bsc-nat/regen_makefile.sh 6 files changed, 80 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/42/14142/1 diff --git a/bsc-nat/BSCNAT_Tests.default b/bsc-nat/BSCNAT_Tests.default index 37c1048..3374bcf 100644 --- a/bsc-nat/BSCNAT_Tests.default +++ b/bsc-nat/BSCNAT_Tests.default @@ -4,8 +4,19 @@ [TESTPORT_PARAMETERS] #*.*.udpReuseAddress := "yes"; +*.BSCNATVTY.CTRL_MODE := "client" +*.BSCNATVTY.CTRL_HOSTNAME := "127.0.0.1" +*.BSCNATVTY.CTRL_PORTNUM := "4244" +*.BSCNATVTY.CTRL_LOGIN_SKIPPED := "yes" +*.BSCNATVTY.CTRL_DETECT_SERVER_DISCONNECTED := "yes" +*.BSCNATVTY.CTRL_READMODE := "buffered" +*.BSCNATVTY.CTRL_CLIENT_CLEANUP_LINEFEED := "yes" +*.BSCNATVTY.CTRL_DETECT_CONNECTION_ESTABLISHMENT_RESULT := "yes" +*.BSCNATVTY.PROMPT1 := "OsmoBSCNAT> " + [MODULE_PARAMETERS] +Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoBSCNAT"; mp_bsc_port := 49999; mp_bsc_ip := "127.0.0.1"; mp_msc_port := 5100; @@ -22,4 +33,3 @@ mp_mgw_udp_port := 2427; [EXECUTE] - diff --git a/bsc-nat/BSCNAT_Tests.ttcn b/bsc-nat/BSCNAT_Tests.ttcn index 993d668..104e89f 100644 --- a/bsc-nat/BSCNAT_Tests.ttcn +++ b/bsc-nat/BSCNAT_Tests.ttcn @@ -15,6 +15,9 @@ import from MSC_Simulation all; import from BSC_MS_Simulation all; +import from Osmocom_VTY_Functions all; +import from TELNETasp_PortType all; + const integer NUM_MSC := 1; const integer NUM_BSC := 1; @@ -35,6 +38,8 @@ var MscState msc[NUM_MSC]; var BscState bsc[NUM_BSC]; + port TELNETasp_PT BSCNATVTY; + var boolean g_initialized := false; var octetstring g_sio := '83'O; } @@ -101,10 +106,31 @@ msc_st.sccp_addr_own := valueof(ts_SccpAddr_PC_SSN(opc, local_ssn)); } -function f_init() runs on test_CT { +function f_vty_allow_osmux(boolean allow) runs on test_CT { + if (allow) { + f_vty_config(BSCNATVTY, "mgcp", "osmux on"); + } else { + f_vty_config(BSCNATVTY, "mgcp", "osmux off"); + } +} + +function f_init_vty(charstring id := "foo") runs on test_CT { + if (BSCNATVTY.checkstate("Mapped")) { + /* skip initialization if already executed once */ + return; + } + map(self:BSCNATVTY, system:BSCNATVTY); + f_vty_set_prompts(BSCNATVTY); + f_vty_transceive(BSCNATVTY, "enable"); +} + +function f_init(boolean use_osmux) runs on test_CT { var integer i; var charstring id; + f_init_vty("VirtBSCNAT"); + f_vty_allow_osmux(use_osmux); + for (i := 0; i < NUM_MSC; i := i+1) { f_init_MscState(msc[i], mp_msc_pc +i, mp_bsc_pc, mp_msc_ssn, mp_bsc_ssn); id := "MSC" & int2str(i); @@ -114,22 +140,23 @@ /* Wait for bsc_nat to attach to MSC. Before that all BSC connections will be dropped */ f_sleep(5.0); + for (i := 0; i < NUM_BSC; i := i+1) { f_init_BscState(bsc[i], mp_bsc_pc +i, mp_msc_pc, mp_bsc_ssn, mp_msc_ssn); id := "BSC" & int2str(i); bsc[i].BSC := BSC_CT.create(id); bsc[i].BSC.start(BSC_MS_Simulation.main(mp_nat_ip, mp_nat_port, mp_bsc_ip, mp_bsc_port+i, bsc[i].sccp_pars, bsc[i].sccp_addr_own, - bsc[i].sccp_addr_peer, id)); + bsc[i].sccp_addr_peer, use_osmux, id)); } } -testcase TC_recv_dump() runs on test_CT { +function f_TC_recv_dump(boolean use_osmux := false) runs on test_CT { var integer i; timer T := 30.0; - f_init(); + f_init(use_osmux); alt { /* wait for BSC to stop. The idea is that the BSC components terminate first */ @@ -144,8 +171,17 @@ } } +testcase TC_recv_dump() runs on test_CT { + f_TC_recv_dump(); +} + +testcase TC_recv_dump_osmux() runs on test_CT { + f_TC_recv_dump(true); +} + control { execute( TC_recv_dump() ); + execute( TC_recv_dump_osmux() ); } } diff --git a/bsc-nat/BSC_MS_ConnectionHandler.ttcn b/bsc-nat/BSC_MS_ConnectionHandler.ttcn index 28ff349..eb376db 100644 --- a/bsc-nat/BSC_MS_ConnectionHandler.ttcn +++ b/bsc-nat/BSC_MS_ConnectionHandler.ttcn @@ -54,6 +54,7 @@ decode_dtap := false, role_ms := true, protocol := RAN_PROTOCOL_BSSAP, + /* Always false. We don't want to enable Osmux signalling in SCCPLite messages: */ use_osmux := false, sccp_addr_local := omit, sccp_addr_peer := omit @@ -80,11 +81,12 @@ } /* main function processing various incoming events */ -function main(SCCP_PAR_Address sccp_addr_own, SCCP_PAR_Address sccp_addr_remote) +function main(SCCP_PAR_Address sccp_addr_own, SCCP_PAR_Address sccp_addr_remote, boolean use_osmux) runs on BSC_MS_ConnHdlr { var PDU_BSSAP bssap; var MgcpCommand mgcp_cmd; - var MgcpResponse mgcp_resp; + var template MgcpResponse mgcp_resp; + var MgcpOsmuxCID osmux_cid; log("Starting main of BSC_MS_ConnHdlr"); @@ -118,7 +120,19 @@ valueof(ts_SDP_ptime(20)) })); /* respond with CRCX_ACK */ g_state := BSC_STATE_WAIT_MDCX; - BSSAP.send(ts_CRCX_ACK(mgcp_cmd.line.trans_id, g_mgcp_conn_id, g_sdp)); + + if (use_osmux != f_MgcpCmd_contains_par(mgcp_cmd, "X-OSMUX")) { + setverdict(fail, log2str("Received Osmux CID presence doesn't match presence expectancy (", use_osmux, ")")); + self.stop; + } + + if (use_osmux) { + osmux_cid := f_MgcpCmd_extract_osmux_cid(mgcp_cmd); + mgcp_resp := ts_CRCX_ACK_osmux(mgcp_cmd.line.trans_id, g_mgcp_conn_id, osmux_cid, g_sdp); + } else { + mgcp_resp := ts_CRCX_ACK(mgcp_cmd.line.trans_id, g_mgcp_conn_id, g_sdp); + } + BSSAP.send(valueof(mgcp_resp)); } /* MDCX -> OK */ diff --git a/bsc-nat/BSC_MS_Simulation.ttcn b/bsc-nat/BSC_MS_Simulation.ttcn index c45b5ac..bab1fab 100644 --- a/bsc-nat/BSC_MS_Simulation.ttcn +++ b/bsc-nat/BSC_MS_Simulation.ttcn @@ -23,6 +23,7 @@ var SCCP_PAR_Address g_sccp_addr_own; var SCCP_PAR_Address g_sccp_addr_remote; + var boolean g_use_osmux; var charstring g_bsc_num_str; } @@ -35,7 +36,8 @@ charstring local_ip, PortNumber local_port, MSC_SCCP_MTP3_parameters sccp_pars, SCCP_PAR_Address sccp_addr_own, - SCCP_PAR_Address sccp_addr_remote, charstring id) runs on BSC_CT + SCCP_PAR_Address sccp_addr_remote, + boolean use_osmux, charstring id) runs on BSC_CT { var integer i := 0; timer T := 1.0; @@ -44,6 +46,7 @@ g_sccp_addr_own := sccp_addr_own; g_sccp_addr_remote := sccp_addr_remote; + g_use_osmux := use_osmux; /* create components for IPA/SCCP/BSS[M]AP stack */ vc_IPA := IPA_Emulation_CT.create(id & "-IPA"); @@ -88,7 +91,7 @@ /* connect client BSSAP port to BSSAP dispatcher */ connect(vc_conn:BSSAP, vc_BSSMAP:CLIENT); /* start component */ - vc_conn.start(BSC_MS_ConnectionHandler.main(g_sccp_addr_own, g_sccp_addr_remote)); + vc_conn.start(BSC_MS_ConnectionHandler.main(g_sccp_addr_own, g_sccp_addr_remote, g_use_osmux)); /* blocking wait until component terminates. If you want to start MSs in parallel, * you have to remove this statement here */ vc_conn.done; diff --git a/bsc-nat/gen_links.sh b/bsc-nat/gen_links.sh index 7b7f928..01d4c7b 100755 --- a/bsc-nat/gen_links.sh +++ b/bsc-nat/gen_links.sh @@ -20,6 +20,11 @@ FILES="IPL4asp_Functions.ttcn IPL4asp_PT.cc IPL4asp_PT.hh IPL4asp_PortType.ttcn IPL4asp_Types.ttcn IPL4asp_discovery.cc IPL4asp_protocol_L234.hh" gen_links $DIR $FILES +# for Osmocom_VTY +DIR=$BASEDIR/titan.TestPorts.TELNETasp/src +FILES="TELNETasp_PT.cc TELNETasp_PT.hh TELNETasp_PortType.ttcn" +gen_links $DIR $FILES + # required by SCCP Emulation DIR=$BASEDIR/titan.TestPorts.MTP3asp/src FILES="MTP3asp_PortType.ttcn MTP3asp_Types.ttcn" @@ -47,7 +52,7 @@ gen_links $DIR $FILES DIR=../library -FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp L3_Templates.ttcn BSSMAP_Templates.ttcn RAN_Emulation.ttcnpp MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn BSSAP_CodecPort.ttcn" +FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp L3_Templates.ttcn BSSMAP_Templates.ttcn RAN_Emulation.ttcnpp MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc Osmocom_CTRL_Types.ttcn Osmocom_VTY_Functions.ttcn Osmocom_CTRL_Functions.ttcn BSSAP_CodecPort.ttcn" gen_links $DIR $FILES ignore_pp_results diff --git a/bsc-nat/regen_makefile.sh b/bsc-nat/regen_makefile.sh index f49df7e..0f3cfab 100755 --- a/bsc-nat/regen_makefile.sh +++ b/bsc-nat/regen_makefile.sh @@ -2,7 +2,7 @@ MAIN=BSCNAT_Tests.ttcn -FILES="*.ttcn *.ttcnpp SCCP_EncDec.cc IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc RTP_EncDec.cc SDP_EncDec.cc *.c MGCP_CodecPort_CtrlFunctDef.cc" +FILES="*.ttcn *.ttcnpp SCCP_EncDec.cc IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc RTP_EncDec.cc SDP_EncDec.cc *.c MGCP_CodecPort_CtrlFunctDef.cc TELNETasp_PT.cc" export CPPFLAGS_TTCN3="-DIPA_EMULATION_SCCP -DIPA_EMULATION_MGCP -DRAN_EMULATION_BSSAP -DRAN_EMULATION_MGCP -DUSE_MTP3_DISTRIBUTOR" -- To view, visit https://gerrit.osmocom.org/14142 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I35f206aab713ccf0a4e074872e291c349c903b9d Gerrit-Change-Number: 14142 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 14:08:00 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 14:08:00 +0000 Subject: Change in osmo-ttcn3-hacks[master]: BSSMAP_templates: Update templates to set Osmux fields In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14141 ) Change subject: BSSMAP_templates: Update templates to set Osmux fields ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14141 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I568100376cf8a47c01a33bada97bf8eaa7c07fcd Gerrit-Change-Number: 14141 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 23 May 2019 14:08:00 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 14:08:17 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 14:08:17 +0000 Subject: Change in osmo-ttcn3-hacks[master]: BSSMAP_templates: Update templates to set Osmux fields In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14141 ) Change subject: BSSMAP_templates: Update templates to set Osmux fields ...................................................................... BSSMAP_templates: Update templates to set Osmux fields After new fields (osmux osmocom extensions) were added to BSSMAP Reset and BSSMAP AssignReq/AssignCompl in titan.ProtocolModules.BSSMAP, we need to set them in ts_* templates, otherwise TTCN3 runtimes fails with: """ BSC_Tests.ttcn:143 Dynamic test case error: Performing a valueof or send operation on a non-specific template of type @BSSAP_Types.BSSMAP_IE_Osmo_OsmuxSupport. """ Fixes: fe0c6083bd7176b8375fafc6d6399772d85a70a3 Depends: titan.ProtocolModules.BSSMAP Iaf1e137269c0da20b2c96fd104b57edf336693af Change-Id: I568100376cf8a47c01a33bada97bf8eaa7c07fcd --- M library/BSSMAP_Templates.ttcn 1 file changed, 44 insertions(+), 16 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index 02c84e2..ad314a3 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -164,47 +164,62 @@ oldToNewBSSIEs := val } -template (value) PDU_BSSAP ts_BSSMAP_Reset(BssmapCause cause) modifies ts_BSSAP_BSSMAP := { +template BSSMAP_IE_Osmo_OsmuxSupport tr_BSSMAP_IE_Osmo_OsmuxSupport := { + elementIdentifier := 'F0'O +} + +private function f_enc_osmux_support(boolean osmux_enabled) return template BSSMAP_IE_Osmo_OsmuxSupport { + if (osmux_enabled) { + return tr_BSSMAP_IE_Osmo_OsmuxSupport; + } + return omit; +} + +template (value) PDU_BSSAP ts_BSSMAP_Reset(BssmapCause cause, boolean osmux_enabled := false) modifies ts_BSSAP_BSSMAP := { pdu := { bssmap := { reset := { messageType := '30'O, cause := ts_BSSMAP_IE_Cause(cause), - a_InterfaceSelectorForReset := omit + a_InterfaceSelectorForReset := omit, + osmuxSupport := f_enc_osmux_support(osmux_enabled) } } } } -template PDU_BSSAP tr_BSSMAP_Reset modifies tr_BSSAP_BSSMAP := { +template PDU_BSSAP tr_BSSMAP_Reset(boolean osmux_enabled := false) modifies tr_BSSAP_BSSMAP := { pdu := { bssmap := { reset := { messageType := '30'O, cause := ?, - a_InterfaceSelectorForReset := * + a_InterfaceSelectorForReset := *, + osmuxSupport := f_enc_osmux_support(osmux_enabled) } } } } -template (value) PDU_BSSAP ts_BSSMAP_ResetAck modifies ts_BSSAP_BSSMAP := { +template (value) PDU_BSSAP ts_BSSMAP_ResetAck(boolean osmux_enabled := false) modifies ts_BSSAP_BSSMAP := { pdu := { bssmap := { resetAck := { messageType := '31'O, - a_InterfaceSelectorForReset := omit + a_InterfaceSelectorForReset := omit, + osmuxSupport := f_enc_osmux_support(osmux_enabled) } } } } -template PDU_BSSAP tr_BSSMAP_ResetAck modifies tr_BSSAP_BSSMAP := { +template PDU_BSSAP tr_BSSMAP_ResetAck(boolean osmux_enabled := false) modifies tr_BSSAP_BSSMAP := { pdu := { bssmap := { resetAck := { messageType := '31'O, - a_InterfaceSelectorForReset := * + a_InterfaceSelectorForReset := *, + osmuxSupport := f_enc_osmux_support(osmux_enabled) } } } @@ -443,9 +458,15 @@ codecElements := valueof(elem) } +template (value) BSSMAP_IE_Osmo_OsmuxCID ts_OsmuxCID(INT1 cid) := { + elementIdentifier := 'F1'O, + osmuxCID := cid +} + template PDU_BSSAP ts_BSSMAP_AssignmentReq(template BSSMAP_IE_CircuitIdentityCode cic := omit, - template BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit) + template BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit, + template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := omit) modifies ts_BSSAP_BSSMAP := { pdu := { bssmap := { @@ -472,14 +493,16 @@ globalCallReference := omit, lCLS_Configuration := omit, lCLS_ConnectionStatusControl := omit, - lCLS_CorrelationNotNeeded := omit + lCLS_CorrelationNotNeeded := omit, + osmuxCID := osmuxCID } } } } template PDU_BSSAP tr_BSSMAP_AssignmentReq(template BSSMAP_IE_CircuitIdentityCode cic := *, - template BSSMAP_IE_AoIP_TransportLayerAddress aoip := *) + template BSSMAP_IE_AoIP_TransportLayerAddress aoip := *, + template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := *) modifies tr_BSSAP_BSSMAP := { pdu := { bssmap := { @@ -506,7 +529,8 @@ globalCallReference := *, lCLS_Configuration := *, lCLS_ConnectionStatusControl := *, - lCLS_CorrelationNotNeeded := * + lCLS_CorrelationNotNeeded := *, + osmuxCID := osmuxCID } } } @@ -515,7 +539,8 @@ template PDU_BSSAP ts_BSSMAP_AssignmentComplete(template BSSMAP_IE_CircuitIdentityCode cic := omit, template BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit, - template BSSMAP_IE_SpeechCodec speechCodec := omit) + template BSSMAP_IE_SpeechCodec speechCodec := omit, + template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := omit) modifies ts_BSSAP_BSSMAP := { pdu := { bssmap := { @@ -533,14 +558,16 @@ aoIPTransportLayer := aoip, speechCodec := speechCodec, codecList := omit, - lCLS_BSS_Status := omit + lCLS_BSS_Status := omit, + osmuxCID := osmuxCID } } } } template PDU_BSSAP tr_BSSMAP_AssignmentComplete(template BSSMAP_IE_CircuitIdentityCode cic := *, - template BSSMAP_IE_AoIP_TransportLayerAddress aoip := *) + template BSSMAP_IE_AoIP_TransportLayerAddress aoip := *, + template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := *) modifies tr_BSSAP_BSSMAP := { pdu := { bssmap := { @@ -558,7 +585,8 @@ aoIPTransportLayer := aoip, speechCodec := *, codecList := *, - lCLS_BSS_Status := * + lCLS_BSS_Status := *, + osmuxCID := osmuxCID } } } -- To view, visit https://gerrit.osmocom.org/14141 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I568100376cf8a47c01a33bada97bf8eaa7c07fcd Gerrit-Change-Number: 14141 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 14:08:36 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 14:08:36 +0000 Subject: Change in osmo-ttcn3-hacks[master]: MSC_Tests: Remove duplicated structures from BSSMAP_Templates In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14120 ) Change subject: MSC_Tests: Remove duplicated structures from BSSMAP_Templates ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14120 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia82b65fe7e53cc0ab73df94b844b9b85aba9468b Gerrit-Change-Number: 14120 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 23 May 2019 14:08:36 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 14:35:32 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 May 2019 14:35:32 +0000 Subject: Change in osmo-bsc[master]: lcls: Fix MDCX with garbage on LCLS loop break Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14143 Change subject: lcls: Fix MDCX with garbage on LCLS loop break ...................................................................... lcls: Fix MDCX with garbage on LCLS loop break Commit c997ceb750a67baef1a05590febe1c678b287d8f which added initial code did use memset(0) on the structure. However, later commit b407a8aca45ba8f3426003c4960ca8bd5cfe60e5 modifying the code forgot to initialize it, and as a result most of its fields contain garbage. This results in an MDCX with strange/incorrect values sent when LCLS loop breaks, breaking TTCN3 test BSC_Tests_LCLS.TC_lcls_connect_break. Change-Id: Ib1a7d825690db782a5d14f2d8817acf6cb6a52ea --- M src/osmo-bsc/osmo_bsc_lcls.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/43/14143/1 diff --git a/src/osmo-bsc/osmo_bsc_lcls.c b/src/osmo-bsc/osmo_bsc_lcls.c index a01c02e..f0c62a1 100644 --- a/src/osmo-bsc/osmo_bsc_lcls.c +++ b/src/osmo-bsc/osmo_bsc_lcls.c @@ -283,7 +283,7 @@ static void lcls_break_local_switching(struct gsm_subscriber_connection *conn) { - struct mgcp_conn_peer mdcx_info; + struct mgcp_conn_peer mdcx_info = {}; LOGPFSM(conn->lcls.fi, "=== HERE IS WHERE WE DISABLE LCLS(%s)\n", bsc_lcls_mode_name(conn->sccp.msc->lcls_mode)); -- To view, visit https://gerrit.osmocom.org/14143 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ib1a7d825690db782a5d14f2d8817acf6cb6a52ea Gerrit-Change-Number: 14143 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 14:42:35 2019 From: gerrit-no-reply at lists.osmocom.org (=?UTF-8?Q?K=C3=A9vin_Redon?=) Date: Thu, 23 May 2019 14:42:35 +0000 Subject: Change in simtrace2[master]: make peer ERASE more robust Message-ID: K?vin Redon has uploaded this change for review. ( https://gerrit.osmocom.org/14144 Change subject: make peer ERASE more robust ...................................................................... make peer ERASE more robust adds command 'a' to allow setting/asserting the peer SAM3S ERASE line on the next command. this prevents against accidental erase since only the command 'y' was required, without confirmation. this could happen not only through accidental user input, but noise on the serial line (noise would still cause other issues, but at least now it will not "brick" the device). now the sequence 'ay' is required, as any other command following 'a' would clear the permission again. note: since ERASE is only setting a GPIO within this command parsing function, not accidental function pointer problem calling 'board_exec_dbg_cmd' should cause accidental ERASE since it would need to be called two times with the exact sequence Change-Id: I06bfeaef09a397bd554bec84321e0dd64ccc3aac --- M firmware/libboard/qmod/source/board_qmod.c 1 file changed, 22 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/44/14144/1 diff --git a/firmware/libboard/qmod/source/board_qmod.c b/firmware/libboard/qmod/source/board_qmod.c index ad1f6b7..cab5271 100644 --- a/firmware/libboard/qmod/source/board_qmod.c +++ b/firmware/libboard/qmod/source/board_qmod.c @@ -1,7 +1,7 @@ /* sysmocom quad-modem sysmoQMOD application code * * (C) 2016-2017 by Harald Welte - * (C) 2018, sysmocom -s.f.m.c. GmbH, Author: Kevin Redon + * (C) 2018-2019, sysmocom -s.f.m.c. GmbH, Author: Kevin Redon * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -184,6 +184,11 @@ /* returns '1' in case we should break any endless loop */ void board_exec_dbg_cmd(int ch) { + /* this variable controls if it is allowed to assert/release the ERASE line. + this is done to prevent accidental ERASE on noisy serial input since only one character can trigger the ERASE. + */ + static bool allow_erase = false; + switch (ch) { case '?': printf("\t?\thelp\n\r"); @@ -205,6 +210,7 @@ printf("\tX\tRelease peer SAM3 from reset\n\r"); printf("\tx\tAssert peer SAM3 reset\n\r"); printf("\tY\tRelease peer SAM3 ERASE signal\n\r"); + printf("\ta\tAllow asserting peer SAM3 ERASE signal\n\r"); printf("\ty\tAssert peer SAM3 ERASE signal\n\r"); printf("\tU\tProceed to USB Initialization\n\r"); printf("\t1\tGenerate 1ms reset pulse on WWAN1\n\r"); @@ -243,9 +249,17 @@ printf("Clearing SIMTRACExx_ERASE (inactive)\n\r"); PIO_Clear(&pin_peer_erase); break; + case 'a': + printf("Asserting SIMTRACExx_ERASE allowed on next command\n\r"); + allow_erase = true; + break; case 'y': - printf("Seetting SIMTRACExx_ERASE (active)\n\r"); - PIO_Set(&pin_peer_erase); + if (allow_erase) { + printf("Setting SIMTRACExx_ERASE (active)\n\r"); + PIO_Set(&pin_peer_erase); + } else { + printf("Please first allow setting SIMTRACExx_ERASE\n\r"); + } break; case '1': printf("Resetting Modem 1 (of this SAM3)\n\r"); @@ -268,6 +282,11 @@ board_exec_dbg_cmd_st12only(ch); break; } + + // set protection back so it can only run for one command + if ('a' != ch) { + allow_erase = false; + } } void board_main_top(void) -- To view, visit https://gerrit.osmocom.org/14144 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I06bfeaef09a397bd554bec84321e0dd64ccc3aac Gerrit-Change-Number: 14144 Gerrit-PatchSet: 1 Gerrit-Owner: K?vin Redon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 14:46:04 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 14:46:04 +0000 Subject: Change in simtrace2[master]: make peer ERASE more robust In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14144 ) Change subject: make peer ERASE more robust ...................................................................... Patch Set 1: I would prefer to completely remove the code from normal production buidls. We can always have a diffent build / makefile target for those rare casese where we actually want that functionality. -- To view, visit https://gerrit.osmocom.org/14144 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I06bfeaef09a397bd554bec84321e0dd64ccc3aac Gerrit-Change-Number: 14144 Gerrit-PatchSet: 1 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Harald Welte Gerrit-Comment-Date: Thu, 23 May 2019 14:46:04 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 14:46:58 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 14:46:58 +0000 Subject: Change in osmo-bsc[master]: lcls: Fix MDCX with garbage on LCLS loop break In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14143 ) Change subject: lcls: Fix MDCX with garbage on LCLS loop break ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14143 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib1a7d825690db782a5d14f2d8817acf6cb6a52ea Gerrit-Change-Number: 14143 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 23 May 2019 14:46:58 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 14:46:59 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 14:46:59 +0000 Subject: Change in osmo-bsc[master]: lcls: Fix MDCX with garbage on LCLS loop break In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14143 ) Change subject: lcls: Fix MDCX with garbage on LCLS loop break ...................................................................... lcls: Fix MDCX with garbage on LCLS loop break Commit c997ceb750a67baef1a05590febe1c678b287d8f which added initial code did use memset(0) on the structure. However, later commit b407a8aca45ba8f3426003c4960ca8bd5cfe60e5 modifying the code forgot to initialize it, and as a result most of its fields contain garbage. This results in an MDCX with strange/incorrect values sent when LCLS loop breaks, breaking TTCN3 test BSC_Tests_LCLS.TC_lcls_connect_break. Change-Id: Ib1a7d825690db782a5d14f2d8817acf6cb6a52ea --- M src/osmo-bsc/osmo_bsc_lcls.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/osmo-bsc/osmo_bsc_lcls.c b/src/osmo-bsc/osmo_bsc_lcls.c index a01c02e..f0c62a1 100644 --- a/src/osmo-bsc/osmo_bsc_lcls.c +++ b/src/osmo-bsc/osmo_bsc_lcls.c @@ -283,7 +283,7 @@ static void lcls_break_local_switching(struct gsm_subscriber_connection *conn) { - struct mgcp_conn_peer mdcx_info; + struct mgcp_conn_peer mdcx_info = {}; LOGPFSM(conn->lcls.fi, "=== HERE IS WHERE WE DISABLE LCLS(%s)\n", bsc_lcls_mode_name(conn->sccp.msc->lcls_mode)); -- To view, visit https://gerrit.osmocom.org/14143 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ib1a7d825690db782a5d14f2d8817acf6cb6a52ea Gerrit-Change-Number: 14143 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 14:47:12 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 14:47:12 +0000 Subject: Change in osmo-ttcn3-hacks[master]: MSC_Tests: Remove duplicated structures from BSSMAP_Templates In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14120 ) Change subject: MSC_Tests: Remove duplicated structures from BSSMAP_Templates ...................................................................... MSC_Tests: Remove duplicated structures from BSSMAP_Templates Change-Id: Ia82b65fe7e53cc0ab73df94b844b9b85aba9468b --- M msc/MSC_Tests.ttcn 1 file changed, 0 insertions(+), 138 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index f6ab439..b64b872 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -330,144 +330,6 @@ activate(as_Tguard_direct()); } -template PDU_BSSAP ts_BSSAP_BSSMAP := { - discriminator := '0'B, - spare := '0000000'B, - dlci := omit, - lengthIndicator := 0, /* overwritten by codec */ - pdu := ? -} - -template PDU_BSSAP tr_BSSAP_BSSMAP := { - discriminator := '0'B, - spare := '0000000'B, - dlci := omit, - lengthIndicator := ?, - pdu := { - bssmap := ? - } -} - - -type integer BssmapCause; - -template (value) BSSMAP_IE_Cause ts_BSSMAP_IE_Cause(BssmapCause val) := { - elementIdentifier := '04'O, - lengthIndicator := 0, - causeValue := int2bit(val, 7), - extensionCauseValue := '0'B, - spare1 := omit -} - -template (value) PDU_BSSAP ts_BSSMAP_Reset(BssmapCause cause) modifies ts_BSSAP_BSSMAP := { - pdu := { - bssmap := { - reset := { - messageType := '30'O, - cause := ts_BSSMAP_IE_Cause(cause), - a_InterfaceSelectorForReset := omit - } - } - } -} - -template (value) PDU_BSSAP ts_BSSMAP_ResetAck modifies ts_BSSAP_BSSMAP := { - pdu := { - bssmap := { - resetAck := { - messageType := '31'O, - a_InterfaceSelectorForReset := omit - } - } - } -} - -template PDU_BSSAP tr_BSSMAP_ResetAck modifies tr_BSSAP_BSSMAP := { - pdu := { - bssmap := { - resetAck := { - messageType := '31'O, - a_InterfaceSelectorForReset := * - } - } - } -} - -template BSSMAP_IE_CellIdentifier ts_BSSMAP_IE_CellID := { - elementIdentifier := '05'O, - lengthIndicator := 0, - cellIdentifierDiscriminator := '0000'B, - spare1_4 := '0000'B, - cellIdentification := ? -} - -type uint16_t BssmapLAC; -type uint16_t BssmapCI; - -/* -template BSSMAP_IE_CellIdentifier ts_CellId_CGI(mcc, mnc, lac, ci) -modifies ts_BSSMAP_IE_CellID := { - cellIdentification := { - cI_LAC_CGI := { - mnc_mcc := FIXME, - lac := int2oct(lac, 2), - ci := int2oct(ci, 2) - } - } -} -*/ - -template BSSMAP_IE_CellIdentifier ts_CellID_LAC_CI(BssmapLAC lac, BssmapCI ci) -modifies ts_BSSMAP_IE_CellID := { - cellIdentification := { - cI_LAC_CI := { - lac := int2oct(lac, 2), - ci := int2oct(ci, 2) - } - } -} - -template BSSMAP_IE_CellIdentifier ts_CellId_CI(BssmapCI ci) -modifies ts_BSSMAP_IE_CellID := { - cellIdentification := { - cI_CI := int2oct(ci, 2) - } -} - -template BSSMAP_IE_CellIdentifier ts_CellId_none -modifies ts_BSSMAP_IE_CellID := { - cellIdentification := { - cI_noCell := ''O - } -} - - -template BSSMAP_IE_Layer3Information ts_BSSMAP_IE_L3Info(octetstring l3info) := { - elementIdentifier := '17'O, - lengthIndicator := 0, - layer3info := l3info -} - -template PDU_BSSAP ts_BSSMAP_ComplL3(BSSMAP_IE_CellIdentifier cell_id, octetstring l3_info) -modifies ts_BSSAP_BSSMAP := { - pdu := { - bssmap := { - completeLayer3Information := { - messageType := '57'O, - cellIdentifier := cell_id, - layer3Information := ts_BSSMAP_IE_L3Info(l3_info), - chosenChannel := omit, - lSAIdentifier := omit, - aPDU := omit, - codecList := omit, - redirectAttemptFlag := omit, - sendSequenceNumber := omit, - iMSI := omit - } - } - } -} - type function void_fn(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr; /* FIXME: move into BSC_ConnectionHandler? */ -- To view, visit https://gerrit.osmocom.org/14120 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ia82b65fe7e53cc0ab73df94b844b9b85aba9468b Gerrit-Change-Number: 14120 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 14:47:59 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 14:47:59 +0000 Subject: Change in docker-playground[master]: ttcn3-bscnat-test: Use unique sub-network 172.18.15.0/24 Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14145 Change subject: ttcn3-bscnat-test: Use unique sub-network 172.18.15.0/24 ...................................................................... ttcn3-bscnat-test: Use unique sub-network 172.18.15.0/24 For some reason, the bscnat tests were using the same subnet as the sip-connector tests, causing address clashes when trying to execute both test suites simultaneously: + echo Creating network ttcn3-sip-test Creating network ttcn3-sip-test + docker network create --internal --subnet 172.18.11.0/24 ttcn3-sip-test Error response from daemon: Pool overlaps with other one on this address space Change-Id: I62b01b4b291ed9d729139fcf9b0102459e7f5a6a --- M ttcn3-bscnat-test/BSCNAT_Tests.cfg M ttcn3-bscnat-test/jenkins.sh M ttcn3-bscnat-test/osmo-bsc-nat.cfg 3 files changed, 11 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/45/14145/1 diff --git a/ttcn3-bscnat-test/BSCNAT_Tests.cfg b/ttcn3-bscnat-test/BSCNAT_Tests.cfg index e45061d..d23178f 100644 --- a/ttcn3-bscnat-test/BSCNAT_Tests.cfg +++ b/ttcn3-bscnat-test/BSCNAT_Tests.cfg @@ -9,18 +9,18 @@ [MODULE_PARAMETERS] mp_bsc_port := 49999; -mp_bsc_ip := "172.18.11.203"; +mp_bsc_ip := "172.18.15.203"; mp_msc_port := 5100; -mp_msc_ip := "172.18.11.203"; +mp_msc_ip := "172.18.15.203"; mp_nat_port := 5000; -mp_nat_ip := "172.18.11.20"; +mp_nat_ip := "172.18.15.20"; #mp_ipa_mgcp_uses_osmo_ext := true; mp_mgcp_uses_udp := true; -mp_callagent_ip := "172.18.11.203"; +mp_callagent_ip := "172.18.15.203"; mp_callagent_udp_port := 2727; -mp_mgw_ip := "172.18.11.20"; +mp_mgw_ip := "172.18.15.20"; mp_mgw_udp_port := 2427; [MAIN_CONTROLLER] diff --git a/ttcn3-bscnat-test/jenkins.sh b/ttcn3-bscnat-test/jenkins.sh index 10d7d62..61ea89b 100755 --- a/ttcn3-bscnat-test/jenkins.sh +++ b/ttcn3-bscnat-test/jenkins.sh @@ -16,18 +16,18 @@ cp osmo-bsc-nat.cfg $VOL_BASE_DIR/bscnat/ cp bscs.config $VOL_BASE_DIR/bscnat/ -network_create 172.18.11.0/24 +network_create 172.18.15.0/24 echo Starting container with BSCNAT docker run --rm \ - --network $NET_NAME --ip 172.18.11.20 \ + --network $NET_NAME --ip 172.18.15.20 \ -v $VOL_BASE_DIR/bscnat:/data \ --name ${BUILD_TAG}-bscnat -d \ $REPO_USER/osmo-nitb-$IMAGE_SUFFIX osmo-bsc_nat -c /data/osmo-bsc-nat.cfg echo Starting container with BSCNAT testsuite docker run --rm \ - --network $NET_NAME --ip 172.18.11.203 \ + --network $NET_NAME --ip 172.18.15.203 \ -e "TTCN3_PCAP_PATH=/data" \ -v $VOL_BASE_DIR/bscnat-tester:/data \ --name ${BUILD_TAG}-ttcn3-bscnat-test \ diff --git a/ttcn3-bscnat-test/osmo-bsc-nat.cfg b/ttcn3-bscnat-test/osmo-bsc-nat.cfg index e3398b9..bca4628 100644 --- a/ttcn3-bscnat-test/osmo-bsc-nat.cfg +++ b/ttcn3-bscnat-test/osmo-bsc-nat.cfg @@ -13,7 +13,7 @@ no login ! mgcp - bind ip 172.18.11.20 + bind ip 172.18.15.20 bind port 2427 rtp bts-base 4000 rtp net-base 16000 @@ -23,11 +23,11 @@ sdp audio-payload name AMR/8000 loop 0 number endpoints 32 - call-agent ip 172.18.11.203 + call-agent ip 172.18.15.203 rtp transcoder-base 0 transcoder-remote-base 4000 nat - msc ip 172.18.11.203 + msc ip 172.18.15.203 msc port 5100 token foo timeout auth 2 -- To view, visit https://gerrit.osmocom.org/14145 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I62b01b4b291ed9d729139fcf9b0102459e7f5a6a Gerrit-Change-Number: 14145 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 14:48:37 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 May 2019 14:48:37 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Validate osmux cid value during mgcp_msg_gen Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14146 Change subject: mgcp-cli: Validate osmux cid value during mgcp_msg_gen ...................................................................... mgcp-cli: Validate osmux cid value during mgcp_msg_gen Change-Id: I5c4d39b346b94de933f86200902c6c0ea2e1d5df --- M src/libosmo-mgcp-client/mgcp_client.c 1 file changed, 11 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/46/14146/1 diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index 7074328..f2204e1 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -36,6 +36,10 @@ #include #include +#ifndef OSMUX_CID_MAX +#define OSMUX_CID_MAX 255 /* FIXME: use OSMUX_CID_MAX from libosmo-netif? */ +#endif + /* Codec descripton for dynamic payload types (SDP) */ const struct value_string osmo_mgcpc_codec_names[] = { { CODEC_PCMU_8000_1, "PCMU/8000/1" }, @@ -414,9 +418,6 @@ return -2; } -#ifndef OSMUX_CID_MAX -#define OSMUX_CID_MAX 255 /* FIXME: use OSMUX_CID_MAX from libosmo-netif? */ -#endif if (osmux_cid > OSMUX_CID_MAX) { /* OSMUX_CID_MAX from libosmo-netif */ LOGP(DLMGCP, LOGL_ERROR, "Osmux ID too large: %u > %u\n", osmux_cid, OSMUX_CID_MAX); @@ -1260,6 +1261,13 @@ /* Add X-Osmo-Osmux */ if ((mgcp_msg->presence & MGCP_MSG_PRESENCE_X_OSMO_OSMUX_CID)) { + if (mgcp_msg->x_osmo_osmux_cid < -1 || mgcp_msg->x_osmo_osmux_cid > OSMUX_CID_MAX) { + LOGP(DLMGCP, LOGL_ERROR, + "Wrong Osmux CID %d, can not generate MGCP message\n", + mgcp_msg->x_osmo_osmux_cid); + msgb_free(msg); + return NULL; + } snprintf(buf, sizeof(buf), " %d", mgcp_msg->x_osmo_osmux_cid); rc += msgb_printf(msg, MGCP_X_OSMO_OSMUX_HEADER "%s\r\n", -- To view, visit https://gerrit.osmocom.org/14146 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I5c4d39b346b94de933f86200902c6c0ea2e1d5df Gerrit-Change-Number: 14146 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 14:48:39 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 14:48:39 +0000 Subject: Change in docker-playground[master]: ttcn3-bscnat-test: Use unique sub-network 172.18.15.0/24 In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14145 ) Change subject: ttcn3-bscnat-test: Use unique sub-network 172.18.15.0/24 ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14145 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I62b01b4b291ed9d729139fcf9b0102459e7f5a6a Gerrit-Change-Number: 14145 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Thu, 23 May 2019 14:48:39 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 14:48:41 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 14:48:41 +0000 Subject: Change in docker-playground[master]: ttcn3-bscnat-test: Use unique sub-network 172.18.15.0/24 In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14145 ) Change subject: ttcn3-bscnat-test: Use unique sub-network 172.18.15.0/24 ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/14145 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I62b01b4b291ed9d729139fcf9b0102459e7f5a6a Gerrit-Change-Number: 14145 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Thu, 23 May 2019 14:48:41 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 14:50:42 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 May 2019 14:50:42 +0000 Subject: Change in docker-playground[master]: ttcn3-bscnat: Prepare cfgs for VTY & Osmux support In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14130 ) Change subject: ttcn3-bscnat: Prepare cfgs for VTY & Osmux support ...................................................................... Patch Set 1: I think after https://gerrit.osmocom.org/#/c/docker-playground/+/14145/ is merged, this one needs to update the IP addr introduced here. -- To view, visit https://gerrit.osmocom.org/14130 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I794a17bdeaff9ab9316d7a6acb1e58dfd815b645 Gerrit-Change-Number: 14130 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Thu, 23 May 2019 14:50:42 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 14:54:43 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 May 2019 14:54:43 +0000 Subject: Change in docker-playground[master]: ttcn3-bscnat-test: Use unique sub-network 172.18.15.0/24 In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14145 ) Change subject: ttcn3-bscnat-test: Use unique sub-network 172.18.15.0/24 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14145 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I62b01b4b291ed9d729139fcf9b0102459e7f5a6a Gerrit-Change-Number: 14145 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Thu, 23 May 2019 14:54:43 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 15:11:15 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 15:11:15 +0000 Subject: Change in docker-playground[master]: ttcn3-bscnat-test: Use unique sub-network 172.18.15.0/24 In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14145 ) Change subject: ttcn3-bscnat-test: Use unique sub-network 172.18.15.0/24 ...................................................................... ttcn3-bscnat-test: Use unique sub-network 172.18.15.0/24 For some reason, the bscnat tests were using the same subnet as the sip-connector tests, causing address clashes when trying to execute both test suites simultaneously: + echo Creating network ttcn3-sip-test Creating network ttcn3-sip-test + docker network create --internal --subnet 172.18.11.0/24 ttcn3-sip-test Error response from daemon: Pool overlaps with other one on this address space Change-Id: I62b01b4b291ed9d729139fcf9b0102459e7f5a6a --- M ttcn3-bscnat-test/BSCNAT_Tests.cfg M ttcn3-bscnat-test/jenkins.sh M ttcn3-bscnat-test/osmo-bsc-nat.cfg 3 files changed, 11 insertions(+), 11 deletions(-) Approvals: Harald Welte: Looks good to me, but someone else must approve; Verified Pau Espin Pedrol: Looks good to me, approved diff --git a/ttcn3-bscnat-test/BSCNAT_Tests.cfg b/ttcn3-bscnat-test/BSCNAT_Tests.cfg index e45061d..d23178f 100644 --- a/ttcn3-bscnat-test/BSCNAT_Tests.cfg +++ b/ttcn3-bscnat-test/BSCNAT_Tests.cfg @@ -9,18 +9,18 @@ [MODULE_PARAMETERS] mp_bsc_port := 49999; -mp_bsc_ip := "172.18.11.203"; +mp_bsc_ip := "172.18.15.203"; mp_msc_port := 5100; -mp_msc_ip := "172.18.11.203"; +mp_msc_ip := "172.18.15.203"; mp_nat_port := 5000; -mp_nat_ip := "172.18.11.20"; +mp_nat_ip := "172.18.15.20"; #mp_ipa_mgcp_uses_osmo_ext := true; mp_mgcp_uses_udp := true; -mp_callagent_ip := "172.18.11.203"; +mp_callagent_ip := "172.18.15.203"; mp_callagent_udp_port := 2727; -mp_mgw_ip := "172.18.11.20"; +mp_mgw_ip := "172.18.15.20"; mp_mgw_udp_port := 2427; [MAIN_CONTROLLER] diff --git a/ttcn3-bscnat-test/jenkins.sh b/ttcn3-bscnat-test/jenkins.sh index 10d7d62..61ea89b 100755 --- a/ttcn3-bscnat-test/jenkins.sh +++ b/ttcn3-bscnat-test/jenkins.sh @@ -16,18 +16,18 @@ cp osmo-bsc-nat.cfg $VOL_BASE_DIR/bscnat/ cp bscs.config $VOL_BASE_DIR/bscnat/ -network_create 172.18.11.0/24 +network_create 172.18.15.0/24 echo Starting container with BSCNAT docker run --rm \ - --network $NET_NAME --ip 172.18.11.20 \ + --network $NET_NAME --ip 172.18.15.20 \ -v $VOL_BASE_DIR/bscnat:/data \ --name ${BUILD_TAG}-bscnat -d \ $REPO_USER/osmo-nitb-$IMAGE_SUFFIX osmo-bsc_nat -c /data/osmo-bsc-nat.cfg echo Starting container with BSCNAT testsuite docker run --rm \ - --network $NET_NAME --ip 172.18.11.203 \ + --network $NET_NAME --ip 172.18.15.203 \ -e "TTCN3_PCAP_PATH=/data" \ -v $VOL_BASE_DIR/bscnat-tester:/data \ --name ${BUILD_TAG}-ttcn3-bscnat-test \ diff --git a/ttcn3-bscnat-test/osmo-bsc-nat.cfg b/ttcn3-bscnat-test/osmo-bsc-nat.cfg index e3398b9..bca4628 100644 --- a/ttcn3-bscnat-test/osmo-bsc-nat.cfg +++ b/ttcn3-bscnat-test/osmo-bsc-nat.cfg @@ -13,7 +13,7 @@ no login ! mgcp - bind ip 172.18.11.20 + bind ip 172.18.15.20 bind port 2427 rtp bts-base 4000 rtp net-base 16000 @@ -23,11 +23,11 @@ sdp audio-payload name AMR/8000 loop 0 number endpoints 32 - call-agent ip 172.18.11.203 + call-agent ip 172.18.15.203 rtp transcoder-base 0 transcoder-remote-base 4000 nat - msc ip 172.18.11.203 + msc ip 172.18.15.203 msc port 5100 token foo timeout auth 2 -- To view, visit https://gerrit.osmocom.org/14145 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I62b01b4b291ed9d729139fcf9b0102459e7f5a6a Gerrit-Change-Number: 14145 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 15:19:34 2019 From: gerrit-no-reply at lists.osmocom.org (roh) Date: Thu, 23 May 2019 15:19:34 +0000 Subject: Change in osmo-bts[master]: sysmo: Fix "nominal power" / BS power display in VTY In-Reply-To: References: Message-ID: roh has posted comments on this change. ( https://gerrit.osmocom.org/14137 ) Change subject: sysmo: Fix "nominal power" / BS power display in VTY ...................................................................... Patch Set 1: Code-Review+2 looks good -- To view, visit https://gerrit.osmocom.org/14137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If92d0b15c48dafc63776b82c7ff5f3c2b3505f68 Gerrit-Change-Number: 14137 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: roh Gerrit-Comment-Date: Thu, 23 May 2019 15:19:34 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 15:37:03 2019 From: gerrit-no-reply at lists.osmocom.org (=?UTF-8?Q?K=C3=A9vin_Redon?=) Date: Thu, 23 May 2019 15:37:03 +0000 Subject: Change in simtrace2[master]: add make DEFINE to remove assert ERASE code Message-ID: K?vin Redon has uploaded this change for review. ( https://gerrit.osmocom.org/14147 Change subject: add make DEFINE to remove assert ERASE code ...................................................................... add make DEFINE to remove assert ERASE code remove code to assert peer ERASE line by default. see README for more information. Change-Id: I5f88ecf1e2dcf00c0297597f88dd361a6e088c1e --- M firmware/Makefile M firmware/README.txt M firmware/libboard/qmod/source/board_qmod.c 3 files changed, 17 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/47/14147/1 diff --git a/firmware/Makefile b/firmware/Makefile index c0f53f3..fa72bd3 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -120,6 +120,10 @@ # TRACE_LEVEL_NO_TRACE 0 TRACE_LEVEL ?= 4 +# allow asserting the peer SAM3S ERASE signal to completely erase the flash +# only applicable for qmod board +ALLOW_PEER_ERASE?=0 + DEBUG_PHONE_SNIFF?=0 #CFLAGS+=-DUSB_NO_DEBUG=1 @@ -163,7 +167,7 @@ #CFLAGS += -Wa,-a,-ad CFLAGS += -D__ARM CFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb # -mfix-cortex-m3-ldrd -CFLAGS += -ffunction-sections -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -DTRACE_LEVEL=$(TRACE_LEVEL) -DDEBUG_PHONE_SNIFF=$(DEBUG_PHONE_SNIFF) +CFLAGS += -ffunction-sections -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -DTRACE_LEVEL=$(TRACE_LEVEL) -DDEBUG_PHONE_SNIFF=$(DEBUG_PHONE_SNIFF) -DALLOW_PEER_ERASE=$(ALLOW_PEER_ERASE) CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\" CFLAGS += -DBOARD=\"$(BOARD)\" -DBOARD_$(BOARD) CFLAGS += -DAPPLICATION=\"$(APP)\" -DAPPLICATION_$(APP) diff --git a/firmware/README.txt b/firmware/README.txt index dcbafb2..fa7f60a 100644 --- a/firmware/README.txt +++ b/firmware/README.txt @@ -76,6 +76,10 @@ ``` Accepted values: 0 (NO_TRACE) to 5 (DEBUG) +The qmod specific option `ALLOW_PEER_ERASE` controls if the UART debug command to assert the peer SAM3S ERASE line is present in the code. +Per default this is set to 0 to prevent accidentally erasing all firmware, including the DFU bootloader, which would then need to be flashed using SAM-BA or JTAG/SWD. +Setting `ALLOW_PEER_ERASE` to 1 enables back the debug command and should be used only for debugging or development purposes. + = Flashing To flash a firmware image follow the instructions provided in the [wiki](https://projects.osmocom.org/projects/simtrace2/wiki/). diff --git a/firmware/libboard/qmod/source/board_qmod.c b/firmware/libboard/qmod/source/board_qmod.c index cab5271..4d75b98 100644 --- a/firmware/libboard/qmod/source/board_qmod.c +++ b/firmware/libboard/qmod/source/board_qmod.c @@ -184,10 +184,12 @@ /* returns '1' in case we should break any endless loop */ void board_exec_dbg_cmd(int ch) { +#if (ALLOW_PEER_ERASE > 0) /* this variable controls if it is allowed to assert/release the ERASE line. this is done to prevent accidental ERASE on noisy serial input since only one character can trigger the ERASE. */ static bool allow_erase = false; +#endif switch (ch) { case '?': @@ -209,9 +211,11 @@ } printf("\tX\tRelease peer SAM3 from reset\n\r"); printf("\tx\tAssert peer SAM3 reset\n\r"); +#if (ALLOW_PEER_ERASE > 0) printf("\tY\tRelease peer SAM3 ERASE signal\n\r"); printf("\ta\tAllow asserting peer SAM3 ERASE signal\n\r"); printf("\ty\tAssert peer SAM3 ERASE signal\n\r"); +#endif printf("\tU\tProceed to USB Initialization\n\r"); printf("\t1\tGenerate 1ms reset pulse on WWAN1\n\r"); printf("\t2\tGenerate 1ms reset pulse on WWAN2\n\r"); @@ -245,6 +249,7 @@ printf("Setting _SIMTRACExx_RST -> SIMTRACExx_RST low (active)\n\r"); PIO_Set(&pin_peer_rst); break; +#if (ALLOW_PEER_ERASE > 0) case 'Y': printf("Clearing SIMTRACExx_ERASE (inactive)\n\r"); PIO_Clear(&pin_peer_erase); @@ -261,6 +266,7 @@ printf("Please first allow setting SIMTRACExx_ERASE\n\r"); } break; +#endif case '1': printf("Resetting Modem 1 (of this SAM3)\n\r"); wwan_perst_do_reset_pulse(0, 300); @@ -283,10 +289,12 @@ break; } +#if (ALLOW_PEER_ERASE > 0) // set protection back so it can only run for one command if ('a' != ch) { allow_erase = false; } +#endif } void board_main_top(void) -- To view, visit https://gerrit.osmocom.org/14147 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I5f88ecf1e2dcf00c0297597f88dd361a6e088c1e Gerrit-Change-Number: 14147 Gerrit-PatchSet: 1 Gerrit-Owner: K?vin Redon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 15:37:04 2019 From: gerrit-no-reply at lists.osmocom.org (=?UTF-8?Q?K=C3=A9vin_Redon?=) Date: Thu, 23 May 2019 15:37:04 +0000 Subject: Change in simtrace2[master]: remove unused make define Message-ID: K?vin Redon has uploaded this change for review. ( https://gerrit.osmocom.org/14148 Change subject: remove unused make define ...................................................................... remove unused make define Change-Id: Ia9ef8ce705803df06cf1e4c3ac9731ce69e5e6c5 --- M firmware/Makefile 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/48/14148/1 diff --git a/firmware/Makefile b/firmware/Makefile index fa72bd3..0f70bf4 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -124,8 +124,6 @@ # only applicable for qmod board ALLOW_PEER_ERASE?=0 -DEBUG_PHONE_SNIFF?=0 - #CFLAGS+=-DUSB_NO_DEBUG=1 # Optimization level, put in comment for debugging @@ -167,7 +165,7 @@ #CFLAGS += -Wa,-a,-ad CFLAGS += -D__ARM CFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb # -mfix-cortex-m3-ldrd -CFLAGS += -ffunction-sections -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -DTRACE_LEVEL=$(TRACE_LEVEL) -DDEBUG_PHONE_SNIFF=$(DEBUG_PHONE_SNIFF) -DALLOW_PEER_ERASE=$(ALLOW_PEER_ERASE) +CFLAGS += -ffunction-sections -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -DTRACE_LEVEL=$(TRACE_LEVEL) -DALLOW_PEER_ERASE=$(ALLOW_PEER_ERASE) CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\" CFLAGS += -DBOARD=\"$(BOARD)\" -DBOARD_$(BOARD) CFLAGS += -DAPPLICATION=\"$(APP)\" -DAPPLICATION_$(APP) -- To view, visit https://gerrit.osmocom.org/14148 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ia9ef8ce705803df06cf1e4c3ac9731ce69e5e6c5 Gerrit-Change-Number: 14148 Gerrit-PatchSet: 1 Gerrit-Owner: K?vin Redon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 16:33:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 16:33:16 +0000 Subject: Change in osmo-bts[master]: sysmo: Fix "nominal power" / BS power display in VTY In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14137 ) Change subject: sysmo: Fix "nominal power" / BS power display in VTY ...................................................................... sysmo: Fix "nominal power" / BS power display in VTY The function get_p_max_out_mdBm() returns a value in 1/1000th of dBm, "milli-dBm", while trx->nominal_power is only whole dBm. We were missing the required divider of 1000 ever since Change-Id Ieff75d5becaa80a2097b6e744c75c2d16259c9a4 was merged in February 2017. The good news is that this really only affected the VTY output and not any actual operational aspect of the system. Change-Id: If92d0b15c48dafc63776b82c7ff5f3c2b3505f68 Closes: SYS#4570 --- M src/osmo-bts-sysmo/l1_if.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Pau Espin Pedrol: Looks good to me, approved roh: Looks good to me, approved diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 87cf25a..6f61c67 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -1883,7 +1883,7 @@ LOGP(DL1C, LOGL_NOTICE, "Cannot determine nominal " "transmit power. Assuming 23dBm.\n"); } - bts->c0->nominal_power = rc; + bts->c0->nominal_power = rc / 1000; } hdl = pinst->u.sysmobts.hdl; -- To view, visit https://gerrit.osmocom.org/14137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If92d0b15c48dafc63776b82c7ff5f3c2b3505f68 Gerrit-Change-Number: 14137 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: roh -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 16:34:06 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 16:34:06 +0000 Subject: Change in simtrace2[master]: remove unused make define In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14148 ) Change subject: remove unused make define ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14148 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia9ef8ce705803df06cf1e4c3ac9731ce69e5e6c5 Gerrit-Change-Number: 14148 Gerrit-PatchSet: 1 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 23 May 2019 16:34:06 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 16:34:24 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 16:34:24 +0000 Subject: Change in simtrace2[master]: make peer ERASE more robust In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14144 ) Change subject: make peer ERASE more robust ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14144 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I06bfeaef09a397bd554bec84321e0dd64ccc3aac Gerrit-Change-Number: 14144 Gerrit-PatchSet: 1 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 23 May 2019 16:34:24 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 16:34:26 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 23 May 2019 16:34:26 +0000 Subject: Change in docker-playground[master]: ttcn3-bscnat: Prepare cfgs for VTY & Osmux support In-Reply-To: References: Message-ID: Pau Espin Pedrol has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/14130 ) Change subject: ttcn3-bscnat: Prepare cfgs for VTY & Osmux support ...................................................................... ttcn3-bscnat: Prepare cfgs for VTY & Osmux support * Adding "osmux on" for each BSC will be required to enable Osmux later on, but still it doesn't change behavior now because Osmux must be enabled globally too (will be done through VTY). * Set up correct bind and remote IP addr to have VTY working later on. * Use extended timestamp to have subsecond accuracy to match with pcap easily. Change-Id: I794a17bdeaff9ab9316d7a6acb1e58dfd815b645 --- M ttcn3-bscnat-test/BSCNAT_Tests.cfg M ttcn3-bscnat-test/bscs.config M ttcn3-bscnat-test/osmo-bsc-nat.cfg 3 files changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/30/14130/2 -- To view, visit https://gerrit.osmocom.org/14130 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I794a17bdeaff9ab9316d7a6acb1e58dfd815b645 Gerrit-Change-Number: 14130 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 16:34:26 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 16:34:26 +0000 Subject: Change in simtrace2[master]: add make DEFINE to remove assert ERASE code In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14147 ) Change subject: add make DEFINE to remove assert ERASE code ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14147 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5f88ecf1e2dcf00c0297597f88dd361a6e088c1e Gerrit-Change-Number: 14147 Gerrit-PatchSet: 1 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 23 May 2019 16:34:26 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 16:34:29 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 16:34:29 +0000 Subject: Change in simtrace2[master]: make peer ERASE more robust In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14144 ) Change subject: make peer ERASE more robust ...................................................................... make peer ERASE more robust adds command 'a' to allow setting/asserting the peer SAM3S ERASE line on the next command. this prevents against accidental erase since only the command 'y' was required, without confirmation. this could happen not only through accidental user input, but noise on the serial line (noise would still cause other issues, but at least now it will not "brick" the device). now the sequence 'ay' is required, as any other command following 'a' would clear the permission again. note: since ERASE is only setting a GPIO within this command parsing function, not accidental function pointer problem calling 'board_exec_dbg_cmd' should cause accidental ERASE since it would need to be called two times with the exact sequence Change-Id: I06bfeaef09a397bd554bec84321e0dd64ccc3aac --- M firmware/libboard/qmod/source/board_qmod.c 1 file changed, 22 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/firmware/libboard/qmod/source/board_qmod.c b/firmware/libboard/qmod/source/board_qmod.c index ad1f6b7..cab5271 100644 --- a/firmware/libboard/qmod/source/board_qmod.c +++ b/firmware/libboard/qmod/source/board_qmod.c @@ -1,7 +1,7 @@ /* sysmocom quad-modem sysmoQMOD application code * * (C) 2016-2017 by Harald Welte - * (C) 2018, sysmocom -s.f.m.c. GmbH, Author: Kevin Redon + * (C) 2018-2019, sysmocom -s.f.m.c. GmbH, Author: Kevin Redon * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -184,6 +184,11 @@ /* returns '1' in case we should break any endless loop */ void board_exec_dbg_cmd(int ch) { + /* this variable controls if it is allowed to assert/release the ERASE line. + this is done to prevent accidental ERASE on noisy serial input since only one character can trigger the ERASE. + */ + static bool allow_erase = false; + switch (ch) { case '?': printf("\t?\thelp\n\r"); @@ -205,6 +210,7 @@ printf("\tX\tRelease peer SAM3 from reset\n\r"); printf("\tx\tAssert peer SAM3 reset\n\r"); printf("\tY\tRelease peer SAM3 ERASE signal\n\r"); + printf("\ta\tAllow asserting peer SAM3 ERASE signal\n\r"); printf("\ty\tAssert peer SAM3 ERASE signal\n\r"); printf("\tU\tProceed to USB Initialization\n\r"); printf("\t1\tGenerate 1ms reset pulse on WWAN1\n\r"); @@ -243,9 +249,17 @@ printf("Clearing SIMTRACExx_ERASE (inactive)\n\r"); PIO_Clear(&pin_peer_erase); break; + case 'a': + printf("Asserting SIMTRACExx_ERASE allowed on next command\n\r"); + allow_erase = true; + break; case 'y': - printf("Seetting SIMTRACExx_ERASE (active)\n\r"); - PIO_Set(&pin_peer_erase); + if (allow_erase) { + printf("Setting SIMTRACExx_ERASE (active)\n\r"); + PIO_Set(&pin_peer_erase); + } else { + printf("Please first allow setting SIMTRACExx_ERASE\n\r"); + } break; case '1': printf("Resetting Modem 1 (of this SAM3)\n\r"); @@ -268,6 +282,11 @@ board_exec_dbg_cmd_st12only(ch); break; } + + // set protection back so it can only run for one command + if ('a' != ch) { + allow_erase = false; + } } void board_main_top(void) -- To view, visit https://gerrit.osmocom.org/14144 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I06bfeaef09a397bd554bec84321e0dd64ccc3aac Gerrit-Change-Number: 14144 Gerrit-PatchSet: 2 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 16:34:30 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 16:34:30 +0000 Subject: Change in simtrace2[master]: remove unused make define In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14148 ) Change subject: remove unused make define ...................................................................... remove unused make define Change-Id: Ia9ef8ce705803df06cf1e4c3ac9731ce69e5e6c5 --- M firmware/Makefile 1 file changed, 1 insertion(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/firmware/Makefile b/firmware/Makefile index fa72bd3..0f70bf4 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -124,8 +124,6 @@ # only applicable for qmod board ALLOW_PEER_ERASE?=0 -DEBUG_PHONE_SNIFF?=0 - #CFLAGS+=-DUSB_NO_DEBUG=1 # Optimization level, put in comment for debugging @@ -167,7 +165,7 @@ #CFLAGS += -Wa,-a,-ad CFLAGS += -D__ARM CFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb # -mfix-cortex-m3-ldrd -CFLAGS += -ffunction-sections -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -DTRACE_LEVEL=$(TRACE_LEVEL) -DDEBUG_PHONE_SNIFF=$(DEBUG_PHONE_SNIFF) -DALLOW_PEER_ERASE=$(ALLOW_PEER_ERASE) +CFLAGS += -ffunction-sections -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -DTRACE_LEVEL=$(TRACE_LEVEL) -DALLOW_PEER_ERASE=$(ALLOW_PEER_ERASE) CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\" CFLAGS += -DBOARD=\"$(BOARD)\" -DBOARD_$(BOARD) CFLAGS += -DAPPLICATION=\"$(APP)\" -DAPPLICATION_$(APP) -- To view, visit https://gerrit.osmocom.org/14148 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ia9ef8ce705803df06cf1e4c3ac9731ce69e5e6c5 Gerrit-Change-Number: 14148 Gerrit-PatchSet: 2 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 16:34:29 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 16:34:29 +0000 Subject: Change in simtrace2[master]: add make DEFINE to remove assert ERASE code In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14147 ) Change subject: add make DEFINE to remove assert ERASE code ...................................................................... add make DEFINE to remove assert ERASE code remove code to assert peer ERASE line by default. see README for more information. Change-Id: I5f88ecf1e2dcf00c0297597f88dd361a6e088c1e --- M firmware/Makefile M firmware/README.txt M firmware/libboard/qmod/source/board_qmod.c 3 files changed, 17 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/firmware/Makefile b/firmware/Makefile index c0f53f3..fa72bd3 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -120,6 +120,10 @@ # TRACE_LEVEL_NO_TRACE 0 TRACE_LEVEL ?= 4 +# allow asserting the peer SAM3S ERASE signal to completely erase the flash +# only applicable for qmod board +ALLOW_PEER_ERASE?=0 + DEBUG_PHONE_SNIFF?=0 #CFLAGS+=-DUSB_NO_DEBUG=1 @@ -163,7 +167,7 @@ #CFLAGS += -Wa,-a,-ad CFLAGS += -D__ARM CFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb # -mfix-cortex-m3-ldrd -CFLAGS += -ffunction-sections -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -DTRACE_LEVEL=$(TRACE_LEVEL) -DDEBUG_PHONE_SNIFF=$(DEBUG_PHONE_SNIFF) +CFLAGS += -ffunction-sections -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -DTRACE_LEVEL=$(TRACE_LEVEL) -DDEBUG_PHONE_SNIFF=$(DEBUG_PHONE_SNIFF) -DALLOW_PEER_ERASE=$(ALLOW_PEER_ERASE) CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\" CFLAGS += -DBOARD=\"$(BOARD)\" -DBOARD_$(BOARD) CFLAGS += -DAPPLICATION=\"$(APP)\" -DAPPLICATION_$(APP) diff --git a/firmware/README.txt b/firmware/README.txt index dcbafb2..fa7f60a 100644 --- a/firmware/README.txt +++ b/firmware/README.txt @@ -76,6 +76,10 @@ ``` Accepted values: 0 (NO_TRACE) to 5 (DEBUG) +The qmod specific option `ALLOW_PEER_ERASE` controls if the UART debug command to assert the peer SAM3S ERASE line is present in the code. +Per default this is set to 0 to prevent accidentally erasing all firmware, including the DFU bootloader, which would then need to be flashed using SAM-BA or JTAG/SWD. +Setting `ALLOW_PEER_ERASE` to 1 enables back the debug command and should be used only for debugging or development purposes. + = Flashing To flash a firmware image follow the instructions provided in the [wiki](https://projects.osmocom.org/projects/simtrace2/wiki/). diff --git a/firmware/libboard/qmod/source/board_qmod.c b/firmware/libboard/qmod/source/board_qmod.c index cab5271..4d75b98 100644 --- a/firmware/libboard/qmod/source/board_qmod.c +++ b/firmware/libboard/qmod/source/board_qmod.c @@ -184,10 +184,12 @@ /* returns '1' in case we should break any endless loop */ void board_exec_dbg_cmd(int ch) { +#if (ALLOW_PEER_ERASE > 0) /* this variable controls if it is allowed to assert/release the ERASE line. this is done to prevent accidental ERASE on noisy serial input since only one character can trigger the ERASE. */ static bool allow_erase = false; +#endif switch (ch) { case '?': @@ -209,9 +211,11 @@ } printf("\tX\tRelease peer SAM3 from reset\n\r"); printf("\tx\tAssert peer SAM3 reset\n\r"); +#if (ALLOW_PEER_ERASE > 0) printf("\tY\tRelease peer SAM3 ERASE signal\n\r"); printf("\ta\tAllow asserting peer SAM3 ERASE signal\n\r"); printf("\ty\tAssert peer SAM3 ERASE signal\n\r"); +#endif printf("\tU\tProceed to USB Initialization\n\r"); printf("\t1\tGenerate 1ms reset pulse on WWAN1\n\r"); printf("\t2\tGenerate 1ms reset pulse on WWAN2\n\r"); @@ -245,6 +249,7 @@ printf("Setting _SIMTRACExx_RST -> SIMTRACExx_RST low (active)\n\r"); PIO_Set(&pin_peer_rst); break; +#if (ALLOW_PEER_ERASE > 0) case 'Y': printf("Clearing SIMTRACExx_ERASE (inactive)\n\r"); PIO_Clear(&pin_peer_erase); @@ -261,6 +266,7 @@ printf("Please first allow setting SIMTRACExx_ERASE\n\r"); } break; +#endif case '1': printf("Resetting Modem 1 (of this SAM3)\n\r"); wwan_perst_do_reset_pulse(0, 300); @@ -283,10 +289,12 @@ break; } +#if (ALLOW_PEER_ERASE > 0) // set protection back so it can only run for one command if ('a' != ch) { allow_erase = false; } +#endif } void board_main_top(void) -- To view, visit https://gerrit.osmocom.org/14147 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I5f88ecf1e2dcf00c0297597f88dd361a6e088c1e Gerrit-Change-Number: 14147 Gerrit-PatchSet: 2 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 16:34:51 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 16:34:51 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Validate osmux cid value during mgcp_msg_gen In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14146 ) Change subject: mgcp-cli: Validate osmux cid value during mgcp_msg_gen ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14146 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5c4d39b346b94de933f86200902c6c0ea2e1d5df Gerrit-Change-Number: 14146 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 23 May 2019 16:34:51 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 17:01:59 2019 From: gerrit-no-reply at lists.osmocom.org (=?UTF-8?Q?K=C3=A9vin_Redon?=) Date: Thu, 23 May 2019 17:01:59 +0000 Subject: Change in libosmocore[master]: fix isdigit taking unsigned as input Message-ID: K?vin Redon has uploaded this change for review. ( https://gerrit.osmocom.org/14149 Change subject: fix isdigit taking unsigned as input ...................................................................... fix isdigit taking unsigned as input fixes the following error warnings when cross-compiling using: ./configure --enable-static --prefix=/usr/local/arm-none-eabi --host=arm-none-eabi --enable-embedded --disable-doxygen --disable-shared --disable-pseudotalloc --enable-external-tests CFLAGS="-Os -ffunction-sections -fdata-sections -nostartfiles -nodefaultlibs -Werror -Wno-error=deprecated -Wno-error=deprecated-declarations -Wno-error=cpp -mthumb -Os -mlong-calls -g3 -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -Wno-error=format" utils.c:1002:18: error: array subscript has type 'char' [-Werror=char-subscripts] 1002 | if (!isdigit(in[i])) gsm23003.c:414:34: error: array subscript has type 'char' [-Werror=char-subscripts] 414 | if (!mnc_str || !isdigit(mnc_str[0]) || strlen(mnc_str) > 3) Change-Id: Ia13fd5ee79fc6dc3291c0b99958ab3c01afee17d --- M src/gsm/gsm23003.c M src/utils.c 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/49/14149/1 diff --git a/src/gsm/gsm23003.c b/src/gsm/gsm23003.c index a97ed07..584654b 100644 --- a/src/gsm/gsm23003.c +++ b/src/gsm/gsm23003.c @@ -411,7 +411,7 @@ char *endptr; int rc = 0; - if (!mnc_str || !isdigit(mnc_str[0]) || strlen(mnc_str) > 3) + if (!mnc_str || !isdigit((unsigned char)mnc_str[0]) || strlen(mnc_str) > 3) return -EINVAL; errno = 0; diff --git a/src/utils.c b/src/utils.c index 59dc816..6b871c8 100644 --- a/src/utils.c +++ b/src/utils.c @@ -999,7 +999,7 @@ /* All input must be numbers */ for (i = 0; i < in_len; i++) { - if (!isdigit(in[i])) + if (!isdigit((unsigned char)in[i])) return -EINVAL; } -- To view, visit https://gerrit.osmocom.org/14149 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ia13fd5ee79fc6dc3291c0b99958ab3c01afee17d Gerrit-Change-Number: 14149 Gerrit-PatchSet: 1 Gerrit-Owner: K?vin Redon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 17:19:25 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 17:19:25 +0000 Subject: Change in docker-playground[master]: ttcn3-bts-test: Fix BSC VTY access from test suite Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14150 Change subject: ttcn3-bts-test: Fix BSC VTY access from test suite ...................................................................... ttcn3-bts-test: Fix BSC VTY access from test suite Some tests, particularly those for SMSCB, want to access the BSC VTY. This was enabled in the ttcn3 code, but the configs we're using in the docker environment didn't properly refelect that yet. Change-Id: I6b6e8b47bfe85c15fb57a25b649029f872477146 --- M ttcn3-bts-test/BTS_Tests.cfg M ttcn3-bts-test/osmo-bsc.cfg 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/50/14150/1 diff --git a/ttcn3-bts-test/BTS_Tests.cfg b/ttcn3-bts-test/BTS_Tests.cfg index 37ddde0..9567845 100644 --- a/ttcn3-bts-test/BTS_Tests.cfg +++ b/ttcn3-bts-test/BTS_Tests.cfg @@ -6,6 +6,7 @@ [TESTPORT_PARAMETERS] *.BTSVTY.CTRL_HOSTNAME := "172.18.9.20" +*.BSCVTY.CTRL_HOSTNAME := "172.18.9.11" [MODULE_PARAMETERS] BTS_Tests.mp_rsl_ip := "172.18.9.10" diff --git a/ttcn3-bts-test/osmo-bsc.cfg b/ttcn3-bts-test/osmo-bsc.cfg index 54264e8..e4edf50 100644 --- a/ttcn3-bts-test/osmo-bsc.cfg +++ b/ttcn3-bts-test/osmo-bsc.cfg @@ -49,6 +49,7 @@ ! line vty no login + bind 0.0.0.0 ! e1_input e1_line 0 driver ipa -- To view, visit https://gerrit.osmocom.org/14150 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I6b6e8b47bfe85c15fb57a25b649029f872477146 Gerrit-Change-Number: 14150 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 17:21:06 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 17:21:06 +0000 Subject: Change in docker-playground[master]: ttcn3-bts-test: Fix BSC VTY access from test suite In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14150 ) Change subject: ttcn3-bts-test: Fix BSC VTY access from test suite ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14150 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6b6e8b47bfe85c15fb57a25b649029f872477146 Gerrit-Change-Number: 14150 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Thu, 23 May 2019 17:21:06 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 17:21:07 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 17:21:07 +0000 Subject: Change in docker-playground[master]: ttcn3-bts-test: Fix BSC VTY access from test suite In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14150 ) Change subject: ttcn3-bts-test: Fix BSC VTY access from test suite ...................................................................... ttcn3-bts-test: Fix BSC VTY access from test suite Some tests, particularly those for SMSCB, want to access the BSC VTY. This was enabled in the ttcn3 code, but the configs we're using in the docker environment didn't properly refelect that yet. Change-Id: I6b6e8b47bfe85c15fb57a25b649029f872477146 --- M ttcn3-bts-test/BTS_Tests.cfg M ttcn3-bts-test/osmo-bsc.cfg 2 files changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/ttcn3-bts-test/BTS_Tests.cfg b/ttcn3-bts-test/BTS_Tests.cfg index 37ddde0..9567845 100644 --- a/ttcn3-bts-test/BTS_Tests.cfg +++ b/ttcn3-bts-test/BTS_Tests.cfg @@ -6,6 +6,7 @@ [TESTPORT_PARAMETERS] *.BTSVTY.CTRL_HOSTNAME := "172.18.9.20" +*.BSCVTY.CTRL_HOSTNAME := "172.18.9.11" [MODULE_PARAMETERS] BTS_Tests.mp_rsl_ip := "172.18.9.10" diff --git a/ttcn3-bts-test/osmo-bsc.cfg b/ttcn3-bts-test/osmo-bsc.cfg index 54264e8..e4edf50 100644 --- a/ttcn3-bts-test/osmo-bsc.cfg +++ b/ttcn3-bts-test/osmo-bsc.cfg @@ -49,6 +49,7 @@ ! line vty no login + bind 0.0.0.0 ! e1_input e1_line 0 driver ipa -- To view, visit https://gerrit.osmocom.org/14150 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I6b6e8b47bfe85c15fb57a25b649029f872477146 Gerrit-Change-Number: 14150 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 17:35:31 2019 From: gerrit-no-reply at lists.osmocom.org (Eric Wild) Date: Thu, 23 May 2019 17:35:31 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Extend BTS_Tests.ttcn with test for RSL channel activation with ... Message-ID: Eric Wild has uploaded this change for review. ( https://gerrit.osmocom.org/14151 Change subject: bts: Extend BTS_Tests.ttcn with test for RSL channel activation with TA from initial activation onwards ...................................................................... bts: Extend BTS_Tests.ttcn with test for RSL channel activation with TA from initial activation onwards Change-Id: I4b2eec223e961aeedfd8afa77cb671d2842910fb Related: OS##3750 --- M bts/BTS_Tests.ttcn 1 file changed, 50 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/51/14151/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 7912ff6..0eba242 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -1783,6 +1783,55 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } +/* establish DChan, verify that the BTS sets the TA in the first SACCH L1 header. +TA for the IMM ASS messages is still controlled by g_pars.l1_pars.ms_actual_ta! */ +function f_tc_rsl_chan_initial_ta(charstring id) runs on ConnHdlr { + var L1ctlDlMessage l1_dl; + var uint5_t ta_to_test := 16; + + + f_l1_tune(L1CTL); + RSL.clear; + + /* tell fake_trx to use a given timing offset for all bursts */ + f_trx_fake_toffs256(ta_to_test*256); + + f_est_dchan(more_ies :={valueof(t_RSL_IE(RSL_IE_TIMING_ADVANCE, RSL_IE_Body:{timing_adv := ta_to_test}))} ); + + + alt { + + /* Pick all SACCH blocks for checking */ + [] L1CTL.receive(tr_L1CTL_DATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) -> value l1_dl { + + /* The second byte of the L1 header contains the TA. */ + if (not (l1_dl.payload.data_ind.payload[1] == int2oct(ta_to_test, 1))) { + setverdict(fail, "TA in L1 header does not match the signaled (RSL) TA."); + } + + } + + /* Ignore all other blocks */ + [] L1CTL.receive { repeat; } + + } + + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); + + setverdict(pass); +} + +testcase TC_rsl_chan_initial_ta() runs on test_CT { + var ConnHdlr vc_conn; + var ConnHdlrPars pars; + f_init(testcasename()); + pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN)); + vc_conn := f_start_handler(refers(f_tc_rsl_chan_initial_ta), pars); + vc_conn.done; + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + /* Test if a channel without valid uplink bursts generates RSL CONN FAIL IND (TS 48.058 4.10) */ private function f_TC_conn_fail_crit(charstring id) runs on ConnHdlr { f_l1_tune(L1CTL); @@ -4621,6 +4670,7 @@ execute( TC_meas_res_sign_sdcch8() ); execute( TC_meas_res_sign_tchh_toa256() ); execute( TC_rsl_ms_pwr_ctrl() ); + execute( TC_rsl_chan_initial_ta() ); execute( TC_conn_fail_crit() ); execute( TC_paging_imsi_80percent() ); execute( TC_paging_tmsi_80percent() ); -- To view, visit https://gerrit.osmocom.org/14151 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I4b2eec223e961aeedfd8afa77cb671d2842910fb Gerrit-Change-Number: 14151 Gerrit-PatchSet: 1 Gerrit-Owner: Eric Wild -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 19:13:38 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 19:13:38 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Extend BTS_Tests.ttcn with test for RSL channel activation with ... In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14151 ) Change subject: bts: Extend BTS_Tests.ttcn with test for RSL channel activation with TA from initial activation onwards ...................................................................... Patch Set 1: Code-Review+1 looks good. More empty lines than we usually have in the code, but don't bother to spend time on reducing those ;) -- To view, visit https://gerrit.osmocom.org/14151 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4b2eec223e961aeedfd8afa77cb671d2842910fb Gerrit-Change-Number: 14151 Gerrit-PatchSet: 1 Gerrit-Owner: Eric Wild Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 23 May 2019 19:13:38 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 19:16:04 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 19:16:04 +0000 Subject: Change in osmo-bts[master]: cbch: Add counters; queue length limits and CBCH LOAD reporting In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14113 ) Change subject: cbch: Add counters; queue length limits and CBCH LOAD reporting ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14113 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I7068c7937a60a900c40439115bb84dc3ee0d061f Gerrit-Change-Number: 14113 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith Gerrit-Comment-Date: Thu, 23 May 2019 19:16:04 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 19:16:10 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 19:16:10 +0000 Subject: Change in osmo-bts[master]: cbch: Improve verbosity and extend logging; Always indicate BASIC/EXT... In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14117 ) Change subject: cbch: Improve verbosity and extend logging; Always indicate BASIC/EXTD CBCH ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14117 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6c8f9fc6215b616371e46c1f4ca4e44b8c7ac096 Gerrit-Change-Number: 14117 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith Gerrit-Comment-Date: Thu, 23 May 2019 19:16:10 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 19:16:12 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 19:16:12 +0000 Subject: Change in osmo-bts[master]: cbch: Add counters; queue length limits and CBCH LOAD reporting In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14113 ) Change subject: cbch: Add counters; queue length limits and CBCH LOAD reporting ...................................................................... cbch: Add counters; queue length limits and CBCH LOAD reporting This adds the final missing part to full CBCH support: * keep a tab on the current queue length for basic + extended CBCH * keep rate counters about the number of sent / transmitted SMSCB * send CBCH LOAD information via RSL to the BSC Change-Id: I7068c7937a60a900c40439115bb84dc3ee0d061f --- M include/osmo-bts/cbch.h M include/osmo-bts/gsm_data_shared.h M include/osmo-bts/rsl.h M src/common/bts.c M src/common/cbch.c M src/common/rsl.c M src/common/vty.c 7 files changed, 137 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmo-bts/cbch.h b/include/osmo-bts/cbch.h index af5fd9a..6bba5fa 100644 --- a/include/osmo-bts/cbch.h +++ b/include/osmo-bts/cbch.h @@ -6,6 +6,14 @@ #include #include +enum { + CBCH_CTR_RCVD_QUEUED, + CBCH_CTR_RCVD_DROPPED, + CBCH_CTR_SENT_SINGLE, + CBCH_CTR_SENT_DEFAULT, + CBCH_CTR_SENT_NULL, +}; + /* incoming SMS broadcast command from RSL */ int bts_process_smscb_cmd(struct gsm_bts *bts, struct rsl_ie_cb_cmd_type cmd_type, bool extended_cbch, uint8_t msg_len, const uint8_t *msg); diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index 860c296..415e6bc 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -542,6 +542,7 @@ struct bts_smscb_state { struct llist_head queue; /* list of struct smscb_msg */ int queue_len; + struct rate_ctr_group *ctrs; struct smscb_msg *cur_msg; /* current SMS-CB */ struct smscb_msg *default_msg; /* default broadcast message; NULL if none */ }; @@ -744,6 +745,9 @@ /* State for SMSCB (Cell Broadcast) for BASIC and EXTENDED channel */ struct bts_smscb_state smscb_basic; struct bts_smscb_state smscb_extended; + int smscb_queue_tgt_len; /* ideal/target queue length */ + int smscb_queue_max_len; /* maximum queue length */ + int smscb_queue_hyst; /* hysteresis for CBCH laod indications */ float min_qual_rach; /* minimum quality for RACH bursts */ float min_qual_norm; /* minimum quality for normal daata */ diff --git a/include/osmo-bts/rsl.h b/include/osmo-bts/rsl.h index 0361841..186018e 100644 --- a/include/osmo-bts/rsl.h +++ b/include/osmo-bts/rsl.h @@ -43,4 +43,6 @@ void cb_ts_connected(struct gsm_bts_trx_ts *ts, int rc); void ipacc_dyn_pdch_complete(struct gsm_bts_trx_ts *ts, int rc); +int rsl_tx_cbch_load_indication(struct gsm_bts *bts, bool ext_cbch, bool overflow, uint8_t amount); + #endif // _RSL_H */ diff --git a/src/common/bts.c b/src/common/bts.c index 4af219b..5220406 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -49,6 +49,7 @@ #include #include #include +#include #define MIN_QUAL_RACH 5.0f /* at least 5 dB C/I */ #define MIN_QUAL_NORM -0.5f /* at least -1 dB C/I */ @@ -105,6 +106,22 @@ bts_ctr_desc }; +static const struct rate_ctr_desc cbch_ctr_desc[] = { + [CBCH_CTR_RCVD_QUEUED] = {"cbch:rcvd_queued", "Received + queued CBCH messages (Abis)" }, + [CBCH_CTR_RCVD_DROPPED] = {"cbch:rcvd_dropped", "Received + dropped CBCH messages (Abis)" }, + + [CBCH_CTR_SENT_SINGLE] = {"cbch:sent_single", "Sent single CBCH messages (Um)" }, + [CBCH_CTR_SENT_DEFAULT] = {"cbch:sent_default", "Sent default CBCH messages (Um)" }, + [CBCH_CTR_SENT_NULL] = {"cbch:sent_null", "Sent NULL CBCH messages (Um)" }, +}; +static const struct rate_ctr_group_desc cbch_ctrg_desc = { + "cbch", + "cell broadcast channel", + OSMO_STATS_CLASS_GLOBAL, + ARRAY_SIZE(cbch_ctr_desc), + cbch_ctr_desc +}; + /* Initialize the BTS data structures, called before config * file reading */ int bts_init(struct gsm_bts *bts) @@ -191,7 +208,15 @@ } INIT_LLIST_HEAD(&bts->smscb_basic.queue); + bts->smscb_basic.ctrs = rate_ctr_group_alloc(bts, &cbch_ctrg_desc, 0); + OSMO_ASSERT(bts->smscb_basic.ctrs); INIT_LLIST_HEAD(&bts->smscb_extended.queue); + bts->smscb_extended.ctrs = rate_ctr_group_alloc(bts, &cbch_ctrg_desc, 1); + OSMO_ASSERT(bts->smscb_extended.ctrs); + bts->smscb_queue_max_len = 15; + bts->smscb_queue_tgt_len = 2; + bts->smscb_queue_hyst = 2; + INIT_LLIST_HEAD(&bts->oml_queue); /* register DTX DL FSM */ diff --git a/src/common/cbch.c b/src/common/cbch.c index 2107f11..6b65679 100644 --- a/src/common/cbch.c +++ b/src/common/cbch.c @@ -26,6 +26,7 @@ #include #include +#include #include /* internal representation of one SMS-CB message (e.g. in the pending queue */ @@ -37,6 +38,28 @@ uint8_t num_segs; /* total number of segments */ }; +/* determine if current queue length differes more than permitted hysteresis from target + * queue length. If it does, send CBCH LOAD IND */ +static void check_and_send_cbch_load(struct gsm_bts *bts, struct bts_smscb_state *bts_ss) +{ + int delta = bts_ss->queue_len - bts->smscb_queue_tgt_len; + bool extended_cbch = false; + + if (bts_ss == &bts->smscb_extended) + extended_cbch = true; + + if (abs(delta) < bts->smscb_queue_hyst) + return; + + if (delta < 0) { + /* Underrun */ + rsl_tx_cbch_load_indication(bts, extended_cbch, false, OSMO_MIN(15, -delta)); + } else { + /* Overrun */ + rsl_tx_cbch_load_indication(bts, extended_cbch, true, OSMO_MIN(15, delta)); + } +} + /* determine SMSCB state by tb number */ static struct bts_smscb_state *bts_smscb_state(struct gsm_bts *bts, uint8_t tb) { @@ -182,9 +205,16 @@ case RSL_CB_CMD_TYPE_SCHEDULE: case RSL_CB_CMD_TYPE_NULL: /* def_bcast is ignored as per Section 9.3.41 of 3GPP TS 48.058 */ + /* limit queue size and optionally send CBCH LOAD Information (overflow) via RSL */ + if (bts_ss->queue_len >= bts->smscb_queue_max_len) { + rate_ctr_inc2(bts_ss->ctrs, CBCH_CTR_RCVD_DROPPED); + talloc_free(scm); + break; + } llist_add_tail(&scm->list, &bts_ss->queue); bts_ss->queue_len++; - /* FIXME: limit queue size and optionally send CBCH LOAD Information (overflow) via RSL */ + check_and_send_cbch_load(bts, bts_ss); + rate_ctr_inc2(bts_ss->ctrs, CBCH_CTR_RCVD_QUEUED); break; case RSL_CB_CMD_TYPE_DEFAULT: /* old default msg will be free'd in get_smscb_block() if it is currently in transit @@ -217,20 +247,25 @@ if (msg) { llist_del(&msg->list); bts_ss->queue_len--; + check_and_send_cbch_load(bts, bts_ss); DEBUGP(DLSMS, "%s: Dequeued msg\n", __func__); + rate_ctr_inc2(bts_ss->ctrs, CBCH_CTR_SENT_SINGLE); return msg; } - /* FIXME: send CBCH LOAD Information (underflow) via RSL */ + /* send CBCH LOAD Information (underflow) via RSL */ + check_and_send_cbch_load(bts, bts_ss); /* choose the default message, if any */ msg = bts_ss->default_msg; if (msg) { DEBUGP(DLSMS, "%s: Using default msg\n", __func__); + rate_ctr_inc2(bts_ss->ctrs, CBCH_CTR_SENT_DEFAULT); return msg; } DEBUGP(DLSMS, "%s: No queued msg nor default\n", __func__); + rate_ctr_inc2(bts_ss->ctrs, CBCH_CTR_SENT_NULL); return NULL; } diff --git a/src/common/rsl.c b/src/common/rsl.c index 364e829..af0b72d 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1636,6 +1636,32 @@ return 0; } +/* 8.5.8 CBCH Load Information */ +int rsl_tx_cbch_load_indication(struct gsm_bts *bts, bool ext_cbch, bool overflow, uint8_t amount) +{ + struct gsm_lchan *lchan = gsm_bts_get_cbch(bts); + struct msgb *msg; + uint8_t load_info; + + msg = rsl_msgb_alloc(sizeof(struct abis_rsl_cchan_hdr)); + if (!msg) + return -ENOMEM; + + /* 9.3.1 Channel Number */ + rsl_cch_push_hdr(msg, RSL_MT_CBCH_LOAD_IND, gsm_lchan2chan_nr(lchan)); + + /* 9.3.43 CBCH Load Information */ + load_info = ((overflow & 1) << 7) | (amount & 0x0F); + msgb_tv_put(msg, RSL_IE_CBCH_LOAD_INFO, load_info); + /* 9.3.44 SMSCB Channel Indicator */ + if (ext_cbch) + msgb_tv_put(msg, RSL_IE_SMSCB_CHAN_INDICATOR, 0x01); + + msg->trx = bts->c0; + + return abis_bts_rsl_sendmsg(msg); +} + /* * ip.access related messages */ diff --git a/src/common/vty.c b/src/common/vty.c index fab5516..1d25bfb 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -310,6 +310,9 @@ vty_out(vty, " pcu-socket %s%s", bts->pcu.sock_path, VTY_NEWLINE); if (bts->supp_meas_toa256) vty_out(vty, " supp-meas-info toa256%s", VTY_NEWLINE); + vty_out(vty, " smscb queue-max-length %d%s", bts->smscb_queue_max_len, VTY_NEWLINE); + vty_out(vty, " smscb queue-target-length %d%s", bts->smscb_queue_tgt_len, VTY_NEWLINE); + vty_out(vty, " smscb queue-hysteresis %d%s", bts->smscb_queue_hyst, VTY_NEWLINE); bts_model_config_write_bts(vty, bts); @@ -687,6 +690,33 @@ return CMD_SUCCESS; } +DEFUN(cfg_bts_smscb_max_qlen, cfg_bts_smscb_max_qlen_cmd, + "smscb queue-max-length <1-60>", + "Maximum queue length for SMSCB (CBCH) queue. In count of messages/pages (Default: 15)") +{ + struct gsm_bts *bts = vty->index; + bts->smscb_queue_max_len = atoi(argv[0]); + return CMD_SUCCESS; +} + +DEFUN(cfg_bts_smscb_tgt_qlen, cfg_bts_smscb_tgt_qlen_cmd, + "smscb queue-target-length <1-30>", + "Target queue length for SMSCB (CBCH) queue. In count of messages/pages (Default: 2)") +{ + struct gsm_bts *bts = vty->index; + bts->smscb_queue_tgt_len = atoi(argv[0]); + return CMD_SUCCESS; +} + +DEFUN(cfg_bts_smscb_qhyst, cfg_bts_smscb_qhyst_cmd, + "smscb queue-hysteresis <0-30>", + "Hysteresis for SMSCB (CBCH) queue. In count of messages/pages (Default: 2)") +{ + struct gsm_bts *bts = vty->index; + bts->smscb_queue_hyst = atoi(argv[0]); + return CMD_SUCCESS; +} + #define DB_DBM_STR \ "Unit is dB (decibels)\n" \ @@ -854,6 +884,8 @@ bts->agch_queue.rejected_msgs, bts->agch_queue.agch_msgs, bts->agch_queue.pch_msgs, VTY_NEWLINE); + vty_out(vty, " CBCH queue target: %d, hysteresis: %d, maximum: %d%s", + bts->smscb_queue_tgt_len, bts->smscb_queue_max_len, bts->smscb_queue_hyst, VTY_NEWLINE); vty_out(vty, " CBCH backlog queue length (BASIC): %d%s", bts->smscb_basic.queue_len, VTY_NEWLINE); vty_out(vty, " CBCH backlog queue length (EXTENDED): %u%s", @@ -1614,6 +1646,9 @@ install_element(BTS_NODE, &cfg_bts_pcu_sock_cmd); install_element(BTS_NODE, &cfg_bts_supp_meas_toa256_cmd); install_element(BTS_NODE, &cfg_bts_no_supp_meas_toa256_cmd); + install_element(BTS_NODE, &cfg_bts_smscb_max_qlen_cmd); + install_element(BTS_NODE, &cfg_bts_smscb_tgt_qlen_cmd); + install_element(BTS_NODE, &cfg_bts_smscb_qhyst_cmd); install_element(BTS_NODE, &cfg_trx_gsmtap_sapi_cmd); install_element(BTS_NODE, &cfg_trx_no_gsmtap_sapi_cmd); -- To view, visit https://gerrit.osmocom.org/14113 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I7068c7937a60a900c40439115bb84dc3ee0d061f Gerrit-Change-Number: 14113 Gerrit-PatchSet: 5 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 19:16:12 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 19:16:12 +0000 Subject: Change in osmo-bts[master]: cbch: Improve verbosity and extend logging; Always indicate BASIC/EXT... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14117 ) Change subject: cbch: Improve verbosity and extend logging; Always indicate BASIC/EXTD CBCH ...................................................................... cbch: Improve verbosity and extend logging; Always indicate BASIC/EXTD CBCH Change-Id: I6c8f9fc6215b616371e46c1f4ca4e44b8c7ac096 --- M src/common/cbch.c 1 file changed, 35 insertions(+), 19 deletions(-) Approvals: Harald Welte: Looks good to me, approved osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/common/cbch.c b/src/common/cbch.c index 6b65679..7ed11c2 100644 --- a/src/common/cbch.c +++ b/src/common/cbch.c @@ -71,6 +71,14 @@ OSMO_ASSERT(0); } +static const char *tb_to_chan_str(uint8_t tb) +{ + if (tb < 4) + return "CBCH-BASIC"; + else + return "CBCH-EXTENDED"; +} + /* construct a SMSCB NULL block in the user-provided output buffer at 'out' */ static int get_smscb_null_block(uint8_t *out) { @@ -86,24 +94,26 @@ } /* get the next block of the current CB message */ -static int get_smscb_block(struct bts_smscb_state *bts_ss, uint8_t *out, uint8_t block_nr, +static int get_smscb_block(struct bts_smscb_state *bts_ss, uint8_t *out, uint8_t tb, const struct gsm_time *g_time) { int to_copy; struct gsm412_block_type *block_type; struct smscb_msg *msg = bts_ss->cur_msg; + uint8_t block_nr = tb % 4; + const char *chan_name = tb_to_chan_str(tb); if (!msg) { /* No message: Send NULL block */ - DEBUGPGT(DLSMS, g_time, "No cur_msg; requesting NULL block\n"); + DEBUGPGT(DLSMS, g_time, "%s: No cur_msg; requesting NULL block\n", chan_name); return get_smscb_null_block(out); } OSMO_ASSERT(block_nr < 4); if (block_nr >= msg->num_segs) { /* Higher block number than this message has blocks: Send NULL block */ - DEBUGPGT(DLSMS, g_time, "cur_msg has only %u blocks; requesting NULL block\n", - msg->num_segs); + DEBUGPGT(DLSMS, g_time, "%s: cur_msg has only %u blocks; requesting NULL block\n", + chan_name, msg->num_segs); return get_smscb_null_block(out); } @@ -136,12 +146,14 @@ if (block_nr == 4) { if (msg != bts_ss->default_msg) { - DEBUGPGT(DLSMS, g_time, "deleting fully-transmitted message %p\n", msg); + DEBUGPGT(DLSMS, g_time, "%s: deleting fully-transmitted message %p\n", + chan_name, msg); /* delete any fully-transmitted normal message (or superseded default) */ talloc_free(bts_ss->cur_msg); bts_ss->cur_msg = NULL; } else { - DEBUGPGT(DLSMS, g_time, "keeping fully-transmitted default message %p\n", msg); + DEBUGPGT(DLSMS, g_time, "%s: keeping fully-transmitted default message %p\n", + chan_name, msg); } } @@ -170,16 +182,19 @@ { struct smscb_msg *scm; struct bts_smscb_state *bts_ss; + const char *chan_name; - if (extended_cbch) + if (extended_cbch) { + chan_name = tb_to_chan_str(4); bts_ss = &bts->smscb_extended; - else + } else { + chan_name = tb_to_chan_str(0); bts_ss = &bts->smscb_basic; + } if (msg_len > sizeof(scm->msg)) { - LOGP(DLSMS, LOGL_ERROR, - "Cannot process SMSCB of %u bytes (max %zu)\n", - msg_len, sizeof(scm->msg)); + LOGP(DLSMS, LOGL_ERROR, "%s: Cannot process SMSCB of %u bytes (max %zu)\n", + chan_name, msg_len, sizeof(scm->msg)); return -EINVAL; } @@ -197,8 +212,7 @@ memcpy(scm->msg, msg, msg_len); LOGP(DLSMS, LOGL_INFO, "RSL SMSCB COMMAND (chan=%s, type=%s, num_blocks=%u)\n", - extended_cbch ? "EXTENDED" : "BASIC", - get_value_string(rsl_cb_cmd_names, cmd_type.command), scm->num_segs); + chan_name, get_value_string(rsl_cb_cmd_names, cmd_type.command), scm->num_segs); switch (cmd_type.command) { case RSL_CB_CMD_TYPE_NORMAL: @@ -207,6 +221,8 @@ /* def_bcast is ignored as per Section 9.3.41 of 3GPP TS 48.058 */ /* limit queue size and optionally send CBCH LOAD Information (overflow) via RSL */ if (bts_ss->queue_len >= bts->smscb_queue_max_len) { + LOGP(DLSMS, LOGL_NOTICE, "RSL SMSCB COMMAND (chan=%s, type=%s): OVERFLOW\n", + chan_name, get_value_string(rsl_cb_cmd_names, cmd_type.command)); rate_ctr_inc2(bts_ss->ctrs, CBCH_CTR_RCVD_DROPPED); talloc_free(scm); break; @@ -241,6 +257,7 @@ static struct smscb_msg *select_next_smscb(struct gsm_bts *bts, uint8_t tb) { struct bts_smscb_state *bts_ss = bts_smscb_state(bts, tb); + const char *chan_name = tb_to_chan_str(tb); struct smscb_msg *msg; msg = llist_first_entry_or_null(&bts_ss->queue, struct smscb_msg, list); @@ -248,7 +265,7 @@ llist_del(&msg->list); bts_ss->queue_len--; check_and_send_cbch_load(bts, bts_ss); - DEBUGP(DLSMS, "%s: Dequeued msg\n", __func__); + DEBUGP(DLSMS, "%s: %s: Dequeued msg\n", __func__, chan_name); rate_ctr_inc2(bts_ss->ctrs, CBCH_CTR_SENT_SINGLE); return msg; } @@ -259,12 +276,12 @@ /* choose the default message, if any */ msg = bts_ss->default_msg; if (msg) { - DEBUGP(DLSMS, "%s: Using default msg\n", __func__); + DEBUGP(DLSMS, "%s: %s: Using default msg\n", __func__, chan_name); rate_ctr_inc2(bts_ss->ctrs, CBCH_CTR_SENT_DEFAULT); return msg; } - DEBUGP(DLSMS, "%s: No queued msg nor default\n", __func__); + DEBUGP(DLSMS, "%s: %s: No queued msg nor default\n", __func__, chan_name); rate_ctr_inc2(bts_ss->ctrs, CBCH_CTR_SENT_NULL); return NULL; } @@ -277,7 +294,6 @@ struct bts_smscb_state *bts_ss; /* According to 05.02 Section 6.5.4 */ uint32_t tb = (fn / 51) % 8; - uint8_t block_nr = tb % 4; int rc = 0; bts_ss = bts_smscb_state(bts, tb); @@ -296,11 +312,11 @@ case 4: /* select a new SMSCB message */ bts_ss->cur_msg = select_next_smscb(bts, tb); - rc = get_smscb_block(bts_ss, outbuf, block_nr, g_time); + rc = get_smscb_block(bts_ss, outbuf, tb, g_time); break; case 1: case 2: case 3: case 5: case 6: case 7: - rc = get_smscb_block(bts_ss, outbuf, block_nr, g_time); + rc = get_smscb_block(bts_ss, outbuf, tb, g_time); break; } -- To view, visit https://gerrit.osmocom.org/14117 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I6c8f9fc6215b616371e46c1f4ca4e44b8c7ac096 Gerrit-Change-Number: 14117 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 23 20:02:54 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 23 May 2019 20:02:54 +0000 Subject: Change in osmo-bsc[master]: chan_alloc: Don't include CBCH channels in load computation Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14152 Change subject: chan_alloc: Don't include CBCH channels in load computation ...................................................................... chan_alloc: Don't include CBCH channels in load computation When displaying the channel (lchan) load, we are interested in the dedicated channels as available for communication with mobile stations. If CBCH is enabled, it "steals" one of the SDCCH slots, so we have to exclude this channel from the count of available dedicated channels. Before this patch, A CBCH would show up as "in use" dedicated channel (so both the total and the in_use count were incremented). After this patch, neither "total" nor "use" are affected; The CBCH slot is completely excluded from load statistics. Change-Id: I606962e4977f122ff05a2d4e756c04c7f38bdaa0 --- M src/osmo-bsc/chan_alloc.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/52/14152/1 diff --git a/src/osmo-bsc/chan_alloc.c b/src/osmo-bsc/chan_alloc.c index 9c43414..7f0aa31 100644 --- a/src/osmo-bsc/chan_alloc.c +++ b/src/osmo-bsc/chan_alloc.c @@ -59,6 +59,10 @@ continue; ts_for_each_lchan(lchan, ts) { + /* don't even count CBCH slots in total */ + if (lchan->type == GSM_LCHAN_CBCH) + continue; + pl->total++; switch (lchan->fi->state) { -- To view, visit https://gerrit.osmocom.org/14152 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I606962e4977f122ff05a2d4e756c04c7f38bdaa0 Gerrit-Change-Number: 14152 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:31:44 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 24 May 2019 08:31:44 +0000 Subject: Change in osmo-ci[master]: nightly-packages: Update LimeSuite to latest tag (v19.0.4) Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14153 Change subject: nightly-packages: Update LimeSuite to latest tag (v19.0.4) ...................................................................... nightly-packages: Update LimeSuite to latest tag (v19.0.4) Change-Id: Id6c27a924e3005ffadc7720190b261f089beada1 --- M scripts/osmocom-nightly-packages.sh 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/53/14153/1 diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh index ce532bc..27cd9dc 100755 --- a/scripts/osmocom-nightly-packages.sh +++ b/scripts/osmocom-nightly-packages.sh @@ -143,7 +143,7 @@ checkout_limesuite() { cd "$REPO" git clone https://github.com/myriadrf/LimeSuite limesuite - TAG="357ad5dd0d71304179d476b38e67240527d917df" + TAG="$(get_last_tag limesuite)" cd limesuite git checkout "$TAG" } @@ -205,7 +205,7 @@ checkout_copy_debian8_jessie "osmo-gsm-manuals" checkout_copy_debian8_jessie "osmo-trx" - build limesuite no_commit --git-upstream-tree="357ad5dd0d71304179d476b38e67240527d917df" + build limesuite no_commit --git-upstream-tree="$(get_last_tag limesuite)" build osmo-gsm-manuals build osmo-gsm-manuals-debian8-jessie build libosmocore -- To view, visit https://gerrit.osmocom.org/14153 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id6c27a924e3005ffadc7720190b261f089beada1 Gerrit-Change-Number: 14153 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:32:49 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 24 May 2019 08:32:49 +0000 Subject: Change in osmo-ci[master]: nightly-packages: Update LimeSuite to latest tag (v19.0.4) In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14153 ) Change subject: nightly-packages: Update LimeSuite to latest tag (v19.0.4) ...................................................................... Patch Set 1: Verified+1 We already build latest tag for latest. I tested build in my OBS directory and I tested osmo-trx-lms master runs fine with it. -- To view, visit https://gerrit.osmocom.org/14153 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id6c27a924e3005ffadc7720190b261f089beada1 Gerrit-Change-Number: 14153 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 24 May 2019 08:32:49 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:38:11 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 08:38:11 +0000 Subject: Change in osmo-bts[master]: rsl.adoc: DELETE INDICATION is implemented since Feb '18 Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14154 Change subject: rsl.adoc: DELETE INDICATION is implemented since Feb '18 ...................................................................... rsl.adoc: DELETE INDICATION is implemented since Feb '18 In the following commit, we introduced transmitting the RSL DELETE INDICATION on AGCH overflow: commit 19da7fdea8912831b19d9aeed51cd2226f342283 Author: Harald Welte Date: Sat Feb 24 04:32:29 2018 +0100 So let's sync the manual with the code. Change-Id: I988778bdb83271355dc11b1a30a59e1a5dba5fb2 Related: OS#2990 --- M doc/manuals/abis/rsl.adoc 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/54/14154/1 diff --git a/doc/manuals/abis/rsl.adoc b/doc/manuals/abis/rsl.adoc index 601ab8c..ec4da67 100644 --- a/doc/manuals/abis/rsl.adoc +++ b/doc/manuals/abis/rsl.adoc @@ -45,6 +45,7 @@ | 8.5.1 | <> | BCCH INFORMATION | <- | Received | 8.5.2 | - | CCCH LOAD INDICATION | -> | Sent | 8.5.3 | <> | CHANNEL REQUIRED | -> | Sent +| 8.5.4 | - | DELETE INDICATION | -> | Sent | 8.5.5 | <> | PAGING COMMAND | <- | Received | 8.5.6 | - | IMMEDIATE ASSIGN COMMAND | <- | Received | 8.5.8 | - | SMS BROADCAST COMMAND | <- | Received @@ -105,7 +106,6 @@ | 8.4.30 | TFO REPORT | 8.4.31 | TFO MODIFICATION REQUEST 2+<| *COMMON CHANNEL MANAGEMENT MESSAGES* -| 8.5.4 | DELETE INDICATION | 8.5.7 | SMS BROADCAST REQUEST | 8.5.10 | NOTIFICATION COMMAND 2+<| *TRX MANAGEMENT MESSAGES* -- To view, visit https://gerrit.osmocom.org/14154 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I988778bdb83271355dc11b1a30a59e1a5dba5fb2 Gerrit-Change-Number: 14154 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:38:11 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 08:38:11 +0000 Subject: Change in osmo-bts[master]: RSL: Fix logic about fixed/dynamic MS power control in MS POWER COMMAND Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14155 Change subject: RSL: Fix logic about fixed/dynamic MS power control in MS POWER COMMAND ...................................................................... RSL: Fix logic about fixed/dynamic MS power control in MS POWER COMMAND The spec is quite clear: If the MS Power Parameters IE is present, then the BTS shall perform autonomous MS power control. If it's absent, then the MS power shall be fied. Let's adjust our code accordingly. Change-Id: Ie43a1fc9cc658677c8c945ae82d03b7bffbe52d5 Related: OS#1622 --- M src/common/rsl.c 1 file changed, 21 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/55/14155/1 diff --git a/src/common/rsl.c b/src/common/rsl.c index e6fbe6f..e6fd8b9 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1554,19 +1554,34 @@ /* 8.4.15 MS POWER CONTROL */ static int rsl_rx_ms_pwr_ctrl(struct msgb *msg) { + struct abis_rsl_dchan_hdr *dch = msgb_l2(msg); struct gsm_lchan *lchan = msg->lchan; struct tlv_parsed tp; + uint8_t pwr; rsl_tlv_parse(&tp, msgb_l3(msg), msgb_l3len(msg)); - if (TLVP_PRES_LEN(&tp, RSL_IE_MS_POWER, 1)) { - uint8_t pwr = *TLVP_VAL(&tp, RSL_IE_MS_POWER) & 0x1F; - lchan->ms_power_ctrl.fixed = 1; - lchan->ms_power_ctrl.current = pwr; - LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "forcing power to %d\n", lchan->ms_power_ctrl.current); - bts_model_adjst_ms_pwr(lchan); + /* 9.3.13 MS Power (M) */ + if (!TLVP_PRES_LEN(&tp, RSL_IE_MS_POWER, 1)) + return rsl_tx_error_report(msg->trx, RSL_ERR_MAND_IE_ERROR, &dch->chan_nr, NULL, msg); + + pwr = *TLVP_VAL(&tp, RSL_IE_MS_POWER) & 0x1F; + lchan->ms_power_ctrl.current = pwr; + + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "forcing power to %d\n", lchan->ms_power_ctrl.current); + + /* 9.3.31 MS Power Parameters (O) */ + if (TLVP_PRESENT(&tp, RSL_IE_MS_POWER_PARAM)) + lchan->ms_power_ctrl.fixed = 0; + else { + /* Spec explicitly states BTS should only perform + * autonomous MS power control loop in BTS if 'MS Power + * Parameters' IE is present! */ + lchan->ms_power_ctrl.fixed = 1; } + bts_model_adjst_ms_pwr(lchan); + return 0; } -- To view, visit https://gerrit.osmocom.org/14155 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ie43a1fc9cc658677c8c945ae82d03b7bffbe52d5 Gerrit-Change-Number: 14155 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:38:12 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 08:38:12 +0000 Subject: Change in osmo-bts[master]: rsl: Implement parsing of BS Power Control message Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14156 Change subject: rsl: Implement parsing of BS Power Control message ...................................................................... rsl: Implement parsing of BS Power Control message Change-Id: Id144a7e468f730e3cdaefa4cf2ad51c6106310a2 --- M doc/manuals/abis/rsl.adoc M src/common/rsl.c 2 files changed, 33 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/56/14156/1 diff --git a/doc/manuals/abis/rsl.adoc b/doc/manuals/abis/rsl.adoc index ec4da67..f66142d 100644 --- a/doc/manuals/abis/rsl.adoc +++ b/doc/manuals/abis/rsl.adoc @@ -39,6 +39,7 @@ | 8.4.11 | - | MODE MODIFY NEGATIVE ACKNOWLEDGE | -> | Sent | 8.4.14 | - | RF CHANNEL RELEASE | <- | Received | 8.4.15 | <> | MS POWER CONTROL | <- | Received +| 8.4.16 | - | BS POWER CONTROL | <- | Received | 8.4.19 | - | RF CHANNEL RELEASE ACKNOWLEDGE | -> | Sent | 8.4.20 | <> | SACCH INFO MODIFY | <- | Received 5+<| *COMMON CHANNEL MANAGEMENT MESSAGES* @@ -91,7 +92,6 @@ 2+<| *DEDICATED CHANNEL MANAGEMENT MESSAGES* | 8.4.12 | PHYSICAL CONTEXT REQUEST | 8.4.13 | PHYSICAL CONTEXT CONFIRM -| 8.4.16 | BS POWER CONTROL | 8.4.17 | PREPROCESS CONFIGURE | 8.4.18 | PREPROCESSED MEASUREMENT RESULT | 8.4.21 | TALKER DETECTION diff --git a/src/common/rsl.c b/src/common/rsl.c index e6fd8b9..f59785b 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1585,6 +1585,35 @@ return 0; } +/* 8.4.16 BS POWER CONTROL */ +static int rsl_rx_bs_pwr_ctrl(struct msgb *msg) +{ + struct abis_rsl_dchan_hdr *dch = msgb_l2(msg); + struct gsm_lchan *lchan = msg->lchan; + struct tlv_parsed tp; + + rsl_tlv_parse(&tp, msgb_l3(msg), msgb_l3len(msg)); + + /* 9.3.4 BS Power (M) */ + if (!TLVP_PRES_LEN(&tp, RSL_IE_BS_POWER, 1)) + return rsl_tx_error_report(msg->trx, RSL_ERR_MAND_IE_ERROR, &dch->chan_nr, NULL, msg); + + lchan->bs_power = *TLVP_VAL(&tp, RSL_IE_BS_POWER); + + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "BS POWER CONTROL to -%u dBm\n", (lchan->bs_power & 0xF)*2); + + /* 9.3.31 MS Power Parameters (O) */ + if (TLVP_PRESENT(&tp, RSL_IE_BS_POWER_PARAM)) { + /* Spec explicitly states BTS should perform autonomous + * BS power control loop in BTS if 'BS Power Parameters' + * IE is present! WE don't support that. */ + return rsl_tx_error_report(msg->trx, RSL_ERR_OPT_IE_ERROR, &dch->chan_nr, NULL, msg); + } + + return 0; +} + + /* 8.4.20 SACCH INFO MODify */ static int rsl_rx_sacch_inf_mod(struct msgb *msg) { @@ -2926,6 +2955,9 @@ case RSL_MT_MS_POWER_CONTROL: ret = rsl_rx_ms_pwr_ctrl(msg); break; + case RSL_MT_BS_POWER_CONTROL: + ret = rsl_rx_bs_pwr_ctrl(msg); + break; case RSL_MT_IPAC_PDCH_ACT: case RSL_MT_IPAC_PDCH_DEACT: rsl_rx_dyn_pdch(msg, dch->c.msg_type == RSL_MT_IPAC_PDCH_ACT); -- To view, visit https://gerrit.osmocom.org/14156 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id144a7e468f730e3cdaefa4cf2ad51c6106310a2 Gerrit-Change-Number: 14156 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:38:12 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 08:38:12 +0000 Subject: Change in osmo-bts[master]: rsl: MS POWER COCNTROL isn't (only) about "forcing" power levels Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14157 Change subject: rsl: MS POWER COCNTROL isn't (only) about "forcing" power levels ...................................................................... rsl: MS POWER COCNTROL isn't (only) about "forcing" power levels ...so let's have a more neutral error message Change-Id: I1ffa336b18347c2fcedfeb398b255dc517245d7a --- M src/common/rsl.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/57/14157/1 diff --git a/src/common/rsl.c b/src/common/rsl.c index f59785b..dea3396 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1568,7 +1568,7 @@ pwr = *TLVP_VAL(&tp, RSL_IE_MS_POWER) & 0x1F; lchan->ms_power_ctrl.current = pwr; - LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "forcing power to %d\n", lchan->ms_power_ctrl.current); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "Rx MS POWER CONTROL %d\n", lchan->ms_power_ctrl.current); /* 9.3.31 MS Power Parameters (O) */ if (TLVP_PRESENT(&tp, RSL_IE_MS_POWER_PARAM)) -- To view, visit https://gerrit.osmocom.org/14157 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I1ffa336b18347c2fcedfeb398b255dc517245d7a Gerrit-Change-Number: 14157 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:38:12 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 08:38:12 +0000 Subject: Change in osmo-bts[master]: load_indication: Fix missing re-set of RACH parameters Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14158 Change subject: load_indication: Fix missing re-set of RACH parameters ...................................................................... load_indication: Fix missing re-set of RACH parameters While we re-set the PCH load counters after every report, we never actually re-set the RACH load counters. This meant that the period/window for RACH load averaging would always grow, rather than being reset every load indication period. Related: OS#3750 Change-Id: Icd9150ba56d77d031c3cf496c5936c2de52b364c --- M src/common/load_indication.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/58/14158/1 diff --git a/src/common/load_indication.c b/src/common/load_indication.c index e91f6d4..fa4745b 100644 --- a/src/common/load_indication.c +++ b/src/common/load_indication.c @@ -32,6 +32,7 @@ { /* re-set the counters */ bts->load.ccch.pch_used = bts->load.ccch.pch_total = 0; + bts->load.rach.busy = bts->load.rach.access = bts->load.rach.total = 0; } static void load_timer_cb(void *data) -- To view, visit https://gerrit.osmocom.org/14158 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Icd9150ba56d77d031c3cf496c5936c2de52b364c Gerrit-Change-Number: 14158 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:38:12 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 08:38:12 +0000 Subject: Change in osmo-bts[master]: l1sap: Correctly count RACH slots in calc_exprd_rach_frames() Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14159 Change subject: l1sap: Correctly count RACH slots in calc_exprd_rach_frames() ...................................................................... l1sap: Correctly count RACH slots in calc_exprd_rach_frames() We used a bogus multiplication factor of four when computing the number of expired RACH slots. While there are four RACH slots per block (i.e. 4 times more RACH received than normal MAC blocks), that multiplier doesn't apply here. This wrong multiplier resulted in rather weird RACH load reports to the BSC. Related: OS#3750 Change-Id: I6b14fd6e7819f9164fb4a09b432a9f419e3b6e5c --- M src/common/l1sap.c 1 file changed, 1 insertion(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/59/14159/1 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index f31d822..d9ffdb8 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -484,10 +484,7 @@ rach_frames_expired = 1; } - /* Each Frame has room for 4 RACH slots, since RACH - * slots are short enough to fit into a single radio - * burst, so we need to multiply the final result by 4 */ - return rach_frames_expired * 4; + return rach_frames_expired; } /* time information received from bts model */ -- To view, visit https://gerrit.osmocom.org/14159 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I6b14fd6e7819f9164fb4a09b432a9f419e3b6e5c Gerrit-Change-Number: 14159 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:38:13 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 08:38:13 +0000 Subject: Change in osmo-bts[master]: l1sap: Fix calculation of expired RACH slots in case of missing frame... Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14160 Change subject: l1sap: Fix calculation of expired RACH slots in case of missing frame numbers ...................................................................... l1sap: Fix calculation of expired RACH slots in case of missing frame numbers In case of a Combined CCCH (with SDCCH/4), the number of RACH slots depends on the frame number. So in case of lost/skipped frame numbers, we cannot simply compute the value for the current fn and then multiply it by the number of frame numbers expired. Rather, we have to 'replay' all missed frame numbers and individually determine how many RACH slots happened in that frame. Related: OS#3750 Change-Id: If4f8d2ea55fc722c64c330cde09e833b67ee98fe --- M src/common/l1sap.c 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/60/14160/1 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index d9ffdb8..52f2b33 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -493,6 +493,7 @@ struct info_time_ind_param *info_time_ind) { int frames_expired; + int i; DEBUGPFN(DL1P, info_time_ind->fn, "Rx MPH_INFO time ind\n"); @@ -513,8 +514,10 @@ /* increment number of RACH slots that have passed by since the * last time indication */ - bts->load.rach.total += - calc_exprd_rach_frames(bts, info_time_ind->fn) * frames_expired; + for (i = 0; i < frames_expired; i++) { + uint32_t fn = (info_time_ind->fn + GSM_HYPERFRAME - i) % GSM_HYPERFRAME; + bts->load.rach.total += calc_exprd_rach_frames(bts, fn); + } return 0; } -- To view, visit https://gerrit.osmocom.org/14160 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If4f8d2ea55fc722c64c330cde09e833b67ee98fe Gerrit-Change-Number: 14160 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:38:14 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 08:38:14 +0000 Subject: Change in osmo-bts[master]: oml: Print more context from FOM Header or using MO Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14161 Change subject: oml: Print more context from FOM Header or using MO ...................................................................... oml: Print more context from FOM Header or using MO Some of our OML log lines were missing any context. Try making more sense by printing any context information about the given managed object, TRX, ... as we have it. Change-Id: I60d1660c6d574f206d7b8cc10082b413142365dd --- M src/common/oml.c 1 file changed, 31 insertions(+), 28 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/61/14161/1 diff --git a/src/common/oml.c b/src/common/oml.c index 186c2a2..63643c5 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -70,6 +70,16 @@ return msgb_alloc_headroom(1024, 128, "OML"); } +/* FIXME: move to gsm_data_shared */ +static char mo_buf[128]; +char *gsm_abis_mo_name(const struct gsm_abis_mo *mo) +{ + snprintf(mo_buf, sizeof(mo_buf), "OC=%s INST=(%02x,%02x,%02x)", + get_value_string(abis_nm_obj_class_names, mo->obj_class), + mo->obj_inst.bts_nr, mo->obj_inst.trx_nr, mo->obj_inst.ts_nr); + return mo_buf; +} + /* 3GPP TS 12.21 ? 8.8.2 */ int oml_tx_failure_event_rep(const struct gsm_abis_mo *mo, uint16_t cause_value, const char *fmt, ...) @@ -77,7 +87,8 @@ struct msgb *nmsg; va_list ap; - LOGP(DOML, LOGL_NOTICE, "Sending %s to BSC: ", get_value_string(abis_mm_event_cause_names, cause_value)); + LOGP(DOML, LOGL_NOTICE, "%s: Sending %s to BSC: ", gsm_abis_mo_name(mo), + get_value_string(abis_mm_event_cause_names, cause_value)); va_start(ap, fmt); osmo_vlogp(DOML, LOGL_NOTICE, __FILE__, __LINE__, 1, fmt, ap); nmsg = abis_nm_fail_evt_vrep(NM_EVT_PROC_FAIL, NM_SEVER_CRITICAL, @@ -133,16 +144,6 @@ return oml_send_msg(msg, 0); } -/* FIXME: move to gsm_data_shared */ -static char mo_buf[128]; -char *gsm_abis_mo_name(const struct gsm_abis_mo *mo) -{ - snprintf(mo_buf, sizeof(mo_buf), "OC=%s INST=(%02x,%02x,%02x)", - get_value_string(abis_nm_obj_class_names, mo->obj_class), - mo->obj_inst.bts_nr, mo->obj_inst.trx_nr, mo->obj_inst.ts_nr); - return mo_buf; -} - static inline void add_bts_attrs(struct msgb *msg, const struct gsm_bts *bts) { uint16_t total_len = 0; @@ -203,7 +204,7 @@ int i; if (!trx) { - LOGP(DOML, LOGL_ERROR, "O&M Get Attributes for unknown TRX\n"); + LOGP(DOML, LOGL_ERROR, "%s: O&M Get Attributes for unknown TRX\n", gsm_trx_name(trx)); return -NM_NACK_TRXNR_UNKN; } @@ -213,8 +214,8 @@ add_trx_attr(out_msg, trx); break; default: - LOGP(DOML, LOGL_ERROR, "O&M Get Attributes [%u], %s is unsupported by TRX.\n", i, - get_value_string(abis_nm_att_names, attr[i])); + LOGP(DOML, LOGL_ERROR, "%s: O&M Get Attributes [%u], %s is unsupported by TRX.\n", + gsm_trx_name(trx), i, get_value_string(abis_nm_att_names, attr[i])); /* Push this tag to the list of unsupported attributes */ buf = msgb_push(out_msg, 1); *buf = attr[i]; @@ -273,10 +274,10 @@ const uint8_t *attr, uint16_t attr_len) { struct msgb *nmsg = oml_msgb_alloc(); + const char *mo_name = gsm_abis_mo_name(mo); int rc; - LOGP(DOML, LOGL_INFO, "%s Tx Get Attribute Response\n", - get_value_string(abis_nm_obj_class_names, mo->obj_class)); + LOGP(DOML, LOGL_INFO, "%s Tx Get Attribute Response\n", mo_name); if (!nmsg) return -NM_NACK_CANT_PERFORM; @@ -289,13 +290,14 @@ rc = handle_attrs_trx(nmsg, gsm_bts_trx_num(mo->bts, mo->obj_inst.trx_nr), attr, attr_len); break; default: - LOGP(DOML, LOGL_ERROR, "Unsupported MO class %s in Get Attribute Response\n", - get_value_string(abis_nm_obj_class_names, mo->obj_class)); + LOGP(DOML, LOGL_ERROR, "%s: Unsupported MO class in Get Attribute Response\n", + mo_name); rc = -NM_NACK_OBJCLASS_NOTSUPP; } if (rc < 0) { - LOGP(DOML, LOGL_ERROR, "Tx Get Attribute Response FAILED with rc=%d\n", rc); + LOGP(DOML, LOGL_ERROR, "%s: Tx Get Attribute Response FAILED with rc=%d\n", + mo_name, rc); msgb_free(nmsg); return rc; } @@ -442,7 +444,7 @@ /* alter message type */ if (cause) { - LOGP(DOML, LOGL_NOTICE, "Sending FOM NACK with cause %s.\n", + LOGPFOH(DOML, LOGL_NOTICE, foh, "Sending FOM NACK with cause %s.\n", abis_nm_nack_cause_name(cause)); foh->msg_type += 2; /* nack */ /* add cause */ @@ -451,7 +453,7 @@ struct abis_om_hdr *omh = (struct abis_om_hdr *) msgb_l2(msg); omh->length = msgb_l3len(msg); } else { - LOGP(DOML, LOGL_DEBUG, "Sending FOM ACK.\n"); + LOGPFOH(DOML, LOGL_DEBUG, foh, "Sending FOM ACK.\n"); foh->msg_type++; /* ack */ } @@ -561,18 +563,18 @@ rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UNSUP_ATTR, "Get Attribute parsing failure"); - return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); + return oml_mo_fom_ack_nack(mo, NM_MT_GET_ATTR, NM_NACK_INCORR_STRUCT); } if (!TLVP_PRES_LEN(&tp, NM_ATT_LIST_REQ_ATTR, 1)) { oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UNSUP_ATTR, "Get Attribute without Attribute List"); - return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); + return oml_mo_fom_ack_nack(mo, NM_MT_GET_ATTR, NM_NACK_INCORR_STRUCT); } rc = oml_tx_attr_resp(mo, TLVP_VAL(&tp, NM_ATT_LIST_REQ_ATTR), TLVP_LEN(&tp, NM_ATT_LIST_REQ_ATTR)); if (rc < 0) { LOGPFOH(DOML, LOGL_ERROR, foh, "Responding to O&M Get Attributes message with NACK 0%x\n", -rc); - return oml_fom_ack_nack(msg, -rc); + return oml_mo_fom_ack_nack(mo, NM_MT_GET_ATTR, -rc); } return 0; @@ -1350,6 +1352,7 @@ struct e1inp_sign_link *oml_link = trx->bts->oml_link; uint16_t port = IPA_TCP_PORT_RSL; uint32_t ip = get_signlink_remote_ip(oml_link); + const char *trx_name = gsm_trx_name(trx); struct in_addr in; int rc; @@ -1366,16 +1369,16 @@ } in.s_addr = htonl(ip); - LOGP(DOML, LOGL_INFO, "Rx IPA RSL CONNECT IP=%s PORT=%u STREAM=0x%02x\n", - inet_ntoa(in), port, stream_id); + LOGP(DOML, LOGL_INFO, "%s: Rx IPA RSL CONNECT IP=%s PORT=%u STREAM=0x%02x\n", + trx_name, inet_ntoa(in), port, stream_id); if (trx->bts->variant == BTS_OSMO_OMLDUMMY) { rc = 0; - LOGP(DOML, LOGL_NOTICE, "Not connecting RSL in OML-DUMMY!\n"); + LOGP(DOML, LOGL_NOTICE, "%s: Not connecting RSL in OML-DUMMY!\n", trx_name); } else rc = e1inp_ipa_bts_rsl_connect_n(oml_link->ts->line, inet_ntoa(in), port, trx->nr); if (rc < 0) { - LOGP(DOML, LOGL_ERROR, "Error in abis_open(RSL): %d\n", rc); + LOGP(DOML, LOGL_ERROR, "%s: Error in abis_open(RSL): %d\n", trx_name, rc); return oml_fom_ack_nack(msg, NM_NACK_CANT_PERFORM); } -- To view, visit https://gerrit.osmocom.org/14161 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I60d1660c6d574f206d7b8cc10082b413142365dd Gerrit-Change-Number: 14161 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:38:14 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 08:38:14 +0000 Subject: Change in osmo-bts[master]: oml: Have one generic log message for all transmitted messages Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14162 Change subject: oml: Have one generic log message for all transmitted messages ...................................................................... oml: Have one generic log message for all transmitted messages Rather than open-coding "Tx foobar..." in various functions (and forgetting it in half of them), let's add a generic message into oml_mo_send_msg(). Change-Id: I5dd4b1749e68fb7fc74cb2e3a778d2418f46b770 --- M src/common/oml.c 1 file changed, 2 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/62/14162/1 diff --git a/src/common/oml.c b/src/common/oml.c index 63643c5..67eb6d8 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -141,6 +141,8 @@ /* FIXME: This assumption may not always be correct */ msg->trx = mo->bts->c0; + DEBUGPFOH(DOML, foh, "Tx %s\n", get_value_string(abis_nm_msgtype_names, foh->msg_type)); + return oml_send_msg(msg, 0); } @@ -277,8 +279,6 @@ const char *mo_name = gsm_abis_mo_name(mo); int rc; - LOGP(DOML, LOGL_INFO, "%s Tx Get Attribute Response\n", mo_name); - if (!nmsg) return -NM_NACK_CANT_PERFORM; @@ -314,8 +314,6 @@ { struct msgb *nmsg; - LOGP(DOML, LOGL_INFO, "%s Tx STATE CHG REP\n", gsm_abis_mo_name(mo)); - nmsg = oml_msgb_alloc(); if (!nmsg) return -ENOMEM; @@ -470,8 +468,6 @@ { struct msgb *nmsg; - LOGP(DOML, LOGL_INFO, "%s Tx SW ACT REP\n", gsm_abis_mo_name(mo)); - nmsg = oml_msgb_alloc(); if (!nmsg) return -ENOMEM; -- To view, visit https://gerrit.osmocom.org/14162 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I5dd4b1749e68fb7fc74cb2e3a778d2418f46b770 Gerrit-Change-Number: 14162 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:38:39 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 08:38:39 +0000 Subject: Change in osmo-bts[master]: Use LOGPLCHAN whenever possible In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14111 ) Change subject: Use LOGPLCHAN whenever possible ...................................................................... Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14111 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6913ac8fb543811126b85a54118333155c03bc03 Gerrit-Change-Number: 14111 Gerrit-PatchSet: 6 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 24 May 2019 08:38:39 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:38:43 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 08:38:43 +0000 Subject: Change in osmo-bts[master]: rsl.adoc: DELETE INDICATION is implemented since Feb '18 In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14154 ) Change subject: rsl.adoc: DELETE INDICATION is implemented since Feb '18 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14154 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I988778bdb83271355dc11b1a30a59e1a5dba5fb2 Gerrit-Change-Number: 14154 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Fri, 24 May 2019 08:38:43 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:39:24 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 08:39:24 +0000 Subject: Change in osmo-bts[master]: load_indication: Fix missing re-set of RACH parameters In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14158 ) Change subject: load_indication: Fix missing re-set of RACH parameters ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14158 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icd9150ba56d77d031c3cf496c5936c2de52b364c Gerrit-Change-Number: 14158 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Fri, 24 May 2019 08:39:24 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:39:35 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 08:39:35 +0000 Subject: Change in osmo-bts[master]: l1sap: Correctly count RACH slots in calc_exprd_rach_frames() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14159 ) Change subject: l1sap: Correctly count RACH slots in calc_exprd_rach_frames() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14159 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6b14fd6e7819f9164fb4a09b432a9f419e3b6e5c Gerrit-Change-Number: 14159 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Fri, 24 May 2019 08:39:35 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:39:41 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 08:39:41 +0000 Subject: Change in osmo-bts[master]: l1sap: Correctly count RACH slots in calc_exprd_rach_frames() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14159 ) Change subject: l1sap: Correctly count RACH slots in calc_exprd_rach_frames() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14159 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6b14fd6e7819f9164fb4a09b432a9f419e3b6e5c Gerrit-Change-Number: 14159 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Fri, 24 May 2019 08:39:41 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:43:53 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 24 May 2019 08:43:53 +0000 Subject: Change in osmo-bts[master]: RSL: Fix logic about fixed/dynamic MS power control in MS POWER COMMAND In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14155 ) Change subject: RSL: Fix logic about fixed/dynamic MS power control in MS POWER COMMAND ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14155 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie43a1fc9cc658677c8c945ae82d03b7bffbe52d5 Gerrit-Change-Number: 14155 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 24 May 2019 08:43:53 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:48:40 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 24 May 2019 08:48:40 +0000 Subject: Change in osmo-bts[master]: rsl: Implement parsing of BS Power Control message In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14156 ) Change subject: rsl: Implement parsing of BS Power Control message ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/14156/1/src/common/rsl.c File src/common/rsl.c: https://gerrit.osmocom.org/#/c/14156/1/src/common/rsl.c at 1603 PS1, Line 1603: LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "BS POWER CONTROL to -%u dBm\n", (lchan->bs_power & 0xF)*2); this mask and *2 here probably deserves some comment. -- To view, visit https://gerrit.osmocom.org/14156 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id144a7e468f730e3cdaefa4cf2ad51c6106310a2 Gerrit-Change-Number: 14156 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 24 May 2019 08:48:40 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:49:13 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 24 May 2019 08:49:13 +0000 Subject: Change in osmo-bts[master]: rsl: MS POWER COCNTROL isn't (only) about "forcing" power levels In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14157 ) Change subject: rsl: MS POWER COCNTROL isn't (only) about "forcing" power levels ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14157 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1ffa336b18347c2fcedfeb398b255dc517245d7a Gerrit-Change-Number: 14157 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 24 May 2019 08:49:13 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 24 May 2019 08:49:56 +0000 Subject: Change in osmo-bts[master]: load_indication: Fix missing re-set of RACH parameters In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14158 ) Change subject: load_indication: Fix missing re-set of RACH parameters ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14158 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icd9150ba56d77d031c3cf496c5936c2de52b364c Gerrit-Change-Number: 14158 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 24 May 2019 08:49:56 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:50:42 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 08:50:42 +0000 Subject: Change in osmo-bsc[master]: abis_rs: Fix log message about unimplemented common channel msg In-Reply-To: References: Message-ID: Hello osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14127 to look at the new patch set (#3). Change subject: abis_rs: Fix log message about unimplemented common channel msg ...................................................................... abis_rs: Fix log message about unimplemented common channel msg The log is about an unimplemented CChan message, not a TRX message. Change-Id: I52bcf1fd79417ee5bfb054456a0b427e174114dd --- M src/osmo-bsc/abis_rsl.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/27/14127/3 -- To view, visit https://gerrit.osmocom.org/14127 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I52bcf1fd79417ee5bfb054456a0b427e174114dd Gerrit-Change-Number: 14127 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:50:43 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 08:50:43 +0000 Subject: Change in osmo-bsc[master]: keep per-BTS stat_items about RACH busy / RACH access percentage Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14163 Change subject: keep per-BTS stat_items about RACH busy / RACH access percentage ...................................................................... keep per-BTS stat_items about RACH busy / RACH access percentage Change-Id: I3ad0cc4866d6210181cbafbab876e8028ad27540 --- M include/osmocom/bsc/gsm_data.h M src/osmo-bsc/abis_rsl.c M src/osmo-bsc/gsm_data.c 3 files changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/63/14163/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 68c95e1..82bd238 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -1378,6 +1378,8 @@ enum { BTS_STAT_CHAN_LOAD_AVERAGE, BTS_STAT_T3122, + BTS_STAT_RACH_BUSY, + BTS_STAT_RACH_ACCESS, }; enum { diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 39fae50..9db2115 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -1476,9 +1476,17 @@ break; case RSL_IE_RACH_LOAD: if (msg->data_len >= 7) { + int32_t busy_percent, access_percent; + /* build data for signal */ sd.rach_slot_count = rslh->data[2] << 8 | rslh->data[3]; sd.rach_busy_count = rslh->data[4] << 8 | rslh->data[5]; sd.rach_access_count = rslh->data[6] << 8 | rslh->data[7]; + /* update stats group */ + busy_percent = (int32_t) sd.rach_busy_count * 100 / (int32_t) sd.rach_slot_count; + access_percent = (int32_t) sd.rach_access_count * 100 / (int32_t) sd.rach_slot_count; + osmo_stat_item_set(sd.bts->bts_statg->items[BTS_STAT_RACH_BUSY], busy_percent); + osmo_stat_item_set(sd.bts->bts_statg->items[BTS_STAT_RACH_ACCESS], access_percent); + /* dispatch signal */ osmo_signal_dispatch(SS_CCCH, S_CCCH_RACH_LOAD, &sd); } break; diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index 88690a7..5942fba 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -380,6 +380,8 @@ static const struct osmo_stat_item_desc bts_stat_desc[] = { { "chanloadavg", "Channel load average.", "%", 16, 0 }, { "T3122", "T3122 IMMEDIATE ASSIGNMENT REJECT wait indicator.", "s", 16, GSM_T3122_DEFAULT }, + { "rach_busy", "RACH slots with signal above threshold", "%", 16, 0 }, + { "rach_access", "RACH slots with access bursts in them", "%", 16, 0 }, }; static const struct osmo_stat_item_group_desc bts_statg_desc = { -- To view, visit https://gerrit.osmocom.org/14163 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I3ad0cc4866d6210181cbafbab876e8028ad27540 Gerrit-Change-Number: 14163 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:50:43 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 08:50:43 +0000 Subject: Change in osmo-bsc[master]: vty: Dump per-bts stat_item group in 'show bts' output Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14164 Change subject: vty: Dump per-bts stat_item group in 'show bts' output ...................................................................... vty: Dump per-bts stat_item group in 'show bts' output Change-Id: Ie56d3f0951b56d9b3677bf8cc725ac777d9aa446 --- M src/osmo-bsc/bsc_vty.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/64/14164/1 diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index 61060e2..af25cab 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -517,6 +517,8 @@ bts->bts_ctrs->ctr[BTS_CTR_BTS_RSL_FAIL].current, VTY_NEWLINE); + vty_out_stat_item_group(vty, " ", bts->bts_statg); + bts_dump_vty_features(vty, bts); } -- To view, visit https://gerrit.osmocom.org/14164 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ie56d3f0951b56d9b3677bf8cc725ac777d9aa446 Gerrit-Change-Number: 14164 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:51:01 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 08:51:01 +0000 Subject: Change in osmo-bsc[master]: abis_rsl: Add support for extended CBCH to rsl_sms_cb_command() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14125 ) Change subject: abis_rsl: Add support for extended CBCH to rsl_sms_cb_command() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14125 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I77a16b75ce311d63fb022475c8ff25fbbcee7f55 Gerrit-Change-Number: 14125 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 24 May 2019 08:51:01 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:51:20 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 08:51:20 +0000 Subject: Change in osmo-bsc[master]: abis_rsl: Avoid "Unimplemented" log message for every CBCH LOAD IND In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14126 ) Change subject: abis_rsl: Avoid "Unimplemented" log message for every CBCH LOAD IND ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14126 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ida5045ec7a18c1062a3b80a381db52d5c98e9966 Gerrit-Change-Number: 14126 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 24 May 2019 08:51:20 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:51:46 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 08:51:46 +0000 Subject: Change in osmo-bsc[master]: abis_rsl: Fix log message about unimplemented common channel msg In-Reply-To: References: Message-ID: Hello osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14127 to look at the new patch set (#4). Change subject: abis_rsl: Fix log message about unimplemented common channel msg ...................................................................... abis_rsl: Fix log message about unimplemented common channel msg The log is about an unimplemented CChan message, not a TRX message. Change-Id: I52bcf1fd79417ee5bfb054456a0b427e174114dd --- M src/osmo-bsc/abis_rsl.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/27/14127/4 -- To view, visit https://gerrit.osmocom.org/14127 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I52bcf1fd79417ee5bfb054456a0b427e174114dd Gerrit-Change-Number: 14127 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:51:51 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 08:51:51 +0000 Subject: Change in osmo-bsc[master]: abis_rsl: Fix log message about unimplemented common channel msg In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14127 ) Change subject: abis_rsl: Fix log message about unimplemented common channel msg ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14127 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I52bcf1fd79417ee5bfb054456a0b427e174114dd Gerrit-Change-Number: 14127 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 24 May 2019 08:51:51 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:52:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 08:52:05 +0000 Subject: Change in osmo-bsc[master]: smscb: Allow transmit of SCHEDULE and DEFAULT SMSCB In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14129 ) Change subject: smscb: Allow transmit of SCHEDULE and DEFAULT SMSCB ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14129 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iad41d24c87d091b8eb144544802d44def925ca70 Gerrit-Change-Number: 14129 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 24 May 2019 08:52:05 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:52:13 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 08:52:13 +0000 Subject: Change in osmo-bsc[master]: chan_alloc: Don't include CBCH channels in load computation In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14152 ) Change subject: chan_alloc: Don't include CBCH channels in load computation ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14152 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I606962e4977f122ff05a2d4e756c04c7f38bdaa0 Gerrit-Change-Number: 14152 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 24 May 2019 08:52:13 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:52:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 08:52:18 +0000 Subject: Change in osmo-bsc[master]: keep per-BTS stat_items about RACH busy / RACH access percentage In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14163 ) Change subject: keep per-BTS stat_items about RACH busy / RACH access percentage ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14163 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I3ad0cc4866d6210181cbafbab876e8028ad27540 Gerrit-Change-Number: 14163 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-CC: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 24 May 2019 08:52:18 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:52:23 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 08:52:23 +0000 Subject: Change in osmo-bsc[master]: vty: Dump per-bts stat_item group in 'show bts' output In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14164 ) Change subject: vty: Dump per-bts stat_item group in 'show bts' output ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14164 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie56d3f0951b56d9b3677bf8cc725ac777d9aa446 Gerrit-Change-Number: 14164 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-CC: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 24 May 2019 08:52:23 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:52:59 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 24 May 2019 08:52:59 +0000 Subject: Change in osmo-bts[master]: l1sap: Correctly count RACH slots in calc_exprd_rach_frames() In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14159 ) Change subject: l1sap: Correctly count RACH slots in calc_exprd_rach_frames() ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/14159/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/#/c/14159/1//COMMIT_MSG at 12 PS1, Line 12: doesn't apply here. I think you miss here explaining WHY that multiplier doesn't apply here. -- To view, visit https://gerrit.osmocom.org/14159 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6b14fd6e7819f9164fb4a09b432a9f419e3b6e5c Gerrit-Change-Number: 14159 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 24 May 2019 08:52:59 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:53:10 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 08:53:10 +0000 Subject: Change in osmo-bts[master]: RSL: Fix logic about fixed/dynamic MS power control in MS POWER COMMAND In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14155 ) Change subject: RSL: Fix logic about fixed/dynamic MS power control in MS POWER COMMAND ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14155 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie43a1fc9cc658677c8c945ae82d03b7bffbe52d5 Gerrit-Change-Number: 14155 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 24 May 2019 08:53:10 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:55:13 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 24 May 2019 08:55:13 +0000 Subject: Change in osmo-bts[master]: l1sap: Fix calculation of expired RACH slots in case of missing frame... In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14160 ) Change subject: l1sap: Fix calculation of expired RACH slots in case of missing frame numbers ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14160 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If4f8d2ea55fc722c64c330cde09e833b67ee98fe Gerrit-Change-Number: 14160 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 24 May 2019 08:55:13 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:57:02 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 24 May 2019 08:57:02 +0000 Subject: Change in osmo-bts[master]: oml: Print more context from FOM Header or using MO In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14161 ) Change subject: oml: Print more context from FOM Header or using MO ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14161 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I60d1660c6d574f206d7b8cc10082b413142365dd Gerrit-Change-Number: 14161 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 24 May 2019 08:57:02 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 08:57:53 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 24 May 2019 08:57:53 +0000 Subject: Change in osmo-bts[master]: oml: Have one generic log message for all transmitted messages In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14162 ) Change subject: oml: Have one generic log message for all transmitted messages ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14162 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5dd4b1749e68fb7fc74cb2e3a778d2418f46b770 Gerrit-Change-Number: 14162 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 24 May 2019 08:57:53 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 09:09:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 09:09:19 +0000 Subject: Change in osmo-bts[master]: rsl: Implement parsing of BS Power Control message In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14156 to look at the new patch set (#2). Change subject: rsl: Implement parsing of BS Power Control message ...................................................................... rsl: Implement parsing of BS Power Control message Change-Id: Id144a7e468f730e3cdaefa4cf2ad51c6106310a2 --- M doc/manuals/abis/rsl.adoc M src/common/rsl.c 2 files changed, 45 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/56/14156/2 -- To view, visit https://gerrit.osmocom.org/14156 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id144a7e468f730e3cdaefa4cf2ad51c6106310a2 Gerrit-Change-Number: 14156 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 09:09:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 09:09:19 +0000 Subject: Change in osmo-bts[master]: l1sap: Correctly count RACH slots in calc_exprd_rach_frames() In-Reply-To: References: Message-ID: Harald Welte has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/14159 ) Change subject: l1sap: Correctly count RACH slots in calc_exprd_rach_frames() ...................................................................... l1sap: Correctly count RACH slots in calc_exprd_rach_frames() We used a bogus multiplication factor of four when computing the number of expired RACH slots. While there are four RACH slots per block (i.e. 4 times more RACH received than normal MAC blocks), that multiplier doesn't apply here: We are calling this function per *frame* and not per *block*. So the maximum number of RACH slots per *frame* is (in most suual cases with a single CCCH) at maximum 1. Only some obscure configurations with multiple CCCHs in a single cell would render higher values. In any case, *blocks* never even enter this equation. This wrong multiplier resulted in rather weird RACH load reports to the BSC. Related: OS#3750 Change-Id: I6b14fd6e7819f9164fb4a09b432a9f419e3b6e5c --- M src/common/l1sap.c 1 file changed, 1 insertion(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/59/14159/2 -- To view, visit https://gerrit.osmocom.org/14159 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6b14fd6e7819f9164fb4a09b432a9f419e3b6e5c Gerrit-Change-Number: 14159 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 09:11:12 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 09:11:12 +0000 Subject: Change in osmo-bts[master]: rsl: Implement parsing of BS Power Control message In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14156 ) Change subject: rsl: Implement parsing of BS Power Control message ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/14156/1/src/common/rsl.c File src/common/rsl.c: https://gerrit.osmocom.org/#/c/14156/1/src/common/rsl.c at 1603 PS1, Line 1603: LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "BS POWER CONTROL to -%u dBm\n", (lchan->bs_power & 0xF)*2); > this mask and *2 here probably deserves some comment. I moved the computation to a function with spec reference -- To view, visit https://gerrit.osmocom.org/14156 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id144a7e468f730e3cdaefa4cf2ad51c6106310a2 Gerrit-Change-Number: 14156 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 24 May 2019 09:11:12 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 09:12:41 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 09:12:41 +0000 Subject: Change in osmo-bsc[master]: abis_rsl: Add support for extended CBCH to rsl_sms_cb_command() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14125 ) Change subject: abis_rsl: Add support for extended CBCH to rsl_sms_cb_command() ...................................................................... abis_rsl: Add support for extended CBCH to rsl_sms_cb_command() Now that OsmoBTS understands about extended CBCH, let's at least update the BSC side function to allow for other code to generate such messages. Change-Id: I77a16b75ce311d63fb022475c8ff25fbbcee7f55 --- M include/osmocom/bsc/abis_rsl.h M src/osmo-bsc/abis_rsl.c M src/osmo-bsc/bsc_vty.c 3 files changed, 5 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmocom/bsc/abis_rsl.h b/include/osmocom/bsc/abis_rsl.h index 098d2e6..ec63090 100644 --- a/include/osmocom/bsc/abis_rsl.h +++ b/include/osmocom/bsc/abis_rsl.h @@ -90,7 +90,7 @@ /* SMSCB functionality */ int rsl_sms_cb_command(struct gsm_bts *bts, uint8_t chan_number, struct rsl_ie_cb_cmd_type cb_command, - const uint8_t *data, int len); + bool use_extended_cbch, const uint8_t *data, int len); /* some Nokia specific stuff */ int rsl_nokia_si_begin(struct gsm_bts_trx *trx); diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index bc07457..5a1c8ff 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -2172,7 +2172,7 @@ int rsl_sms_cb_command(struct gsm_bts *bts, uint8_t chan_number, struct rsl_ie_cb_cmd_type cb_command, - const uint8_t *data, int len) + bool use_extended_cbch, const uint8_t *data, int len) { struct abis_rsl_dchan_hdr *dh; struct msgb *cb_cmd; @@ -2188,6 +2188,8 @@ msgb_tv_put(cb_cmd, RSL_IE_CB_CMD_TYPE, *(uint8_t*)&cb_command); msgb_tlv_put(cb_cmd, RSL_IE_SMSCB_MSG, len, data); + if (use_extended_cbch) + msgb_tv_put(cb_cmd, RSL_IE_SMSCB_CHAN_INDICATOR, 0x01); cb_cmd->dst = bts->c0->rsl_link; diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index dc97d12..88c845b 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -4582,7 +4582,7 @@ return CMD_WARNING; } - rsl_sms_cb_command(bts, RSL_CHAN_SDCCH4_ACCH, cb_cmd, buf, rc); + rsl_sms_cb_command(bts, RSL_CHAN_SDCCH4_ACCH, cb_cmd, false, buf, rc); return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/14125 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I77a16b75ce311d63fb022475c8ff25fbbcee7f55 Gerrit-Change-Number: 14125 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 09:12:41 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 09:12:41 +0000 Subject: Change in osmo-bsc[master]: abis_rsl: Avoid "Unimplemented" log message for every CBCH LOAD IND In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14126 ) Change subject: abis_rsl: Avoid "Unimplemented" log message for every CBCH LOAD IND ...................................................................... abis_rsl: Avoid "Unimplemented" log message for every CBCH LOAD IND Now that OsmoBTS is generating CBCH LOAD IND messages, let's avoid spamming the BSC log with notices about receiving this unimplemented message. Change-Id: Ida5045ec7a18c1062a3b80a381db52d5c98e9966 --- M src/osmo-bsc/abis_rsl.c 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 5a1c8ff..51dc001 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -1532,11 +1532,13 @@ break; case RSL_MT_DELETE_IND: /* CCCH overloaded, IMM_ASSIGN was dropped */ - case RSL_MT_CBCH_LOAD_IND: - /* current load on the CBCH */ LOGP(DRSL, LOGL_NOTICE, "Unimplemented Abis RSL TRX message " "type %s\n", rsl_msg_name(rslh->c.msg_type)); break; + case RSL_MT_CBCH_LOAD_IND: + /* current load on the CBCH */ + /* FIXME: handle this. Ignore for now */ + break; case RSL_MT_ERICSSON_IMM_ASS_SENT: rc = rsl_rx_ericsson_imm_assign_sent(msg); break; -- To view, visit https://gerrit.osmocom.org/14126 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ida5045ec7a18c1062a3b80a381db52d5c98e9966 Gerrit-Change-Number: 14126 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 09:12:42 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 09:12:42 +0000 Subject: Change in osmo-bsc[master]: abis_rsl: Fix log message about unimplemented common channel msg In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14127 ) Change subject: abis_rsl: Fix log message about unimplemented common channel msg ...................................................................... abis_rsl: Fix log message about unimplemented common channel msg The log is about an unimplemented CChan message, not a TRX message. Change-Id: I52bcf1fd79417ee5bfb054456a0b427e174114dd --- M src/osmo-bsc/abis_rsl.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 51dc001..39fae50 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -1532,7 +1532,7 @@ break; case RSL_MT_DELETE_IND: /* CCCH overloaded, IMM_ASSIGN was dropped */ - LOGP(DRSL, LOGL_NOTICE, "Unimplemented Abis RSL TRX message " + LOGP(DRSL, LOGL_NOTICE, "Unimplemented Abis RSL CChan message " "type %s\n", rsl_msg_name(rslh->c.msg_type)); break; case RSL_MT_CBCH_LOAD_IND: -- To view, visit https://gerrit.osmocom.org/14127 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I52bcf1fd79417ee5bfb054456a0b427e174114dd Gerrit-Change-Number: 14127 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 09:12:58 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 09:12:58 +0000 Subject: Change in osmo-bsc[master]: smscb: Allow transmit of SCHEDULE and DEFAULT SMSCB In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14129 ) Change subject: smscb: Allow transmit of SCHEDULE and DEFAULT SMSCB ...................................................................... smscb: Allow transmit of SCHEDULE and DEFAULT SMSCB Change-Id: Iad41d24c87d091b8eb144544802d44def925ca70 --- M src/osmo-bsc/bsc_vty.c 1 file changed, 19 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index 88c845b..61060e2 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -4533,14 +4533,19 @@ DEFUN(smscb_cmd, smscb_cmd_cmd, - "bts <0-255> smscb-command <1-4> HEXSTRING", + "bts <0-255> smscb-command (normal|schedule|default) <1-4> HEXSTRING", "BTS related commands\n" BTS_NR_STR - "SMS Cell Broadcast\n" "Last Valid Block\n" + "SMS Cell Broadcast\n" + "Normal (one-shot) SMSCB Message; sent once over Abis+Um\n" + "Schedule (one-shot) SMSCB Messag; sent once over Abis+Um\n" + "Default (repeating) SMSCB Message; sent once over Abis, unlimited ovrer Um\n" + "Last Valid Block\n" "Hex Encoded SMSCB message (up to 88 octets)\n") { struct gsm_bts *bts; int bts_nr = atoi(argv[0]); - int last_block = atoi(argv[1]); + const char *type_str = argv[1]; + int last_block = atoi(argv[2]); struct rsl_ie_cb_cmd_type cb_cmd; uint8_t buf[88]; int rc; @@ -4554,7 +4559,7 @@ vty_out(vty, "%% BTS %d doesn't have a CBCH%s", bts_nr, VTY_NEWLINE); return CMD_WARNING; } - rc = osmo_hexparse(argv[2], buf, sizeof(buf)); + rc = osmo_hexparse(argv[3], buf, sizeof(buf)); if (rc < 0 || rc > sizeof(buf)) { vty_out(vty, "Error parsing HEXSTRING%s", VTY_NEWLINE); return CMD_WARNING; @@ -4562,7 +4567,16 @@ cb_cmd.spare = 0; cb_cmd.def_bcast = 0; - cb_cmd.command = RSL_CB_CMD_TYPE_NORMAL; + if (!strcmp(type_str, "normal")) + cb_cmd.command = RSL_CB_CMD_TYPE_NORMAL; + else if (!strcmp(type_str, "schedule")) + cb_cmd.command = RSL_CB_CMD_TYPE_SCHEDULE; + else if (!strcmp(type_str, "default")) + cb_cmd.command = RSL_CB_CMD_TYPE_DEFAULT; + else { + vty_out(vty, "Error parsing type%s", VTY_NEWLINE); + return CMD_WARNING; + } switch (last_block) { case 1: -- To view, visit https://gerrit.osmocom.org/14129 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iad41d24c87d091b8eb144544802d44def925ca70 Gerrit-Change-Number: 14129 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 09:12:58 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 09:12:58 +0000 Subject: Change in osmo-bsc[master]: chan_alloc: Don't include CBCH channels in load computation In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14152 ) Change subject: chan_alloc: Don't include CBCH channels in load computation ...................................................................... chan_alloc: Don't include CBCH channels in load computation When displaying the channel (lchan) load, we are interested in the dedicated channels as available for communication with mobile stations. If CBCH is enabled, it "steals" one of the SDCCH slots, so we have to exclude this channel from the count of available dedicated channels. Before this patch, A CBCH would show up as "in use" dedicated channel (so both the total and the in_use count were incremented). After this patch, neither "total" nor "use" are affected; The CBCH slot is completely excluded from load statistics. Change-Id: I606962e4977f122ff05a2d4e756c04c7f38bdaa0 --- M src/osmo-bsc/chan_alloc.c 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/chan_alloc.c b/src/osmo-bsc/chan_alloc.c index 9c43414..7f0aa31 100644 --- a/src/osmo-bsc/chan_alloc.c +++ b/src/osmo-bsc/chan_alloc.c @@ -59,6 +59,10 @@ continue; ts_for_each_lchan(lchan, ts) { + /* don't even count CBCH slots in total */ + if (lchan->type == GSM_LCHAN_CBCH) + continue; + pl->total++; switch (lchan->fi->state) { -- To view, visit https://gerrit.osmocom.org/14152 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I606962e4977f122ff05a2d4e756c04c7f38bdaa0 Gerrit-Change-Number: 14152 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 09:12:58 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 09:12:58 +0000 Subject: Change in osmo-bsc[master]: keep per-BTS stat_items about RACH busy / RACH access percentage In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14163 ) Change subject: keep per-BTS stat_items about RACH busy / RACH access percentage ...................................................................... keep per-BTS stat_items about RACH busy / RACH access percentage Change-Id: I3ad0cc4866d6210181cbafbab876e8028ad27540 --- M include/osmocom/bsc/gsm_data.h M src/osmo-bsc/abis_rsl.c M src/osmo-bsc/gsm_data.c 3 files changed, 12 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 68c95e1..82bd238 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -1378,6 +1378,8 @@ enum { BTS_STAT_CHAN_LOAD_AVERAGE, BTS_STAT_T3122, + BTS_STAT_RACH_BUSY, + BTS_STAT_RACH_ACCESS, }; enum { diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 39fae50..9db2115 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -1476,9 +1476,17 @@ break; case RSL_IE_RACH_LOAD: if (msg->data_len >= 7) { + int32_t busy_percent, access_percent; + /* build data for signal */ sd.rach_slot_count = rslh->data[2] << 8 | rslh->data[3]; sd.rach_busy_count = rslh->data[4] << 8 | rslh->data[5]; sd.rach_access_count = rslh->data[6] << 8 | rslh->data[7]; + /* update stats group */ + busy_percent = (int32_t) sd.rach_busy_count * 100 / (int32_t) sd.rach_slot_count; + access_percent = (int32_t) sd.rach_access_count * 100 / (int32_t) sd.rach_slot_count; + osmo_stat_item_set(sd.bts->bts_statg->items[BTS_STAT_RACH_BUSY], busy_percent); + osmo_stat_item_set(sd.bts->bts_statg->items[BTS_STAT_RACH_ACCESS], access_percent); + /* dispatch signal */ osmo_signal_dispatch(SS_CCCH, S_CCCH_RACH_LOAD, &sd); } break; diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index 88690a7..5942fba 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -380,6 +380,8 @@ static const struct osmo_stat_item_desc bts_stat_desc[] = { { "chanloadavg", "Channel load average.", "%", 16, 0 }, { "T3122", "T3122 IMMEDIATE ASSIGNMENT REJECT wait indicator.", "s", 16, GSM_T3122_DEFAULT }, + { "rach_busy", "RACH slots with signal above threshold", "%", 16, 0 }, + { "rach_access", "RACH slots with access bursts in them", "%", 16, 0 }, }; static const struct osmo_stat_item_group_desc bts_statg_desc = { -- To view, visit https://gerrit.osmocom.org/14163 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I3ad0cc4866d6210181cbafbab876e8028ad27540 Gerrit-Change-Number: 14163 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 09:12:59 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 09:12:59 +0000 Subject: Change in osmo-bsc[master]: vty: Dump per-bts stat_item group in 'show bts' output In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14164 ) Change subject: vty: Dump per-bts stat_item group in 'show bts' output ...................................................................... vty: Dump per-bts stat_item group in 'show bts' output Change-Id: Ie56d3f0951b56d9b3677bf8cc725ac777d9aa446 --- M src/osmo-bsc/bsc_vty.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index 61060e2..af25cab 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -517,6 +517,8 @@ bts->bts_ctrs->ctr[BTS_CTR_BTS_RSL_FAIL].current, VTY_NEWLINE); + vty_out_stat_item_group(vty, " ", bts->bts_statg); + bts_dump_vty_features(vty, bts); } -- To view, visit https://gerrit.osmocom.org/14164 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie56d3f0951b56d9b3677bf8cc725ac777d9aa446 Gerrit-Change-Number: 14164 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 10:59:00 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 24 May 2019 10:59:00 +0000 Subject: Change in osmo-bts[master]: Use LOGPLCHAN whenever possible In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14111 ) Change subject: Use LOGPLCHAN whenever possible ...................................................................... Patch Set 6: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14111 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6913ac8fb543811126b85a54118333155c03bc03 Gerrit-Change-Number: 14111 Gerrit-PatchSet: 6 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 24 May 2019 10:59:00 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 11:00:23 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 24 May 2019 11:00:23 +0000 Subject: Change in osmo-bts[master]: rsl.adoc: DELETE INDICATION is implemented since Feb '18 In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14154 ) Change subject: rsl.adoc: DELETE INDICATION is implemented since Feb '18 ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14154 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I988778bdb83271355dc11b1a30a59e1a5dba5fb2 Gerrit-Change-Number: 14154 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 24 May 2019 11:00:23 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 11:18:08 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 24 May 2019 11:18:08 +0000 Subject: Change in osmo-bts[master]: RSL: Fix logic about fixed/dynamic MS power control in MS POWER COMMAND In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14155 ) Change subject: RSL: Fix logic about fixed/dynamic MS power control in MS POWER COMMAND ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14155 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie43a1fc9cc658677c8c945ae82d03b7bffbe52d5 Gerrit-Change-Number: 14155 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 24 May 2019 11:18:08 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 11:22:47 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 24 May 2019 11:22:47 +0000 Subject: Change in osmo-bts[master]: rsl: Implement parsing of BS Power Control message In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14156 ) Change subject: rsl: Implement parsing of BS Power Control message ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14156 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id144a7e468f730e3cdaefa4cf2ad51c6106310a2 Gerrit-Change-Number: 14156 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 24 May 2019 11:22:47 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 11:23:05 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 24 May 2019 11:23:05 +0000 Subject: Change in osmo-bts[master]: rsl: MS POWER COCNTROL isn't (only) about "forcing" power levels In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14157 ) Change subject: rsl: MS POWER COCNTROL isn't (only) about "forcing" power levels ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14157 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1ffa336b18347c2fcedfeb398b255dc517245d7a Gerrit-Change-Number: 14157 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 24 May 2019 11:23:05 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 11:23:39 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 24 May 2019 11:23:39 +0000 Subject: Change in osmo-bts[master]: load_indication: Fix missing re-set of RACH parameters In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14158 ) Change subject: load_indication: Fix missing re-set of RACH parameters ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14158 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icd9150ba56d77d031c3cf496c5936c2de52b364c Gerrit-Change-Number: 14158 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 24 May 2019 11:23:39 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 11:26:46 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 24 May 2019 11:26:46 +0000 Subject: Change in osmo-bts[master]: l1sap: Correctly count RACH slots in calc_exprd_rach_frames() In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14159 ) Change subject: l1sap: Correctly count RACH slots in calc_exprd_rach_frames() ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14159 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6b14fd6e7819f9164fb4a09b432a9f419e3b6e5c Gerrit-Change-Number: 14159 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 24 May 2019 11:26:46 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 11:28:15 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 24 May 2019 11:28:15 +0000 Subject: Change in osmo-bts[master]: l1sap: Fix calculation of expired RACH slots in case of missing frame... In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14160 ) Change subject: l1sap: Fix calculation of expired RACH slots in case of missing frame numbers ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14160 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If4f8d2ea55fc722c64c330cde09e833b67ee98fe Gerrit-Change-Number: 14160 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 24 May 2019 11:28:15 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 11:35:39 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 24 May 2019 11:35:39 +0000 Subject: Change in libosmocore[master]: protocol/gsm_12_21.h: fix copy-pasted struct description Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14165 Change subject: protocol/gsm_12_21.h: fix copy-pasted struct description ...................................................................... protocol/gsm_12_21.h: fix copy-pasted struct description Change-Id: Ic6d32c886f6f8f859e382d48f9e1b509000db9ba --- M include/osmocom/gsm/protocol/gsm_12_21.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/65/14165/1 diff --git a/include/osmocom/gsm/protocol/gsm_12_21.h b/include/osmocom/gsm/protocol/gsm_12_21.h index 3ef3603..86d12ea 100644 --- a/include/osmocom/gsm/protocol/gsm_12_21.h +++ b/include/osmocom/gsm/protocol/gsm_12_21.h @@ -70,7 +70,7 @@ uint8_t ts_nr; /*!< Timeslot Number */ } __attribute__ ((packed)); -/*! OML Object Instance */ +/*! OML FOM header */ struct abis_om_fom_hdr { uint8_t msg_type; /*!< Message Type (\ref abis_nm_msgtype) */ uint8_t obj_class; /*!< Object Class (\ref abis_nm_obj_class) */ -- To view, visit https://gerrit.osmocom.org/14165 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ic6d32c886f6f8f859e382d48f9e1b509000db9ba Gerrit-Change-Number: 14165 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 11:44:05 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 24 May 2019 11:44:05 +0000 Subject: Change in osmo-bts[master]: oml: Print more context from FOM Header or using MO In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14161 ) Change subject: oml: Print more context from FOM Header or using MO ...................................................................... Patch Set 2: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/14161/2/src/common/oml.c File src/common/oml.c: https://gerrit.osmocom.org/#/c/14161/2/src/common/oml.c at 75 PS2, Line 75: gsm_abis_mo_name BTW: this is very similar to what libosmocore's abis_nm_dump_foh_buf() does, excluding the first part: OC=%s(%02x) vs OC=%s. I am now thinking whether we can add a more abstract function to libosmocore that would accept obj_class and obj_inst as parameters... -- To view, visit https://gerrit.osmocom.org/14161 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I60d1660c6d574f206d7b8cc10082b413142365dd Gerrit-Change-Number: 14161 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 24 May 2019 11:44:05 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 11:44:54 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 24 May 2019 11:44:54 +0000 Subject: Change in osmo-bts[master]: oml: Have one generic log message for all transmitted messages In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14162 ) Change subject: oml: Have one generic log message for all transmitted messages ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14162 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5dd4b1749e68fb7fc74cb2e3a778d2418f46b770 Gerrit-Change-Number: 14162 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 24 May 2019 11:44:54 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 16:02:50 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 16:02:50 +0000 Subject: Change in osmo-bts[master]: rsl: Implement parsing of BS Power Control message In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14156 ) Change subject: rsl: Implement parsing of BS Power Control message ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14156 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id144a7e468f730e3cdaefa4cf2ad51c6106310a2 Gerrit-Change-Number: 14156 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 24 May 2019 16:02:50 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 16:03:04 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 16:03:04 +0000 Subject: Change in osmo-bts[master]: Use LOGPLCHAN whenever possible In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14111 ) Change subject: Use LOGPLCHAN whenever possible ...................................................................... Use LOGPLCHAN whenever possible There's no point in open-coding what LOGPLCHAN was created to do: Log some event while stating the name of the logical channel. Change-Id: I6913ac8fb543811126b85a54118333155c03bc03 --- M src/common/handover.c M src/common/l1sap.c M src/common/msg_utils.c M src/common/oml.c M src/common/rsl.c M src/common/sysinfo.c 6 files changed, 150 insertions(+), 210 deletions(-) Approvals: Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/common/handover.c b/src/common/handover.c index 54b131f..63a9832 100644 --- a/src/common/handover.c +++ b/src/common/handover.c @@ -44,9 +44,7 @@ if (!msg) return -ENOMEM; - LOGP(DHO, LOGL_INFO, - "%s Sending PHYSICAL INFORMATION to MS.\n", - gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DHO, LOGL_INFO, "Sending PHYSICAL INFORMATION to MS.\n"); /* Build RSL UNITDATA REQUEST message with 04.08 PHYS INFO */ msg->l3h = msg->data; @@ -68,20 +66,18 @@ struct gsm_lchan *lchan = data; struct gsm_bts *bts = lchan->ts->trx->bts; - LOGP(DHO, LOGL_INFO, "%s T3105 timeout (%d resends left)\n", - gsm_lchan_name(lchan), bts->ny1 - lchan->ho.phys_info_count); + LOGPLCHAN(lchan, DHO, LOGL_INFO, "T3105 timeout (%d resends left)\n", + bts->ny1 - lchan->ho.phys_info_count); if (lchan->state != LCHAN_S_ACTIVE) { - LOGP(DHO, LOGL_NOTICE, - "%s is in not active. It is in state %s. Ignoring\n", - gsm_lchan_name(lchan), gsm_lchans_name(lchan->state)); + LOGPLCHAN(lchan, DHO, LOGL_NOTICE, "is in not active. It is in state %s. Ignoring\n", + gsm_lchans_name(lchan->state)); return; } if (lchan->ho.phys_info_count >= bts->ny1) { /* HO Abort */ - LOGP(DHO, LOGL_NOTICE, "%s NY1 reached, sending CONNection " - "FAILure to BSC.\n", gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DHO, LOGL_NOTICE, "NY1 reached, sending CONNection FAILure to BSC.\n"); rsl_tx_conn_fail(lchan, RSL_ERR_HANDOVER_ACC_FAIL); return; } @@ -98,23 +94,21 @@ /* Ignore invalid handover ref */ if (lchan->ho.ref != ra) { - LOGP(DHO, LOGL_INFO, "%s RACH on dedicated channel received, but " - "ra=0x%02x != expected ref=0x%02x. (This is no bug)\n", - gsm_lchan_name(lchan), ra, lchan->ho.ref); + LOGPLCHAN(lchan, DHO, LOGL_INFO, "RACH on dedicated channel received, but " + "ra=0x%02x != expected ref=0x%02x. (This is no bug)\n", ra, lchan->ho.ref); return; } /* Ignore handover on channels other than DCCH and SACCH */ if (lchan->type != GSM_LCHAN_SDCCH && lchan->type != GSM_LCHAN_TCH_H && lchan->type != GSM_LCHAN_TCH_F) { - LOGP(DHO, LOGL_ERROR, "%s handover RACH received on %s?!\n", - gsm_lchan_name(lchan), gsm_lchant_name(lchan->type)); + LOGPLCHAN(lchan, DHO, LOGL_ERROR, "handover RACH received on %s?!\n", + gsm_lchant_name(lchan->type)); return; } - LOGP(DHO, LOGL_NOTICE, - "%s RACH on dedicated channel type %s received with TA=%u, ref=%u\n", - gsm_lchan_name(lchan), gsm_lchant_name(lchan->type), acc_delay, ra); + LOGPLCHAN(lchan, DHO, LOGL_NOTICE, "RACH on dedicated channel type %s received with " + "TA=%u, ref=%u\n", gsm_lchant_name(lchan->type), acc_delay, ra); /* Set timing advance */ lchan->rqd_ta = acc_delay; @@ -122,9 +116,7 @@ /* Stop handover detection, wait for valid frame */ lchan->ho.active = HANDOVER_WAIT_FRAME; if (l1sap_chan_modify(lchan->ts->trx, gsm_lchan2chan_nr(lchan)) != 0) { - LOGP(DHO, LOGL_ERROR, - "%s failed to modify channel after handover\n", - gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DHO, LOGL_ERROR, "failed to modify channel after handover\n"); rsl_tx_conn_fail(lchan, RSL_ERR_HANDOVER_ACC_FAIL); return; } @@ -137,9 +129,7 @@ ho_tx_phys_info(lchan); /* Start T3105 */ - LOGP(DHO, LOGL_DEBUG, - "%s Starting T3105 with %u ms\n", - gsm_lchan_name(lchan), bts->t3105_ms); + LOGPLCHAN(lchan, DHO, LOGL_DEBUG, "Starting T3105 with %u ms\n", bts->t3105_ms); lchan->ho.t3105.cb = ho_t3105_cb; lchan->ho.t3105.data = lchan; osmo_timer_schedule(&lchan->ho.t3105, 0, bts->t3105_ms * 1000); @@ -148,8 +138,7 @@ /* received frist valid data frame on dedicated channel */ void handover_frame(struct gsm_lchan *lchan) { - LOGP(DHO, LOGL_INFO, - "%s First valid frame detected\n", gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DHO, LOGL_INFO, "First valid frame detected\n"); handover_reset(lchan); } diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 247763e..f31d822 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -114,9 +114,8 @@ struct gsm_lchan *lchan = get_lchan_by_chan_nr(trx, chan_nr); if (lchan && lchan->state != LCHAN_S_ACTIVE) { - LOGP(DL1P, LOGL_NOTICE, "%s: assuming active lchan, but " - "state is %s\n", gsm_lchan_name(lchan), - gsm_lchans_name(lchan->state)); + LOGPLCHAN(lchan, DL1P, LOGL_NOTICE, "assuming active lchan, but state is %s\n", + gsm_lchans_name(lchan->state)); return NULL; } return lchan; @@ -139,9 +138,9 @@ r -= r % GSM_RTP_DURATION; if (r != GSM_RTP_DURATION) - LOGP(DRTP, LOGL_ERROR, "RTP clock out of sync with lower layer:" - " %"PRIu32" vs %d (%"PRIu32"->%"PRIu32")\n", - r, GSM_RTP_DURATION, lchan->tch.last_fn, fn); + LOGPLCHAN(lchan, DRTP, LOGL_ERROR, "RTP clock out of sync with lower layer:" + " %"PRIu32" vs %d (%"PRIu32"->%"PRIu32")\n", + r, GSM_RTP_DURATION, lchan->tch.last_fn, fn); } return GSM_RTP_DURATION; } @@ -183,8 +182,7 @@ { struct osmo_phsap_prim *l1sap; - LOGP(DL1P, LOGL_DEBUG, "%s Rx -> RTP: %s\n", - gsm_lchan_name(lchan), osmo_hexdump(rmsg->data, rmsg->len)); + LOGPLCHAN(lchan, DL1P, LOGL_DEBUG, "Rx -> RTP: %s\n", osmo_hexdump(rmsg->data, rmsg->len)); rmsg->l2h = rmsg->data; rmsg->l1h = msgb_push(rmsg, sizeof(*l1sap)); @@ -530,8 +528,8 @@ return; if (data + 63 > 255) { /* According to 3GPP TS 48.058 ?9.3.37 Timing Offset field cannot exceed 255 */ - LOGP(DL1P, LOGL_ERROR, "Attempting to set invalid Timing Offset value %d (MS TO = %u)!\n", - data, set_ms_to); + LOGPLCHAN(lchan, DL1P, LOGL_ERROR, "Attempting to set invalid Timing Offset value " + "%d (MS TO = %u)!\n", data, set_ms_to); return; } @@ -617,12 +615,10 @@ struct osmo_phsap_prim *l1sap, struct info_act_cnf_param *info_act_cnf) { - struct gsm_lchan *lchan; + struct gsm_lchan *lchan = get_lchan_by_chan_nr(trx, info_act_cnf->chan_nr); - LOGP(DL1C, LOGL_INFO, "activate confirm chan_nr=%s trx=%d\n", - rsl_chan_nr_str(info_act_cnf->chan_nr), trx->nr); - - lchan = get_lchan_by_chan_nr(trx, info_act_cnf->chan_nr); + LOGPLCHAN(lchan, DL1C, LOGL_INFO, "activate confirm chan_nr=%s trx=%d\n", + rsl_chan_nr_str(info_act_cnf->chan_nr), trx->nr); rsl_tx_chan_act_acknack(lchan, info_act_cnf->cause); @@ -642,12 +638,10 @@ struct osmo_phsap_prim *l1sap, struct info_act_cnf_param *info_act_cnf) { - struct gsm_lchan *lchan; + struct gsm_lchan *lchan = get_lchan_by_chan_nr(trx, info_act_cnf->chan_nr); - LOGP(DL1C, LOGL_INFO, "deactivate confirm chan_nr=%s trx=%d\n", - rsl_chan_nr_str(info_act_cnf->chan_nr), trx->nr); - - lchan = get_lchan_by_chan_nr(trx, info_act_cnf->chan_nr); + LOGPLCHAN(lchan, DL1C, LOGL_INFO, "deactivate confirm chan_nr=%s trx=%d\n", + rsl_chan_nr_str(info_act_cnf->chan_nr), trx->nr); rsl_tx_rf_rel_ack(lchan); @@ -894,9 +888,9 @@ * don't support it. */ if(lchan->tch_mode == GSM48_CMODE_SPEECH_AMR && !rtppayload_is_octet_aligned(resp_msg->data, resp_msg->len)) { - LOGP(DL1P, LOGL_NOTICE, - "%s RTP->L1: Dropping unexpected AMR encoding (bw-efficient?) %s\n", - gsm_lchan_name(lchan), osmo_hexdump(resp_msg->data, resp_msg->len)); + LOGPLCHAN(lchan, DL1P, LOGL_NOTICE, + "RTP->L1: Dropping unexpected AMR encoding (bw-efficient?) %s\n", + osmo_hexdump(resp_msg->data, resp_msg->len)); return false; } return true; @@ -1469,8 +1463,8 @@ struct gsm48_chan_desc *cd; int rc; - LOGP(DL1C, LOGL_INFO, "activating channel chan_nr=%s trx=%d\n", - rsl_chan_nr_str(chan_nr), trx->nr); + LOGPLCHAN(lchan, DL1C, LOGL_INFO, "activating channel chan_nr=%s trx=%d\n", + rsl_chan_nr_str(chan_nr), trx->nr); /* osmo-pcu calls this without a valid 'tp' parameter, so we * need to make sure ew don't crash here */ @@ -1483,8 +1477,8 @@ * one one TRX, so we need to make sure not to activate * channels with a different TSC!! */ if (cd->h0.tsc != (lchan->ts->trx->bts->bsic & 7)) { - LOGP(DL1C, LOGL_ERROR, "lchan TSC %u != BSIC-TSC %u\n", - cd->h0.tsc, lchan->ts->trx->bts->bsic & 7); + LOGPLCHAN(lchan, DL1C, LOGL_ERROR, "lchan TSC %u != BSIC-TSC %u\n", + cd->h0.tsc, lchan->ts->trx->bts->bsic & 7); return -RSL_ERR_SERV_OPT_UNIMPL; } } @@ -1517,8 +1511,8 @@ int l1sap_chan_rel(struct gsm_bts_trx *trx, uint8_t chan_nr) { struct gsm_lchan *lchan = get_lchan_by_chan_nr(trx, chan_nr); - LOGP(DL1C, LOGL_INFO, "deactivating channel chan_nr=%s trx=%d\n", - rsl_chan_nr_str(chan_nr), trx->nr); + LOGPLCHAN(lchan, DL1C, LOGL_INFO, "deactivating channel chan_nr=%s trx=%d\n", + rsl_chan_nr_str(chan_nr), trx->nr); if (lchan->tch.dtx.dl_amr_fsm) { osmo_fsm_inst_free(lchan->tch.dtx.dl_amr_fsm); @@ -1533,8 +1527,8 @@ { struct gsm_lchan *lchan = get_lchan_by_chan_nr(trx, chan_nr); - LOGP(DL1C, LOGL_INFO, "deactivating sacch chan_nr=%s trx=%d\n", - rsl_chan_nr_str(chan_nr), trx->nr); + LOGPLCHAN(lchan, DL1C, LOGL_INFO, "deactivating sacch chan_nr=%s trx=%d\n", + rsl_chan_nr_str(chan_nr), trx->nr); lchan->sacch_deact = 1; diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index f936c98..52b0566 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -203,8 +203,8 @@ rc = osmo_amr_rtp_dec(rtp_pl, rtp_pl_len, &cmr, &cmi, &ft, &bfi, &sti); if (rc < 0) { - LOGP(DRTP, LOGL_ERROR, "failed to decode AMR RTP (length %zu, " - "%p)\n", rtp_pl_len, rtp_pl); + LOGPLCHAN(lchan, DRTP, LOGL_ERROR, "failed to decode AMR RTP (length %zu, " + "%p)\n", rtp_pl_len, rtp_pl); return rc; } @@ -274,7 +274,7 @@ } if (ft != AMR_NO_DATA) { - LOGP(DRTP, LOGL_ERROR, "unsupported AMR FT 0x%02x\n", ft); + LOGPLCHAN(lchan, DRTP, LOGL_ERROR, "unsupported AMR FT 0x%02x\n", ft); return -ENOTSUP; } @@ -505,9 +505,9 @@ return lchan->tch.dtx.len + 1; } - LOGP(DL1C, LOGL_DEBUG, "Have to send %s frame on TCH but SID buffer " - "is empty - sent nothing\n", - get_value_string(gsm48_chan_mode_names, lchan->tch_mode)); + LOGPLCHAN(lchan, DL1C, LOGL_DEBUG, "Have to send %s frame on TCH but SID buffer " + "is empty - sent nothing\n", + get_value_string(gsm48_chan_mode_names, lchan->tch_mode)); return 0; } diff --git a/src/common/oml.c b/src/common/oml.c index 260dfc4..186c2a2 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -527,9 +527,8 @@ return -1; } - DEBUGP(DLLAPD, "%s: Setting T200 D0=%u, D3=%u, S0=%u, S3=%u" - "(all in ms)\n", gsm_lchan_name(lchan), t200_dcch, - t200_dcch_sapi3, t200_acch, t200_acch_sapi3); + LOGPLCHAN(lchan, DLLAPD, LOGL_DEBUG, "Setting T200 D0=%u, D3=%u, S0=%u, S3=%u (all in ms)\n", + t200_dcch, t200_dcch_sapi3, t200_acch, t200_acch_sapi3); dl_set_t200(&lc->lapdm_dcch.datalink[DL_SAPI0], t200_dcch); dl_set_t200(&lc->lapdm_dcch.datalink[DL_SAPI3], t200_dcch_sapi3); diff --git a/src/common/rsl.c b/src/common/rsl.c index af0b72d..e6fbe6f 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -695,8 +695,7 @@ switch (lchan->ts->pchan) { case GSM_PCHAN_TCH_F_TCH_H_PDCH: if (lchan->ts->dyn.pchan_is != GSM_PCHAN_PDCH) { - LOGP(DRSL, LOGL_ERROR, - "%s (ss=%d) PDCH release: not in PDCH mode\n", + LOGP(DRSL, LOGL_ERROR, "%s (ss=%d) PDCH release: not in PDCH mode\n", gsm_ts_and_pchan_name(lchan->ts), lchan->nr); /* well, what to do about it ... carry on and hope it's fine. */ } @@ -712,8 +711,8 @@ send_rel_ack = false; break; default: - LOGP(DRSL, LOGL_ERROR, "%s PCU rel ack for unexpected lchan kind %s\n", - gsm_lchan_name(lchan), gsm_pchan_name(lchan->rel_act_kind)); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "PCU rel ack for unexpected lchan kind %s\n", + gsm_pchan_name(lchan->rel_act_kind)); /* Release certainly was not requested by the BSC via RSL, so don't ack. */ send_rel_ack = false; break; @@ -728,8 +727,7 @@ } if (!send_rel_ack) { - LOGP(DRSL, LOGL_NOTICE, "%s not sending REL ACK\n", - gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "%s not sending REL ACK\n", gsm_lchan_name(lchan)); return 0; } @@ -779,7 +777,7 @@ struct msgb *msg; uint8_t chan_nr = gsm_lchan2chan_nr(lchan); - LOGP(DRSL, LOGL_INFO, "Sending HANDOver DETect\n"); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, "Sending HANDOver DETect\n"); msg = rsl_msgb_alloc(sizeof(struct abis_rsl_dchan_hdr)); if (!msg) @@ -826,8 +824,8 @@ int rsl_tx_chan_act_acknack(struct gsm_lchan *lchan, uint8_t cause) { if (lchan->rel_act_kind != LCHAN_REL_ACT_RSL) { - LOGP(DRSL, LOGL_NOTICE, "%s not sending CHAN ACT %s\n", - gsm_lchan_name(lchan), cause ? "NACK" : "ACK"); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "not sending CHAN ACT %s\n", + cause ? "NACK" : "ACK"); return 0; } @@ -842,9 +840,7 @@ struct msgb *msg; uint8_t chan_nr = gsm_lchan2chan_nr(lchan); - LOGP(DRSL, LOGL_NOTICE, - "%s Sending Connection Failure: cause = 0x%02x\n", - gsm_lchan_name(lchan), cause); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "Sending Connection Failure: cause = 0x%02x\n", cause); msg = rsl_msgb_alloc(sizeof(struct abis_rsl_dchan_hdr)); if (!msg) @@ -920,15 +916,13 @@ /* check if the encryption algorithm sent by BSC is supported! */ rc = bts_supports_cipher(bts, *val); if (rc != 1) { - LOGP(DRSL, LOGL_ERROR, "%s: BTS doesn't support cipher %s\n", - gsm_lchan_name(lchan), ciph_name); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "BTS doesn't support cipher %s\n", ciph_name); return -EINVAL; } /* length can be '1' in case of no ciphering */ if (len < 1) { - LOGP(DRSL, LOGL_ERROR, "%s: Encryption Info cannot have len=%d\n", - gsm_lchan_name(lchan), len); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "Encryption Info cannot have len=%d\n", len); return -EINVAL; } @@ -937,8 +931,7 @@ if (lchan->encr.key_len > sizeof(lchan->encr.key)) lchan->encr.key_len = sizeof(lchan->encr.key); memcpy(lchan->encr.key, val, lchan->encr.key_len); - DEBUGP(DRSL, "%s: Setting lchan cipher algorithm %s\n", - gsm_lchan_name(lchan), ciph_name); + LOGPLCHAN(lchan, DRSL, LOGL_DEBUG, "Setting lchan cipher algorithm %s\n", ciph_name); return 0; } @@ -1026,9 +1019,8 @@ int rc; if (lchan->state != LCHAN_S_NONE) { - LOGP(DRSL, LOGL_ERROR, - "%s: error: lchan is not available, but in state: %s.\n", - gsm_lchan_name(lchan), gsm_lchans_name(lchan->state)); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "error: lchan is not available, but in state: %s.\n", + gsm_lchans_name(lchan->state)); return rsl_tx_chan_act_nack(lchan, RSL_ERR_EQUIPMENT_FAIL); } @@ -1050,8 +1042,8 @@ } } - LOGP(DRSL, LOGL_DEBUG, "%s: rx Channel Activation in state: %s.\n", - gsm_lchan_name(lchan), gsm_lchans_name(lchan->state)); + LOGPLCHAN(lchan, DRSL, LOGL_DEBUG, "rx Channel Activation in state: %s.\n", + gsm_lchans_name(lchan->state)); /* Initialize channel defaults */ lchan->ms_power = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0); @@ -1062,7 +1054,7 @@ /* 9.3.3 Activation Type */ if (!TLVP_PRESENT(&tp, RSL_IE_ACT_TYPE)) { - LOGP(DRSL, LOGL_NOTICE, "missing Activation Type\n"); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "missing Activation Type\n"); return rsl_tx_chan_act_nack(lchan, RSL_ERR_MAND_IE_ERROR); } type = *TLVP_VAL(&tp, RSL_IE_ACT_TYPE); @@ -1070,7 +1062,7 @@ /* 9.3.6 Channel Mode */ if (type != RSL_ACT_OSMO_PDCH) { if (!TLVP_PRESENT(&tp, RSL_IE_CHAN_MODE)) { - LOGP(DRSL, LOGL_NOTICE, "missing Channel Mode\n"); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "missing Channel Mode\n"); return rsl_tx_chan_act_nack(lchan, RSL_ERR_MAND_IE_ERROR); } cm = (struct rsl_ie_chan_mode *) TLVP_VAL(&tp, RSL_IE_CHAN_MODE); @@ -1134,7 +1126,7 @@ osmo_si = osmo_rsl2sitype(rsl_si); if (osmo_si == SYSINFO_TYPE_NONE) { - LOGP(DRSL, LOGL_NOTICE, " Rx SACCH SI 0x%02x not supported.\n", rsl_si); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "Rx SACCH SI 0x%02x not supported.\n", rsl_si); rsl_tx_error_report(msg->trx, RSL_ERR_IE_CONTENT, &dch->chan_nr, NULL, msg); return rsl_tx_chan_act_acknack(lchan, RSL_ERR_IE_CONTENT); @@ -1144,7 +1136,7 @@ cur += si_len; if (cur > val + tot_len) { - LOGP(DRSL, LOGL_ERROR, "Error parsing SACCH INFO IE\n"); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "Error parsing SACCH INFO IE\n"); rsl_tx_error_report(msg->trx, RSL_ERR_IE_CONTENT, &dch->chan_nr, NULL, msg); return rsl_tx_chan_act_acknack(lchan, RSL_ERR_IE_CONTENT); @@ -1157,7 +1149,7 @@ /* 9.3.52 MultiRate Configuration */ if (TLVP_PRESENT(&tp, RSL_IE_MR_CONFIG)) { if (TLVP_LEN(&tp, RSL_IE_MR_CONFIG) > sizeof(lchan->mr_bts_lv) - 1) { - LOGP(DRSL, LOGL_ERROR, "Error parsing MultiRate conf IE\n"); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "Error parsing MultiRate conf IE\n"); rsl_tx_error_report(msg->trx, RSL_ERR_IE_CONTENT, &dch->chan_nr, NULL, msg); return rsl_tx_chan_act_acknack(lchan, RSL_ERR_IE_CONTENT); } @@ -1172,9 +1164,8 @@ /* 9.3.53 MultiRate Control */ /* 9.3.54 Supported Codec Types */ - LOGP(DRSL, LOGL_INFO, "%s: chan_nr=%s type=0x%02x mode=%s\n", - gsm_lchan_name(lchan), rsl_chan_nr_str(dch->chan_nr), type, - gsm48_chan_mode_name(lchan->tch_mode)); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, "chan_nr=%s type=0x%02x mode=%s\n", + rsl_chan_nr_str(dch->chan_nr), type, gsm48_chan_mode_name(lchan->tch_mode)); /* Connecting PDCH on dyn TS goes via PCU instead. */ if (ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH @@ -1362,9 +1353,8 @@ struct ciph_mod_compl *cmc = data; const char *imeisv = NULL; - LOGP(DRSL, LOGL_NOTICE, - "%s Sending FAKE CIPHERING MODE COMPLETE to BSC (Alg %u)\n", - gsm_lchan_name(cmc->lchan), cmc->lchan->encr.alg_id); + LOGPLCHAN(cmc->lchan, DRSL, LOGL_NOTICE, "Sending FAKE CIPHERING MODE COMPLETE to BSC (Alg %u)\n", + cmc->lchan->encr.alg_id); if (cmc->send_imeisv) imeisv = "0123456789012345"; @@ -1440,8 +1430,7 @@ } else #endif { - LOGP(DRSL, LOGL_INFO, "%s Fwd RSL ENCR CMD (Alg %u) to LAPDm\n", - gsm_lchan_name(lchan), lchan->encr.alg_id); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, "Fwd RSL ENCR CMD (Alg %u) to LAPDm\n", lchan->encr.alg_id); /* hand it into RSLms for transmission of L3_INFO to the MS */ lapdm_rslms_recvmsg(msg, &lchan->lapdm_ch); /* return 1 to make sure the msgb is not free'd */ @@ -1487,7 +1476,7 @@ struct msgb *msg; uint8_t chan_nr = gsm_lchan2chan_nr(lchan); - LOGP(DRSL, LOGL_INFO, "%s Tx MODE MODIF ACK\n", gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, "Tx MODE MODIF ACK\n"); msg = rsl_msgb_alloc(sizeof(struct abis_rsl_dchan_hdr)); if (!msg) @@ -1511,17 +1500,15 @@ /* 9.3.6 Channel Mode */ if (!TLVP_PRESENT(&tp, RSL_IE_CHAN_MODE)) { - LOGP(DRSL, LOGL_NOTICE, "missing Channel Mode\n"); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "missing Channel Mode\n"); return rsl_tx_mode_modif_nack(lchan, RSL_ERR_MAND_IE_ERROR); } cm = (struct rsl_ie_chan_mode *) TLVP_VAL(&tp, RSL_IE_CHAN_MODE); lchan_tchmode_from_cmode(lchan, cm); if (bts_supports_cm(lchan->ts->trx->bts, ts_pchan(lchan->ts), lchan->tch_mode) != 1) { - LOGP(DRSL, LOGL_ERROR, - "%s %s: invalid mode: %s (wrong BSC configuration?)\n", - gsm_ts_and_pchan_name(lchan->ts), gsm_lchan_name(lchan), - gsm48_chan_mode_name(lchan->tch_mode)); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "%s: invalid mode: %s (wrong BSC configuration?)\n", + gsm_ts_and_pchan_name(lchan->ts), gsm48_chan_mode_name(lchan->tch_mode)); return rsl_tx_mode_modif_nack(lchan, RSL_ERR_SERV_OPT_UNAVAIL); } @@ -1541,7 +1528,7 @@ /* 9.3.52 MultiRate Configuration */ if (TLVP_PRESENT(&tp, RSL_IE_MR_CONFIG)) { if (TLVP_LEN(&tp, RSL_IE_MR_CONFIG) > sizeof(lchan->mr_bts_lv) - 1) { - LOGP(DRSL, LOGL_ERROR, "Error parsing MultiRate conf IE\n"); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "Error parsing MultiRate conf IE\n"); rsl_tx_error_report(msg->trx, RSL_ERR_IE_CONTENT, &dch->chan_nr, NULL, msg); return rsl_tx_mode_modif_nack(lchan, RSL_ERR_IE_CONTENT);; } @@ -1576,8 +1563,7 @@ lchan->ms_power_ctrl.fixed = 1; lchan->ms_power_ctrl.current = pwr; - LOGP(DRSL, LOGL_NOTICE, "%s forcing power to %d\n", - gsm_lchan_name(lchan), lchan->ms_power_ctrl.current); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "forcing power to %d\n", lchan->ms_power_ctrl.current); bts_model_adjst_ms_pwr(lchan); } @@ -1596,7 +1582,7 @@ rsl_tlv_parse(&tp, msgb_l3(msg), msgb_l3len(msg)); if (TLVP_PRESENT(&tp, RSL_IE_STARTNG_TIME)) { - LOGP(DRSL, LOGL_NOTICE, "Starting time not supported\n"); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "Starting time not supported\n"); return rsl_tx_error_report(msg->trx, RSL_ERR_SERV_OPT_UNIMPL, &dch->chan_nr, NULL, msg); } @@ -1610,8 +1596,7 @@ osmo_si = osmo_rsl2sitype(rsl_si); if (osmo_si == SYSINFO_TYPE_NONE) { - LOGP(DRSL, LOGL_NOTICE, "%s Rx SACCH SI 0x%02x not supported.\n", - gsm_lchan_name(lchan), rsl_si); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "Rx SACCH SI 0x%02x not supported.\n", rsl_si); return rsl_tx_error_report(msg->trx, RSL_ERR_IE_CONTENT, &dch->chan_nr, NULL, msg); } if (TLVP_PRESENT(&tp, RSL_IE_L3_INFO)) { @@ -1623,14 +1608,12 @@ else lchan->si.overridden &= ~(1 << osmo_si); - LOGP(DRSL, LOGL_INFO, "%s Rx RSL SACCH FILLING (SI%s)\n", - gsm_lchan_name(lchan), - get_value_string(osmo_sitype_strs, osmo_si)); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, "Rx RSL SACCH FILLING (SI%s)\n", + get_value_string(osmo_sitype_strs, osmo_si)); } else { lchan->si.valid &= ~(1 << osmo_si); - LOGP(DRSL, LOGL_INFO, "%s Rx RSL Disabling SACCH FILLING (SI%s)\n", - gsm_lchan_name(lchan), - get_value_string(osmo_sitype_strs, osmo_si)); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, "Rx RSL Disabling SACCH FILLING (SI%s)\n", + get_value_string(osmo_sitype_strs, osmo_si)); } return 0; @@ -1700,8 +1683,8 @@ { struct msgb *nmsg; - LOGP(DRSL, LOGL_NOTICE, "%s Sending RTP delete indication: cause = %s\n", - gsm_lchan_name(lchan), rsl_err_name(cause)); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "Sending RTP delete indication: cause = %s\n", + rsl_err_name(cause)); nmsg = rsl_msgb_alloc(sizeof(struct abis_rsl_dchan_hdr)); if (!nmsg) @@ -1732,9 +1715,8 @@ name = "MDCX"; ia.s_addr = htonl(lchan->abis_ip.bound_ip); - LOGP(DRSL, LOGL_INFO, "%s RSL Tx IPAC_%s_ACK (local %s:%u, ", - gsm_lchan_name(lchan), name, - inet_ntoa(ia), lchan->abis_ip.bound_port); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, "RSL Tx IPAC_%s_ACK (local %s:%u, ", + name, inet_ntoa(ia), lchan->abis_ip.bound_port); ia.s_addr = htonl(lchan->abis_ip.connect_ip); LOGPC(DRSL, LOGL_INFO, "remote %s:%u)\n", inet_ntoa(ia), lchan->abis_ip.connect_port); @@ -1773,8 +1755,7 @@ struct msgb *msg; uint8_t chan_nr = gsm_lchan2chan_nr(lchan); - LOGP(DRSL, LOGL_INFO, "%s RSL Tx IPAC_DLCX_ACK\n", - gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, "RSL Tx IPAC_DLCX_ACK\n"); msg = rsl_msgb_alloc(sizeof(struct abis_rsl_dchan_hdr)); if (!msg) @@ -1797,8 +1778,7 @@ struct msgb *msg; uint8_t chan_nr = gsm_lchan2chan_nr(lchan); - LOGP(DRSL, LOGL_INFO, "%s RSL Tx IPAC_DLCX_NACK\n", - gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, "RSL Tx IPAC_DLCX_NACK\n"); msg = rsl_msgb_alloc(sizeof(struct abis_rsl_dchan_hdr)); if (!msg) @@ -1825,8 +1805,7 @@ uint8_t chan_nr = gsm_lchan2chan_nr(lchan); /* FIXME: allocate new msgb and copy old over */ - LOGP(DRSL, LOGL_NOTICE, "%s RSL Tx IPAC_BIND_NACK\n", - gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "RSL Tx IPAC_BIND_NACK\n"); msg = rsl_msgb_alloc(sizeof(struct abis_rsl_dchan_hdr)); if (!msg) @@ -1926,7 +1905,7 @@ return tx_ipac_XXcx_nack(lchan, RSL_ERR_MAND_IE_ERROR, 0, dch->c.msg_type); - LOGP(DRSL, LOGL_DEBUG, "%s IPAC_%s: ", gsm_lchan_name(lchan), name); + LOGPLCHAN(lchan, DRSL, LOGL_DEBUG, "IPAC_%s: ", name); if (TLVP_PRES_LEN(&tp, RSL_IE_IPAC_REMOTE_IP, 4)) { connect_ip = tlvp_val32_unal(&tp, RSL_IE_IPAC_REMOTE_IP); addr.s_addr = connect_ip; @@ -1955,9 +1934,8 @@ inc_ip_port = 1; if (payload_type && payload_type2) { - LOGP(DRSL, LOGL_ERROR, "%s Rx RSL IPAC %s, " - "RTP_PT and RTP_PT2 in same msg !?!\n", - gsm_lchan_name(lchan), name); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "Rx RSL IPAC %s, " + "RTP_PT and RTP_PT2 in same msg !?!\n", name); return tx_ipac_XXcx_nack(lchan, RSL_ERR_MAND_IE_ERROR, inc_ip_port, dch->c.msg_type); } @@ -1966,9 +1944,8 @@ char cname[32]; char *ipstr = NULL; if (lchan->abis_ip.rtp_socket) { - LOGP(DRSL, LOGL_ERROR, "%s Rx RSL IPAC CRCX, " - "but we already have socket!\n", - gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "Rx RSL IPAC CRCX, " + "but we already have socket!\n"); return tx_ipac_XXcx_nack(lchan, RSL_ERR_RES_UNAVAIL, inc_ip_port, dch->c.msg_type); } @@ -1978,9 +1955,7 @@ lchan->abis_ip.rtp_socket = osmo_rtp_socket_create(lchan->ts->trx, OSMO_RTP_F_POLL); if (!lchan->abis_ip.rtp_socket) { - LOGP(DRTP, LOGL_ERROR, - "%s IPAC Failed to create RTP/RTCP sockets\n", - gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DRTP, LOGL_ERROR, "IPAC Failed to create RTP/RTCP sockets\n"); oml_tx_failure_event_rep(&lchan->ts->trx->mo, OSMO_EVT_CRIT_RTP_TOUT, "%s IPAC Failed to create RTP/RTCP sockets", @@ -1994,13 +1969,10 @@ OSMO_RTP_P_JITBUF, bts->rtp_jitter_buf_ms); if (rc < 0) - LOGP(DRTP, LOGL_ERROR, - "%s IPAC Failed to set RTP socket parameters: %s\n", - gsm_lchan_name(lchan), strerror(-rc)); + LOGPLCHAN(lchan, DRTP, LOGL_ERROR, + "IPAC Failed to set RTP socket parameters: %s\n", strerror(-rc)); else - LOGP(DRTP, LOGL_INFO, - "%s IPAC set RTP socket parameters: %d\n", - gsm_lchan_name(lchan), rc); + LOGPLCHAN(lchan, DRTP, LOGL_INFO, "IPAC set RTP socket parameters: %d\n", rc); lchan->abis_ip.rtp_socket->priv = lchan; lchan->abis_ip.rtp_socket->rx_cb = &l1sap_rtp_rx_cb; @@ -2020,9 +1992,7 @@ } rc = bind_rtp(bts, lchan->abis_ip.rtp_socket, ipstr); if (rc < 0) { - LOGP(DRTP, LOGL_ERROR, - "%s IPAC Failed to bind RTP/RTCP sockets\n", - gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DRTP, LOGL_ERROR, "IPAC Failed to bind RTP/RTCP sockets\n"); oml_tx_failure_event_rep(&lchan->ts->trx->mo, OSMO_EVT_CRIT_RTP_TOUT, "%s IPAC Failed to bind RTP/RTCP sockets", @@ -2043,9 +2013,8 @@ } else { /* MDCX */ if (!lchan->abis_ip.rtp_socket) { - LOGP(DRSL, LOGL_ERROR, "%s Rx RSL IPAC MDCX, " - "but we have no RTP socket!\n", - gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "Rx RSL IPAC MDCX, " + "but we have no RTP socket!\n"); return tx_ipac_XXcx_nack(lchan, RSL_ERR_RES_UNAVAIL, inc_ip_port, dch->c.msg_type); } @@ -2064,9 +2033,7 @@ rc = osmo_rtp_socket_connect(lchan->abis_ip.rtp_socket, inet_ntoa(ia), ntohs(connect_port)); if (rc < 0) { - LOGP(DRTP, LOGL_ERROR, - "%s Failed to connect RTP/RTCP sockets\n", - gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DRTP, LOGL_ERROR, "Failed to connect RTP/RTCP sockets\n"); osmo_rtp_socket_free(lchan->abis_ip.rtp_socket); lchan->abis_ip.rtp_socket = NULL; msgb_queue_flush(&lchan->dl_tch_queue); @@ -2081,9 +2048,7 @@ &lchan->abis_ip.bound_ip, &port); if (rc < 0) - LOGP(DRTP, LOGL_ERROR, "%s IPAC cannot obtain " - "locally bound IP/port: %d\n", - gsm_lchan_name(lchan), rc); + LOGPLCHAN(lchan, DRTP, LOGL_ERROR, "IPAC cannot obtain locally bound IP/port: %d\n", rc); lchan->abis_ip.bound_port = port; /* Everything has succeeded, we can store new values in lchan */ @@ -2145,8 +2110,7 @@ struct msgb *msg; uint8_t ie[2]; - LOGP(DRSL, LOGL_NOTICE, "%s Tx PDCH %s ACK\n", - gsm_lchan_name(lchan), pdch_act? "ACT" : "DEACT"); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "Tx PDCH %s ACK\n", pdch_act? "ACT" : "DEACT"); msg = rsl_msgb_alloc(sizeof(struct abis_rsl_dchan_hdr)); if (!msg) @@ -2173,8 +2137,8 @@ struct msgb *msg; uint8_t chan_nr = gsm_lchan2chan_nr(lchan); - LOGP(DRSL, LOGL_NOTICE, "%s Tx PDCH %s NACK (cause = 0x%02x)\n", - gsm_lchan_name(lchan), pdch_act? "ACT" : "DEACT", cause); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "Tx PDCH %s NACK (cause = 0x%02x)\n", + pdch_act ? "ACT" : "DEACT", cause); msg = rsl_msgb_alloc(sizeof(struct abis_rsl_dchan_hdr)); if (!msg) @@ -2236,11 +2200,11 @@ if (ts->flags & TS_F_PDCH_PENDING_MASK) { /* Only one of the pending flags should ever be set at the same * time, but just log both in case both should be set. */ - LOGP(DRSL, LOGL_ERROR, - "%s Request to PDCH %s, but PDCH%s%s is still pending\n", - gsm_lchan_name(lchan), pdch_act? "ACT" : "DEACT", - (ts->flags & TS_F_PDCH_ACT_PENDING)? " ACT" : "", - (ts->flags & TS_F_PDCH_DEACT_PENDING)? " DEACT" : ""); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, + "Request to PDCH %s, but PDCH%s%s is still pending\n", + pdch_act? "ACT" : "DEACT", + (ts->flags & TS_F_PDCH_ACT_PENDING)? " ACT" : "", + (ts->flags & TS_F_PDCH_DEACT_PENDING)? " DEACT" : ""); rsl_tx_dyn_pdch_nack(lchan, pdch_act, RSL_ERR_NORMAL_UNSPEC); return; } @@ -2263,18 +2227,16 @@ /* ensure that this is indeed a dynamic-PDCH channel */ if (ts->pchan != GSM_PCHAN_TCH_F_PDCH) { - LOGP(DRSL, LOGL_ERROR, - "%s Attempt to PDCH %s on TS that is not a TCH/F_PDCH (is %s)\n", - gsm_lchan_name(lchan), pdch_act? "ACT" : "DEACT", - gsm_pchan_name(ts->pchan)); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, + "Attempt to PDCH %s on TS that is not a TCH/F_PDCH (is %s)\n", + pdch_act? "ACT" : "DEACT", gsm_pchan_name(ts->pchan)); ipacc_dyn_pdch_complete(ts, -EINVAL); return; } if (is_pdch_act == pdch_act) { - LOGP(DL1C, LOGL_NOTICE, - "%s Request to PDCH %s, but is already so\n", - gsm_lchan_name(lchan), pdch_act? "ACT" : "DEACT"); + LOGPLCHAN(lchan, DL1C, LOGL_NOTICE, "Request to PDCH %s, but is already so\n", + pdch_act? "ACT" : "DEACT"); ipacc_dyn_pdch_complete(ts, 0); return; } @@ -2590,8 +2552,8 @@ lchan = lchan_lookup(trx, rh->chan_nr, "RSL rx RLL: "); if (!lchan) { - LOGP(DRLL, LOGL_NOTICE, "Rx RLL %s for unknown lchan\n", - rsl_msg_name(rh->c.msg_type)); + LOGPLCHAN(lchan, DRLL, LOGL_NOTICE, "Rx RLL %s for unknown lchan\n", + rsl_msg_name(rh->c.msg_type)); return rsl_reject_unknown_lchan(msg); } @@ -2717,9 +2679,8 @@ int res_valid = lchan->meas.flags & LC_UL_M_F_RES_VALID; struct gsm_bts *bts = lchan->ts->trx->bts; - LOGP(DRSL, LOGL_DEBUG, - "%s chan_num:%u Tx MEAS RES valid(%d), flags(%02x)\n", - gsm_lchan_name(lchan), chan_nr, res_valid, lchan->meas.flags); + LOGPLCHAN(lchan, DRSL, LOGL_DEBUG, "chan_num:%u Tx MEAS RES valid(%d), flags(%02x)\n", + chan_nr, res_valid, lchan->meas.flags); if (!res_valid) return -EINPROGRESS; @@ -2728,9 +2689,8 @@ if (!msg) return -ENOMEM; - LOGP(DRSL, LOGL_DEBUG, - "%s Send Meas RES: NUM:%u, RXLEV_FULL:%u, RXLEV_SUB:%u, RXQUAL_FULL:%u, RXQUAL_SUB:%u, MS_PWR:%u, UL_TA:%u, L3_LEN:%d, TimingOff:%u\n", - gsm_lchan_name(lchan), + LOGPLCHAN(lchan, DRSL, LOGL_DEBUG, + "Send Meas RES: NUM:%u, RXLEV_FULL:%u, RXLEV_SUB:%u, RXQUAL_FULL:%u, RXQUAL_SUB:%u, MS_PWR:%u, UL_TA:%u, L3_LEN:%d, TimingOff:%u\n", lchan->meas.res_nr, lchan->meas.ul_res.full.rx_lev, lchan->meas.ul_res.sub.rx_lev, @@ -2794,9 +2754,8 @@ rh = msgb_l2(msg); if (lchan->state != LCHAN_S_ACTIVE) { - LOGP(DRSL, LOGL_ERROR, "%s(%s) is not active. Dropping message (len=%u): %s\n", - gsm_lchan_name(lchan), gsm_lchans_name(lchan->state), - msgb_l2len(msg), msgb_hexdump_l2(msg)); + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "(%s) is not active. Dropping message (len=%u): %s\n", + gsm_lchans_name(lchan->state), msgb_l2len(msg), msgb_hexdump_l2(msg)); msgb_free(msg); return 0; } @@ -2809,19 +2768,20 @@ if (rslms_is_meas_rep(msg)) { int rc; - LOGP(DRSL, LOGL_INFO, "%s Handing RLL msg %s from LAPDm to MEAS REP\n", - gsm_lchan_name(lchan), rsl_msg_name(rh->msg_type)); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, "Handing RLL msg %s from LAPDm to MEAS REP\n", + rsl_msg_name(rh->msg_type)); /* REL_IND handling */ if (rh->msg_type == RSL_MT_REL_IND && (lchan->type == GSM_LCHAN_TCH_F || lchan->type == GSM_LCHAN_TCH_H)) { - LOGP(DRSL, LOGL_INFO, "%s Scheduling %s to L3 in next associated TCH-RTS.ind\n", - gsm_lchan_name(lchan), - rsl_msg_name(rh->msg_type)); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, + "Scheduling %s to L3 in next associated TCH-RTS.ind\n", + rsl_msg_name(rh->msg_type)); if(lchan->pending_rel_ind_msg) { - LOGP(DRSL, LOGL_INFO, "Dropping pending release indication message\n"); - msgb_free(lchan->pending_rel_ind_msg); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, + "Dropping pending release indication message\n"); + msgb_free(lchan->pending_rel_ind_msg); } lchan->pending_rel_ind_msg = msg; @@ -2834,8 +2794,8 @@ } else if (rslms_is_gprs_susp_req(msg)) { return handle_gprs_susp_req(msg); } else { - LOGP(DRSL, LOGL_INFO, "%s Fwd RLL msg %s from LAPDm to A-bis\n", - gsm_lchan_name(lchan), rsl_msg_name(rh->msg_type)); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, "Fwd RLL msg %s from LAPDm to A-bis\n", + rsl_msg_name(rh->msg_type)); return abis_bts_rsl_sendmsg(msg); } @@ -2868,8 +2828,7 @@ return rsl_reject_unknown_lchan(msg); } - LOGP(DRSL, LOGL_INFO, "%s Rx RSL %s\n", gsm_lchan_name(msg->lchan), - rsl_msg_name(cch->c.msg_type)); + LOGPLCHAN(msg->lchan, DRSL, LOGL_INFO, "Rx RSL %s\n", rsl_msg_name(cch->c.msg_type)); switch (cch->c.msg_type) { case RSL_MT_BCCH_INFO: @@ -2886,13 +2845,13 @@ break; case RSL_MT_SMS_BC_REQ: case RSL_MT_NOT_CMD: - LOGP(DRSL, LOGL_NOTICE, "unimplemented RSL cchan msg_type %s\n", - rsl_msg_name(cch->c.msg_type)); + LOGPLCHAN(msg->lchan, DRSL, LOGL_NOTICE, "unimplemented RSL cchan msg_type %s\n", + rsl_msg_name(cch->c.msg_type)); rsl_tx_error_report(trx, RSL_ERR_MSG_TYPE, &cch->chan_nr, NULL, msg); break; default: - LOGP(DRSL, LOGL_NOTICE, "undefined RSL cchan msg_type 0x%02x\n", - cch->c.msg_type); + LOGPLCHAN(msg->lchan, DRSL, LOGL_NOTICE, "undefined RSL cchan msg_type 0x%02x\n", + cch->c.msg_type); rsl_tx_error_report(trx, RSL_ERR_MSG_TYPE, &cch->chan_nr, NULL, msg); ret = -EINVAL; break; @@ -2963,13 +2922,13 @@ case RSL_MT_PRE_HANDO_NOTIF: case RSL_MT_MR_CODEC_MOD_REQ: case RSL_MT_TFO_MOD_REQ: - LOGP(DRSL, LOGL_NOTICE, "unimplemented RSL dchan msg_type %s\n", - rsl_msg_name(dch->c.msg_type)); + LOGPLCHAN(msg->lchan, DRSL, LOGL_NOTICE, "unimplemented RSL dchan msg_type %s\n", + rsl_msg_name(dch->c.msg_type)); rsl_tx_error_report(trx, RSL_ERR_MSG_TYPE, &dch->chan_nr, NULL, msg); break; default: - LOGP(DRSL, LOGL_NOTICE, "undefined RSL dchan msg_type 0x%02x\n", - dch->c.msg_type); + LOGPLCHAN(msg->lchan, DRSL, LOGL_NOTICE, "undefined RSL dchan msg_type 0x%02x\n", + dch->c.msg_type); rsl_tx_error_report(trx, RSL_ERR_MSG_TYPE, &dch->chan_nr, NULL, msg); ret = -EINVAL; } @@ -3033,8 +2992,7 @@ return rsl_reject_unknown_lchan(msg); } - LOGP(DRSL, LOGL_INFO, "%s Rx RSL %s\n", gsm_lchan_name(msg->lchan), - rsl_ipac_msg_name(dch->c.msg_type)); + LOGPLCHAN(msg->lchan, DRSL, LOGL_INFO, "Rx RSL %s\n", rsl_ipac_msg_name(dch->c.msg_type)); switch (dch->c.msg_type) { case RSL_MT_IPAC_CRCX: @@ -3045,8 +3003,8 @@ ret = rsl_rx_ipac_dlcx(msg); break; default: - LOGP(DRSL, LOGL_NOTICE, "unsupported RSL ip.access msg_type 0x%02x\n", - dch->c.msg_type); + LOGPLCHAN(msg->lchan, DRSL, LOGL_NOTICE, "unsupported RSL ip.access msg_type 0x%02x\n", + dch->c.msg_type); rsl_tx_error_report(trx, RSL_ERR_MSG_TYPE, &dch->chan_nr, NULL, msg); ret = -EINVAL; } diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c index 5c66e08..e4a05c8 100644 --- a/src/common/sysinfo.c +++ b/src/common/sysinfo.c @@ -172,6 +172,6 @@ lchan->si.last = tmp; return GSM_LCHAN_SI(lchan, tmp); } - LOGP(DL1P, LOGL_NOTICE, "%s SACCH no SI available\n", gsm_lchan_name(lchan)); + LOGPLCHAN(lchan, DL1P, LOGL_NOTICE, "SACCH no SI available\n"); return NULL; } -- To view, visit https://gerrit.osmocom.org/14111 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I6913ac8fb543811126b85a54118333155c03bc03 Gerrit-Change-Number: 14111 Gerrit-PatchSet: 6 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 16:03:04 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 16:03:04 +0000 Subject: Change in osmo-bts[master]: rsl.adoc: DELETE INDICATION is implemented since Feb '18 In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14154 ) Change subject: rsl.adoc: DELETE INDICATION is implemented since Feb '18 ...................................................................... rsl.adoc: DELETE INDICATION is implemented since Feb '18 In the following commit, we introduced transmitting the RSL DELETE INDICATION on AGCH overflow: commit 19da7fdea8912831b19d9aeed51cd2226f342283 Author: Harald Welte Date: Sat Feb 24 04:32:29 2018 +0100 So let's sync the manual with the code. Change-Id: I988778bdb83271355dc11b1a30a59e1a5dba5fb2 Related: OS#2990 --- M doc/manuals/abis/rsl.adoc 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/doc/manuals/abis/rsl.adoc b/doc/manuals/abis/rsl.adoc index 601ab8c..ec4da67 100644 --- a/doc/manuals/abis/rsl.adoc +++ b/doc/manuals/abis/rsl.adoc @@ -45,6 +45,7 @@ | 8.5.1 | <> | BCCH INFORMATION | <- | Received | 8.5.2 | - | CCCH LOAD INDICATION | -> | Sent | 8.5.3 | <> | CHANNEL REQUIRED | -> | Sent +| 8.5.4 | - | DELETE INDICATION | -> | Sent | 8.5.5 | <> | PAGING COMMAND | <- | Received | 8.5.6 | - | IMMEDIATE ASSIGN COMMAND | <- | Received | 8.5.8 | - | SMS BROADCAST COMMAND | <- | Received @@ -105,7 +106,6 @@ | 8.4.30 | TFO REPORT | 8.4.31 | TFO MODIFICATION REQUEST 2+<| *COMMON CHANNEL MANAGEMENT MESSAGES* -| 8.5.4 | DELETE INDICATION | 8.5.7 | SMS BROADCAST REQUEST | 8.5.10 | NOTIFICATION COMMAND 2+<| *TRX MANAGEMENT MESSAGES* -- To view, visit https://gerrit.osmocom.org/14154 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I988778bdb83271355dc11b1a30a59e1a5dba5fb2 Gerrit-Change-Number: 14154 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 16:03:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 16:03:05 +0000 Subject: Change in osmo-bts[master]: RSL: Fix logic about fixed/dynamic MS power control in MS POWER COMMAND In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14155 ) Change subject: RSL: Fix logic about fixed/dynamic MS power control in MS POWER COMMAND ...................................................................... RSL: Fix logic about fixed/dynamic MS power control in MS POWER COMMAND The spec is quite clear: If the MS Power Parameters IE is present, then the BTS shall perform autonomous MS power control. If it's absent, then the MS power shall be fied. Let's adjust our code accordingly. Change-Id: Ie43a1fc9cc658677c8c945ae82d03b7bffbe52d5 Related: OS#1622 --- M src/common/rsl.c 1 file changed, 21 insertions(+), 6 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/common/rsl.c b/src/common/rsl.c index e6fbe6f..e6fd8b9 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1554,19 +1554,34 @@ /* 8.4.15 MS POWER CONTROL */ static int rsl_rx_ms_pwr_ctrl(struct msgb *msg) { + struct abis_rsl_dchan_hdr *dch = msgb_l2(msg); struct gsm_lchan *lchan = msg->lchan; struct tlv_parsed tp; + uint8_t pwr; rsl_tlv_parse(&tp, msgb_l3(msg), msgb_l3len(msg)); - if (TLVP_PRES_LEN(&tp, RSL_IE_MS_POWER, 1)) { - uint8_t pwr = *TLVP_VAL(&tp, RSL_IE_MS_POWER) & 0x1F; - lchan->ms_power_ctrl.fixed = 1; - lchan->ms_power_ctrl.current = pwr; - LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "forcing power to %d\n", lchan->ms_power_ctrl.current); - bts_model_adjst_ms_pwr(lchan); + /* 9.3.13 MS Power (M) */ + if (!TLVP_PRES_LEN(&tp, RSL_IE_MS_POWER, 1)) + return rsl_tx_error_report(msg->trx, RSL_ERR_MAND_IE_ERROR, &dch->chan_nr, NULL, msg); + + pwr = *TLVP_VAL(&tp, RSL_IE_MS_POWER) & 0x1F; + lchan->ms_power_ctrl.current = pwr; + + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "forcing power to %d\n", lchan->ms_power_ctrl.current); + + /* 9.3.31 MS Power Parameters (O) */ + if (TLVP_PRESENT(&tp, RSL_IE_MS_POWER_PARAM)) + lchan->ms_power_ctrl.fixed = 0; + else { + /* Spec explicitly states BTS should only perform + * autonomous MS power control loop in BTS if 'MS Power + * Parameters' IE is present! */ + lchan->ms_power_ctrl.fixed = 1; } + bts_model_adjst_ms_pwr(lchan); + return 0; } -- To view, visit https://gerrit.osmocom.org/14155 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie43a1fc9cc658677c8c945ae82d03b7bffbe52d5 Gerrit-Change-Number: 14155 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 16:03:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 16:03:05 +0000 Subject: Change in osmo-bts[master]: rsl: Implement parsing of BS Power Control message In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14156 ) Change subject: rsl: Implement parsing of BS Power Control message ...................................................................... rsl: Implement parsing of BS Power Control message Change-Id: Id144a7e468f730e3cdaefa4cf2ad51c6106310a2 --- M doc/manuals/abis/rsl.adoc M src/common/rsl.c 2 files changed, 45 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved diff --git a/doc/manuals/abis/rsl.adoc b/doc/manuals/abis/rsl.adoc index ec4da67..f66142d 100644 --- a/doc/manuals/abis/rsl.adoc +++ b/doc/manuals/abis/rsl.adoc @@ -39,6 +39,7 @@ | 8.4.11 | - | MODE MODIFY NEGATIVE ACKNOWLEDGE | -> | Sent | 8.4.14 | - | RF CHANNEL RELEASE | <- | Received | 8.4.15 | <> | MS POWER CONTROL | <- | Received +| 8.4.16 | - | BS POWER CONTROL | <- | Received | 8.4.19 | - | RF CHANNEL RELEASE ACKNOWLEDGE | -> | Sent | 8.4.20 | <> | SACCH INFO MODIFY | <- | Received 5+<| *COMMON CHANNEL MANAGEMENT MESSAGES* @@ -91,7 +92,6 @@ 2+<| *DEDICATED CHANNEL MANAGEMENT MESSAGES* | 8.4.12 | PHYSICAL CONTEXT REQUEST | 8.4.13 | PHYSICAL CONTEXT CONFIRM -| 8.4.16 | BS POWER CONTROL | 8.4.17 | PREPROCESS CONFIGURE | 8.4.18 | PREPROCESSED MEASUREMENT RESULT | 8.4.21 | TALKER DETECTION diff --git a/src/common/rsl.c b/src/common/rsl.c index e6fd8b9..25ed279 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1585,6 +1585,47 @@ return 0; } +/* See TS 48.058 Section 9.3.4 */ +static int bs_power_attenuation_dB(uint8_t bs_power) +{ + /* the lower nibble contains the number of 2dB steps that the BS power is reduced compared + * to its nominal transmit power */ + return - ((bs_power & 0xF) *2); +} + +/* 8.4.16 BS POWER CONTROL */ +static int rsl_rx_bs_pwr_ctrl(struct msgb *msg) +{ + struct abis_rsl_dchan_hdr *dch = msgb_l2(msg); + struct gsm_lchan *lchan = msg->lchan; + struct tlv_parsed tp; + uint8_t new_bs_power; + + rsl_tlv_parse(&tp, msgb_l3(msg), msgb_l3len(msg)); + + /* 9.3.4 BS Power (M) */ + if (!TLVP_PRES_LEN(&tp, RSL_IE_BS_POWER, 1)) + return rsl_tx_error_report(msg->trx, RSL_ERR_MAND_IE_ERROR, &dch->chan_nr, NULL, msg); + + new_bs_power = *TLVP_VAL(&tp, RSL_IE_BS_POWER); + + LOGPLCHAN(lchan, DRSL, LOGL_INFO, "BS POWER CONTROL Attenuation %d -> %d dB\n", + bs_power_attenuation_dB(lchan->bs_power), bs_power_attenuation_dB(new_bs_power)); + + lchan->bs_power = new_bs_power; + + /* 9.3.31 MS Power Parameters (O) */ + if (TLVP_PRESENT(&tp, RSL_IE_BS_POWER_PARAM)) { + /* Spec explicitly states BTS should perform autonomous + * BS power control loop in BTS if 'BS Power Parameters' + * IE is present! WE don't support that. */ + return rsl_tx_error_report(msg->trx, RSL_ERR_OPT_IE_ERROR, &dch->chan_nr, NULL, msg); + } + + return 0; +} + + /* 8.4.20 SACCH INFO MODify */ static int rsl_rx_sacch_inf_mod(struct msgb *msg) { @@ -2926,6 +2967,9 @@ case RSL_MT_MS_POWER_CONTROL: ret = rsl_rx_ms_pwr_ctrl(msg); break; + case RSL_MT_BS_POWER_CONTROL: + ret = rsl_rx_bs_pwr_ctrl(msg); + break; case RSL_MT_IPAC_PDCH_ACT: case RSL_MT_IPAC_PDCH_DEACT: rsl_rx_dyn_pdch(msg, dch->c.msg_type == RSL_MT_IPAC_PDCH_ACT); -- To view, visit https://gerrit.osmocom.org/14156 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id144a7e468f730e3cdaefa4cf2ad51c6106310a2 Gerrit-Change-Number: 14156 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 16:03:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 16:03:05 +0000 Subject: Change in osmo-bts[master]: rsl: MS POWER COCNTROL isn't (only) about "forcing" power levels In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14157 ) Change subject: rsl: MS POWER COCNTROL isn't (only) about "forcing" power levels ...................................................................... rsl: MS POWER COCNTROL isn't (only) about "forcing" power levels ...so let's have a more neutral error message Change-Id: I1ffa336b18347c2fcedfeb398b255dc517245d7a --- M src/common/rsl.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, but someone else must approve Pau Espin Pedrol: Looks good to me, approved diff --git a/src/common/rsl.c b/src/common/rsl.c index 25ed279..cc653ce 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1568,7 +1568,7 @@ pwr = *TLVP_VAL(&tp, RSL_IE_MS_POWER) & 0x1F; lchan->ms_power_ctrl.current = pwr; - LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "forcing power to %d\n", lchan->ms_power_ctrl.current); + LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "Rx MS POWER CONTROL %d\n", lchan->ms_power_ctrl.current); /* 9.3.31 MS Power Parameters (O) */ if (TLVP_PRESENT(&tp, RSL_IE_MS_POWER_PARAM)) -- To view, visit https://gerrit.osmocom.org/14157 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I1ffa336b18347c2fcedfeb398b255dc517245d7a Gerrit-Change-Number: 14157 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 16:03:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 16:03:05 +0000 Subject: Change in osmo-bts[master]: load_indication: Fix missing re-set of RACH parameters In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14158 ) Change subject: load_indication: Fix missing re-set of RACH parameters ...................................................................... load_indication: Fix missing re-set of RACH parameters While we re-set the PCH load counters after every report, we never actually re-set the RACH load counters. This meant that the period/window for RACH load averaging would always grow, rather than being reset every load indication period. Related: OS#3750 Change-Id: Icd9150ba56d77d031c3cf496c5936c2de52b364c --- M src/common/load_indication.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Pau Espin Pedrol: Looks good to me, but someone else must approve diff --git a/src/common/load_indication.c b/src/common/load_indication.c index e91f6d4..fa4745b 100644 --- a/src/common/load_indication.c +++ b/src/common/load_indication.c @@ -32,6 +32,7 @@ { /* re-set the counters */ bts->load.ccch.pch_used = bts->load.ccch.pch_total = 0; + bts->load.rach.busy = bts->load.rach.access = bts->load.rach.total = 0; } static void load_timer_cb(void *data) -- To view, visit https://gerrit.osmocom.org/14158 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Icd9150ba56d77d031c3cf496c5936c2de52b364c Gerrit-Change-Number: 14158 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 16:03:41 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 16:03:41 +0000 Subject: Change in osmocom-bb[master]: common/sap_fsm.c: fix missing pointer dereference In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14135 ) Change subject: common/sap_fsm.c: fix missing pointer dereference ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/14135 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie58af6162c67ae377809b42daa897ca3f3d72af1 Gerrit-Change-Number: 14135 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Assignee: fixeria Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: fixeria Gerrit-Comment-Date: Fri, 24 May 2019 16:03:41 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 16:04:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 16:04:09 +0000 Subject: Change in osmocom-bb[master]: common/sap_fsm.c: fix missing pointer dereference In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14135 ) Change subject: common/sap_fsm.c: fix missing pointer dereference ...................................................................... common/sap_fsm.c: fix missing pointer dereference sap_fsm.c: In function ?sap_negotiate_msg_size?: sap_fsm.c:103:15: warning: passing argument 1 of ?__bswap_16? makes integer from pointer without a cast [-Wint-conversion]: size = ntohs((uint16_t *) param->value); ^~~~~~~~~~~~~~~~~~~~~~~~~ Change-Id: Ie58af6162c67ae377809b42daa897ca3f3d72af1 --- M src/host/layer23/src/common/sap_fsm.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, approved diff --git a/src/host/layer23/src/common/sap_fsm.c b/src/host/layer23/src/common/sap_fsm.c index f07488f..2265891 100644 --- a/src/host/layer23/src/common/sap_fsm.c +++ b/src/host/layer23/src/common/sap_fsm.c @@ -100,7 +100,7 @@ } /* Parse MaxMsgSize suggested by server */ - size = ntohs((uint16_t *) param->value); + size = osmo_load16be(param->value); if (size > SAP_MAX_MSG_SIZE) { cause = "suggested MaxMsgSize is too big for us"; goto error; -- To view, visit https://gerrit.osmocom.org/14135 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie58af6162c67ae377809b42daa897ca3f3d72af1 Gerrit-Change-Number: 14135 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Assignee: fixeria Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: fixeria -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 16:04:29 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 16:04:29 +0000 Subject: Change in libosmocore[master]: protocol/gsm_12_21.h: fix copy-pasted struct description In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14165 ) Change subject: protocol/gsm_12_21.h: fix copy-pasted struct description ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14165 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic6d32c886f6f8f859e382d48f9e1b509000db9ba Gerrit-Change-Number: 14165 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 24 May 2019 16:04:29 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 16:04:30 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 16:04:30 +0000 Subject: Change in libosmocore[master]: protocol/gsm_12_21.h: fix copy-pasted struct description In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14165 ) Change subject: protocol/gsm_12_21.h: fix copy-pasted struct description ...................................................................... protocol/gsm_12_21.h: fix copy-pasted struct description Change-Id: Ic6d32c886f6f8f859e382d48f9e1b509000db9ba --- M include/osmocom/gsm/protocol/gsm_12_21.h 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/include/osmocom/gsm/protocol/gsm_12_21.h b/include/osmocom/gsm/protocol/gsm_12_21.h index 3ef3603..86d12ea 100644 --- a/include/osmocom/gsm/protocol/gsm_12_21.h +++ b/include/osmocom/gsm/protocol/gsm_12_21.h @@ -70,7 +70,7 @@ uint8_t ts_nr; /*!< Timeslot Number */ } __attribute__ ((packed)); -/*! OML Object Instance */ +/*! OML FOM header */ struct abis_om_fom_hdr { uint8_t msg_type; /*!< Message Type (\ref abis_nm_msgtype) */ uint8_t obj_class; /*!< Object Class (\ref abis_nm_obj_class) */ -- To view, visit https://gerrit.osmocom.org/14165 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ic6d32c886f6f8f859e382d48f9e1b509000db9ba Gerrit-Change-Number: 14165 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 16:04:45 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 16:04:45 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Extend BTS_Tests.ttcn with test for RSL channel activation with ... In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14151 ) Change subject: bts: Extend BTS_Tests.ttcn with test for RSL channel activation with TA from initial activation onwards ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14151 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4b2eec223e961aeedfd8afa77cb671d2842910fb Gerrit-Change-Number: 14151 Gerrit-PatchSet: 1 Gerrit-Owner: Eric Wild Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 24 May 2019 16:04:45 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 16:04:46 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 16:04:46 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Extend BTS_Tests.ttcn with test for RSL channel activation with ... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14151 ) Change subject: bts: Extend BTS_Tests.ttcn with test for RSL channel activation with TA from initial activation onwards ...................................................................... bts: Extend BTS_Tests.ttcn with test for RSL channel activation with TA from initial activation onwards Change-Id: I4b2eec223e961aeedfd8afa77cb671d2842910fb Related: OS##3750 --- M bts/BTS_Tests.ttcn 1 file changed, 50 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 7912ff6..0eba242 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -1783,6 +1783,55 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } +/* establish DChan, verify that the BTS sets the TA in the first SACCH L1 header. +TA for the IMM ASS messages is still controlled by g_pars.l1_pars.ms_actual_ta! */ +function f_tc_rsl_chan_initial_ta(charstring id) runs on ConnHdlr { + var L1ctlDlMessage l1_dl; + var uint5_t ta_to_test := 16; + + + f_l1_tune(L1CTL); + RSL.clear; + + /* tell fake_trx to use a given timing offset for all bursts */ + f_trx_fake_toffs256(ta_to_test*256); + + f_est_dchan(more_ies :={valueof(t_RSL_IE(RSL_IE_TIMING_ADVANCE, RSL_IE_Body:{timing_adv := ta_to_test}))} ); + + + alt { + + /* Pick all SACCH blocks for checking */ + [] L1CTL.receive(tr_L1CTL_DATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) -> value l1_dl { + + /* The second byte of the L1 header contains the TA. */ + if (not (l1_dl.payload.data_ind.payload[1] == int2oct(ta_to_test, 1))) { + setverdict(fail, "TA in L1 header does not match the signaled (RSL) TA."); + } + + } + + /* Ignore all other blocks */ + [] L1CTL.receive { repeat; } + + } + + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); + + setverdict(pass); +} + +testcase TC_rsl_chan_initial_ta() runs on test_CT { + var ConnHdlr vc_conn; + var ConnHdlrPars pars; + f_init(testcasename()); + pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN)); + vc_conn := f_start_handler(refers(f_tc_rsl_chan_initial_ta), pars); + vc_conn.done; + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + /* Test if a channel without valid uplink bursts generates RSL CONN FAIL IND (TS 48.058 4.10) */ private function f_TC_conn_fail_crit(charstring id) runs on ConnHdlr { f_l1_tune(L1CTL); @@ -4621,6 +4670,7 @@ execute( TC_meas_res_sign_sdcch8() ); execute( TC_meas_res_sign_tchh_toa256() ); execute( TC_rsl_ms_pwr_ctrl() ); + execute( TC_rsl_chan_initial_ta() ); execute( TC_conn_fail_crit() ); execute( TC_paging_imsi_80percent() ); execute( TC_paging_tmsi_80percent() ); -- To view, visit https://gerrit.osmocom.org/14151 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I4b2eec223e961aeedfd8afa77cb671d2842910fb Gerrit-Change-Number: 14151 Gerrit-PatchSet: 1 Gerrit-Owner: Eric Wild Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 18:14:13 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 24 May 2019 18:14:13 +0000 Subject: Change in osmo-trx[master]: lms: Fix stream_stats checks with droppedPackets Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14166 Change subject: lms: Fix stream_stats checks with droppedPackets ...................................................................... lms: Fix stream_stats checks with droppedPackets Existing code had a typo (value was assigned from wrong variable). Furthermore, it was experimentally found that: while underrun/overrun are documented as "FIFO overrun count" in LimeSuite.h, it seems droppedPackets ("Number of dropped packets by HW") is not actually an incrementing counter like the others, but simply a value set every time LMS_RecvStream() is called. Since we are actually interested in keeping the count over time, adjust code to achieve that. Change-Id: Id93d33400e11360b9536f56a31904328549cfbbf --- M Transceiver52M/device/lms/LMSDevice.cpp 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/66/14166/1 diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp index c320540..a1ca983 100644 --- a/Transceiver52M/device/lms/LMSDevice.cpp +++ b/Transceiver52M/device/lms/LMSDevice.cpp @@ -597,12 +597,14 @@ } m_last_rx_overruns[chan] = status.overrun; - if (status.droppedPackets > m_last_rx_dropped[chan]) { + if (status.droppedPackets) { LOGCHAN(chan, DDEV, ERROR) << "recv Dropped packets by HW! (" << m_last_rx_dropped[chan] << " -> " - << status.droppedPackets << ")"; + << m_last_rx_dropped[chan] + + status.droppedPackets + << ")"; } - m_last_rx_dropped[chan] = m_last_rx_overruns[chan]; + m_last_rx_dropped[chan] += status.droppedPackets; } } -- To view, visit https://gerrit.osmocom.org/14166 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id93d33400e11360b9536f56a31904328549cfbbf Gerrit-Change-Number: 14166 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 18:14:14 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 24 May 2019 18:14:14 +0000 Subject: Change in osmo-trx[master]: Add rate_ctr support to store/retrieve SDR errors through VTY Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14167 Change subject: Add rate_ctr support to store/retrieve SDR errors through VTY ...................................................................... Add rate_ctr support to store/retrieve SDR errors through VTY Introduce a unified implementation-agnostic interface for radioDevice to signal SDR error counters to upper layers and manage them. This patch only implements counters for osmo-trx-lms (other devices will show all counters unchanged during time). Sample use through VTY: """ OsmoTRX> show rate-counters osmo-trx statistics 0: device:rx_underruns: 0 (0/s 0/m 0/h 0/d) Number of Rx underruns device:rx_overruns: 0 (0/s 0/m 0/h 0/d) Number of Rx overruns device:tx_underruns: 0 (0/s 0/m 0/h 0/d) Number of Tx underruns device:rx_drop_events: 4 (0/s 2/m 3/h 0/d) Number of times Rx samples were dropped by HW device:rx_drop_samples: 513 (0/s 196/m 425/h 0/d) Number of Rx samples dropped by HW """ Change-Id: I78b158141697e5714d04db8b9ccc96f31f34f439 --- M CommonLibs/Makefile.am M CommonLibs/osmo_signal.h A CommonLibs/trx_rate_ctr.cpp A CommonLibs/trx_rate_ctr.h M Transceiver52M/device/common/radioDevice.h M Transceiver52M/device/lms/LMSDevice.cpp M Transceiver52M/device/lms/LMSDevice.h M Transceiver52M/osmo-trx.cpp 8 files changed, 262 insertions(+), 37 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/67/14167/1 diff --git a/CommonLibs/Makefile.am b/CommonLibs/Makefile.am index 83bd0c0..22572e1 100644 --- a/CommonLibs/Makefile.am +++ b/CommonLibs/Makefile.am @@ -35,6 +35,7 @@ Timeval.cpp \ Logger.cpp \ Utils.cpp \ + trx_rate_ctr.cpp \ trx_vty.c \ debug.c libcommon_la_LIBADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOCTRL_LIBS) $(LIBOSMOVTY_LIBS) @@ -50,6 +51,7 @@ Vector.h \ Logger.h \ Utils.h \ + trx_rate_ctr.h \ trx_vty.h \ debug.h \ osmo_signal.h \ diff --git a/CommonLibs/osmo_signal.h b/CommonLibs/osmo_signal.h index 00b8097..2bbde03 100644 --- a/CommonLibs/osmo_signal.h +++ b/CommonLibs/osmo_signal.h @@ -27,9 +27,28 @@ /* Signalling subsystems */ enum signal_subsystems { SS_TRANSC, + SS_DEVICE }; /* SS_TRANSC signals */ enum SS_TRANSC { S_TRANSC_STOP_REQUIRED, /* Transceiver fatal error, it should be stopped */ }; + +/* SS_DEVICE signals */ +enum SS_DEVICE { + /* Device internal counters changed. Counters are provided as cb data + (struct device_counters). Must be sent with PTHREAD_CANCEL_DISABLE + to avoid deadlocks in case osmo-trx process is asked to exit. */ + S_DEVICE_COUNTER_CHANGE, +}; + +/* signal cb for signal */ +struct device_counters { + size_t chan; + uint32_t rx_underruns; + uint32_t rx_overruns; + uint32_t tx_underruns; + uint32_t rx_dropped_events; + uint32_t rx_dropped_samples; +}; diff --git a/CommonLibs/trx_rate_ctr.cpp b/CommonLibs/trx_rate_ctr.cpp new file mode 100644 index 0000000..c9c336b --- /dev/null +++ b/CommonLibs/trx_rate_ctr.cpp @@ -0,0 +1,179 @@ +/* + * Copyright (C) 2019 sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Pau Espin Pedrol + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/* + * rate_ctr API uses several osmocom select loop features, and as a result, + * calls to it must be done through the main thread (the one running the osmocom + * loop in osmo-trx). + * Since read/write from/to SDR is done in separate threads (even read and write + * each use a different thread), we must use some sort of message passing system + * between main thread feeding rate_ctr structures and the Rx/Tx threads + * generating the events. + * The idea is that upon read/write issues, lower layers (SDR APIs) provide us with + * underrun/overrun/droppedPackets information, and in that case we pass that up + * the stack through signal with signal_cb + * being a pointer to a "struct device_counters" structure, which contains + * device (implementation agnostic) statful counters for different kind of + * statistics. + * That signal is processed here in device_sig_cb, where a copy of the "struct + * device_counters" structure is held and the main thread is instructed through + * a timerfd to update rate_ctr APIs against this copy. All this is done inside + * a mutex to avoid different race conditons (between Rx andTx threads, and + * between Rx/Tx and main thread). For the same reason, callers of signal + * (device_sig_cb), that is Rx/Tx threads, + * must do so with PTHREAD_CANCEL_DISABLE, in order to avoid possible deadlocks + * in case the main thread decides to cancel other threads due to a shutdown + * operation (fi SIGKILL received) + */ + +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +#include + +#include "osmo_signal.h" +#include "trx_vty.h" +#include "trx_rate_ctr.h" +} +#include "Threads.h" +#include "Logger.h" + +/* Used in ctrs_pending, when set it means that channel slot contains unused + (non-pending) counter data */ +#define PENDING_CHAN_NONE ((uint32_t)-1) + +struct rate_ctr_group** rate_ctrs; +struct device_counters* ctrs_pending; +static size_t chan_len; +struct osmo_fd rate_ctr_timerfd; +Mutex rate_ctr_mutex; + +enum { + TRX_CTR_RX_UNDERRUNS, + TRX_CTR_RX_OVERRUNS, + TRX_CTR_TX_UNDERRUNS, + TRX_CTR_RX_DROP_EV, + TRX_CTR_RX_DROP_SMPL, +}; + +static const struct rate_ctr_desc trx_chan_ctr_desc[] = { + [TRX_CTR_RX_UNDERRUNS] = { "device:rx_underruns", "Number of Rx underruns" }, + [TRX_CTR_RX_OVERRUNS] = { "device:rx_overruns", "Number of Rx overruns" }, + [TRX_CTR_TX_UNDERRUNS] = { "device:tx_underruns", "Number of Tx underruns" }, + [TRX_CTR_RX_DROP_EV] = { "device:rx_drop_events", "Number of times Rx samples were dropped by HW" }, + [TRX_CTR_RX_DROP_SMPL] = { "device:rx_drop_samples", "Number of Rx samples dropped by HW" }, +}; + +static const struct rate_ctr_group_desc trx_chan_ctr_group_desc = { + .group_name_prefix = "trx:chan", + .group_description = "osmo-trx statistics", + .class_id = OSMO_STATS_CLASS_GLOBAL, + .num_ctr = ARRAY_SIZE(trx_chan_ctr_desc), + .ctr_desc = trx_chan_ctr_desc, +}; + +static int rate_ctr_timerfd_cb(struct osmo_fd *ofd, unsigned int what) { + size_t chan; + struct rate_ctr *ctr; + LOGC(DMAIN, NOTICE) << "Main thread is updating counters"; + rate_ctr_mutex.lock(); + for (chan = 0; chan < chan_len; chan++) { + if (ctrs_pending[chan].chan == PENDING_CHAN_NONE) + continue; + LOGCHAN(chan, DMAIN, INFO) << "rate_ctr update"; + ctr = &rate_ctrs[chan]->ctr[TRX_CTR_RX_UNDERRUNS]; + rate_ctr_add(ctr, ctrs_pending[chan].rx_underruns - ctr->current); + ctr = &rate_ctrs[chan]->ctr[TRX_CTR_RX_OVERRUNS]; + rate_ctr_add(ctr, ctrs_pending[chan].rx_overruns - ctr->current); + ctr = &rate_ctrs[chan]->ctr[TRX_CTR_TX_UNDERRUNS]; + rate_ctr_add(ctr, ctrs_pending[chan].tx_underruns - ctr->current); + ctr = &rate_ctrs[chan]->ctr[TRX_CTR_RX_DROP_EV]; + rate_ctr_add(ctr, ctrs_pending[chan].rx_dropped_events - ctr->current); + ctr = &rate_ctrs[chan]->ctr[TRX_CTR_RX_DROP_SMPL]; + rate_ctr_add(ctr, ctrs_pending[chan].rx_dropped_samples - ctr->current); + + /* Mark as done */ + ctrs_pending[chan].chan = PENDING_CHAN_NONE; + } + if (osmo_timerfd_disable(&rate_ctr_timerfd) < 0) + LOGC(DMAIN, ERROR) << "Failed to disable timerfd"; + rate_ctr_mutex.unlock(); + return 0; +} + +/* Callback function to be called every time we receive a signal from DEVICE */ +static int device_sig_cb(unsigned int subsys, unsigned int signal, + void *handler_data, void *signal_data) +{ + struct device_counters *ctr; + /* Delay sched around 20 ms, in case we receive several calls from several + * channels batched */ + struct timespec next_sched = {.tv_sec = 0, .tv_nsec = 20*1000*1000}; + /* no automatic re-trigger */ + struct timespec intv_sched = {.tv_sec = 0, .tv_nsec = 0}; + + switch (signal) { + case S_DEVICE_COUNTER_CHANGE: + ctr = (struct device_counters *)signal_data; + LOGCHAN(ctr->chan, DMAIN, NOTICE) << "Received counter change from radioDevice"; + rate_ctr_mutex.lock(); + ctrs_pending[ctr->chan] = *ctr; + if (osmo_timerfd_schedule(&rate_ctr_timerfd, &next_sched, &intv_sched) < 0) { + LOGC(DMAIN, ERROR) << "Failed to schedule timerfd: " << errno << " = "<< strerror(errno); + } + rate_ctr_mutex.unlock(); + break; + default: + break; + } + return 0; +} + +/* Init rate_ctr subsystem. Expected to be called during process start by main thread */ +void trx_rate_ctr_init(void *ctx, struct trx_ctx* trx_ctx) +{ + chan_len = trx_ctx->cfg.num_chans; + ctrs_pending = (struct device_counters*) talloc_zero_size(ctx, chan_len * sizeof(struct device_counters)); + rate_ctrs = (struct rate_ctr_group**) talloc_zero_size(ctx, chan_len * sizeof(struct rate_ctr_group*)); size_t i; + + for (i = 0; i < chan_len; i++) { + ctrs_pending[i].chan = PENDING_CHAN_NONE; + rate_ctrs[i] = rate_ctr_group_alloc(ctx, &trx_chan_ctr_group_desc, i); + if (!rate_ctrs[i]) { + LOGCHAN(i, DMAIN, ERROR) << "Failed to allocate rate ctr"; + exit(1); + } + } + rate_ctr_timerfd.fd = -1; + if (osmo_timerfd_setup(&rate_ctr_timerfd, rate_ctr_timerfd_cb, NULL) < 0) { + LOGC(DMAIN, ERROR) << "Failed to setup timerfd"; + exit(1); + } + osmo_signal_register_handler(SS_DEVICE, device_sig_cb, NULL); +} diff --git a/CommonLibs/trx_rate_ctr.h b/CommonLibs/trx_rate_ctr.h new file mode 100644 index 0000000..48131e7 --- /dev/null +++ b/CommonLibs/trx_rate_ctr.h @@ -0,0 +1,4 @@ +#pragma once + +struct trx_ctx; +void trx_rate_ctr_init(void *ctx, struct trx_ctx* trx_ctx); diff --git a/Transceiver52M/device/common/radioDevice.h b/Transceiver52M/device/common/radioDevice.h index 30e0f43..cd378a8 100644 --- a/Transceiver52M/device/common/radioDevice.h +++ b/Transceiver52M/device/common/radioDevice.h @@ -23,6 +23,7 @@ extern "C" { #include "config_defs.h" +#include "osmo_signal.h" } #ifdef HAVE_CONFIG_H @@ -168,13 +169,20 @@ size_t chans; double lo_offset; std::vector tx_paths, rx_paths; + std::vector m_ctr; RadioDevice(size_t tx_sps, size_t rx_sps, InterfaceType type, size_t chans, double offset, const std::vector& tx_paths, const std::vector& rx_paths): tx_sps(tx_sps), rx_sps(rx_sps), iface(type), chans(chans), lo_offset(offset), tx_paths(tx_paths), rx_paths(rx_paths) - { } + { + m_ctr.resize(chans); + for (size_t i = 0; i < chans; i++) { + memset(&m_ctr[i], 0, sizeof(m_ctr[i])); + m_ctr[i].chan = i; + } + } bool set_antennas() { unsigned int i; diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp index a1ca983..866235f 100644 --- a/Transceiver52M/device/lms/LMSDevice.cpp +++ b/Transceiver52M/device/lms/LMSDevice.cpp @@ -25,7 +25,10 @@ #include +extern "C" { +#include "osmo_signal.h" #include +} #ifdef HAVE_CONFIG_H #include "config.h" @@ -53,11 +56,6 @@ m_lms_stream_rx.resize(chans); m_lms_stream_tx.resize(chans); - m_last_rx_underruns.resize(chans, 0); - m_last_rx_overruns.resize(chans, 0); - m_last_rx_dropped.resize(chans, 0); - m_last_tx_underruns.resize(chans, 0); - rx_buffers.resize(chans); } @@ -580,32 +578,46 @@ void LMSDevice::update_stream_stats(size_t chan, bool * underrun, bool * overrun) { lms_stream_status_t status; - if (LMS_GetStreamStatus(&m_lms_stream_rx[chan], &status) == 0) { - if (status.underrun > m_last_rx_underruns[chan]) { - *underrun = true; - LOGCHAN(chan, DDEV, ERROR) << "recv Underrun! (" - << m_last_rx_underruns[chan] << " -> " - << status.underrun << ")"; - } - m_last_rx_underruns[chan] = status.underrun; + bool changed = false; - if (status.overrun > m_last_rx_overruns[chan]) { - *overrun = true; - LOGCHAN(chan, DDEV, ERROR) << "recv Overrun! (" - << m_last_rx_overruns[chan] << " -> " - << status.overrun << ")"; - } - m_last_rx_overruns[chan] = status.overrun; - - if (status.droppedPackets) { - LOGCHAN(chan, DDEV, ERROR) << "recv Dropped packets by HW! (" - << m_last_rx_dropped[chan] << " -> " - << m_last_rx_dropped[chan] + - status.droppedPackets - << ")"; - } - m_last_rx_dropped[chan] += status.droppedPackets; + if (LMS_GetStreamStatus(&m_lms_stream_rx[chan], &status) != 0) { + LOGCHAN(chan, DDEV, ERROR) << "LMS_GetStreamStatus failed"; + return; } + + if (status.underrun > m_ctr[chan].rx_underruns) { + changed = true; + *underrun = true; + LOGCHAN(chan, DDEV, ERROR) << "recv Underrun! (" + << m_ctr[chan].rx_underruns << " -> " + << status.underrun << ")"; + + } + m_ctr[chan].rx_underruns = status.underrun; + + if (status.overrun > m_ctr[chan].rx_overruns) { + changed = true; + *overrun = true; + LOGCHAN(chan, DDEV, ERROR) << "recv Overrun! (" + << m_ctr[chan].rx_overruns << " -> " + << status.overrun << ")"; + } + m_ctr[chan].rx_overruns = status.overrun; + + if (status.droppedPackets) { + changed = true; + LOGCHAN(chan, DDEV, ERROR) << "recv Dropped packets by HW! (" + << m_ctr[chan].rx_dropped_samples << " -> " + << m_ctr[chan].rx_dropped_samples + + status.droppedPackets + << ")"; + m_ctr[chan].rx_dropped_events++; + } + m_ctr[chan].rx_dropped_samples += status.droppedPackets; + + if (changed) + osmo_signal_dispatch(SS_DEVICE, S_DEVICE_COUNTER_CHANGE, &m_ctr[chan]); + } // NOTE: Assumes sequential reads @@ -719,9 +731,12 @@ } if (LMS_GetStreamStatus(&m_lms_stream_tx[i], &status) == 0) { - if (status.underrun > m_last_tx_underruns[i]) + if (status.underrun > m_ctr[i].tx_underruns) { *underrun = true; - m_last_tx_underruns[i] = status.underrun; + m_ctr[i].tx_underruns = status.underrun; + osmo_signal_dispatch(SS_DEVICE, S_DEVICE_COUNTER_CHANGE, &m_ctr[i]); + } + } thread_enable_cancel(true); } diff --git a/Transceiver52M/device/lms/LMSDevice.h b/Transceiver52M/device/lms/LMSDevice.h index 2828578..8b5fe93 100644 --- a/Transceiver52M/device/lms/LMSDevice.h +++ b/Transceiver52M/device/lms/LMSDevice.h @@ -49,11 +49,6 @@ std::vector m_lms_stream_rx; std::vector m_lms_stream_tx; - std::vector m_last_rx_underruns; - std::vector m_last_rx_overruns; - std::vector m_last_rx_dropped; - std::vector m_last_tx_underruns; - std::vector rx_buffers; double actualSampleRate; ///< the actual USRP sampling rate diff --git a/Transceiver52M/osmo-trx.cpp b/Transceiver52M/osmo-trx.cpp index 8c592aa..a79c26e 100644 --- a/Transceiver52M/osmo-trx.cpp +++ b/Transceiver52M/osmo-trx.cpp @@ -59,6 +59,7 @@ #include "trx_vty.h" #include "debug.h" #include "osmo_signal.h" +#include "trx_rate_ctr.h" } #define DEFAULT_CONFIG_FILE "osmo-trx.cfg" @@ -626,6 +627,8 @@ return EXIT_FAILURE; } + trx_rate_ctr_init(tall_trx_ctx, g_trx_ctx); + srandom(time(NULL)); if(trx_start(g_trx_ctx) < 0) -- To view, visit https://gerrit.osmocom.org/14167 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I78b158141697e5714d04db8b9ccc96f31f34f439 Gerrit-Change-Number: 14167 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 19:25:10 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 19:25:10 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add tests for CCCH LOAD IND (RACH) Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14169 Change subject: bts: Add tests for CCCH LOAD IND (RACH) ...................................................................... bts: Add tests for CCCH LOAD IND (RACH) Add three BTS_Tests.ttcn test cases for verifying the BTS behavior regarding CCCH LOAD IND (RACH). Related: OS#3750 Change-Id: I6c9dee1d7d3eaa218fdce7ebb8e334858aedb736 --- M bts/BTS_Tests.ttcn 1 file changed, 129 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/69/14169/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 0eba242..27ed81c 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -1269,6 +1269,132 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } +private function f_vty_load_ind_thresh(integer period := 10, integer bts_nr := 0) runs on test_CT { + var charstring bts_str := "bts " & int2str(bts_nr); + f_vty_config2(BSCVTY, {"network", bts_str}, "ccch load-indication-threshold " & int2str(period)); +} + +/* empirical value: Number of RACH slots per reporting interval (1s) on combined CCCH */ +private template integer tr_rach_slots_per_interval := (90 .. 130); + +/* Expect 0 RACH load on an idle BTS that has just started up */ +testcase TC_rach_load_idle_thresh0() runs on test_CT { + var ASP_RSL_Unitdata rx_ud; + + f_init_vty_bsc(); + /* send load indications even at 0% load */ + f_vty_load_ind_thresh(0); + f_vty_transceive(BSCVTY, "drop bts connection 0 oml"); + f_sleep(2.0); + + f_init(); + + timer T := 5.0; + T.start; + alt { + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_RACH_LOAD_IND(tr_rach_slots_per_interval, 0, 0))) { + setverdict(pass); + repeat; + } + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_RACH_LOAD_IND(?, ?, ?))) -> value rx_ud { + setverdict(fail, "Unexpected RACH LOAD IND: ", rx_ud); + repeat; + } + [] RSL_CCHAN.receive { + repeat; + } + [] T.timeout { } + } + + f_vty_load_ind_thresh(10); + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + +/* Expect no RACH load indications on an idle BTS that has just started up (default threshold 10%) */ +testcase TC_rach_load_idle_below_thresh() runs on test_CT { + var ASP_RSL_Unitdata rx_ud; + + f_init_vty_bsc(); + f_init(); + + timer T := 5.0; + T.start; + alt { + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_RACH_LOAD_IND(?, ?, ?))) -> value rx_ud { + setverdict(fail, "Unexpected RACH LOAD IND: ", rx_ud); + repeat; + } + [] RSL_CCHAN.receive { + repeat; + } + [] T.timeout { + setverdict(pass); + } + } + + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + +/* Expect 0 RACH load on an idle BTS that has just started up */ +testcase TC_rach_load_count() runs on test_CT { + var ASP_RSL_Unitdata rx_ud; + var integer load_access_count := 0; + + f_init_vty_bsc(); + /* send load indications even at 0% load */ + f_vty_load_ind_thresh(0); + f_vty_transceive(BSCVTY, "drop bts connection 0 oml"); + f_sleep(2.0); + f_init(); + + f_init_l1ctl(); + f_sleep(1.0); + f_l1_tune(L1CTL); + + var GsmFrameNumber fn_last := 0; + for (var integer i := 0; i < 1000; i := i+1) { + var OCT1 ra := f_rnd_ra_cs(); + var GsmFrameNumber fn := f_L1CTL_RACH(L1CTL, oct2int(ra)); + if (fn == fn_last) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Two RACH in same FN?!?"); + } + fn_last := fn; + } + + timer T := 5.0; + T.start; + alt { + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_RACH_LOAD_IND(tr_rach_slots_per_interval, ?, ?))) + -> value rx_ud { + var RSL_IE_Body ie; + f_rsl_find_ie(rx_ud.rsl, RSL_IE_RACH_LOAD, ie); + load_access_count := load_access_count + ie.rach_load.access_count; + if (ie.rach_load.busy_count < ie.rach_load.access_count) { + setverdict(fail, "Access count cannot be < Busy count"); + } + repeat; + } + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_RACH_LOAD_IND(?, ?, ?))) -> value rx_ud { + setverdict(fail, "Unexpected RACH LOAD IND: ", rx_ud); + repeat; + } + [] RSL_CCHAN.receive { + repeat; + } + [] T.timeout { } + } + if (load_access_count == 1000) { + setverdict(pass); + } else { + setverdict(fail, "Load reports state ", load_access_count, " RACH, but we sent 1000"); + } + + f_vty_load_ind_thresh(10); + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + + + private function f_main_trxc_connect() runs on test_CT { map(self:BTS_TRXC, system:BTS_TRXC); var Result res; @@ -4636,8 +4762,6 @@ * handover detection * BS Power Control * Physical Context -* CCCH Load Indication for RACH -* SMS Broadcast Req / Cmd / CBCH LOad Ind * RF resource ind * error handling ** IE duplicated? @@ -4664,6 +4788,9 @@ execute( TC_rach_content() ); execute( TC_rach_count() ); execute( TC_rach_max_ta() ); + execute( TC_rach_load_idle_thresh0() ); + execute( TC_rach_load_idle_below_thresh() ); + execute( TC_rach_load_count() ); execute( TC_meas_res_sign_tchf() ); execute( TC_meas_res_sign_tchh() ); execute( TC_meas_res_sign_sdcch4() ); -- To view, visit https://gerrit.osmocom.org/14169 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I6c9dee1d7d3eaa218fdce7ebb8e334858aedb736 Gerrit-Change-Number: 14169 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 20:07:41 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 20:07:41 +0000 Subject: Change in osmo-ci[master]: nightly-packages: Update LimeSuite to latest tag (v19.0.4) In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14153 ) Change subject: nightly-packages: Update LimeSuite to latest tag (v19.0.4) ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14153 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id6c27a924e3005ffadc7720190b261f089beada1 Gerrit-Change-Number: 14153 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 24 May 2019 20:07:41 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 20:07:43 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 20:07:43 +0000 Subject: Change in osmo-ci[master]: nightly-packages: Update LimeSuite to latest tag (v19.0.4) In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14153 ) Change subject: nightly-packages: Update LimeSuite to latest tag (v19.0.4) ...................................................................... nightly-packages: Update LimeSuite to latest tag (v19.0.4) Change-Id: Id6c27a924e3005ffadc7720190b261f089beada1 --- M scripts/osmocom-nightly-packages.sh 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Pau Espin Pedrol: Verified Harald Welte: Looks good to me, approved diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh index ce532bc..27cd9dc 100755 --- a/scripts/osmocom-nightly-packages.sh +++ b/scripts/osmocom-nightly-packages.sh @@ -143,7 +143,7 @@ checkout_limesuite() { cd "$REPO" git clone https://github.com/myriadrf/LimeSuite limesuite - TAG="357ad5dd0d71304179d476b38e67240527d917df" + TAG="$(get_last_tag limesuite)" cd limesuite git checkout "$TAG" } @@ -205,7 +205,7 @@ checkout_copy_debian8_jessie "osmo-gsm-manuals" checkout_copy_debian8_jessie "osmo-trx" - build limesuite no_commit --git-upstream-tree="357ad5dd0d71304179d476b38e67240527d917df" + build limesuite no_commit --git-upstream-tree="$(get_last_tag limesuite)" build osmo-gsm-manuals build osmo-gsm-manuals-debian8-jessie build libosmocore -- To view, visit https://gerrit.osmocom.org/14153 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id6c27a924e3005ffadc7720190b261f089beada1 Gerrit-Change-Number: 14153 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 20:08:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 20:08:19 +0000 Subject: Change in osmo-trx[master]: lms: Fix stream_stats checks with droppedPackets In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14166 ) Change subject: lms: Fix stream_stats checks with droppedPackets ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14166 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id93d33400e11360b9536f56a31904328549cfbbf Gerrit-Change-Number: 14166 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 24 May 2019 20:08:19 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 20:12:38 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 20:12:38 +0000 Subject: Change in osmo-trx[master]: Add rate_ctr support to store/retrieve SDR errors through VTY In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14167 ) Change subject: Add rate_ctr support to store/retrieve SDR errors through VTY ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/14167/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/#/c/14167/1//COMMIT_MSG at 18 PS1, Line 18: device:rx_underruns: 0 (0/s 0/m 0/h 0/d) Number of Rx underruns : device:rx_overruns: 0 (0/s 0/m 0/h 0/d) Number of Rx overruns do we have a clear definition of what those are? I think the terminology is not entirely obvious. For Tx: Ok, an unterrun means the hardware wanted to transmit but didn't have data. For Rx: an overrun means that some data was lost because we didn't consume it fast enough. But what's a "rx underrun" ? -- To view, visit https://gerrit.osmocom.org/14167 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I78b158141697e5714d04db8b9ccc96f31f34f439 Gerrit-Change-Number: 14167 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 24 May 2019 20:12:38 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 20:16:24 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 20:16:24 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add tests for CCCH LOAD IND (RACH) In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14169 ) Change subject: bts: Add tests for CCCH LOAD IND (RACH) ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14169 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6c9dee1d7d3eaa218fdce7ebb8e334858aedb736 Gerrit-Change-Number: 14169 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Eric Wild Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 24 May 2019 20:16:24 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 24 20:16:25 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 24 May 2019 20:16:25 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add tests for CCCH LOAD IND (RACH) In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14169 ) Change subject: bts: Add tests for CCCH LOAD IND (RACH) ...................................................................... bts: Add tests for CCCH LOAD IND (RACH) Add three BTS_Tests.ttcn test cases for verifying the BTS behavior regarding CCCH LOAD IND (RACH). Related: OS#3750 Change-Id: I6c9dee1d7d3eaa218fdce7ebb8e334858aedb736 --- M bts/BTS_Tests.ttcn 1 file changed, 129 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 0eba242..27ed81c 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -1269,6 +1269,132 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } +private function f_vty_load_ind_thresh(integer period := 10, integer bts_nr := 0) runs on test_CT { + var charstring bts_str := "bts " & int2str(bts_nr); + f_vty_config2(BSCVTY, {"network", bts_str}, "ccch load-indication-threshold " & int2str(period)); +} + +/* empirical value: Number of RACH slots per reporting interval (1s) on combined CCCH */ +private template integer tr_rach_slots_per_interval := (90 .. 130); + +/* Expect 0 RACH load on an idle BTS that has just started up */ +testcase TC_rach_load_idle_thresh0() runs on test_CT { + var ASP_RSL_Unitdata rx_ud; + + f_init_vty_bsc(); + /* send load indications even at 0% load */ + f_vty_load_ind_thresh(0); + f_vty_transceive(BSCVTY, "drop bts connection 0 oml"); + f_sleep(2.0); + + f_init(); + + timer T := 5.0; + T.start; + alt { + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_RACH_LOAD_IND(tr_rach_slots_per_interval, 0, 0))) { + setverdict(pass); + repeat; + } + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_RACH_LOAD_IND(?, ?, ?))) -> value rx_ud { + setverdict(fail, "Unexpected RACH LOAD IND: ", rx_ud); + repeat; + } + [] RSL_CCHAN.receive { + repeat; + } + [] T.timeout { } + } + + f_vty_load_ind_thresh(10); + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + +/* Expect no RACH load indications on an idle BTS that has just started up (default threshold 10%) */ +testcase TC_rach_load_idle_below_thresh() runs on test_CT { + var ASP_RSL_Unitdata rx_ud; + + f_init_vty_bsc(); + f_init(); + + timer T := 5.0; + T.start; + alt { + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_RACH_LOAD_IND(?, ?, ?))) -> value rx_ud { + setverdict(fail, "Unexpected RACH LOAD IND: ", rx_ud); + repeat; + } + [] RSL_CCHAN.receive { + repeat; + } + [] T.timeout { + setverdict(pass); + } + } + + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + +/* Expect 0 RACH load on an idle BTS that has just started up */ +testcase TC_rach_load_count() runs on test_CT { + var ASP_RSL_Unitdata rx_ud; + var integer load_access_count := 0; + + f_init_vty_bsc(); + /* send load indications even at 0% load */ + f_vty_load_ind_thresh(0); + f_vty_transceive(BSCVTY, "drop bts connection 0 oml"); + f_sleep(2.0); + f_init(); + + f_init_l1ctl(); + f_sleep(1.0); + f_l1_tune(L1CTL); + + var GsmFrameNumber fn_last := 0; + for (var integer i := 0; i < 1000; i := i+1) { + var OCT1 ra := f_rnd_ra_cs(); + var GsmFrameNumber fn := f_L1CTL_RACH(L1CTL, oct2int(ra)); + if (fn == fn_last) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Two RACH in same FN?!?"); + } + fn_last := fn; + } + + timer T := 5.0; + T.start; + alt { + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_RACH_LOAD_IND(tr_rach_slots_per_interval, ?, ?))) + -> value rx_ud { + var RSL_IE_Body ie; + f_rsl_find_ie(rx_ud.rsl, RSL_IE_RACH_LOAD, ie); + load_access_count := load_access_count + ie.rach_load.access_count; + if (ie.rach_load.busy_count < ie.rach_load.access_count) { + setverdict(fail, "Access count cannot be < Busy count"); + } + repeat; + } + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_RACH_LOAD_IND(?, ?, ?))) -> value rx_ud { + setverdict(fail, "Unexpected RACH LOAD IND: ", rx_ud); + repeat; + } + [] RSL_CCHAN.receive { + repeat; + } + [] T.timeout { } + } + if (load_access_count == 1000) { + setverdict(pass); + } else { + setverdict(fail, "Load reports state ", load_access_count, " RACH, but we sent 1000"); + } + + f_vty_load_ind_thresh(10); + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + + + private function f_main_trxc_connect() runs on test_CT { map(self:BTS_TRXC, system:BTS_TRXC); var Result res; @@ -4636,8 +4762,6 @@ * handover detection * BS Power Control * Physical Context -* CCCH Load Indication for RACH -* SMS Broadcast Req / Cmd / CBCH LOad Ind * RF resource ind * error handling ** IE duplicated? @@ -4664,6 +4788,9 @@ execute( TC_rach_content() ); execute( TC_rach_count() ); execute( TC_rach_max_ta() ); + execute( TC_rach_load_idle_thresh0() ); + execute( TC_rach_load_idle_below_thresh() ); + execute( TC_rach_load_count() ); execute( TC_meas_res_sign_tchf() ); execute( TC_meas_res_sign_tchh() ); execute( TC_meas_res_sign_sdcch4() ); -- To view, visit https://gerrit.osmocom.org/14169 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I6c9dee1d7d3eaa218fdce7ebb8e334858aedb736 Gerrit-Change-Number: 14169 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Eric Wild Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Sat May 25 03:44:01 2019 From: admin at opensuse.org (OBS Notification) Date: Sat, 25 May 2019 03:44:01 +0000 Subject: Build failure of network:osmocom:latest/ulfius in Debian_Unstable/x86_64 In-Reply-To: References: Message-ID: <5ce8ba1dd60be_6249118c60c300471@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/ulfius/Debian_Unstable/x86_64 Package network:osmocom:latest/ulfius failed to build in Debian_Unstable/x86_64 Check out the package for editing: osc checkout network:osmocom:latest ulfius Last lines of build log: [ 113s] 75%: Checks: 4, Failures: 0, Errors: 1 [ 113s] /usr/src/packages/BUILD/test/websocket.c:73:P:test_ulfius_websocket:test_websocket_ulfius_set_websocket_response:0: Passed [ 113s] /usr/src/packages/BUILD/test/websocket.c:89:P:test_ulfius_websocket:test_websocket_ulfius_set_websocket_request:0: Passed [ 113s] /usr/src/packages/BUILD/test/websocket.c:106:P:test_ulfius_websocket:test_websocket_ulfius_open_websocket_client_connection_error:0: Passed [ 113s] /usr/src/packages/BUILD/test/websocket.c:131:E:test_ulfius_websocket:test_websocket_ulfius_websocket_client:0: (after this point) Received signal 11 (Segmentation fault) [ 113s] [ 113s] [ 113s] 75% tests passed, 1 tests failed out of 4 [ 113s] [ 113s] Total Test time (real) = 0.78 sec [ 113s] [ 113s] The following tests FAILED: [ 113s] 4 - websocket (Failed) [ 113s] Errors while running CTest [ 113s] make[1]: *** [Makefile:110: test] Error 8 [ 113s] make[1]: Leaving directory '/usr/src/packages/BUILD/build' [ 113s] dh_auto_test: cd build && make -j6 test ARGS\+=-j6 returned exit code 2 [ 113s] make: *** [debian/rules:9: build] Error 2 [ 113s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 113s] [ 113s] morla5 failed "build ulfius_2.5.2-4.1.dsc" at Sat May 25 03:43:53 UTC 2019. [ 113s] [ 113s] ### VM INTERACTION START ### [ 116s] [ 101.971354] sysrq: SysRq : Power Off [ 116s] [ 101.982435] reboot: Power down [ 116s] ### VM INTERACTION END ### [ 116s] [ 116s] morla5 failed "build ulfius_2.5.2-4.1.dsc" at Sat May 25 03:43:57 UTC 2019. [ 116s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat May 25 03:49:09 2019 From: admin at opensuse.org (OBS Notification) Date: Sat, 25 May 2019 03:49:09 +0000 Subject: Build failure of network:osmocom:latest/osmo-sysmon in Debian_Unstable/x86_64 In-Reply-To: References: Message-ID: <5ce8bb48d45ab_6249118c60c30053f@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sysmon/Debian_Unstable/x86_64 Package network:osmocom:latest/osmo-sysmon failed to build in Debian_Unstable/x86_64 Check out the package for editing: osc checkout network:osmocom:latest osmo-sysmon Last lines of build log: [ 107s] #define VERSION "0.1.0" [ 107s] #define STDC_HEADERS 1 [ 107s] #de[ 94.064329] serial8250: too much work for irq4 [ 107s] fine HAVE_SYS_TYPES_H 1 [ 107s] #define HAVE_SYS_STAT_H 1 [ 107s] #define HAVE_STDLIB_H 1 [ 107s] #define HAVE_STRING_H 1 [ 107s] #define HAVE_MEMORY_H 1 [ 107s] #define HAVE_STRINGS_H 1 [ 107s] #define HAVE_INTTYPES_H 1 [ 107s] #define HAVE_STDINT_H 1 [ 107s] #define HAVE_UNISTD_H 1 [ 107s] #define HAVE_DLFCN_H 1 [ 107s] #define LT_OBJDIR ".libs/" [ 107s] [ 107s] configure: exit 1 [ 107s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/x86_64-linux-gnu --libexecdir=\${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 107s] make: *** [debian/rules:45: build] Error 2 [ 107s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 107s] [ 107s] lamb22 failed "build osmo-sysmon_0.1.0.dsc" at Sat May 25 03:48:51 UTC 2019. [ 107s] [ 107s] ### VM INTERACTION START ### [ 110s] [ 97.198466] sysrq: SysRq : Power Off [ 110s] [ 97.206649] reboot: Power down [ 110s] ### VM INTERACTION END ### [ 110s] [ 110s] lamb22 failed "build osmo-sysmon_0.1.0.dsc" at Sat May 25 03:48:54 UTC 2019. [ 110s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat May 25 03:51:44 2019 From: admin at opensuse.org (OBS Notification) Date: Sat, 25 May 2019 03:51:44 +0000 Subject: Build failure of network:osmocom:latest/openbsc in Debian_Unstable/x86_64 In-Reply-To: References: Message-ID: <5ce8bbdc80834_6249118c60c30087c@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/openbsc/Debian_Unstable/x86_64 Package network:osmocom:latest/openbsc failed to build in Debian_Unstable/x86_64 Check out the package for editing: osc checkout network:osmocom:latest openbsc Last lines of build log: [ 169s] | #define HAVE_MEMORY_H 1 [ 169s] | #define HAVE_STRINGS_H 1 [ 169s] | #define HAVE_INTTYPES_H 1 [ 169s] | #define HAVE_STDINT_H 1 [ 169s] | #define HAVE_UNISTD_H 1 [ 169s] | #define HAVE_DLFCN_H 1 [ 169s] | #define LT_OBJDIR ".libs/" [ 169s] | #define BUILD_SMPP 1 [ 169s] | #define STDC_HEADERS 1 [ 169s] | #define HAVE_DBI_DBD_H 1 [ 169s] | #define HAVE_PCAP_PCAP_H 1 [ 169s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 169s] | [ 169s] | configure: exit 0 [ 169s] [ 169s] make[1]: *** [debian/rules:30: override_dh_auto_test] Error 1 [ 169s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 169s] make: *** [debian/rules:13: build] Error 2 [ 169s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 169s] [ 169s] lamb51 failed "build openbsc_1.2.0.dsc" at Sat May 25 03:51:29 UTC 2019. [ 169s] [ 169s] ### VM INTERACTION START ### [ 173s] [ 159.650943] sysrq: SysRq : Power Off [ 173s] [ 159.657259] reboot: Power down [ 173s] ### VM INTERACTION END ### [ 173s] [ 173s] lamb51 failed "build openbsc_1.2.0.dsc" at Sat May 25 03:51:33 UTC 2019. [ 173s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Sat May 25 03:57:31 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sat, 25 May 2019 03:57:31 +0000 Subject: Change in osmo-pcu[master]: gprs_bssgp_pcu: make gprs_bssgp_ns_cb public Message-ID: lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/14170 Change subject: gprs_bssgp_pcu: make gprs_bssgp_ns_cb public ...................................................................... gprs_bssgp_pcu: make gprs_bssgp_ns_cb public rename the function sgsn_ns_cb -> gprs_bssgp_ns_cb. To allow writing and reading the same configuration, the pcu needs to register all vty commands before reading the configuration. This callback is required to register NS based vty commands Related: OS#4024 Change-Id: I440c0df2e32fe22bf43288c00bb4aa3a0c6a3a51 --- M src/gprs_bssgp_pcu.cpp M src/gprs_bssgp_pcu.h 2 files changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/70/14170/1 diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp index 9d02df6..50f10db 100644 --- a/src/gprs_bssgp_pcu.cpp +++ b/src/gprs_bssgp_pcu.cpp @@ -520,7 +520,7 @@ return 0; } -static int sgsn_ns_cb(enum gprs_ns_evt event, struct gprs_nsvc *nsvc, struct msgb *msg, uint16_t bvci) +int gprs_bssgp_ns_cb(enum gprs_ns_evt event, struct gprs_nsvc *nsvc, struct msgb *msg, uint16_t bvci) { int rc = 0; switch (event) { @@ -913,7 +913,7 @@ the_pcu.bts = bts; - bssgp_nsi = gprs_ns_instantiate(&sgsn_ns_cb, tall_pcu_ctx); + bssgp_nsi = gprs_ns_instantiate(&gprs_bssgp_ns_cb, tall_pcu_ctx); if (!bssgp_nsi) { LOGP(DBSSGP, LOGL_ERROR, "Failed to create NS instance\n"); return NULL; diff --git a/src/gprs_bssgp_pcu.h b/src/gprs_bssgp_pcu.h index e8ae1a9..f98e719 100644 --- a/src/gprs_bssgp_pcu.h +++ b/src/gprs_bssgp_pcu.h @@ -80,6 +80,9 @@ uint16_t nsvci, uint16_t bvci, uint16_t mcc, uint16_t mnc, bool mnc_3_digits, uint16_t lac, uint16_t rac, uint16_t cell_id); +int gprs_bssgp_ns_cb(enum gprs_ns_evt event, struct gprs_nsvc *nsvc, + struct msgb *msg, uint16_t bvci); + void gprs_bssgp_destroy(void); struct bssgp_bvc_ctx *gprs_bssgp_pcu_current_bctx(void); -- To view, visit https://gerrit.osmocom.org/14170 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I440c0df2e32fe22bf43288c00bb4aa3a0c6a3a51 Gerrit-Change-Number: 14170 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 03:57:32 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sat, 25 May 2019 03:57:32 +0000 Subject: Change in osmo-pcu[master]: gprs_bssgp_pcu: explicit allocate & initialize bssgp_nsi instance Message-ID: lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/14171 Change subject: gprs_bssgp_pcu: explicit allocate & initialize bssgp_nsi instance ...................................................................... gprs_bssgp_pcu: explicit allocate & initialize bssgp_nsi instance The instance bssgp_nsi is a global instance to be used by all NS related functions. Previous the PCU allocated and initialized the bssgp_nsi instance when (re-)connecting and freeing on disconnect. The problem of the implicit initialisation is gprs_ns_vty_init(bssgp_nsi). All vty init functions must be called before the configuration is read, otherwise a previous vty written configuration is invalid. Furthermore the vty modifications to the `ns` object were lost when the PCU has to reconnect to the SGSN. Fixes: OS#4024 Change-Id: I2aa53ea54e9352577f6280ad7b9d1d9da9f57eaf --- M src/gprs_bssgp_pcu.cpp M src/pcu_main.cpp M tests/emu/pcu_emu.cpp M tests/tbf/TbfTest.cpp 4 files changed, 50 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/71/14171/1 diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp index 50f10db..b2d9d74 100644 --- a/src/gprs_bssgp_pcu.cpp +++ b/src/gprs_bssgp_pcu.cpp @@ -875,10 +875,7 @@ { struct gprs_nsvc *nsvc2; - if (!bssgp_nsi) { - LOGP(DBSSGP, LOGL_ERROR, "NS instance does not exist\n"); - return -EINVAL; - } + OSMO_ASSERT(bssgp_nsi); if (nsvc != the_pcu.nsvc) { LOGP(DBSSGP, LOGL_ERROR, "NSVC is invalid\n"); @@ -913,12 +910,6 @@ the_pcu.bts = bts; - bssgp_nsi = gprs_ns_instantiate(&gprs_bssgp_ns_cb, tall_pcu_ctx); - if (!bssgp_nsi) { - LOGP(DBSSGP, LOGL_ERROR, "Failed to create NS instance\n"); - return NULL; - } - gprs_ns_vty_init(bssgp_nsi); /* don't specify remote IP/port if SNS dialect is in use; Doing so would * issue a connect() on the socket, which prevents us to dynamically communicate * with any number of IP-SNS endpoints on the SGSN side */ @@ -930,8 +921,7 @@ rc = gprs_ns_nsip_listen(bssgp_nsi); if (rc < 0) { LOGP(DBSSGP, LOGL_ERROR, "Failed to create socket\n"); - gprs_ns_destroy(bssgp_nsi); - bssgp_nsi = NULL; + gprs_ns_close(bssgp_nsi); return NULL; } @@ -945,8 +935,7 @@ the_pcu.nsvc = gprs_ns_nsip_connect(bssgp_nsi, &dest, nsei, nsvci); if (!the_pcu.nsvc) { LOGP(DBSSGP, LOGL_ERROR, "Failed to create NSVCt\n"); - gprs_ns_destroy(bssgp_nsi); - bssgp_nsi = NULL; + gprs_ns_close(bssgp_nsi); return NULL; } @@ -954,8 +943,7 @@ if (!the_pcu.bctx) { LOGP(DBSSGP, LOGL_ERROR, "Failed to create BSSGP context\n"); the_pcu.nsvc = NULL; - gprs_ns_destroy(bssgp_nsi); - bssgp_nsi = NULL; + gprs_ns_close(bssgp_nsi); return NULL; } the_pcu.bctx->ra_id.mcc = spoof_mcc ? : mcc; diff --git a/src/pcu_main.cpp b/src/pcu_main.cpp index 1003e3c..fa075cd 100644 --- a/src/pcu_main.cpp +++ b/src/pcu_main.cpp @@ -33,6 +33,8 @@ #include #include #include +#include "gprs_bssgp_pcu.h" + extern "C" { #include "pcu_vty.h" #include @@ -291,6 +293,13 @@ else fprintf(stderr, "Failed to initialize GSMTAP for %s\n", gsmtap_addr); + bssgp_nsi = gprs_ns_instantiate(&gprs_bssgp_ns_cb, tall_pcu_ctx); + if (!bssgp_nsi) { + LOGP(DBSSGP, LOGL_ERROR, "Failed to create NS instance\n"); + exit(1); + } + gprs_ns_vty_init(bssgp_nsi); + rc = vty_read_config_file(config_file, NULL); if (rc < 0 && config_given) { fprintf(stderr, "Failed to parse the config file: '%s'\n", diff --git a/tests/emu/pcu_emu.cpp b/tests/emu/pcu_emu.cpp index 354a328..e0190bf 100644 --- a/tests/emu/pcu_emu.cpp +++ b/tests/emu/pcu_emu.cpp @@ -113,6 +113,13 @@ msgb_talloc_ctx_init(tall_pcu_ctx, 0); osmo_init_logging2(tall_pcu_ctx, &gprs_log_info); + + bssgp_nsi = gprs_ns_instantiate(&gprs_bssgp_ns_cb, tall_pcu_ctx); + if (!bssgp_nsi) { + LOGP(DBSSGP, LOGL_ERROR, "Failed to create NS instance\n"); + abort(); + } + vty_init(&pcu_vty_info); pcu_vty_init(&gprs_log_info); diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 151e7fa..675cf89 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -447,6 +447,12 @@ printf("=== start %s ===\n", __func__); + bssgp_nsi = gprs_ns_instantiate(&gprs_bssgp_ns_cb, tall_pcu_ctx); + if (!bssgp_nsi) { + LOGP(DBSSGP, LOGL_ERROR, "Failed to create NS instance\n"); + abort(); + } + bts = the_bts.bts_data(); setup_bts(&the_bts, ts_no); gprs_bssgp_create_and_connect(bts, 33001, 0, 33001, 1234, 1234, 1234, 1, 1, false, 0, 0, 0); @@ -485,6 +491,12 @@ uint8_t buf[19]; + bssgp_nsi = gprs_ns_instantiate(&gprs_bssgp_ns_cb, tall_pcu_ctx); + if (!bssgp_nsi) { + LOGP(DBSSGP, LOGL_ERROR, "Failed to create NS instance\n"); + abort(); + } + printf("=== start %s ===\n", __func__); bts = the_bts.bts_data(); @@ -2171,6 +2183,12 @@ printf("=== start %s ===\n", __func__); + bssgp_nsi = gprs_ns_instantiate(&gprs_bssgp_ns_cb, tall_pcu_ctx); + if (!bssgp_nsi) { + LOGP(DBSSGP, LOGL_ERROR, "Failed to create NS instance\n"); + abort(); + } + bts = the_bts.bts_data(); setup_bts(&the_bts, ts_no); @@ -2227,6 +2245,12 @@ printf("=== start %s ===\n", __func__); + bssgp_nsi = gprs_ns_instantiate(&gprs_bssgp_ns_cb, tall_pcu_ctx); + if (!bssgp_nsi) { + LOGP(DBSSGP, LOGL_ERROR, "Failed to create NS instance\n"); + abort(); + } + bts = the_bts.bts_data(); setup_bts(&the_bts, ts_no); @@ -2264,6 +2288,12 @@ printf("=== start %s ===\n", __func__); + bssgp_nsi = gprs_ns_instantiate(&gprs_bssgp_ns_cb, tall_pcu_ctx); + if (!bssgp_nsi) { + LOGP(DBSSGP, LOGL_ERROR, "Failed to create NS instance\n"); + abort(); + } + bts = the_bts.bts_data(); setup_bts(&the_bts, ts_no); -- To view, visit https://gerrit.osmocom.org/14171 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I2aa53ea54e9352577f6280ad7b9d1d9da9f57eaf Gerrit-Change-Number: 14171 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 07:06:57 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 25 May 2019 07:06:57 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add Test for receiving PCUIF_TIME_IND on BTS PCU interface Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14172 Change subject: bts: Add Test for receiving PCUIF_TIME_IND on BTS PCU interface ...................................................................... bts: Add Test for receiving PCUIF_TIME_IND on BTS PCU interface Change-Id: Ib6b99a52790162b0227847d9aec5143cf959e2d0 Related: OS#4023 --- M bts/BTS_Tests.ttcn 1 file changed, 55 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/72/14172/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 27ed81c..a879f75 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -3538,6 +3538,60 @@ setverdict(pass); } +/* test for periodic TIME_IND; check number of FN expired and number of TIME_IND within frames */ +testcase TC_pcu_time_ind() runs on test_CT { + var PCUIF_send_data pcu_sd; + var integer num_time_ind := 0; + var integer first_fn, last_fn; + var float test_duration := 5.0; + timer T; + + f_init_pcu_test(); + f_TC_pcu_act_req(0, 0, 7, true); + + PCU.clear; + T.start(test_duration); + alt { + [] PCU.receive(t_SD_PCUIF(g_pcu_conn_id, tr_PCUIF_TIME_IND(0, ?))) -> value pcu_sd { + num_time_ind := num_time_ind + 1; + if (not isbound(first_fn)) { + first_fn := pcu_sd.data.u.time_ind.fn; + } + last_fn := pcu_sd.data.u.time_ind.fn; + repeat; + } + [] PCU.receive(t_SD_PCUIF(g_pcu_conn_id, tr_PCUIF_TIME_IND(?, ?))) -> value pcu_sd { + setverdict(fail, "Received unexpected PCUIF_TIME_IND: ", pcu_sd.data); + repeat; + } + [] PCU.receive { + repeat; + } + [] T.timeout {} + } + var integer fn_expired := last_fn - first_fn; + log(fn_expired, " fn expired with ", num_time_ind, " PCU_TIME.ind"); + + /* verify the number of frames expired matches our expectation */ + const float c_GSM_FN_DURATION_MS := 4.61538; + var float fn_expected := test_duration * 1000.0 / c_GSM_FN_DURATION_MS; + var template integer t_fn_expected := f_tolerance(float2int(fn_expected), 1, 100000, 10); + if (not match(fn_expired, t_fn_expected)) { + setverdict(fail, "Number of TDMA Frames (", fn_expired, ") not matching ", t_fn_expected); + } + + /* There are three TIME.ind in every fn MOD 13 */ + var float time_ind_expected := int2float(fn_expired) * 3.0 / 13.0; + /* Add some tolerance */ + var template integer t_time_ind_exp := f_tolerance(float2int(time_ind_expected), 1, 100000, 5); + if (not match(num_time_ind, t_time_ind_exp)) { + setverdict(fail, "Number of TIME.ind (", num_time_ind, ") not matching ", t_time_ind_exp); + } + + setverdict(pass); +} + + /*********************************************************************** * Osmocom Style Dynamic Timeslot Support ***********************************************************************/ @@ -4766,7 +4820,6 @@ * error handling ** IE duplicated? * PCU interface -** TIME_IND from BTS->PCU ** DATA_IND from BTS->PCU ** verification of PCU-originated DATA_REQ arrival on Um/MS side @@ -4839,6 +4892,7 @@ execute( TC_pcu_rach_content() ); execute( TC_pcu_ext_rach_content() ); execute( TC_pcu_paging_from_rsl() ); + execute( TC_pcu_time_ind() ); } else { log("PCU socket path not available, skipping PCU tests"); } -- To view, visit https://gerrit.osmocom.org/14172 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ib6b99a52790162b0227847d9aec5143cf959e2d0 Gerrit-Change-Number: 14172 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 08:20:40 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 25 May 2019 08:20:40 +0000 Subject: Change in osmo-bts[master]: Add severity to OML FAILURE EVENT REPORT Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14173 Change subject: Add severity to OML FAILURE EVENT REPORT ...................................................................... Add severity to OML FAILURE EVENT REPORT Example: The fact that the PCU has connected with a given version is not a *failure* in the first place, particularly not a MAJOR one. Let's allow callers of oml_tx_failure_event_rep() specify the serverity of the event that they're reporting to the BSC. Change-Id: I49af04212568892648e0e8704ba1cc6de8c8ae89 --- M include/osmo-bts/oml.h M src/common/bts.c M src/common/bts_ctrl_commands.c M src/common/l1sap.c M src/common/main.c M src/common/oml.c M src/common/pcu_sock.c M src/common/rsl.c M src/osmo-bts-oc2g/calib_file.c 9 files changed, 49 insertions(+), 48 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/73/14173/1 diff --git a/include/osmo-bts/oml.h b/include/osmo-bts/oml.h index 5136058..14da70e 100644 --- a/include/osmo-bts/oml.h +++ b/include/osmo-bts/oml.h @@ -45,7 +45,7 @@ extern const unsigned int oml_default_t200_ms[7]; /* Transmit failure event report */ -int oml_tx_failure_event_rep(const struct gsm_abis_mo *mo, uint16_t cause_value, - const char *fmt, ...); +int oml_tx_failure_event_rep(const struct gsm_abis_mo *mo, enum abis_nm_severity severity, + uint16_t cause_value, const char *fmt, ...); #endif // _OML_H */ diff --git a/src/common/bts.c b/src/common/bts.c index 5220406..97e7a8b 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -340,7 +340,7 @@ else rc = bts_model_trx_deact_rf(trx); if (rc < 0) { - oml_tx_failure_event_rep(&trx->bb_transc.mo, OSMO_EVT_MAJ_RSL_FAIL, + oml_tx_failure_event_rep(&trx->bb_transc.mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_RSL_FAIL, link ? "Failed to establish RSL link (%d)" : "Failed to deactivate RF (%d)", rc); diff --git a/src/common/bts_ctrl_commands.c b/src/common/bts_ctrl_commands.c index 47d8a5d..0d31890 100644 --- a/src/common/bts_ctrl_commands.c +++ b/src/common/bts_ctrl_commands.c @@ -77,7 +77,7 @@ static int set_oml_alert(struct ctrl_cmd *cmd, void *data) { /* Note: we expect signal dispatch to be synchronous */ - oml_tx_failure_event_rep(&g_bts->mo, OSMO_EVT_EXT_ALARM, cmd->value); + oml_tx_failure_event_rep(&g_bts->mo, NM_SEVER_INDETERMINATE, OSMO_EVT_EXT_ALARM, cmd->value); cmd->reply = "OK"; diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 52f2b33..59d5b93 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1358,7 +1358,7 @@ default: LOGP(DL1P, LOGL_NOTICE, "unknown prim %d op %d\n", l1sap->oph.primitive, l1sap->oph.operation); - oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, + oml_tx_failure_event_rep(&trx->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UKWN_MSG, "unknown prim %d op %d", l1sap->oph.primitive, l1sap->oph.operation); diff --git a/src/common/main.c b/src/common/main.c index 0d84c18..25ecd11 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -184,7 +184,7 @@ case SIGTERM: if (!quit) { oml_tx_failure_event_rep(&bts->mo, - OSMO_EVT_CRIT_PROC_STOP, + NM_SEVER_CRITICAL, OSMO_EVT_CRIT_PROC_STOP, "BTS: SIGINT received -> shutdown"); bts_shutdown(bts, "SIGINT"); } diff --git a/src/common/oml.c b/src/common/oml.c index 67eb6d8..d44b395 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -81,8 +81,8 @@ } /* 3GPP TS 12.21 ? 8.8.2 */ -int oml_tx_failure_event_rep(const struct gsm_abis_mo *mo, uint16_t cause_value, - const char *fmt, ...) +int oml_tx_failure_event_rep(const struct gsm_abis_mo *mo, enum abis_nm_severity severity, + uint16_t cause_value, const char *fmt, ...) { struct msgb *nmsg; va_list ap; @@ -558,12 +558,14 @@ rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { - oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UNSUP_ATTR, "Get Attribute parsing failure"); + oml_tx_failure_event_rep(mo, NM_SEVER_MINOR, OSMO_EVT_MAJ_UNSUP_ATTR, + "Get Attribute parsing failure"); return oml_mo_fom_ack_nack(mo, NM_MT_GET_ATTR, NM_NACK_INCORR_STRUCT); } if (!TLVP_PRES_LEN(&tp, NM_ATT_LIST_REQ_ATTR, 1)) { - oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UNSUP_ATTR, "Get Attribute without Attribute List"); + oml_tx_failure_event_rep(mo, NM_SEVER_MINOR, OSMO_EVT_MAJ_UNSUP_ATTR, + "Get Attribute without Attribute List"); return oml_mo_fom_ack_nack(mo, NM_MT_GET_ATTR, NM_NACK_INCORR_STRUCT); } @@ -588,7 +590,7 @@ rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, + oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UNSUP_ATTR, "New value for Attribute not supported"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } @@ -597,7 +599,7 @@ if (TLVP_PRES_LEN(&tp, NM_ATT_BCCH_ARFCN, 2)) { uint16_t arfcn = ntohs(tlvp_val16_unal(&tp, NM_ATT_BCCH_ARFCN)); if (arfcn > 1024) { - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_WARN_SW_WARN, + oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MAJOR, OSMO_EVT_WARN_SW_WARN, "Given ARFCN %u is not supported", arfcn); LOGPFOH(DOML, LOGL_ERROR, foh, "Given ARFCN %u is not supported.\n", arfcn); @@ -606,7 +608,7 @@ } /* 9.4.52 Starting Time */ if (TLVP_PRESENT(&tp, NM_ATT_START_TIME)) { - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, + oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UNSUP_ATTR, "NM_ATT_START_TIME Attribute not " "supported"); return oml_fom_ack_nack(msg, NM_NACK_SPEC_IMPL_NOTSUPP); @@ -756,7 +758,7 @@ rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { - oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UNSUP_ATTR, + oml_tx_failure_event_rep(&trx->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UNSUP_ATTR, "New value for Set Radio Attribute not" " supported"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); @@ -820,10 +822,8 @@ arfcn = ntohs(_value); value += 2; if (arfcn > 1024) { - oml_tx_failure_event_rep(&trx->bts->mo, - OSMO_EVT_WARN_SW_WARN, - "Given ARFCN %u is unsupported", - arfcn); + oml_tx_failure_event_rep(&trx->bts->mo, NM_SEVER_MAJOR, OSMO_EVT_WARN_SW_WARN, + "Given ARFCN %u is unsupported", arfcn); LOGPFOH(DOML, LOGL_NOTICE, foh, "Given ARFCN %u is unsupported.\n", arfcn); return oml_fom_ack_nack(msg, NM_NACK_FREQ_NOTAVAIL); } @@ -926,9 +926,8 @@ rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { - oml_tx_failure_event_rep(&ts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, - "New value for Set Channel Attribute " - "not supported"); + oml_tx_failure_event_rep(&ts->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UNSUP_ATTR, + "New value for Set Channel Attribute not supported"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } @@ -1073,7 +1072,8 @@ trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr); if (trx) mo = &trx->mo; - oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UKWN_MSG, form, foh->obj_inst.bts_nr, + oml_tx_failure_event_rep(mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UKWN_MSG, form, + foh->obj_inst.bts_nr, get_value_string(abis_nm_msgtype_names, foh->msg_type)); return true; @@ -1094,7 +1094,8 @@ trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr); if (trx) mo = &trx->mo; - oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UKWN_MSG, "Formatted O&M message too short"); + oml_tx_failure_event_rep(mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UKWN_MSG, + "Formatted O&M message too short"); return -EIO; } @@ -1149,8 +1150,8 @@ trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr); if (trx) mo = &trx->mo; - oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UKWN_MSG, "unknown Formatted O&M " - "msg_type 0x%02x", foh->msg_type); + oml_tx_failure_event_rep(mo, NM_SEVER_MINOR, OSMO_EVT_MAJ_UKWN_MSG, + "unknown Formatted O&M msg_type 0x%02x", foh->msg_type); ret = oml_fom_ack_nack(msg, NM_NACK_MSGTYPE_INVAL); } @@ -1317,9 +1318,8 @@ mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst); if (!mo) return oml_fom_ack_nack(msg, NM_NACK_OBJINST_UNKN); - oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UNSUP_ATTR, - "New value for IPAC Set Attribute not " - "supported\n"); + oml_tx_failure_event_rep(mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UNSUP_ATTR, + "New value for IPAC Set Attribute not supported\n"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } @@ -1392,13 +1392,13 @@ int ret; if (msgb_l2len(msg) < sizeof(*foh)) { - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UKWN_MSG, + oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UKWN_MSG, "Manufacturer O&M message too short\n"); return -EIO; } if (strncmp((char *)&oh->data[1], abis_nm_ipa_magic, idstrlen)) { - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UKWN_MSG, + oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UKWN_MSG, "Manufacturer OML message != ipaccess not supported\n"); return -EINVAL; } @@ -1437,8 +1437,8 @@ trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr); if (trx) mo = &trx->mo; - oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UKWN_MSG, "unknown Manufacturer O&M " - "msg_type 0x%02x", foh->msg_type); + oml_tx_failure_event_rep(mo, NM_SEVER_MINOR, OSMO_EVT_MAJ_UKWN_MSG, + "unknown Manufacturer O&M msg_type 0x%02x", foh->msg_type); ret = oml_fom_ack_nack(msg, NM_NACK_MSGTYPE_INVAL); } @@ -1452,7 +1452,7 @@ int ret = 0; if (msgb_l2len(msg) < sizeof(*oh)) { - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UKWN_MSG, + oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UKWN_MSG, "OML message too short\n"); msgb_free(msg); return -EIO; @@ -1461,14 +1461,14 @@ /* We don't implement de-segmentation of segmented OML messages */ if (oh->placement != ABIS_OM_PLACEMENT_ONLY || oh->sequence != 0) { - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UKWN_MSG, + oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UKWN_MSG, "Unsupported segmented O&M message\n"); msgb_free(msg); return -EIO; } if (msgb_l3len(msg) < oh->length) { - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UKWN_MSG, + oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UKWN_MSG, "Short OML message: %u < %u\n", msgb_l3len(msg), oh->length); msgb_free(msg); @@ -1478,7 +1478,7 @@ switch (oh->mdisc) { case ABIS_OM_MDISC_FOM: if (msgb_l2len(msg) < sizeof(*oh)) { - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UKWN_MSG, + oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UKWN_MSG, "Formatted O&M message too short\n"); ret = -EIO; break; @@ -1487,7 +1487,7 @@ break; case ABIS_OM_MDISC_MANUF: if (msgb_l2len(msg) < sizeof(*oh)) { - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UKWN_MSG, + oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UKWN_MSG, "Manufacturer O&M message too short\n"); ret = -EIO; break; @@ -1495,7 +1495,7 @@ ret = down_mom(bts, msg); break; default: - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UKWN_MSG, + oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MINOR, OSMO_EVT_MAJ_UKWN_MSG, "unknown O&M msg_disc 0x%02x\n", oh->mdisc); ret = -EINVAL; } diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index 31097ba..a20a7fc 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -595,7 +595,7 @@ case PCU_VERSION: LOGP(DPCU, LOGL_INFO, "OsmoPCU version %s connected\n", txt->text); - oml_tx_failure_event_rep(&bts->gprs.cell.mo, OSMO_EVT_PCU_VERS, txt->text); + oml_tx_failure_event_rep(&bts->gprs.cell.mo, NM_SEVER_MINOR, OSMO_EVT_PCU_VERS, txt->text); osmo_strlcpy(bts->pcu_version, txt->text, MAX_VERSION_LENGTH); if (GSM_BTS_HAS_SI(bts, SYSINFO_TYPE_13)) @@ -604,7 +604,8 @@ LOGP(DPCU, LOGL_INFO, "SI13 is not available on PCU connection\n"); break; case PCU_OML_ALERT: - oml_tx_failure_event_rep(&bts->gprs.cell.mo, OSMO_EVT_EXT_ALARM, txt->text); + oml_tx_failure_event_rep(&bts->gprs.cell.mo, NM_SEVER_INDETERMINATE, OSMO_EVT_EXT_ALARM, + txt->text); break; default: LOGP(DPCU, LOGL_ERROR, "Unknown TXT_IND type %u received\n", @@ -731,7 +732,7 @@ bts = llist_entry(state->net->bts_list.next, struct gsm_bts, list); LOGP(DPCU, LOGL_NOTICE, "PCU socket has LOST connection\n"); - oml_tx_failure_event_rep(&bts->gprs.cell.mo, OSMO_EVT_PCU_VERS, + oml_tx_failure_event_rep(&bts->gprs.cell.mo, NM_SEVER_MAJOR, OSMO_EVT_PCU_VERS, "PCU socket has LOST connection"); bts->pcu_version[0] = '\0'; diff --git a/src/common/rsl.c b/src/common/rsl.c index cc653ce..92575b5 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -471,8 +471,8 @@ if (rc < 0) { /* FIXME: notfiy the BSC on other errors? */ if (rc == -ENOSPC) { - oml_tx_failure_event_rep(&trx->bts->mo, OSMO_EVT_MIN_PAG_TAB_FULL, - "BTS paging table is full"); + oml_tx_failure_event_rep(&trx->bts->mo, NM_SEVER_WARNING, + OSMO_EVT_MIN_PAG_TAB_FULL, "BTS paging table is full"); } } @@ -2013,7 +2013,7 @@ if (!lchan->abis_ip.rtp_socket) { LOGPLCHAN(lchan, DRTP, LOGL_ERROR, "IPAC Failed to create RTP/RTCP sockets\n"); oml_tx_failure_event_rep(&lchan->ts->trx->mo, - OSMO_EVT_CRIT_RTP_TOUT, + NM_SEVER_MINOR, OSMO_EVT_CRIT_RTP_TOUT, "%s IPAC Failed to create RTP/RTCP sockets", gsm_lchan_name(lchan)); return tx_ipac_XXcx_nack(lchan, RSL_ERR_RES_UNAVAIL, @@ -2050,7 +2050,7 @@ if (rc < 0) { LOGPLCHAN(lchan, DRTP, LOGL_ERROR, "IPAC Failed to bind RTP/RTCP sockets\n"); oml_tx_failure_event_rep(&lchan->ts->trx->mo, - OSMO_EVT_CRIT_RTP_TOUT, + NM_SEVER_MINOR, OSMO_EVT_CRIT_RTP_TOUT, "%s IPAC Failed to bind RTP/RTCP sockets", gsm_lchan_name(lchan)); osmo_rtp_socket_free(lchan->abis_ip.rtp_socket); diff --git a/src/osmo-bts-oc2g/calib_file.c b/src/osmo-bts-oc2g/calib_file.c index 72ec266..6d2d561 100644 --- a/src/osmo-bts-oc2g/calib_file.c +++ b/src/osmo-bts-oc2g/calib_file.c @@ -134,7 +134,7 @@ st->fp = fopen(fname, "rb"); if (!st->fp) { LOGP(DL1C, LOGL_FATAL, "Failed to open '%s' for calibration data.\n", fname); - oml_tx_failure_event_rep(&fl1h->phy_inst->trx->mo, OSMO_EVT_WARN_SW_WARN, + oml_tx_failure_event_rep(&fl1h->phy_inst->trx->mo, NM_SEVER_MAJOR, OSMO_EVT_WARN_SW_WARN, "Failed to open '%s' for calibration data", fname); return -1; } @@ -221,7 +221,7 @@ rc = calib_verify(fl1h, desc); if (rc < 0) { LOGP(DL1C, LOGL_FATAL, "Verify L1 calibration table %s -> failed (%d)\n", desc->fname, rc); - oml_tx_failure_event_rep(&fl1h->phy_inst->trx->mo, OSMO_EVT_WARN_SW_WARN, + oml_tx_failure_event_rep(&fl1h->phy_inst->trx->mo, NM_SEVER_MAJOR, OSMO_EVT_WARN_SW_WARN, "Verify L1 calibration table %s -> failed (%d)", desc->fname, rc); st->last_file_idx = get_next_calib_file_idx(fl1h, st->last_file_idx); @@ -278,7 +278,7 @@ if (!calib_path) { LOGP(DL1C, LOGL_FATAL, "Calibration file path not specified\n"); - oml_tx_failure_event_rep(&fl1h->phy_inst->trx->mo, OSMO_EVT_WARN_SW_WARN, + oml_tx_failure_event_rep(&fl1h->phy_inst->trx->mo, NM_SEVER_MAJOR, OSMO_EVT_WARN_SW_WARN, "Calibration file path not specified"); return -1; } -- To view, visit https://gerrit.osmocom.org/14173 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I49af04212568892648e0e8704ba1cc6de8c8ae89 Gerrit-Change-Number: 14173 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 08:23:14 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 25 May 2019 08:23:14 +0000 Subject: Change in osmo-bts[master]: Add severity to OML FAILURE EVENT REPORT In-Reply-To: References: Message-ID: Harald Welte has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/14173 ) Change subject: Add severity to OML FAILURE EVENT REPORT ...................................................................... Add severity to OML FAILURE EVENT REPORT Example: The fact that the PCU has connected with a given version is not a *failure* in the first place, particularly not a MAJOR one. Let's allow callers of oml_tx_failure_event_rep() specify the serverity of the event that they're reporting to the BSC. Change-Id: I49af04212568892648e0e8704ba1cc6de8c8ae89 --- M include/osmo-bts/oml.h M src/common/bts.c M src/common/bts_ctrl_commands.c M src/common/l1sap.c M src/common/main.c M src/common/oml.c M src/common/pcu_sock.c M src/common/rsl.c M src/osmo-bts-oc2g/calib_file.c 9 files changed, 49 insertions(+), 48 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/73/14173/2 -- To view, visit https://gerrit.osmocom.org/14173 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I49af04212568892648e0e8704ba1cc6de8c8ae89 Gerrit-Change-Number: 14173 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-CC: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 08:24:34 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 25 May 2019 08:24:34 +0000 Subject: Change in osmo-bts[master]: Add severity to OML FAILURE EVENT REPORT In-Reply-To: References: Message-ID: Harald Welte has uploaded a new patch set (#3). ( https://gerrit.osmocom.org/14173 ) Change subject: Add severity to OML FAILURE EVENT REPORT ...................................................................... Add severity to OML FAILURE EVENT REPORT Example: The fact that the PCU has connected with a given version is not a *failure* in the first place, particularly not a MAJOR one. Let's allow callers of oml_tx_failure_event_rep() specify the serverity of the event that they're reporting to the BSC. Change-Id: I49af04212568892648e0e8704ba1cc6de8c8ae89 --- M include/osmo-bts/oml.h M src/common/bts.c M src/common/bts_ctrl_commands.c M src/common/l1sap.c M src/common/main.c M src/common/oml.c M src/common/pcu_sock.c M src/common/rsl.c M src/osmo-bts-oc2g/calib_file.c 9 files changed, 50 insertions(+), 49 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/73/14173/3 -- To view, visit https://gerrit.osmocom.org/14173 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I49af04212568892648e0e8704ba1cc6de8c8ae89 Gerrit-Change-Number: 14173 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-CC: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 09:01:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 25 May 2019 09:01:19 +0000 Subject: Change in osmo-bsc[master]: Allow VTY to set the CCCH Load Indication Threshold Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14174 Change subject: Allow VTY to set the CCCH Load Indication Threshold ...................................................................... Allow VTY to set the CCCH Load Indication Threshold Add a new VTY command "ccch load-indication-threshold <0-100>" by which the user can configure the threshold after which the BTS shall send CCCH LOAD IND. It used to be hard-coded to a default value of 10. Change-Id: I059fe4627438e26a06e00d84e342b736ab7af440 --- M include/osmocom/bsc/gsm_data.h M src/osmo-bsc/bsc_vty.c M src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c M src/osmo-bsc/gsm_data.c 4 files changed, 23 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/74/14174/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 82bd238..a464001 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -1115,6 +1115,9 @@ bool ctrl_ack_type_use_block; } gprs; + /* threshold (in percent) when BTS shall send CCCH LOAD IND */ + int ccch_load_ind_thresh; + /* RACH NM values */ int rach_b_thresh; int rach_ldavg_slots; diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index af25cab..9b5cd40 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -848,6 +848,9 @@ vty_out(vty, " channel-descrption bs-ag-blks-res %u%s", bts->si_common.chan_desc.bs_ag_blks_res, VTY_NEWLINE); + if (bts->ccch_load_ind_thresh != 10) + vty_out(vty, " ccch load-indication-threshold %u%s", + bts->ccch_load_ind_thresh, VTY_NEWLINE); if (bts->rach_b_thresh != -1) vty_out(vty, " rach nm busy threshold %u%s", bts->rach_b_thresh, VTY_NEWLINE); @@ -2434,6 +2437,20 @@ return CMD_SUCCESS; } +#define CCCH_STR "Common Control Channel\n" + +DEFUN(cfg_bts_ccch_load_ind_thresh, + cfg_bts_ccch_load_ind_thresh_cmd, + "ccch load-indication-threshold <0-100>", + CCCH_STR + "Percentage of CCCH load at which BTS sends RSL CCCH LOAD IND\n" + "CCCH Load Threshold in percent") +{ + struct gsm_bts *bts = vty->index; + bts->ccch_load_ind_thresh = atoi(argv[0]); + return CMD_SUCCESS; +} + #define NM_STR "Network Management\n" DEFUN(cfg_bts_rach_nm_b_thresh, @@ -5233,6 +5250,7 @@ install_element(BTS_NODE, &cfg_bts_chan_desc_att_cmd); install_element(BTS_NODE, &cfg_bts_chan_desc_bs_pa_mfrms_cmd); install_element(BTS_NODE, &cfg_bts_chan_desc_bs_ag_blks_res_cmd); + install_element(BTS_NODE, &cfg_bts_ccch_load_ind_thresh_cmd); install_element(BTS_NODE, &cfg_bts_rach_nm_b_thresh_cmd); install_element(BTS_NODE, &cfg_bts_rach_nm_ldavg_cmd); install_element(BTS_NODE, &cfg_bts_cell_barred_cmd); diff --git a/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c b/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c index 8a370da..be823ae 100644 --- a/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c +++ b/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c @@ -60,7 +60,7 @@ msgb_tv_fixed_put(msgb, NM_ATT_OVERL_PERIOD, 3, buf); /* percent */ - msgb_tv_put(msgb, NM_ATT_CCCH_L_T, 10); + msgb_tv_put(msgb, NM_ATT_CCCH_L_T, bts->ccch_load_ind_thresh); /* seconds */ msgb_tv_put(msgb, NM_ATT_CCCH_L_I_P, 1); diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index 5942fba..ea33817 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -827,6 +827,7 @@ } bts->c0->ts[0].pchan_from_config = GSM_PCHAN_CCCH_SDCCH4; /* TODO: really?? */ + bts->ccch_load_ind_thresh = 10; /* 10% of Load: Start sending CCCH LOAD IND */ bts->rach_b_thresh = -1; bts->rach_ldavg_slots = -1; -- To view, visit https://gerrit.osmocom.org/14174 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I059fe4627438e26a06e00d84e342b736ab7af440 Gerrit-Change-Number: 14174 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 09:01:20 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 25 May 2019 09:01:20 +0000 Subject: Change in osmo-bsc[master]: rx_fail_evt_rep(): Don't recycle variable Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14175 Change subject: rx_fail_evt_rep(): Don't recycle variable ...................................................................... rx_fail_evt_rep(): Don't recycle variable the 'p_val' variable should represent he 'probabl cause value' and nothing else. Let's use other local variables for other things. Change-Id: Ie79279fc1d42cd57e7478820493b250fe38c2f4f --- M src/osmo-bsc/abis_nm.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/75/14175/1 diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c index 240517b..bff6c12 100644 --- a/src/osmo-bsc/abis_nm.c +++ b/src/osmo-bsc/abis_nm.c @@ -368,8 +368,8 @@ oh->length-sizeof(*foh)); if (TLVP_PRESENT(&tp, NM_ATT_ADD_TEXT)) { - p_val = TLVP_VAL(&tp, NM_ATT_ADD_TEXT); - p_text = talloc_strndup(tall_bsc_ctx, (const char *) p_val, + const uint8_t *val = TLVP_VAL(&tp, NM_ATT_ADD_TEXT); + p_text = talloc_strndup(tall_bsc_ctx, (const char *) val, TLVP_LEN(&tp, NM_ATT_ADD_TEXT)); } -- To view, visit https://gerrit.osmocom.org/14175 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ie79279fc1d42cd57e7478820493b250fe38c2f4f Gerrit-Change-Number: 14175 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 09:01:21 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 25 May 2019 09:01:21 +0000 Subject: Change in osmo-bsc[master]: Introduce nm_fail_rep_signal_data for "SS_NM, S_NM_FAIL_REP" signal Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14176 Change subject: Introduce nm_fail_rep_signal_data for "SS_NM, S_NM_FAIL_REP" signal ...................................................................... Introduce nm_fail_rep_signal_data for "SS_NM, S_NM_FAIL_REP" signal Let's not just pass around the raw msgb, but also all other metadata, such as the decoded parts of the TS 12.21 message. As there's no current consumer of that signal, this creates no compatibility issues. Change-Id: I5d4d9d422b4e23348ffbe69c6e87a31d5574f90d --- M include/osmocom/bsc/signal.h M src/osmo-bsc/abis_nm.c 2 files changed, 33 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/76/14176/1 diff --git a/include/osmocom/bsc/signal.h b/include/osmocom/bsc/signal.h index 62a3d2c..10200d7 100644 --- a/include/osmocom/bsc/signal.h +++ b/include/osmocom/bsc/signal.h @@ -149,6 +149,20 @@ uint8_t mt; }; +struct nm_fail_rep_signal_data { + struct gsm_bts *bts; + /* raw data */ + struct msgb *msg; + struct tlv_parsed *tp; + /* parsed data */ + struct { + const char *event_type; + const char *severity; + const char *additional_text; + const uint8_t *probable_cause; + } parsed; +}; + struct challoc_signal_data { struct gsm_bts *bts; struct gsm_lchan *lchan; diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c index bff6c12..da41c70 100644 --- a/src/osmo-bsc/abis_nm.c +++ b/src/osmo-bsc/abis_nm.c @@ -358,6 +358,7 @@ struct abis_om_hdr *oh = msgb_l2(mb); struct abis_om_fom_hdr *foh = msgb_l3(mb); struct e1inp_sign_link *sign_link = mb->dst; + struct nm_fail_rep_signal_data sd; struct tlv_parsed tp; int rc = 0; const uint8_t *p_val = NULL; @@ -398,6 +399,24 @@ rc = -EINVAL; } + sd.bts = mb->trx->bts; + sd.msg = mb; + sd.tp = &tp; + if (e_type) + sd.parsed.event_type = e_type; + else + sd.parsed.event_type = ""; + if (severity) + sd.parsed.severity = severity; + else + sd.parsed.severity = ""; + if (p_text) + sd.parsed.additional_text = p_text; + else + sd.parsed.additional_text = ""; + sd.parsed.probable_cause = p_val; + osmo_signal_dispatch(SS_NM, S_NM_FAIL_REP, &sd); + if (p_text) talloc_free(p_text); @@ -419,7 +438,6 @@ break; case NM_MT_FAILURE_EVENT_REP: rx_fail_evt_rep(mb, bts); - osmo_signal_dispatch(SS_NM, S_NM_FAIL_REP, mb); break; case NM_MT_TEST_REP: DEBUGPFOH(DNM, foh, "Test Report\n"); -- To view, visit https://gerrit.osmocom.org/14176 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I5d4d9d422b4e23348ffbe69c6e87a31d5574f90d Gerrit-Change-Number: 14176 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 09:01:21 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 25 May 2019 09:01:21 +0000 Subject: Change in osmo-bsc[master]: [WIP] ctrl: Send TRAP in case of OML FAIL EVT REP Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14177 Change subject: [WIP] ctrl: Send TRAP in case of OML FAIL EVT REP ...................................................................... [WIP] ctrl: Send TRAP in case of OML FAIL EVT REP A BTS sending a FAILURE EVENT REPORT is certainly something that we'd want to make external listeners aware of. Change-Id: I4f8a9737c6ef1b951ea8e742cdbd3689371a99d5 --- M src/osmo-bsc/abis_nm.c M src/osmo-bsc/osmo_bsc_ctrl.c 2 files changed, 36 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/77/14177/1 diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c index da41c70..a53b82b 100644 --- a/src/osmo-bsc/abis_nm.c +++ b/src/osmo-bsc/abis_nm.c @@ -399,7 +399,8 @@ rc = -EINVAL; } - sd.bts = mb->trx->bts; + memset(&sd, 0, sizeof(sd)); + sd.bts = sign_link->trx->bts; sd.msg = mb; sd.tp = &tp; if (e_type) diff --git a/src/osmo-bsc/osmo_bsc_ctrl.c b/src/osmo-bsc/osmo_bsc_ctrl.c index 80699f8..bc359bb 100644 --- a/src/osmo-bsc/osmo_bsc_ctrl.c +++ b/src/osmo-bsc/osmo_bsc_ctrl.c @@ -734,6 +734,37 @@ return 0; } +static int nm_signal_handler(unsigned int subsys, unsigned int signal, + void *handler_data, void *signal_data) +{ + struct nm_fail_rep_signal_data *sd; + struct gsm_network *net; + struct ctrl_cmd *cmd; + + if (subsys != SS_NM) + return 0; + if (signal != S_NM_FAIL_REP) + return 0; + + sd = signal_data; + net = sd->bts->network; + + cmd = ctrl_cmd_create(tall_bsc_ctx, CTRL_TYPE_TRAP); + if (!cmd) { + LOGP(DCTRL, LOGL_ERROR, "Trap creation failed.\n"); + return 0; + } + + cmd->id = "0"; + cmd->variable = talloc_asprintf(cmd, "bts.%d.oml_failure_report", sd->bts->nr); + cmd->reply = talloc_asprintf(cmd, "\"%s\",\"%s\",\"%s\"", sd->parsed.event_type, + sd->parsed.severity, sd->parsed.additional_text); + + ctrl_cmd_send_to_all(net->ctrl, cmd); + + return 0; +} + int bsc_ctrl_cmds_install(struct gsm_network *net) { int rc; @@ -759,6 +790,9 @@ rc = osmo_signal_register_handler(SS_MSC, msc_signal_handler, NULL); if (rc) goto end; + rc = osmo_signal_register_handler(SS_NM, nm_signal_handler, NULL); + if (rc) + goto end; rc = ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_bts_connection_status); if (rc) goto end; -- To view, visit https://gerrit.osmocom.org/14177 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I4f8a9737c6ef1b951ea8e742cdbd3689371a99d5 Gerrit-Change-Number: 14177 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 09:05:22 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 25 May 2019 09:05:22 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Add TC_pcu_oml_alert() for testing PCU-originated OML alerts Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14178 Change subject: Add TC_pcu_oml_alert() for testing PCU-originated OML alerts ...................................................................... Add TC_pcu_oml_alert() for testing PCU-originated OML alerts As we don't yet speak OML directly from the TTCN3 test suite, this requires a currently "RFC/WIP" state patch turning OML Failure Event Reports into CTRL TRAP on the BSC, see https://gerrit.osmocom.org/#/c/osmo-bsc/+/14177 Change-Id: I6c7641b37b6ee2177d43127140cc0b625409379c Depends: osmo-bsc I4f8a9737c6ef1b951ea8e742cdbd3689371a99d5 Related: OS#4023 --- M bts/BTS_Tests.ttcn 1 file changed, 29 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/78/14178/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index a879f75..c89eeb1 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -57,6 +57,8 @@ charstring mp_pcu_socket := PCU_SOCK_DEFAULT; charstring mp_ctrl_ip := "127.0.0.1"; integer mp_ctrl_port := 4238; + charstring mp_bsc_ctrl_ip := "127.0.0.1"; + integer mp_bsc_ctrl_port := 4249; integer mp_tolerance_rxqual := 1; integer mp_tolerance_rxlev := 3; integer mp_tolerance_timing_offset_256syms := 0; @@ -3131,6 +3133,7 @@ * PCU Socket related tests ***********************************************************************/ +/* Verify no RTS before ACT_REQ; verify RTS after ACT_REQ */ private function f_TC_pcu_act_req(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr, boolean exp_success) runs on test_CT { timer T := 3.0; @@ -3171,6 +3174,7 @@ } } +/* verify no more RTS after DEACT_REQ */ private function f_TC_pcu_deact_req(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr) runs on test_CT { timer T := 3.0; @@ -3591,6 +3595,30 @@ setverdict(pass); } +/* test for generating Abis side OML ALERT from the PCU */ +testcase TC_pcu_oml_alert() runs on test_CT { + var PCUIF_send_data pcu_sd; + var integer num_time_ind := 0; + var integer first_fn, last_fn; + var float test_duration := 5.0; + timer T; + + f_init_pcu_test(); + f_TC_pcu_act_req(0, 0, 7, true); + + /* re-connect CTRL port from BTS to BSC */ + f_ipa_ctrl_stop(); + f_ipa_ctrl_start(mp_bsc_ctrl_ip, mp_bsc_ctrl_port); + + /* Send that OML Alert */ + PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_OML_ALERT, testcasename()))); + + /* This requires https://gerrit.osmocom.org/#/c/osmo-bsc/+/14177 to be merged */ + f_ctrl_exp_trap(IPA_CTRL, "bts.0.oml_failure_report", ?); + setverdict(pass); +} + + /*********************************************************************** * Osmocom Style Dynamic Timeslot Support @@ -4893,6 +4921,7 @@ execute( TC_pcu_ext_rach_content() ); execute( TC_pcu_paging_from_rsl() ); execute( TC_pcu_time_ind() ); + execute( TC_pcu_oml_alert() ); } else { log("PCU socket path not available, skipping PCU tests"); } -- To view, visit https://gerrit.osmocom.org/14178 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I6c7641b37b6ee2177d43127140cc0b625409379c Gerrit-Change-Number: 14178 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 09:08:35 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 25 May 2019 09:08:35 +0000 Subject: Change in osmo-pcu[master]: gprs_bssgp_pcu: make gprs_bssgp_ns_cb public In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14170 ) Change subject: gprs_bssgp_pcu: make gprs_bssgp_ns_cb public ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14170 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I440c0df2e32fe22bf43288c00bb4aa3a0c6a3a51 Gerrit-Change-Number: 14170 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sat, 25 May 2019 09:08:35 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 09:09:26 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 25 May 2019 09:09:26 +0000 Subject: Change in osmo-pcu[master]: gprs_bssgp_pcu: explicit allocate & initialize bssgp_nsi instance In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14171 ) Change subject: gprs_bssgp_pcu: explicit allocate & initialize bssgp_nsi instance ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14171 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2aa53ea54e9352577f6280ad7b9d1d9da9f57eaf Gerrit-Change-Number: 14171 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sat, 25 May 2019 09:09:26 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 10:28:53 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 25 May 2019 10:28:53 +0000 Subject: Change in osmo-bts[master]: common/rsl.c: fix NULL-pointer dereference in rsl_rx_rll() Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14179 Change subject: common/rsl.c: fix NULL-pointer dereference in rsl_rx_rll() ...................................................................... common/rsl.c: fix NULL-pointer dereference in rsl_rx_rll() Change-Id: I07e39e69a42dd09841f5d03608ec0d0b2345139a Fixes: CID#198663 Null pointer dereferences --- M src/common/rsl.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/79/14179/1 diff --git a/src/common/rsl.c b/src/common/rsl.c index cc653ce..5a12820 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -2608,8 +2608,8 @@ lchan = lchan_lookup(trx, rh->chan_nr, "RSL rx RLL: "); if (!lchan) { - LOGPLCHAN(lchan, DRLL, LOGL_NOTICE, "Rx RLL %s for unknown lchan\n", - rsl_msg_name(rh->c.msg_type)); + LOGP(DRLL, LOGL_NOTICE, "Rx RLL %s for unknown lchan\n", + rsl_msg_name(rh->c.msg_type)); return rsl_reject_unknown_lchan(msg); } -- To view, visit https://gerrit.osmocom.org/14179 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I07e39e69a42dd09841f5d03608ec0d0b2345139a Gerrit-Change-Number: 14179 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 10:42:37 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 25 May 2019 10:42:37 +0000 Subject: Change in osmo-trx[master]: lms: Fix stream_stats checks with droppedPackets In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14166 ) Change subject: lms: Fix stream_stats checks with droppedPackets ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14166 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id93d33400e11360b9536f56a31904328549cfbbf Gerrit-Change-Number: 14166 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sat, 25 May 2019 10:42:37 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 11:03:16 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 25 May 2019 11:03:16 +0000 Subject: Change in osmo-trx[master]: Add rate_ctr support to store/retrieve SDR errors through VTY In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14167 ) Change subject: Add rate_ctr support to store/retrieve SDR errors through VTY ...................................................................... Patch Set 1: (5 comments) Mostly cosmetic comments, not merge blockers. https://gerrit.osmocom.org/#/c/14167/1/CommonLibs/osmo_signal.h File CommonLibs/osmo_signal.h: https://gerrit.osmocom.org/#/c/14167/1/CommonLibs/osmo_signal.h at 30 PS1, Line 30: SS_DEVICE cosmetic: missing comma. https://gerrit.osmocom.org/#/c/14167/1/CommonLibs/osmo_signal.h at 49 PS1, Line 49: uint32_t Do we really need fixed-size types for that? Why not generic unsigned int? https://gerrit.osmocom.org/#/c/14167/1/CommonLibs/trx_rate_ctr.cpp File CommonLibs/trx_rate_ctr.cpp: https://gerrit.osmocom.org/#/c/14167/1/CommonLibs/trx_rate_ctr.cpp at 69 PS1, Line 69: (uint32_t)-1 As far as I understand, it's UINT32_MAX, right? https://gerrit.osmocom.org/#/c/14167/1/CommonLibs/trx_rate_ctr.cpp at 163 PS1, Line 163: size_t i; New line is missing here. Alternatively we can declare this counter in the 'for' loop statement, as it is not used anywhere else: for (size_t i = 0, ...) AFAIR, it's allowed in C++. https://gerrit.osmocom.org/#/c/14167/1/Transceiver52M/device/lms/LMSDevice.cpp File Transceiver52M/device/lms/LMSDevice.cpp: https://gerrit.osmocom.org/#/c/14167/1/Transceiver52M/device/lms/LMSDevice.cpp at 594 PS1, Line 594: cosmetic: ws -- To view, visit https://gerrit.osmocom.org/14167 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I78b158141697e5714d04db8b9ccc96f31f34f439 Gerrit-Change-Number: 14167 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Sat, 25 May 2019 11:03:16 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 11:12:06 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 25 May 2019 11:12:06 +0000 Subject: Change in osmo-trx[master]: Add rate_ctr support to store/retrieve SDR errors through VTY In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14167 ) Change subject: Add rate_ctr support to store/retrieve SDR errors through VTY ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/14167/1/CommonLibs/trx_rate_ctr.cpp File CommonLibs/trx_rate_ctr.cpp: https://gerrit.osmocom.org/#/c/14167/1/CommonLibs/trx_rate_ctr.cpp at 75 PS1, Line 75: Mutex I think we can mark it as 'static'. Other non-static symbols above also don't seem to be exported, so we can 'hide' then too. -- To view, visit https://gerrit.osmocom.org/14167 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I78b158141697e5714d04db8b9ccc96f31f34f439 Gerrit-Change-Number: 14167 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Sat, 25 May 2019 11:12:06 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 11:19:10 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 25 May 2019 11:19:10 +0000 Subject: Change in osmo-pcu[master]: gprs_bssgp_pcu: explicit allocate & initialize bssgp_nsi instance In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14171 ) Change subject: gprs_bssgp_pcu: explicit allocate & initialize bssgp_nsi instance ...................................................................... Patch Set 1: Code-Review+2 (1 comment) Finally! Thanks a lot for looking into this! A few days ago I faced this bug, when you can 'write' the VTY configuration, but then reading fails. https://gerrit.osmocom.org/#/c/14171/1/src/gprs_bssgp_pcu.cpp File src/gprs_bssgp_pcu.cpp: https://gerrit.osmocom.org/#/c/14171/1/src/gprs_bssgp_pcu.cpp at 906 PS1, Line 906: Makes sense to OSMO_ASSERT(!bssgp_nsi) here. -- To view, visit https://gerrit.osmocom.org/14171 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2aa53ea54e9352577f6280ad7b9d1d9da9f57eaf Gerrit-Change-Number: 14171 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sat, 25 May 2019 11:19:10 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 11:20:13 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 25 May 2019 11:20:13 +0000 Subject: Change in osmo-pcu[master]: gprs_bssgp_pcu: make gprs_bssgp_ns_cb public In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14170 ) Change subject: gprs_bssgp_pcu: make gprs_bssgp_ns_cb public ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14170 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I440c0df2e32fe22bf43288c00bb4aa3a0c6a3a51 Gerrit-Change-Number: 14170 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sat, 25 May 2019 11:20:13 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 11:20:19 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 25 May 2019 11:20:19 +0000 Subject: Change in osmo-pcu[master]: gprs_bssgp_pcu: make gprs_bssgp_ns_cb public In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14170 ) Change subject: gprs_bssgp_pcu: make gprs_bssgp_ns_cb public ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14170 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I440c0df2e32fe22bf43288c00bb4aa3a0c6a3a51 Gerrit-Change-Number: 14170 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sat, 25 May 2019 11:20:19 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 11:40:12 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 25 May 2019 11:40:12 +0000 Subject: Change in osmo-bts[master]: Add severity to OML FAILURE EVENT REPORT In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14173 ) Change subject: Add severity to OML FAILURE EVENT REPORT ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14173 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I49af04212568892648e0e8704ba1cc6de8c8ae89 Gerrit-Change-Number: 14173 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sat, 25 May 2019 11:40:12 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 11:43:36 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 25 May 2019 11:43:36 +0000 Subject: Change in osmo-bsc[master]: Allow VTY to set the CCCH Load Indication Threshold In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14174 ) Change subject: Allow VTY to set the CCCH Load Indication Threshold ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/14174/1/src/osmo-bsc/bsc_vty.c File src/osmo-bsc/bsc_vty.c: https://gerrit.osmocom.org/#/c/14174/1/src/osmo-bsc/bsc_vty.c at 2447 PS1, Line 2447: " Would be great to indicate '(default 10)' here. -- To view, visit https://gerrit.osmocom.org/14174 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I059fe4627438e26a06e00d84e342b736ab7af440 Gerrit-Change-Number: 14174 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sat, 25 May 2019 11:43:36 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 12:23:12 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 25 May 2019 12:23:12 +0000 Subject: Change in osmo-hlr[master]: src/db.h: use GSM23003_MSISDN_MAX_DIGITS for MSISDN buffer size Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14180 Change subject: src/db.h: use GSM23003_MSISDN_MAX_DIGITS for MSISDN buffer size ...................................................................... src/db.h: use GSM23003_MSISDN_MAX_DIGITS for MSISDN buffer size Change-Id: I253e6a04a77c29f62d3c696515d115f8a829283b Depends on: Idc74f4d94ad44b9fc1b6d43178f5f33d551ebfb1 --- M src/db.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/80/14180/1 diff --git a/src/db.h b/src/db.h index 12e74f8..6e4bf49 100644 --- a/src/db.h +++ b/src/db.h @@ -73,7 +73,7 @@ int64_t id; char imsi[GSM23003_IMSI_MAX_DIGITS+1]; - char msisdn[GT_MAX_DIGITS+1]; + char msisdn[GSM23003_MSISDN_MAX_DIGITS+1]; /* imeisv? */ char imei[GSM23003_IMEI_NUM_DIGITS+1]; char vlr_number[32]; -- To view, visit https://gerrit.osmocom.org/14180 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I253e6a04a77c29f62d3c696515d115f8a829283b Gerrit-Change-Number: 14180 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 12:23:12 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 25 May 2019 12:23:12 +0000 Subject: Change in osmo-hlr[master]: src/hlr.c: fix deprecation warning: use gsm48_decode_bcd_number2() Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14181 Change subject: src/hlr.c: fix deprecation warning: use gsm48_decode_bcd_number2() ...................................................................... src/hlr.c: fix deprecation warning: use gsm48_decode_bcd_number2() Change-Id: I84fc1a0a6a334805b5dc1cef994f70b01a5ffcd4 --- M src/hlr.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/81/14181/1 diff --git a/src/hlr.c b/src/hlr.c index 694ba14..33d2828 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -487,7 +487,7 @@ } /* Decode IMEI */ - if (gsm48_decode_bcd_number(imei, sizeof(imei), gsup->imei_enc, 0) < 0) { + if (gsm48_decode_bcd_number2(imei, sizeof(imei), gsup->imei_enc, gsup->imei_enc_len, 0) < 0) { LOGP(DMAIN, LOGL_ERROR, "%s: failed to decode IMEI\n", gsup->imsi); gsup_send_err_reply(conn, gsup->imsi, gsup->message_type, GMM_CAUSE_INV_MAND_INFO); return -1; -- To view, visit https://gerrit.osmocom.org/14181 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I84fc1a0a6a334805b5dc1cef994f70b01a5ffcd4 Gerrit-Change-Number: 14181 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 12:58:36 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 25 May 2019 12:58:36 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_pcu_rts_req() to verify PCUIF_RTS_REQ Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14182 Change subject: bts: Add TC_pcu_rts_req() to verify PCUIF_RTS_REQ ...................................................................... bts: Add TC_pcu_rts_req() to verify PCUIF_RTS_REQ This new test verifies that the expected amount of PCUIF_RTS_REQ are observed on the PCU Interface for both PTCCH and PDTCH. Change-Id: Ic27cdd4f4adf11f871b84bd72692a03280274fe2 Related: OS#4023 --- M bts/BTS_Tests.ttcn 1 file changed, 74 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/82/14182/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index c89eeb1..12e1a3a 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -3595,6 +3595,79 @@ setverdict(pass); } +/* test for periodic RTS_REQ; check number of FN expired and number of RTS_IND per SAPI */ +testcase TC_pcu_rts_req() runs on test_CT { + var PCUIF_send_data pcu_sd; + var integer first_fn, last_fn; + var integer num_rts_pdtch := 0; + var integer num_rts_ptcch := 0; + var float test_duration := 5.0; + timer T; + + f_init_pcu_test(); + f_TC_pcu_act_req(0, 0, 7, true); + + PCU.clear; + T.start(test_duration); + alt { + [] PCU.receive(t_SD_PCUIF(g_pcu_conn_id, tr_PCUIF_RTS_REQ(0, 0, 7, PCU_IF_SAPI_PDTCH, ?, ?))) + -> value pcu_sd { + num_rts_pdtch := num_rts_pdtch + 1; + if (not isbound(first_fn)) { + first_fn := pcu_sd.data.u.rts_req.fn; + } + last_fn := pcu_sd.data.u.rts_req.fn; + repeat; + } + [] PCU.receive(t_SD_PCUIF(g_pcu_conn_id, tr_PCUIF_RTS_REQ(0, 0, 7, PCU_IF_SAPI_PTCCH, ?, ?))) + -> value pcu_sd { + num_rts_ptcch := num_rts_ptcch + 1; + if (not isbound(first_fn)) { + first_fn := pcu_sd.data.u.rts_req.fn; + } + last_fn := pcu_sd.data.u.rts_req.fn; + repeat; + } + [] PCU.receive(t_SD_PCUIF(g_pcu_conn_id, tr_PCUIF_RTS_REQ)) -> value pcu_sd { + setverdict(fail, "Received unexpected PCUIF_RTS_REQ: ", pcu_sd.data); + repeat; + } + [] PCU.receive { + repeat; + } + [] T.timeout {} + } + var integer fn_expired := last_fn - first_fn; + log(fn_expired, " fn expired with num_rts_pdtch=", num_rts_pdtch, + ", num_rts_ptcch=", num_rts_ptcch); + + /* verify the number of frames expired matches our expectation */ + const float c_GSM_FN_DURATION_MS := 4.61538; + var float fn_expected := test_duration * 1000.0 / c_GSM_FN_DURATION_MS; + var template integer t_fn_expected := f_tolerance(float2int(fn_expected), 1, 100000, 10); + if (not match(fn_expired, t_fn_expected)) { + setverdict(fail, "Number of TDMA Frames (", fn_expired, ") not matching ", t_fn_expected); + } + + /* PTCCH is in pos. 12 + 38 of 52-multiframe, but four slots/bursts required per block */ + var float ptcch_expected := int2float(fn_expired) / 52.0 * 0.5; + var template integer t_ptcch_exp := f_tolerance(float2int(ptcch_expected), 1, 100000, 1); + if (not match(num_rts_ptcch, t_ptcch_exp)) { + setverdict(fail, "Number of RTS.ind for PTCCH (", num_rts_ptcch, ") not matching ", + t_ptcch_exp); + } + + /* We have 12 PDTCH blocks every 52-multiframe */ + var float pdtch_expected := int2float(fn_expired) / 52.0 * 12.0; + var template integer t_pdtch_exp := f_tolerance(float2int(pdtch_expected), 1, 100000, 2); + if (not match(num_rts_pdtch, t_pdtch_exp)) { + setverdict(fail, "Number of RTS.ind for PDTCH (", num_rts_pdtch, ") not matching ", + t_pdtch_exp); + } + + setverdict(pass); +} + /* test for generating Abis side OML ALERT from the PCU */ testcase TC_pcu_oml_alert() runs on test_CT { var PCUIF_send_data pcu_sd; @@ -4921,6 +4994,7 @@ execute( TC_pcu_ext_rach_content() ); execute( TC_pcu_paging_from_rsl() ); execute( TC_pcu_time_ind() ); + execute( TC_pcu_rts_req() ); execute( TC_pcu_oml_alert() ); } else { log("PCU socket path not available, skipping PCU tests"); -- To view, visit https://gerrit.osmocom.org/14182 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ic27cdd4f4adf11f871b84bd72692a03280274fe2 Gerrit-Change-Number: 14182 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 15:33:58 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 25 May 2019 15:33:58 +0000 Subject: Change in osmo-ttcn3-hacks[master]: PCU: Fully implement TC_pcu_data_req_{pdtch, ptcch} Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14183 Change subject: PCU: Fully implement TC_pcu_data_req_{pdtch,ptcch} ...................................................................... PCU: Fully implement TC_pcu_data_req_{pdtch,ptcch} As trxcon+fake_trx don't have GPRS (TBF) support yet, we cannot do any PCU related tests involving the Um interface yet. Instead, let's use virtphy to fill that gap. Using virtphy, we can actually receive/transmit GPRS blocks on the simulated Um interface. TC_pcu_data_req_{pdtch,ptcch} are moved to a new test suite "BTS_Tests_virtphy.ttcn" which should symbolize that the related tests are to be executed with osmo-bts-virtual + virtphy instead of osmo-bts-trx + fake_trx + trxcon. You also have to set the following module parameter to make this work: BTS_Tests.mp_bts_trxc_port := -1 Change-Id: I677f660b1076148b3317b08b06eb3d6551d9b577 --- M bts/BTS_Tests.ttcn A bts/BTS_Tests_virtphy.ttcn 2 files changed, 126 insertions(+), 26 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/83/14183/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 12e1a3a..a555a83 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -36,6 +36,7 @@ import from TELNETasp_PortType all; friend module BTS_Tests_SMSCB; +friend module BTS_Tests_virtphy; /* The tests assume a BTS with the following timeslot configuration: * TS0 : Combined CCCH + SDCCH/4 @@ -3134,7 +3135,7 @@ ***********************************************************************/ /* Verify no RTS before ACT_REQ; verify RTS after ACT_REQ */ -private function f_TC_pcu_act_req(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr, boolean exp_success) +friend function f_TC_pcu_act_req(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr, boolean exp_success) runs on test_CT { timer T := 3.0; @@ -3175,7 +3176,7 @@ } /* verify no more RTS after DEACT_REQ */ -private function f_TC_pcu_deact_req(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr) +friend function f_TC_pcu_deact_req(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr) runs on test_CT { timer T := 3.0; @@ -3196,7 +3197,7 @@ } } -private function f_init_pcu_test() runs on test_CT { +friend function f_init_pcu_test() runs on test_CT { f_init(); PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_VERSION, testcasename()))); } @@ -3276,7 +3277,7 @@ private const octetstring c_PCU_DATA := '000102030405060708090a0b0c0d0e0f10111213141516'O; /* helper function to send a PCU DATA.req */ -private function f_pcu_data_req(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr, +friend function f_pcu_data_req(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr, uint8_t block_nr, uint32_t fn, PCUIF_Sapi sapi, octetstring data) runs on test_CT { @@ -3285,8 +3286,8 @@ } /* helper function to wait for RTS.ind for given SAPI on given BTS/TRX/TS and then send */ -private function f_pcu_wait_rts_and_data_req(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr, - PCUIF_Sapi sapi, octetstring data) +friend function f_pcu_wait_rts_and_data_req(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr, + PCUIF_Sapi sapi, octetstring data) runs on test_CT { var PCUIF_send_data sd; @@ -3345,24 +3346,6 @@ f_sleep(2.0); } -testcase TC_pcu_data_req_pdtch() runs on test_CT { - f_init_pcu_test(); - - f_TC_pcu_act_req(0, 0, 7, true); - f_pcu_wait_rts_and_data_req(0, 0, 7, PCU_IF_SAPI_PDTCH, c_PCU_DATA); - /* FIXME: how to check this was actually sent */ - f_sleep(2.0); -} - -testcase TC_pcu_data_req_ptcch() runs on test_CT { - f_init_pcu_test(); - - f_TC_pcu_act_req(0, 0, 7, true); - f_pcu_wait_rts_and_data_req(0, 0, 7, PCU_IF_SAPI_PTCCH, c_PCU_DATA); - /* FIXME: how to check this was actually sent */ - f_sleep(2.0); -} - /* Send AGCH from PCU; check it appears on Um side */ testcase TC_pcu_data_req_agch() runs on test_CT { timer T := 3.0; @@ -4986,8 +4969,6 @@ execute( TC_pcu_data_req_wrong_trx() ); execute( TC_pcu_data_req_wrong_ts() ); execute( TC_pcu_data_req_ts_inactive() ); - execute( TC_pcu_data_req_pdtch() ); - execute( TC_pcu_data_req_ptcch() ); execute( TC_pcu_data_req_agch() ); execute( TC_pcu_data_req_imm_ass_pch() ); execute( TC_pcu_rach_content() ); diff --git a/bts/BTS_Tests_virtphy.ttcn b/bts/BTS_Tests_virtphy.ttcn new file mode 100644 index 0000000..f340574 --- /dev/null +++ b/bts/BTS_Tests_virtphy.ttcn @@ -0,0 +1,119 @@ +module BTS_Tests_virtphy { + +/* Integration Tests for OsmoBTS + * (C) 2019 by Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * This test suite tests the PCU interface related functionality of + * OsmoBTS by attaching to the PCU socket and emulation a PCU, while + * also attaching to A-bis RSL and to L1CTL provided by virtphy. + * + * Contrary to other BTS tests which use trxcon + fake_trx, these + * tests currently still require virtphy (and hence osmo-bts-virtual), + * as trxcon doesn't yet implement the GPRS/TBF related L1CTL primitives. + */ + +import from Misc_Helpers all; +import from General_Types all; +import from Osmocom_Types all; +import from GSM_Types all; +import from L1CTL_PortType all; +import from L1CTL_Types all; +import from LAPDm_Types all; +import from IPA_Emulation all; +import from LAPDm_RAW_PT all; +import from PCUIF_Types all; + +import from RSL_Types all; + +import from Osmocom_VTY_Functions all; + +import from BTS_Tests all; + + +/*********************************************************************** + * PCU related tests using virtphy instead of L1CTL + ***********************************************************************/ + +private function f_pcu_to_l1(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr, + PCUIF_Sapi sapi, octetstring data) runs on test_CT +{ + timer T := 5.0; + + PCU.clear; + f_pcu_wait_rts_and_data_req(bts_nr, trx_nr, ts_nr, sapi, data); + + T.start; + alt { + [] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_PDCH(ts_nr), ?, data)) { + /* FIXME: why is fn of DATA_IND different to fn of RTS / DATA_REQ above? */ + setverdict(pass); + } + [] L1CTL.receive { + repeat; + } + [] T.timeout { + setverdict(fail, "Timeout waiting for ", data); + } + } +} + +private function f_disable_dynamic_ts() runs on test_CT +{ + f_init_vty_bsc(); + /* I'm not quite sure why we need this with osmo-bts-virtual. Somehow it deosn't seem to + * support dynamic timeslots? But it uses the same scheduler as osmo-bts-trx ?!? */ + f_vty_config2(BSCVTY, {"network", "bts 0", "trx 0", "timeslot 3"}, "phys_chan_config TCH/F"); + f_vty_config2(BSCVTY, {"network", "bts 0", "trx 0", "timeslot 4"}, "phys_chan_config TCH/F"); + f_init_pcu_test(); +} + +testcase TC_pcu_data_req_pdtch() runs on test_CT { + var TfiUsfArr tua := f_TfiUsfArrInit(); + var octetstring data := '0000'O & f_rnd_octstring(21); + + f_disable_dynamic_ts(); + f_init_l1ctl(); + f_l1_tune(L1CTL); + + f_TC_pcu_act_req(0, 0, 7, true); + f_TfiUsfArrSet(tua, 7, 0); + f_L1CTL_TBF_CFG(L1CTL, false, tua); + f_sleep(1.0); + + f_pcu_to_l1(0, 0, 7, PCU_IF_SAPI_PDTCH, data); //c_PCU_DATA); +} + +testcase TC_pcu_data_req_ptcch() runs on test_CT { + var TfiUsfArr tua := f_TfiUsfArrInit(); + var octetstring data := '0000'O & f_rnd_octstring(21); + + f_disable_dynamic_ts(); + f_init_l1ctl(); + f_l1_tune(L1CTL); + + f_TC_pcu_act_req(0, 0, 7, true); + f_TfiUsfArrSet(tua, 7, 0); + f_L1CTL_TBF_CFG(L1CTL, false, tua); + f_sleep(1.0); + + f_pcu_to_l1(0, 0, 7, PCU_IF_SAPI_PTCCH, data); +} + + + +control { + if (mp_pcu_socket != "") { + execute( TC_pcu_data_req_pdtch() ); + execute( TC_pcu_data_req_ptcch() ); + } else { + log("PCU socket path not available, skipping PCU tests"); + } + +} + + +} -- To view, visit https://gerrit.osmocom.org/14183 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I677f660b1076148b3317b08b06eb3d6551d9b577 Gerrit-Change-Number: 14183 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 15:35:21 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 25 May 2019 15:35:21 +0000 Subject: Change in osmo-ttcn3-hacks[master]: PCU: Fully implement TC_pcu_data_req_{pdtch, ptcch} In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14183 to look at the new patch set (#2). Change subject: PCU: Fully implement TC_pcu_data_req_{pdtch,ptcch} ...................................................................... PCU: Fully implement TC_pcu_data_req_{pdtch,ptcch} As trxcon+fake_trx don't have GPRS (TBF) support yet, we cannot do any PCU related tests involving the Um interface yet. Instead, let's use virtphy to fill that gap. Using virtphy, we can actually receive/transmit GPRS blocks on the simulated Um interface. TC_pcu_data_req_{pdtch,ptcch} are moved to a new test suite "BTS_Tests_virtphy.ttcn" which should symbolize that the related tests are to be executed with osmo-bts-virtual + virtphy instead of osmo-bts-trx + fake_trx + trxcon. You also have to set the following module parameter to make this work: BTS_Tests.mp_bts_trxc_port := -1 Related: OS#4023 Change-Id: I677f660b1076148b3317b08b06eb3d6551d9b577 --- M bts/BTS_Tests.ttcn A bts/BTS_Tests_virtphy.ttcn 2 files changed, 126 insertions(+), 26 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/83/14183/2 -- To view, visit https://gerrit.osmocom.org/14183 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I677f660b1076148b3317b08b06eb3d6551d9b577 Gerrit-Change-Number: 14183 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 15:35:49 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 25 May 2019 15:35:49 +0000 Subject: Change in osmo-hlr[master]: src/db.h: use GSM23003_MSISDN_MAX_DIGITS for MSISDN buffer size In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14180 ) Change subject: src/db.h: use GSM23003_MSISDN_MAX_DIGITS for MSISDN buffer size ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14180 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I253e6a04a77c29f62d3c696515d115f8a829283b Gerrit-Change-Number: 14180 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sat, 25 May 2019 15:35:49 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 15:35:59 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 25 May 2019 15:35:59 +0000 Subject: Change in osmo-hlr[master]: src/hlr.c: fix deprecation warning: use gsm48_decode_bcd_number2() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14181 ) Change subject: src/hlr.c: fix deprecation warning: use gsm48_decode_bcd_number2() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14181 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I84fc1a0a6a334805b5dc1cef994f70b01a5ffcd4 Gerrit-Change-Number: 14181 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sat, 25 May 2019 15:35:59 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 15:36:00 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 25 May 2019 15:36:00 +0000 Subject: Change in osmo-hlr[master]: src/db.h: use GSM23003_MSISDN_MAX_DIGITS for MSISDN buffer size In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14180 ) Change subject: src/db.h: use GSM23003_MSISDN_MAX_DIGITS for MSISDN buffer size ...................................................................... src/db.h: use GSM23003_MSISDN_MAX_DIGITS for MSISDN buffer size Change-Id: I253e6a04a77c29f62d3c696515d115f8a829283b Depends on: Idc74f4d94ad44b9fc1b6d43178f5f33d551ebfb1 --- M src/db.h 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/db.h b/src/db.h index 12e74f8..6e4bf49 100644 --- a/src/db.h +++ b/src/db.h @@ -73,7 +73,7 @@ int64_t id; char imsi[GSM23003_IMSI_MAX_DIGITS+1]; - char msisdn[GT_MAX_DIGITS+1]; + char msisdn[GSM23003_MSISDN_MAX_DIGITS+1]; /* imeisv? */ char imei[GSM23003_IMEI_NUM_DIGITS+1]; char vlr_number[32]; -- To view, visit https://gerrit.osmocom.org/14180 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I253e6a04a77c29f62d3c696515d115f8a829283b Gerrit-Change-Number: 14180 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 15:36:01 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 25 May 2019 15:36:01 +0000 Subject: Change in osmo-hlr[master]: src/hlr.c: fix deprecation warning: use gsm48_decode_bcd_number2() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14181 ) Change subject: src/hlr.c: fix deprecation warning: use gsm48_decode_bcd_number2() ...................................................................... src/hlr.c: fix deprecation warning: use gsm48_decode_bcd_number2() Change-Id: I84fc1a0a6a334805b5dc1cef994f70b01a5ffcd4 --- M src/hlr.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/hlr.c b/src/hlr.c index 694ba14..33d2828 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -487,7 +487,7 @@ } /* Decode IMEI */ - if (gsm48_decode_bcd_number(imei, sizeof(imei), gsup->imei_enc, 0) < 0) { + if (gsm48_decode_bcd_number2(imei, sizeof(imei), gsup->imei_enc, gsup->imei_enc_len, 0) < 0) { LOGP(DMAIN, LOGL_ERROR, "%s: failed to decode IMEI\n", gsup->imsi); gsup_send_err_reply(conn, gsup->imsi, gsup->message_type, GMM_CAUSE_INV_MAND_INFO); return -1; -- To view, visit https://gerrit.osmocom.org/14181 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I84fc1a0a6a334805b5dc1cef994f70b01a5ffcd4 Gerrit-Change-Number: 14181 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 17:15:51 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sat, 25 May 2019 17:15:51 +0000 Subject: Change in osmo-pcu[master]: gprs_bssgp_pcu: explicit allocate & initialize bssgp_nsi instance In-Reply-To: References: Message-ID: lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/14171 ) Change subject: gprs_bssgp_pcu: explicit allocate & initialize bssgp_nsi instance ...................................................................... Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/14171/1/src/gprs_bssgp_pcu.cpp File src/gprs_bssgp_pcu.cpp: https://gerrit.osmocom.org/#/c/14171/1/src/gprs_bssgp_pcu.cpp at 878 PS1, Line 878: OSMO_ASSERT(bssgp_nsi); I'll drop this assert, as all calls should be guaranteed with an bssgp_nsi -- To view, visit https://gerrit.osmocom.org/14171 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2aa53ea54e9352577f6280ad7b9d1d9da9f57eaf Gerrit-Change-Number: 14171 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Sat, 25 May 2019 17:15:51 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 17:16:21 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sat, 25 May 2019 17:16:21 +0000 Subject: Change in osmo-pcu[master]: gprs_bssgp_pcu: explicit allocate & initialize bssgp_nsi instance In-Reply-To: References: Message-ID: lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/14171 ) Change subject: gprs_bssgp_pcu: explicit allocate & initialize bssgp_nsi instance ...................................................................... Patch Set 1: Code-Review-2 I'll drop the OSMO_ASSERT + free the bssgp_nsi in pcu_main.c -- To view, visit https://gerrit.osmocom.org/14171 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2aa53ea54e9352577f6280ad7b9d1d9da9f57eaf Gerrit-Change-Number: 14171 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Sat, 25 May 2019 17:16:21 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 17:57:16 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 25 May 2019 17:57:16 +0000 Subject: Change in libosmocore[master]: gsm0408/gsm0408_test.c: introduce BCD number encoding / decoding test Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14184 Change subject: gsm0408/gsm0408_test.c: introduce BCD number encoding / decoding test ...................................................................... gsm0408/gsm0408_test.c: introduce BCD number encoding / decoding test So far, both gsm48_encode_bcd_number() and gsm48_decode_bcd_number2() were uncovered by unit tests. Let's fill this gap by testing the following scenarios: - encoding / decoding of a regular 6-digit MSISDN; - encoding / decoding of a long 15-digit MSISDN; - encoding / decoding of a MSISDN to a buffer: - with exactly matching size, - with lower size (truncation); - decoding LV buffer with incorrect length. As it turns out, gsm48_decode_bcd_number2() does not properly handle encoded LV if the output buffer size is equal to the original MSISDN length + 1 (\0-terminator): one digit is lost. For example, decoding of 15-digit long MSISDN to a buffer of size 16 (15 digits + 1 for \0) would give us only 14 digits. This is reflected in the unit test output: Decoding HEX (buffer limit=16) '0821436587092143f5'... Expected: (rc=0) '123456789012345' Actual: (rc=0) '12345678901234' Moreover, if the output buffer is shorter than decoded number, gsm48_decode_bcd_number2() silently truncates it and returns 0, while its description states, that the rc should reflect this. To be fixed in the follow-up patches. Change-Id: I4b2c330cf8ffe4427c0bee7d5f3b74be56ecd85d Related: OS#4025 --- M tests/gsm0408/gsm0408_test.c M tests/gsm0408/gsm0408_test.ok 2 files changed, 179 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/84/14184/1 diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index 2d60b84..169010e 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -610,6 +610,150 @@ printf("\n"); } +static const struct bcd_number_test { + /* Human-readable test name */ + const char *test_name; + + /* To be encoded number in ASCII */ + const char *enc_ascii; + /* Expected encoding result in HEX */ + const char *enc_hex; + /* Expected return code */ + int enc_rc; + + /* To be decoded buffer in HEX */ + const char *dec_hex; + /* Expected decoding result in ASCII */ + const char *dec_ascii; + /* Expected return code */ + int dec_rc; + + /* Encoding buffer limit (0 means unlimited) */ + size_t enc_buf_lim; + /* Decoding buffer limit (0 means unlimited) */ + size_t dec_buf_lim; +} bcd_number_test_set[] = { + { + .test_name = "regular 6-digit MSISDN", + + /* Encoding test */ + .enc_ascii = "123456", + .enc_hex = "03214365", + .enc_rc = 4, + + /* Decoding test */ + .dec_hex = "03214365", + .dec_ascii = "123456", + }, + { + .test_name = "long 15-digit (maximum) MSISDN", + + /* Encoding test */ + .enc_ascii = "123456789012345", + .enc_hex = "0821436587092143f5", + .enc_rc = 9, + + /* Decoding test */ + .dec_hex = "0821436587092143f5", + .dec_ascii = "123456789012345", + }, + { + .test_name = "long 15-digit (maximum) MSISDN, limited buffer", + + /* Encoding test */ + .enc_ascii = "123456789012345", + .enc_hex = "0821436587092143f5", + .enc_rc = 9, + + /* Decoding test */ + .dec_hex = "0821436587092143f5", + .dec_ascii = "123456789012345", + + /* Buffer length limitations */ + .dec_buf_lim = 15 + 1, + .enc_buf_lim = 9, + }, + { + .test_name = "to be truncated 20-digit MSISDN", + + /* Encoding test (not enough room in buffer) */ + .enc_ascii = "12345678901234567890", + .enc_hex = "", /* nothing */ + .enc_rc = -EIO, + + /* Decoding test (one 5 digits do not fit) */ + .dec_hex = "0a21436587092143658709", + .dec_ascii = "123456789012345", + .dec_rc = 0, + + /* Buffer length limitations */ + .dec_buf_lim = 15 + 1, /* 5 digits less */ + .enc_buf_lim = 9, + }, + { + .test_name = "LV incorrect length", + .dec_hex = "05214365", /* should be 0x03 */ + .dec_ascii = "(none)", + .dec_rc = -EIO, + }, +}; + +static void test_bcd_number_encode_decode() +{ + const struct bcd_number_test *test; + uint8_t buf_enc[0xff] = { 0 }; + char buf_dec[0xff] = { 0 }; + size_t buf_len, i; + int rc; + + printf("BSD number encoding / decoding test\n"); + + for (i = 0; i < ARRAY_SIZE(bcd_number_test_set); i++) { + test = &bcd_number_test_set[i]; + printf("- Running test: %s\n", test->test_name); + + if (test->enc_ascii) { + if (test->enc_buf_lim) + buf_len = test->enc_buf_lim; + else + buf_len = sizeof(buf_enc); + + printf(" - Encoding ASCII (buffer limit=%zu) '%s'...\n", + test->enc_buf_lim, test->enc_ascii); + + rc = gsm48_encode_bcd_number(buf_enc, buf_len, + 0, test->enc_ascii); + printf(" - Expected: (rc=%d) '%s'\n", + test->enc_rc, test->enc_hex); + printf(" - Actual: (rc=%d) '%s'\n", + rc, osmo_hexdump_nospc(buf_enc, rc >= 0 ? rc : 0)); + } + + if (test->dec_hex) { + /* Parse a HEX string */ + rc = osmo_hexparse(test->dec_hex, buf_enc, sizeof(buf_enc)); + OSMO_ASSERT(rc >= 0); + + if (test->dec_buf_lim) + buf_len = test->dec_buf_lim; + else + buf_len = sizeof(buf_dec); + + printf(" - Decoding HEX (buffer limit=%zu) '%s'...\n", + test->dec_buf_lim, test->dec_hex); + + rc = gsm48_decode_bcd_number2(buf_dec, buf_len, + buf_enc, rc, 0); + printf(" - Expected: (rc=%d) '%s'\n", + test->dec_rc, test->dec_ascii); + printf(" - Actual: (rc=%d) '%s'\n", + rc, rc == 0 ? buf_dec : "(none)"); + } + } + + printf("\n"); +} + struct { int range; int arfcns_num; @@ -949,6 +1093,7 @@ test_mid_from_imsi(); test_mid_encode_decode(); test_mid_decode_zero_length(); + test_bcd_number_encode_decode(); test_ra_cap(); test_lai_encode_decode(); diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok index 0bd101d..2875a7e 100644 --- a/tests/gsm0408/gsm0408_test.ok +++ b/tests/gsm0408/gsm0408_test.ok @@ -139,6 +139,40 @@ rc=1 returned empty string +BSD number encoding / decoding test +- Running test: regular 6-digit MSISDN + - Encoding ASCII (buffer limit=0) '123456'... + - Expected: (rc=4) '03214365' + - Actual: (rc=4) '03214365' + - Decoding HEX (buffer limit=0) '03214365'... + - Expected: (rc=0) '123456' + - Actual: (rc=0) '123456' +- Running test: long 15-digit (maximum) MSISDN + - Encoding ASCII (buffer limit=0) '123456789012345'... + - Expected: (rc=9) '0821436587092143f5' + - Actual: (rc=9) '0821436587092143f5' + - Decoding HEX (buffer limit=0) '0821436587092143f5'... + - Expected: (rc=0) '123456789012345' + - Actual: (rc=0) '123456789012345' +- Running test: long 15-digit (maximum) MSISDN, limited buffer + - Encoding ASCII (buffer limit=9) '123456789012345'... + - Expected: (rc=9) '0821436587092143f5' + - Actual: (rc=9) '0821436587092143f5' + - Decoding HEX (buffer limit=16) '0821436587092143f5'... + - Expected: (rc=0) '123456789012345' + - Actual: (rc=0) '12345678901234' +- Running test: to be truncated 20-digit MSISDN + - Encoding ASCII (buffer limit=9) '12345678901234567890'... + - Expected: (rc=-5) '' + - Actual: (rc=-5) '' + - Decoding HEX (buffer limit=16) '0a21436587092143658709'... + - Expected: (rc=0) '123456789012345' + - Actual: (rc=0) '12345678901234' +- Running test: LV incorrect length + - Decoding HEX (buffer limit=0) '05214365'... + - Expected: (rc=-5) '(none)' + - Actual: (rc=-5) '(none)' + Constructed RA: 077-121-666-5 MCC+MNC in BCD: 70 17 21 -- To view, visit https://gerrit.osmocom.org/14184 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I4b2c330cf8ffe4427c0bee7d5f3b74be56ecd85d Gerrit-Change-Number: 14184 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 17:57:16 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 25 May 2019 17:57:16 +0000 Subject: Change in libosmocore[master]: gsm/gsm48_ie.c: fix output truncation in gsm48_decode_bcd_number2() Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14185 Change subject: gsm/gsm48_ie.c: fix output truncation in gsm48_decode_bcd_number2() ...................................................................... gsm/gsm48_ie.c: fix output truncation in gsm48_decode_bcd_number2() Thanks to the new unit test for BCD number encoding / decoding, it was discovered that gsm48_decode_bcd_number2() does not properly handle encoded LV if the output buffer size is equal to the original MSISDN length + 1 (\0-terminator): one digit is lost. For example, decoding of 15-digit long MSISDN to a buffer of size 16 (15 digits + 1 for \0) would give us only 14 digits. The problem was that 'output_len' was being decremented before checking the remaining buffer length and writing a digit to it. As a result, the maximum length was always one byte shorter. Change-Id: I61d49387fedbf7b238e21540a5eff22f6861e27a Fixes: OS#4025 --- M src/gsm/gsm48_ie.c M tests/gsm0408/gsm0408_test.ok 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/85/14185/1 diff --git a/src/gsm/gsm48_ie.c b/src/gsm/gsm48_ie.c index ca6489a..48d0d37 100644 --- a/src/gsm/gsm48_ie.c +++ b/src/gsm/gsm48_ie.c @@ -88,16 +88,16 @@ for (i = 1 + h_len; i <= in_len; i++) { /* lower nibble */ - output_len--; if (output_len <= 1) break; *output++ = bcd_num_digits[bcd_lv[i] & 0xf]; + output_len--; /* higher nibble */ - output_len--; if (output_len <= 1) break; *output++ = bcd_num_digits[bcd_lv[i] >> 4]; + output_len--; } if (output_len >= 1) *output++ = '\0'; diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok index 2875a7e..67d3f2f 100644 --- a/tests/gsm0408/gsm0408_test.ok +++ b/tests/gsm0408/gsm0408_test.ok @@ -160,14 +160,14 @@ - Actual: (rc=9) '0821436587092143f5' - Decoding HEX (buffer limit=16) '0821436587092143f5'... - Expected: (rc=0) '123456789012345' - - Actual: (rc=0) '12345678901234' + - Actual: (rc=0) '123456789012345' - Running test: to be truncated 20-digit MSISDN - Encoding ASCII (buffer limit=9) '12345678901234567890'... - Expected: (rc=-5) '' - Actual: (rc=-5) '' - Decoding HEX (buffer limit=16) '0a21436587092143658709'... - Expected: (rc=0) '123456789012345' - - Actual: (rc=0) '12345678901234' + - Actual: (rc=0) '123456789012345' - Running test: LV incorrect length - Decoding HEX (buffer limit=0) '05214365'... - Expected: (rc=-5) '(none)' -- To view, visit https://gerrit.osmocom.org/14185 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I61d49387fedbf7b238e21540a5eff22f6861e27a Gerrit-Change-Number: 14185 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 17:57:17 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 25 May 2019 17:57:17 +0000 Subject: Change in libosmocore[master]: gsm48_decode_bcd_number2(): fix: return -ENOSPC on truncation Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14186 Change subject: gsm48_decode_bcd_number2(): fix: return -ENOSPC on truncation ...................................................................... gsm48_decode_bcd_number2(): fix: return -ENOSPC on truncation The documentation of gsm48_decode_bcd_number2() clearly states that the output truncation is a erroneous case, so it should actually return negative in such cases. Let's return -ENOSPC. Change-Id: I75680f232001ba419a587fed4c24f32c70c3ad2b --- M src/gsm/gsm48_ie.c M tests/gsm0408/gsm0408_test.c M tests/gsm0408/gsm0408_test.ok 3 files changed, 17 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/86/14186/1 diff --git a/src/gsm/gsm48_ie.c b/src/gsm/gsm48_ie.c index 48d0d37..311836d 100644 --- a/src/gsm/gsm48_ie.c +++ b/src/gsm/gsm48_ie.c @@ -66,9 +66,15 @@ * \param[in] bcd_lv Length-Value part of to-be-decoded IE. * \param[in] input_len Size of the bcd_lv buffer for bounds checking. * \param[in] h_len Length of an optional header between L and V parts. - * \return 0 in case of success, negative on error. Errors checked: no or too little input data, no or too little - * output buffer size, IE length exceeds input data size, decoded number exceeds size of the output buffer. The output - * is guaranteed to be nul terminated iff output_len > 0. + * \return 0 in case of success, negative on error. + * + * Errors checked: + * - no or too little input data (-EIO), + * - IE length exceeds input data size (-EIO), + * - no or too little output buffer size (-ENOSPC), + * - decoded number exceeds size of the output buffer (-ENOSPC). + * + * The output is guaranteed to be nul terminated iff output_len > 0. */ int gsm48_decode_bcd_number2(char *output, size_t output_len, const uint8_t *bcd_lv, size_t input_len, @@ -102,6 +108,10 @@ if (output_len >= 1) *output++ = '\0'; + /* Indicate whether the output was truncated */ + if (i < in_len) + return -ENOSPC; + return 0; } diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index 169010e..e77fe24 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -684,7 +684,7 @@ /* Decoding test (one 5 digits do not fit) */ .dec_hex = "0a21436587092143658709", .dec_ascii = "123456789012345", - .dec_rc = 0, + .dec_rc = -ENOSPC, /* Buffer length limitations */ .dec_buf_lim = 15 + 1, /* 5 digits less */ @@ -747,7 +747,7 @@ printf(" - Expected: (rc=%d) '%s'\n", test->dec_rc, test->dec_ascii); printf(" - Actual: (rc=%d) '%s'\n", - rc, rc == 0 ? buf_dec : "(none)"); + rc, (rc == 0 || rc == -ENOSPC) ? buf_dec : "(none)"); } } diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok index 67d3f2f..d16fe0a 100644 --- a/tests/gsm0408/gsm0408_test.ok +++ b/tests/gsm0408/gsm0408_test.ok @@ -166,8 +166,8 @@ - Expected: (rc=-5) '' - Actual: (rc=-5) '' - Decoding HEX (buffer limit=16) '0a21436587092143658709'... - - Expected: (rc=0) '123456789012345' - - Actual: (rc=0) '123456789012345' + - Expected: (rc=-28) '123456789012345' + - Actual: (rc=-28) '123456789012345' - Running test: LV incorrect length - Decoding HEX (buffer limit=0) '05214365'... - Expected: (rc=-5) '(none)' -- To view, visit https://gerrit.osmocom.org/14186 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I75680f232001ba419a587fed4c24f32c70c3ad2b Gerrit-Change-Number: 14186 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 17:57:17 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 25 May 2019 17:57:17 +0000 Subject: Change in libosmocore[master]: gsm48_decode_bcd_number2(): return -EINVAL if LV has too big length Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14187 Change subject: gsm48_decode_bcd_number2(): return -EINVAL if LV has too big length ...................................................................... gsm48_decode_bcd_number2(): return -EINVAL if LV has too big length Change-Id: Ie07b2e8bc2f9628904e88448b4ee63b359655123 --- M src/gsm/gsm48_ie.c M tests/gsm0408/gsm0408_test.c M tests/gsm0408/gsm0408_test.ok 3 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/87/14187/1 diff --git a/src/gsm/gsm48_ie.c b/src/gsm/gsm48_ie.c index 311836d..688698d 100644 --- a/src/gsm/gsm48_ie.c +++ b/src/gsm/gsm48_ie.c @@ -70,7 +70,7 @@ * * Errors checked: * - no or too little input data (-EIO), - * - IE length exceeds input data size (-EIO), + * - IE length exceeds input data size (-EINVAL), * - no or too little output buffer size (-ENOSPC), * - decoded number exceeds size of the output buffer (-ENOSPC). * @@ -90,7 +90,7 @@ in_len = bcd_lv[0]; /* len + 1: the BCD length plus the length byte itself must fit in the input buffer. */ if (input_len < in_len + 1) - return -EIO; + return -EINVAL; for (i = 1 + h_len; i <= in_len; i++) { /* lower nibble */ diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index e77fe24..a4d0d2e 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -694,7 +694,7 @@ .test_name = "LV incorrect length", .dec_hex = "05214365", /* should be 0x03 */ .dec_ascii = "(none)", - .dec_rc = -EIO, + .dec_rc = -EINVAL, }, }; diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok index d16fe0a..bf1118f 100644 --- a/tests/gsm0408/gsm0408_test.ok +++ b/tests/gsm0408/gsm0408_test.ok @@ -170,8 +170,8 @@ - Actual: (rc=-28) '123456789012345' - Running test: LV incorrect length - Decoding HEX (buffer limit=0) '05214365'... - - Expected: (rc=-5) '(none)' - - Actual: (rc=-5) '(none)' + - Expected: (rc=-22) '(none)' + - Actual: (rc=-22) '(none)' Constructed RA: 077-121-666-5 -- To view, visit https://gerrit.osmocom.org/14187 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ie07b2e8bc2f9628904e88448b4ee63b359655123 Gerrit-Change-Number: 14187 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 18:21:25 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 25 May 2019 18:21:25 +0000 Subject: Change in libosmocore[master]: gsm0408/gsm0408_test.c: introduce BCD number encoding / decoding test In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14184 to look at the new patch set (#2). Change subject: gsm0408/gsm0408_test.c: introduce BCD number encoding / decoding test ...................................................................... gsm0408/gsm0408_test.c: introduce BCD number encoding / decoding test So far, both gsm48_encode_bcd_number() and gsm48_decode_bcd_number2() were uncovered by unit tests. Let's fill this gap by testing the following scenarios: - encoding / decoding of a regular 6-digit MSISDN; - encoding / decoding of a long 15-digit MSISDN; - encoding / decoding of a MSISDN to a buffer: - with exactly matching size, - with lower size (truncation); - decoding LV buffer with incorrect length, - encoding / decoding an empty input buffer. As it turns out, gsm48_decode_bcd_number2() does not properly handle encoded LV if the output buffer size is equal to the original MSISDN length + 1 (\0-terminator): one digit is lost. For example, decoding of 15-digit long MSISDN to a buffer of size 16 (15 digits + 1 for \0) would give us only 14 digits. This is reflected in the unit test output: Decoding HEX (buffer limit=16) '0821436587092143f5'... Expected: (rc=0) '123456789012345' Actual: (rc=0) '12345678901234' Moreover, if the output buffer is shorter than decoded number, gsm48_decode_bcd_number2() silently truncates it and returns 0, while its description states, that the rc should reflect this. To be fixed in the follow-up patches. Change-Id: I4b2c330cf8ffe4427c0bee7d5f3b74be56ecd85d Related: OS#4025 --- M tests/gsm0408/gsm0408_test.c M tests/gsm0408/gsm0408_test.ok 2 files changed, 199 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/84/14184/2 -- To view, visit https://gerrit.osmocom.org/14184 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4b2c330cf8ffe4427c0bee7d5f3b74be56ecd85d Gerrit-Change-Number: 14184 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 18:21:25 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 25 May 2019 18:21:25 +0000 Subject: Change in libosmocore[master]: gsm48_decode_bcd_number2(): fix output truncation In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14185 to look at the new patch set (#2). Change subject: gsm48_decode_bcd_number2(): fix output truncation ...................................................................... gsm48_decode_bcd_number2(): fix output truncation Thanks to the new unit test for BCD number encoding / decoding, it was discovered that gsm48_decode_bcd_number2() does not properly handle encoded LV if the output buffer size is equal to the original MSISDN length + 1 (\0-terminator): one digit is lost. For example, decoding of 15-digit long MSISDN to a buffer of size 16 (15 digits + 1 for \0) would give us only 14 digits. The problem was that 'output_len' was being decremented before checking the remaining buffer length and writing a digit to it. As a result, the maximum length was always one byte shorter. Change-Id: I61d49387fedbf7b238e21540a5eff22f6861e27a Fixes: OS#4025 --- M src/gsm/gsm48_ie.c M tests/gsm0408/gsm0408_test.ok 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/85/14185/2 -- To view, visit https://gerrit.osmocom.org/14185 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I61d49387fedbf7b238e21540a5eff22f6861e27a Gerrit-Change-Number: 14185 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 18:21:25 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 25 May 2019 18:21:25 +0000 Subject: Change in libosmocore[master]: gsm48_decode_bcd_number2(): return -EINVAL if LV has too big length In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14187 to look at the new patch set (#2). Change subject: gsm48_decode_bcd_number2(): return -EINVAL if LV has too big length ...................................................................... gsm48_decode_bcd_number2(): return -EINVAL if LV has too big length Change-Id: Ie07b2e8bc2f9628904e88448b4ee63b359655123 --- M src/gsm/gsm48_ie.c M tests/gsm0408/gsm0408_test.c M tests/gsm0408/gsm0408_test.ok 3 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/87/14187/2 -- To view, visit https://gerrit.osmocom.org/14187 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie07b2e8bc2f9628904e88448b4ee63b359655123 Gerrit-Change-Number: 14187 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 19:01:17 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 25 May 2019 19:01:17 +0000 Subject: Change in osmo-msc[master]: Use GSM23003_MSISDN_MAX_DIGITS from libosmogsm Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14188 Change subject: Use GSM23003_MSISDN_MAX_DIGITS from libosmogsm ...................................................................... Use GSM23003_MSISDN_MAX_DIGITS from libosmogsm Change-Id: If9eb46b83b6ad45f210b86b46dd416352adcc3ff Depends on: Idc74f4d94ad44b9fc1b6d43178f5f33d551ebfb1 --- M include/osmocom/msc/vlr.h M src/libmsc/msc_t.c M src/libmsc/sms_queue.c M tests/sms_queue/sms_queue_test.c 4 files changed, 5 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/88/14188/1 diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index b1c0d5d..56314b7 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -113,7 +113,6 @@ struct vlr_instance; #define VLR_NAME_LENGTH 160 -#define VLR_MSISDN_LENGTH 15 /* The VLR subscriber is the part of the GSM subscriber state in VLR (CS) or * SGSN (PS), particularly while interacting with the HLR via GSUP */ @@ -127,7 +126,7 @@ /* Data from HLR */ /* 3GPP TS 23.008 */ /* Always use vlr_subscr_set_imsi() to write to imsi[] */ char imsi[GSM23003_IMSI_MAX_DIGITS+1]; /* 2.1.1.1 */ - char msisdn[VLR_MSISDN_LENGTH+1]; /* 2.1.2 */ + char msisdn[GSM23003_MSISDN_MAX_DIGITS+1]; /* 2.1.2 */ char name[VLR_NAME_LENGTH+1]; /* proprietary */ OSMO_LBUF_DECL(hlr, 16); /* 2.4.7 */ uint32_t periodic_lu_timer; /* 2.4.24 */ diff --git a/src/libmsc/msc_t.c b/src/libmsc/msc_t.c index 8eefccc..6b96c26 100644 --- a/src/libmsc/msc_t.c +++ b/src/libmsc/msc_t.c @@ -75,7 +75,7 @@ int rc; uint64_t started_at; uint64_t ho_nr; - char ho_nr_str[VLR_MSISDN_LENGTH+1]; + char ho_nr_str[GSM23003_MSISDN_MAX_DIGITS+1]; struct gsm_network *net = msc_t_net(msc_t); bool usable = false; @@ -417,7 +417,7 @@ struct rtp_stream *rtp_cn = msc_t->inter_msc.call_leg? msc_t->inter_msc.call_leg->rtp[RTP_TO_CN] : NULL; /* Since it's BCD, it needs rounded-up half the char* length of an MSISDN plus a type byte. * But no need to introduce obscure math to save a few stack bytes, just have more. */ - uint8_t msisdn_enc_buf[VLR_MSISDN_LENGTH + 1]; + uint8_t msisdn_enc_buf[GSM23003_MSISDN_MAX_DIGITS+1]; /* Copy an_apdu and an_apdu->e_info in "copy-on-write" method, because they are const and we * need to add the Handover Number to e_info. */ const struct ran_handover_request_ack *r = &ran_dec->handover_request_ack; diff --git a/src/libmsc/sms_queue.c b/src/libmsc/sms_queue.c index 2c380b2..6346c1d 100644 --- a/src/libmsc/sms_queue.c +++ b/src/libmsc/sms_queue.c @@ -66,7 +66,7 @@ struct llist_head pending_sms; - char last_msisdn[VLR_MSISDN_LENGTH+1]; + char last_msisdn[GSM23003_MSISDN_MAX_DIGITS+1]; }; static int sms_subscr_cb(unsigned int, unsigned int, void *, void *); diff --git a/tests/sms_queue/sms_queue_test.c b/tests/sms_queue/sms_queue_test.c index 25fc312..4918be2 100644 --- a/tests/sms_queue/sms_queue_test.c +++ b/tests/sms_queue/sms_queue_test.c @@ -158,7 +158,7 @@ static void test_next_sms() { int i; - char last_msisdn[VLR_MSISDN_LENGTH+1] = ""; + char last_msisdn[GSM23003_MSISDN_MAX_DIGITS+1] = ""; printf("Testing smsq_take_next_sms()\n"); -- To view, visit https://gerrit.osmocom.org/14188 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If9eb46b83b6ad45f210b86b46dd416352adcc3ff Gerrit-Change-Number: 14188 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 19:03:17 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 25 May 2019 19:03:17 +0000 Subject: Change in libosmocore[master]: gsm48_encode_bcd_number(): zero-initialize optional header between L ... Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14189 Change subject: gsm48_encode_bcd_number(): zero-initialize optional header between L and V ...................................................................... gsm48_encode_bcd_number(): zero-initialize optional header between L and V Change-Id: Iafd911dd55691b3715391e3899cd6971245c8d7f --- M src/gsm/gsm48_ie.c M tests/gsm0408/gsm0408_test.ok M tests/sms/sms_test.ok 3 files changed, 8 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/89/14189/1 diff --git a/src/gsm/gsm48_ie.c b/src/gsm/gsm48_ie.c index 688698d..77cd472 100644 --- a/src/gsm/gsm48_ie.c +++ b/src/gsm/gsm48_ie.c @@ -161,6 +161,10 @@ if (i % 2) *bcd_cur++ |= 0xf0; + /* zero-initialize optional header between L and V */ + for (i = 0; i < h_len; i++) + bcd_lv[i + 1] = 0x00; + /* return how many bytes we used */ return (bcd_cur - bcd_lv); } diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok index 075886e..8a65399 100644 --- a/tests/gsm0408/gsm0408_test.ok +++ b/tests/gsm0408/gsm0408_test.ok @@ -150,7 +150,7 @@ - Running test: regular 6-digit MSISDN with optional header (LHV) - Encoding ASCII (buffer limit=0) '123456'... - Expected: (rc=8) '0700000000214365' - - Actual: (rc=8) '0721436587214365' + - Actual: (rc=8) '0700000000214365' - Decoding HEX (buffer limit=0) '07deadbeef214365'... - Expected: (rc=0) '123456' - Actual: (rc=0) '123456' diff --git a/tests/sms/sms_test.ok b/tests/sms/sms_test.ok index a71567d..0a45c01 100644 --- a/tests/sms/sms_test.ok +++ b/tests/sms/sms_test.ok @@ -13,9 +13,9 @@ SEPTETS: 8 OCTETS: 7 Done Testing gsm340_gen_oa -Result: len(12) data(14 81 21 43 65 87 09 21 43 65 87 19 ) -Result: len(12) data(14 a1 21 43 65 87 09 21 43 65 87 19 ) -Result: len(2) data(00 91 ) +Result: len(12) data(14 00 21 43 65 87 09 21 43 65 87 19 ) +Result: len(12) data(14 00 21 43 65 87 09 21 43 65 87 19 ) +Result: len(2) data(00 00 ) Result: len(9) data(0e d0 4f 78 d9 2d 9c 0e 01 ) Result: len(12) data(14 d0 4f 78 d9 2d 9c 0e c3 e2 31 19 ) OK -- To view, visit https://gerrit.osmocom.org/14189 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Iafd911dd55691b3715391e3899cd6971245c8d7f Gerrit-Change-Number: 14189 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat May 25 19:03:40 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 25 May 2019 19:03:40 +0000 Subject: Change in libosmocore[master]: gsm0408/gsm0408_test.c: introduce BCD number encoding / decoding test In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14184 ) Change subject: gsm0408/gsm0408_test.c: introduce BCD number encoding / decoding test ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/14184 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4b2c330cf8ffe4427c0bee7d5f3b74be56ecd85d Gerrit-Change-Number: 14184 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Sat, 25 May 2019 19:03:40 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Sun May 26 03:05:23 2019 From: admin at opensuse.org (OBS Notification) Date: Sun, 26 May 2019 03:05:23 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in xUbuntu_19.04/x86_64 In-Reply-To: References: Message-ID: <5cea028ca0932_6249118c60c5561da@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/xUbuntu_19.04/x86_64 Package network:osmocom:nightly/osmo-hlr failed to build in xUbuntu_19.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 156s] [ 156s] db_subscr_get_by_imsi(dbc, imsi0, &g_subscr) --> 0 [ 156s] +DAUC Cannot convert LU timestamp '2019-05-26 03:05:03' to time_t: Value too large for defined data type [ 156s] struct hlr_subscriber { [ 156s] .id = 1, [ 156s] .imsi = '123456789000000', [ 156s] @@ -719,6 +742,7 @@ [ 156s] --- Delete subscribers [ 156s] [ 156s] db_subscr_get_by_imsi(dbc, imsi0, &g_subscr) --> 0 [ 156s] +DAUC Cannot convert LU timestamp '2019-05-26 03:05:03' to time_t: Value too large for defined data type [ 156s] struct hlr_subscriber { [ 156s] .id = 1, [ 156s] .imsi = '123456789000000', [ 156s] 5. testsuite.at:32: 5. db (testsuite.at:32): FAILED (testsuite.at:37) [ 156s] make[1]: *** [debian/rules:17: override_dh_auto_test] Error 1 [ 156s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 156s] make: *** [debian/rules:7: build] Error 2 [ 156s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 156s] [ 156s] morla3 failed "build osmo-hlr_1.0.0.32.29f3.dsc" at Sun May 26 03:05:03 UTC 2019. [ 156s] [ 156s] ### VM INTERACTION START ### [ 159s] [ 143.935521] sysrq: SysRq : Power Off [ 159s] [ 143.956602] reboot: Power down [ 159s] ### VM INTERACTION END ### [ 159s] [ 159s] morla3 failed "build osmo-hlr_1.0.0.32.29f3.dsc" at Sun May 26 03:05:07 UTC 2019. [ 159s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Sun May 26 09:04:12 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:04:12 +0000 Subject: Change in libosmocore[master]: gsm0408/gsm0408_test.c: introduce BCD number encoding / decoding test In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14184 ) Change subject: gsm0408/gsm0408_test.c: introduce BCD number encoding / decoding test ...................................................................... Patch Set 3: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/14184/3//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/#/c/14184/3//COMMIT_MSG at 10 PS3, Line 10: uncovered I don't think you can use "uncovered" here. "uncovered" has a meaning like "discovered". I guess you have to write "did not have coverage by unit tests [yet]" or something along those lines. -- To view, visit https://gerrit.osmocom.org/14184 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4b2c330cf8ffe4427c0bee7d5f3b74be56ecd85d Gerrit-Change-Number: 14184 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Sun, 26 May 2019 09:04:12 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:04:31 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:04:31 +0000 Subject: Change in libosmocore[master]: gsm48_decode_bcd_number2(): fix output truncation In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14185 ) Change subject: gsm48_decode_bcd_number2(): fix output truncation ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14185 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I61d49387fedbf7b238e21540a5eff22f6861e27a Gerrit-Change-Number: 14185 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 26 May 2019 09:04:31 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:04:59 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:04:59 +0000 Subject: Change in libosmocore[master]: gsm48_decode_bcd_number2(): fix: return -ENOSPC on truncation In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14186 ) Change subject: gsm48_decode_bcd_number2(): fix: return -ENOSPC on truncation ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14186 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I75680f232001ba419a587fed4c24f32c70c3ad2b Gerrit-Change-Number: 14186 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 26 May 2019 09:04:59 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:05:31 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:05:31 +0000 Subject: Change in libosmocore[master]: gsm48_decode_bcd_number2(): return -EINVAL if LV has too big length In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14187 ) Change subject: gsm48_decode_bcd_number2(): return -EINVAL if LV has too big length ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14187 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie07b2e8bc2f9628904e88448b4ee63b359655123 Gerrit-Change-Number: 14187 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 26 May 2019 09:05:31 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:07:36 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:07:36 +0000 Subject: Change in osmo-pcu[master]: gprs_bssgp_pcu: make gprs_bssgp_ns_cb public In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14170 ) Change subject: gprs_bssgp_pcu: make gprs_bssgp_ns_cb public ...................................................................... gprs_bssgp_pcu: make gprs_bssgp_ns_cb public rename the function sgsn_ns_cb -> gprs_bssgp_ns_cb. To allow writing and reading the same configuration, the pcu needs to register all vty commands before reading the configuration. This callback is required to register NS based vty commands Related: OS#4024 Change-Id: I440c0df2e32fe22bf43288c00bb4aa3a0c6a3a51 --- M src/gprs_bssgp_pcu.cpp M src/gprs_bssgp_pcu.h 2 files changed, 5 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, but someone else must approve Vadim Yanitskiy: Looks good to me, approved diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp index 9d02df6..50f10db 100644 --- a/src/gprs_bssgp_pcu.cpp +++ b/src/gprs_bssgp_pcu.cpp @@ -520,7 +520,7 @@ return 0; } -static int sgsn_ns_cb(enum gprs_ns_evt event, struct gprs_nsvc *nsvc, struct msgb *msg, uint16_t bvci) +int gprs_bssgp_ns_cb(enum gprs_ns_evt event, struct gprs_nsvc *nsvc, struct msgb *msg, uint16_t bvci) { int rc = 0; switch (event) { @@ -913,7 +913,7 @@ the_pcu.bts = bts; - bssgp_nsi = gprs_ns_instantiate(&sgsn_ns_cb, tall_pcu_ctx); + bssgp_nsi = gprs_ns_instantiate(&gprs_bssgp_ns_cb, tall_pcu_ctx); if (!bssgp_nsi) { LOGP(DBSSGP, LOGL_ERROR, "Failed to create NS instance\n"); return NULL; diff --git a/src/gprs_bssgp_pcu.h b/src/gprs_bssgp_pcu.h index e8ae1a9..f98e719 100644 --- a/src/gprs_bssgp_pcu.h +++ b/src/gprs_bssgp_pcu.h @@ -80,6 +80,9 @@ uint16_t nsvci, uint16_t bvci, uint16_t mcc, uint16_t mnc, bool mnc_3_digits, uint16_t lac, uint16_t rac, uint16_t cell_id); +int gprs_bssgp_ns_cb(enum gprs_ns_evt event, struct gprs_nsvc *nsvc, + struct msgb *msg, uint16_t bvci); + void gprs_bssgp_destroy(void); struct bssgp_bvc_ctx *gprs_bssgp_pcu_current_bctx(void); -- To view, visit https://gerrit.osmocom.org/14170 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I440c0df2e32fe22bf43288c00bb4aa3a0c6a3a51 Gerrit-Change-Number: 14170 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:07:50 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:07:50 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add Test for receiving PCUIF_TIME_IND on BTS PCU interface In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14172 ) Change subject: bts: Add Test for receiving PCUIF_TIME_IND on BTS PCU interface ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14172 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib6b99a52790162b0227847d9aec5143cf959e2d0 Gerrit-Change-Number: 14172 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 26 May 2019 09:07:50 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:07:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:07:53 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Add TC_pcu_oml_alert() for testing PCU-originated OML alerts In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14178 ) Change subject: Add TC_pcu_oml_alert() for testing PCU-originated OML alerts ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14178 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6c7641b37b6ee2177d43127140cc0b625409379c Gerrit-Change-Number: 14178 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 26 May 2019 09:07:53 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:07:59 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:07:59 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Add TC_pcu_oml_alert() for testing PCU-originated OML alerts In-Reply-To: References: Message-ID: Harald Welte has removed a vote on this change. Change subject: Add TC_pcu_oml_alert() for testing PCU-originated OML alerts ...................................................................... Removed Code-Review+2 by Harald Welte -- To view, visit https://gerrit.osmocom.org/14178 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: deleteVote Gerrit-Change-Id: I6c7641b37b6ee2177d43127140cc0b625409379c Gerrit-Change-Number: 14178 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:08:04 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:08:04 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_pcu_rts_req() to verify PCUIF_RTS_REQ In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14182 ) Change subject: bts: Add TC_pcu_rts_req() to verify PCUIF_RTS_REQ ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14182 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic27cdd4f4adf11f871b84bd72692a03280274fe2 Gerrit-Change-Number: 14182 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 26 May 2019 09:08:04 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:08:06 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:08:06 +0000 Subject: Change in osmo-ttcn3-hacks[master]: PCU: Fully implement TC_pcu_data_req_{pdtch, ptcch} In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14183 ) Change subject: PCU: Fully implement TC_pcu_data_req_{pdtch,ptcch} ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14183 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I677f660b1076148b3317b08b06eb3d6551d9b577 Gerrit-Change-Number: 14183 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 26 May 2019 09:08:06 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:08:12 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:08:12 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Add TC_pcu_oml_alert() for testing PCU-originated OML alerts In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14178 ) Change subject: Add TC_pcu_oml_alert() for testing PCU-originated OML alerts ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14178 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6c7641b37b6ee2177d43127140cc0b625409379c Gerrit-Change-Number: 14178 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 26 May 2019 09:08:12 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:08:28 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:08:28 +0000 Subject: Change in osmo-ttcn3-hacks[master]: PCU: Fully implement TC_pcu_data_req_{pdtch, ptcch} In-Reply-To: References: Message-ID: Harald Welte has removed a vote on this change. Change subject: PCU: Fully implement TC_pcu_data_req_{pdtch,ptcch} ...................................................................... Removed Code-Review+2 by Harald Welte -- To view, visit https://gerrit.osmocom.org/14183 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: deleteVote Gerrit-Change-Id: I677f660b1076148b3317b08b06eb3d6551d9b577 Gerrit-Change-Number: 14183 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:08:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:08:33 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add Test for receiving PCUIF_TIME_IND on BTS PCU interface In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14172 ) Change subject: bts: Add Test for receiving PCUIF_TIME_IND on BTS PCU interface ...................................................................... bts: Add Test for receiving PCUIF_TIME_IND on BTS PCU interface Change-Id: Ib6b99a52790162b0227847d9aec5143cf959e2d0 Related: OS#4023 --- M bts/BTS_Tests.ttcn 1 file changed, 55 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 27ed81c..a879f75 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -3538,6 +3538,60 @@ setverdict(pass); } +/* test for periodic TIME_IND; check number of FN expired and number of TIME_IND within frames */ +testcase TC_pcu_time_ind() runs on test_CT { + var PCUIF_send_data pcu_sd; + var integer num_time_ind := 0; + var integer first_fn, last_fn; + var float test_duration := 5.0; + timer T; + + f_init_pcu_test(); + f_TC_pcu_act_req(0, 0, 7, true); + + PCU.clear; + T.start(test_duration); + alt { + [] PCU.receive(t_SD_PCUIF(g_pcu_conn_id, tr_PCUIF_TIME_IND(0, ?))) -> value pcu_sd { + num_time_ind := num_time_ind + 1; + if (not isbound(first_fn)) { + first_fn := pcu_sd.data.u.time_ind.fn; + } + last_fn := pcu_sd.data.u.time_ind.fn; + repeat; + } + [] PCU.receive(t_SD_PCUIF(g_pcu_conn_id, tr_PCUIF_TIME_IND(?, ?))) -> value pcu_sd { + setverdict(fail, "Received unexpected PCUIF_TIME_IND: ", pcu_sd.data); + repeat; + } + [] PCU.receive { + repeat; + } + [] T.timeout {} + } + var integer fn_expired := last_fn - first_fn; + log(fn_expired, " fn expired with ", num_time_ind, " PCU_TIME.ind"); + + /* verify the number of frames expired matches our expectation */ + const float c_GSM_FN_DURATION_MS := 4.61538; + var float fn_expected := test_duration * 1000.0 / c_GSM_FN_DURATION_MS; + var template integer t_fn_expected := f_tolerance(float2int(fn_expected), 1, 100000, 10); + if (not match(fn_expired, t_fn_expected)) { + setverdict(fail, "Number of TDMA Frames (", fn_expired, ") not matching ", t_fn_expected); + } + + /* There are three TIME.ind in every fn MOD 13 */ + var float time_ind_expected := int2float(fn_expired) * 3.0 / 13.0; + /* Add some tolerance */ + var template integer t_time_ind_exp := f_tolerance(float2int(time_ind_expected), 1, 100000, 5); + if (not match(num_time_ind, t_time_ind_exp)) { + setverdict(fail, "Number of TIME.ind (", num_time_ind, ") not matching ", t_time_ind_exp); + } + + setverdict(pass); +} + + /*********************************************************************** * Osmocom Style Dynamic Timeslot Support ***********************************************************************/ @@ -4766,7 +4820,6 @@ * error handling ** IE duplicated? * PCU interface -** TIME_IND from BTS->PCU ** DATA_IND from BTS->PCU ** verification of PCU-originated DATA_REQ arrival on Um/MS side @@ -4839,6 +4892,7 @@ execute( TC_pcu_rach_content() ); execute( TC_pcu_ext_rach_content() ); execute( TC_pcu_paging_from_rsl() ); + execute( TC_pcu_time_ind() ); } else { log("PCU socket path not available, skipping PCU tests"); } -- To view, visit https://gerrit.osmocom.org/14172 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ib6b99a52790162b0227847d9aec5143cf959e2d0 Gerrit-Change-Number: 14172 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:08:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:08:33 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Add TC_pcu_oml_alert() for testing PCU-originated OML alerts In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14178 ) Change subject: Add TC_pcu_oml_alert() for testing PCU-originated OML alerts ...................................................................... Add TC_pcu_oml_alert() for testing PCU-originated OML alerts As we don't yet speak OML directly from the TTCN3 test suite, this requires a currently "RFC/WIP" state patch turning OML Failure Event Reports into CTRL TRAP on the BSC, see https://gerrit.osmocom.org/#/c/osmo-bsc/+/14177 Change-Id: I6c7641b37b6ee2177d43127140cc0b625409379c Depends: osmo-bsc I4f8a9737c6ef1b951ea8e742cdbd3689371a99d5 Related: OS#4023 --- M bts/BTS_Tests.ttcn 1 file changed, 29 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index a879f75..c89eeb1 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -57,6 +57,8 @@ charstring mp_pcu_socket := PCU_SOCK_DEFAULT; charstring mp_ctrl_ip := "127.0.0.1"; integer mp_ctrl_port := 4238; + charstring mp_bsc_ctrl_ip := "127.0.0.1"; + integer mp_bsc_ctrl_port := 4249; integer mp_tolerance_rxqual := 1; integer mp_tolerance_rxlev := 3; integer mp_tolerance_timing_offset_256syms := 0; @@ -3131,6 +3133,7 @@ * PCU Socket related tests ***********************************************************************/ +/* Verify no RTS before ACT_REQ; verify RTS after ACT_REQ */ private function f_TC_pcu_act_req(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr, boolean exp_success) runs on test_CT { timer T := 3.0; @@ -3171,6 +3174,7 @@ } } +/* verify no more RTS after DEACT_REQ */ private function f_TC_pcu_deact_req(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr) runs on test_CT { timer T := 3.0; @@ -3591,6 +3595,30 @@ setverdict(pass); } +/* test for generating Abis side OML ALERT from the PCU */ +testcase TC_pcu_oml_alert() runs on test_CT { + var PCUIF_send_data pcu_sd; + var integer num_time_ind := 0; + var integer first_fn, last_fn; + var float test_duration := 5.0; + timer T; + + f_init_pcu_test(); + f_TC_pcu_act_req(0, 0, 7, true); + + /* re-connect CTRL port from BTS to BSC */ + f_ipa_ctrl_stop(); + f_ipa_ctrl_start(mp_bsc_ctrl_ip, mp_bsc_ctrl_port); + + /* Send that OML Alert */ + PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_OML_ALERT, testcasename()))); + + /* This requires https://gerrit.osmocom.org/#/c/osmo-bsc/+/14177 to be merged */ + f_ctrl_exp_trap(IPA_CTRL, "bts.0.oml_failure_report", ?); + setverdict(pass); +} + + /*********************************************************************** * Osmocom Style Dynamic Timeslot Support @@ -4893,6 +4921,7 @@ execute( TC_pcu_ext_rach_content() ); execute( TC_pcu_paging_from_rsl() ); execute( TC_pcu_time_ind() ); + execute( TC_pcu_oml_alert() ); } else { log("PCU socket path not available, skipping PCU tests"); } -- To view, visit https://gerrit.osmocom.org/14178 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I6c7641b37b6ee2177d43127140cc0b625409379c Gerrit-Change-Number: 14178 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:08:34 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:08:34 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_pcu_rts_req() to verify PCUIF_RTS_REQ In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14182 ) Change subject: bts: Add TC_pcu_rts_req() to verify PCUIF_RTS_REQ ...................................................................... bts: Add TC_pcu_rts_req() to verify PCUIF_RTS_REQ This new test verifies that the expected amount of PCUIF_RTS_REQ are observed on the PCU Interface for both PTCCH and PDTCH. Change-Id: Ic27cdd4f4adf11f871b84bd72692a03280274fe2 Related: OS#4023 --- M bts/BTS_Tests.ttcn 1 file changed, 74 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index c89eeb1..12e1a3a 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -3595,6 +3595,79 @@ setverdict(pass); } +/* test for periodic RTS_REQ; check number of FN expired and number of RTS_IND per SAPI */ +testcase TC_pcu_rts_req() runs on test_CT { + var PCUIF_send_data pcu_sd; + var integer first_fn, last_fn; + var integer num_rts_pdtch := 0; + var integer num_rts_ptcch := 0; + var float test_duration := 5.0; + timer T; + + f_init_pcu_test(); + f_TC_pcu_act_req(0, 0, 7, true); + + PCU.clear; + T.start(test_duration); + alt { + [] PCU.receive(t_SD_PCUIF(g_pcu_conn_id, tr_PCUIF_RTS_REQ(0, 0, 7, PCU_IF_SAPI_PDTCH, ?, ?))) + -> value pcu_sd { + num_rts_pdtch := num_rts_pdtch + 1; + if (not isbound(first_fn)) { + first_fn := pcu_sd.data.u.rts_req.fn; + } + last_fn := pcu_sd.data.u.rts_req.fn; + repeat; + } + [] PCU.receive(t_SD_PCUIF(g_pcu_conn_id, tr_PCUIF_RTS_REQ(0, 0, 7, PCU_IF_SAPI_PTCCH, ?, ?))) + -> value pcu_sd { + num_rts_ptcch := num_rts_ptcch + 1; + if (not isbound(first_fn)) { + first_fn := pcu_sd.data.u.rts_req.fn; + } + last_fn := pcu_sd.data.u.rts_req.fn; + repeat; + } + [] PCU.receive(t_SD_PCUIF(g_pcu_conn_id, tr_PCUIF_RTS_REQ)) -> value pcu_sd { + setverdict(fail, "Received unexpected PCUIF_RTS_REQ: ", pcu_sd.data); + repeat; + } + [] PCU.receive { + repeat; + } + [] T.timeout {} + } + var integer fn_expired := last_fn - first_fn; + log(fn_expired, " fn expired with num_rts_pdtch=", num_rts_pdtch, + ", num_rts_ptcch=", num_rts_ptcch); + + /* verify the number of frames expired matches our expectation */ + const float c_GSM_FN_DURATION_MS := 4.61538; + var float fn_expected := test_duration * 1000.0 / c_GSM_FN_DURATION_MS; + var template integer t_fn_expected := f_tolerance(float2int(fn_expected), 1, 100000, 10); + if (not match(fn_expired, t_fn_expected)) { + setverdict(fail, "Number of TDMA Frames (", fn_expired, ") not matching ", t_fn_expected); + } + + /* PTCCH is in pos. 12 + 38 of 52-multiframe, but four slots/bursts required per block */ + var float ptcch_expected := int2float(fn_expired) / 52.0 * 0.5; + var template integer t_ptcch_exp := f_tolerance(float2int(ptcch_expected), 1, 100000, 1); + if (not match(num_rts_ptcch, t_ptcch_exp)) { + setverdict(fail, "Number of RTS.ind for PTCCH (", num_rts_ptcch, ") not matching ", + t_ptcch_exp); + } + + /* We have 12 PDTCH blocks every 52-multiframe */ + var float pdtch_expected := int2float(fn_expired) / 52.0 * 12.0; + var template integer t_pdtch_exp := f_tolerance(float2int(pdtch_expected), 1, 100000, 2); + if (not match(num_rts_pdtch, t_pdtch_exp)) { + setverdict(fail, "Number of RTS.ind for PDTCH (", num_rts_pdtch, ") not matching ", + t_pdtch_exp); + } + + setverdict(pass); +} + /* test for generating Abis side OML ALERT from the PCU */ testcase TC_pcu_oml_alert() runs on test_CT { var PCUIF_send_data pcu_sd; @@ -4921,6 +4994,7 @@ execute( TC_pcu_ext_rach_content() ); execute( TC_pcu_paging_from_rsl() ); execute( TC_pcu_time_ind() ); + execute( TC_pcu_rts_req() ); execute( TC_pcu_oml_alert() ); } else { log("PCU socket path not available, skipping PCU tests"); -- To view, visit https://gerrit.osmocom.org/14182 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ic27cdd4f4adf11f871b84bd72692a03280274fe2 Gerrit-Change-Number: 14182 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:09:06 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:09:06 +0000 Subject: Change in osmo-bts[master]: l1sap: Correctly count RACH slots in calc_exprd_rach_frames() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14159 ) Change subject: l1sap: Correctly count RACH slots in calc_exprd_rach_frames() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14159 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6b14fd6e7819f9164fb4a09b432a9f419e3b6e5c Gerrit-Change-Number: 14159 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Sun, 26 May 2019 09:09:06 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:09:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:09:09 +0000 Subject: Change in osmo-bts[master]: l1sap: Fix calculation of expired RACH slots in case of missing frame... In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14160 ) Change subject: l1sap: Fix calculation of expired RACH slots in case of missing frame numbers ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14160 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If4f8d2ea55fc722c64c330cde09e833b67ee98fe Gerrit-Change-Number: 14160 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 26 May 2019 09:09:09 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:09:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:09:19 +0000 Subject: Change in osmo-bts[master]: Add severity to OML FAILURE EVENT REPORT In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14173 ) Change subject: Add severity to OML FAILURE EVENT REPORT ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14173 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I49af04212568892648e0e8704ba1cc6de8c8ae89 Gerrit-Change-Number: 14173 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 26 May 2019 09:09:19 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:09:21 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:09:21 +0000 Subject: Change in osmo-bts[master]: l1sap: Correctly count RACH slots in calc_exprd_rach_frames() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14159 ) Change subject: l1sap: Correctly count RACH slots in calc_exprd_rach_frames() ...................................................................... l1sap: Correctly count RACH slots in calc_exprd_rach_frames() We used a bogus multiplication factor of four when computing the number of expired RACH slots. While there are four RACH slots per block (i.e. 4 times more RACH received than normal MAC blocks), that multiplier doesn't apply here: We are calling this function per *frame* and not per *block*. So the maximum number of RACH slots per *frame* is (in most suual cases with a single CCCH) at maximum 1. Only some obscure configurations with multiple CCCHs in a single cell would render higher values. In any case, *blocks* never even enter this equation. This wrong multiplier resulted in rather weird RACH load reports to the BSC. Related: OS#3750 Change-Id: I6b14fd6e7819f9164fb4a09b432a9f419e3b6e5c --- M src/common/l1sap.c 1 file changed, 1 insertion(+), 4 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved diff --git a/src/common/l1sap.c b/src/common/l1sap.c index f31d822..d9ffdb8 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -484,10 +484,7 @@ rach_frames_expired = 1; } - /* Each Frame has room for 4 RACH slots, since RACH - * slots are short enough to fit into a single radio - * burst, so we need to multiply the final result by 4 */ - return rach_frames_expired * 4; + return rach_frames_expired; } /* time information received from bts model */ -- To view, visit https://gerrit.osmocom.org/14159 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I6b14fd6e7819f9164fb4a09b432a9f419e3b6e5c Gerrit-Change-Number: 14159 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:09:21 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:09:21 +0000 Subject: Change in osmo-bts[master]: l1sap: Fix calculation of expired RACH slots in case of missing frame... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14160 ) Change subject: l1sap: Fix calculation of expired RACH slots in case of missing frame numbers ...................................................................... l1sap: Fix calculation of expired RACH slots in case of missing frame numbers In case of a Combined CCCH (with SDCCH/4), the number of RACH slots depends on the frame number. So in case of lost/skipped frame numbers, we cannot simply compute the value for the current fn and then multiply it by the number of frame numbers expired. Rather, we have to 'replay' all missed frame numbers and individually determine how many RACH slots happened in that frame. Related: OS#3750 Change-Id: If4f8d2ea55fc722c64c330cde09e833b67ee98fe --- M src/common/l1sap.c 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Pau Espin Pedrol: Looks good to me, but someone else must approve diff --git a/src/common/l1sap.c b/src/common/l1sap.c index d9ffdb8..52f2b33 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -493,6 +493,7 @@ struct info_time_ind_param *info_time_ind) { int frames_expired; + int i; DEBUGPFN(DL1P, info_time_ind->fn, "Rx MPH_INFO time ind\n"); @@ -513,8 +514,10 @@ /* increment number of RACH slots that have passed by since the * last time indication */ - bts->load.rach.total += - calc_exprd_rach_frames(bts, info_time_ind->fn) * frames_expired; + for (i = 0; i < frames_expired; i++) { + uint32_t fn = (info_time_ind->fn + GSM_HYPERFRAME - i) % GSM_HYPERFRAME; + bts->load.rach.total += calc_exprd_rach_frames(bts, fn); + } return 0; } -- To view, visit https://gerrit.osmocom.org/14160 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If4f8d2ea55fc722c64c330cde09e833b67ee98fe Gerrit-Change-Number: 14160 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:09:21 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:09:21 +0000 Subject: Change in osmo-bts[master]: oml: Print more context from FOM Header or using MO In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14161 ) Change subject: oml: Print more context from FOM Header or using MO ...................................................................... oml: Print more context from FOM Header or using MO Some of our OML log lines were missing any context. Try making more sense by printing any context information about the given managed object, TRX, ... as we have it. Change-Id: I60d1660c6d574f206d7b8cc10082b413142365dd --- M src/common/oml.c 1 file changed, 31 insertions(+), 28 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, approved Pau Espin Pedrol: Looks good to me, but someone else must approve diff --git a/src/common/oml.c b/src/common/oml.c index 186c2a2..63643c5 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -70,6 +70,16 @@ return msgb_alloc_headroom(1024, 128, "OML"); } +/* FIXME: move to gsm_data_shared */ +static char mo_buf[128]; +char *gsm_abis_mo_name(const struct gsm_abis_mo *mo) +{ + snprintf(mo_buf, sizeof(mo_buf), "OC=%s INST=(%02x,%02x,%02x)", + get_value_string(abis_nm_obj_class_names, mo->obj_class), + mo->obj_inst.bts_nr, mo->obj_inst.trx_nr, mo->obj_inst.ts_nr); + return mo_buf; +} + /* 3GPP TS 12.21 ? 8.8.2 */ int oml_tx_failure_event_rep(const struct gsm_abis_mo *mo, uint16_t cause_value, const char *fmt, ...) @@ -77,7 +87,8 @@ struct msgb *nmsg; va_list ap; - LOGP(DOML, LOGL_NOTICE, "Sending %s to BSC: ", get_value_string(abis_mm_event_cause_names, cause_value)); + LOGP(DOML, LOGL_NOTICE, "%s: Sending %s to BSC: ", gsm_abis_mo_name(mo), + get_value_string(abis_mm_event_cause_names, cause_value)); va_start(ap, fmt); osmo_vlogp(DOML, LOGL_NOTICE, __FILE__, __LINE__, 1, fmt, ap); nmsg = abis_nm_fail_evt_vrep(NM_EVT_PROC_FAIL, NM_SEVER_CRITICAL, @@ -133,16 +144,6 @@ return oml_send_msg(msg, 0); } -/* FIXME: move to gsm_data_shared */ -static char mo_buf[128]; -char *gsm_abis_mo_name(const struct gsm_abis_mo *mo) -{ - snprintf(mo_buf, sizeof(mo_buf), "OC=%s INST=(%02x,%02x,%02x)", - get_value_string(abis_nm_obj_class_names, mo->obj_class), - mo->obj_inst.bts_nr, mo->obj_inst.trx_nr, mo->obj_inst.ts_nr); - return mo_buf; -} - static inline void add_bts_attrs(struct msgb *msg, const struct gsm_bts *bts) { uint16_t total_len = 0; @@ -203,7 +204,7 @@ int i; if (!trx) { - LOGP(DOML, LOGL_ERROR, "O&M Get Attributes for unknown TRX\n"); + LOGP(DOML, LOGL_ERROR, "%s: O&M Get Attributes for unknown TRX\n", gsm_trx_name(trx)); return -NM_NACK_TRXNR_UNKN; } @@ -213,8 +214,8 @@ add_trx_attr(out_msg, trx); break; default: - LOGP(DOML, LOGL_ERROR, "O&M Get Attributes [%u], %s is unsupported by TRX.\n", i, - get_value_string(abis_nm_att_names, attr[i])); + LOGP(DOML, LOGL_ERROR, "%s: O&M Get Attributes [%u], %s is unsupported by TRX.\n", + gsm_trx_name(trx), i, get_value_string(abis_nm_att_names, attr[i])); /* Push this tag to the list of unsupported attributes */ buf = msgb_push(out_msg, 1); *buf = attr[i]; @@ -273,10 +274,10 @@ const uint8_t *attr, uint16_t attr_len) { struct msgb *nmsg = oml_msgb_alloc(); + const char *mo_name = gsm_abis_mo_name(mo); int rc; - LOGP(DOML, LOGL_INFO, "%s Tx Get Attribute Response\n", - get_value_string(abis_nm_obj_class_names, mo->obj_class)); + LOGP(DOML, LOGL_INFO, "%s Tx Get Attribute Response\n", mo_name); if (!nmsg) return -NM_NACK_CANT_PERFORM; @@ -289,13 +290,14 @@ rc = handle_attrs_trx(nmsg, gsm_bts_trx_num(mo->bts, mo->obj_inst.trx_nr), attr, attr_len); break; default: - LOGP(DOML, LOGL_ERROR, "Unsupported MO class %s in Get Attribute Response\n", - get_value_string(abis_nm_obj_class_names, mo->obj_class)); + LOGP(DOML, LOGL_ERROR, "%s: Unsupported MO class in Get Attribute Response\n", + mo_name); rc = -NM_NACK_OBJCLASS_NOTSUPP; } if (rc < 0) { - LOGP(DOML, LOGL_ERROR, "Tx Get Attribute Response FAILED with rc=%d\n", rc); + LOGP(DOML, LOGL_ERROR, "%s: Tx Get Attribute Response FAILED with rc=%d\n", + mo_name, rc); msgb_free(nmsg); return rc; } @@ -442,7 +444,7 @@ /* alter message type */ if (cause) { - LOGP(DOML, LOGL_NOTICE, "Sending FOM NACK with cause %s.\n", + LOGPFOH(DOML, LOGL_NOTICE, foh, "Sending FOM NACK with cause %s.\n", abis_nm_nack_cause_name(cause)); foh->msg_type += 2; /* nack */ /* add cause */ @@ -451,7 +453,7 @@ struct abis_om_hdr *omh = (struct abis_om_hdr *) msgb_l2(msg); omh->length = msgb_l3len(msg); } else { - LOGP(DOML, LOGL_DEBUG, "Sending FOM ACK.\n"); + LOGPFOH(DOML, LOGL_DEBUG, foh, "Sending FOM ACK.\n"); foh->msg_type++; /* ack */ } @@ -561,18 +563,18 @@ rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UNSUP_ATTR, "Get Attribute parsing failure"); - return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); + return oml_mo_fom_ack_nack(mo, NM_MT_GET_ATTR, NM_NACK_INCORR_STRUCT); } if (!TLVP_PRES_LEN(&tp, NM_ATT_LIST_REQ_ATTR, 1)) { oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UNSUP_ATTR, "Get Attribute without Attribute List"); - return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); + return oml_mo_fom_ack_nack(mo, NM_MT_GET_ATTR, NM_NACK_INCORR_STRUCT); } rc = oml_tx_attr_resp(mo, TLVP_VAL(&tp, NM_ATT_LIST_REQ_ATTR), TLVP_LEN(&tp, NM_ATT_LIST_REQ_ATTR)); if (rc < 0) { LOGPFOH(DOML, LOGL_ERROR, foh, "Responding to O&M Get Attributes message with NACK 0%x\n", -rc); - return oml_fom_ack_nack(msg, -rc); + return oml_mo_fom_ack_nack(mo, NM_MT_GET_ATTR, -rc); } return 0; @@ -1350,6 +1352,7 @@ struct e1inp_sign_link *oml_link = trx->bts->oml_link; uint16_t port = IPA_TCP_PORT_RSL; uint32_t ip = get_signlink_remote_ip(oml_link); + const char *trx_name = gsm_trx_name(trx); struct in_addr in; int rc; @@ -1366,16 +1369,16 @@ } in.s_addr = htonl(ip); - LOGP(DOML, LOGL_INFO, "Rx IPA RSL CONNECT IP=%s PORT=%u STREAM=0x%02x\n", - inet_ntoa(in), port, stream_id); + LOGP(DOML, LOGL_INFO, "%s: Rx IPA RSL CONNECT IP=%s PORT=%u STREAM=0x%02x\n", + trx_name, inet_ntoa(in), port, stream_id); if (trx->bts->variant == BTS_OSMO_OMLDUMMY) { rc = 0; - LOGP(DOML, LOGL_NOTICE, "Not connecting RSL in OML-DUMMY!\n"); + LOGP(DOML, LOGL_NOTICE, "%s: Not connecting RSL in OML-DUMMY!\n", trx_name); } else rc = e1inp_ipa_bts_rsl_connect_n(oml_link->ts->line, inet_ntoa(in), port, trx->nr); if (rc < 0) { - LOGP(DOML, LOGL_ERROR, "Error in abis_open(RSL): %d\n", rc); + LOGP(DOML, LOGL_ERROR, "%s: Error in abis_open(RSL): %d\n", trx_name, rc); return oml_fom_ack_nack(msg, NM_NACK_CANT_PERFORM); } -- To view, visit https://gerrit.osmocom.org/14161 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I60d1660c6d574f206d7b8cc10082b413142365dd Gerrit-Change-Number: 14161 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:09:21 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:09:21 +0000 Subject: Change in osmo-bts[master]: oml: Have one generic log message for all transmitted messages In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14162 ) Change subject: oml: Have one generic log message for all transmitted messages ...................................................................... oml: Have one generic log message for all transmitted messages Rather than open-coding "Tx foobar..." in various functions (and forgetting it in half of them), let's add a generic message into oml_mo_send_msg(). Change-Id: I5dd4b1749e68fb7fc74cb2e3a778d2418f46b770 --- M src/common/oml.c 1 file changed, 2 insertions(+), 6 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, approved Pau Espin Pedrol: Looks good to me, but someone else must approve diff --git a/src/common/oml.c b/src/common/oml.c index 63643c5..67eb6d8 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -141,6 +141,8 @@ /* FIXME: This assumption may not always be correct */ msg->trx = mo->bts->c0; + DEBUGPFOH(DOML, foh, "Tx %s\n", get_value_string(abis_nm_msgtype_names, foh->msg_type)); + return oml_send_msg(msg, 0); } @@ -277,8 +279,6 @@ const char *mo_name = gsm_abis_mo_name(mo); int rc; - LOGP(DOML, LOGL_INFO, "%s Tx Get Attribute Response\n", mo_name); - if (!nmsg) return -NM_NACK_CANT_PERFORM; @@ -314,8 +314,6 @@ { struct msgb *nmsg; - LOGP(DOML, LOGL_INFO, "%s Tx STATE CHG REP\n", gsm_abis_mo_name(mo)); - nmsg = oml_msgb_alloc(); if (!nmsg) return -ENOMEM; @@ -470,8 +468,6 @@ { struct msgb *nmsg; - LOGP(DOML, LOGL_INFO, "%s Tx SW ACT REP\n", gsm_abis_mo_name(mo)); - nmsg = oml_msgb_alloc(); if (!nmsg) return -ENOMEM; -- To view, visit https://gerrit.osmocom.org/14162 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I5dd4b1749e68fb7fc74cb2e3a778d2418f46b770 Gerrit-Change-Number: 14162 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:09:22 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:09:22 +0000 Subject: Change in osmo-bts[master]: Add severity to OML FAILURE EVENT REPORT In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14173 ) Change subject: Add severity to OML FAILURE EVENT REPORT ...................................................................... Add severity to OML FAILURE EVENT REPORT Example: The fact that the PCU has connected with a given version is not a *failure* in the first place, particularly not a MAJOR one. Let's allow callers of oml_tx_failure_event_rep() specify the serverity of the event that they're reporting to the BSC. Change-Id: I49af04212568892648e0e8704ba1cc6de8c8ae89 --- M include/osmo-bts/oml.h M src/common/bts.c M src/common/bts_ctrl_commands.c M src/common/l1sap.c M src/common/main.c M src/common/oml.c M src/common/pcu_sock.c M src/common/rsl.c M src/osmo-bts-oc2g/calib_file.c 9 files changed, 50 insertions(+), 49 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved diff --git a/include/osmo-bts/oml.h b/include/osmo-bts/oml.h index 5136058..14da70e 100644 --- a/include/osmo-bts/oml.h +++ b/include/osmo-bts/oml.h @@ -45,7 +45,7 @@ extern const unsigned int oml_default_t200_ms[7]; /* Transmit failure event report */ -int oml_tx_failure_event_rep(const struct gsm_abis_mo *mo, uint16_t cause_value, - const char *fmt, ...); +int oml_tx_failure_event_rep(const struct gsm_abis_mo *mo, enum abis_nm_severity severity, + uint16_t cause_value, const char *fmt, ...); #endif // _OML_H */ diff --git a/src/common/bts.c b/src/common/bts.c index 5220406..97e7a8b 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -340,7 +340,7 @@ else rc = bts_model_trx_deact_rf(trx); if (rc < 0) { - oml_tx_failure_event_rep(&trx->bb_transc.mo, OSMO_EVT_MAJ_RSL_FAIL, + oml_tx_failure_event_rep(&trx->bb_transc.mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_RSL_FAIL, link ? "Failed to establish RSL link (%d)" : "Failed to deactivate RF (%d)", rc); diff --git a/src/common/bts_ctrl_commands.c b/src/common/bts_ctrl_commands.c index 47d8a5d..0d31890 100644 --- a/src/common/bts_ctrl_commands.c +++ b/src/common/bts_ctrl_commands.c @@ -77,7 +77,7 @@ static int set_oml_alert(struct ctrl_cmd *cmd, void *data) { /* Note: we expect signal dispatch to be synchronous */ - oml_tx_failure_event_rep(&g_bts->mo, OSMO_EVT_EXT_ALARM, cmd->value); + oml_tx_failure_event_rep(&g_bts->mo, NM_SEVER_INDETERMINATE, OSMO_EVT_EXT_ALARM, cmd->value); cmd->reply = "OK"; diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 52f2b33..59d5b93 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1358,7 +1358,7 @@ default: LOGP(DL1P, LOGL_NOTICE, "unknown prim %d op %d\n", l1sap->oph.primitive, l1sap->oph.operation); - oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, + oml_tx_failure_event_rep(&trx->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UKWN_MSG, "unknown prim %d op %d", l1sap->oph.primitive, l1sap->oph.operation); diff --git a/src/common/main.c b/src/common/main.c index 0d84c18..25ecd11 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -184,7 +184,7 @@ case SIGTERM: if (!quit) { oml_tx_failure_event_rep(&bts->mo, - OSMO_EVT_CRIT_PROC_STOP, + NM_SEVER_CRITICAL, OSMO_EVT_CRIT_PROC_STOP, "BTS: SIGINT received -> shutdown"); bts_shutdown(bts, "SIGINT"); } diff --git a/src/common/oml.c b/src/common/oml.c index 67eb6d8..d264a6e 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -81,8 +81,8 @@ } /* 3GPP TS 12.21 ? 8.8.2 */ -int oml_tx_failure_event_rep(const struct gsm_abis_mo *mo, uint16_t cause_value, - const char *fmt, ...) +int oml_tx_failure_event_rep(const struct gsm_abis_mo *mo, enum abis_nm_severity severity, + uint16_t cause_value, const char *fmt, ...) { struct msgb *nmsg; va_list ap; @@ -91,7 +91,7 @@ get_value_string(abis_mm_event_cause_names, cause_value)); va_start(ap, fmt); osmo_vlogp(DOML, LOGL_NOTICE, __FILE__, __LINE__, 1, fmt, ap); - nmsg = abis_nm_fail_evt_vrep(NM_EVT_PROC_FAIL, NM_SEVER_CRITICAL, + nmsg = abis_nm_fail_evt_vrep(NM_EVT_PROC_FAIL, severity, NM_PCAUSE_T_MANUF, cause_value, fmt, ap); va_end(ap); LOGPC(DOML, LOGL_NOTICE, "\n"); @@ -558,12 +558,14 @@ rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { - oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UNSUP_ATTR, "Get Attribute parsing failure"); + oml_tx_failure_event_rep(mo, NM_SEVER_MINOR, OSMO_EVT_MAJ_UNSUP_ATTR, + "Get Attribute parsing failure"); return oml_mo_fom_ack_nack(mo, NM_MT_GET_ATTR, NM_NACK_INCORR_STRUCT); } if (!TLVP_PRES_LEN(&tp, NM_ATT_LIST_REQ_ATTR, 1)) { - oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UNSUP_ATTR, "Get Attribute without Attribute List"); + oml_tx_failure_event_rep(mo, NM_SEVER_MINOR, OSMO_EVT_MAJ_UNSUP_ATTR, + "Get Attribute without Attribute List"); return oml_mo_fom_ack_nack(mo, NM_MT_GET_ATTR, NM_NACK_INCORR_STRUCT); } @@ -588,7 +590,7 @@ rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, + oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UNSUP_ATTR, "New value for Attribute not supported"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } @@ -597,7 +599,7 @@ if (TLVP_PRES_LEN(&tp, NM_ATT_BCCH_ARFCN, 2)) { uint16_t arfcn = ntohs(tlvp_val16_unal(&tp, NM_ATT_BCCH_ARFCN)); if (arfcn > 1024) { - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_WARN_SW_WARN, + oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MAJOR, OSMO_EVT_WARN_SW_WARN, "Given ARFCN %u is not supported", arfcn); LOGPFOH(DOML, LOGL_ERROR, foh, "Given ARFCN %u is not supported.\n", arfcn); @@ -606,7 +608,7 @@ } /* 9.4.52 Starting Time */ if (TLVP_PRESENT(&tp, NM_ATT_START_TIME)) { - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, + oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UNSUP_ATTR, "NM_ATT_START_TIME Attribute not " "supported"); return oml_fom_ack_nack(msg, NM_NACK_SPEC_IMPL_NOTSUPP); @@ -756,7 +758,7 @@ rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { - oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UNSUP_ATTR, + oml_tx_failure_event_rep(&trx->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UNSUP_ATTR, "New value for Set Radio Attribute not" " supported"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); @@ -820,10 +822,8 @@ arfcn = ntohs(_value); value += 2; if (arfcn > 1024) { - oml_tx_failure_event_rep(&trx->bts->mo, - OSMO_EVT_WARN_SW_WARN, - "Given ARFCN %u is unsupported", - arfcn); + oml_tx_failure_event_rep(&trx->bts->mo, NM_SEVER_MAJOR, OSMO_EVT_WARN_SW_WARN, + "Given ARFCN %u is unsupported", arfcn); LOGPFOH(DOML, LOGL_NOTICE, foh, "Given ARFCN %u is unsupported.\n", arfcn); return oml_fom_ack_nack(msg, NM_NACK_FREQ_NOTAVAIL); } @@ -926,9 +926,8 @@ rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { - oml_tx_failure_event_rep(&ts->mo, OSMO_EVT_MAJ_UNSUP_ATTR, - "New value for Set Channel Attribute " - "not supported"); + oml_tx_failure_event_rep(&ts->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UNSUP_ATTR, + "New value for Set Channel Attribute not supported"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } @@ -1073,7 +1072,8 @@ trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr); if (trx) mo = &trx->mo; - oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UKWN_MSG, form, foh->obj_inst.bts_nr, + oml_tx_failure_event_rep(mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UKWN_MSG, form, + foh->obj_inst.bts_nr, get_value_string(abis_nm_msgtype_names, foh->msg_type)); return true; @@ -1094,7 +1094,8 @@ trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr); if (trx) mo = &trx->mo; - oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UKWN_MSG, "Formatted O&M message too short"); + oml_tx_failure_event_rep(mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UKWN_MSG, + "Formatted O&M message too short"); return -EIO; } @@ -1149,8 +1150,8 @@ trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr); if (trx) mo = &trx->mo; - oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UKWN_MSG, "unknown Formatted O&M " - "msg_type 0x%02x", foh->msg_type); + oml_tx_failure_event_rep(mo, NM_SEVER_MINOR, OSMO_EVT_MAJ_UKWN_MSG, + "unknown Formatted O&M msg_type 0x%02x", foh->msg_type); ret = oml_fom_ack_nack(msg, NM_NACK_MSGTYPE_INVAL); } @@ -1317,9 +1318,8 @@ mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst); if (!mo) return oml_fom_ack_nack(msg, NM_NACK_OBJINST_UNKN); - oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UNSUP_ATTR, - "New value for IPAC Set Attribute not " - "supported\n"); + oml_tx_failure_event_rep(mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UNSUP_ATTR, + "New value for IPAC Set Attribute not supported\n"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } @@ -1392,13 +1392,13 @@ int ret; if (msgb_l2len(msg) < sizeof(*foh)) { - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UKWN_MSG, + oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UKWN_MSG, "Manufacturer O&M message too short\n"); return -EIO; } if (strncmp((char *)&oh->data[1], abis_nm_ipa_magic, idstrlen)) { - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UKWN_MSG, + oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UKWN_MSG, "Manufacturer OML message != ipaccess not supported\n"); return -EINVAL; } @@ -1437,8 +1437,8 @@ trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr); if (trx) mo = &trx->mo; - oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UKWN_MSG, "unknown Manufacturer O&M " - "msg_type 0x%02x", foh->msg_type); + oml_tx_failure_event_rep(mo, NM_SEVER_MINOR, OSMO_EVT_MAJ_UKWN_MSG, + "unknown Manufacturer O&M msg_type 0x%02x", foh->msg_type); ret = oml_fom_ack_nack(msg, NM_NACK_MSGTYPE_INVAL); } @@ -1452,7 +1452,7 @@ int ret = 0; if (msgb_l2len(msg) < sizeof(*oh)) { - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UKWN_MSG, + oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UKWN_MSG, "OML message too short\n"); msgb_free(msg); return -EIO; @@ -1461,14 +1461,14 @@ /* We don't implement de-segmentation of segmented OML messages */ if (oh->placement != ABIS_OM_PLACEMENT_ONLY || oh->sequence != 0) { - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UKWN_MSG, + oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UKWN_MSG, "Unsupported segmented O&M message\n"); msgb_free(msg); return -EIO; } if (msgb_l3len(msg) < oh->length) { - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UKWN_MSG, + oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UKWN_MSG, "Short OML message: %u < %u\n", msgb_l3len(msg), oh->length); msgb_free(msg); @@ -1478,7 +1478,7 @@ switch (oh->mdisc) { case ABIS_OM_MDISC_FOM: if (msgb_l2len(msg) < sizeof(*oh)) { - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UKWN_MSG, + oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UKWN_MSG, "Formatted O&M message too short\n"); ret = -EIO; break; @@ -1487,7 +1487,7 @@ break; case ABIS_OM_MDISC_MANUF: if (msgb_l2len(msg) < sizeof(*oh)) { - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UKWN_MSG, + oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UKWN_MSG, "Manufacturer O&M message too short\n"); ret = -EIO; break; @@ -1495,7 +1495,7 @@ ret = down_mom(bts, msg); break; default: - oml_tx_failure_event_rep(&bts->mo, OSMO_EVT_MAJ_UKWN_MSG, + oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MINOR, OSMO_EVT_MAJ_UKWN_MSG, "unknown O&M msg_disc 0x%02x\n", oh->mdisc); ret = -EINVAL; } diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index 31097ba..e4f2d66 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -595,7 +595,7 @@ case PCU_VERSION: LOGP(DPCU, LOGL_INFO, "OsmoPCU version %s connected\n", txt->text); - oml_tx_failure_event_rep(&bts->gprs.cell.mo, OSMO_EVT_PCU_VERS, txt->text); + oml_tx_failure_event_rep(&bts->gprs.cell.mo, NM_SEVER_CEASED, OSMO_EVT_PCU_VERS, txt->text); osmo_strlcpy(bts->pcu_version, txt->text, MAX_VERSION_LENGTH); if (GSM_BTS_HAS_SI(bts, SYSINFO_TYPE_13)) @@ -604,7 +604,8 @@ LOGP(DPCU, LOGL_INFO, "SI13 is not available on PCU connection\n"); break; case PCU_OML_ALERT: - oml_tx_failure_event_rep(&bts->gprs.cell.mo, OSMO_EVT_EXT_ALARM, txt->text); + oml_tx_failure_event_rep(&bts->gprs.cell.mo, NM_SEVER_INDETERMINATE, OSMO_EVT_EXT_ALARM, + txt->text); break; default: LOGP(DPCU, LOGL_ERROR, "Unknown TXT_IND type %u received\n", @@ -731,7 +732,7 @@ bts = llist_entry(state->net->bts_list.next, struct gsm_bts, list); LOGP(DPCU, LOGL_NOTICE, "PCU socket has LOST connection\n"); - oml_tx_failure_event_rep(&bts->gprs.cell.mo, OSMO_EVT_PCU_VERS, + oml_tx_failure_event_rep(&bts->gprs.cell.mo, NM_SEVER_MAJOR, OSMO_EVT_PCU_VERS, "PCU socket has LOST connection"); bts->pcu_version[0] = '\0'; diff --git a/src/common/rsl.c b/src/common/rsl.c index cc653ce..92575b5 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -471,8 +471,8 @@ if (rc < 0) { /* FIXME: notfiy the BSC on other errors? */ if (rc == -ENOSPC) { - oml_tx_failure_event_rep(&trx->bts->mo, OSMO_EVT_MIN_PAG_TAB_FULL, - "BTS paging table is full"); + oml_tx_failure_event_rep(&trx->bts->mo, NM_SEVER_WARNING, + OSMO_EVT_MIN_PAG_TAB_FULL, "BTS paging table is full"); } } @@ -2013,7 +2013,7 @@ if (!lchan->abis_ip.rtp_socket) { LOGPLCHAN(lchan, DRTP, LOGL_ERROR, "IPAC Failed to create RTP/RTCP sockets\n"); oml_tx_failure_event_rep(&lchan->ts->trx->mo, - OSMO_EVT_CRIT_RTP_TOUT, + NM_SEVER_MINOR, OSMO_EVT_CRIT_RTP_TOUT, "%s IPAC Failed to create RTP/RTCP sockets", gsm_lchan_name(lchan)); return tx_ipac_XXcx_nack(lchan, RSL_ERR_RES_UNAVAIL, @@ -2050,7 +2050,7 @@ if (rc < 0) { LOGPLCHAN(lchan, DRTP, LOGL_ERROR, "IPAC Failed to bind RTP/RTCP sockets\n"); oml_tx_failure_event_rep(&lchan->ts->trx->mo, - OSMO_EVT_CRIT_RTP_TOUT, + NM_SEVER_MINOR, OSMO_EVT_CRIT_RTP_TOUT, "%s IPAC Failed to bind RTP/RTCP sockets", gsm_lchan_name(lchan)); osmo_rtp_socket_free(lchan->abis_ip.rtp_socket); diff --git a/src/osmo-bts-oc2g/calib_file.c b/src/osmo-bts-oc2g/calib_file.c index 72ec266..6d2d561 100644 --- a/src/osmo-bts-oc2g/calib_file.c +++ b/src/osmo-bts-oc2g/calib_file.c @@ -134,7 +134,7 @@ st->fp = fopen(fname, "rb"); if (!st->fp) { LOGP(DL1C, LOGL_FATAL, "Failed to open '%s' for calibration data.\n", fname); - oml_tx_failure_event_rep(&fl1h->phy_inst->trx->mo, OSMO_EVT_WARN_SW_WARN, + oml_tx_failure_event_rep(&fl1h->phy_inst->trx->mo, NM_SEVER_MAJOR, OSMO_EVT_WARN_SW_WARN, "Failed to open '%s' for calibration data", fname); return -1; } @@ -221,7 +221,7 @@ rc = calib_verify(fl1h, desc); if (rc < 0) { LOGP(DL1C, LOGL_FATAL, "Verify L1 calibration table %s -> failed (%d)\n", desc->fname, rc); - oml_tx_failure_event_rep(&fl1h->phy_inst->trx->mo, OSMO_EVT_WARN_SW_WARN, + oml_tx_failure_event_rep(&fl1h->phy_inst->trx->mo, NM_SEVER_MAJOR, OSMO_EVT_WARN_SW_WARN, "Verify L1 calibration table %s -> failed (%d)", desc->fname, rc); st->last_file_idx = get_next_calib_file_idx(fl1h, st->last_file_idx); @@ -278,7 +278,7 @@ if (!calib_path) { LOGP(DL1C, LOGL_FATAL, "Calibration file path not specified\n"); - oml_tx_failure_event_rep(&fl1h->phy_inst->trx->mo, OSMO_EVT_WARN_SW_WARN, + oml_tx_failure_event_rep(&fl1h->phy_inst->trx->mo, NM_SEVER_MAJOR, OSMO_EVT_WARN_SW_WARN, "Calibration file path not specified"); return -1; } -- To view, visit https://gerrit.osmocom.org/14173 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I49af04212568892648e0e8704ba1cc6de8c8ae89 Gerrit-Change-Number: 14173 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:10:36 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:10:36 +0000 Subject: Change in osmo-bsc[master]: Allow VTY to set the CCCH Load Indication Threshold In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14174 to look at the new patch set (#2). Change subject: Allow VTY to set the CCCH Load Indication Threshold ...................................................................... Allow VTY to set the CCCH Load Indication Threshold Add a new VTY command "ccch load-indication-threshold <0-100>" by which the user can configure the threshold after which the BTS shall send CCCH LOAD IND. It used to be hard-coded to a default value of 10. Change-Id: I059fe4627438e26a06e00d84e342b736ab7af440 --- M include/osmocom/bsc/gsm_data.h M src/osmo-bsc/bsc_vty.c M src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c M src/osmo-bsc/gsm_data.c 4 files changed, 23 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/74/14174/2 -- To view, visit https://gerrit.osmocom.org/14174 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I059fe4627438e26a06e00d84e342b736ab7af440 Gerrit-Change-Number: 14174 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:10:54 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:10:54 +0000 Subject: Change in osmo-bsc[master]: Allow VTY to set the CCCH Load Indication Threshold In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14174 ) Change subject: Allow VTY to set the CCCH Load Indication Threshold ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14174 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I059fe4627438e26a06e00d84e342b736ab7af440 Gerrit-Change-Number: 14174 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 26 May 2019 09:10:54 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:11:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:11:09 +0000 Subject: Change in osmo-trx[master]: lms: Fix stream_stats checks with droppedPackets In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14166 ) Change subject: lms: Fix stream_stats checks with droppedPackets ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14166 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id93d33400e11360b9536f56a31904328549cfbbf Gerrit-Change-Number: 14166 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 26 May 2019 09:11:09 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:11:31 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:11:31 +0000 Subject: Change in osmo-trx[master]: lms: Fix stream_stats checks with droppedPackets In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14166 ) Change subject: lms: Fix stream_stats checks with droppedPackets ...................................................................... lms: Fix stream_stats checks with droppedPackets Existing code had a typo (value was assigned from wrong variable). Furthermore, it was experimentally found that: while underrun/overrun are documented as "FIFO overrun count" in LimeSuite.h, it seems droppedPackets ("Number of dropped packets by HW") is not actually an incrementing counter like the others, but simply a value set every time LMS_RecvStream() is called. Since we are actually interested in keeping the count over time, adjust code to achieve that. Change-Id: Id93d33400e11360b9536f56a31904328549cfbbf --- M Transceiver52M/device/lms/LMSDevice.cpp 1 file changed, 5 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp index c320540..a1ca983 100644 --- a/Transceiver52M/device/lms/LMSDevice.cpp +++ b/Transceiver52M/device/lms/LMSDevice.cpp @@ -597,12 +597,14 @@ } m_last_rx_overruns[chan] = status.overrun; - if (status.droppedPackets > m_last_rx_dropped[chan]) { + if (status.droppedPackets) { LOGCHAN(chan, DDEV, ERROR) << "recv Dropped packets by HW! (" << m_last_rx_dropped[chan] << " -> " - << status.droppedPackets << ")"; + << m_last_rx_dropped[chan] + + status.droppedPackets + << ")"; } - m_last_rx_dropped[chan] = m_last_rx_overruns[chan]; + m_last_rx_dropped[chan] += status.droppedPackets; } } -- To view, visit https://gerrit.osmocom.org/14166 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id93d33400e11360b9536f56a31904328549cfbbf Gerrit-Change-Number: 14166 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:18:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:18:08 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Add Osmux support and tests for MGW In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14046 ) Change subject: Add Osmux support and tests for MGW ...................................................................... Patch Set 5: (3 comments) https://gerrit.osmocom.org/#/c/14046/5/library/MGCP_Templates.ttcn File library/MGCP_Templates.ttcn: https://gerrit.osmocom.org/#/c/14046/5/library/MGCP_Templates.ttcn at 333 PS5, Line 333: return "ERROR-wrong-negative-value"; do you really want this as an error message in the string and then make the caller use it? Why not setverdict(fail, "netative value passed to f_mgcp_osmux_cid_encode()") or even go as far as to test.stop or whatever... https://gerrit.osmocom.org/#/c/14046/5/library/OSMUX_Types.ttcn File library/OSMUX_Types.ttcn: https://gerrit.osmocom.org/#/c/14046/5/library/OSMUX_Types.ttcn at 39 PS5, Line 39: // variant (ext_header) "PRESENCE(extension_ind = '1'B)"; : // variant (CSRC_count) "LENGTHTO(CSRCs), UNIT(elements)"; : variant "FIELDORDER(msb)" do we have any extensions here? do we expect them? otherwise remove the comments? https://gerrit.osmocom.org/#/c/14046/5/library/OSMUX_Types.ttcn at 48 PS5, Line 48: // variant (ext_header) "PRESENCE(extension_ind = '1'B)"; do we have any extensions here? do we expect them? otherwise remove the comments? -- To view, visit https://gerrit.osmocom.org/14046 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibb58b2a4e08d6f30cfe347c217794d0d1310954f Gerrit-Change-Number: 14046 Gerrit-PatchSet: 5 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 26 May 2019 09:18:08 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:20:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:20:05 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bsc: Introduce Osmux infra and one test for osmo-bsc In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14105 ) Change subject: bsc: Introduce Osmux infra and one test for osmo-bsc ...................................................................... Patch Set 6: Code-Review-1 (3 comments) https://gerrit.osmocom.org/#/c/14105/6/bsc-nat/BSC_MS_ConnectionHandler.ttcn File bsc-nat/BSC_MS_ConnectionHandler.ttcn: https://gerrit.osmocom.org/#/c/14105/6/bsc-nat/BSC_MS_ConnectionHandler.ttcn at 57 PS6, Line 57: use_osmux := false AFAIK, thhis should actually be part of the previous patch, hwere the new member is introduced. Otherwise you end up with unbound record members, which can cause all kinds of weird runtime errors (e.g. if you explicitly or implicitly tansfer them to another component, ...) https://gerrit.osmocom.org/#/c/14105/6/bsc-nat/MSC_ConnectionHandler.ttcn File bsc-nat/MSC_ConnectionHandler.ttcn: https://gerrit.osmocom.org/#/c/14105/6/bsc-nat/MSC_ConnectionHandler.ttcn at 63 PS6, Line 63: use_osmux := false, same here (previous patch) https://gerrit.osmocom.org/#/c/14105/6/msc/BSC_ConnectionHandler.ttcn File msc/BSC_ConnectionHandler.ttcn: https://gerrit.osmocom.org/#/c/14105/6/msc/BSC_ConnectionHandler.ttcn at 212 PS6, Line 212: use_osmux := false, same here (previous patch) -- To view, visit https://gerrit.osmocom.org/14105 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If69c716dc06d61d810c32d1720a237c7535baca8 Gerrit-Change-Number: 14105 Gerrit-PatchSet: 6 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Sun, 26 May 2019 09:20:05 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:21:58 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:21:58 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bsc: Introduce Osmux infra and one test for osmo-bsc In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14105 ) Change subject: bsc: Introduce Osmux infra and one test for osmo-bsc ...................................................................... Patch Set 6: Code-Review+2 (3 comments) sorry, I was somehow reading the code wrong. Please ignore previous comments. patch is fine! https://gerrit.osmocom.org/#/c/14105/6/bsc-nat/BSC_MS_ConnectionHandler.ttcn File bsc-nat/BSC_MS_ConnectionHandler.ttcn: https://gerrit.osmocom.org/#/c/14105/6/bsc-nat/BSC_MS_ConnectionHandler.ttcn at 57 PS6, Line 57: use_osmux := false > AFAIK, thhis should actually be part of the previous patch, hwere the new member is introduced. [?] Done https://gerrit.osmocom.org/#/c/14105/6/bsc-nat/MSC_ConnectionHandler.ttcn File bsc-nat/MSC_ConnectionHandler.ttcn: https://gerrit.osmocom.org/#/c/14105/6/bsc-nat/MSC_ConnectionHandler.ttcn at 63 PS6, Line 63: use_osmux := false, > same here (previous patch) Done https://gerrit.osmocom.org/#/c/14105/6/msc/BSC_ConnectionHandler.ttcn File msc/BSC_ConnectionHandler.ttcn: https://gerrit.osmocom.org/#/c/14105/6/msc/BSC_ConnectionHandler.ttcn at 212 PS6, Line 212: use_osmux := false, > same here (previous patch) Done -- To view, visit https://gerrit.osmocom.org/14105 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If69c716dc06d61d810c32d1720a237c7535baca8 Gerrit-Change-Number: 14105 Gerrit-PatchSet: 6 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Sun, 26 May 2019 09:21:58 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:24:07 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:24:07 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Introduce Osmux infra and one test for osmo-msc In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14121 ) Change subject: msc: Introduce Osmux infra and one test for osmo-msc ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14121 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibcb82d1a2d570c6c0ad0c3b6504bffe2244eccd9 Gerrit-Change-Number: 14121 Gerrit-PatchSet: 4 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 26 May 2019 09:24:07 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:24:46 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:24:46 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bsc-nat: Introduce Osmux test In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14142 ) Change subject: bsc-nat: Introduce Osmux test ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14142 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I35f206aab713ccf0a4e074872e291c349c903b9d Gerrit-Change-Number: 14142 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 26 May 2019 09:24:46 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:25:38 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:25:38 +0000 Subject: Change in osmo-msc[master]: Request Osmux CID and forward it in Assign Req and Assign Compl In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14041 ) Change subject: Request Osmux CID and forward it in Assign Req and Assign Compl ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14041 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5b14e34481e890669c9ee02dba81eba84293cebb Gerrit-Change-Number: 14041 Gerrit-PatchSet: 4 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Comment-Date: Sun, 26 May 2019 09:25:38 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:25:41 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:25:41 +0000 Subject: Change in osmo-msc[master]: Request Osmux CID and forward it in Assign Req and Assign Compl In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14041 ) Change subject: Request Osmux CID and forward it in Assign Req and Assign Compl ...................................................................... Request Osmux CID and forward it in Assign Req and Assign Compl Related: OS#2551 Depends: osmo-mgw.git I73b4c62baf39050da81d65553cbea07bc51163de Change-Id: I5b14e34481e890669c9ee02dba81eba84293cebb --- M include/osmocom/msc/call_leg.h M include/osmocom/msc/ran_msg.h M include/osmocom/msc/rtp_stream.h M src/libmsc/call_leg.c M src/libmsc/msc_a.c M src/libmsc/ran_msg_a.c M src/libmsc/rtp_stream.c 7 files changed, 111 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/include/osmocom/msc/call_leg.h b/include/osmocom/msc/call_leg.h index d8380f5..f35816c 100644 --- a/include/osmocom/msc/call_leg.h +++ b/include/osmocom/msc/call_leg.h @@ -44,6 +44,8 @@ /* Prevent events from deallocating for certain release code paths, to prevent use-after-free problems. */ bool deallocating; + + bool ran_peer_supports_osmux; }; enum call_leg_event { diff --git a/include/osmocom/msc/ran_msg.h b/include/osmocom/msc/ran_msg.h index 4d0485d..af0822b 100644 --- a/include/osmocom/msc/ran_msg.h +++ b/include/osmocom/msc/ran_msg.h @@ -84,6 +84,8 @@ const struct osmo_sockaddr_str *cn_rtp; const struct gsm0808_channel_type *channel_type; enum nsap_addr_enc rab_assign_addr_enc; + bool osmux_present; + uint8_t osmux_cid; }; struct ran_cipher_mode_command { @@ -223,6 +225,8 @@ struct osmo_sockaddr_str remote_rtp; bool codec_present; enum mgcp_codecs codec; + bool osmux_present; + uint8_t osmux_cid; } assignment_complete; struct { enum gsm0808_cause bssap_cause; diff --git a/include/osmocom/msc/rtp_stream.h b/include/osmocom/msc/rtp_stream.h index 794e806..c53c4f1 100644 --- a/include/osmocom/msc/rtp_stream.h +++ b/include/osmocom/msc/rtp_stream.h @@ -44,6 +44,15 @@ struct osmo_mgcpc_ep_ci *ci; enum mgcp_connection_mode crcx_conn_mode; + + /* configured to use Osmux */ + bool use_osmux; + /* Allocated by our MGW, negative means invalid, not yet known */ + int local_osmux_cid; + /* Allocated by BSC MGW, negative means invalid, not yet known */ + int remote_osmux_cid; + /* Whether remote_osmux_cid has been communicated to MGW */ + bool remote_osmux_cid_sent_to_mgw; }; #define RTP_STREAM_FMT "local=" RTP_IP_PORT_FMT ",remote=" RTP_IP_PORT_FMT @@ -57,6 +66,7 @@ void rtp_stream_set_codec(struct rtp_stream *rtps, enum mgcp_codecs codec); void rtp_stream_set_remote_addr(struct rtp_stream *rtps, const struct osmo_sockaddr_str *r); +void rtp_stream_set_remote_osmux_cid(struct rtp_stream *rtps, uint8_t osmux_cid); int rtp_stream_commit(struct rtp_stream *rtps); void rtp_stream_release(struct rtp_stream *rtps); diff --git a/src/libmsc/call_leg.c b/src/libmsc/call_leg.c index 46405bc..794eda2 100644 --- a/src/libmsc/call_leg.c +++ b/src/libmsc/call_leg.c @@ -321,6 +321,10 @@ if (call_leg_ensure_rtp_alloc(cl, dir, call_id, for_trans)) return -EIO; cl->rtp[dir]->crcx_conn_mode = cl->crcx_conn_mode[dir]; + if (dir == RTP_TO_RAN && cl->ran_peer_supports_osmux) { + cl->rtp[dir]->use_osmux = true; + cl->rtp[dir]->remote_osmux_cid = -1; /* wildcard */ + } if (codec_if_known) rtp_stream_set_codec(cl->rtp[dir], *codec_if_known); if (remote_addr_if_known && osmo_sockaddr_str_is_set(remote_addr_if_known)) diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c index cfba545..b311df3 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -527,6 +527,8 @@ .assignment_command = { .cn_rtp = &msc_a->cc.call_leg->rtp[RTP_TO_RAN]->local, .channel_type = &channel_type, + .osmux_present = msc_a->cc.call_leg->rtp[RTP_TO_RAN]->use_osmux, + .osmux_cid = msc_a->cc.call_leg->rtp[RTP_TO_RAN]->local_osmux_cid, }, }; if (msc_a_ran_down(msc_a, MSC_ROLE_I, &msg)) { @@ -620,8 +622,9 @@ return; } LOG_MSC_A(msc_a, LOGL_DEBUG, - "MGW endpoint's RTP address available for the CI %s: " OSMO_SOCKADDR_STR_FMT "\n", - rtp_direction_name(rtps->dir), OSMO_SOCKADDR_STR_FMT_ARGS(&rtps->local)); + "MGW endpoint's RTP address available for the CI %s: " OSMO_SOCKADDR_STR_FMT " (osmux=%s:%d)\n", + rtp_direction_name(rtps->dir), OSMO_SOCKADDR_STR_FMT_ARGS(&rtps->local), + rtps->use_osmux ? "yes" : "no", rtps->local_osmux_cid); switch (rtps->dir) { case RTP_TO_RAN: msc_a_call_leg_ran_local_addr_available(msc_a); @@ -1257,9 +1260,20 @@ return; } + if (rtps_to_ran->use_osmux != ac->assignment_complete.osmux_present) { + LOG_MSC_A_CAT(msc_a, DCC, LOGL_ERROR, "Osmux usage ass request and complete don't match: %d vs %d\n", + rtps_to_ran->use_osmux, ac->assignment_complete.osmux_present); + call_leg_release(msc_a->cc.call_leg); + return; + } + /* Update RAN-side endpoint CI: */ rtp_stream_set_codec(rtps_to_ran, ac->assignment_complete.codec); rtp_stream_set_remote_addr(rtps_to_ran, &ac->assignment_complete.remote_rtp); + if (rtps_to_ran->use_osmux) + rtp_stream_set_remote_osmux_cid(rtps_to_ran, + ac->assignment_complete.osmux_cid); + rtp_stream_commit(rtps_to_ran); /* Setup CN side endpoint CI: @@ -1592,6 +1606,8 @@ static int msc_a_start_assignment(struct msc_a *msc_a, struct gsm_trans *cc_trans) { struct call_leg *cl = msc_a->cc.call_leg; + struct msc_i *msc_i = msc_a_msc_i(msc_a); + struct gsm_network *net = msc_a_net(msc_a); OSMO_ASSERT(!msc_a->cc.active_trans); msc_a->cc.active_trans = cc_trans; @@ -1612,6 +1628,16 @@ cl->crcx_conn_mode[RTP_TO_RAN] = MGCP_CONN_LOOPBACK; } + if (net->use_osmux != OSMUX_USAGE_OFF) { + msc_i = msc_a_msc_i(msc_a); + if (msc_i->c.remote_to) { + /* TODO: investigate what to do in this case */ + LOG_MSC_A(msc_a, LOGL_ERROR, "Osmux not yet supported for inter-MSC"); + } else { + cl->ran_peer_supports_osmux = msc_i->ran_conn->ran_peer->remote_supports_osmux; + } + } + /* This will lead to either MSC_EV_CALL_LEG_LOCAL_ADDR_AVAILABLE or MSC_EV_CALL_LEG_TERM. * If the local address is already known, then immediately trigger. */ if (call_leg_local_ip(cl, RTP_TO_RAN)) diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c index 64590a1..fd8afdc 100644 --- a/src/libmsc/ran_msg_a.c +++ b/src/libmsc/ran_msg_a.c @@ -269,6 +269,7 @@ { struct tlv_p_entry *ie_aoip_transp_addr = TLVP_GET(tp, GSM0808_IE_AOIP_TRASP_ADDR); struct tlv_p_entry *ie_speech_codec = TLVP_GET(tp, GSM0808_IE_SPEECH_CODEC); + struct tlv_p_entry *ie_osmux_cid = TLVP_GET(tp, GSM0808_IE_OSMO_OSMUX_CID); struct sockaddr_storage rtp_addr; struct sockaddr_in *rtp_addr_in; struct gsm0808_speech_codec sc; @@ -300,6 +301,15 @@ } } + if (ie_osmux_cid) { + rc = gsm0808_dec_osmux_cid(&ran_dec_msg.assignment_complete.osmux_cid, ie_osmux_cid->val, ie_osmux_cid->len); + if (rc < 0) { + LOG_RAN_A_DEC_MSG(LOGL_ERROR, "Unable to decode Osmux CID\n"); + return -EINVAL; + } + ran_dec_msg.assignment_complete.osmux_present = true; + } + if (ie_speech_codec) { /* Decode Speech Codec (Chosen) element */ rc = gsm0808_dec_speech_codec(&sc, ie_speech_codec->val, ie_speech_codec->len); @@ -902,6 +912,13 @@ return 0; } +static void _gsm0808_assignment_extend_osmux(struct msgb *msg, uint8_t cid) +{ + OSMO_ASSERT(msg->l3h[1] == msgb_l3len(msg) - 2); /*TL not in len */ + msgb_tv_put(msg, GSM0808_IE_OSMO_OSMUX_CID, cid); + msg->l3h[1] = msgb_l3len(msg) - 2; +} + /* Compose a BSSAP Assignment Command. * Passing an RTP address is optional. * The msub is passed merely for error logging. */ @@ -912,6 +929,7 @@ struct gsm0808_speech_codec_list *use_scl = NULL; struct sockaddr_storage rtp_addr; struct sockaddr_storage *use_rtp_addr = NULL; + struct msgb *msg; int rc; if (!ac->channel_type) { @@ -952,7 +970,10 @@ } } - return gsm0808_create_ass(ac->channel_type, NULL, use_rtp_addr, use_scl, NULL); + msg = gsm0808_create_ass(ac->channel_type, NULL, use_rtp_addr, use_scl, NULL); + if (ac->osmux_present) + _gsm0808_assignment_extend_osmux(msg, ac->osmux_cid); + return msg; } /* For an A5/N number a5_n set dst to the matching GSM0808_ALG_ID_A5_. */ diff --git a/src/libmsc/rtp_stream.c b/src/libmsc/rtp_stream.c index afe24ad..c3880bf 100644 --- a/src/libmsc/rtp_stream.c +++ b/src/libmsc/rtp_stream.c @@ -82,11 +82,19 @@ OSMO_STRBUF_PRINTF(sb, ":no-codec"); else if (!rtps->codec_sent_to_mgw) OSMO_STRBUF_PRINTF(sb, ":codec-not-sent"); + if (rtps->use_osmux) { + if (rtps->remote_osmux_cid < 0) + OSMO_STRBUF_PRINTF(sb, ":no-remote-osmux-cid"); + else if (!rtps->remote_osmux_cid_sent_to_mgw) + OSMO_STRBUF_PRINTF(sb, ":remote-osmux-cid-not-sent"); + } } if (osmo_sockaddr_str_is_set(&rtps->local)) OSMO_STRBUF_PRINTF(sb, ":local-%s-%u", rtps->local.ip, rtps->local.port); if (osmo_sockaddr_str_is_set(&rtps->remote)) OSMO_STRBUF_PRINTF(sb, ":remote-%s-%u", rtps->remote.ip, rtps->remote.port); + if (rtps->use_osmux) + OSMO_STRBUF_PRINTF(sb, ":osmux-%d-%d", rtps->local_osmux_cid, rtps->remote_osmux_cid); /* Replace any dots in the IP address, dots not allowed as FSM instance name */ for (p = buf; *p; p++) @@ -117,6 +125,8 @@ .call_id = call_id, .for_trans = for_trans, .dir = dir, + .local_osmux_cid = -2, + .remote_osmux_cid = -2, }; rtp_stream_update_id(rtps); @@ -130,6 +140,7 @@ && osmo_sockaddr_str_is_set(&rtps->local) && osmo_sockaddr_str_is_set(&rtps->remote) && rtps->remote_sent_to_mgw + && (!rtps->use_osmux || rtps->remote_osmux_cid_sent_to_mgw) && rtps->codec_known) rtp_stream_state_chg(rtps, RTP_STREAM_ST_ESTABLISHED); } @@ -148,17 +159,27 @@ } osmo_sockaddr_str_from_str(&rtps->local, crcx_info->addr, crcx_info->port); + if (rtps->use_osmux != crcx_info->x_osmo_osmux_use) { + LOG_RTPS(rtps, LOGL_ERROR, "Osmux usage request and response don't match: %d vs %d", + rtps->use_osmux, crcx_info->x_osmo_osmux_use); + /* TODO: proper failure path */ + OSMO_ASSERT(rtps->use_osmux != crcx_info->x_osmo_osmux_use); + } + if (crcx_info->x_osmo_osmux_use) + rtps->local_osmux_cid = crcx_info->x_osmo_osmux_cid; rtp_stream_update_id(rtps); osmo_fsm_inst_dispatch(fi->proc.parent, CALL_LEG_EV_RTP_STREAM_ADDR_AVAILABLE, rtps); check_established(rtps); if ((!rtps->remote_sent_to_mgw || !rtps->codec_sent_to_mgw) && osmo_sockaddr_str_is_set(&rtps->remote) + && (!rtps->use_osmux || rtps->remote_osmux_cid_sent_to_mgw) && rtps->codec_known) { LOG_RTPS(rtps, LOGL_DEBUG, - "local ip:port set;%s%s triggering MDCX to send the new settings\n", + "local ip:port set;%s%s%s triggering MDCX to send the new settings\n", (!rtps->remote_sent_to_mgw)? " remote ip:port not yet sent," : "", - (!rtps->codec_sent_to_mgw)? " codec not yet sent," : ""); + (!rtps->codec_sent_to_mgw)? " codec not yet sent," : "", + (rtps->use_osmux && !rtps->remote_osmux_cid_sent_to_mgw) ? "Osmux CID not yet sent,": ""); rtp_stream_do_mdcx(rtps); } return; @@ -172,6 +193,7 @@ case RTP_STREAM_EV_MDCX_FAIL: rtps->remote_sent_to_mgw = false; rtps->codec_sent_to_mgw = false; + rtps->remote_osmux_cid_sent_to_mgw = false; rtp_stream_update_id(rtps); rtp_stream_state_chg(rtps, RTP_STREAM_ST_DISCARDING); return; @@ -280,6 +302,8 @@ verb_info = (struct mgcp_conn_peer){ .call_id = rtps->call_id, .ptime = 20, + .x_osmo_osmux_use = rtps->use_osmux, + .x_osmo_osmux_cid = rtps->remote_osmux_cid, }; if (verb == MGCP_VERB_CRCX) @@ -353,9 +377,10 @@ return 0; } - LOG_RTPS(rtps, LOGL_DEBUG, "Committing: Tx MDCX to update the MGW: updating%s%s\n", + LOG_RTPS(rtps, LOGL_DEBUG, "Committing: Tx MDCX to update the MGW: updating%s%s%s\n", rtps->remote_sent_to_mgw ? "" : " remote-RTP-IP-port", - rtps->codec_sent_to_mgw ? "" : " codec"); + rtps->codec_sent_to_mgw ? "" : " codec", + (!rtps->use_osmux || rtps->remote_osmux_cid_sent_to_mgw) ? "" : " remote-Osmux-CID"); return rtp_stream_do_mdcx(rtps); } @@ -380,6 +405,16 @@ rtp_stream_update_id(rtps); } +void rtp_stream_set_remote_osmux_cid(struct rtp_stream *rtps, uint8_t osmux_cid) +{ + if (rtps->fi->state == RTP_STREAM_ST_ESTABLISHED) + rtp_stream_state_chg(rtps, RTP_STREAM_ST_ESTABLISHING); + LOG_RTPS(rtps, LOGL_DEBUG, "setting remote Osmux CID to %u\n", osmux_cid); + rtps->remote_osmux_cid = osmux_cid; + rtps->remote_osmux_cid_sent_to_mgw = false; + rtp_stream_update_id(rtps); +} + bool rtp_stream_is_established(struct rtp_stream *rtps) { if (!rtps) @@ -389,7 +424,8 @@ if (rtps->fi->state != RTP_STREAM_ST_ESTABLISHED) return false; if (!rtps->remote_sent_to_mgw - || !rtps->codec_sent_to_mgw) + || !rtps->codec_sent_to_mgw + || (rtps->use_osmux && !rtps->remote_osmux_cid_sent_to_mgw)) return false; return true; } -- To view, visit https://gerrit.osmocom.org/14041 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I5b14e34481e890669c9ee02dba81eba84293cebb Gerrit-Change-Number: 14041 Gerrit-PatchSet: 4 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:26:13 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:26:13 +0000 Subject: Change in openbsc[master]: mgcp: Handle CI and X-Osmux param name as case insensitive In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14131 ) Change subject: mgcp: Handle CI and X-Osmux param name as case insensitive ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14131 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iadc004064a5a237c93009f242cb943ebc4d2d7e6 Gerrit-Change-Number: 14131 Gerrit-PatchSet: 5 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Sun, 26 May 2019 09:26:13 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:26:15 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:26:15 +0000 Subject: Change in openbsc[master]: mgcp: Handle CI and X-Osmux param name as case insensitive In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14131 ) Change subject: mgcp: Handle CI and X-Osmux param name as case insensitive ...................................................................... mgcp: Handle CI and X-Osmux param name as case insensitive RFC3435 states most text (except SDP) must be handled as case insensitive. Since we are no longer using strstr(msg->l2h), we need to iterate per line and call related extract/handle function for that line. Call to bsc_mgcp_osmux_confirm() is left at the end because it needs to be called too in case no matching line is found. In that case, it will release the CID. Similar stuff ocurrs for bsc_mgcp_extract_ci(). Related: OS#4001 Change-Id: Iadc004064a5a237c93009f242cb943ebc4d2d7e6 --- M openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c M openbsc/tests/bsc-nat/bsc_nat_test.c 2 files changed, 66 insertions(+), 13 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c index 17dc659..1b0abf3 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c +++ b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c @@ -663,19 +663,38 @@ mgcp_release_endp(endp); } +/*! Check MGCP parameter line (string) for plausibility. + * \param[in] endp pointer to endpoint (only used for log output) + * \param[in] line single parameter line from the MGCP message + * \returns 1 when line seems plausible, 0 on error */ +static int bsc_mgcp_check_param(const struct mgcp_endpoint *endp, const char *line) +{ + const size_t line_len = strlen(line); + if (line[0] != '\0' && line_len < 2) { + LOGP(DLMGCP, LOGL_ERROR, + "Wrong MGCP option format: '%s' on 0x%x\n", + line, ENDPOINT_NUMBER(endp)); + return 0; + } + + /* FIXME: A couple more checks wouldn't hurt... */ + + return 1; +} + static void bsc_mgcp_osmux_confirm(struct mgcp_endpoint *endp, const char *str) { unsigned int osmux_cid; - char *res; + const char x_osmux_prefix[] = "X-Osmux: "; + const size_t x_osmux_prefix_len = strlen(x_osmux_prefix); - res = strstr(str, "X-Osmux: "); - if (!res) { + if (!str || strncasecmp(str, x_osmux_prefix, x_osmux_prefix_len)) { LOGP(DMGCP, LOGL_INFO, - "BSC doesn't want to use Osmux, failing back to RTP\n"); + "BSC doesn't want to use Osmux, failing back to RTP (str=%s)\n", str); goto err; } - if (sscanf(res, "X-Osmux: %u", &osmux_cid) != 1) { + if (sscanf(str + x_osmux_prefix_len, "%u", &osmux_cid) != 1) { LOGP(DMGCP, LOGL_ERROR, "Failed to parse Osmux CID '%s'\n", str); goto err; @@ -713,6 +732,10 @@ struct mgcp_endpoint *endp = NULL; int i, code; char transaction_id[60]; + char *save; + char *line = NULL; + char *line_osmux = NULL; + char *line_ci = NULL; /* Some assumption that our buffer is big enough.. and null terminate */ if (msgb_l2len(msg) > 2000) { @@ -752,14 +775,42 @@ return; } - endp->ci = bsc_mgcp_extract_ci((const char *) msg->l2h); + save = alloca(msgb_l2len(msg) + 1); /* +1 -> null char appended */ + memcpy(save, msg->l2h, msgb_l2len(msg) + 1); + for_each_line(line, save) { + + if (!bsc_mgcp_check_param(endp, line)) + continue; + + switch (line[0]) { + case 'I': + case 'i': + line_ci = line; + break; + case 'X': + case 'x': + if (strncasecmp(line, "X-Osmux: ", strlen("X-Osmux: ")) == 0) + line_osmux = line; + /* Ignore unknown X-headers */ + break; + case '\0': + /* Reached SDP section, we are done parsing header */ + goto mgcp_header_done; + break; + default: + break; + } + } +mgcp_header_done: + + endp->ci = bsc_mgcp_extract_ci((const char *) line_ci); if (endp->ci == CI_UNUSED) { free_chan_downstream(endp, bsc_endp, bsc); return; } if (endp->osmux.state == OSMUX_STATE_NEGOTIATING) - bsc_mgcp_osmux_confirm(endp, (const char *) msg->l2h); + bsc_mgcp_osmux_confirm(endp, line_osmux); /* If we require osmux and it is disabled.. fail */ if (nat_osmux_only(bsc->nat->mgcp_cfg, bsc->cfg) && @@ -806,14 +857,16 @@ uint32_t bsc_mgcp_extract_ci(const char *str) { unsigned int ci; - char *res = strstr(str, "I: "); - if (!res) { - LOGP(DMGCP, LOGL_ERROR, "No CI in msg '%s'\n", str); + const char ci_prefix[] = "I: "; + const size_t ci_prefix_len = strlen(ci_prefix); + + if (!str || strncasecmp(str, ci_prefix, ci_prefix_len)) { + LOGP(DMGCP, LOGL_ERROR, "No CI in line '%s'\n", str); return CI_UNUSED; } - if (sscanf(res, "I: %x", &ci) != 1) { - LOGP(DMGCP, LOGL_ERROR, "Failed to parse CI in msg '%s'\n", str); + if (sscanf(str + ci_prefix_len, "%x", &ci) != 1) { + LOGP(DMGCP, LOGL_ERROR, "Failed to parse CI in line '%s'\n", str); return CI_UNUSED; } diff --git a/openbsc/tests/bsc-nat/bsc_nat_test.c b/openbsc/tests/bsc-nat/bsc_nat_test.c index 4bee60d..f6cf8b0 100644 --- a/openbsc/tests/bsc-nat/bsc_nat_test.c +++ b/openbsc/tests/bsc-nat/bsc_nat_test.c @@ -675,7 +675,7 @@ abort(); } - ci = bsc_mgcp_extract_ci(crcx_resp); + ci = bsc_mgcp_extract_ci(strstr(crcx_resp, "I: ")); if (ci != 0x0F) { printf("Failed to parse the CI. Got: %d\n", ci); abort(); -- To view, visit https://gerrit.osmocom.org/14131 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iadc004064a5a237c93009f242cb943ebc4d2d7e6 Gerrit-Change-Number: 14131 Gerrit-PatchSet: 6 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:27:21 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:27:21 +0000 Subject: Change in osmo-msc[master]: transaction: accept trans_type enum in trans_log_subsys() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13974 ) Change subject: transaction: accept trans_type enum in trans_log_subsys() ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13974 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I3c373d20ebd6e96ebd57f84b74dc15a6b69c03ac Gerrit-Change-Number: 13974 Gerrit-PatchSet: 5 Gerrit-Owner: Vadim Yanitskiy Gerrit-Assignee: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Comment-Date: Sun, 26 May 2019 09:27:21 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:27:23 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:27:23 +0000 Subject: Change in osmo-msc[master]: transaction: accept trans_type enum in trans_log_subsys() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13974 ) Change subject: transaction: accept trans_type enum in trans_log_subsys() ...................................................................... transaction: accept trans_type enum in trans_log_subsys() Change-Id: I3c373d20ebd6e96ebd57f84b74dc15a6b69c03ac --- M include/osmocom/msc/transaction.h M src/libmsc/transaction.c 2 files changed, 6 insertions(+), 7 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/msc/transaction.h b/include/osmocom/msc/transaction.h index ba609ea..69cd652 100644 --- a/include/osmocom/msc/transaction.h +++ b/include/osmocom/msc/transaction.h @@ -159,11 +159,9 @@ struct gsm_trans *trans_has_conn(const struct msc_a *msc_a); void trans_conn_closed(const struct msc_a *msc_a); -static inline int trans_log_subsys(const struct gsm_trans *trans) +static inline int trans_log_subsys(enum trans_type type) { - if (!trans) - return DMSC; - switch (trans->type) { + switch (type) { case TRANS_CC: case TRANS_SILENT_CALL: return DCC; diff --git a/src/libmsc/transaction.c b/src/libmsc/transaction.c index d6f8c3b..ebdaced 100644 --- a/src/libmsc/transaction.c +++ b/src/libmsc/transaction.c @@ -127,11 +127,12 @@ enum trans_type type, uint8_t trans_id, uint32_t callref) { - struct gsm_trans *trans = NULL; /* (NULL for LOG_TRANS() before allocation) */ + int subsys = trans_log_subsys(type); + struct gsm_trans *trans; /* a valid subscriber is indispensable */ if (vsub == NULL) { - LOG_TRANS(trans, LOGL_ERROR, "unable to alloc transaction, invalid subscriber (NULL)\n"); + LOGP(subsys, LOGL_ERROR, "unable to alloc transaction, invalid subscriber (NULL)\n"); return NULL; } @@ -142,11 +143,11 @@ *trans = (struct gsm_trans){ .vsub = vsub, .type = type, + .log_subsys = subsys, .transaction_id = trans_id, .callref = callref, .net = net, }; - trans->log_subsys = trans_log_subsys(trans); vlr_subscr_get(vsub, trans_vsub_use(type)); llist_add_tail(&trans->entry, &net->trans_list); -- To view, visit https://gerrit.osmocom.org/13974 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I3c373d20ebd6e96ebd57f84b74dc15a6b69c03ac Gerrit-Change-Number: 13974 Gerrit-PatchSet: 6 Gerrit-Owner: Vadim Yanitskiy Gerrit-Assignee: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:29:15 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:29:15 +0000 Subject: Change in docker-playground[master]: ttcn3-bscnat: Prepare cfgs for VTY & Osmux support In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14130 ) Change subject: ttcn3-bscnat: Prepare cfgs for VTY & Osmux support ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/14130/2/ttcn3-bscnat-test/bscs.config File ttcn3-bscnat-test/bscs.config: https://gerrit.osmocom.org/#/c/14130/2/ttcn3-bscnat-test/bscs.config at 8 PS2, Line 8: osmux on can we do this here? Always think of running the same test against "latest" which doesn't have that parameter yet... -- To view, visit https://gerrit.osmocom.org/14130 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I794a17bdeaff9ab9316d7a6acb1e58dfd815b645 Gerrit-Change-Number: 14130 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Harald Welte Gerrit-Comment-Date: Sun, 26 May 2019 09:29:15 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:29:48 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:29:48 +0000 Subject: Change in osmo-bsc[master]: Allow VTY to set the CCCH Load Indication Threshold In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14174 ) Change subject: Allow VTY to set the CCCH Load Indication Threshold ...................................................................... Allow VTY to set the CCCH Load Indication Threshold Add a new VTY command "ccch load-indication-threshold <0-100>" by which the user can configure the threshold after which the BTS shall send CCCH LOAD IND. It used to be hard-coded to a default value of 10. Change-Id: I059fe4627438e26a06e00d84e342b736ab7af440 --- M include/osmocom/bsc/gsm_data.h M src/osmo-bsc/bsc_vty.c M src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c M src/osmo-bsc/gsm_data.c 4 files changed, 23 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 82bd238..a464001 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -1115,6 +1115,9 @@ bool ctrl_ack_type_use_block; } gprs; + /* threshold (in percent) when BTS shall send CCCH LOAD IND */ + int ccch_load_ind_thresh; + /* RACH NM values */ int rach_b_thresh; int rach_ldavg_slots; diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index af25cab..111c910 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -848,6 +848,9 @@ vty_out(vty, " channel-descrption bs-ag-blks-res %u%s", bts->si_common.chan_desc.bs_ag_blks_res, VTY_NEWLINE); + if (bts->ccch_load_ind_thresh != 10) + vty_out(vty, " ccch load-indication-threshold %u%s", + bts->ccch_load_ind_thresh, VTY_NEWLINE); if (bts->rach_b_thresh != -1) vty_out(vty, " rach nm busy threshold %u%s", bts->rach_b_thresh, VTY_NEWLINE); @@ -2434,6 +2437,20 @@ return CMD_SUCCESS; } +#define CCCH_STR "Common Control Channel\n" + +DEFUN(cfg_bts_ccch_load_ind_thresh, + cfg_bts_ccch_load_ind_thresh_cmd, + "ccch load-indication-threshold <0-100>", + CCCH_STR + "Percentage of CCCH load at which BTS sends RSL CCCH LOAD IND\n" + "CCCH Load Threshold in percent (Default: 10)") +{ + struct gsm_bts *bts = vty->index; + bts->ccch_load_ind_thresh = atoi(argv[0]); + return CMD_SUCCESS; +} + #define NM_STR "Network Management\n" DEFUN(cfg_bts_rach_nm_b_thresh, @@ -5233,6 +5250,7 @@ install_element(BTS_NODE, &cfg_bts_chan_desc_att_cmd); install_element(BTS_NODE, &cfg_bts_chan_desc_bs_pa_mfrms_cmd); install_element(BTS_NODE, &cfg_bts_chan_desc_bs_ag_blks_res_cmd); + install_element(BTS_NODE, &cfg_bts_ccch_load_ind_thresh_cmd); install_element(BTS_NODE, &cfg_bts_rach_nm_b_thresh_cmd); install_element(BTS_NODE, &cfg_bts_rach_nm_ldavg_cmd); install_element(BTS_NODE, &cfg_bts_cell_barred_cmd); diff --git a/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c b/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c index 8a370da..be823ae 100644 --- a/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c +++ b/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c @@ -60,7 +60,7 @@ msgb_tv_fixed_put(msgb, NM_ATT_OVERL_PERIOD, 3, buf); /* percent */ - msgb_tv_put(msgb, NM_ATT_CCCH_L_T, 10); + msgb_tv_put(msgb, NM_ATT_CCCH_L_T, bts->ccch_load_ind_thresh); /* seconds */ msgb_tv_put(msgb, NM_ATT_CCCH_L_I_P, 1); diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index 5942fba..ea33817 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -827,6 +827,7 @@ } bts->c0->ts[0].pchan_from_config = GSM_PCHAN_CCCH_SDCCH4; /* TODO: really?? */ + bts->ccch_load_ind_thresh = 10; /* 10% of Load: Start sending CCCH LOAD IND */ bts->rach_b_thresh = -1; bts->rach_ldavg_slots = -1; -- To view, visit https://gerrit.osmocom.org/14174 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I059fe4627438e26a06e00d84e342b736ab7af440 Gerrit-Change-Number: 14174 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:29:51 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 09:29:51 +0000 Subject: Change in osmo-bsc[master]: rx_fail_evt_rep(): Don't recycle variable In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14175 ) Change subject: rx_fail_evt_rep(): Don't recycle variable ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14175 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie79279fc1d42cd57e7478820493b250fe38c2f4f Gerrit-Change-Number: 14175 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Sun, 26 May 2019 09:29:51 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 09:58:40 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 26 May 2019 09:58:40 +0000 Subject: Change in libosmocore[master]: gsm0408/gsm0408_test.c: introduce BCD number encoding / decoding test In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14184 to look at the new patch set (#4). Change subject: gsm0408/gsm0408_test.c: introduce BCD number encoding / decoding test ...................................................................... gsm0408/gsm0408_test.c: introduce BCD number encoding / decoding test So far, both gsm48_encode_bcd_number() and gsm48_decode_bcd_number2() did not have any unit test coverage. Let's fill this gap by testing the following scenarios: - encoding / decoding of a regular 9-digit MSISDN; - encoding / decoding of a MSISDN with optional LHV; - encoding / decoding of a long 15-digit MSISDN; - encoding / decoding of a MSISDN to a buffer: - with exactly matching size, - with lower size (truncation); - decoding LV buffer with incorrect length, - encoding / decoding an empty input buffer. As it turns out, gsm48_decode_bcd_number2() does not properly handle encoded LV if the output buffer size is equal to the original MSISDN length + 1 (\0-terminator): one digit is lost. For example, decoding of 15-digit long MSISDN to a buffer of size 16 (15 digits + 1 for \0) would give us only 14 digits. This is reflected in the unit test output: Decoding HEX (buffer limit=16) '0821436587092143f5'... Expected: (rc=0) '123456789012345' Actual: (rc=0) '12345678901234' Moreover, if the output buffer is shorter than decoded number, gsm48_decode_bcd_number2() silently truncates it and returns 0, while its description states, that the rc should reflect this. To be fixed in the follow-up patches. Change-Id: I4b2c330cf8ffe4427c0bee7d5f3b74be56ecd85d Related: OS#4025 --- M tests/gsm0408/gsm0408_test.c M tests/gsm0408/gsm0408_test.ok 2 files changed, 224 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/84/14184/4 -- To view, visit https://gerrit.osmocom.org/14184 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4b2c330cf8ffe4427c0bee7d5f3b74be56ecd85d Gerrit-Change-Number: 14184 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 10:59:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 10:59:47 +0000 Subject: Change in osmo-ttcn3-hacks[master]: PCU: Fully implement TC_pcu_data_req_{pdtch, ptcch} In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14183 to look at the new patch set (#3). Change subject: PCU: Fully implement TC_pcu_data_req_{pdtch,ptcch} ...................................................................... PCU: Fully implement TC_pcu_data_req_{pdtch,ptcch} As trxcon+fake_trx don't have GPRS (TBF) support yet, we cannot do any PCU related tests involving the Um interface yet. Instead, let's use virtphy to fill that gap. Using virtphy, we can actually receive/transmit GPRS blocks on the simulated Um interface. TC_pcu_data_req_{pdtch,ptcch} are moved to a new test suite "BTS_Tests_virtphy.ttcn" which should symbolize that the related tests are to be executed with osmo-bts-virtual + virtphy instead of osmo-bts-trx + fake_trx + trxcon. You also have to set the following module parameter to make this work: BTS_Tests.mp_bts_trxc_port := -1 Related: OS#4023 Change-Id: I677f660b1076148b3317b08b06eb3d6551d9b577 --- M bts/BTS_Tests.ttcn A bts/BTS_Tests_virtphy.ttcn 2 files changed, 128 insertions(+), 26 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/83/14183/3 -- To view, visit https://gerrit.osmocom.org/14183 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I677f660b1076148b3317b08b06eb3d6551d9b577 Gerrit-Change-Number: 14183 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 10:59:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 10:59:47 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Fully implement TC_pcu_data_req_{wrong_{bts, trx, ts}, ts_inactive}() Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14190 Change subject: Fully implement TC_pcu_data_req_{wrong_{bts,trx,ts},ts_inactive}() ...................................................................... Fully implement TC_pcu_data_req_{wrong_{bts,trx,ts},ts_inactive}() The four existing test in BTS_Tests.ttcn so far didn't have any chance to verify if the invalid messages actually ended up on the air interface or not. By moving them to BTS_Tests_virtphy, we can finally add that missing part. Change-Id: Ie05d6b1530bd4d4cf4eaa574b068870682439ee4 Related: OS#4023 --- M bts/BTS_Tests.ttcn M bts/BTS_Tests_virtphy.ttcn 2 files changed, 81 insertions(+), 48 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/90/14190/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index a555a83..f4f828f 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -3307,45 +3307,6 @@ } } -/* Send DATA.req on invalid BTS */ -testcase TC_pcu_data_req_wrong_bts() runs on test_CT { - f_init_pcu_test(); - - f_TC_pcu_act_req(0, 0, 7, true); - f_pcu_data_req(23, 0, 7, 0, 0, PCU_IF_SAPI_PDTCH, c_PCU_DATA); - /* FIXME: how to check this wasn't actually sent and didn't crash BTS? */ - f_sleep(10.0); -} - -/* Send DATA.req on invalid TRX */ -testcase TC_pcu_data_req_wrong_trx() runs on test_CT { - f_init_pcu_test(); - - f_TC_pcu_act_req(0, 0, 7, true); - f_pcu_data_req(0, 100, 7, 0, 0, PCU_IF_SAPI_PDTCH, c_PCU_DATA); - /* FIXME: how to check this wasn't actually sent and didn't crash BTS? */ - f_sleep(10.0); -} - -/* Send DATA.req on invalid timeslot */ -testcase TC_pcu_data_req_wrong_ts() runs on test_CT { - f_init_pcu_test(); - - f_TC_pcu_act_req(0, 0, 7, true); - f_pcu_data_req(0, 0, 70, 0, 0, PCU_IF_SAPI_PDTCH, c_PCU_DATA); - /* FIXME: how to check this wasn't actually sent and didn't crash BTS? */ - f_sleep(10.0); -} - -/* Send DATA.req on timeslot that hasn't been activated */ -testcase TC_pcu_data_req_ts_inactive() runs on test_CT { - f_init_pcu_test(); - - f_pcu_data_req(0, 0, 7, 0, 0, PCU_IF_SAPI_PDTCH, c_PCU_DATA); - /* FIXME: how to check this wasn't actually sent and didn't crash BTS? */ - f_sleep(2.0); -} - /* Send AGCH from PCU; check it appears on Um side */ testcase TC_pcu_data_req_agch() runs on test_CT { timer T := 3.0; @@ -4965,10 +4926,6 @@ execute( TC_pcu_deact_req() ); execute( TC_pcu_deact_req_wrong_ts() ); execute( TC_pcu_ver_si13() ); - execute( TC_pcu_data_req_wrong_bts() ); - execute( TC_pcu_data_req_wrong_trx() ); - execute( TC_pcu_data_req_wrong_ts() ); - execute( TC_pcu_data_req_ts_inactive() ); execute( TC_pcu_data_req_agch() ); execute( TC_pcu_data_req_imm_ass_pch() ); execute( TC_pcu_rach_content() ); diff --git a/bts/BTS_Tests_virtphy.ttcn b/bts/BTS_Tests_virtphy.ttcn index fd82d6e..33b37e0 100644 --- a/bts/BTS_Tests_virtphy.ttcn +++ b/bts/BTS_Tests_virtphy.ttcn @@ -39,25 +39,37 @@ ***********************************************************************/ private function f_pcu_to_l1(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr, - PCUIF_Sapi sapi, octetstring data) runs on test_CT -{ + PCUIF_Sapi sapi, octetstring data, boolean expect_data := true, + boolean wait_rts := true) +runs on test_CT { timer T := 5.0; + var L1ctlDlMessage rx_dl; PCU.clear; - f_pcu_wait_rts_and_data_req(bts_nr, trx_nr, ts_nr, sapi, data); + if (wait_rts) { + f_pcu_wait_rts_and_data_req(bts_nr, trx_nr, ts_nr, sapi, data); + } else { + f_pcu_data_req(bts_nr, trx_nr, ts_nr, 0, 0, sapi, data); + } T.start; alt { - [] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_PDCH(ts_nr), ?, data)) { + [expect_data] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_PDCH(ts_nr), ?, data)) { /* FIXME: why is fn of DATA_IND different to fn of RTS / DATA_REQ above? */ setverdict(pass); } + [not expect_data] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_PDCH(ts_nr), ?, data)) -> value rx_dl { + setverdict(fail, "Received unexpected ", rx_dl); + } [] L1CTL.receive { repeat; } - [] T.timeout { + [expect_data] T.timeout { setverdict(fail, "Timeout waiting for ", data); } + [not expect_data] T.timeout { + setverdict(pass); + } } } @@ -105,12 +117,76 @@ f_pcu_to_l1(0, 0, 7, PCU_IF_SAPI_PTCCH, data); } +/* Send DATA.req on invalid BTS */ +testcase TC_pcu_data_req_wrong_bts() runs on test_CT { + var TfiUsfArr tua := f_TfiUsfArrInit(); + var octetstring data := '0000'O & f_rnd_octstring(21); + + f_virtphy_common(); + + f_TC_pcu_act_req(0, 0, 7, true); + f_TfiUsfArrSet(tua, 7, 0); + f_L1CTL_TBF_CFG(L1CTL, false, tua); + f_sleep(1.0); + + f_pcu_to_l1(23, 0, 7, PCU_IF_SAPI_PDTCH, data, false, false); +} + +/* Send DATA.req on invalid TRX */ +testcase TC_pcu_data_req_wrong_trx() runs on test_CT { + var TfiUsfArr tua := f_TfiUsfArrInit(); + var octetstring data := '0000'O & f_rnd_octstring(21); + + f_virtphy_common(); + + f_TC_pcu_act_req(0, 0, 7, true); + f_TfiUsfArrSet(tua, 7, 0); + f_L1CTL_TBF_CFG(L1CTL, false, tua); + f_sleep(1.0); + + f_pcu_to_l1(0, 100, 7, PCU_IF_SAPI_PDTCH, data, false, false); +} + +/* Send DATA.req on invalid timeslot */ +testcase TC_pcu_data_req_wrong_ts() runs on test_CT { + var TfiUsfArr tua := f_TfiUsfArrInit(); + var octetstring data := '0000'O & f_rnd_octstring(21); + + f_virtphy_common(); + + f_TC_pcu_act_req(0, 0, 7, true); + f_TfiUsfArrSet(tua, 7, 0); + f_L1CTL_TBF_CFG(L1CTL, false, tua); + f_sleep(1.0); + + f_pcu_to_l1(0, 0, 70, PCU_IF_SAPI_PDTCH, data, false, false); +} + +/* Send DATA.req on timeslot that hasn't been activated */ +testcase TC_pcu_data_req_ts_inactive() runs on test_CT { + var TfiUsfArr tua := f_TfiUsfArrInit(); + var octetstring data := '0000'O & f_rnd_octstring(21); + + f_virtphy_common(); + + f_TfiUsfArrSet(tua, 7, 0); + f_L1CTL_TBF_CFG(L1CTL, false, tua); + f_sleep(1.0); + + f_pcu_to_l1(0, 0, 7, PCU_IF_SAPI_PDTCH, data, false, false); +} + + control { if (mp_pcu_socket != "") { execute( TC_pcu_data_req_pdtch() ); execute( TC_pcu_data_req_ptcch() ); + execute( TC_pcu_data_req_wrong_bts() ); + execute( TC_pcu_data_req_wrong_trx() ); + execute( TC_pcu_data_req_wrong_ts() ); + execute( TC_pcu_data_req_ts_inactive() ); } else { log("PCU socket path not available, skipping PCU tests"); } -- To view, visit https://gerrit.osmocom.org/14190 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ie05d6b1530bd4d4cf4eaa574b068870682439ee4 Gerrit-Change-Number: 14190 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 11:23:55 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 11:23:55 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_pcu_data_req_pch() for testing PCU-originated PCH Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14191 Change subject: bts: Add TC_pcu_data_req_pch() for testing PCU-originated PCH ...................................................................... bts: Add TC_pcu_data_req_pch() for testing PCU-originated PCH Change-Id: I0f2c4f053ef1b8d61d565f94a548c47fe3666f16 Related: OS#4023 --- M bts/BTS_Tests.ttcn 1 file changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/91/14191/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index f4f828f..e7d00ef 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -3329,6 +3329,29 @@ } } +/* Send AGCH from PCU; check it appears on Um side */ +testcase TC_pcu_data_req_pch() runs on test_CT { + timer T := 3.0; + f_init_pcu_test(); + f_init_l1ctl(); + f_l1_tune(L1CTL); + + f_TC_pcu_act_req(0, 0, 7, true); + /* three characters prefix: last 3 digits of IMSI as ASCII */ + f_pcu_data_req(0, 0, 7, 0, 0, PCU_IF_SAPI_PCH, '313233'O & c_PCU_DATA); + + T.start; + alt { + [] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_PCH_AGCH(0), ?, c_PCU_DATA)) { + setverdict(pass); + } + [] L1CTL.receive { repeat; } + [] T.timeout { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Timeout waiting for PCU-originated PCH block on Um"); + } + } +} + /* Send IMM.ASS from PCU for PCH; check it appears on Um side */ testcase TC_pcu_data_req_imm_ass_pch() runs on test_CT { var octetstring imm_ass := f_rnd_octstring(23); @@ -4927,6 +4950,7 @@ execute( TC_pcu_deact_req_wrong_ts() ); execute( TC_pcu_ver_si13() ); execute( TC_pcu_data_req_agch() ); + execute( TC_pcu_data_req_pch() ); execute( TC_pcu_data_req_imm_ass_pch() ); execute( TC_pcu_rach_content() ); execute( TC_pcu_ext_rach_content() ); -- To view, visit https://gerrit.osmocom.org/14191 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I0f2c4f053ef1b8d61d565f94a548c47fe3666f16 Gerrit-Change-Number: 14191 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 17:56:39 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 26 May 2019 17:56:39 +0000 Subject: Change in libosmocore[master]: gsm0408/gsm0408_test.c: introduce BCD number encoding / decoding test In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14184 to look at the new patch set (#5). Change subject: gsm0408/gsm0408_test.c: introduce BCD number encoding / decoding test ...................................................................... gsm0408/gsm0408_test.c: introduce BCD number encoding / decoding test So far, both gsm48_encode_bcd_number() and gsm48_decode_bcd_number2() did not have any unit test coverage. Let's fill this gap by testing the following scenarios: - encoding / decoding of a regular 9-digit MSISDN; - encoding / decoding of a MSISDN with optional LHV; - encoding / decoding of a long 15-digit MSISDN; - encoding / decoding of a MSISDN to a buffer: - with exactly matching size, - with lower size (truncation); - decoding LV buffer with incorrect length, - encoding / decoding an empty input buffer. As it turns out, gsm48_decode_bcd_number2() does not properly handle encoded LV if the output buffer size is equal to the original MSISDN length + 1 (\0-terminator): one digit is lost. For example, decoding of 15-digit long MSISDN to a buffer of size 16 (15 digits + 1 for \0) would give us only 14 digits. This is reflected in the unit test output: Decoding HEX (buffer limit=16) '0821436587092143f5'... Expected: (rc=0) '123456789012345' Actual: (rc=0) '12345678901234' Moreover, if the output buffer is shorter than decoded number, gsm48_decode_bcd_number2() silently truncates it and returns 0, while its description states, that the rc should reflect this. To be fixed in the follow-up patches. Change-Id: I4b2c330cf8ffe4427c0bee7d5f3b74be56ecd85d Related: OS#4025 --- M tests/gsm0408/gsm0408_test.c M tests/gsm0408/gsm0408_test.ok 2 files changed, 224 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/84/14184/5 -- To view, visit https://gerrit.osmocom.org/14184 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4b2c330cf8ffe4427c0bee7d5f3b74be56ecd85d Gerrit-Change-Number: 14184 Gerrit-PatchSet: 5 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 17:56:39 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 26 May 2019 17:56:39 +0000 Subject: Change in libosmocore[master]: gsm48_decode_bcd_number2(): fix output truncation In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14185 to look at the new patch set (#5). Change subject: gsm48_decode_bcd_number2(): fix output truncation ...................................................................... gsm48_decode_bcd_number2(): fix output truncation Thanks to the new unit test for BCD number encoding / decoding, it was discovered that gsm48_decode_bcd_number2() does not properly handle encoded LV if the output buffer size is equal to the original MSISDN length + 1 (\0-terminator): one digit is lost. For example, decoding of 15-digit long MSISDN to a buffer of size 16 (15 digits + 1 for \0) would give us only 14 digits. The problem was that 'output_len' was being decremented before checking the remaining buffer length and writing a digit to it. As a result, the maximum length was always one byte shorter. Change-Id: I61d49387fedbf7b238e21540a5eff22f6861e27a Fixes: OS#4025 --- M src/gsm/gsm48_ie.c M tests/gsm0408/gsm0408_test.ok 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/85/14185/5 -- To view, visit https://gerrit.osmocom.org/14185 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I61d49387fedbf7b238e21540a5eff22f6861e27a Gerrit-Change-Number: 14185 Gerrit-PatchSet: 5 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 17:56:39 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 26 May 2019 17:56:39 +0000 Subject: Change in libosmocore[master]: gsm48_decode_bcd_number2(): fix: return -ENOSPC on truncation In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14186 to look at the new patch set (#5). Change subject: gsm48_decode_bcd_number2(): fix: return -ENOSPC on truncation ...................................................................... gsm48_decode_bcd_number2(): fix: return -ENOSPC on truncation The documentation of gsm48_decode_bcd_number2() clearly states that the output truncation is a erroneous case, so it should actually return negative in such cases. Let's return -ENOSPC. Change-Id: I75680f232001ba419a587fed4c24f32c70c3ad2b --- M src/gsm/gsm48_ie.c M tests/gsm0408/gsm0408_test.c M tests/gsm0408/gsm0408_test.ok 3 files changed, 17 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/86/14186/5 -- To view, visit https://gerrit.osmocom.org/14186 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I75680f232001ba419a587fed4c24f32c70c3ad2b Gerrit-Change-Number: 14186 Gerrit-PatchSet: 5 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 17:56:39 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 26 May 2019 17:56:39 +0000 Subject: Change in libosmocore[master]: gsm48_decode_bcd_number2(): return -EINVAL if LV has too big length In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14187 to look at the new patch set (#5). Change subject: gsm48_decode_bcd_number2(): return -EINVAL if LV has too big length ...................................................................... gsm48_decode_bcd_number2(): return -EINVAL if LV has too big length Change-Id: Ie07b2e8bc2f9628904e88448b4ee63b359655123 --- M src/gsm/gsm48_ie.c M tests/gsm0408/gsm0408_test.c M tests/gsm0408/gsm0408_test.ok 3 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/87/14187/5 -- To view, visit https://gerrit.osmocom.org/14187 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie07b2e8bc2f9628904e88448b4ee63b359655123 Gerrit-Change-Number: 14187 Gerrit-PatchSet: 5 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 17:56:54 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 26 May 2019 17:56:54 +0000 Subject: Change in libosmocore[master]: gsm48_encode_bcd_number(): clarify optional LHV header initialization In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14189 ) Change subject: gsm48_encode_bcd_number(): clarify optional LHV header initialization ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/14189 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iafd911dd55691b3715391e3899cd6971245c8d7f Gerrit-Change-Number: 14189 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Harald Welte Gerrit-Comment-Date: Sun, 26 May 2019 17:56:54 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 17:59:28 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 26 May 2019 17:59:28 +0000 Subject: Change in osmo-bts[master]: common/rsl.c: fix NULL-pointer dereference in rsl_rx_rll() In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14179 ) Change subject: common/rsl.c: fix NULL-pointer dereference in rsl_rx_rll() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14179 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I07e39e69a42dd09841f5d03608ec0d0b2345139a Gerrit-Change-Number: 14179 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 26 May 2019 17:59:28 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 17:59:37 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 26 May 2019 17:59:37 +0000 Subject: Change in osmo-bts[master]: common/rsl.c: fix NULL-pointer dereference in rsl_rx_rll() In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/14179 ) Change subject: common/rsl.c: fix NULL-pointer dereference in rsl_rx_rll() ...................................................................... common/rsl.c: fix NULL-pointer dereference in rsl_rx_rll() Change-Id: I07e39e69a42dd09841f5d03608ec0d0b2345139a Fixes: CID#198663 Null pointer dereferences --- M src/common/rsl.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Vadim Yanitskiy: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/rsl.c b/src/common/rsl.c index 92575b5..f8c7daa 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -2608,8 +2608,8 @@ lchan = lchan_lookup(trx, rh->chan_nr, "RSL rx RLL: "); if (!lchan) { - LOGPLCHAN(lchan, DRLL, LOGL_NOTICE, "Rx RLL %s for unknown lchan\n", - rsl_msg_name(rh->c.msg_type)); + LOGP(DRLL, LOGL_NOTICE, "Rx RLL %s for unknown lchan\n", + rsl_msg_name(rh->c.msg_type)); return rsl_reject_unknown_lchan(msg); } -- To view, visit https://gerrit.osmocom.org/14179 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I07e39e69a42dd09841f5d03608ec0d0b2345139a Gerrit-Change-Number: 14179 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 18:07:42 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 26 May 2019 18:07:42 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_pcu_data_req_pch() for testing PCU-originated PCH In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14191 ) Change subject: bts: Add TC_pcu_data_req_pch() for testing PCU-originated PCH ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/14191/1/bts/BTS_Tests.ttcn File bts/BTS_Tests.ttcn: https://gerrit.osmocom.org/#/c/14191/1/bts/BTS_Tests.ttcn at 3345 PS1, Line 3345: c_PCU_DATA So that '313233'O prefix is not needed here, right? What is the purpose of it in general? -- To view, visit https://gerrit.osmocom.org/14191 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0f2c4f053ef1b8d61d565f94a548c47fe3666f16 Gerrit-Change-Number: 14191 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 26 May 2019 18:07:42 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 18:15:58 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 26 May 2019 18:15:58 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Fully implement TC_pcu_data_req_{wrong_{bts, trx, ts}, ts_inactive}() In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14190 ) Change subject: Fully implement TC_pcu_data_req_{wrong_{bts,trx,ts},ts_inactive}() ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/14190/1/bts/BTS_Tests.ttcn File bts/BTS_Tests.ttcn: https://gerrit.osmocom.org/#/c/14190/1/bts/BTS_Tests.ttcn at a3311 PS1, Line 3311: FYI: trxcon does support PDCH channels. The only limitation is that there is no way to activate them using L1CTL - it is not implemented yet. Maybe we should keep these tests here? As soon as trxcon gets the missing parts implemented, we would have the test coverage on both L1 and L2. See: https://git.osmocom.org/osmocom-bb/log/?h=fixeria/gprs -- To view, visit https://gerrit.osmocom.org/14190 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie05d6b1530bd4d4cf4eaa574b068870682439ee4 Gerrit-Change-Number: 14190 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 26 May 2019 18:15:58 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 18:31:05 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 26 May 2019 18:31:05 +0000 Subject: Change in osmo-ttcn3-hacks[master]: PCU: Fully implement TC_pcu_data_req_{pdtch, ptcch} In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14183 ) Change subject: PCU: Fully implement TC_pcu_data_req_{pdtch,ptcch} ...................................................................... Patch Set 3: Code-Review+1 (2 comments) Not a merge blocker, just some of my thoughts about GPRS support in OsmocomBB... https://gerrit.osmocom.org/#/c/14183/3//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/#/c/14183/3//COMMIT_MSG at 9 PS3, Line 9: trxcon+fake_trx don't have GPRS (TBF) support yet Ah, yep. Actually, trxcon gives you low-level access to the PDCH channels, just like OsmoBTS to OsmoPCU, so you can Rx/Tx both PDTCH and PTCCH blocks. I don't think it's a good idea to overload trxcon (and L1CTL too, but it's already modified) with GPRS specific stuff like TBF filtering - this can be implemented on the higher layers (i.e. here). This approach would (I believe) give the user more flexibility. https://gerrit.osmocom.org/#/c/14183/3/bts/BTS_Tests_virtphy.ttcn File bts/BTS_Tests_virtphy.ttcn: https://gerrit.osmocom.org/#/c/14183/3/bts/BTS_Tests_virtphy.ttcn at 51 PS3, Line 51: tr_L1CTL_DATA_IND Regarding the use of L1CTL_DATA_* messages: their length is limited to 23: struct l1ctl_data_ind { uint8_t data[23]; }; Maybe we should rather use L1CTL_TRAFFIC_* for that? -- To view, visit https://gerrit.osmocom.org/14183 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I677f660b1076148b3317b08b06eb3d6551d9b577 Gerrit-Change-Number: 14183 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 26 May 2019 18:31:05 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 21:03:15 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 21:03:15 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Add TC_pcu_rr_suspend() to test forwarding of RR SUSPEND via PCU socket Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14192 Change subject: Add TC_pcu_rr_suspend() to test forwarding of RR SUSPEND via PCU socket ...................................................................... Add TC_pcu_rr_suspend() to test forwarding of RR SUSPEND via PCU socket This test opens a SDCCH and sends a RR SUSPEND message from the simulated MS. It then expects the BTS to pick that up and forward it to the PCU socket rather than via RSL to the BSC. Change-Id: I4da6e9d7c5dfbd0e017d2a63c6474da700c38e52 Related: OS#2249 Related: OS#4023 --- M bts/BTS_Tests.ttcn M library/PCUIF_Types.ttcn 2 files changed, 77 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/92/14192/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index e7d00ef..30e0fc3 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -31,6 +31,8 @@ import from MobileL3_RRM_Types all; import from MobileL3_Types all; import from L3_Templates all; +import from L3_Common all; +import from MobileL3_GMM_SM_Types all; import from Osmocom_VTY_Functions all; import from TELNETasp_PortType all; @@ -3658,6 +3660,77 @@ setverdict(pass); } +template (value) PDU_ML3_MS_NW ts_RRM_GprsSuspReq(template (value) OCT4 tlli, + template (value) RoutingAreaIdentificationV rai, + template (value) OCT1 cause) := { + discriminator := '0000'B, /* overwritten */ + tiOrSkip := { + skipIndicator := '0000'B + }, + msgs := { + rrm := { + gPRS_suspensionRequest := { + messageType := '00110100'B, + tLLI := tlli, + routingAreaIdentification := rai, + suspensionCause := cause, + service_Support := omit + } + } + } +} + +/* test for forwarding of RR SUSPEND from CS lchan to PCU via PCU socket */ +private function f_TC_rr_suspend_req(charstring id) runs on ConnHdlr { + var PCUIF_Message first_info; + var integer pcu_conn_id := -1; + var RslLinkId link_id := valueof(ts_RslLinkID_DCCH(0)); + var RoutingAreaIdentificationV rai := f_RAI('262'H, '42F'H, '2342'O, '55'O); + var OCT4 tlli := '01020304'O; + var OCT1 cause := '23'O; + timer T := 5.0; + + f_init_pcu(PCU, id, pcu_conn_id, first_info); + + f_l1_tune(L1CTL); + RSL.clear; + + f_est_dchan(); + L1CTL.clear; + + f_est_rll_mo(link_id.sapi, link_id, '23420815'O); + + var PDU_ML3_MS_NW susp_req := valueof(ts_RRM_GprsSuspReq(tlli, rai, cause)); + var octetstring l3 := enc_PDU_ML3_MS_NW(susp_req); + f_tx_lapdm(ts_LAPDm_I(link_id.sapi, cr_MO_CMD, true, 1, 0, l3), link_id); + + /* ConnHdlr has terminated after sending the RR SUSP REQ over a dedicaed channel */ + T.start; + alt { + [] PCU.receive(t_SD_PCUIF(pcu_conn_id, tr_PCUIF_SUSP_REQ(0, tlli, ?, oct2int(cause)))) { + setverdict(pass); + } + [] PCU.receive(t_SD_PCUIF(pcu_conn_id, tr_PCUIF_SUSP_REQ(?, ?, ?, ?))) { + setverdict(fail, "Received unexpected PCUIF SUSPE REQ: "); + } + [] PCU.receive { + repeat; + } + [] T.timeout { + setverdict(fail, "Timeout waiting for SUSP REQ on PCUIF"); + } + } +} +testcase TC_pcu_rr_suspend() runs on test_CT { + var ConnHdlrPars pars; + var ConnHdlr vc_conn; + + f_init(); + + pars := valueof(t_Pars(t_RslChanNr_SDCCH4(0,3), ts_RSL_ChanMode_SIGN)); + vc_conn := f_start_handler(refers(f_TC_rr_suspend_req), pars, true); + vc_conn.done; +} /*********************************************************************** @@ -4958,6 +5031,7 @@ execute( TC_pcu_time_ind() ); execute( TC_pcu_rts_req() ); execute( TC_pcu_oml_alert() ); + execute( TC_pcu_rr_suspend() ); } else { log("PCU socket path not available, skipping PCU tests"); } diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn index 750e0b4..455082a 100644 --- a/library/PCUIF_Types.ttcn +++ b/library/PCUIF_Types.ttcn @@ -193,7 +193,9 @@ OCT4 tlli, OCT6 ra_id, uint8_t cause -} with { variant "" }; +} with { + variant (tlli) "BYTEORDER(last)" +}; type union PCUIF_MsgUnion { -- To view, visit https://gerrit.osmocom.org/14192 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I4da6e9d7c5dfbd0e017d2a63c6474da700c38e52 Gerrit-Change-Number: 14192 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 21:03:49 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 21:03:49 +0000 Subject: Change in osmo-bts[master]: Fix passing of RR SUSPEND REQ from DCCH to PCU socket Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14193 Change subject: Fix passing of RR SUSPEND REQ from DCCH to PCU socket ...................................................................... Fix passing of RR SUSPEND REQ from DCCH to PCU socket The existing code ssumed that the RR SUSPEND REQ would be a LAPDm/RSL unitdata request. I couldn't find any spec reference that would support this. Rather, the message is sent via the normal main dedicated channel, which is operated in ABM mode. As the somewhat similar check for diverting measurement results is in fact looking for UNITDATA, we have to untangle this slightly. Change-Id: Ic75486f8edaefa9c07bd92515ba1832b1c482fa6 Related: OS#2249 Related: OS#4023 --- M src/common/rsl.c 1 file changed, 33 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/93/14193/1 diff --git a/src/common/rsl.c b/src/common/rsl.c index 92575b5..fb7d78b 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -2642,7 +2642,17 @@ return 0; } -static int rslms_get_meas_msg_type(struct msgb *msg, bool rllh_link_id_is_sacch) +static int rslms_get_rll_msg_type(struct msgb *msg) +{ + struct abis_rsl_common_hdr *rh = msgb_l2(msg); + + if ((rh->msg_discr & 0xfe) != ABIS_RSL_MDISC_RLL) + return -1; + + return rh->msg_type; +} + +static int rslms_get_rr_msg_type(struct msgb *msg, bool rllh_link_id_is_sacch) { struct abis_rsl_common_hdr *rh = msgb_l2(msg); struct abis_rsl_rll_hdr *rllh; @@ -2651,8 +2661,6 @@ if ((rh->msg_discr & 0xfe) != ABIS_RSL_MDISC_RLL) return -1; - if (rh->msg_type != RSL_MT_UNIT_DATA_IND) - return -2; rllh = msgb_l2(msg); if (rsl_link_id_is_sacch(rllh->link_id) != rllh_link_id_is_sacch) @@ -2665,23 +2673,39 @@ return gh->msg_type; } -static int rslms_is_meas_rep(struct msgb *msg) +static bool rslms_is_meas_rep(struct msgb *msg) { - switch (rslms_get_meas_msg_type(msg, 1)) { + int rll_msg_type = rslms_get_rll_msg_type(msg); + int rr_msg_type; + + if (rll_msg_type != RSL_MT_UNIT_DATA_IND) + return false; + + rr_msg_type = rslms_get_rr_msg_type(msg, 1); + + switch (rr_msg_type) { case GSM48_MT_RR_MEAS_REP: case GSM48_MT_RR_EXT_MEAS_REP: - return 1; + return true; } /* FIXME: this does not cover the Bter frame format and the associated * short RR protocol descriptor for ENHANCED MEASUREMENT REPORT */ - return 0; + return false; } -static int rslms_is_gprs_susp_req(struct msgb *msg) +static bool rslms_is_gprs_susp_req(struct msgb *msg) { - return rslms_get_meas_msg_type(msg, 0) == GSM48_MT_RR_GPRS_SUSP_REQ; + int rll_msg_type = rslms_get_rll_msg_type(msg); + int rr_msg_type; + + if (rll_msg_type != RSL_MT_DATA_IND) + return false; + + rr_msg_type = rslms_get_rr_msg_type(msg, false); + + return rr_msg_type == GSM48_MT_RR_GPRS_SUSP_REQ; } /* TS 44.018 9.1.13b GPRS suspension request */ -- To view, visit https://gerrit.osmocom.org/14193 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ic75486f8edaefa9c07bd92515ba1832b1c482fa6 Gerrit-Change-Number: 14193 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 21:08:39 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 26 May 2019 21:08:39 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_pcu_data_req_pch() for testing PCU-originated PCH In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14191 ) Change subject: bts: Add TC_pcu_data_req_pch() for testing PCU-originated PCH ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/14191/1/bts/BTS_Tests.ttcn File bts/BTS_Tests.ttcn: https://gerrit.osmocom.org/#/c/14191/1/bts/BTS_Tests.ttcn at 3345 PS1, Line 3345: c_PCU_DATA > So that '313233'O prefix is not needed here, right? What is the purpose of it in general? as the comment indicates a few lines above: /* three characters prefix: last 3 digits of IMSI as ASCII */ The BTS needs to know the IMSI modulo 1000 in order to compute the paging group. For some reason whoever designed that part of the PCU interface decided not to put it into a header, but rather prefix the MAC block with three ASCII bytes expressing the last three digits of the IMSI. -- To view, visit https://gerrit.osmocom.org/14191 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0f2c4f053ef1b8d61d565f94a548c47fe3666f16 Gerrit-Change-Number: 14191 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Sun, 26 May 2019 21:08:39 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun May 26 22:51:10 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 26 May 2019 22:51:10 +0000 Subject: Change in osmo-sgsn[master]: osmo-sgsn: add VTY parameter to toggle authentication Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14194 Change subject: osmo-sgsn: add VTY parameter to toggle authentication ...................................................................... osmo-sgsn: add VTY parameter to toggle authentication It may be useful to have 'remote' authorization policy, but do not require authentication in GERAN at the same time, e.g. in combination with 'subscriber-create-on-demand' feature of OsmoHLR. This change introduces a new VTY parameter similar to the one that we already have in OsmoMSC: authentication (optional|required) Please note that 'required' only applies if 'auth-policy' is 'remote'. Change-Id: I9909145e7e0af587c28827e16301a61b13eedaa9 --- M doc/examples/osmo-sgsn/osmo-sgsn-accept-all.cfg M doc/examples/osmo-sgsn/osmo-sgsn.cfg M src/gprs/sgsn_vty.c 3 files changed, 37 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/94/14194/1 diff --git a/doc/examples/osmo-sgsn/osmo-sgsn-accept-all.cfg b/doc/examples/osmo-sgsn/osmo-sgsn-accept-all.cfg index b47878a..85112f4 100644 --- a/doc/examples/osmo-sgsn/osmo-sgsn-accept-all.cfg +++ b/doc/examples/osmo-sgsn/osmo-sgsn-accept-all.cfg @@ -10,6 +10,7 @@ ggsn 0 remote-ip 127.0.0.2 ggsn 0 gtp-version 1 ggsn 0 echo-interval 60 + authentication optional auth-policy accept-all ! ns diff --git a/doc/examples/osmo-sgsn/osmo-sgsn.cfg b/doc/examples/osmo-sgsn/osmo-sgsn.cfg index 263bd00..3be4d49 100644 --- a/doc/examples/osmo-sgsn/osmo-sgsn.cfg +++ b/doc/examples/osmo-sgsn/osmo-sgsn.cfg @@ -10,6 +10,7 @@ ggsn 0 remote-ip 127.0.0.2 ggsn 0 gtp-version 1 ggsn 0 echo-interval 60 + authentication required auth-policy remote gsup remote-ip 127.0.0.1 gsup remote-port 4222 diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c index c01de3b..ad2c809 100644 --- a/src/gprs/sgsn_vty.c +++ b/src/gprs/sgsn_vty.c @@ -211,6 +211,8 @@ if (g_cfg->gsup_server_port) vty_out(vty, " gsup remote-port %d%s", g_cfg->gsup_server_port, VTY_NEWLINE); + vty_out(vty, " authentication %s%s", + gsmnet->authentication_required ? "required" : "optional", VTY_NEWLINE); vty_out(vty, " auth-policy %s%s", get_value_string(sgsn_auth_pol_strs, g_cfg->auth_policy), VTY_NEWLINE); @@ -693,6 +695,27 @@ return CMD_SUCCESS; } +DEFUN(cfg_authentication, cfg_authentication_cmd, + "authentication (optional|required)", + "Whether to enforce MS authentication in GERAN\n" + "Allow MS to attach via GERAN without authentication\n" + "Always require authentication\n") +{ + int required = (argv[0][0] == 'r'); + + if (vty->type != VTY_FILE) { + if (g_cfg->auth_policy != SGSN_AUTH_POLICY_REMOTE && required) { + vty_out(vty, "Authentication is not possible without HLR, " + "consider setting 'auth-policy' to 'remote'%s", + VTY_NEWLINE); + return CMD_WARNING; + } + } + + g_cfg->require_authentication = required; + return CMD_SUCCESS; +} + DEFUN(cfg_auth_policy, cfg_auth_policy_cmd, "auth-policy (accept-all|closed|acl-only|remote)", "Configure the Authorization policy of the SGSN. This setting determines which subscribers are" @@ -705,9 +728,12 @@ int val = get_string_value(sgsn_auth_pol_strs, argv[0]); OSMO_ASSERT(val >= SGSN_AUTH_POLICY_OPEN && val <= SGSN_AUTH_POLICY_REMOTE); g_cfg->auth_policy = val; - g_cfg->require_authentication = (val == SGSN_AUTH_POLICY_REMOTE); g_cfg->require_update_location = (val == SGSN_AUTH_POLICY_REMOTE); + /* Authentication is not possible without HLR */ + if (val != SGSN_AUTH_POLICY_REMOTE) + g_cfg->require_authentication = 0; + return CMD_SUCCESS; } @@ -1462,6 +1488,14 @@ return rc; } + if (g_cfg->auth_policy != SGSN_AUTH_POLICY_REMOTE + && g_cfg->require_authentication) { + fprintf(stderr, "Configuration error:" + " authentication is not possible without HLR." + " Consider setting 'auth-policy' to 'remote'\n"); + return -EINVAL; + } + if (g_cfg->auth_policy == SGSN_AUTH_POLICY_REMOTE && !(g_cfg->gsup_server_addr.sin_addr.s_addr && g_cfg->gsup_server_port)) { -- To view, visit https://gerrit.osmocom.org/14194 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I9909145e7e0af587c28827e16301a61b13eedaa9 Gerrit-Change-Number: 14194 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 00:43:17 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 27 May 2019 00:43:17 +0000 Subject: Change in osmo-sgsn[master]: osmo-sgsn: add VTY parameter to toggle authentication In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14194 to look at the new patch set (#2). Change subject: osmo-sgsn: add VTY parameter to toggle authentication ...................................................................... osmo-sgsn: add VTY parameter to toggle authentication It may be useful to have 'remote' authorization policy, but do not require authentication in GERAN at the same time, e.g. in combination with 'subscriber-create-on-demand' feature of OsmoHLR. This change introduces a new VTY parameter similar to the one that we already have in OsmoMSC: authentication (optional|required) Please note that 'required' only applies if 'auth-policy' is 'remote'. Change-Id: I9909145e7e0af587c28827e16301a61b13eedaa9 --- M doc/examples/osmo-sgsn/osmo-sgsn-accept-all.cfg M doc/examples/osmo-sgsn/osmo-sgsn.cfg M src/gprs/sgsn_vty.c 3 files changed, 38 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/94/14194/2 -- To view, visit https://gerrit.osmocom.org/14194 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9909145e7e0af587c28827e16301a61b13eedaa9 Gerrit-Change-Number: 14194 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 00:43:18 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 27 May 2019 00:43:18 +0000 Subject: Change in osmo-sgsn[master]: osmo-sgsn: get rid of OSMO_ASSERT() in 'auth-policy' handler Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14195 Change subject: osmo-sgsn: get rid of OSMO_ASSERT() in 'auth-policy' handler ...................................................................... osmo-sgsn: get rid of OSMO_ASSERT() in 'auth-policy' handler For some reason, libosmovty does accept incomplete commands if a command definition contains 'choice' statements. For example, the following command definition: auth-policy (accept-all|closed|acl-only|remote) actually permits the following variations: auth-policy accept-all auth-policy accept auth-policy acl auth-policy re auth-policy c so in case of such incomplete input, get_string_value() would fail to find the corresponding enum value, and the whole process would crash. That's not what a regular fun of the TAB-completion would expect, right? Instead of assert()ing the result of get_string_value(), let's rather print a warning and return CMD_ERR_INCOMPLETE. Change-Id: If9b0c0d031477ca87786aab5c269d00748e896c8 --- M src/gprs/sgsn_vty.c 1 file changed, 7 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/95/14195/1 diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c index 9155441..969156f 100644 --- a/src/gprs/sgsn_vty.c +++ b/src/gprs/sgsn_vty.c @@ -725,9 +725,13 @@ "Accept only subscribers in the ACL\n" "Use remote subscription data only (HLR)\n") { - int val = get_string_value(sgsn_auth_pol_strs, argv[0]); - OSMO_ASSERT(val >= SGSN_AUTH_POLICY_OPEN && val <= SGSN_AUTH_POLICY_REMOTE); - g_cfg->auth_policy = val; + int val; + + val = get_string_value(sgsn_auth_pol_strs, argv[0]); + if (val < 0) + return CMD_ERR_INCOMPLETE; + + g_cfg->auth_policy = (enum sgsn_auth_policy) val; g_cfg->require_update_location = (val == SGSN_AUTH_POLICY_REMOTE); /* Authentication is not possible without HLR */ -- To view, visit https://gerrit.osmocom.org/14195 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If9b0c0d031477ca87786aab5c269d00748e896c8 Gerrit-Change-Number: 14195 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 01:53:29 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Mon, 27 May 2019 01:53:29 +0000 Subject: Change in libosmocore[master]: utils: add gsmtap_logread.py a gsmtap log reader Message-ID: lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/14196 Change subject: utils: add gsmtap_logread.py a gsmtap log reader ...................................................................... utils: add gsmtap_logread.py a gsmtap log reader Receive gsmtap logs and feeds it into the python logging framework. Allows to use generic logging features and further utilities. Change-Id: I24478d8e16066c6118e867bdba54c6418c15e170 --- A utils/gsmtap.py A utils/gsmtap_logread.py 2 files changed, 163 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/96/14196/1 diff --git a/utils/gsmtap.py b/utils/gsmtap.py new file mode 100644 index 0000000..68658c5 --- /dev/null +++ b/utils/gsmtap.py @@ -0,0 +1,75 @@ +#!/usr/bin/env python +# +# license: MIT +# 2019 Alexander Couzens + +import struct + +GSMTAP_VERSION = 0x02 + +GSMTAP_TYPE_OSMOCORE_LOG = 0x10 + +class TooSmall(RuntimeError): + pass + +# struct gsmtap_hdr { +# uint8_t version; /*!< version, set to 0x01 currently */ +# uint8_t hdr_len; /*!< length in number of 32bit words */ +# uint8_t type; /*!< see GSMTAP_TYPE_* */ +# uint8_t timeslot; /*!< timeslot (0..7 on Um) */ +# +# uint16_t arfcn; /*!< ARFCN (frequency) */ +# int8_t signal_dbm; /*!< signal level in dBm */ +# int8_t snr_db; /*!< signal/noise ratio in dB */ +# +# uint32_t frame_number; /*!< GSM Frame Number (FN) */ +# +# uint8_t sub_type; /*!< Type of burst/channel, see above */ +# uint8_t antenna_nr; /*!< Antenna Number */ +# uint8_t sub_slot; /*!< sub-slot within timeslot */ +# uint8_t res; /*!< reserved for future use (RFU) */ +# +# } + +class gsmtap_hdr(): + def __init__(self, data): + if len(data) < 2: + raise TooSmall() + self.version, self.hdr_len = struct.unpack('!BB', data[0:2]) + self.hdr_len *= 4 + + if self.hdr_len >= 3: + self.type = struct.unpack('!B', data[2:3])[0] + +# /*! Structure of the GSMTAP libosmocore logging header */ +# struct gsmtap_osmocore_log_hdr { +# struct { +# uint32_t sec; +# uint32_t usec; +# } ts; +# char proc_name[16]; /*!< name of process */ +# uint32_t pid; /*!< process ID */ +# uint8_t level; /*!< logging level */ +# uint8_t _pad[3]; +# /* TODO: color */ +# char subsys[16]; /*!< logging sub-system */ +# struct { +# char name[32]; /*!< source file name */ +# uint32_t line_nr;/*!< line number */ +# } src_file; +# } __attribute__((packed)); + +class gsmtap_log(): + def __init__(self, data): + packformat = '!II16sIB3xxx16s32sI' + packlen = struct.calcsize(packformat) + if len(data) < packlen: + raise TooSmall() + self.sec, self.usec, \ + self.proc_name, self.pid, \ + self.level, self.subsys, \ + self.filename, self.fileline_nr = struct.unpack(packformat, data[:packlen]) + + message_len = len(data) - packlen + if message_len > 0: + self.message = data[packlen:].decode('utf-8') diff --git a/utils/gsmtap_logread.py b/utils/gsmtap_logread.py new file mode 100644 index 0000000..77bf47d --- /dev/null +++ b/utils/gsmtap_logread.py @@ -0,0 +1,88 @@ +#!/usr/bin/env python +# +# license: MIT +# 2019 Alexander Couzens + +import logging +import socket + +from gsmtap import GSMTAP_TYPE_OSMOCORE_LOG, gsmtap_hdr, gsmtap_log, TooSmall + +LOG = logging.getLogger("gsmlogreader") + +def parse_gsm(packet): + hdr = None + + try: + hdr = gsmtap_hdr(packet) + except TooSmall: + return None + + if hdr.type != GSMTAP_TYPE_OSMOCORE_LOG: + return None + + if len(packet) <= hdr.hdr_len: + return None + + try: + return gsmtap_log(packet[hdr.hdr_len:]) + except TooSmall: + return None + +def gsmtaplevel_to_loglevel(level): + """ convert a gsmtap log level into a python log level """ + if level <= 1: + return logging.DEBUG + if level <= 3: + return logging.INFO + if level <= 5: + return logging.WARNING + + return logging.ERROR + +def convert_gsmtap_log(gsmtap): + level = gsmtaplevel_to_loglevel(gsmtap.level) + + # TODO: convert sec, usec into logging timestamp + attr = { + "name": "gsmtap", + "levelno": level, + "levelname": gsmtap_get_logname(gsmtap.level), + "pathname": gsmtap.filename, + "lineno": gsmtap.fileline_nr, + "processName": gsmtap.proc_name, + "process": gsmtap.pid, + "module": gsmtap.subsys, + "msg": gsmtap.message.replace('\n', ' '), + } + return attr + +def gsmtap_get_logname(level): + names = { + 1: "DEBUG", + 3: "INFO", + 5: "NOTICE", + 7: "ERROR", + 8: "FATAL", + } + if level in names: + return names[level] + return "UNKNOWN" + +if __name__ == "__main__": + # Create a UDP socket + sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) + server_address = ('0.0.0.0', 4729) + sock.bind(server_address) + + logger = logging.getLogger("gsmtap") + logging.basicConfig(level=logging.DEBUG) + + while True: + data, address = sock.recvfrom(4096) + log = parse_gsm(data) + if not log: + continue + + record = logging.makeLogRecord(convert_gsmtap_log(log)) + logger.handle(record) -- To view, visit https://gerrit.osmocom.org/14196 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I24478d8e16066c6118e867bdba54c6418c15e170 Gerrit-Change-Number: 14196 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Mon May 27 02:45:33 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 27 May 2019 02:45:33 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in xUbuntu_19.04/x86_64 In-Reply-To: References: Message-ID: <5ceb4f6be5f0f_6249118c60c67347a@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/xUbuntu_19.04/x86_64 Package network:osmocom:nightly/osmo-hlr failed to build in xUbuntu_19.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 125s] | #define HAVE_STDLIB_H 1 [ 125s] | #define HAVE_STRING_H 1 [ 125s] | #define HAVE_MEMORY_H 1 [ 125s] | #define HAVE_STRINGS_H 1 [ 125s] | #define HAVE_INTTYPES_H 1 [ 125s] | #define HAVE_STDINT_H 1 [ 125s] | #define HAVE_UNISTD_H 1 [ 125s] | #define HAVE_DLFCN_H 1 [ 125s] | #define LT_OBJDIR ".libs/" [ 125s] | #define PACKAGE "osmo-hlr" [ 125s] | #define VERSION "1.0.0.32-29f3" [ 125s] | #define STDC_HEADERS 1 [ 125s] | [ 125s] | configure: exit 0 [ 125s] [ 125s] make[1]: *** [debian/rules:17: override_dh_auto_test] Error 1 [ 125s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 125s] make: *** [debian/rules:7: build] Error 2 [ 125s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 125s] [ 125s] lamb72 failed "build osmo-hlr_1.0.0.32.29f3.dsc" at Mon May 27 02:45:19 UTC 2019. [ 125s] [ 125s] ### VM INTERACTION START ### [ 128s] [ 116.896756] sysrq: SysRq : Power Off [ 128s] [ 116.905539] reboot: Power down [ 128s] ### VM INTERACTION END ### [ 128s] [ 128s] lamb72 failed "build osmo-hlr_1.0.0.32.29f3.dsc" at Mon May 27 02:45:23 UTC 2019. [ 128s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Mon May 27 07:21:59 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 07:21:59 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Fully implement TC_pcu_data_req_{wrong_{bts, trx, ts}, ts_inactive}() In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14190 to look at the new patch set (#2). Change subject: bts: Fully implement TC_pcu_data_req_{wrong_{bts,trx,ts},ts_inactive}() ...................................................................... bts: Fully implement TC_pcu_data_req_{wrong_{bts,trx,ts},ts_inactive}() The four existing test in BTS_Tests.ttcn so far didn't have any chance to verify if the invalid messages actually ended up on the air interface or not. By using virtphy instead of trxcon, we can finally add that missing part. Change-Id: Ie05d6b1530bd4d4cf4eaa574b068870682439ee4 Related: OS#4023 --- M bts/BTS_Tests.ttcn 1 file changed, 57 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/90/14190/2 -- To view, visit https://gerrit.osmocom.org/14190 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie05d6b1530bd4d4cf4eaa574b068870682439ee4 Gerrit-Change-Number: 14190 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 07:21:59 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 07:21:59 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Fully implement TC_pcu_data_req_{pdtch, ptcch} In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14183 to look at the new patch set (#4). Change subject: bts: Fully implement TC_pcu_data_req_{pdtch,ptcch} ...................................................................... bts: Fully implement TC_pcu_data_req_{pdtch,ptcch} As trxcon+fake_trx don't have GPRS (TBF) support yet, we cannot do any PCU related tests involving the Um interface yet. Instead, let's use virtphy to fill that gap. Using virtphy, we can actually receive/transmit GPRS blocks on the simulated Um interface. TC_pcu_data_req_{pdtch,ptcch} are moved to a new test suite "BTS_Tests_virtphy.ttcn" which should symbolize that the related tests are to be executed with osmo-bts-virtual + virtphy instead of osmo-bts-trx + fake_trx + trxcon. You also have to set the following module parameter to make this work: BTS_Tests.mp_bts_trxc_port := -1 Related: OS#4023 Change-Id: I677f660b1076148b3317b08b06eb3d6551d9b577 --- M bts/BTS_Tests.ttcn 1 file changed, 71 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/83/14183/4 -- To view, visit https://gerrit.osmocom.org/14183 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I677f660b1076148b3317b08b06eb3d6551d9b577 Gerrit-Change-Number: 14183 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 07:21:59 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 07:21:59 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_pcu_rr_suspend() to test forwarding of RR SUSPEND via PCU... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14192 to look at the new patch set (#2). Change subject: bts: Add TC_pcu_rr_suspend() to test forwarding of RR SUSPEND via PCU socket ...................................................................... bts: Add TC_pcu_rr_suspend() to test forwarding of RR SUSPEND via PCU socket This test opens a SDCCH and sends a RR SUSPEND message from the simulated MS. It then expects the BTS to pick that up and forward it to the PCU socket rather than via RSL to the BSC. Change-Id: I4da6e9d7c5dfbd0e017d2a63c6474da700c38e52 Related: OS#2249 Related: OS#4023 --- M bts/BTS_Tests.ttcn M library/PCUIF_Types.ttcn 2 files changed, 77 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/92/14192/2 -- To view, visit https://gerrit.osmocom.org/14192 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4da6e9d7c5dfbd0e017d2a63c6474da700c38e52 Gerrit-Change-Number: 14192 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 07:22:01 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 07:22:01 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add copyright + license header + short summary/explanation Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14197 Change subject: bts: Add copyright + license header + short summary/explanation ...................................................................... bts: Add copyright + license header + short summary/explanation Change-Id: Ia31427595b6d9fde883cfcd49f92767b69ead114 --- M bts/BTS_Tests.ttcn 1 file changed, 21 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/97/14197/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 21e5634..5cde0af 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -1,5 +1,26 @@ module BTS_Tests { +/* Integration Tests for OsmoBTS + * (C) 2019-2019 by Harald Welte + * contributions by Vadim Yanitskiy and sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * This test suite tests OsmoBTS by attaching to the external interfaces + * such as Abis RSL, PCU, VTY as well as by attaching to a MS L1 implementation + * using the L1CTL protocol/interface. + * + * You can run the tests with + * a) osmo-bts-trx + trxcon + fake_trx (without any hardware) + * b) any osmo-bts-* + OsmocomBB layer1 + osmocon (with real BTS hardware) + * c) osmo-bts-virtual + virt_phy (without any hardware) + * + * Some of the tests will only run on a subset of those three configurations + * due to limitations in the respective L1. + */ + import from Misc_Helpers all; import from General_Types all; import from GSM_Types all; -- To view, visit https://gerrit.osmocom.org/14197 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ia31427595b6d9fde883cfcd49f92767b69ead114 Gerrit-Change-Number: 14197 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 08:07:45 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 May 2019 08:07:45 +0000 Subject: Change in libosmocore[master]: gsm0408/gsm0408_test.c: introduce BCD number encoding / decoding test In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14184 ) Change subject: gsm0408/gsm0408_test.c: introduce BCD number encoding / decoding test ...................................................................... Patch Set 5: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14184 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4b2c330cf8ffe4427c0bee7d5f3b74be56ecd85d Gerrit-Change-Number: 14184 Gerrit-PatchSet: 5 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 27 May 2019 08:07:45 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 08:09:37 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 May 2019 08:09:37 +0000 Subject: Change in osmo-msc[master]: Use GSM23003_MSISDN_MAX_DIGITS from libosmogsm In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14188 ) Change subject: Use GSM23003_MSISDN_MAX_DIGITS from libosmogsm ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14188 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If9eb46b83b6ad45f210b86b46dd416352adcc3ff Gerrit-Change-Number: 14188 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 27 May 2019 08:09:37 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 08:14:11 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 May 2019 08:14:11 +0000 Subject: Change in docker-playground[master]: ttcn3-bscnat: Prepare cfgs for VTY & Osmux support In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14130 ) Change subject: ttcn3-bscnat: Prepare cfgs for VTY & Osmux support ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/14130/2/ttcn3-bscnat-test/bscs.config File ttcn3-bscnat-test/bscs.config: https://gerrit.osmocom.org/#/c/14130/2/ttcn3-bscnat-test/bscs.config at 8 PS2, Line 8: osmux on > can we do this here? Always think of running the same test against "latest" which doesn't have that [?] latest for sure must have the parameter since bsc-nat always had it as early in the past as I can think of, so we don't have the issue we have with other projects (mgw, msc, bsc). -- To view, visit https://gerrit.osmocom.org/14130 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I794a17bdeaff9ab9316d7a6acb1e58dfd815b645 Gerrit-Change-Number: 14130 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Pau Espin Pedrol Gerrit-CC: Harald Welte Gerrit-Comment-Date: Mon, 27 May 2019 08:14:11 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 08:26:40 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 May 2019 08:26:40 +0000 Subject: Change in osmo-bts[master]: Fix passing of RR SUSPEND REQ from DCCH to PCU socket In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14193 ) Change subject: Fix passing of RR SUSPEND REQ from DCCH to PCU socket ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14193 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic75486f8edaefa9c07bd92515ba1832b1c482fa6 Gerrit-Change-Number: 14193 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 27 May 2019 08:26:40 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 08:29:57 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 May 2019 08:29:57 +0000 Subject: Change in osmo-sgsn[master]: osmo-sgsn: add VTY parameter to toggle authentication In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14194 ) Change subject: osmo-sgsn: add VTY parameter to toggle authentication ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/14194/2//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/#/c/14194/2//COMMIT_MSG at 11 PS2, Line 11: with 'subscriber-create-on-demand' feature of OsmoHLR. If authroization policy is "remote", shouldn't then OsmoHLR be the one deciding whether to require authorization or not? -- To view, visit https://gerrit.osmocom.org/14194 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9909145e7e0af587c28827e16301a61b13eedaa9 Gerrit-Change-Number: 14194 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: lynxis lazus Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 27 May 2019 08:29:57 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 08:31:55 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 May 2019 08:31:55 +0000 Subject: Change in osmo-sgsn[master]: osmo-sgsn: get rid of OSMO_ASSERT() in 'auth-policy' handler In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14195 ) Change subject: osmo-sgsn: get rid of OSMO_ASSERT() in 'auth-policy' handler ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/14195/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/#/c/14195/1//COMMIT_MSG at 22 PS1, Line 22: auth-policy c So you say in this case argv[0] is "c" instead of "closed"? That's IMHO wrong and should be fixed in VTY libosmocore code. -- To view, visit https://gerrit.osmocom.org/14195 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If9b0c0d031477ca87786aab5c269d00748e896c8 Gerrit-Change-Number: 14195 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 27 May 2019 08:31:55 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 08:40:10 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 27 May 2019 08:40:10 +0000 Subject: Change in osmo-sgsn[master]: osmo-sgsn: add VTY parameter to toggle authentication In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14194 ) Change subject: osmo-sgsn: add VTY parameter to toggle authentication ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/14194/2//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/#/c/14194/2//COMMIT_MSG at 11 PS2, Line 11: with 'subscriber-create-on-demand' feature of OsmoHLR. > If authroization policy is "remote", shouldn't then OsmoHLR be the one deciding whether to require a [?] No, and I don't think OsmoHLR should be the deciding side. In this particular case HLR is just a storage. OsmoMSC also has a similar configuration parameter, so one can configure authentication for both PS and CS domains separately. -- To view, visit https://gerrit.osmocom.org/14194 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9909145e7e0af587c28827e16301a61b13eedaa9 Gerrit-Change-Number: 14194 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: lynxis lazus Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 27 May 2019 08:40:10 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 08:43:05 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 May 2019 08:43:05 +0000 Subject: Change in libosmocore[master]: utils: add gsmtap_logread.py a gsmtap log reader In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14196 ) Change subject: utils: add gsmtap_logread.py a gsmtap log reader ...................................................................... Patch Set 1: (5 comments) https://gerrit.osmocom.org/#/c/14196/1/utils/gsmtap.py File utils/gsmtap.py: https://gerrit.osmocom.org/#/c/14196/1/utils/gsmtap.py at 64 PS1, Line 64: packformat = '!II16sIB3xxx16s32sI' That's actually headerformat and headerlen. Please change names of variables otherwise it's confusing. https://gerrit.osmocom.org/#/c/14196/1/utils/gsmtap_logread.py File utils/gsmtap_logread.py: https://gerrit.osmocom.org/#/c/14196/1/utils/gsmtap_logread.py at 3 PS1, Line 3: # license: MIT do we want it to be MIT? https://gerrit.osmocom.org/#/c/14196/1/utils/gsmtap_logread.py at 40 PS1, Line 40: You can drop this empty line. https://gerrit.osmocom.org/#/c/14196/1/utils/gsmtap_logread.py at 61 PS1, Line 61: names = { This is constant yet python probably builds up the dictionary every time you call the function. May be worth moving it outside as static. https://gerrit.osmocom.org/#/c/14196/1/utils/gsmtap_logread.py at 68 PS1, Line 68: if level in names: I think you can replace these 3 lines with: return names.get(level, "UNKNOWN") -- To view, visit https://gerrit.osmocom.org/14196 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I24478d8e16066c6118e867bdba54c6418c15e170 Gerrit-Change-Number: 14196 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 27 May 2019 08:43:05 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 08:45:27 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 May 2019 08:45:27 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add copyright + license header + short summary/explanation In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14197 ) Change subject: bts: Add copyright + license header + short summary/explanation ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14197 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia31427595b6d9fde883cfcd49f92767b69ead114 Gerrit-Change-Number: 14197 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 27 May 2019 08:45:27 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 08:54:15 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 27 May 2019 08:54:15 +0000 Subject: Change in osmo-sgsn[master]: osmo-sgsn: get rid of OSMO_ASSERT() in 'auth-policy' handler In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14195 ) Change subject: osmo-sgsn: get rid of OSMO_ASSERT() in 'auth-policy' handler ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/14195/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/#/c/14195/1//COMMIT_MSG at 22 PS1, Line 22: auth-policy c > So you say in this case argv[0] is "c" instead of "closed"? That's IMHO wrong and should be fixed in [?] Yes, the VTY parser would pass any of those variations. I guess the problem is that we are doing: strncmp( choice, input, strlen(input) ) somewhere in the VTY code, so for example: strncmp( "accept-all", "accept", 6 ) == 0 strncmp( "accept-all", "acc", 3 ) == 0 strncmp( "accept-all", "a", 1 ) == 0 strncmp( "accept-all", "", 0 ) == 0 Also, that's probably why you can type: - "en" instead of "enable", - "subscr" instead of "subscriber". Unfortunately, I am not familiar with the internals of libosmovty, so for now it makes sense at least to avoid segfault'ing here. -- To view, visit https://gerrit.osmocom.org/14195 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If9b0c0d031477ca87786aab5c269d00748e896c8 Gerrit-Change-Number: 14195 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 27 May 2019 08:54:15 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 09:10:05 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 May 2019 09:10:05 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Add Osmux support and tests for MGW In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14046 ) Change subject: Add Osmux support and tests for MGW ...................................................................... Patch Set 5: (1 comment) https://gerrit.osmocom.org/#/c/14046/5/library/MGCP_Templates.ttcn File library/MGCP_Templates.ttcn: https://gerrit.osmocom.org/#/c/14046/5/library/MGCP_Templates.ttcn at 333 PS5, Line 333: return "ERROR-wrong-negative-value"; > do you really want this as an error message in the string and then make the caller use it? Why not [?] MgcpOsmuxCid is actually defined as (-1 .. 255), so I think I can safely drop this check. -- To view, visit https://gerrit.osmocom.org/14046 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibb58b2a4e08d6f30cfe347c217794d0d1310954f Gerrit-Change-Number: 14046 Gerrit-PatchSet: 5 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 27 May 2019 09:10:05 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 09:10:56 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 May 2019 09:10:56 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Add Osmux support and tests for MGW In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14046 to look at the new patch set (#6). Change subject: Add Osmux support and tests for MGW ...................................................................... Add Osmux support and tests for MGW Depends: osmo-mgw.git Iac073f1db46569b46eddeaecc9934a2986bd50f1 Change-Id: Ibb58b2a4e08d6f30cfe347c217794d0d1310954f --- M library/MGCP_Templates.ttcn M library/MGCP_Types.ttcn A library/OSMUX_CodecPort.ttcn A library/OSMUX_CodecPort_CtrlFunct.ttcn A library/OSMUX_CodecPort_CtrlFunctDef.cc A library/OSMUX_Emulation.ttcn A library/OSMUX_Types.ttcn M mgw/MGCP_Test.ttcn M mgw/expected-results.xml M mgw/gen_links.sh M mgw/regen_makefile.sh 11 files changed, 1,546 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/46/14046/6 -- To view, visit https://gerrit.osmocom.org/14046 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibb58b2a4e08d6f30cfe347c217794d0d1310954f Gerrit-Change-Number: 14046 Gerrit-PatchSet: 6 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 09:55:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 09:55:33 +0000 Subject: Change in osmo-ttcn3-hacks[master]: cosmetic: Update copyright statement, license notice and SPDX Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14198 Change subject: cosmetic: Update copyright statement, license notice and SPDX ...................................................................... cosmetic: Update copyright statement, license notice and SPDX Some of our files didn't have a copyright notice at all, let's add it. Also, update the notices in other files and ensure a SPDX identifier is present in all but the most trivial files. Change-Id: If7fa19ce484b415bc645e39b3d0d666b44b5f0fd --- M bsc-nat/BSCNAT_Tests.ttcn M bsc-nat/BSC_MS_ConnectionHandler.ttcn M bsc-nat/BSC_MS_Simulation.ttcn M bsc-nat/MGCP_Adapter.ttcn M bsc-nat/MSC_ConnectionHandler.ttcn M bsc/BSC_Tests.ttcn M bsc/BSC_Tests_LCLS.ttcn M bsc/MSC_ConnectionHandler.ttcn M bts/BTS_Tests.ttcn M bts/BTS_Tests_SMSCB.ttcn M ggsn_tests/GGSN_Tests.ttcn M hlr/HLR_EUSE.ttcn M hlr/HLR_Tests.ttcn M library/AbisOML_Types.ttcn M library/BSSAP_CodecPort.ttcn M library/BSSGP_Emulation.ttcn M library/BSSGP_Types.ttcn M library/BSSMAP_Templates.ttcn M library/DNS_Helpers.ttcn M library/GSMTAP_PortType.ttcn M library/GSM_RR_Types.ttcn M library/GSM_SystemInformation.ttcn M library/GSM_Types.ttcn M library/GSUP_Emulation.ttcn M library/GSUP_Types.ttcn M library/GTP_CodecPort.ttcn M library/GTP_Emulation.ttcn M library/GTP_Templates.ttcn M library/IPA_CodecPort.ttcn M library/IPA_Emulation.ttcnpp M library/IPA_Testing.ttcn M library/IPA_Types.ttcn M library/IPCP_Types.ttcn M library/IuUP_Emulation.ttcn M library/L1CTL_PortType.ttcn M library/L1CTL_Types.ttcn M library/L3_Common.ttcn M library/L3_Templates.ttcn M library/LAPDm_RAW_PT.ttcn M library/LAPDm_Types.ttcn M library/LLC_Templates.ttcn M library/MGCP_CodecPort.ttcn M library/MGCP_Emulation.ttcn M library/MNCC_Emulation.ttcn M library/MNCC_Types.ttcn M library/NS_Emulation.ttcn M library/NS_Types.ttcn M library/Native_FunctionDefs.cc M library/Osmocom_CTRL_Adapter.ttcn M library/Osmocom_CTRL_Types.ttcn M library/Osmocom_Types.ttcn M library/Osmocom_VTY_Functions.ttcn M library/PAP_Types.ttcn M library/PCUIF_CodecPort.ttcn M library/PCUIF_Types.ttcn M library/RAN_Adapter.ttcnpp M library/RLCMAC_CSN1_Types.ttcn M library/RLCMAC_EncDec.cc M library/RLCMAC_Types.ttcn M library/RSL_Emulation.ttcn M library/RSL_Types.ttcn M library/RTP_CodecPort.ttcn M library/RTP_Emulation.ttcn M library/SCCP_Templates.ttcn M library/SGsAP_CodecPort.ttcn M library/SGsAP_Emulation.ttcn M library/SGsAP_Templates.ttcn M library/SIP_Emulation.ttcn M library/SMPP_CodecPort.ttcn M library/SMPP_Emulation.ttcn M library/SS_Templates.ttcn M library/TRXC_Types.ttcn M library/USSD_Helpers.ttcn M mgw/MGCP_Test.ttcn M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn M msc/MSC_Tests_Iu.ttcn M pcu/GPRS_TBF.ttcn M pcu/PCU_Tests.ttcn M pcu/PCU_Tests_RAW.ttcn M pcu/PCU_Tests_RAW_SNS.ttcn M sccp/SCCP_Tests.ttcn M sgsn/SGSN_Tests.ttcn M sip/SIP_Tests.ttcn 84 files changed, 596 insertions(+), 32 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/98/14198/1 diff --git a/bsc-nat/BSCNAT_Tests.ttcn b/bsc-nat/BSCNAT_Tests.ttcn index 993d668..b9b031f 100644 --- a/bsc-nat/BSCNAT_Tests.ttcn +++ b/bsc-nat/BSCNAT_Tests.ttcn @@ -1,5 +1,16 @@ module BSCNAT_Tests { +/* osmo-bsc_nat test suite in TTCN-3 + * (C) 2018-2019 sysmocom - s.f.m.c. GmbH + * Author: Daniel Willmann + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from Osmocom_Types all; import from IPL4asp_Types all; diff --git a/bsc-nat/BSC_MS_ConnectionHandler.ttcn b/bsc-nat/BSC_MS_ConnectionHandler.ttcn index e52b678..8be05bf 100644 --- a/bsc-nat/BSC_MS_ConnectionHandler.ttcn +++ b/bsc-nat/BSC_MS_ConnectionHandler.ttcn @@ -1,5 +1,14 @@ module BSC_MS_ConnectionHandler { +/* (C) 2017-2019 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from General_Types all; import from Osmocom_Types all; import from SCCPasp_Types all; diff --git a/bsc-nat/BSC_MS_Simulation.ttcn b/bsc-nat/BSC_MS_Simulation.ttcn index c45b5ac..ed6e92d 100644 --- a/bsc-nat/BSC_MS_Simulation.ttcn +++ b/bsc-nat/BSC_MS_Simulation.ttcn @@ -1,5 +1,15 @@ module BSC_MS_Simulation { +/* (C) 2017-2018 Harald Welte + * (C) 2018 sysmocom - s.f.m.c. Gmbh; Author: Daniel Willmann + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from IPL4asp_Types all; import from IPA_Emulation all; diff --git a/bsc-nat/MGCP_Adapter.ttcn b/bsc-nat/MGCP_Adapter.ttcn index 6491c68..478c688 100644 --- a/bsc-nat/MGCP_Adapter.ttcn +++ b/bsc-nat/MGCP_Adapter.ttcn @@ -1,5 +1,15 @@ module MGCP_Adapter { +/* MGCP Adapter for bsc-nat tests in TTCN-3 + * (C) 2017 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from IPL4asp_Types all; import from MGCP_Types all; diff --git a/bsc-nat/MSC_ConnectionHandler.ttcn b/bsc-nat/MSC_ConnectionHandler.ttcn index 8635a29..685967c 100644 --- a/bsc-nat/MSC_ConnectionHandler.ttcn +++ b/bsc-nat/MSC_ConnectionHandler.ttcn @@ -1,5 +1,14 @@ module MSC_ConnectionHandler { +/* (C) 2017-2019 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from General_Types all; import from Osmocom_Types all; import from SCCPasp_Types all; diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 0583b30..8b9a839 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -7,6 +7,8 @@ * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. * + * SPDX-License-Identifier: GPL-2.0-or-later + * * This test suite tests OsmoBSC while emulating both multiple BTS + MS as * well as the MSC. See README for more details. * diff --git a/bsc/BSC_Tests_LCLS.ttcn b/bsc/BSC_Tests_LCLS.ttcn index f2b9b5d..6087133 100644 --- a/bsc/BSC_Tests_LCLS.ttcn +++ b/bsc/BSC_Tests_LCLS.ttcn @@ -7,6 +7,8 @@ * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. * + * SPDX-License-Identifier: GPL-2.0-or-later + * * This test suite tests OsmoBSC while emulating both multiple BTS + MS as * well as the MSC. See README for more details. * diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 520cc3e..e9ac485 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -1,5 +1,16 @@ module MSC_ConnectionHandler { +/* MSC Connection HAndler of BSC Tests in TTCN-3 + * (C) 2017-2019 Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from Misc_Helpers all; import from General_Types all; import from Osmocom_Types all; diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 5cde0af..1c20657 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -1,13 +1,15 @@ module BTS_Tests { /* Integration Tests for OsmoBTS - * (C) 2019-2019 by Harald Welte + * (C) 2018-2019 by Harald Welte * contributions by Vadim Yanitskiy and sysmocom - s.f.m.c. GmbH * All rights reserved. * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. * + * SPDX-License-Identifier: GPL-2.0-or-later + * * This test suite tests OsmoBTS by attaching to the external interfaces * such as Abis RSL, PCU, VTY as well as by attaching to a MS L1 implementation * using the L1CTL protocol/interface. diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn index 801a5fc..0712a90 100644 --- a/bts/BTS_Tests_SMSCB.ttcn +++ b/bts/BTS_Tests_SMSCB.ttcn @@ -7,6 +7,8 @@ * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. * + * SPDX-License-Identifier: GPL-2.0-or-later + * * This test suite tests the SMSCB (Cell Broadcast) related functionality of * OsmoBTS by attaching to the A-bis RSL and Um interface and emulating both * BSC and MS. diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn index d793d27..9577a60 100644 --- a/ggsn_tests/GGSN_Tests.ttcn +++ b/ggsn_tests/GGSN_Tests.ttcn @@ -1,5 +1,17 @@ module GGSN_Tests { +/* GGSN test suite in TTCN-3 + * (C) 2017-2019 Harald Welte + * (C) 2018-2019 sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + + import from General_Types all; import from Osmocom_Types all; import from IPL4asp_PortType all; diff --git a/hlr/HLR_EUSE.ttcn b/hlr/HLR_EUSE.ttcn index fbb496c..ef07ca6 100644 --- a/hlr/HLR_EUSE.ttcn +++ b/hlr/HLR_EUSE.ttcn @@ -6,7 +6,15 @@ * function, which will return whatever PDU to send in response back to the HLR. */ -/* (C) 2018 by Harald Welte */ + +/* (C) 2018 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ module HLR_EUSE { diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn index da6ad7c..b6bd1ad 100644 --- a/hlr/HLR_Tests.ttcn +++ b/hlr/HLR_Tests.ttcn @@ -1,5 +1,19 @@ module HLR_Tests { +/* HLR test suite in TTCN-3 + * (C) 2017-2018 Harald Welte + * (C) 2018 sysmocom - s.f.m.c. GmbH + * (C) 2018 Vadim Yanitskiy + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + + + import from GSUP_Types all; import from GSUP_Emulation all; import from IPA_Emulation all; diff --git a/library/AbisOML_Types.ttcn b/library/AbisOML_Types.ttcn index 0d37f8a..c4fd81c 100644 --- a/library/AbisOML_Types.ttcn +++ b/library/AbisOML_Types.ttcn @@ -10,6 +10,8 @@ * * Released under the terms of the GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from General_Types all; diff --git a/library/BSSAP_CodecPort.ttcn b/library/BSSAP_CodecPort.ttcn index 41bd171..fdece08 100644 --- a/library/BSSAP_CodecPort.ttcn +++ b/library/BSSAP_CodecPort.ttcn @@ -9,6 +9,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from General_Types all; diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn index 22c2f09..5b5628e 100644 --- a/library/BSSGP_Emulation.ttcn +++ b/library/BSSGP_Emulation.ttcn @@ -1,5 +1,15 @@ module BSSGP_Emulation { +/* BSSGP Emulation in TTCN-3 + * (C) 2018-2019 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from General_Types all; import from Osmocom_Types all; import from NS_Types all; diff --git a/library/BSSGP_Types.ttcn b/library/BSSGP_Types.ttcn index 826e3ec..d51bb6d 100644 --- a/library/BSSGP_Types.ttcn +++ b/library/BSSGP_Types.ttcn @@ -1,5 +1,15 @@ module BSSGP_Types { +/* BSSGP type definitions in TTCN-3 + * (C) 2018 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from General_Types all; import from Osmocom_Types all; import from GSM_Types all; diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index ad314a3..b377358 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -2,11 +2,14 @@ /* BSSMAP Templates, building on top of BSSAP_Types from Ericsson. * - * (C) 2017 by Harald Welte + * (C) 2017-2019 by Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH * All rights reserved. * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from General_Types all; diff --git a/library/DNS_Helpers.ttcn b/library/DNS_Helpers.ttcn index 45c3a09..122adff 100644 --- a/library/DNS_Helpers.ttcn +++ b/library/DNS_Helpers.ttcn @@ -1,5 +1,15 @@ module DNS_Helpers { +/* DNS Helper functions in TTCN-3 + * (C) 2018 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + private function f_strchr(charstring s, char c) return integer { var integer i; for (i := 0; i < lengthof(s); i := i+1) { diff --git a/library/GSMTAP_PortType.ttcn b/library/GSMTAP_PortType.ttcn index a3f655d..47796c8 100644 --- a/library/GSMTAP_PortType.ttcn +++ b/library/GSMTAP_PortType.ttcn @@ -1,4 +1,13 @@ -/* dual-faced port that wraps an IPL4asp port and encodes/decodes GSMTAP */ +/* dual-faced port that wraps an IPL4asp port and encodes/decodes GSMTAP + * (C) 2017 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + module GSMTAP_PortType { import from GSMTAP_Types all; import from IPL4asp_PortType all; diff --git a/library/GSM_RR_Types.ttcn b/library/GSM_RR_Types.ttcn index 5958569..457f0f5 100644 --- a/library/GSM_RR_Types.ttcn +++ b/library/GSM_RR_Types.ttcn @@ -1,7 +1,14 @@ /* Encoding/Decoding routines for GSM System Information messages - * according to 3GPP TS 44.018 Version 12.3.0 Release 12 */ - -/* (C) 2017 by Harald Welte */ + * according to 3GPP TS 44.018 Version 12.3.0 Release 12 + * + * (C) 2017-2019 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ module GSM_RR_Types { diff --git a/library/GSM_SystemInformation.ttcn b/library/GSM_SystemInformation.ttcn index 1d06aa1..f1918c9 100644 --- a/library/GSM_SystemInformation.ttcn +++ b/library/GSM_SystemInformation.ttcn @@ -1,7 +1,14 @@ /* Encoding/Decoding routines for GSM System Information messages - * according to 3GPP TS 44.018 Version 12.3.0 Release 12 */ - -/* (C) 2017 by Harald Welte */ + * according to 3GPP TS 44.018 Version 12.3.0 Release 12 + * + * (C) 2018 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ module GSM_SystemInformation { diff --git a/library/GSM_Types.ttcn b/library/GSM_Types.ttcn index 88be975..3e24f81 100644 --- a/library/GSM_Types.ttcn +++ b/library/GSM_Types.ttcn @@ -1,7 +1,14 @@ /* Encoding/Decoding routines for GSM System Information messages - * according to 3GPP TS 44.018 Version 12.3.0 Release 12 */ - -/* (C) 2017 by Harald Welte */ + * according to 3GPP TS 44.018 Version 12.3.0 Release 12 + * + * (C) 2017-2018 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ module GSM_Types { diff --git a/library/GSUP_Emulation.ttcn b/library/GSUP_Emulation.ttcn index 86859ba..ea8ba22 100644 --- a/library/GSUP_Emulation.ttcn +++ b/library/GSUP_Emulation.ttcn @@ -24,6 +24,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn index df1d7a9..10cf1b8 100644 --- a/library/GSUP_Types.ttcn +++ b/library/GSUP_Types.ttcn @@ -5,11 +5,14 @@ * GSUP is a non-standard protocol used between OsmoMSC/OsmoSGSN and OsmoHLR * in order to replace the complex TCAP/MAP protocol. * - * (C) 2017 by Harald Welte + * (C) 2017-2019 by Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH * All rights reserved. * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from General_Types all; diff --git a/library/GTP_CodecPort.ttcn b/library/GTP_CodecPort.ttcn index 7a3e755..a8507a6 100644 --- a/library/GTP_CodecPort.ttcn +++ b/library/GTP_CodecPort.ttcn @@ -1,5 +1,14 @@ -/* dual-faced port sitting on top of IPL4_asp UDP to encode/decode GTP */ -/* (C) 2017 by Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + + module GTP_CodecPort { import from IPL4asp_PortType all; import from IPL4asp_Types all; diff --git a/library/GTP_Emulation.ttcn b/library/GTP_Emulation.ttcn index 4368a8a..43c034b 100644 --- a/library/GTP_Emulation.ttcn +++ b/library/GTP_Emulation.ttcn @@ -1,3 +1,14 @@ +/* GTP Emulation in TTCN-3 + * + * (C) 2018 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module GTP_Emulation { import from IPL4asp_Types all; diff --git a/library/GTP_Templates.ttcn b/library/GTP_Templates.ttcn index bd39e27..f2e6ac0 100644 --- a/library/GTP_Templates.ttcn +++ b/library/GTP_Templates.ttcn @@ -1,3 +1,14 @@ +/* GTP Templates in TTCN-3 + * (C) 2018 Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module GTP_Templates { import from General_Types all; diff --git a/library/IPA_CodecPort.ttcn b/library/IPA_CodecPort.ttcn index f9a242b..dfc759c 100644 --- a/library/IPA_CodecPort.ttcn +++ b/library/IPA_CodecPort.ttcn @@ -4,11 +4,13 @@ * towards the IPL4asp port provider, and IPA primitives * which carry the decoded IPA data types as payload. * - * (C) 2017 by Harald Welte + * (C) 2017-2018 by Harald Welte * All rights reserved. * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from IPL4asp_PortType all; diff --git a/library/IPA_Emulation.ttcnpp b/library/IPA_Emulation.ttcnpp index a2066ee..3180621 100644 --- a/library/IPA_Emulation.ttcnpp +++ b/library/IPA_Emulation.ttcnpp @@ -8,11 +8,14 @@ * GSUP. IT hence transcodes messages so the user can work with abstract data types rather * than binary messages. It handles multiple packets inside one TCP segment. * - * (C) 2017-2018 by Harald Welte + * (C) 2017-2019 by Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH * All rights reserved. * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from IPA_Types all; diff --git a/library/IPA_Testing.ttcn b/library/IPA_Testing.ttcn index 413dd31..c4097a5 100644 --- a/library/IPA_Testing.ttcn +++ b/library/IPA_Testing.ttcn @@ -4,6 +4,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ /* diff --git a/library/IPA_Types.ttcn b/library/IPA_Types.ttcn index 1325b14..e232aeb 100644 --- a/library/IPA_Types.ttcn +++ b/library/IPA_Types.ttcn @@ -4,11 +4,13 @@ * Uses the TITAN "RAW" codec syntax to auto-generate encoder and decoder * functions. * - * (C) 2017 by Harald Welte + * (C) 2017-2018 by Harald Welte * All rights reserved. * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from Osmocom_Types all; diff --git a/library/IPCP_Types.ttcn b/library/IPCP_Types.ttcn index 75bb092..657289a 100644 --- a/library/IPCP_Types.ttcn +++ b/library/IPCP_Types.ttcn @@ -1,3 +1,13 @@ +/* IPCP (IP Configuration Protocol) in TTCN-3 + * (C) 2017 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module IPCP_Types { import from Osmocom_Types all; diff --git a/library/IuUP_Emulation.ttcn b/library/IuUP_Emulation.ttcn index 752b897..56384ee 100644 --- a/library/IuUP_Emulation.ttcn +++ b/library/IuUP_Emulation.ttcn @@ -11,9 +11,10 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ - import from Osmocom_Types all; import from IuUP_Types all; diff --git a/library/L1CTL_PortType.ttcn b/library/L1CTL_PortType.ttcn index a366a1b..bdcf024 100644 --- a/library/L1CTL_PortType.ttcn +++ b/library/L1CTL_PortType.ttcn @@ -1,4 +1,14 @@ -/* dual-faced port that wraps an Unixdomain port and encodes/decodes L1CTL */ +/* dual-faced port that wraps an Unixdomain port and encodes/decodes L1CTL + * (C) 2017-2019 Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module L1CTL_PortType { import from L1CTL_Types all; import from UD_PortType all; diff --git a/library/L1CTL_Types.ttcn b/library/L1CTL_Types.ttcn index 6ffbbb8..69e7dbe 100644 --- a/library/L1CTL_Types.ttcn +++ b/library/L1CTL_Types.ttcn @@ -1,6 +1,14 @@ /* Data Types / Encoding / Decoding for OsmocomBB L1CTL interface */ /* (C) 2017 by Harald Welte , derived from l1ctl_proto.h - * (C) 2010 by Harald Welte + Holger Hans Peter Freyther */ + * which is (C) 2010 by Harald Welte + Holger Hans Peter Freyther + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module L1CTL_Types { import from General_Types all; diff --git a/library/L3_Common.ttcn b/library/L3_Common.ttcn index 01f0a34..0a80593 100644 --- a/library/L3_Common.ttcn +++ b/library/L3_Common.ttcn @@ -1,3 +1,14 @@ +/* Common L3 helper functions in TTCN-3 + * (C) 2018 Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module L3_Common { import from Osmocom_Types all; diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn index cf6d64c..a2fe67a 100644 --- a/library/L3_Templates.ttcn +++ b/library/L3_Templates.ttcn @@ -7,6 +7,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from General_Types all; diff --git a/library/LAPDm_RAW_PT.ttcn b/library/LAPDm_RAW_PT.ttcn index 6b8f9fb..164d31a 100644 --- a/library/LAPDm_RAW_PT.ttcn +++ b/library/LAPDm_RAW_PT.ttcn @@ -1,6 +1,16 @@ /* Test Port that stacks on top of L1CTL test port and performs LAPDm encoding/decoding, so the user can send * and receive LAPDm frames in decoded TTCN-3 data types. This is particularly useful for sending/receiving * all kinds of hand-crafted LAPDm frames for testing of the remote LAPDm layer */ + +/* (C) 2017-2018 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module LAPDm_RAW_PT { import from GSM_Types all; import from GSM_RR_Types all; diff --git a/library/LAPDm_Types.ttcn b/library/LAPDm_Types.ttcn index 32e1ba6..a1ca5fe 100644 --- a/library/LAPDm_Types.ttcn +++ b/library/LAPDm_Types.ttcn @@ -1,5 +1,13 @@ -/* LAPDm definitiona according to 3GPP TS 44.006 */ -/* (C) 2017-2018 bh Harald Welte */ +/* LAPDm definitions according to 3GPP TS 44.006 + * (C) 2017-2018 by Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module LAPDm_Types { import from General_Types all; diff --git a/library/LLC_Templates.ttcn b/library/LLC_Templates.ttcn index b71bce1..ed2ca6f 100644 --- a/library/LLC_Templates.ttcn +++ b/library/LLC_Templates.ttcn @@ -1,3 +1,14 @@ +/* LLC Templates in TTCN-3 + * (C) 2018-2019 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + + module LLC_Templates { import from LLC_Types all; diff --git a/library/MGCP_CodecPort.ttcn b/library/MGCP_CodecPort.ttcn index c206986..d33afe1 100644 --- a/library/MGCP_CodecPort.ttcn +++ b/library/MGCP_CodecPort.ttcn @@ -5,10 +5,13 @@ * which carry the decoded MGCP data types as payload. * * (C) 2017 by Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH * All rights reserved. * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from IPL4asp_PortType all; diff --git a/library/MGCP_Emulation.ttcn b/library/MGCP_Emulation.ttcn index 3dfbbc8..23cfeb4 100644 --- a/library/MGCP_Emulation.ttcn +++ b/library/MGCP_Emulation.ttcn @@ -25,6 +25,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from MGCP_CodecPort all; diff --git a/library/MNCC_Emulation.ttcn b/library/MNCC_Emulation.ttcn index 94ed1c4..ee9b58e 100644 --- a/library/MNCC_Emulation.ttcn +++ b/library/MNCC_Emulation.ttcn @@ -27,6 +27,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ diff --git a/library/MNCC_Types.ttcn b/library/MNCC_Types.ttcn index f5028d2..828f341 100644 --- a/library/MNCC_Types.ttcn +++ b/library/MNCC_Types.ttcn @@ -1,3 +1,15 @@ +/* Osmocom MNCC type definitions in TTCN-3 + * (C) 2017-2019 Harald Welte + * contributions by sysmocom -s.f.m.c. GmbH + * (C) 2018 Vadim Yanitskiy + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module MNCC_Types { import from Osmocom_Types all; diff --git a/library/NS_Emulation.ttcn b/library/NS_Emulation.ttcn index 89e25ea..697a482 100644 --- a/library/NS_Emulation.ttcn +++ b/library/NS_Emulation.ttcn @@ -1,3 +1,14 @@ +/* GPRS-NS Emulation in TTCN-3 + * (C) 2018 Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module NS_Emulation { import from NS_Types all; import from BSSGP_Types all; diff --git a/library/NS_Types.ttcn b/library/NS_Types.ttcn index ba1c461..6432d6c 100644 --- a/library/NS_Types.ttcn +++ b/library/NS_Types.ttcn @@ -1,3 +1,13 @@ +/* GPRS-NS type definitions in TTCN-3 + * (C) 2017 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module NS_Types { import from General_Types all; import from Osmocom_Types all; diff --git a/library/Native_FunctionDefs.cc b/library/Native_FunctionDefs.cc index 8aa31b4..f6d5d1d 100644 --- a/library/Native_FunctionDefs.cc +++ b/library/Native_FunctionDefs.cc @@ -1,7 +1,13 @@ /* Utility functions that I'm used to from C but for which I couldn't find TTCN-3 implementations * - * (C) 2017 by Harald Welte + * (C) 2017 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ #include diff --git a/library/Osmocom_CTRL_Adapter.ttcn b/library/Osmocom_CTRL_Adapter.ttcn index f1002bd..93e893f 100644 --- a/library/Osmocom_CTRL_Adapter.ttcn +++ b/library/Osmocom_CTRL_Adapter.ttcn @@ -1,6 +1,15 @@ module Osmocom_CTRL_Adapter { -/* Module that test suites can 'inherit' in order to have a CTRL connection to the IUT which they're testing */ +/* Module that test suites can 'inherit' in order to have a CTRL connection to the IUT which they're testing + * (C) 2018 Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ import from IPL4asp_Types all; diff --git a/library/Osmocom_CTRL_Types.ttcn b/library/Osmocom_CTRL_Types.ttcn index 1d77668..eb22056 100644 --- a/library/Osmocom_CTRL_Types.ttcn +++ b/library/Osmocom_CTRL_Types.ttcn @@ -3,11 +3,13 @@ /* Definition of abstract types for the CTRL protocol as used in Osmocom. * Uses the TITAN "TEXT" codec to auto-generate encoder/decoder functions. * - * (C) 2017 by Harald Welte + * (C) 2017-2018 by Harald Welte * All rights reserved. * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ type charstring CtrlVerb ("GET", "SET") with { diff --git a/library/Osmocom_Types.ttcn b/library/Osmocom_Types.ttcn index 2a4f68c..ffd5df5 100644 --- a/library/Osmocom_Types.ttcn +++ b/library/Osmocom_Types.ttcn @@ -1,3 +1,13 @@ +/* Osmocom utility type definitions in TTCN-3 + * (C) 2017-2019 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module Osmocom_Types { import from General_Types all; diff --git a/library/Osmocom_VTY_Functions.ttcn b/library/Osmocom_VTY_Functions.ttcn index fde05b3..b61a655 100644 --- a/library/Osmocom_VTY_Functions.ttcn +++ b/library/Osmocom_VTY_Functions.ttcn @@ -1,3 +1,14 @@ +/* Osmocom VTY interface functions in TTCN-3 + * (C) 2017-2018 Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module Osmocom_VTY_Functions { import from TELNETasp_PortType all; import from Osmocom_Types all; diff --git a/library/PAP_Types.ttcn b/library/PAP_Types.ttcn index 4e3f14f..eb0c1d1 100644 --- a/library/PAP_Types.ttcn +++ b/library/PAP_Types.ttcn @@ -5,6 +5,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from Osmocom_Types all; diff --git a/library/PCUIF_CodecPort.ttcn b/library/PCUIF_CodecPort.ttcn index cc86fee..91f9bf9 100644 --- a/library/PCUIF_CodecPort.ttcn +++ b/library/PCUIF_CodecPort.ttcn @@ -1,3 +1,14 @@ +/* PCU Interface codec poart in TTCN-3 + * (C) 2018 Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module PCUIF_CodecPort { import from Osmocom_Types all; diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn index 455082a..132b72d 100644 --- a/library/PCUIF_Types.ttcn +++ b/library/PCUIF_Types.ttcn @@ -1,10 +1,19 @@ +/* Osmocom PCU Interface Types, as per osmo-pcu/include/osmocom/pcu/pcuif_proto.h + * (C) 2018-2019 Harald Welte + * contributions by Vadim Yanitskiy + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module PCUIF_Types { import from General_Types all; import from Osmocom_Types all; -/* Osmocom PCU Interface Types, as per osmo-pcu/include/osmocom/pcu/pcuif_proto.h */ - const charstring PCU_SOCK_DEFAULT := "/tmp/pcu_bts"; const uint32_t PCU_IF_VERSION := 9; diff --git a/library/RAN_Adapter.ttcnpp b/library/RAN_Adapter.ttcnpp index 27d22ca..30a1a9e 100644 --- a/library/RAN_Adapter.ttcnpp +++ b/library/RAN_Adapter.ttcnpp @@ -5,6 +5,16 @@ * with deoded BSSAP/RANAP payload. Use this if you want to have full control about what you transmit or * receive, without any automatisms in place. Allows you to refuse connections or other abnormal behavior. */ +/* (C) 2017-2019 Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from General_Types all; import from Osmocom_Types all; diff --git a/library/RLCMAC_CSN1_Types.ttcn b/library/RLCMAC_CSN1_Types.ttcn index 9a7c867..1c8e74c 100644 --- a/library/RLCMAC_CSN1_Types.ttcn +++ b/library/RLCMAC_CSN1_Types.ttcn @@ -1,7 +1,17 @@ /* GPRS RLC/MAC Control Messages as per 3GPP TS 44.060 manually transcribed from the CSN.1 syntax, as no CSN.1 * tool for Eclipse TITAN could be found. Implements only the minimum necessary messages for Osmocom teseting - * purposes. - * (C) 2017 by Harald Welte */ + * purposes. */ + +/* (C) 2017-2018 Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module RLCMAC_CSN1_Types { import from General_Types all; import from Osmocom_Types all; diff --git a/library/RLCMAC_EncDec.cc b/library/RLCMAC_EncDec.cc index 0c1dd84..4ae65b1 100644 --- a/library/RLCMAC_EncDec.cc +++ b/library/RLCMAC_EncDec.cc @@ -4,6 +4,12 @@ * beyond what TITAN RAW coder can handle internally. * * (C) 2017 by Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ namespace RLCMAC__Types { diff --git a/library/RLCMAC_Types.ttcn b/library/RLCMAC_Types.ttcn index c946594..f3deafc 100644 --- a/library/RLCMAC_Types.ttcn +++ b/library/RLCMAC_Types.ttcn @@ -1,4 +1,14 @@ /* TITAN REW encode/decode definitions for 3GPP TS 44.060 RLC/MAC Blocks */ + +/* (C) 2017-2018 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module RLCMAC_Types { import from General_Types all; import from Osmocom_Types all; diff --git a/library/RSL_Emulation.ttcn b/library/RSL_Emulation.ttcn index cdeca74..790dd7a 100644 --- a/library/RSL_Emulation.ttcn +++ b/library/RSL_Emulation.ttcn @@ -21,6 +21,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from Misc_Helpers all; diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index bfa0af4..4d23c3f 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -9,6 +9,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from General_Types all; diff --git a/library/RTP_CodecPort.ttcn b/library/RTP_CodecPort.ttcn index 8f85fd9..b94ae73 100644 --- a/library/RTP_CodecPort.ttcn +++ b/library/RTP_CodecPort.ttcn @@ -9,6 +9,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from IPL4asp_PortType all; diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn index 7b9be68..31bf68a 100644 --- a/library/RTP_Emulation.ttcn +++ b/library/RTP_Emulation.ttcn @@ -14,6 +14,17 @@ * * enable/disable generation/verification of RTCP */ +/* (C) 2017-2018 Harald Welte + * (C) 2018-2019 sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + + /* Ideas: * each component consists of transmitter and receiver diff --git a/library/SCCP_Templates.ttcn b/library/SCCP_Templates.ttcn index f4019b8..a5af073 100644 --- a/library/SCCP_Templates.ttcn +++ b/library/SCCP_Templates.ttcn @@ -3,6 +3,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ module SCCP_Templates { diff --git a/library/SGsAP_CodecPort.ttcn b/library/SGsAP_CodecPort.ttcn index 2981fa2..47fe2cd 100644 --- a/library/SGsAP_CodecPort.ttcn +++ b/library/SGsAP_CodecPort.ttcn @@ -9,6 +9,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from IPL4asp_PortType all; diff --git a/library/SGsAP_Emulation.ttcn b/library/SGsAP_Emulation.ttcn index 442cc7c..f91e076 100644 --- a/library/SGsAP_Emulation.ttcn +++ b/library/SGsAP_Emulation.ttcn @@ -23,6 +23,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from SGsAP_CodecPort all; diff --git a/library/SGsAP_Templates.ttcn b/library/SGsAP_Templates.ttcn index 428924f..4414dd1 100644 --- a/library/SGsAP_Templates.ttcn +++ b/library/SGsAP_Templates.ttcn @@ -6,6 +6,8 @@ * * Released under the terms of the GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from SGsAP_Types all; diff --git a/library/SIP_Emulation.ttcn b/library/SIP_Emulation.ttcn index 98f7371..e71c611 100644 --- a/library/SIP_Emulation.ttcn +++ b/library/SIP_Emulation.ttcn @@ -24,6 +24,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from SIPmsg_Types all; diff --git a/library/SMPP_CodecPort.ttcn b/library/SMPP_CodecPort.ttcn index 0ac81ae..b415c09 100644 --- a/library/SMPP_CodecPort.ttcn +++ b/library/SMPP_CodecPort.ttcn @@ -9,6 +9,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ diff --git a/library/SMPP_Emulation.ttcn b/library/SMPP_Emulation.ttcn index 6dc78e9..fdeed4b 100644 --- a/library/SMPP_Emulation.ttcn +++ b/library/SMPP_Emulation.ttcn @@ -7,6 +7,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ diff --git a/library/SS_Templates.ttcn b/library/SS_Templates.ttcn index 6d8fcf2..069b4e9 100644 --- a/library/SS_Templates.ttcn +++ b/library/SS_Templates.ttcn @@ -7,6 +7,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from General_Types all; diff --git a/library/TRXC_Types.ttcn b/library/TRXC_Types.ttcn index 77666d9..37b8610 100644 --- a/library/TRXC_Types.ttcn +++ b/library/TRXC_Types.ttcn @@ -1,5 +1,15 @@ module TRXC_Types { +/* TRX Control protocol type definitions in TTCN-3 + * (C) 2018 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from Osmocom_Types all; type charstring TrxcType ("CMD", "RSP", "IND") with { diff --git a/library/USSD_Helpers.ttcn b/library/USSD_Helpers.ttcn index 5dd4bb1..0d23073 100644 --- a/library/USSD_Helpers.ttcn +++ b/library/USSD_Helpers.ttcn @@ -8,6 +8,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from General_Types all; diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn index 8cb2404..6e79155 100644 --- a/mgw/MGCP_Test.ttcn +++ b/mgw/MGCP_Test.ttcn @@ -1,3 +1,14 @@ +/* MGW (Media Gateway) test suite in TTCN-3 + * (C) 2017-2018 Harald Welte + * (C) 2018-2019 sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module MGCP_Test { import from Osmocom_Types all; import from MGCP_Types all; diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 796b0ce..0dfb833 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -1,3 +1,15 @@ +/* BSC Connection Handler of MSC test suite in TTCN-3 + * (C) 2018-2019 Harald Welte + * (C) 2018-2019 sysmocom - s.f.m.c. GmbH + * (C) 2018 Vadim Yanitskiy + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module BSC_ConnectionHandler { import from General_Types all; diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index b64b872..6bd1a57 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -1,5 +1,17 @@ module MSC_Tests { +/* Osmocom MSC test suite in in TTCN-3 + * (C) 2017-2019 Harald Welte + * (C) 2018-2019 sysmocom - s.f.m.c. GmbH + * (C) 2018-2019 Vadim Yanitskiy + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + friend module MSC_Tests_Iu; import from General_Types all; diff --git a/msc/MSC_Tests_Iu.ttcn b/msc/MSC_Tests_Iu.ttcn index 5798821..e592573 100644 --- a/msc/MSC_Tests_Iu.ttcn +++ b/msc/MSC_Tests_Iu.ttcn @@ -1,5 +1,15 @@ module MSC_Tests_Iu { +/* Osmocom MSC test suite for Iu interface in TTCN-3 + * (C) 2019 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from General_Types all; import from Osmocom_Types all; diff --git a/pcu/GPRS_TBF.ttcn b/pcu/GPRS_TBF.ttcn index 951cf4a..9fbe191 100644 --- a/pcu/GPRS_TBF.ttcn +++ b/pcu/GPRS_TBF.ttcn @@ -7,9 +7,10 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ - import from GSM_Types all; import from Osmocom_Types all; import from General_Types all; diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn index 4dce7dd..e00f92b 100644 --- a/pcu/PCU_Tests.ttcn +++ b/pcu/PCU_Tests.ttcn @@ -1,5 +1,15 @@ module PCU_Tests { +/* Osmocom PCU test suite in TTCN-3 + * (C) 2018-2019 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from General_Types all; import from Osmocom_Types all; import from GSM_Types all; diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn index 96a3f86..36db225 100644 --- a/pcu/PCU_Tests_RAW.ttcn +++ b/pcu/PCU_Tests_RAW.ttcn @@ -6,6 +6,15 @@ standard procedures on the NS and BSSGP level. The goal of these tests is to test exactly those NS and BSSGP implementations on the BSS (PCU) side. */ +/* (C) 2018-2019 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from General_Types all; import from Osmocom_Types all; import from GSM_Types all; diff --git a/pcu/PCU_Tests_RAW_SNS.ttcn b/pcu/PCU_Tests_RAW_SNS.ttcn index 9bedff9..28dd654 100644 --- a/pcu/PCU_Tests_RAW_SNS.ttcn +++ b/pcu/PCU_Tests_RAW_SNS.ttcn @@ -1,5 +1,15 @@ module PCU_Tests_RAW_SNS { +/* Osmocom PCU test suite for IP Sub-Network-Service (SNS) in TTCN-3 + * (C) 2018-2019 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from Osmocom_Types all; import from PCU_Tests all; import from PCU_Tests_RAW all; diff --git a/sccp/SCCP_Tests.ttcn b/sccp/SCCP_Tests.ttcn index ea2522a..e76e9ac 100644 --- a/sccp/SCCP_Tests.ttcn +++ b/sccp/SCCP_Tests.ttcn @@ -4,6 +4,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ module SCCP_Tests { diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index 2bdbfb9..5633183 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -1,5 +1,16 @@ module SGSN_Tests { +/* Osmocom SGSN test suite in TTCN-3 + * (C) 2018-2019 Harald Welte + * (C) 2018-2019 sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from General_Types all; import from Osmocom_Types all; import from Native_Functions all; diff --git a/sip/SIP_Tests.ttcn b/sip/SIP_Tests.ttcn index 67650c8..9de2723 100644 --- a/sip/SIP_Tests.ttcn +++ b/sip/SIP_Tests.ttcn @@ -1,5 +1,15 @@ module SIP_Tests { +/* osmo-sip-connector test suite in TTCN-3 + * (C) 2018-2019 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from General_Types all; import from Osmocom_Types all; -- To view, visit https://gerrit.osmocom.org/14198 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If7fa19ce484b415bc645e39b3d0d666b44b5f0fd Gerrit-Change-Number: 14198 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 09:56:21 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 09:56:21 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Add Osmux support and tests for MGW In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14046 ) Change subject: Add Osmux support and tests for MGW ...................................................................... Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14046 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibb58b2a4e08d6f30cfe347c217794d0d1310954f Gerrit-Change-Number: 14046 Gerrit-PatchSet: 6 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 27 May 2019 09:56:21 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 09:56:51 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 09:56:51 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Add Osmux support and tests for MGW In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14046 ) Change subject: Add Osmux support and tests for MGW ...................................................................... Add Osmux support and tests for MGW Depends: osmo-mgw.git Iac073f1db46569b46eddeaecc9934a2986bd50f1 Change-Id: Ibb58b2a4e08d6f30cfe347c217794d0d1310954f --- M library/MGCP_Templates.ttcn M library/MGCP_Types.ttcn A library/OSMUX_CodecPort.ttcn A library/OSMUX_CodecPort_CtrlFunct.ttcn A library/OSMUX_CodecPort_CtrlFunctDef.cc A library/OSMUX_Emulation.ttcn A library/OSMUX_Types.ttcn M mgw/MGCP_Test.ttcn M mgw/expected-results.xml M mgw/gen_links.sh M mgw/regen_makefile.sh 11 files changed, 1,546 insertions(+), 8 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/MGCP_Templates.ttcn b/library/MGCP_Templates.ttcn index 506100f..4cc2c6b 100644 --- a/library/MGCP_Templates.ttcn +++ b/library/MGCP_Templates.ttcn @@ -49,6 +49,12 @@ val := hex2str(cid) }; + /* Osmocom extension: X-Osmux: {*,%u} */ + template MgcpParameter ts_MgcpParOsmuxCID(MgcpOsmuxCID osmux_cid) := { + code := "X-OSMUX", + val := f_mgcp_osmux_cid_encode(osmux_cid) + }; + /* osmo-bsc_mgcp implements L/C/M/X only, osmo-mgw adds 'I' */ /* SDP: osmo-bsc_mgcp implements Tx of v,o,s,c,t,m,a */ @@ -89,6 +95,18 @@ sdp := sdp } + template MgcpCommand ts_CRCX_osmux(MgcpTransId trans_id, charstring ep, MgcpConnectionMode mode, MgcpCallId call_id, MgcpOsmuxCID osmux_cid, template SDP_Message sdp := omit) := { + line := t_MgcpCmdLine("CRCX", trans_id, ep), + params := { + t_MgcpParConnMode(mode), + ts_MgcpParCallId(call_id), + //t_MgcpParReqId(omit), + t_MgcpParLocConnOpt("p:20, a:AMR"), + ts_MgcpParOsmuxCID(osmux_cid) + }, + sdp := sdp + } + template MgcpCommand tr_CRCX(template MgcpEndpoint ep := ?) := { line := t_MgcpCmdLine("CRCX", ?, ep), params := *, @@ -105,6 +123,16 @@ sdp := ? } + template MgcpResponse tr_CRCX_ACK_osmux := { + line := { + code := "200", + trans_id := ?, + string := "OK" + }, + params:= { { "I", ? }, {"X-OSMUX", ?}, *}, + sdp := ? + } + template MgcpResponse ts_CRCX_ACK(MgcpTransId trans_id, MgcpConnectionId conn_id, template SDP_Message sdp := omit) := { line := { code := "200", @@ -127,6 +155,19 @@ sdp := sdp } + template MgcpCommand ts_MDCX_osmux(MgcpTransId trans_id, charstring ep, MgcpConnectionMode mode, MgcpCallId call_id, MgcpConnectionId conn_id, MgcpOsmuxCID osmux_cid, template SDP_Message sdp := omit) := { + line := t_MgcpCmdLine("MDCX", trans_id, ep), + params := { + t_MgcpParConnMode(mode), + ts_MgcpParCallId(call_id), + ts_MgcpParConnectionId(conn_id), + //t_MgcpParReqId(omit), + t_MgcpParLocConnOpt("p:20, a:AMR"), + ts_MgcpParOsmuxCID(osmux_cid) + }, + sdp := sdp + } + template MgcpCommand tr_MDCX := { line := t_MgcpCmdLine("MDCX", ?, ?), params := *, @@ -286,6 +327,21 @@ } } + /* -1 is wildcard, positive is translated as string */ + function f_mgcp_osmux_cid_encode(MgcpOsmuxCID osmux_cid) return charstring { + if (osmux_cid == -1) { + return "*"; + } + return int2str(osmux_cid); + } + + function f_mgcp_osmux_cid_decode(charstring osmux_cid) return MgcpOsmuxCID { + if (osmux_cid == "*") { + return -1; + } + return str2int(osmux_cid); + } + function f_mgcp_contains_par(MgcpMessage msg, MgcpInfoCode code) return boolean { var MgcpParameterList pars; if (ischosen(msg.command)) { @@ -352,6 +408,10 @@ return str2hex(f_MgcpCmd_extract_par(cmd, "I")); } + function f_MgcpCmd_extract_osmux_cid(MgcpCommand cmd) return MgcpOsmuxCID { + return f_mgcp_osmux_cid_decode(f_MgcpCmd_extract_par(cmd, "X-OSMUX")); + } + function f_mgcp_alloc_tid() return MgcpTransId { return int2str(float2int(rnd()*2147483647.0)); diff --git a/library/MGCP_Types.ttcn b/library/MGCP_Types.ttcn index 8e11c7a..b56734c 100644 --- a/library/MGCP_Types.ttcn +++ b/library/MGCP_Types.ttcn @@ -24,13 +24,14 @@ type hexstring MgcpCallId length(1..32); /* 3.2.2.2 */ type hexstring MgcpConnectionId length(1..32); /* 3.2.2.5 */ type hexstring MgcpRequestId length(1..32); /* 3.2.2.18 */ + type integer MgcpOsmuxCID (-1 .. 255); type charstring MgcpResponseCode (pattern "\d#(3)"); type charstring MgcpInfoCode ("B", "C", "I", "N", "X", "L", "M", "R", "S", "D", "O", "P", "E", "Z", "Q", "T", "RC", "LC", "A", "ES", "RM", "RD", "PL", - "MD", "X-Osmo-CP") with { - variant "TEXT_CODING(,convert=upper_case,'([BCINXLMRSDOPEZQTA])|(RC)|(LC)|(ES)|(RM)|(RD)|(PL)|(MD)|(X-Osmo-CP)',case_insensitive)" + "MD", "X-OSMO-CP", "X-OSMUX") with { + variant "TEXT_CODING(,convert=upper_case,'([BCINXLMRSDOPEZQTA])|(RC)|(LC)|(ES)|(RM)|(RD)|(PL)|(MD)|(X-OSMO-CP)|(X-OSMUX)',case_insensitive)" }; /* 3.2.2.6 */ diff --git a/library/OSMUX_CodecPort.ttcn b/library/OSMUX_CodecPort.ttcn new file mode 100644 index 0000000..ce83ab4 --- /dev/null +++ b/library/OSMUX_CodecPort.ttcn @@ -0,0 +1,74 @@ +module OSMUX_CodecPort { + +/* Simple Osmux Codec Port, translating between raw UDP primitives with + * octetstring payload towards the IPL4asp provider, and Osmux primitives + * which carry the decoded abstract Osmux data types as payload. + * + * (C) 2019 by sysmocom s.f.m.c. GmbH + * All rights reserved. + * + * Author: Pau Espin Pedrol + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + */ + + import from IPL4asp_PortType all; + import from IPL4asp_Types all; + import from OSMUX_Types all; + + type record Osmux_RecvFrom { + ConnectionId connId, + HostName remName, + PortNumber remPort, + HostName locName, + PortNumber locPort, + OSMUX_PDU msg + }; + + template Osmux_RecvFrom t_Osmux_RecvFrom(template OSMUX_PDU msg) := { + connId := ?, + remName := ?, + remPort := ?, + locName := ?, + locPort := ?, + msg := msg + } + + type record Osmux_Send { + ConnectionId connId, + OSMUX_PDU msg + } + + template Osmux_Send t_Osmux_Send(template ConnectionId connId, template OSMUX_PDU msg) := { + connId := connId, + msg := msg + } + + private function IPL4_to_Osmux_RecvFrom(in ASP_RecvFrom pin, out Osmux_RecvFrom pout) { + pout.connId := pin.connId; + pout.remName := pin.remName; + pout.remPort := pin.remPort; + pout.locName := pin.locName; + pout.locPort := pin.locPort; + pout.msg := dec_OSMUX_PDU(pin.msg) + } with { extension "prototype(fast)" }; + + private function Osmux_to_IPL4_Send(in Osmux_Send pin, out ASP_Send pout) { + pout.connId := pin.connId; + pout.proto := { udp := {} }; + pout.msg := enc_OSMUX_PDU(pin.msg); + } with { extension "prototype(fast)" }; + + type port OSMUX_CODEC_PT message { + out Osmux_Send; + in Osmux_RecvFrom, + ASP_ConnId_ReadyToRelease, + ASP_Event; + } with { extension "user IPL4asp_PT + out(Osmux_Send -> ASP_Send:function(Osmux_to_IPL4_Send)) + in(ASP_RecvFrom -> Osmux_RecvFrom: function(IPL4_to_Osmux_RecvFrom); + ASP_ConnId_ReadyToRelease -> ASP_ConnId_ReadyToRelease: simple; + ASP_Event -> ASP_Event: simple)" + } +} diff --git a/library/OSMUX_CodecPort_CtrlFunct.ttcn b/library/OSMUX_CodecPort_CtrlFunct.ttcn new file mode 100644 index 0000000..aabb86f --- /dev/null +++ b/library/OSMUX_CodecPort_CtrlFunct.ttcn @@ -0,0 +1,44 @@ +module OSMUX_CodecPort_CtrlFunct { + + import from OSMUX_CodecPort all; + import from IPL4asp_Types all; + + external function f_IPL4_listen( + inout OSMUX_CODEC_PT portRef, + in HostName locName, + in PortNumber locPort, + in ProtoTuple proto, + in OptionList options := {} + ) return Result; + + external function f_IPL4_connect( + inout OSMUX_CODEC_PT portRef, + in HostName remName, + in PortNumber remPort, + in HostName locName, + in PortNumber locPort, + in ConnectionId connId, + in ProtoTuple proto, + in OptionList options := {} + ) return Result; + + external function f_IPL4_close( + inout OSMUX_CODEC_PT portRef, + in ConnectionId id, + in ProtoTuple proto := { unspecified := {} } + ) return Result; + + external function f_IPL4_setUserData( + inout OSMUX_CODEC_PT portRef, + in ConnectionId id, + in UserData userData + ) return Result; + + external function f_IPL4_getUserData( + inout OSMUX_CODEC_PT portRef, + in ConnectionId id, + out UserData userData + ) return Result; + +} + diff --git a/library/OSMUX_CodecPort_CtrlFunctDef.cc b/library/OSMUX_CodecPort_CtrlFunctDef.cc new file mode 100644 index 0000000..b877f2d --- /dev/null +++ b/library/OSMUX_CodecPort_CtrlFunctDef.cc @@ -0,0 +1,55 @@ +#include "IPL4asp_PortType.hh" +#include "OSMUX_CodecPort.hh" +#include "IPL4asp_PT.hh" + +namespace OSMUX__CodecPort__CtrlFunct { + + IPL4asp__Types::Result f__IPL4__listen( + OSMUX__CodecPort::OSMUX__CODEC__PT& portRef, + const IPL4asp__Types::HostName& locName, + const IPL4asp__Types::PortNumber& locPort, + const IPL4asp__Types::ProtoTuple& proto, + const IPL4asp__Types::OptionList& options) + { + return f__IPL4__PROVIDER__listen(portRef, locName, locPort, proto, options); + } + + IPL4asp__Types::Result f__IPL4__connect( + OSMUX__CodecPort::OSMUX__CODEC__PT& portRef, + const IPL4asp__Types::HostName& remName, + const IPL4asp__Types::PortNumber& remPort, + const IPL4asp__Types::HostName& locName, + const IPL4asp__Types::PortNumber& locPort, + const IPL4asp__Types::ConnectionId& connId, + const IPL4asp__Types::ProtoTuple& proto, + const IPL4asp__Types::OptionList& options) + { + return f__IPL4__PROVIDER__connect(portRef, remName, remPort, + locName, locPort, connId, proto, options); + } + + IPL4asp__Types::Result f__IPL4__close( + OSMUX__CodecPort::OSMUX__CODEC__PT& portRef, + const IPL4asp__Types::ConnectionId& connId, + const IPL4asp__Types::ProtoTuple& proto) + { + return f__IPL4__PROVIDER__close(portRef, connId, proto); + } + + IPL4asp__Types::Result f__IPL4__setUserData( + OSMUX__CodecPort::OSMUX__CODEC__PT& portRef, + const IPL4asp__Types::ConnectionId& connId, + const IPL4asp__Types::UserData& userData) + { + return f__IPL4__PROVIDER__setUserData(portRef, connId, userData); + } + + IPL4asp__Types::Result f__IPL4__getUserData( + OSMUX__CodecPort::OSMUX__CODEC__PT& portRef, + const IPL4asp__Types::ConnectionId& connId, + IPL4asp__Types::UserData& userData) + { + return f__IPL4__PROVIDER__getUserData(portRef, connId, userData); + } + +} diff --git a/library/OSMUX_Emulation.ttcn b/library/OSMUX_Emulation.ttcn new file mode 100644 index 0000000..e1275b9 --- /dev/null +++ b/library/OSMUX_Emulation.ttcn @@ -0,0 +1,575 @@ +module OSMUX_Emulation { + +/* Functionalities that we want this module to implement: + * * act as a Osmux source that generates a Osmux Stream + * * act as a Osmux sink that consumes a Osmux Stream + * + * for all of the above, we want to be able to + * * specify the payload type + * * specify the interval / sample rate + * * create drop-outs in the stream + * * detect reordered or lost frames + * * validate if the size of the frames matches epectations + * * play back real audio (at least some tones?) + * * enable/disable generation/verification of RTCP + */ + +/* Ideas: + +* each component consists of transmitter and receiver +* transmitters and receivers can be operated as tuple? +* high-level operation +** set-up config at transmitter + receiver +** transmit sequence of payloads +** verify receiption of those payloads +* can operate full-duplex/bi-directional as needed + +* transmitter +** trigger transmission of n number of packets +** transmit them at normal ptime interval +** payload size configurable +** payload contents PRBS or the like + +* receiver +** count number of related packets at receiver +** check received payload type +** check received timestamp increments +** check received seq_nr increments +** (optionally) check for SSRC +** (optionally) check for payload size +** (optionally) check for payload contents + +* later +** how to test transcoding? +** how to test pure play-out endpoints (rx only)? +** how to test "Rx from wrong IP/port" scenarios? +** how to test RTCP? +** maybe keep ports un-connected to show wrong src -lrt + +*/ + + + + +import from General_Types all; +import from Osmocom_Types all; +import from IPL4asp_Types all; +import from OSMUX_Types all; +import from OSMUX_CodecPort all; +import from OSMUX_CodecPort_CtrlFunct all; + +type component OSMUX_Emulation_CT { + /* down-facing ports for Osmux on top of IPL4asp */ + port OSMUX_CODEC_PT OSMUX; + var integer g_osmux_conn_id := -1; + + /* user-facing port for controlling the binding */ + port OsmuxEM_CTRL_PT CTRL; + + /* configurable by user, should be fixed */ + var OsmuxemConfig g_cfg := c_OsmuxemDefaultCfg; + + /* statistics */ + var OsmuxemStats g_stat := c_OsmuxemStatsReset; + + var HostName g_remote_host; + var PortNumber g_remote_port; + var HostName g_local_host; + var PortNumber g_local_port; + + /* state variables, change over time */ + var boolean g_rx_enabled := false; + var boolean g_tx_connected := false; /* Set to true after connect() */ + + var INT7b g_rx_payload_type := 0; + var LIN2_BO_LAST g_rx_last_seq; + var uint32_t g_rx_last_ts; + + var RxHandleTableRec RxHandleTable[16]; + var OsmuxTxHandle TxHandleList[16]; +} + +type record RxHandleTableRec { + OsmuxCID cid, + OsmuxRxHandle vc_conn +}; + +type record OsmuxRxHandle { + OsmuxCID cid, + boolean first_seq_seen, + INT1 last_seq_ack +}; + +const OsmuxRxHandle c_OsmuxemDefaultRxHandle := { + cid := 0, + first_seq_seen := false, + last_seq_ack := 0 +} + +type record OsmuxTxHandle { + INT2b ft, + BIT1 amr_f, + BIT1 amr_q, + INT1 seq, + OsmuxCID cid, + INT4b amr_ft, + INT4b amr_cmr +}; + +template OsmuxTxHandle t_TxHandleAMR590(OsmuxCID cid) := { + ft := 1,//enum2int(OsmuxFT:OSMUX_FT_AMR) + amr_f := '0'B, /* this frame is the last frame in this payload */ + amr_q := '1'B, /* frame not damaged */ + seq := 12, + cid := cid, + amr_ft := 2, /* AMR 5.90 */ + amr_cmr := 0 +}; + +type enumerated OsmuxemMode { + OSMUXEM_MODE_NONE, + OSMUXEM_MODE_TXONLY, + OSMUXEM_MODE_RXONLY, + OSMUXEM_MODE_BIDIR +}; + +type record OsmuxemStats { + /* number of packets transmitted */ + integer num_pkts_tx, + /* number of Osmux payload bytes transmitted */ + integer bytes_payload_tx, + + /* number of packets received */ + integer num_pkts_rx, + /* number of Osmux payload bytes received */ + integer bytes_payload_rx, + /* number of packets received out-of-sequence */ + integer num_pkts_rx_err_seq, + /* number of packets received during Rx disable */ + integer num_pkts_rx_err_disabled, + /* number of packets received with mismatching payload */ + integer num_pkts_rx_err_payload +} + +const OsmuxemStats c_OsmuxemStatsReset := { + num_pkts_tx := 0, + bytes_payload_tx := 0, + num_pkts_rx := 0, + bytes_payload_rx := 0, + num_pkts_rx_err_seq := 0, + num_pkts_rx_err_disabled := 0, + num_pkts_rx_err_payload := 0 +} + +type record OsmuxemConfig { + INT3b batch_size, + integer tx_duration_ms, + octetstring tx_fixed_payload optional, + octetstring rx_fixed_payload optional +}; + +const OsmuxemConfig c_OsmuxemDefaultCfg := { + batch_size := 4, + tx_duration_ms := 20 * 4, /* 4 is batch_size */ + tx_fixed_payload := '010203040102030401020304010203040102030401020304'O, + rx_fixed_payload := '010203040102030401020304010203040102030401020304'O +} + +signature OsmuxEM_bind(in HostName local_host, inout PortNumber local_port); +signature OsmuxEM_connect(in HostName remote_host, in PortNumber remote_port); +signature OsmuxEM_mode(in OsmuxemMode mode); +signature OsmuxEM_configure(in OsmuxemConfig cfg); +signature OsmuxEM_stats_get(out OsmuxemStats stats); +signature OsmuxEM_register_rxhandle(in OsmuxRxHandle hdl); +signature OsmuxEM_register_txhandle(in OsmuxTxHandle hdl); + +type port OsmuxEM_CTRL_PT procedure { + inout OsmuxEM_bind, OsmuxEM_connect, OsmuxEM_mode, OsmuxEM_configure, + OsmuxEM_stats_get, OsmuxEM_register_rxhandle, OsmuxEM_register_txhandle; +} with { extension "internal" }; + +function f_osmuxem_bind(OsmuxEM_CTRL_PT pt, in HostName local_host, inout PortNumber local_port) { + pt.call(OsmuxEM_bind:{local_host, local_port}) { + [] pt.getreply(OsmuxEM_bind:{local_host, ?}) -> param (local_port) {}; + } +} +function f_osmuxem_connect(OsmuxEM_CTRL_PT pt, in HostName remote_host, in PortNumber remote_port) { + pt.call(OsmuxEM_connect:{remote_host, remote_port}) { + [] pt.getreply(OsmuxEM_connect:{remote_host, remote_port}) {}; + } +} +function f_osmuxem_mode(OsmuxEM_CTRL_PT pt, in OsmuxemMode mode) { + pt.call(OsmuxEM_mode:{mode}) { + [] pt.getreply(OsmuxEM_mode:{mode}) {}; + } +} +function f_osmuxem_configure(OsmuxEM_CTRL_PT pt, in OsmuxemConfig cfg) { + pt.call(OsmuxEM_configure:{cfg}) { + [] pt.getreply(OsmuxEM_configure:{cfg}) {}; + } +} +function f_osmuxem_stats_get(OsmuxEM_CTRL_PT pt) return OsmuxemStats { + var OsmuxemStats stats; + pt.call(OsmuxEM_stats_get:{-}) { + [] pt.getreply(OsmuxEM_stats_get:{?}) -> param(stats) {}; + } + return stats; +} + +function f_osmuxem_register_rxhandle(OsmuxEM_CTRL_PT pt, OsmuxRxHandle hdl) { + pt.call(OsmuxEM_register_rxhandle:{hdl}) { + [] pt.getreply(OsmuxEM_register_rxhandle:{hdl}) {}; + } +} + +function f_osmuxem_register_txhandle(OsmuxEM_CTRL_PT pt, OsmuxTxHandle hdl) { + pt.call(OsmuxEM_register_txhandle:{hdl}) { + [] pt.getreply(OsmuxEM_register_txhandle:{hdl}) {}; + } +} + + +function f_osmuxem_stats_compare_value(integer a, integer b, integer tolerance := 0) return boolean { + var integer temp; + + temp := (a - b) + if (temp < 0) { + temp := -temp; + } + + if (temp > tolerance) { + return false; + } + + return true; +} + +/* Cross-compare two osmuxem-statistics. The transmission statistics on the a side + * must match the reception statistics on the other side and vice versa. The + * user may also supply a tolerance value (number of packets) when deviations + * are acceptable */ +function f_osmuxem_stats_compare(OsmuxemStats a, OsmuxemStats b, integer tolerance := 0) return boolean { + var integer plen; + + log("stats A: ", a); + log("stats B: ", b); + log("tolerance: ", tolerance, " packets"); + + if (f_osmuxem_stats_compare_value(a.num_pkts_tx, b.num_pkts_rx, tolerance) == false) { + return false; + } + + if (f_osmuxem_stats_compare_value(a.num_pkts_rx, b.num_pkts_tx, tolerance) == false) { + return false; + } + + if(a.num_pkts_tx > 0) { + plen := a.bytes_payload_tx / a.num_pkts_tx; + } else { + plen := 0; + } + + if (f_osmuxem_stats_compare_value(a.bytes_payload_tx, b.bytes_payload_rx, tolerance * plen) == false) { + return false; + } + + if (f_osmuxem_stats_compare_value(a.bytes_payload_rx, b.bytes_payload_tx, tolerance * plen) == false) { + return false; + } + + return true; +} + +/* Check the statistics for general signs of errors. This is a basic general + * check that will fit most situations and is intended to be executed by + * the testcases as as needed. */ +function f_osmuxem_stats_err_check(OsmuxemStats s) { + log("stats: ", s); + + /* Check if there was some activity at either on the RX or on the + * TX side, but complete silence would indicate some problem */ + if (s.num_pkts_tx < 1 and s.num_pkts_rx < 1) { + setverdict(fail, "no Osmux packet activity detected (packets)"); + mtc.stop; + } + if (s.bytes_payload_tx < 1 and s.bytes_payload_rx < 1) { + setverdict(fail, "no Osmux packet activity detected (bytes)"); + mtc.stop; + } + + /* Check error counters */ + if (s.num_pkts_rx_err_seq != 0) { + setverdict(fail, "Osmux packet sequence number errors occurred"); + mtc.stop; + } + if (s.num_pkts_rx_err_disabled != 0) { + setverdict(fail, "Osmux packets received while RX was disabled"); + mtc.stop; + } + if (s.num_pkts_rx_err_payload != 0) { + setverdict(fail, "Osmux packets with mismatching payload received"); + mtc.stop; + } +} + +template PDU_Osmux_AMR ts_OsmuxAMR(BIT1 marker, INT3b ctr, BIT1 amr_f, BIT1 amr_q, INT1 seq, + OsmuxCID cid, INT4b amr_ft, INT4b amr_cmr, + octetstring payload) := { + header := { + marker := marker, + ft := 1, + ctr := ctr, + amr_f := amr_f, + amr_q := amr_q, + seq := seq, + cid := cid, + amr_ft := amr_ft, + amr_cmr := amr_cmr + }, + data := payload +} + +private function f_rxhandle_get_by_cid(OsmuxCID cid) runs on OSMUX_Emulation_CT return OsmuxRxHandle { + var integer i; + for (i := 0; i < sizeof(RxHandleTable); i := i+1) { + if (isbound(RxHandleTable[i].cid) and RxHandleTable[i].cid == cid) { + return RxHandleTable[i].vc_conn; + } + } + setverdict(fail, "No Component for CID ", cid); + mtc.stop; +} + +private function f_rxhandle_cid_add(OsmuxRxHandle hdl) runs on OSMUX_Emulation_CT { + var integer i; + for (i := 0; i < sizeof(RxHandleTable); i := i+1) { + if (not isbound(RxHandleTable[i].cid)) { + RxHandleTable[i].cid := hdl.cid; + RxHandleTable[i].vc_conn := hdl; + return; + } + } + testcase.stop("No Space in RxHandleTable for ", hdl.cid); + mtc.stop; +} + +private function f_txhandle_cid_add(OsmuxTxHandle hdl) runs on OSMUX_Emulation_CT { + var integer i; + for (i := 0; i < sizeof(TxHandleList); i := i+1) { + if (not isbound(TxHandleList[i])) { + TxHandleList[i] := hdl; + return; + } + } + testcase.stop("No Space in TxHandleList for ", hdl.cid); + mtc.stop; +} + +function f_osmux_gen_expected_rx_rtp_payload(INT4b amr_ft, octetstring tx_fixed_payload) return octetstring { + var integer payload_len; + var octetstring payload_truncated; + var integer i; + payload_len := f_amrft_payload_len(amr_ft); + payload_truncated := substr(tx_fixed_payload, 0, payload_len); + return payload_truncated; +} + +private function f_osmux_gen_payload(INT3b ctr, INT4b amr_ft) runs on OSMUX_Emulation_CT return octetstring { + var octetstring payload_truncated := ''O; + var integer i; + + for (i := 0; i < ctr + 1; i := i+1) { + payload_truncated := payload_truncated & f_osmux_gen_expected_rx_rtp_payload(amr_ft, g_cfg.tx_fixed_payload); + } + return payload_truncated; +} + +private function f_tx_osmux(integer i, INT3b ctr, octetstring payload, BIT1 marker := '0'B) runs on OSMUX_Emulation_CT { + var OsmuxTxHandle hdl := TxHandleList[i]; + var PDU_Osmux_AMR osmux_amr := valueof(ts_OsmuxAMR(marker, ctr, hdl.amr_f, + hdl.amr_q, hdl.seq, hdl.cid, hdl.amr_ft, + hdl.amr_cmr, payload)); + OSMUX.send(t_Osmux_Send(g_osmux_conn_id, OSMUX_PDU:{osmux_amr:=osmux_amr})); + /* increment sequence + timestamp for next transmit */ + TxHandleList[i].seq := TxHandleList[i].seq + 1; + + /* update counters */ + g_stat.num_pkts_tx := g_stat.num_pkts_tx+1; + g_stat.bytes_payload_tx := g_stat.bytes_payload_tx + + lengthof(payload); +} + +private function f_tx_osmux_all_cid(BIT1 marker := '0'B) runs on OSMUX_Emulation_CT { + /* TODO: append all in one UDP packet and send together */ + var integer i; + var octetstring payload_truncated; + var INT3b ctr := g_cfg.batch_size - 1; + + for (i := 0; i < sizeof(TxHandleList); i := i+1) { + if (isbound(TxHandleList[i])) { + payload_truncated := f_osmux_gen_payload(ctr, TxHandleList[i].amr_ft); + f_tx_osmux(i, ctr, payload_truncated, marker); + + } + } +} + +function f_main() runs on OSMUX_Emulation_CT +{ + var Result res; + var OsmuxRxHandle rx_hdl; + var OsmuxTxHandle tx_hdl; + var octetstring payload_truncated; + + timer T_transmit := int2float(g_cfg.tx_duration_ms)/1000.0; + var Osmux_RecvFrom rx_osmux; + var PDU_Osmux_AMR rx_amr; + var PDU_Osmux_DUMMY osmux_dummy; + var OsmuxemConfig cfg; + var template Osmux_RecvFrom tr_osmux_amr := { + connId := ?, + remName := ?, + remPort := ?, + locName := ?, + locPort := ?, + msg := ? + }; + tr_osmux_amr.msg := { osmux_amr := ? }; + var template Osmux_RecvFrom tr_osmux_dummy := { + connId := ?, + remName := ?, + remPort := ?, + locName := ?, + locPort := ?, + msg := ? + }; + tr_osmux_dummy.msg := { osmux_dummy := ? }; + + while (true) { + alt { + /* control procedures (calls) from the user */ + [] CTRL.getcall(OsmuxEM_bind:{?,?}) -> param(g_local_host, g_local_port) { + + g_tx_connected := false; /* will set it back to true upon next connect() call */ + res := OSMUX_CodecPort_CtrlFunct.f_IPL4_listen(OSMUX, g_local_host, + g_local_port, {udp:={}}); + if (not ispresent(res.connId)) { + setverdict(fail, "Could not listen on Osmux socket, check your configuration"); + mtc.stop; + } + g_osmux_conn_id := res.connId; + tr_osmux_amr.connId := g_osmux_conn_id; + tr_osmux_dummy.connId := g_osmux_conn_id; + + CTRL.reply(OsmuxEM_bind:{g_local_host, g_local_port}); + } + [] CTRL.getcall(OsmuxEM_connect:{?,?}) -> param (g_remote_host, g_remote_port) { + res := OSMUX_CodecPort_CtrlFunct.f_IPL4_connect(OSMUX, g_remote_host, + g_remote_port, + g_local_host, g_local_port, + g_osmux_conn_id, {udp:={}}); + if (not ispresent(res.connId)) { + setverdict(fail, "Could not connect to Osmux socket, check your configuration"); + mtc.stop; + } + g_tx_connected := true; + CTRL.reply(OsmuxEM_connect:{g_remote_host, g_remote_port}); + } + [] CTRL.getcall(OsmuxEM_mode:{OSMUXEM_MODE_NONE}) { + T_transmit.stop; + g_rx_enabled := false; + CTRL.reply(OsmuxEM_mode:{OSMUXEM_MODE_NONE}); + } + [] CTRL.getcall(OsmuxEM_mode:{OSMUXEM_MODE_TXONLY}) { + /* start transmit timer */ + T_transmit.start; + g_rx_enabled := false; + CTRL.reply(OsmuxEM_mode:{OSMUXEM_MODE_TXONLY}); + } + [] CTRL.getcall(OsmuxEM_mode:{OSMUXEM_MODE_RXONLY}) { + + T_transmit.stop; + if (g_rx_enabled == false) { + /* flush queues */ + OSMUX.clear; + g_rx_enabled := true; + } + CTRL.reply(OsmuxEM_mode:{OSMUXEM_MODE_RXONLY}); + } + [] CTRL.getcall(OsmuxEM_mode:{OSMUXEM_MODE_BIDIR}) { + T_transmit.start; + if (g_rx_enabled == false) { + /* flush queues */ + OSMUX.clear; + g_rx_enabled := true; + } + CTRL.reply(OsmuxEM_mode:{OSMUXEM_MODE_BIDIR}); + } + [] CTRL.getcall(OsmuxEM_configure:{?}) -> param (cfg) { + g_cfg := cfg; + CTRL.reply(OsmuxEM_configure:{cfg}); + } + [] CTRL.getcall(OsmuxEM_register_txhandle:{?}) -> param (tx_hdl) { + f_txhandle_cid_add(tx_hdl); + CTRL.reply(OsmuxEM_register_txhandle:{tx_hdl}); + } + [] CTRL.getcall(OsmuxEM_register_rxhandle:{?}) -> param (rx_hdl) { + f_rxhandle_cid_add(rx_hdl); + CTRL.reply(OsmuxEM_register_rxhandle:{rx_hdl}); + } + [] CTRL.getcall(OsmuxEM_stats_get:{?}) { + CTRL.reply(OsmuxEM_stats_get:{g_stat}); + } + + /* simply ignore any Osmux AMR if receiver not enabled */ + [g_rx_enabled==false] OSMUX.receive(tr_osmux_amr) { + g_stat.num_pkts_rx_err_disabled := g_stat.num_pkts_rx_err_disabled+1; + } + /* simply ignore any Osmux Dummy if receiver not enabled */ + [g_rx_enabled==false] OSMUX.receive(tr_osmux_dummy) -> value rx_osmux { + log("Osmux Dummy received on CID ", rx_osmux.msg.osmux_dummy.header.cid, " (rx_disabled)"); + } + + /* process received Osmux AMR if receiver enabled */ + [g_rx_enabled] OSMUX.receive(tr_osmux_amr) -> value rx_osmux { + /* increment counters */ + g_stat.num_pkts_rx := g_stat.num_pkts_rx+1; + g_stat.bytes_payload_rx := g_stat.bytes_payload_rx + + lengthof(rx_osmux.msg.osmux_amr.data); + rx_hdl := f_rxhandle_get_by_cid(rx_osmux.msg.osmux_amr.header.cid); + + if (rx_hdl.first_seq_seen and rx_hdl.last_seq_ack != rx_osmux.msg.osmux_amr.header.seq - 1 ) { + g_stat.num_pkts_rx_err_seq := g_stat.num_pkts_rx_err_seq + 1; + } + rx_hdl.first_seq_seen := true; + rx_hdl.last_seq_ack := rx_osmux.msg.osmux_amr.header.seq; + + payload_truncated := f_osmux_gen_payload(rx_osmux.msg.osmux_amr.header.ctr, rx_osmux.msg.osmux_amr.header.amr_ft); + if (ispresent(g_cfg.rx_fixed_payload) and rx_osmux.msg.osmux_amr.data != payload_truncated) { + g_stat.num_pkts_rx_err_payload := g_stat.num_pkts_rx_err_payload + 1; + } + } + /* process received Osmux Dummy if receiver enabled */ + [g_rx_enabled] OSMUX.receive(tr_osmux_dummy) -> value rx_osmux { + log("Osmux Dummy received on CID", rx_osmux.msg.osmux_dummy.header.cid); + rx_hdl := f_rxhandle_get_by_cid(rx_osmux.msg.osmux_dummy.header.cid); + } + + /* transmit if timer has expired */ + [g_tx_connected] T_transmit.timeout { + /* send one Osmux frame, re-start timer */ + f_tx_osmux_all_cid(); + T_transmit.start; + } + + /* fail on any unexpected messages */ + [] OSMUX.receive { + setverdict(fail, "Received unexpected type from Osmux"); + mtc.stop; + } + } + } +} + + +} diff --git a/library/OSMUX_Types.ttcn b/library/OSMUX_Types.ttcn new file mode 100644 index 0000000..091b4d7 --- /dev/null +++ b/library/OSMUX_Types.ttcn @@ -0,0 +1,110 @@ +/* + * (C) 2019 by sysmocom s.f.m.c. GmbH + * All rights reserved. + * + * Author: Pau Espin Pedrol + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + */ + +module OSMUX_Types { + +import from General_Types all; + +external function enc_OSMUX_PDU ( in OSMUX_PDU msg ) return octetstring + with { extension "prototype(convert) encode(RAW)" }; +external function dec_OSMUX_PDU ( in octetstring msg ) return OSMUX_PDU + with { extension "prototype(convert) decode(RAW)" }; + +type INT1 OsmuxCID (0 .. 255); + +type enumerated OsmuxFT { + OSMUX_FT_LAPD, + OSMUX_FT_AMR, + OSMUX_FT_DUMMY +}; + +type record Osmux_AMR_header { + BIT1 marker, + INT2b ft, + INT3b ctr, + BIT1 amr_f, + BIT1 amr_q, + INT1 seq, + OsmuxCID cid, + INT4b amr_ft, + INT4b amr_cmr +} with { + variant "FIELDORDER(msb)" +} + +type record PDU_Osmux_AMR { + Osmux_AMR_header header, + octetstring data +} with { + variant "FIELDORDER(msb)" +}; + +type record PDU_Osmux_DUMMY { + Osmux_AMR_header header, + octetstring data +} with { + variant "FIELDORDER(msb)" +}; + +type record Osmux_session_par { + integer id optional, + charstring local_address optional, + integer local_port optional, + charstring dest_address optional, + integer dest_port optional +} + +type record ASP_Osmux_Open_session { + Osmux_session_par session_id +} + +type record ASP_Osmux_Open_session_result { + Osmux_session_par session_id +} + +type record ASP_Osmux_Close_session { + Osmux_session_par session_id +} + +type union OSMUX_PDU { + PDU_Osmux_AMR osmux_amr, + PDU_Osmux_DUMMY osmux_dummy +} with { + variant "TAG ( + osmux_amr, header.ft = 1; + osmux_dummy, header.ft = 2; + )" +}; + + +/* AMR voice frame type identifiers + * See also 3GPP TS 26.101, Table 1a: Interpretation of Frame Type, Mode + * Indication and Mode Request fields */ +type enumerated AMRFT { + AMR_FT_0, /* 4.75 */ + AMR_FT_1, /* 5.15 */ + AMR_FT_2, /* 5.90 */ + AMR_FT_3, /* 6.70 */ + AMR_FT_4, /* 7.40 */ + AMR_FT_5, /* 7.95 */ + AMR_FT_6, /* 10.2 */ + AMR_FT_7, /* 12.2 */ + AMR_FT_SID /* SID */ +}; + +/* AMR voice frame length (in bytes, rounded), + * See also RFC 3267, chapter 3.6 */ +const integer c_AMRFT_len[9] := {12, 13, 15, 17, 19, 20, 26, 31, 5}; + +function f_amrft_payload_len(INT4b amr_ft) return integer { + return c_AMRFT_len[amr_ft]; +} + +} with { encode "RAW"} diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn index 8cb2404..ec3070e 100644 --- a/mgw/MGCP_Test.ttcn +++ b/mgw/MGCP_Test.ttcn @@ -8,6 +8,10 @@ import from RTP_CodecPort all; import from RTP_CodecPort_CtrlFunct all; import from RTP_Emulation all; + import from OSMUX_Types all; + import from OSMUX_CodecPort all; + import from OSMUX_CodecPort_CtrlFunct all; + import from OSMUX_Emulation all; import from IPL4asp_Types all; import from General_Types all; import from Native_Functions all; @@ -31,6 +35,9 @@ var RTP_Emulation_CT vc_RTPEM[3]; port RTPEM_CTRL_PT RTPEM[3]; + var OSMUX_Emulation_CT vc_OsmuxEM; + port OsmuxEM_CTRL_PT OsmuxEM; + port TELNETasp_PT MGWVTY; }; @@ -50,12 +57,29 @@ PortNumber mp_remote_udp_port := 2427; charstring mp_remote_ip := "127.0.0.1"; PortNumber mp_local_rtp_port_base := 10000; + PortNumber mp_local_osmux_port := 1985; } - private function f_init_vty() runs on dummy_CT { + private function f_vty_enable_osmux(boolean osmux_on) runs on dummy_CT { + /* Turn on conversion mode */ + f_vty_enter_config(MGWVTY); + f_vty_transceive(MGWVTY, "mgcp"); + if (osmux_on) { + f_vty_transceive(MGWVTY, "osmux on"); + } else { + f_vty_transceive(MGWVTY, "osmux off"); + } + f_vty_transceive(MGWVTY, "exit"); + f_vty_transceive(MGWVTY, "exit"); + + } + + private function f_init_vty(boolean osmux_on) runs on dummy_CT { map(self:MGWVTY, system:MGWVTY); f_vty_set_prompts(MGWVTY); f_vty_transceive(MGWVTY, "enable"); + + f_vty_enable_osmux(osmux_on); } private function f_rtpem_init(inout RTP_Emulation_CT comp_ref, integer i) @@ -66,10 +90,17 @@ comp_ref.start(RTP_Emulation.f_main()); } + private function f_osmuxem_init(inout OSMUX_Emulation_CT comp_ref) + runs on dummy_CT { + comp_ref := OSMUX_Emulation_CT.create("OsmuxEM"); + map(comp_ref:OSMUX, system:OSMUX); + comp_ref.start(OSMUX_Emulation.f_main()); + } + /* initialization function, called by each test case at the * beginning, but 'initialized' variable ensures its body is * only executed once */ - private function f_init(template MgcpEndpoint ep := omit) runs on dummy_CT { + private function f_init(template MgcpEndpoint ep := omit, boolean osmux_on := false) runs on dummy_CT { var Result res; var uint32_t ssrc; @@ -93,6 +124,10 @@ f_rtpem_init(vc_RTPEM[i], i); connect(vc_RTPEM[i]:CTRL, self:RTPEM[i]); } + if (osmux_on) { + f_osmuxem_init(vc_OsmuxEM); + connect(vc_OsmuxEM:CTRL, self:OsmuxEM); + } } if (isvalue(ep)) { @@ -100,7 +135,7 @@ f_dlcx_ignore(valueof(ep)); } - f_init_vty(); + f_init_vty(osmux_on); } testcase TC_selftest() runs on dummy_CT { @@ -272,6 +307,10 @@ charstring codec, MgcpConnectionId mgcp_conn_id optional, RtpemConfig rtp_cfg optional, + boolean osmux_cid_sent, /* whther non wildcarded CID was already sent to MGW */ + MgcpOsmuxCID osmux_cid optional, + MgcpOsmuxCID osmux_cid_response optional, + OsmuxemConfig osmux_cfg optional, charstring fmtp optional } @@ -333,6 +372,91 @@ f_rtpem_connect(pt, flow.mgw.hostname, flow.mgw.portnr); } + /* Create an Osmux flow (bidirectional, or receive-only) */ + function f_flow_create_osmux(OsmuxEM_CTRL_PT pt, MgcpEndpoint ep, MgcpCallId call_id, charstring mode, inout RtpFlowData flow, + boolean one_phase := true) + runs on dummy_CT { + var template MgcpCommand cmd; + var MgcpResponse resp; + var SDP_attribute_list attributes; + var OsmuxTxHandle tx_hdl; + var OsmuxRxHandle rx_hdl; + var charstring cid_response; + var OsmuxCID cid_resp_parsed + + attributes := { valueof(ts_SDP_rtpmap(flow.pt, flow.codec)), valueof(ts_SDP_ptime(20)) }; + if (isvalue(flow.fmtp)) { + attributes := attributes & { valueof(ts_SDP_fmtp(flow.pt, flow.fmtp)) }; + } + + /* bind local Osmux emulation socket */ + f_osmuxem_bind(pt, flow.em.hostname, flow.em.portnr); + + /* configure osmux-emulation */ + if (ispresent(flow.osmux_cfg)) { + f_osmuxem_configure(pt, flow.osmux_cfg); + } else { + var OsmuxemConfig osmux_cfg := c_OsmuxemDefaultCfg; + f_osmuxem_configure(pt, osmux_cfg); + flow.osmux_cfg := osmux_cfg + } + + if (one_phase) { + /* Connect flow to MGW using a CRCX that also contains an SDP + * part that tells the MGW where we are listening for Osmux streams + * that come from the MGW. We get a fully working connection in + * one go. */ + rx_hdl := c_OsmuxemDefaultRxHandle; + rx_hdl.cid := flow.osmux_cid; + f_osmuxem_register_rxhandle(pt, rx_hdl); + flow.osmux_cid_sent := true; + cmd := ts_CRCX_osmux(get_next_trans_id(), ep, mode, call_id, flow.osmux_cid); + cmd.sdp := ts_SDP(flow.em.hostname, flow.em.hostname, "23", "42", + flow.em.portnr, { int2str(flow.pt) }, attributes); + resp := mgcp_transceive_mgw(cmd, tr_CRCX_ACK_osmux); + flow.mgcp_conn_id := extract_conn_id(resp); + /* extract port number from response */ + flow.mgw.portnr := + resp.sdp.media_list[0].media_field.ports.port_number; + } else { + /* Create a half-open connection only. We do not tell the MGW + * where it can send Osmux streams to us. This means this + * connection will only be able to receive but can not send + * data back to us. In order to turn the connection in a fully + * bi-directional one, a separate MDCX is needed. */ + + cmd := ts_CRCX_osmux(get_next_trans_id(), ep, mode, call_id, flow.osmux_cid); + resp := mgcp_transceive_mgw(cmd, tr_CRCX_ACK_osmux); + + flow.mgcp_conn_id := extract_conn_id(resp); + /* extract MGW-side port number from response */ + flow.mgw.portnr := + resp.sdp.media_list[0].media_field.ports.port_number; + } + + /* extract Osmux CID we got assigned by the MGW */ + var MgcpMessage resp_msg := { + response := resp + } + + if (f_mgcp_find_param(resp_msg, "X-OSMUX", cid_response) == false) { + setverdict(fail, "No Osmux CID in MGCP response", resp); + mtc.stop; + } + + /* Make sure response is no wildcard */ + flow.osmux_cid_response := f_mgcp_osmux_cid_decode(cid_response); + if (flow.osmux_cid_response == -1) { + setverdict(fail, "Osmux CID in MGCP response contains unexpected wildcard"); + mtc.stop; + } + tx_hdl := valueof(t_TxHandleAMR590(flow.osmux_cid_response)); + f_osmuxem_register_txhandle(pt, tx_hdl); + + /* finally, connect the emulation-side RTP socket to the MGW */ + f_osmuxem_connect(pt, flow.mgw.hostname, flow.mgw.portnr); + } + /* Modify an existing RTP flow */ function f_flow_modify(RTPEM_CTRL_PT pt, MgcpEndpoint ep, MgcpCallId call_id, charstring mode, inout RtpFlowData flow) runs on dummy_CT { @@ -372,6 +496,76 @@ f_rtpem_connect(pt, flow.mgw.hostname, flow.mgw.portnr); } + /* Modify an existing Osmux flow */ + function f_flow_modify_osmux(OsmuxEM_CTRL_PT pt, MgcpEndpoint ep, MgcpCallId call_id, charstring mode, inout RtpFlowData flow) + runs on dummy_CT { + var template MgcpCommand cmd; + var MgcpResponse resp; + var SDP_attribute_list attributes; + var OsmuxRxHandle rx_hdl; + var charstring cid_response; + var OsmuxCID cid_resp_parsed + + attributes := { valueof(ts_SDP_rtpmap(flow.pt, flow.codec)), valueof(ts_SDP_ptime(20)) }; + if (isvalue(flow.fmtp)) { + attributes := attributes & { valueof(ts_SDP_fmtp(flow.pt, flow.fmtp)) }; + } + + /* rebind local Osmux emulation socket to the new address */ + f_osmuxem_bind(pt, flow.em.hostname, flow.em.portnr); + + /* configure osmux-emulation */ + if (ispresent(flow.osmux_cfg)) { + f_osmuxem_configure(pt, flow.osmux_cfg); + } else { + var OsmuxemConfig osmux_cfg := c_OsmuxemDefaultCfg; + f_osmuxem_configure(pt, osmux_cfg); + } + + /* We didn't send a non-wildcarded Osmux CID yet. If caller wants to submit it, register handler */ + if (flow.osmux_cid_sent == false and flow.osmux_cid != -1) { + rx_hdl := c_OsmuxemDefaultRxHandle; + rx_hdl.cid := flow.osmux_cid; + f_osmuxem_register_rxhandle(pt, rx_hdl); + flow.osmux_cid_sent := true; + } + + /* connect MGW side Osmux socket to the emulation-side Osmux socket using SDP */ + cmd := ts_MDCX_osmux(get_next_trans_id(), ep, mode, call_id, flow.mgcp_conn_id, flow.osmux_cid); + cmd.sdp := ts_SDP(flow.em.hostname, flow.em.hostname, "23", "42", + flow.em.portnr, { int2str(flow.pt) }, attributes); + resp := mgcp_transceive_mgw(cmd, tr_MDCX_ACK); + + /* extract MGW-side port number from response. (usually this + * will not change, but thats is up to the MGW) */ + flow.mgw.portnr := + resp.sdp.media_list[0].media_field.ports.port_number; + + /* extract Osmux CID we got assigned by the MGW */ + var MgcpMessage resp_msg := { + response := resp + } + + if (f_mgcp_find_param(resp_msg, "X-OSMUX", cid_response) == false) { + setverdict(fail, "No Osmux CID in MGCP response", resp); + mtc.stop; + } + + /* Make sure response is no wildcard */ + cid_resp_parsed := f_mgcp_osmux_cid_decode(cid_response); + if (cid_resp_parsed == -1) { + setverdict(fail, "Osmux CID in MGCP response contains unexpected wildcard"); + mtc.stop; + } + if (cid_resp_parsed != flow.osmux_cid_response) { + setverdict(fail, "Osmux CID in MGCP MDCX response changed from prev value"); + mtc.stop; + } + + /* reconnect the emulation-side Osmux socket to the MGW */ + f_osmuxem_connect(pt, flow.mgw.hostname, flow.mgw.portnr); + } + /* Delete an existing RTP flow */ function f_flow_delete(RTPEM_CTRL_PT pt, template MgcpEndpoint ep := omit, template MgcpCallId call_id := omit) runs on dummy_CT { @@ -388,6 +582,22 @@ } } + /* Delete an existing Osmux flow */ + function f_flow_delete_osmux(OsmuxEM_CTRL_PT pt, template MgcpEndpoint ep := omit, template MgcpCallId call_id := omit) + runs on dummy_CT { + var template MgcpCommand cmd; + var MgcpResponse resp; + + /* Switch off Osmux flow */ + f_osmuxem_mode(pt, OSMUXEM_MODE_NONE); + + /* Delete connection on MGW (if needed) */ + if (isvalue(call_id) and isvalue(ep)) { + f_sleep(0.1); + f_dlcx_ok(valueof(ep), call_id); + } + } + function f_crcx(charstring ep_prefix) runs on dummy_CT { var MgcpEndpoint ep := ep_prefix & "2@" & c_mgw_domain; var template MgcpCommand cmd; @@ -437,6 +647,42 @@ } } + function f_crcx_osmux(charstring ep_prefix, MgcpOsmuxCID osmux_cid, boolean run_init := true) runs on dummy_CT { + var MgcpEndpoint ep := ep_prefix & "2@" & c_mgw_domain; + var template MgcpCommand cmd; + var MgcpResponse resp; + var MgcpCallId call_id := '1234'H; + var charstring cid_response; + + if (run_init) { + f_init(ep, true); + } + + /* create the connection on the MGW */ + cmd := ts_CRCX_osmux(get_next_trans_id(), ep, "recvonly", call_id, osmux_cid); + resp := mgcp_transceive_mgw(cmd, tr_CRCX_ACK_osmux); + extract_conn_id(resp); + + /* extract Osmux CID we got assigned by the MGW */ + var MgcpMessage resp_msg := { + response := resp + } + + if (f_mgcp_find_param(resp_msg, "X-OSMUX", cid_response) == false) { + setverdict(fail, "No Osmux CID in MGCP response", resp); + mtc.stop; + } + + /* Make sure response is no wildcard */ + if (f_mgcp_osmux_cid_decode(cid_response) == -1) { + setverdict(fail, "Osmux CID in MGCP response contains unexpected wildcard"); + mtc.stop; + } + + /* clean-up */ + f_dlcx_ok(ep, call_id); + } + /* test valid CRCX without SDP */ testcase TC_crcx() runs on dummy_CT { f_crcx(c_mgw_ep_rtpbridge); @@ -791,6 +1037,358 @@ setverdict(pass); } + /* test valid CRCX without SDP */ + testcase TC_crcx_osmux_wildcard() runs on dummy_CT { + f_crcx_osmux(c_mgw_ep_rtpbridge, -1); + setverdict(pass); + } + + /* test valid CRCX without SDP */ + testcase TC_crcx_osmux_fixed() runs on dummy_CT { + f_crcx_osmux(c_mgw_ep_rtpbridge, 2); + setverdict(pass); + } + + /* test valid CRCX without SDP, twice, to make sure CID is freed fine during first step. */ + testcase TC_crcx_osmux_fixed_twice() runs on dummy_CT { + f_crcx_osmux(c_mgw_ep_rtpbridge, 3, true); + f_crcx_osmux(c_mgw_ep_rtpbridge, 3, false); + setverdict(pass); + } + + /* Create one half open connection in receive-only mode. The MGW must accept + * the packets but must not send any. */ + testcase TC_one_crcx_receive_only_osmux() runs on dummy_CT { + var RtpFlowData flow; + var MgcpEndpoint ep := c_mgw_ep_rtpbridge & "1@" & c_mgw_domain; + var MgcpCallId call_id := '1225'H; + var OsmuxemStats stats; + var OsmuxTxHandle tx_hdl; + + f_init(ep, true); + flow := valueof(t_RtpFlow(mp_local_ip, mp_remote_ip, 112, "AMR/8000/1")); + flow.em.portnr := mp_local_osmux_port; + flow.osmux_cid := -1; + f_flow_create_osmux(OsmuxEM, ep, call_id, "recvonly", flow, false); + + /* create a transmitter not yet known by MGW */ + tx_hdl := valueof(t_TxHandleAMR590(2)); + f_osmuxem_register_txhandle(OsmuxEM, tx_hdl); + + f_osmuxem_mode(OsmuxEM, OSMUXEM_MODE_TXONLY); + f_sleep(1.0); + f_flow_delete_osmux(OsmuxEM, ep, call_id); + + stats := f_osmuxem_stats_get(OsmuxEM); + + if (stats.num_pkts_tx < 40 / flow.osmux_cfg.batch_size) { + setverdict(fail); + } + if (stats.bytes_payload_tx < stats.num_pkts_tx * f_amrft_payload_len(tx_hdl.amr_ft) * flow.osmux_cfg.batch_size) { + setverdict(fail); + } + + f_osmuxem_stats_err_check(stats); + + setverdict(pass); + } + + /* Create one connection in loopback mode, test if the Osmux packets are + * actually reflected */ + testcase TC_one_crcx_loopback_osmux() runs on dummy_CT { + var RtpFlowData flow; + var MgcpEndpoint ep := c_mgw_ep_rtpbridge & "1@" & c_mgw_domain; + var MgcpCallId call_id := '1225'H; + var OsmuxemStats stats; + var OsmuxTxHandle tx_hdl; + + f_init(ep, true); + flow := valueof(t_RtpFlow(mp_local_ip, mp_remote_ip, 111, "GSM-HR-08/8000/1")); + flow.em.portnr := mp_local_osmux_port; + flow.osmux_cid := 2; + f_flow_create_osmux(OsmuxEM, ep, call_id, "loopback", flow); + + f_osmuxem_mode(OsmuxEM, OSMUXEM_MODE_BIDIR); + f_sleep(1.0); + + /* Switch off both Tx, wait to receive delayed frames from MGW */ + f_osmuxem_mode(OsmuxEM, OSMUXEM_MODE_RXONLY); + f_sleep(0.1); + f_flow_delete_osmux(OsmuxEM, ep, call_id); + + stats := f_osmuxem_stats_get(OsmuxEM); + + if (stats.num_pkts_tx != stats.num_pkts_rx) { + setverdict(fail); + } + if (stats.bytes_payload_tx != stats.bytes_payload_rx) { + setverdict(fail); + } + + f_osmuxem_stats_err_check(stats); + + setverdict(pass); + } + + /* Cross-compare two osmuxem-statistics. The transmission statistics on the a side + * must match the reception statistics on the other side and vice versa. The + * user may also supply a tolerance value (number of packets) when deviations + * are acceptable */ + function f_rtp_osmux_stats_compare(RtpemStats a, OsmuxemStats b, integer batch_size, integer tolerance := 0) return boolean { + var integer plen; + + log("stats A: ", a); + log("stats B: ", b); + log("tolerance: ", tolerance, " packets"); + log("batch_size: ", batch_size, " packets"); + + var integer tolerance_batch := tolerance + (batch_size - tolerance mod batch_size); + + if (f_osmuxem_stats_compare_value(a.num_pkts_tx, b.num_pkts_rx * batch_size, tolerance_batch) == false) { + return false; + } + + if (f_osmuxem_stats_compare_value(a.num_pkts_rx / batch_size, b.num_pkts_tx, tolerance_batch) == false) { + return false; + } + + if(a.num_pkts_tx > 0) { + plen := a.bytes_payload_tx / a.num_pkts_tx; + } else { + plen := 0; + } + + /* Each RTP pcket payload contains 2 extra bytes due to AMR ToC at start */ + if (f_osmuxem_stats_compare_value(a.bytes_payload_tx, b.bytes_payload_rx + a.num_pkts_tx * 2, tolerance_batch * plen) == false) { + log("incorrect payload A->B: " , a.bytes_payload_tx, " vs ", b.bytes_payload_rx + a.num_pkts_rx * 2); + return false; + } + + if (f_osmuxem_stats_compare_value(a.bytes_payload_rx, b.bytes_payload_tx + b.num_pkts_tx * 2 * batch_size, tolerance_batch * plen) == false) { + log("incorrect payload B->A: " , b.bytes_payload_tx + b.num_pkts_tx * 2 * batch_size, " vs ", a.bytes_payload_rx); + return false; + } + + return true; + } + + function f_TC_two_crcx_and_rtp_osmux(boolean bidir) runs on dummy_CT { + var RtpFlowData flow[2]; + var RtpemStats stats_rtp; + var OsmuxemStats stats_osmux; + var MgcpResponse resp; + var MgcpEndpoint ep := c_mgw_ep_rtpbridge & "2@" & c_mgw_domain; + var MgcpCallId call_id := '1226'H; + var integer tolerance := 0; + + f_init(ep, true); + + /* from us to MGW */ + flow[0] := valueof(t_RtpFlow(mp_local_ip, mp_remote_ip, 112, "AMR/8000")); + flow[0].rtp_cfg := c_RtpemDefaultCfg + flow[0].rtp_cfg.tx_payload_type := flow[0].pt; + /* 0014 is the ToC (CMR=AMR4.75) in front of AMR Payload in RTP Payload */ + flow[0].rtp_cfg.rx_fixed_payload := '0014'O & f_osmux_gen_expected_rx_rtp_payload(2 /* AMR_FT_2, 5.90 */, c_OsmuxemDefaultCfg.tx_fixed_payload); + flow[0].rtp_cfg.tx_fixed_payload := flow[0].rtp_cfg.rx_fixed_payload; + /* bind local RTP emulation sockets */ + flow[0].em.portnr := 10000; + f_flow_create(RTPEM[0], ep, call_id, "sendrecv", flow[0]); + + /* from MGW back to us */ + flow[1] := valueof(t_RtpFlow(mp_local_ip, mp_remote_ip, 110, "AMR/8000")); + flow[1].em.portnr := mp_local_osmux_port; + flow[1].osmux_cid := 2; + flow[1].osmux_cfg := c_OsmuxemDefaultCfg; + f_flow_create_osmux(OsmuxEM, ep, call_id, "sendrecv", flow[1]); + + if (bidir) { + f_rtpem_mode(RTPEM[0], RTPEM_MODE_BIDIR); + f_osmuxem_mode(OsmuxEM, OSMUXEM_MODE_BIDIR); + + /* Note: When we test bidirectional we may + * loose packets during switch off because + * both ends are transmitting and we only + * can switch them off one by one. */ + tolerance := 3; + } else { + f_rtpem_mode(RTPEM[0], RTPEM_MODE_RXONLY); + f_osmuxem_mode(OsmuxEM, OSMUXEM_MODE_TXONLY); + } + + f_sleep(1.0); + + /* Switch off both Tx, wait to receive delayed frames from MGW */ + f_rtpem_mode(RTPEM[0], RTPEM_MODE_RXONLY); + f_osmuxem_mode(OsmuxEM, OSMUXEM_MODE_RXONLY); + f_sleep(0.1); + + f_flow_delete_osmux(OsmuxEM, ep, call_id); + f_flow_delete(RTPEM[1]); + + stats_rtp := f_rtpem_stats_get(RTPEM[0]); + stats_osmux := f_osmuxem_stats_get(OsmuxEM); + if (not f_rtp_osmux_stats_compare(stats_rtp, stats_osmux, flow[1].osmux_cfg.batch_size, tolerance)) { + setverdict(fail, "RTP and Osmux endpoint statistics don't match"); + mtc.stop; + } + + f_rtpem_stats_err_check(stats_rtp); + f_osmuxem_stats_err_check(stats_osmux); + + setverdict(pass); + } + + /* create one RTP and one OSmux emulations; create two connections on MGW EP, exchange some data */ + testcase TC_two_crcx_and_rtp_osmux() runs on dummy_CT { + f_TC_two_crcx_and_rtp_osmux(false); + } + + /* create one RTP and one OSmux emulations; create two connections on MGW EP, + * exchange some data in both directions */ + testcase TC_two_crcx_and_rtp_osmux_bidir() runs on dummy_CT { + f_TC_two_crcx_and_rtp_osmux(true); + } + + + function f_two_crcx_mdcx_and_rtp_osmux(boolean crcx_osmux_wildcard) runs on dummy_CT { + var RtpFlowData flow[2]; + var RtpemStats stats_rtp; + var OsmuxemStats stats_osmux; + var MgcpResponse resp; + var MgcpEndpoint ep := c_mgw_ep_rtpbridge & "2@" & c_mgw_domain; + var MgcpCallId call_id := '1227'H; + var integer num_pkts_tx[2]; + var integer temp; + + f_init(ep, true); + + /* Create the first connection in receive only mode */ + flow[0] := valueof(t_RtpFlow(mp_local_ip, mp_remote_ip, 112, "AMR/8000")); + flow[0].rtp_cfg := c_RtpemDefaultCfg + flow[0].rtp_cfg.tx_payload_type := flow[0].pt; + /* 0014 is the ToC (CMR=AMR4.75) in front of AMR Payload in RTP Payload */ + flow[0].rtp_cfg.rx_fixed_payload := '0014'O & f_osmux_gen_expected_rx_rtp_payload(2 /* AMR_FT_2, 5.90 */, c_OsmuxemDefaultCfg.tx_fixed_payload); + flow[0].rtp_cfg.tx_fixed_payload := flow[0].rtp_cfg.rx_fixed_payload; + /* bind local RTP emulation sockets */ + flow[0].em.portnr := 10000; + f_flow_create(RTPEM[0], ep, call_id, "recvonly", flow[0], false); + + + /* Create the second connection. This connection will be also + * in receive only mode */ + flow[1] := valueof(t_RtpFlow(mp_local_ip, mp_remote_ip, 110, "AMR/8000")); + flow[1].em.portnr := mp_local_osmux_port; + if (crcx_osmux_wildcard) { + flow[1].osmux_cid := -1; + } else { + flow[1].osmux_cid := 2; + } + flow[1].osmux_cfg := c_OsmuxemDefaultCfg; + f_flow_create_osmux(OsmuxEM, ep, call_id, "recvonly", flow[1], false); + + + /* The first leg starts transmitting */ + f_rtpem_mode(RTPEM[0], RTPEM_MODE_TXONLY); + f_sleep(0.5); + stats_rtp := f_rtpem_stats_get(RTPEM[0]); + if (stats_rtp.num_pkts_rx_err_disabled != 0) { + setverdict(fail, "received packets from RTP MGW on recvonly connection"); + mtc.stop; + } + stats_osmux := f_osmuxem_stats_get(OsmuxEM); + if (stats_osmux.num_pkts_rx_err_disabled != 0) { + setverdict(fail, "received packets from Osmux MGW on recvonly connection"); + mtc.stop; + } + + /* The second leg starts transmitting a little later */ + f_osmuxem_mode(OsmuxEM, OSMUXEM_MODE_TXONLY); + f_sleep(1.0); + stats_rtp := f_rtpem_stats_get(RTPEM[0]); + if (stats_rtp.num_pkts_rx_err_disabled != 0) { + setverdict(fail, "received packets from RTP MGW on recvonly connection"); + mtc.stop; + } + stats_osmux := f_osmuxem_stats_get(OsmuxEM); + if (stats_osmux.num_pkts_rx_err_disabled != 0) { + setverdict(fail, "received packets from Osmux MGW on recvonly connection"); + mtc.stop; + } + + /* The first leg will now be switched into bidirectional + * mode, but we do not expect any data comming back yet. */ + f_flow_modify(RTPEM[0], ep, call_id, "sendrecv", flow[0]); + f_sleep(0.5); + stats_rtp := f_rtpem_stats_get(RTPEM[0]); + if (stats_rtp.num_pkts_rx_err_disabled != 0) { + setverdict(fail, "received packets from RTP MGW on recvonly connection"); + mtc.stop; + } + stats_osmux := f_osmuxem_stats_get(OsmuxEM); + if (stats_osmux.num_pkts_rx_err_disabled != 0) { + setverdict(fail, "received packets from Osmux MGW on recvonly connection"); + mtc.stop; + } + + /* When the second leg is switched into bidirectional mode + * as well, then the MGW will connect the two together and + * we should see RTP streams passing through from both ends. */ + f_rtpem_mode(RTPEM[0], RTPEM_MODE_BIDIR); + f_osmuxem_mode(OsmuxEM, OSMUXEM_MODE_BIDIR); + stats_rtp := f_rtpem_stats_get(RTPEM[0]); + num_pkts_tx[0] := stats_rtp.num_pkts_tx + stats_osmux := f_osmuxem_stats_get(OsmuxEM); + num_pkts_tx[1] := stats_osmux.num_pkts_tx + + if (crcx_osmux_wildcard) { + /* For now we must set same CID as the MGW recvCID, + * having sendCID!=recvCID is not yet supported. */ + flow[1].osmux_cid := flow[1].osmux_cid_response; + } + f_flow_modify_osmux(OsmuxEM, ep, call_id, "sendrecv", flow[1]); + f_sleep(2.0); + + stats_rtp := f_rtpem_stats_get(RTPEM[0]); + stats_osmux := f_osmuxem_stats_get(OsmuxEM); + + temp := stats_rtp.num_pkts_tx - num_pkts_tx[0] - stats_osmux.num_pkts_rx * flow[1].osmux_cfg.batch_size; + if (temp > 3 * flow[1].osmux_cfg.batch_size or temp < -3 * flow[1].osmux_cfg.batch_size) { + log("stats_rtp: ", stats_rtp); + log("stats_osmux: ", stats_osmux); + log("old_rtp_tx: ", num_pkts_tx[0]); + setverdict(fail, "number of packets not within normal parameters (" & int2str(temp) & ")"); + mtc.stop; + } + + temp := stats_osmux.num_pkts_tx - num_pkts_tx[1] - stats_rtp.num_pkts_rx / flow[1].osmux_cfg.batch_size; + if (temp > 3 or temp < -3) { + setverdict(fail, "number of packets not within normal parameters (" & int2str(temp) & ")"); + mtc.stop; + } + + f_rtpem_stats_err_check(stats_rtp); + f_osmuxem_stats_err_check(stats_osmux); + + /* Tear down */ + f_flow_delete(RTPEM[0]); + f_flow_delete_osmux(OsmuxEM, ep, call_id); + setverdict(pass); + } + + /* create one RTP and one OSmux emulations and pass data in both + directions. Create CRCX with wildcard Osmux CID and set it later + during MDCX. This is similar to how MSC sets up the call in AoIP. */ + testcase TC_two_crcx_mdcx_and_rtp_osmux_wildcard() runs on dummy_CT { + f_two_crcx_mdcx_and_rtp_osmux(true); + } + + /* create one RTP and one OSmux emulations and pass data in both + directions. Create CRCX with fixed Osmux CID and keep it during + MDCX. This is similar to how BSC sets up the call in AoIP. */ + testcase TC_two_crcx_mdcx_and_rtp_osmux_fixed() runs on dummy_CT { + f_two_crcx_mdcx_and_rtp_osmux(false); + } + function f_crcx_and_dlcx_ep_callid_connid(MgcpEndpoint ep, MgcpCallId call_id) runs on dummy_CT { var template MgcpCommand cmd; var MgcpResponse resp; @@ -926,7 +1524,8 @@ portnr := omit }, pt := pt, - codec := codec + codec := codec, + osmux_cid_sent := false } /* transmit RTP streams between two RTP Emulations back-to-back; expect no loss */ @@ -1482,6 +2081,16 @@ execute(TC_crcx_and_dlcx_ep_callid_connid_inval()); execute(TC_crcx_and_dlcx_retrans()); + execute(TC_crcx_osmux_wildcard()); + execute(TC_crcx_osmux_fixed()); + execute(TC_crcx_osmux_fixed_twice()); + execute(TC_one_crcx_receive_only_osmux()); + execute(TC_one_crcx_loopback_osmux()); + execute(TC_two_crcx_and_rtp_osmux()); + execute(TC_two_crcx_and_rtp_osmux_bidir()); + execute(TC_two_crcx_mdcx_and_rtp_osmux_wildcard()); + execute(TC_two_crcx_mdcx_and_rtp_osmux_fixed()); + execute(TC_crcx_dlcx_30ep()); execute(TC_rtpem_selftest()); diff --git a/mgw/expected-results.xml b/mgw/expected-results.xml index 5c520c5..8975f78 100644 --- a/mgw/expected-results.xml +++ b/mgw/expected-results.xml @@ -1,5 +1,5 @@ - + no verdict @@ -26,6 +26,15 @@ + + + + + + + + + diff --git a/mgw/gen_links.sh b/mgw/gen_links.sh index 632f2e3..f919637 100755 --- a/mgw/gen_links.sh +++ b/mgw/gen_links.sh @@ -41,6 +41,7 @@ FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc " FILES+="RTP_CodecPort.ttcn RTP_Emulation.ttcn IuUP_Types.ttcn IuUP_Emulation.ttcn IuUP_EncDec.cc " +FILES+="OSMUX_CodecPort.ttcn OSMUX_Emulation.ttcn OSMUX_Types.ttcn OSMUX_CodecPort_CtrlFunct.ttcn OSMUX_CodecPort_CtrlFunctDef.cc " FILES+="Native_Functions.ttcn Native_FunctionDefs.cc IPCP_Types.ttcn " FILES+="Osmocom_VTY_Functions.ttcn " gen_links $DIR $FILES diff --git a/mgw/regen_makefile.sh b/mgw/regen_makefile.sh index 64a4fc5..4662933 100755 --- a/mgw/regen_makefile.sh +++ b/mgw/regen_makefile.sh @@ -1,5 +1,5 @@ #!/bin/sh -FILES="*.ttcn SDP_EncDec.cc *.c MGCP_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc RTP_EncDec.cc RTP_CodecPort_CtrlFunctDef.cc IuUP_EncDec.cc Native_FunctionDefs.cc TELNETasp_PT.cc IP_EncDec.cc " +FILES="*.ttcn SDP_EncDec.cc *.c MGCP_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc RTP_EncDec.cc RTP_CodecPort_CtrlFunctDef.cc OSMUX_CodecPort_CtrlFunctDef.cc IuUP_EncDec.cc Native_FunctionDefs.cc TELNETasp_PT.cc IP_EncDec.cc " ../regen-makefile.sh MGCP_Test.ttcn $FILES -- To view, visit https://gerrit.osmocom.org/14046 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ibb58b2a4e08d6f30cfe347c217794d0d1310954f Gerrit-Change-Number: 14046 Gerrit-PatchSet: 7 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 09:56:52 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 09:56:52 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bsc: Introduce Osmux infra and one test for osmo-bsc In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14105 ) Change subject: bsc: Introduce Osmux infra and one test for osmo-bsc ...................................................................... bsc: Introduce Osmux infra and one test for osmo-bsc Test verifies once osmux is enabled in osmo-bsc, BSSMAP RESET (ACK) contains Osmux Support IE and that it correctly handles BSSMAP ASsign Req with Osmux CID. Related: OS#2551 Depends: osmo-bsc 6de754cdde5319af3059d8fc6abf85037ec7eacc Depends: titan.ProtocolModules.BSSMAP Iaf1e137269c0da20b2c96fd104b57edf336693af Change-Id: If69c716dc06d61d810c32d1720a237c7535baca8 --- M bsc-nat/BSC_MS_ConnectionHandler.ttcn M bsc-nat/MSC_ConnectionHandler.ttcn M bsc/BSC_Tests.ttcn M bsc/MSC_ConnectionHandler.ttcn M bsc/expected-results.xml M library/MGCP_Templates.ttcn M library/RAN_Emulation.ttcnpp M msc/BSC_ConnectionHandler.ttcn 8 files changed, 129 insertions(+), 34 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc-nat/BSC_MS_ConnectionHandler.ttcn b/bsc-nat/BSC_MS_ConnectionHandler.ttcn index e52b678..28ff349 100644 --- a/bsc-nat/BSC_MS_ConnectionHandler.ttcn +++ b/bsc-nat/BSC_MS_ConnectionHandler.ttcn @@ -54,6 +54,7 @@ decode_dtap := false, role_ms := true, protocol := RAN_PROTOCOL_BSSAP, + use_osmux := false, sccp_addr_local := omit, sccp_addr_peer := omit } diff --git a/bsc-nat/MSC_ConnectionHandler.ttcn b/bsc-nat/MSC_ConnectionHandler.ttcn index 8635a29..36fdf85 100644 --- a/bsc-nat/MSC_ConnectionHandler.ttcn +++ b/bsc-nat/MSC_ConnectionHandler.ttcn @@ -60,6 +60,7 @@ decode_dtap := false, role_ms := false, protocol := RAN_PROTOCOL_BSSAP, + use_osmux := false, sccp_addr_local := omit, sccp_addr_peer := omit } diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 0583b30..c731b7c 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -89,6 +89,9 @@ /* are we initialized yet */ var boolean g_initialized := false; + /* Osmux is enabled through VTY */ + var boolean g_osmux_enabled := false; + /* global test case guard timer */ timer T_guard := 30.0; @@ -140,16 +143,16 @@ private function f_legacy_bssap_reset() runs on test_CT { var BSSAP_N_UNITDATA_ind ud_ind; timer T := 5.0; - BSSAP.send(ts_BSSAP_UNITDATA_req(g_bssap.sccp_addr_peer, g_bssap.sccp_addr_own, ts_BSSMAP_Reset(0))); + BSSAP.send(ts_BSSAP_UNITDATA_req(g_bssap.sccp_addr_peer, g_bssap.sccp_addr_own, ts_BSSMAP_Reset(0, g_osmux_enabled))); T.start; alt { - [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(g_bssap.sccp_addr_own, g_bssap.sccp_addr_peer, tr_BSSMAP_ResetAck)) { + [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(g_bssap.sccp_addr_own, g_bssap.sccp_addr_peer, tr_BSSMAP_ResetAck(g_osmux_enabled))) { log("Received RESET-ACK in response to RESET, we're ready to go!"); } - [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset)) -> value ud_ind { + [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset(g_osmux_enabled))) -> value ud_ind { log("Respoding to inbound RESET with RESET-ACK"); BSSAP.send(ts_BSSAP_UNITDATA_req(ud_ind.callingAddress, ud_ind.calledAddress, - ts_BSSMAP_ResetAck)); + ts_BSSMAP_ResetAck(g_osmux_enabled))); repeat; } [] BSSAP.receive { repeat; } @@ -257,15 +260,15 @@ mtc.stop; } /* always respond with RESET ACK to RESET */ - [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset)) -> value ud_ind { + [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset(g_osmux_enabled))) -> value ud_ind { BSSAP.send(ts_BSSAP_UNITDATA_req(ud_ind.callingAddress, ud_ind.calledAddress, - ts_BSSMAP_ResetAck)); + ts_BSSMAP_ResetAck(g_osmux_enabled))); repeat; } } altstep no_bssmap_reset() runs on test_CT { - [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset)) { + [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset(g_osmux_enabled))) { setverdict(fail, "unexpected BSSMAP Reset"); mtc.stop; } @@ -289,6 +292,22 @@ vc_MGCP.start(MGCP_Emulation.main(ops, mgcp_pars, id)); } +/* Enable or disable (current default) Osmux. When enabling, BSSMAP Reset + * contains extra IE (OsmuxSupport) and osmo-bsc will handle AssignReq with + * OsmuxCID IE. + */ +private function f_vty_allow_osmux(boolean allow) runs on test_CT { + f_vty_enter_cfg_msc(BSCVTY, 0); + if (allow) { + f_vty_transceive(BSCVTY, "osmux on"); + } else { + f_vty_transceive(BSCVTY, "osmux off"); + } + f_vty_transceive(BSCVTY, "exit"); + f_vty_transceive(BSCVTY, "exit"); + g_osmux_enabled := allow; +} + function f_init_vty(charstring id := "foo") runs on test_CT { if (BSCVTY.checkstate("Mapped")) { /* skip initialization if already executed once */ @@ -302,7 +321,7 @@ /* global initialization function * \param nr_bts Number of BTSs we should start/bring up * \param handler_mode Start an RSL_Emulation_CT component (true) or not (false) */ -function f_init(integer nr_bts := NUM_BTS, boolean handler_mode := false) runs on test_CT { +function f_init(integer nr_bts := NUM_BTS, boolean handler_mode := false, boolean allow_osmux := false) runs on test_CT { var integer i; if (g_initialized) { @@ -313,10 +332,15 @@ T_guard.start; activate(as_Tguard()); + f_init_vty("VirtMSC"); + f_vty_allow_osmux(allow_osmux); + /* Call a function of our 'parent component' RAN_Adapter_CT to start the * MSC-side BSSAP emulation */ if (handler_mode) { - f_ran_adapter_init(g_bssap, mp_bssap_cfg, "VirtMSC", MSC_RanOps); + var RanOps ranops := MSC_RanOps; + ranops.use_osmux := g_osmux_enabled; + f_ran_adapter_init(g_bssap, mp_bssap_cfg, "VirtMSC", ranops); f_ran_adapter_start(g_bssap); } else { f_ran_adapter_init(g_bssap, mp_bssap_cfg, "VirtMSC", omit); @@ -328,7 +352,6 @@ f_ipa_ctrl_start(mp_bsc_ip, mp_bsc_ctrl_port); f_init_mgcp("VirtMSC"); - f_init_vty("VirtMSC"); for (i := 0; i < nr_bts; i := i+1) { /* wait until osmo-bts-omldummy has respawned */ @@ -605,15 +628,24 @@ } /* generate an assignment request for either AoIP or SCCPlite */ -function f_gen_ass_req() return PDU_BSSAP { +function f_gen_ass_req(boolean osmux_enabled := false) return PDU_BSSAP { var PDU_BSSAP ass_cmd; + var BSSMAP_IE_Osmo_OsmuxCID osmux_cid := valueof(ts_OsmuxCID(0)); if (mp_bssap_cfg.transport == BSSAP_TRANSPORT_AoIP) { var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); - ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + if (osmux_enabled) { + ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla, osmux_cid)); + } else { + ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + } } else { var BSSMAP_IE_CircuitIdentityCode cic := valueof(ts_BSSMAP_IE_CIC(0,1)); - ass_cmd := valueof(ts_BSSMAP_AssignmentReq(cic, omit)); + if (osmux_enabled) { + ass_cmd := valueof(ts_BSSMAP_AssignmentReq(cic, omit, osmux_cid)); + } else { + ass_cmd := valueof(ts_BSSMAP_AssignmentReq(cic, omit)); + } } return ass_cmd; } @@ -632,13 +664,22 @@ } /* generate an assignment complete template for either AoIP or SCCPlite */ -function f_gen_exp_compl() return template PDU_BSSAP { +function f_gen_exp_compl(boolean expect_osmux := false) return template PDU_BSSAP { var template PDU_BSSAP exp_compl; + var BSSMAP_IE_Osmo_OsmuxCID osmux_cid := valueof(ts_OsmuxCID(0)); if (mp_bssap_cfg.transport == BSSAP_TRANSPORT_AoIP) { - exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); + if (expect_osmux) { + exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?, osmux_cid); + } else { + exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?, omit); + } } else { /* CIC is optional "*" as the MSC allocated it */ - exp_compl := tr_BSSMAP_AssignmentComplete(*, omit); + if (expect_osmux) { + exp_compl := tr_BSSMAP_AssignmentComplete(*, omit, osmux_cid); + } else { + exp_compl := tr_BSSMAP_AssignmentComplete(*, omit); + } } return exp_compl; } @@ -1002,9 +1043,9 @@ IPA_RSL[0].clear; /* perform BSSAP RESET, expect RESET ACK and DISC.ind on connection */ - BSSAP.send(ts_BSSAP_UNITDATA_req(g_bssap.sccp_addr_peer, g_bssap.sccp_addr_own, ts_BSSMAP_Reset(0))); + BSSAP.send(ts_BSSAP_UNITDATA_req(g_bssap.sccp_addr_peer, g_bssap.sccp_addr_own, ts_BSSMAP_Reset(0, g_osmux_enabled))); interleave { - [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(g_bssap.sccp_addr_own, g_bssap.sccp_addr_peer, tr_BSSMAP_ResetAck)) { } + [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(g_bssap.sccp_addr_own, g_bssap.sccp_addr_peer, tr_BSSMAP_ResetAck(g_osmux_enabled))) { } [] BSSAP.receive(tr_BSSAP_DISC_ind(dt.sccp_conn_id, ?, ?)) { } } @@ -1491,9 +1532,9 @@ f_pageing_helper('001010123456789'H, cid_list, c_BtsId_all); /* Perform a BSSMAP Reset and wait for ACK */ - BSSAP.send(ts_BSSAP_UNITDATA_req(g_bssap.sccp_addr_peer, g_bssap.sccp_addr_own, ts_BSSMAP_Reset(0))); + BSSAP.send(ts_BSSAP_UNITDATA_req(g_bssap.sccp_addr_peer, g_bssap.sccp_addr_own, ts_BSSMAP_Reset(0, g_osmux_enabled))); alt { - [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(g_bssap.sccp_addr_own, g_bssap.sccp_addr_peer, tr_BSSMAP_ResetAck)) { } + [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(g_bssap.sccp_addr_own, g_bssap.sccp_addr_peer, tr_BSSMAP_ResetAck(g_osmux_enabled))) { } [] BSSAP.receive { repeat; } } @@ -1945,8 +1986,8 @@ type record of CodecListTest CodecListTests private function f_TC_assignment_codec(charstring id) runs on MSC_ConnHdlr { - var PDU_BSSAP ass_cmd := f_gen_ass_req(); - var template PDU_BSSAP exp_compl := f_gen_exp_compl(); + var PDU_BSSAP ass_cmd := f_gen_ass_req(g_pars.use_osmux); + var template PDU_BSSAP exp_compl := f_gen_exp_compl(g_pars.use_osmux); /* puzzle together the ASSIGNMENT REQ for given codec[s] */ if (mp_bssap_cfg.transport == BSSAP_TRANSPORT_AoIP) { @@ -2568,6 +2609,31 @@ setverdict(pass); } +testcase TC_assignment_osmux() runs on test_CT { + var TestHdlrParams pars := f_gen_test_hdlr_pars(); + var MSC_ConnHdlr vc_conn; + + /* See note above */ + var RSL_IE_Body mr_conf := { + other := { + len := 2, + payload := '2804'O + } + }; + + pars.ass_codec_list := valueof(ts_BSSMAP_IE_CodecList({ts_CodecAMR_H})); + pars.ass_codec_list.codecElements[0].s0_7 := '00000100'B; /* 5,90k */ + pars.ass_codec_list.codecElements[0].s8_15 := '00000111'B; + pars.expect_mr_conf_ie := mr_conf; + pars.use_osmux := true; + + f_init(1, true, true); + f_sleep(1.0); + + vc_conn := f_start_handler(refers(f_TC_assignment_codec), pars); + vc_conn.done; +} + /* test the procedure of the MSC requesting a Classmark Update: * a) BSSMAP Classmark Request should result in RR CLASSMARK ENQUIRY, * b) L3 RR CLASSMARK CHANGE should result in BSSMAP CLASSMARK UPDATE */ @@ -3993,6 +4059,8 @@ execute( TC_assignment_codec_req_hr_fr() ); execute( TC_assignment_codec_req_fr_hr() ); + execute( TC_assignment_osmux() ); + /* RLL Establish Indication on inactive DCHAN / SAPI */ execute( TC_rll_est_ind_inact_lchan() ); execute( TC_rll_est_ind_inval_sapi1() ); diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 520cc3e..0db5630 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -263,6 +263,7 @@ * MGW level media handling */ altstep as_Media_mgw(boolean norepeat := false) runs on MSC_ConnHdlr { var MgcpCommand mgcp_cmd; + var MgcpOsmuxCID osmux_cid; [] MGCP.receive(tr_CRCX) -> value mgcp_cmd { var SDP_Message sdp; @@ -289,7 +290,12 @@ int2str(mgcp_conn.sample_rate))), valueof(ts_SDP_ptime(mgcp_conn.ptime)) } )); var template MgcpResponse mgcp_resp; - mgcp_resp := ts_CRCX_ACK(mgcp_cmd.line.trans_id, mgcp_conn.conn_id, sdp); + if (g_pars.use_osmux and f_MgcpCmd_contains_par(mgcp_cmd, "X-OSMUX")) { + osmux_cid := f_MgcpCmd_extract_osmux_cid(mgcp_cmd); + mgcp_resp := ts_CRCX_ACK_osmux(mgcp_cmd.line.trans_id, mgcp_conn.conn_id, osmux_cid, sdp); + } else { + mgcp_resp := ts_CRCX_ACK(mgcp_cmd.line.trans_id, mgcp_conn.conn_id, sdp); + } f_mgcp_par_append(mgcp_resp.params, ts_MgcpParSpecEP(g_media.mgcp_ep)); MGCP.send(mgcp_resp); g_media.mgcp_conn[cid].crcx_seen := g_media.mgcp_conn[cid].crcx_seen + 1; @@ -364,8 +370,8 @@ var template PDU_BSSAP resp := omit; /* answer all RESET with a RESET ACK */ - if (match(bssap, tr_BSSMAP_Reset)) { - resp := ts_BSSMAP_ResetAck; + if (match(bssap, tr_BSSMAP_Reset(g_ran_ops.use_osmux))) { + resp := ts_BSSMAP_ResetAck(g_ran_ops.use_osmux); } return resp; @@ -377,6 +383,7 @@ decode_dtap := false, role_ms := false, protocol := RAN_PROTOCOL_BSSAP, + use_osmux := false, sccp_addr_local := omit, sccp_addr_peer := omit } @@ -431,7 +438,8 @@ TestHdlrEncrParams encr optional, TestHdlrParamsLcls lcls, TestHdlrParamsHandover handover optional, - boolean aoip + boolean aoip, + boolean use_osmux }; /* Note: Do not use valueof() to get a value of this template, use @@ -455,7 +463,8 @@ adjust_cx_exp := true }, handover := omit, - aoip := true + aoip := true, + use_osmux := false } function f_create_chan_and_exp() runs on MSC_ConnHdlr { diff --git a/bsc/expected-results.xml b/bsc/expected-results.xml index 33bf677..ff3cce0 100644 --- a/bsc/expected-results.xml +++ b/bsc/expected-results.xml @@ -1,5 +1,5 @@ - + @@ -46,6 +46,7 @@ + diff --git a/library/MGCP_Templates.ttcn b/library/MGCP_Templates.ttcn index 4cc2c6b..4736aaa 100644 --- a/library/MGCP_Templates.ttcn +++ b/library/MGCP_Templates.ttcn @@ -143,6 +143,19 @@ sdp := sdp } + template MgcpResponse ts_CRCX_ACK_osmux(MgcpTransId trans_id, MgcpConnectionId conn_id, MgcpOsmuxCID osmux_cid, template SDP_Message sdp := omit) := { + line := { + code := "200", + trans_id := trans_id, + string := "OK" + }, + params:= { + ts_MgcpParConnectionId(conn_id), + ts_MgcpParOsmuxCID(osmux_cid) + }, + sdp := sdp + } + template MgcpCommand ts_MDCX(MgcpTransId trans_id, charstring ep, MgcpConnectionMode mode, MgcpCallId call_id, MgcpConnectionId conn_id, template SDP_Message sdp := omit) := { line := t_MgcpCmdLine("MDCX", trans_id, ep), params := { diff --git a/library/RAN_Emulation.ttcnpp b/library/RAN_Emulation.ttcnpp index 9a65eb7..41aec47 100644 --- a/library/RAN_Emulation.ttcnpp +++ b/library/RAN_Emulation.ttcnpp @@ -465,9 +465,9 @@ T.start; alt { - [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset)) -> value ud_ind { + [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset(g_ran_ops.use_osmux))) -> value ud_ind { BSSAP.send(ts_BSSAP_UNITDATA_req(ud_ind.callingAddress, ud_ind.calledAddress, - ts_BSSMAP_ResetAck)); + ts_BSSMAP_ResetAck(g_ran_ops.use_osmux))); } [] as_reset_ack(); [] BSSAP.receive { @@ -483,10 +483,10 @@ function f_bssap_reset(SCCP_PAR_Address peer, SCCP_PAR_Address own) runs on RAN_Emulation_CT { timer T := 5.0; - BSSAP.send(ts_BSSAP_UNITDATA_req(peer, own, ts_BSSMAP_Reset(0))); + BSSAP.send(ts_BSSAP_UNITDATA_req(peer, own, ts_BSSMAP_Reset(0, g_ran_ops.use_osmux))); T.start; alt { - [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(own, peer, tr_BSSMAP_ResetAck)) { + [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(own, peer, tr_BSSMAP_ResetAck(g_ran_ops.use_osmux))) { log("Received RESET-ACK in response to RESET, we're ready to go!"); } [] as_reset_ack(); @@ -650,6 +650,7 @@ boolean decode_dtap, boolean role_ms, RanProtocol protocol, + boolean use_osmux, /* needed for performing BSSMAP RESET */ SCCP_PAR_Address sccp_addr_local optional, SCCP_PAR_Address sccp_addr_peer optional @@ -727,10 +728,10 @@ var RANAP_N_UNITDATA_ind rud_ind; #endif #ifdef RAN_EMULATION_BSSAP - [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset)) -> value ud_ind { + [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset(g_ran_ops.use_osmux))) -> value ud_ind { log("Respoding to inbound RESET with RESET-ACK"); BSSAP.send(ts_BSSAP_UNITDATA_req(ud_ind.callingAddress, ud_ind.calledAddress, - ts_BSSMAP_ResetAck)); + ts_BSSMAP_ResetAck(g_ran_ops.use_osmux))); repeat; } #endif diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 796b0ce..29cde36 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -209,6 +209,7 @@ decode_dtap := true, role_ms := true, protocol := RAN_PROTOCOL_BSSAP, + use_osmux := false, sccp_addr_local := omit, sccp_addr_peer := omit } -- To view, visit https://gerrit.osmocom.org/14105 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If69c716dc06d61d810c32d1720a237c7535baca8 Gerrit-Change-Number: 14105 Gerrit-PatchSet: 8 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 09:56:52 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 09:56:52 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Introduce Osmux infra and one test for osmo-msc In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14121 ) Change subject: msc: Introduce Osmux infra and one test for osmo-msc ...................................................................... msc: Introduce Osmux infra and one test for osmo-msc Change-Id: Ibcb82d1a2d570c6c0ad0c3b6504bffe2244eccd9 --- M library/MGCP_Templates.ttcn M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn 3 files changed, 126 insertions(+), 24 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/MGCP_Templates.ttcn b/library/MGCP_Templates.ttcn index 4736aaa..dae379e 100644 --- a/library/MGCP_Templates.ttcn +++ b/library/MGCP_Templates.ttcn @@ -198,6 +198,7 @@ } template MgcpResponse ts_MDCX_ACK(MgcpTransId trans_id, MgcpConnectionId conn_id, template SDP_Message sdp := omit) := ts_CRCX_ACK(trans_id, conn_id, sdp); + template MgcpResponse ts_MDCX_ACK_osmux(MgcpTransId trans_id, MgcpConnectionId conn_id, MgcpOsmuxCID osmux_cid, template SDP_Message sdp := omit) := ts_CRCX_ACK_osmux(trans_id, conn_id, osmux_cid, sdp); /* have a function that generates a template, rather than a template in order to handle * optional parameters */ diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 29cde36..f83407a 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -83,7 +83,8 @@ boolean gsup_enable, integer ran_idx, boolean use_umts_aka, - boolean ran_is_geran + boolean ran_is_geran, + boolean use_osmux }; /* get a one-octet bitmaks of supported algorithms based on Classmark information */ @@ -172,9 +173,9 @@ log("BSSMAP_BscUnitdataCallback"); /* answer all RESET with RESET ACK */ - if (match(bssap, tr_BSSMAP_Reset)){ + if (match(bssap, tr_BSSMAP_Reset(g_ran_ops.use_osmux))){ log("BSSMAP_BscUnitdataCallback: Responding to RESET with RESET-ACK"); - resp := ts_BSSMAP_ResetAck; + resp := ts_BSSMAP_ResetAck(g_ran_ops.use_osmux); } /* FIXME: Handle paging, etc. */ @@ -187,7 +188,7 @@ log("RANAP_RncUnitdataCallback"); /* answer all RESET with RESET ACK */ - if (match(ranap, tr_RANAP_Reset)) { + if (match(ranap, tr_RANAP_Reset())) { log("RANAP_RncUnitdataCallback: Responding to RESET with RESET-ACK"); var CN_DomainIndicator dom; dom := ranap.initiatingMessage.value_.Reset.protocolIEs[1].value_.cN_DomainIndicator; @@ -593,7 +594,9 @@ MgcpCallId mgcp_call_id optional, /* MGCP Call ID; CallAgent allocated */ MgcpEndpoint mgcp_ep optional /* MGCP Endpoint, CallAgent or MGW allocated */, MgcpConnectionId mgcp_connection_id_bss, /* MGCP Connection ID BSS Side */ - MgcpConnectionId mgcp_connection_id_mss /* MGCP Connection ID MSS Side */ + MgcpConnectionId mgcp_connection_id_mss, /* MGCP Connection ID MSS Side */ + + boolean use_osmux /* MSC is expected to use Osmux for this call */ } template (value) CallParameters t_CallParams(hexstring called, integer tid) := { @@ -618,7 +621,8 @@ mgcp_call_id := omit, mgcp_ep := omit, mgcp_connection_id_bss := '0'H,// - mgcp_connection_id_mss := '0'H // + mgcp_connection_id_mss := '0'H,// + use_osmux := false }; /* Allocate a call reference and send SETUP via MNCC to MSC */ @@ -643,6 +647,9 @@ runs on BSC_ConnHdlr { var MNCC_PDU mncc; var MgcpCommand mgcp_cmd; + var template MgcpResponse mgcp_resp; + var MgcpOsmuxCID osmux_cid; + var PDU_BSSAP bssap; f_ran_register_imsi(g_pars.imsi, g_pars.tmsi); @@ -682,8 +689,19 @@ { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, cpars.rtp_sdp_format)), valueof(ts_SDP_ptime(20)) })); - var template MgcpResponse mgcp_resp; - mgcp_resp := ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, sdp); + + if (cpars.use_osmux) { + osmux_cid := f_MgcpCmd_extract_osmux_cid(mgcp_cmd); + if (osmux_cid != -1) { /* we expect MSC to use wildcard here */ + setverdict(fail, "MSC using unexpected CID " & int2str(osmux_cid) & " != -1"); + mtc.stop; + } + osmux_cid := 0; + mgcp_resp := ts_CRCX_ACK_osmux(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, osmux_cid, sdp); + } else { + mgcp_resp := ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, sdp); + } + f_mgcp_par_append(mgcp_resp.params, ts_MgcpParSpecEP(cpars.mgcp_ep)); MGCP.send(mgcp_resp); } @@ -707,15 +725,30 @@ } /* expect the MSC to trigger a BSSMAP ASSIGNMENT */ - [] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) { + [] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) -> value bssap { var BSSMAP_IE_AoIP_TransportLayerAddress tla; var BSSMAP_IE_SpeechCodec codec; + var BSSMAP_IE_Osmo_OsmuxCID osmuxCID; log("f_mt_call_complete 6"); tla := valueof(ts_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.bss_rtp_ip), cpars.bss_rtp_port)); codec := valueof(ts_BSSMAP_IE_SpeechCodec({ts_CodecFR})); - BSSAP.send(ts_BSSMAP_AssignmentComplete(omit, tla, codec)); + if (cpars.use_osmux) { + if (not ispresent(bssap.pdu.bssmap.assignmentRequest.osmuxCID)) { + setverdict(fail, "MSC sent AssignReq without expected OsmuxCID IE"); + mtc.stop; + } + osmuxCID := valueof(ts_OsmuxCID(0)); + if (cpars.use_osmux and not match(bssap.pdu.bssmap.assignmentRequest.osmuxCID, osmuxCID)) { + setverdict(fail, "MSC sent AssignReq without expected OsmuxCID IE"); + mtc.stop; + } + bssap := valueof(ts_BSSMAP_AssignmentComplete(omit, tla, codec, osmuxCID)); + } else { + bssap := valueof(ts_BSSMAP_AssignmentComplete(omit, tla, codec)); + } + BSSAP.send(bssap); BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_CONNECT(cpars.transaction_id))); } @@ -737,8 +770,18 @@ { int2str(cpars.rtp_payload_type) }, { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, cpars.rtp_sdp_format)), - valueof(ts_SDP_ptime(20)) })); - MGCP.send(ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp)); + valueof(ts_SDP_ptime(20)) })); + if (cpars.use_osmux) { + osmux_cid := f_MgcpCmd_extract_osmux_cid(mgcp_cmd); + if (osmux_cid != 0) { /* we expect MSC to use specific CID here */ + setverdict(fail, "MSC using unexpected CID " & int2str(osmux_cid) & " != 0"); + mtc.stop; + } + mgcp_resp := ts_MDCX_ACK_osmux(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, osmux_cid, sdp); + } else { + mgcp_resp := ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp); + } + MGCP.send(mgcp_resp); } /* MDCX setting up the CN side remote RTP address received from MNCC CONNECT */ @@ -807,7 +850,10 @@ var MNCC_PDU mncc; var MgcpCommand mgcp_cmd; + var template MgcpResponse mgcp_resp; var boolean respond_to_dlcx; + var PDU_BSSAP bssap; + var MgcpOsmuxCID osmux_cid; if (cpars.emergency) { f_establish_fully(EST_TYPE_EMERG_CALL); @@ -847,6 +893,10 @@ cpars.mgcp_ep := mgcp_cmd.line.ep; } + if (cpars.use_osmux) { + osmux_cid := f_MgcpCmd_extract_osmux_cid(mgcp_cmd); + } + var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_bss, cpars.mgw_rtp_ip_bss, hex2str(cpars.mgcp_call_id), "42", cpars.mgw_rtp_port_bss, @@ -855,8 +905,17 @@ cpars.rtp_sdp_format)), valueof(ts_SDP_ptime(20)) })); - var template MgcpResponse mgcp_resp; - mgcp_resp := ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, sdp); + if (cpars.use_osmux) { + osmux_cid := f_MgcpCmd_extract_osmux_cid(mgcp_cmd); + if (osmux_cid != -1) { /* we expect MSC to use wildcard here */ + setverdict(fail, "MSC using unexpected CID " & int2str(osmux_cid) & " != -1"); + mtc.stop; + } + osmux_cid := 0; + mgcp_resp := ts_CRCX_ACK_osmux(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, osmux_cid, sdp); + } else { + mgcp_resp := ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, sdp); + } f_mgcp_par_append(mgcp_resp.params, ts_MgcpParSpecEP(cpars.mgcp_ep)); MGCP.send(mgcp_resp); } @@ -871,14 +930,30 @@ MNCC.send(ts_MNCC_ALERT_req(cpars.mncc_callref)); } - //[g_pars.ran_is_geran] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) { - [] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) { + //[g_pars.ran_is_geran] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) -> value bssap { + [] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) -> value bssap { log("f_mo_call_establish 4: rx Assignment Request"); var BSSMAP_IE_AoIP_TransportLayerAddress tla; var BSSMAP_IE_SpeechCodec codec; + var BSSMAP_IE_Osmo_OsmuxCID osmuxCID; + tla := valueof(ts_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.bss_rtp_ip), cpars.bss_rtp_port)); codec := valueof(ts_BSSMAP_IE_SpeechCodec({ts_CodecFR})); - BSSAP.send(ts_BSSMAP_AssignmentComplete(omit, tla, codec)); + if (cpars.use_osmux) { + if (not ispresent(bssap.pdu.bssmap.assignmentRequest.osmuxCID)) { + setverdict(fail, "MSC sent AssignReq without expected OsmuxCID IE"); + mtc.stop; + } + osmuxCID := valueof(ts_OsmuxCID(0)); + if (cpars.use_osmux and not match(bssap.pdu.bssmap.assignmentRequest.osmuxCID, osmuxCID)) { + setverdict(fail, "MSC sent AssignReq without expected OsmuxCID IE"); + mtc.stop; + } + bssap := valueof(ts_BSSMAP_AssignmentComplete(omit, tla, codec, osmuxCID)); + } else { + bssap := valueof(ts_BSSMAP_AssignmentComplete(omit, tla, codec)); + } + BSSAP.send(bssap); } /* [!g_pars.ran_is_geran] BSSAP.receive(tr_RANAP_RabAssReq(rab_sml)) { @@ -896,7 +971,18 @@ { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, cpars.rtp_sdp_format)), valueof(ts_SDP_ptime(20)) })); - MGCP.send(ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp)); + + if (cpars.use_osmux) { + osmux_cid := f_MgcpCmd_extract_osmux_cid(mgcp_cmd); + if (osmux_cid != 0) { /* we expect MSC to use specific CID here */ + setverdict(fail, "MSC using unexpected CID " & int2str(osmux_cid) & " != 0"); + mtc.stop; + } + mgcp_resp := ts_MDCX_ACK_osmux(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, osmux_cid, sdp); + } else { + mgcp_resp := ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp); + } + MGCP.send(mgcp_resp); } /* Second MGCP CRCX (this time for MSS/CN side) */ diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index b64b872..0d6083e 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -275,7 +275,7 @@ } } -function f_init(integer num_bsc := 1, boolean sgsap := false, boolean gsup := true) runs on MTC_CT { +function f_init(integer num_bsc := 1, boolean sgsap := false, boolean gsup := true, boolean osmux := false) runs on MTC_CT { if (g_initialized == true) { return; @@ -288,7 +288,9 @@ for (var integer i := 0; i < num_bsc; i := i + 1) { if (isbound(mp_bssap_cfg[i])) { - f_ran_adapter_init(g_bssap[i], mp_bssap_cfg[i], "MSC_Test_" & int2str(i), BSC_RanOps); + var RanOps ranops := BSC_RanOps; + ranops.use_osmux := osmux; + f_ran_adapter_init(g_bssap[i], mp_bssap_cfg[i], "MSC_Test_" & int2str(i), ranops); f_ran_adapter_start(g_bssap[i]); } else { testcase.stop("missing BSSAP configuration"); @@ -334,7 +336,7 @@ /* FIXME: move into BSC_ConnectionHandler? */ function f_init_pars(integer imsi_suffix, boolean sgsap := false, boolean gsup := true, integer ran_idx := 0, - boolean ran_is_geran := true) + boolean ran_is_geran := true, boolean use_osmux := false) runs on MTC_CT return BSC_ConnHdlrPars { var BSC_ConnHdlrNetworkPars net_pars := { kc_support := '0A'O, /* A5/1 and A5/3 enabled */ @@ -364,7 +366,8 @@ gsup_enable := gsup, ran_idx := ran_idx, use_umts_aka := false, - ran_is_geran := ran_is_geran + ran_is_geran := ran_is_geran, + use_osmux := use_osmux }; if (not ran_is_geran) { pars.use_umts_aka := true; @@ -407,9 +410,9 @@ return vc_conn; } -function f_start_handler(void_fn fn, integer imsi_suffix, integer ran_idx := 0, boolean ran_is_geran := true) +function f_start_handler(void_fn fn, integer imsi_suffix, integer ran_idx := 0, boolean ran_is_geran := true, boolean use_osmux := false) runs on MTC_CT return BSC_ConnHdlr { - return f_start_handler_with_pars(fn, f_init_pars(imsi_suffix, ran_idx := ran_idx, ran_is_geran := ran_is_geran)); + return f_start_handler_with_pars(fn, f_init_pars(imsi_suffix, ran_idx := ran_idx, ran_is_geran := ran_is_geran, use_osmux := use_osmux)); } private function f_tc_lu_imsi_noauth_tmsi(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { @@ -1711,6 +1714,7 @@ cpars.bss_rtp_port := 1110; cpars.mgcp_connection_id_bss := '10004'H; cpars.mgcp_connection_id_mss := '10005'H; + cpars.use_osmux := pars.use_osmux; /* Note: This is an optional parameter. When the call-agent (MSC) does * supply a full endpoint name this setting will be overwritten. */ @@ -1727,6 +1731,15 @@ vc_conn.done; } +testcase TC_lu_and_mt_call_osmux() runs on MTC_CT { + var BSC_ConnHdlr vc_conn; + f_init(1, false, true, true); + f_vty_config(MSCVTY, "msc", "osmux on"); + + vc_conn := f_start_handler(refers(f_tc_lu_and_mt_call), 39, 0, true, true); + vc_conn.done; +} + /* Test MO Call SETUP with DTMF */ private function f_tc_mo_setup_dtmf_dup(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { f_init_handler(pars); @@ -5303,6 +5316,8 @@ execute( TC_lu_imsi_auth_tmsi_encr_3_1_log_msc_debug() ); execute( TC_gsup_mt_multi_part_sms() ); execute( TC_mo_cc_bssmap_clear() ); + + execute( TC_lu_and_mt_call_osmux() ); } -- To view, visit https://gerrit.osmocom.org/14121 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ibcb82d1a2d570c6c0ad0c3b6504bffe2244eccd9 Gerrit-Change-Number: 14121 Gerrit-PatchSet: 6 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 09:59:22 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 09:59:22 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Fully implement TC_pcu_data_req_{pdtch, ptcch} In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14183 ) Change subject: bts: Fully implement TC_pcu_data_req_{pdtch,ptcch} ...................................................................... Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/14183/3/bts/BTS_Tests_virtphy.ttcn File bts/BTS_Tests_virtphy.ttcn: https://gerrit.osmocom.org/#/c/14183/3/bts/BTS_Tests_virtphy.ttcn at 51 PS3, Line 51: tr_L1CTL_DATA_IND > Regarding the use of L1CTL_DATA_* messages: their length is limited to 23: [?] this is not related to the test. Please use the mailing list or redmine for generic discussions. This test suite is about testing what exists today... -- To view, visit https://gerrit.osmocom.org/14183 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I677f660b1076148b3317b08b06eb3d6551d9b577 Gerrit-Change-Number: 14183 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Mon, 27 May 2019 09:59:22 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 09:59:26 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 09:59:26 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Fully implement TC_pcu_data_req_{pdtch, ptcch} In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14183 ) Change subject: bts: Fully implement TC_pcu_data_req_{pdtch,ptcch} ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14183 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I677f660b1076148b3317b08b06eb3d6551d9b577 Gerrit-Change-Number: 14183 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Mon, 27 May 2019 09:59:26 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 09:59:32 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 09:59:32 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Fully implement TC_pcu_data_req_{wrong_{bts, trx, ts}, ts_inactive}() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14190 ) Change subject: bts: Fully implement TC_pcu_data_req_{wrong_{bts,trx,ts},ts_inactive}() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14190 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie05d6b1530bd4d4cf4eaa574b068870682439ee4 Gerrit-Change-Number: 14190 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Mon, 27 May 2019 09:59:32 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 09:59:54 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 09:59:54 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_pcu_data_req_pch() for testing PCU-originated PCH In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14191 ) Change subject: bts: Add TC_pcu_data_req_pch() for testing PCU-originated PCH ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14191 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0f2c4f053ef1b8d61d565f94a548c47fe3666f16 Gerrit-Change-Number: 14191 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Mon, 27 May 2019 09:59:54 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 09:59:57 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 09:59:57 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_pcu_rr_suspend() to test forwarding of RR SUSPEND via PCU... In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14192 ) Change subject: bts: Add TC_pcu_rr_suspend() to test forwarding of RR SUSPEND via PCU socket ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14192 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4da6e9d7c5dfbd0e017d2a63c6474da700c38e52 Gerrit-Change-Number: 14192 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 27 May 2019 09:59:57 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 10:00:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 10:00:05 +0000 Subject: Change in osmo-ttcn3-hacks[master]: cosmetic: Update copyright statement, license notice and SPDX In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14198 ) Change subject: cosmetic: Update copyright statement, license notice and SPDX ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14198 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If7fa19ce484b415bc645e39b3d0d666b44b5f0fd Gerrit-Change-Number: 14198 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 27 May 2019 10:00:05 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 10:00:07 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 10:00:07 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Fully implement TC_pcu_data_req_{pdtch, ptcch} In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14183 ) Change subject: bts: Fully implement TC_pcu_data_req_{pdtch,ptcch} ...................................................................... bts: Fully implement TC_pcu_data_req_{pdtch,ptcch} As trxcon+fake_trx don't have GPRS (TBF) support yet, we cannot do any PCU related tests involving the Um interface yet. Instead, let's use virtphy to fill that gap. Using virtphy, we can actually receive/transmit GPRS blocks on the simulated Um interface. TC_pcu_data_req_{pdtch,ptcch} are moved to a new test suite "BTS_Tests_virtphy.ttcn" which should symbolize that the related tests are to be executed with osmo-bts-virtual + virtphy instead of osmo-bts-trx + fake_trx + trxcon. You also have to set the following module parameter to make this work: BTS_Tests.mp_bts_trxc_port := -1 Related: OS#4023 Change-Id: I677f660b1076148b3317b08b06eb3d6551d9b577 --- M bts/BTS_Tests.ttcn 1 file changed, 71 insertions(+), 16 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 12e1a3a..e56e033 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -10,6 +10,7 @@ import from L1CTL_PortType all; import from L1CTL_Types all; import from LAPDm_Types all; +import from LAPDm_RAW_PT all; import from Osmocom_CTRL_Adapter all; import from Osmocom_CTRL_Functions all; @@ -36,6 +37,7 @@ import from TELNETasp_PortType all; friend module BTS_Tests_SMSCB; +friend module BTS_Tests_virtphy; /* The tests assume a BTS with the following timeslot configuration: * TS0 : Combined CCCH + SDCCH/4 @@ -70,6 +72,8 @@ /* Time to wait for RSL conn from BTS during startup of test */ float mp_ipa_up_timeout := 15.0; float mp_ipa_up_delay := 0.0; + /* false for now, as only virtphy supports it, not calypso-l1 nor trxcon */ + boolean mp_l1_supports_gprs := false; } type record of RslChannelNr ChannelNrs; @@ -3134,7 +3138,7 @@ ***********************************************************************/ /* Verify no RTS before ACT_REQ; verify RTS after ACT_REQ */ -private function f_TC_pcu_act_req(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr, boolean exp_success) +friend function f_TC_pcu_act_req(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr, boolean exp_success) runs on test_CT { timer T := 3.0; @@ -3175,7 +3179,7 @@ } /* verify no more RTS after DEACT_REQ */ -private function f_TC_pcu_deact_req(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr) +friend function f_TC_pcu_deact_req(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr) runs on test_CT { timer T := 3.0; @@ -3196,7 +3200,7 @@ } } -private function f_init_pcu_test() runs on test_CT { +friend function f_init_pcu_test() runs on test_CT { f_init(); PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_VERSION, testcasename()))); } @@ -3276,7 +3280,7 @@ private const octetstring c_PCU_DATA := '000102030405060708090a0b0c0d0e0f10111213141516'O; /* helper function to send a PCU DATA.req */ -private function f_pcu_data_req(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr, +friend function f_pcu_data_req(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr, uint8_t block_nr, uint32_t fn, PCUIF_Sapi sapi, octetstring data) runs on test_CT { @@ -3285,8 +3289,8 @@ } /* helper function to wait for RTS.ind for given SAPI on given BTS/TRX/TS and then send */ -private function f_pcu_wait_rts_and_data_req(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr, - PCUIF_Sapi sapi, octetstring data) +friend function f_pcu_wait_rts_and_data_req(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr, + PCUIF_Sapi sapi, octetstring data) runs on test_CT { var PCUIF_send_data sd; @@ -3345,22 +3349,71 @@ f_sleep(2.0); } -testcase TC_pcu_data_req_pdtch() runs on test_CT { +private function f_pcu_to_l1(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr, + PCUIF_Sapi sapi, octetstring data) runs on test_CT +{ + timer T := 5.0; + + PCU.clear; + f_pcu_wait_rts_and_data_req(bts_nr, trx_nr, ts_nr, sapi, data); + + T.start; + alt { + [] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_PDCH(ts_nr), ?, data)) { + /* FIXME: why is fn of DATA_IND different to fn of RTS / DATA_REQ above? */ + setverdict(pass); + } + [] L1CTL.receive { + repeat; + } + [] T.timeout { + setverdict(fail, "Timeout waiting for ", data); + } + } +} + +private function f_disable_dynamic_ts() runs on test_CT +{ + f_init_vty_bsc(); + /* I'm not quite sure why we need this with osmo-bts-virtual. Somehow it deosn't seem to + * support dynamic timeslots? But it uses the same scheduler as osmo-bts-trx ?!? */ + f_vty_config2(BSCVTY, {"network", "bts 0", "trx 0", "timeslot 3"}, "phys_chan_config TCH/F"); + f_vty_config2(BSCVTY, {"network", "bts 0", "trx 0", "timeslot 4"}, "phys_chan_config TCH/F"); f_init_pcu_test(); +} + +private function f_virtphy_common() runs on test_CT { + f_disable_dynamic_ts(); + f_init_l1ctl(); + f_l1_tune(L1CTL); +} + +testcase TC_pcu_data_req_pdtch() runs on test_CT { + var TfiUsfArr tua := f_TfiUsfArrInit(); + var octetstring data := '0000'O & f_rnd_octstring(21); + + f_virtphy_common(); f_TC_pcu_act_req(0, 0, 7, true); - f_pcu_wait_rts_and_data_req(0, 0, 7, PCU_IF_SAPI_PDTCH, c_PCU_DATA); - /* FIXME: how to check this was actually sent */ - f_sleep(2.0); + f_TfiUsfArrSet(tua, 7, 0); + f_L1CTL_TBF_CFG(L1CTL, false, tua); + f_sleep(1.0); + + f_pcu_to_l1(0, 0, 7, PCU_IF_SAPI_PDTCH, data); //c_PCU_DATA); } testcase TC_pcu_data_req_ptcch() runs on test_CT { - f_init_pcu_test(); + var TfiUsfArr tua := f_TfiUsfArrInit(); + var octetstring data := '0000'O & f_rnd_octstring(21); + + f_virtphy_common(); f_TC_pcu_act_req(0, 0, 7, true); - f_pcu_wait_rts_and_data_req(0, 0, 7, PCU_IF_SAPI_PTCCH, c_PCU_DATA); - /* FIXME: how to check this was actually sent */ - f_sleep(2.0); + f_TfiUsfArrSet(tua, 7, 0); + f_L1CTL_TBF_CFG(L1CTL, false, tua); + f_sleep(1.0); + + f_pcu_to_l1(0, 0, 7, PCU_IF_SAPI_PTCCH, data); } /* Send AGCH from PCU; check it appears on Um side */ @@ -4986,8 +5039,10 @@ execute( TC_pcu_data_req_wrong_trx() ); execute( TC_pcu_data_req_wrong_ts() ); execute( TC_pcu_data_req_ts_inactive() ); - execute( TC_pcu_data_req_pdtch() ); - execute( TC_pcu_data_req_ptcch() ); + if (mp_l1_supports_gprs) { + execute( TC_pcu_data_req_pdtch() ); + execute( TC_pcu_data_req_ptcch() ); + } execute( TC_pcu_data_req_agch() ); execute( TC_pcu_data_req_imm_ass_pch() ); execute( TC_pcu_rach_content() ); -- To view, visit https://gerrit.osmocom.org/14183 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I677f660b1076148b3317b08b06eb3d6551d9b577 Gerrit-Change-Number: 14183 Gerrit-PatchSet: 5 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 10:00:07 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 10:00:07 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Fully implement TC_pcu_data_req_{wrong_{bts, trx, ts}, ts_inactive}() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14190 ) Change subject: bts: Fully implement TC_pcu_data_req_{wrong_{bts,trx,ts},ts_inactive}() ...................................................................... bts: Fully implement TC_pcu_data_req_{wrong_{bts,trx,ts},ts_inactive}() The four existing test in BTS_Tests.ttcn so far didn't have any chance to verify if the invalid messages actually ended up on the air interface or not. By using virtphy instead of trxcon, we can finally add that missing part. Change-Id: Ie05d6b1530bd4d4cf4eaa574b068870682439ee4 Related: OS#4023 --- M bts/BTS_Tests.ttcn 1 file changed, 57 insertions(+), 25 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index e56e033..2b22ac4 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -3312,63 +3312,95 @@ /* Send DATA.req on invalid BTS */ testcase TC_pcu_data_req_wrong_bts() runs on test_CT { - f_init_pcu_test(); + var TfiUsfArr tua := f_TfiUsfArrInit(); + var octetstring data := '0000'O & f_rnd_octstring(21); + + f_virtphy_common(); f_TC_pcu_act_req(0, 0, 7, true); - f_pcu_data_req(23, 0, 7, 0, 0, PCU_IF_SAPI_PDTCH, c_PCU_DATA); - /* FIXME: how to check this wasn't actually sent and didn't crash BTS? */ - f_sleep(10.0); + f_TfiUsfArrSet(tua, 7, 0); + f_L1CTL_TBF_CFG(L1CTL, false, tua); + f_sleep(1.0); + + f_pcu_to_l1(23, 0, 7, PCU_IF_SAPI_PDTCH, data, false, false); } /* Send DATA.req on invalid TRX */ testcase TC_pcu_data_req_wrong_trx() runs on test_CT { - f_init_pcu_test(); + var TfiUsfArr tua := f_TfiUsfArrInit(); + var octetstring data := '0000'O & f_rnd_octstring(21); + + f_virtphy_common(); f_TC_pcu_act_req(0, 0, 7, true); - f_pcu_data_req(0, 100, 7, 0, 0, PCU_IF_SAPI_PDTCH, c_PCU_DATA); - /* FIXME: how to check this wasn't actually sent and didn't crash BTS? */ - f_sleep(10.0); + f_TfiUsfArrSet(tua, 7, 0); + f_L1CTL_TBF_CFG(L1CTL, false, tua); + f_sleep(1.0); + + f_pcu_to_l1(0, 100, 7, PCU_IF_SAPI_PDTCH, data, false, false); } /* Send DATA.req on invalid timeslot */ testcase TC_pcu_data_req_wrong_ts() runs on test_CT { - f_init_pcu_test(); + var TfiUsfArr tua := f_TfiUsfArrInit(); + var octetstring data := '0000'O & f_rnd_octstring(21); + + f_virtphy_common(); f_TC_pcu_act_req(0, 0, 7, true); - f_pcu_data_req(0, 0, 70, 0, 0, PCU_IF_SAPI_PDTCH, c_PCU_DATA); - /* FIXME: how to check this wasn't actually sent and didn't crash BTS? */ - f_sleep(10.0); + f_TfiUsfArrSet(tua, 7, 0); + f_L1CTL_TBF_CFG(L1CTL, false, tua); + f_sleep(1.0); + + f_pcu_to_l1(0, 0, 70, PCU_IF_SAPI_PDTCH, data, false, false); } /* Send DATA.req on timeslot that hasn't been activated */ testcase TC_pcu_data_req_ts_inactive() runs on test_CT { - f_init_pcu_test(); + var TfiUsfArr tua := f_TfiUsfArrInit(); + var octetstring data := '0000'O & f_rnd_octstring(21); - f_pcu_data_req(0, 0, 7, 0, 0, PCU_IF_SAPI_PDTCH, c_PCU_DATA); - /* FIXME: how to check this wasn't actually sent and didn't crash BTS? */ - f_sleep(2.0); + f_virtphy_common(); + + f_TfiUsfArrSet(tua, 7, 0); + f_L1CTL_TBF_CFG(L1CTL, false, tua); + f_sleep(1.0); + + f_pcu_to_l1(0, 0, 7, PCU_IF_SAPI_PDTCH, data, false, false); } private function f_pcu_to_l1(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr, - PCUIF_Sapi sapi, octetstring data) runs on test_CT -{ + PCUIF_Sapi sapi, octetstring data, boolean expect_data := true, + boolean wait_rts := true) +runs on test_CT { timer T := 5.0; + var L1ctlDlMessage rx_dl; PCU.clear; - f_pcu_wait_rts_and_data_req(bts_nr, trx_nr, ts_nr, sapi, data); + if (wait_rts) { + f_pcu_wait_rts_and_data_req(bts_nr, trx_nr, ts_nr, sapi, data); + } else { + f_pcu_data_req(bts_nr, trx_nr, ts_nr, 0, 0, sapi, data); + } T.start; alt { - [] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_PDCH(ts_nr), ?, data)) { + [expect_data] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_PDCH(ts_nr), ?, data)) { /* FIXME: why is fn of DATA_IND different to fn of RTS / DATA_REQ above? */ setverdict(pass); } + [not expect_data] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_PDCH(ts_nr), ?, data)) -> value rx_dl { + setverdict(fail, "Received unexpected ", rx_dl); + } [] L1CTL.receive { repeat; } - [] T.timeout { + [expect_data] T.timeout { setverdict(fail, "Timeout waiting for ", data); } + [not expect_data] T.timeout { + setverdict(pass); + } } } @@ -5035,13 +5067,13 @@ execute( TC_pcu_deact_req() ); execute( TC_pcu_deact_req_wrong_ts() ); execute( TC_pcu_ver_si13() ); - execute( TC_pcu_data_req_wrong_bts() ); - execute( TC_pcu_data_req_wrong_trx() ); - execute( TC_pcu_data_req_wrong_ts() ); - execute( TC_pcu_data_req_ts_inactive() ); if (mp_l1_supports_gprs) { execute( TC_pcu_data_req_pdtch() ); execute( TC_pcu_data_req_ptcch() ); + execute( TC_pcu_data_req_wrong_bts() ); + execute( TC_pcu_data_req_wrong_trx() ); + execute( TC_pcu_data_req_wrong_ts() ); + execute( TC_pcu_data_req_ts_inactive() ); } execute( TC_pcu_data_req_agch() ); execute( TC_pcu_data_req_imm_ass_pch() ); -- To view, visit https://gerrit.osmocom.org/14190 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie05d6b1530bd4d4cf4eaa574b068870682439ee4 Gerrit-Change-Number: 14190 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 10:00:07 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 10:00:07 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_pcu_data_req_pch() for testing PCU-originated PCH In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14191 ) Change subject: bts: Add TC_pcu_data_req_pch() for testing PCU-originated PCH ...................................................................... bts: Add TC_pcu_data_req_pch() for testing PCU-originated PCH Change-Id: I0f2c4f053ef1b8d61d565f94a548c47fe3666f16 Related: OS#4023 --- M bts/BTS_Tests.ttcn 1 file changed, 24 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 2b22ac4..d9e989c 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -3470,6 +3470,29 @@ } } +/* Send AGCH from PCU; check it appears on Um side */ +testcase TC_pcu_data_req_pch() runs on test_CT { + timer T := 3.0; + f_init_pcu_test(); + f_init_l1ctl(); + f_l1_tune(L1CTL); + + f_TC_pcu_act_req(0, 0, 7, true); + /* three characters prefix: last 3 digits of IMSI as ASCII */ + f_pcu_data_req(0, 0, 7, 0, 0, PCU_IF_SAPI_PCH, '313233'O & c_PCU_DATA); + + T.start; + alt { + [] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_PCH_AGCH(0), ?, c_PCU_DATA)) { + setverdict(pass); + } + [] L1CTL.receive { repeat; } + [] T.timeout { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Timeout waiting for PCU-originated PCH block on Um"); + } + } +} + /* Send IMM.ASS from PCU for PCH; check it appears on Um side */ testcase TC_pcu_data_req_imm_ass_pch() runs on test_CT { var octetstring imm_ass := f_rnd_octstring(23); @@ -5076,6 +5099,7 @@ execute( TC_pcu_data_req_ts_inactive() ); } execute( TC_pcu_data_req_agch() ); + execute( TC_pcu_data_req_pch() ); execute( TC_pcu_data_req_imm_ass_pch() ); execute( TC_pcu_rach_content() ); execute( TC_pcu_ext_rach_content() ); -- To view, visit https://gerrit.osmocom.org/14191 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I0f2c4f053ef1b8d61d565f94a548c47fe3666f16 Gerrit-Change-Number: 14191 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 10:00:07 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 10:00:07 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add TC_pcu_rr_suspend() to test forwarding of RR SUSPEND via PCU... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14192 ) Change subject: bts: Add TC_pcu_rr_suspend() to test forwarding of RR SUSPEND via PCU socket ...................................................................... bts: Add TC_pcu_rr_suspend() to test forwarding of RR SUSPEND via PCU socket This test opens a SDCCH and sends a RR SUSPEND message from the simulated MS. It then expects the BTS to pick that up and forward it to the PCU socket rather than via RSL to the BSC. Change-Id: I4da6e9d7c5dfbd0e017d2a63c6474da700c38e52 Related: OS#2249 Related: OS#4023 --- M bts/BTS_Tests.ttcn M library/PCUIF_Types.ttcn 2 files changed, 77 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index d9e989c..21e5634 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -32,6 +32,8 @@ import from MobileL3_RRM_Types all; import from MobileL3_Types all; import from L3_Templates all; +import from L3_Common all; +import from MobileL3_GMM_SM_Types all; import from Osmocom_VTY_Functions all; import from TELNETasp_PortType all; @@ -3799,6 +3801,77 @@ setverdict(pass); } +template (value) PDU_ML3_MS_NW ts_RRM_GprsSuspReq(template (value) OCT4 tlli, + template (value) RoutingAreaIdentificationV rai, + template (value) OCT1 cause) := { + discriminator := '0000'B, /* overwritten */ + tiOrSkip := { + skipIndicator := '0000'B + }, + msgs := { + rrm := { + gPRS_suspensionRequest := { + messageType := '00110100'B, + tLLI := tlli, + routingAreaIdentification := rai, + suspensionCause := cause, + service_Support := omit + } + } + } +} + +/* test for forwarding of RR SUSPEND from CS lchan to PCU via PCU socket */ +private function f_TC_rr_suspend_req(charstring id) runs on ConnHdlr { + var PCUIF_Message first_info; + var integer pcu_conn_id := -1; + var RslLinkId link_id := valueof(ts_RslLinkID_DCCH(0)); + var RoutingAreaIdentificationV rai := f_RAI('262'H, '42F'H, '2342'O, '55'O); + var OCT4 tlli := '01020304'O; + var OCT1 cause := '23'O; + timer T := 5.0; + + f_init_pcu(PCU, id, pcu_conn_id, first_info); + + f_l1_tune(L1CTL); + RSL.clear; + + f_est_dchan(); + L1CTL.clear; + + f_est_rll_mo(link_id.sapi, link_id, '23420815'O); + + var PDU_ML3_MS_NW susp_req := valueof(ts_RRM_GprsSuspReq(tlli, rai, cause)); + var octetstring l3 := enc_PDU_ML3_MS_NW(susp_req); + f_tx_lapdm(ts_LAPDm_I(link_id.sapi, cr_MO_CMD, true, 1, 0, l3), link_id); + + /* ConnHdlr has terminated after sending the RR SUSP REQ over a dedicaed channel */ + T.start; + alt { + [] PCU.receive(t_SD_PCUIF(pcu_conn_id, tr_PCUIF_SUSP_REQ(0, tlli, ?, oct2int(cause)))) { + setverdict(pass); + } + [] PCU.receive(t_SD_PCUIF(pcu_conn_id, tr_PCUIF_SUSP_REQ(?, ?, ?, ?))) { + setverdict(fail, "Received unexpected PCUIF SUSPE REQ: "); + } + [] PCU.receive { + repeat; + } + [] T.timeout { + setverdict(fail, "Timeout waiting for SUSP REQ on PCUIF"); + } + } +} +testcase TC_pcu_rr_suspend() runs on test_CT { + var ConnHdlrPars pars; + var ConnHdlr vc_conn; + + f_init(); + + pars := valueof(t_Pars(t_RslChanNr_SDCCH4(0,3), ts_RSL_ChanMode_SIGN)); + vc_conn := f_start_handler(refers(f_TC_rr_suspend_req), pars, true); + vc_conn.done; +} /*********************************************************************** @@ -5107,6 +5180,7 @@ execute( TC_pcu_time_ind() ); execute( TC_pcu_rts_req() ); execute( TC_pcu_oml_alert() ); + execute( TC_pcu_rr_suspend() ); } else { log("PCU socket path not available, skipping PCU tests"); } diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn index 750e0b4..455082a 100644 --- a/library/PCUIF_Types.ttcn +++ b/library/PCUIF_Types.ttcn @@ -193,7 +193,9 @@ OCT4 tlli, OCT6 ra_id, uint8_t cause -} with { variant "" }; +} with { + variant (tlli) "BYTEORDER(last)" +}; type union PCUIF_MsgUnion { -- To view, visit https://gerrit.osmocom.org/14192 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I4da6e9d7c5dfbd0e017d2a63c6474da700c38e52 Gerrit-Change-Number: 14192 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 10:00:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 10:00:08 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add copyright + license header + short summary/explanation In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14197 ) Change subject: bts: Add copyright + license header + short summary/explanation ...................................................................... bts: Add copyright + license header + short summary/explanation Change-Id: Ia31427595b6d9fde883cfcd49f92767b69ead114 --- M bts/BTS_Tests.ttcn 1 file changed, 21 insertions(+), 0 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 21e5634..5cde0af 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -1,5 +1,26 @@ module BTS_Tests { +/* Integration Tests for OsmoBTS + * (C) 2019-2019 by Harald Welte + * contributions by Vadim Yanitskiy and sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * This test suite tests OsmoBTS by attaching to the external interfaces + * such as Abis RSL, PCU, VTY as well as by attaching to a MS L1 implementation + * using the L1CTL protocol/interface. + * + * You can run the tests with + * a) osmo-bts-trx + trxcon + fake_trx (without any hardware) + * b) any osmo-bts-* + OsmocomBB layer1 + osmocon (with real BTS hardware) + * c) osmo-bts-virtual + virt_phy (without any hardware) + * + * Some of the tests will only run on a subset of those three configurations + * due to limitations in the respective L1. + */ + import from Misc_Helpers all; import from General_Types all; import from GSM_Types all; -- To view, visit https://gerrit.osmocom.org/14197 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ia31427595b6d9fde883cfcd49f92767b69ead114 Gerrit-Change-Number: 14197 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 10:00:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 10:00:08 +0000 Subject: Change in osmo-ttcn3-hacks[master]: cosmetic: Update copyright statement, license notice and SPDX In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14198 ) Change subject: cosmetic: Update copyright statement, license notice and SPDX ...................................................................... cosmetic: Update copyright statement, license notice and SPDX Some of our files didn't have a copyright notice at all, let's add it. Also, update the notices in other files and ensure a SPDX identifier is present in all but the most trivial files. Change-Id: If7fa19ce484b415bc645e39b3d0d666b44b5f0fd --- M bsc-nat/BSCNAT_Tests.ttcn M bsc-nat/BSC_MS_ConnectionHandler.ttcn M bsc-nat/BSC_MS_Simulation.ttcn M bsc-nat/MGCP_Adapter.ttcn M bsc-nat/MSC_ConnectionHandler.ttcn M bsc/BSC_Tests.ttcn M bsc/BSC_Tests_LCLS.ttcn M bsc/MSC_ConnectionHandler.ttcn M bts/BTS_Tests.ttcn M bts/BTS_Tests_SMSCB.ttcn M ggsn_tests/GGSN_Tests.ttcn M hlr/HLR_EUSE.ttcn M hlr/HLR_Tests.ttcn M library/AbisOML_Types.ttcn M library/BSSAP_CodecPort.ttcn M library/BSSGP_Emulation.ttcn M library/BSSGP_Types.ttcn M library/BSSMAP_Templates.ttcn M library/DNS_Helpers.ttcn M library/GSMTAP_PortType.ttcn M library/GSM_RR_Types.ttcn M library/GSM_SystemInformation.ttcn M library/GSM_Types.ttcn M library/GSUP_Emulation.ttcn M library/GSUP_Types.ttcn M library/GTP_CodecPort.ttcn M library/GTP_Emulation.ttcn M library/GTP_Templates.ttcn M library/IPA_CodecPort.ttcn M library/IPA_Emulation.ttcnpp M library/IPA_Testing.ttcn M library/IPA_Types.ttcn M library/IPCP_Types.ttcn M library/IuUP_Emulation.ttcn M library/L1CTL_PortType.ttcn M library/L1CTL_Types.ttcn M library/L3_Common.ttcn M library/L3_Templates.ttcn M library/LAPDm_RAW_PT.ttcn M library/LAPDm_Types.ttcn M library/LLC_Templates.ttcn M library/MGCP_CodecPort.ttcn M library/MGCP_Emulation.ttcn M library/MNCC_Emulation.ttcn M library/MNCC_Types.ttcn M library/NS_Emulation.ttcn M library/NS_Types.ttcn M library/Native_FunctionDefs.cc M library/Osmocom_CTRL_Adapter.ttcn M library/Osmocom_CTRL_Types.ttcn M library/Osmocom_Types.ttcn M library/Osmocom_VTY_Functions.ttcn M library/PAP_Types.ttcn M library/PCUIF_CodecPort.ttcn M library/PCUIF_Types.ttcn M library/RAN_Adapter.ttcnpp M library/RLCMAC_CSN1_Types.ttcn M library/RLCMAC_EncDec.cc M library/RLCMAC_Types.ttcn M library/RSL_Emulation.ttcn M library/RSL_Types.ttcn M library/RTP_CodecPort.ttcn M library/RTP_Emulation.ttcn M library/SCCP_Templates.ttcn M library/SGsAP_CodecPort.ttcn M library/SGsAP_Emulation.ttcn M library/SGsAP_Templates.ttcn M library/SIP_Emulation.ttcn M library/SMPP_CodecPort.ttcn M library/SMPP_Emulation.ttcn M library/SS_Templates.ttcn M library/TRXC_Types.ttcn M library/USSD_Helpers.ttcn M mgw/MGCP_Test.ttcn M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn M msc/MSC_Tests_Iu.ttcn M pcu/GPRS_TBF.ttcn M pcu/PCU_Tests.ttcn M pcu/PCU_Tests_RAW.ttcn M pcu/PCU_Tests_RAW_SNS.ttcn M sccp/SCCP_Tests.ttcn M sgsn/SGSN_Tests.ttcn M sip/SIP_Tests.ttcn 84 files changed, 596 insertions(+), 32 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc-nat/BSCNAT_Tests.ttcn b/bsc-nat/BSCNAT_Tests.ttcn index 993d668..b9b031f 100644 --- a/bsc-nat/BSCNAT_Tests.ttcn +++ b/bsc-nat/BSCNAT_Tests.ttcn @@ -1,5 +1,16 @@ module BSCNAT_Tests { +/* osmo-bsc_nat test suite in TTCN-3 + * (C) 2018-2019 sysmocom - s.f.m.c. GmbH + * Author: Daniel Willmann + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from Osmocom_Types all; import from IPL4asp_Types all; diff --git a/bsc-nat/BSC_MS_ConnectionHandler.ttcn b/bsc-nat/BSC_MS_ConnectionHandler.ttcn index 28ff349..7777f03 100644 --- a/bsc-nat/BSC_MS_ConnectionHandler.ttcn +++ b/bsc-nat/BSC_MS_ConnectionHandler.ttcn @@ -1,5 +1,14 @@ module BSC_MS_ConnectionHandler { +/* (C) 2017-2019 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from General_Types all; import from Osmocom_Types all; import from SCCPasp_Types all; diff --git a/bsc-nat/BSC_MS_Simulation.ttcn b/bsc-nat/BSC_MS_Simulation.ttcn index c45b5ac..ed6e92d 100644 --- a/bsc-nat/BSC_MS_Simulation.ttcn +++ b/bsc-nat/BSC_MS_Simulation.ttcn @@ -1,5 +1,15 @@ module BSC_MS_Simulation { +/* (C) 2017-2018 Harald Welte + * (C) 2018 sysmocom - s.f.m.c. Gmbh; Author: Daniel Willmann + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from IPL4asp_Types all; import from IPA_Emulation all; diff --git a/bsc-nat/MGCP_Adapter.ttcn b/bsc-nat/MGCP_Adapter.ttcn index 6491c68..478c688 100644 --- a/bsc-nat/MGCP_Adapter.ttcn +++ b/bsc-nat/MGCP_Adapter.ttcn @@ -1,5 +1,15 @@ module MGCP_Adapter { +/* MGCP Adapter for bsc-nat tests in TTCN-3 + * (C) 2017 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from IPL4asp_Types all; import from MGCP_Types all; diff --git a/bsc-nat/MSC_ConnectionHandler.ttcn b/bsc-nat/MSC_ConnectionHandler.ttcn index 36fdf85..89728b4 100644 --- a/bsc-nat/MSC_ConnectionHandler.ttcn +++ b/bsc-nat/MSC_ConnectionHandler.ttcn @@ -1,5 +1,14 @@ module MSC_ConnectionHandler { +/* (C) 2017-2019 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from General_Types all; import from Osmocom_Types all; import from SCCPasp_Types all; diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index c731b7c..85260bc 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -7,6 +7,8 @@ * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. * + * SPDX-License-Identifier: GPL-2.0-or-later + * * This test suite tests OsmoBSC while emulating both multiple BTS + MS as * well as the MSC. See README for more details. * diff --git a/bsc/BSC_Tests_LCLS.ttcn b/bsc/BSC_Tests_LCLS.ttcn index f2b9b5d..6087133 100644 --- a/bsc/BSC_Tests_LCLS.ttcn +++ b/bsc/BSC_Tests_LCLS.ttcn @@ -7,6 +7,8 @@ * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. * + * SPDX-License-Identifier: GPL-2.0-or-later + * * This test suite tests OsmoBSC while emulating both multiple BTS + MS as * well as the MSC. See README for more details. * diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 0db5630..dbba135 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -1,5 +1,16 @@ module MSC_ConnectionHandler { +/* MSC Connection HAndler of BSC Tests in TTCN-3 + * (C) 2017-2019 Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from Misc_Helpers all; import from General_Types all; import from Osmocom_Types all; diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 5cde0af..1c20657 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -1,13 +1,15 @@ module BTS_Tests { /* Integration Tests for OsmoBTS - * (C) 2019-2019 by Harald Welte + * (C) 2018-2019 by Harald Welte * contributions by Vadim Yanitskiy and sysmocom - s.f.m.c. GmbH * All rights reserved. * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. * + * SPDX-License-Identifier: GPL-2.0-or-later + * * This test suite tests OsmoBTS by attaching to the external interfaces * such as Abis RSL, PCU, VTY as well as by attaching to a MS L1 implementation * using the L1CTL protocol/interface. diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn index 801a5fc..0712a90 100644 --- a/bts/BTS_Tests_SMSCB.ttcn +++ b/bts/BTS_Tests_SMSCB.ttcn @@ -7,6 +7,8 @@ * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. * + * SPDX-License-Identifier: GPL-2.0-or-later + * * This test suite tests the SMSCB (Cell Broadcast) related functionality of * OsmoBTS by attaching to the A-bis RSL and Um interface and emulating both * BSC and MS. diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn index d793d27..9577a60 100644 --- a/ggsn_tests/GGSN_Tests.ttcn +++ b/ggsn_tests/GGSN_Tests.ttcn @@ -1,5 +1,17 @@ module GGSN_Tests { +/* GGSN test suite in TTCN-3 + * (C) 2017-2019 Harald Welte + * (C) 2018-2019 sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + + import from General_Types all; import from Osmocom_Types all; import from IPL4asp_PortType all; diff --git a/hlr/HLR_EUSE.ttcn b/hlr/HLR_EUSE.ttcn index fbb496c..ef07ca6 100644 --- a/hlr/HLR_EUSE.ttcn +++ b/hlr/HLR_EUSE.ttcn @@ -6,7 +6,15 @@ * function, which will return whatever PDU to send in response back to the HLR. */ -/* (C) 2018 by Harald Welte */ + +/* (C) 2018 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ module HLR_EUSE { diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn index da6ad7c..b6bd1ad 100644 --- a/hlr/HLR_Tests.ttcn +++ b/hlr/HLR_Tests.ttcn @@ -1,5 +1,19 @@ module HLR_Tests { +/* HLR test suite in TTCN-3 + * (C) 2017-2018 Harald Welte + * (C) 2018 sysmocom - s.f.m.c. GmbH + * (C) 2018 Vadim Yanitskiy + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + + + import from GSUP_Types all; import from GSUP_Emulation all; import from IPA_Emulation all; diff --git a/library/AbisOML_Types.ttcn b/library/AbisOML_Types.ttcn index 0d37f8a..c4fd81c 100644 --- a/library/AbisOML_Types.ttcn +++ b/library/AbisOML_Types.ttcn @@ -10,6 +10,8 @@ * * Released under the terms of the GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from General_Types all; diff --git a/library/BSSAP_CodecPort.ttcn b/library/BSSAP_CodecPort.ttcn index 41bd171..fdece08 100644 --- a/library/BSSAP_CodecPort.ttcn +++ b/library/BSSAP_CodecPort.ttcn @@ -9,6 +9,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from General_Types all; diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn index 22c2f09..5b5628e 100644 --- a/library/BSSGP_Emulation.ttcn +++ b/library/BSSGP_Emulation.ttcn @@ -1,5 +1,15 @@ module BSSGP_Emulation { +/* BSSGP Emulation in TTCN-3 + * (C) 2018-2019 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from General_Types all; import from Osmocom_Types all; import from NS_Types all; diff --git a/library/BSSGP_Types.ttcn b/library/BSSGP_Types.ttcn index 826e3ec..d51bb6d 100644 --- a/library/BSSGP_Types.ttcn +++ b/library/BSSGP_Types.ttcn @@ -1,5 +1,15 @@ module BSSGP_Types { +/* BSSGP type definitions in TTCN-3 + * (C) 2018 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from General_Types all; import from Osmocom_Types all; import from GSM_Types all; diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index ad314a3..b377358 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -2,11 +2,14 @@ /* BSSMAP Templates, building on top of BSSAP_Types from Ericsson. * - * (C) 2017 by Harald Welte + * (C) 2017-2019 by Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH * All rights reserved. * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from General_Types all; diff --git a/library/DNS_Helpers.ttcn b/library/DNS_Helpers.ttcn index 45c3a09..122adff 100644 --- a/library/DNS_Helpers.ttcn +++ b/library/DNS_Helpers.ttcn @@ -1,5 +1,15 @@ module DNS_Helpers { +/* DNS Helper functions in TTCN-3 + * (C) 2018 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + private function f_strchr(charstring s, char c) return integer { var integer i; for (i := 0; i < lengthof(s); i := i+1) { diff --git a/library/GSMTAP_PortType.ttcn b/library/GSMTAP_PortType.ttcn index a3f655d..47796c8 100644 --- a/library/GSMTAP_PortType.ttcn +++ b/library/GSMTAP_PortType.ttcn @@ -1,4 +1,13 @@ -/* dual-faced port that wraps an IPL4asp port and encodes/decodes GSMTAP */ +/* dual-faced port that wraps an IPL4asp port and encodes/decodes GSMTAP + * (C) 2017 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + module GSMTAP_PortType { import from GSMTAP_Types all; import from IPL4asp_PortType all; diff --git a/library/GSM_RR_Types.ttcn b/library/GSM_RR_Types.ttcn index 5958569..457f0f5 100644 --- a/library/GSM_RR_Types.ttcn +++ b/library/GSM_RR_Types.ttcn @@ -1,7 +1,14 @@ /* Encoding/Decoding routines for GSM System Information messages - * according to 3GPP TS 44.018 Version 12.3.0 Release 12 */ - -/* (C) 2017 by Harald Welte */ + * according to 3GPP TS 44.018 Version 12.3.0 Release 12 + * + * (C) 2017-2019 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ module GSM_RR_Types { diff --git a/library/GSM_SystemInformation.ttcn b/library/GSM_SystemInformation.ttcn index 1d06aa1..f1918c9 100644 --- a/library/GSM_SystemInformation.ttcn +++ b/library/GSM_SystemInformation.ttcn @@ -1,7 +1,14 @@ /* Encoding/Decoding routines for GSM System Information messages - * according to 3GPP TS 44.018 Version 12.3.0 Release 12 */ - -/* (C) 2017 by Harald Welte */ + * according to 3GPP TS 44.018 Version 12.3.0 Release 12 + * + * (C) 2018 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ module GSM_SystemInformation { diff --git a/library/GSM_Types.ttcn b/library/GSM_Types.ttcn index 88be975..3e24f81 100644 --- a/library/GSM_Types.ttcn +++ b/library/GSM_Types.ttcn @@ -1,7 +1,14 @@ /* Encoding/Decoding routines for GSM System Information messages - * according to 3GPP TS 44.018 Version 12.3.0 Release 12 */ - -/* (C) 2017 by Harald Welte */ + * according to 3GPP TS 44.018 Version 12.3.0 Release 12 + * + * (C) 2017-2018 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ module GSM_Types { diff --git a/library/GSUP_Emulation.ttcn b/library/GSUP_Emulation.ttcn index 86859ba..ea8ba22 100644 --- a/library/GSUP_Emulation.ttcn +++ b/library/GSUP_Emulation.ttcn @@ -24,6 +24,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn index df1d7a9..10cf1b8 100644 --- a/library/GSUP_Types.ttcn +++ b/library/GSUP_Types.ttcn @@ -5,11 +5,14 @@ * GSUP is a non-standard protocol used between OsmoMSC/OsmoSGSN and OsmoHLR * in order to replace the complex TCAP/MAP protocol. * - * (C) 2017 by Harald Welte + * (C) 2017-2019 by Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH * All rights reserved. * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from General_Types all; diff --git a/library/GTP_CodecPort.ttcn b/library/GTP_CodecPort.ttcn index 7a3e755..a8507a6 100644 --- a/library/GTP_CodecPort.ttcn +++ b/library/GTP_CodecPort.ttcn @@ -1,5 +1,14 @@ -/* dual-faced port sitting on top of IPL4_asp UDP to encode/decode GTP */ -/* (C) 2017 by Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + + module GTP_CodecPort { import from IPL4asp_PortType all; import from IPL4asp_Types all; diff --git a/library/GTP_Emulation.ttcn b/library/GTP_Emulation.ttcn index 4368a8a..43c034b 100644 --- a/library/GTP_Emulation.ttcn +++ b/library/GTP_Emulation.ttcn @@ -1,3 +1,14 @@ +/* GTP Emulation in TTCN-3 + * + * (C) 2018 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module GTP_Emulation { import from IPL4asp_Types all; diff --git a/library/GTP_Templates.ttcn b/library/GTP_Templates.ttcn index bd39e27..f2e6ac0 100644 --- a/library/GTP_Templates.ttcn +++ b/library/GTP_Templates.ttcn @@ -1,3 +1,14 @@ +/* GTP Templates in TTCN-3 + * (C) 2018 Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module GTP_Templates { import from General_Types all; diff --git a/library/IPA_CodecPort.ttcn b/library/IPA_CodecPort.ttcn index f9a242b..dfc759c 100644 --- a/library/IPA_CodecPort.ttcn +++ b/library/IPA_CodecPort.ttcn @@ -4,11 +4,13 @@ * towards the IPL4asp port provider, and IPA primitives * which carry the decoded IPA data types as payload. * - * (C) 2017 by Harald Welte + * (C) 2017-2018 by Harald Welte * All rights reserved. * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from IPL4asp_PortType all; diff --git a/library/IPA_Emulation.ttcnpp b/library/IPA_Emulation.ttcnpp index a2066ee..3180621 100644 --- a/library/IPA_Emulation.ttcnpp +++ b/library/IPA_Emulation.ttcnpp @@ -8,11 +8,14 @@ * GSUP. IT hence transcodes messages so the user can work with abstract data types rather * than binary messages. It handles multiple packets inside one TCP segment. * - * (C) 2017-2018 by Harald Welte + * (C) 2017-2019 by Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH * All rights reserved. * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from IPA_Types all; diff --git a/library/IPA_Testing.ttcn b/library/IPA_Testing.ttcn index 413dd31..c4097a5 100644 --- a/library/IPA_Testing.ttcn +++ b/library/IPA_Testing.ttcn @@ -4,6 +4,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ /* diff --git a/library/IPA_Types.ttcn b/library/IPA_Types.ttcn index 1325b14..e232aeb 100644 --- a/library/IPA_Types.ttcn +++ b/library/IPA_Types.ttcn @@ -4,11 +4,13 @@ * Uses the TITAN "RAW" codec syntax to auto-generate encoder and decoder * functions. * - * (C) 2017 by Harald Welte + * (C) 2017-2018 by Harald Welte * All rights reserved. * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from Osmocom_Types all; diff --git a/library/IPCP_Types.ttcn b/library/IPCP_Types.ttcn index 75bb092..657289a 100644 --- a/library/IPCP_Types.ttcn +++ b/library/IPCP_Types.ttcn @@ -1,3 +1,13 @@ +/* IPCP (IP Configuration Protocol) in TTCN-3 + * (C) 2017 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module IPCP_Types { import from Osmocom_Types all; diff --git a/library/IuUP_Emulation.ttcn b/library/IuUP_Emulation.ttcn index 752b897..56384ee 100644 --- a/library/IuUP_Emulation.ttcn +++ b/library/IuUP_Emulation.ttcn @@ -11,9 +11,10 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ - import from Osmocom_Types all; import from IuUP_Types all; diff --git a/library/L1CTL_PortType.ttcn b/library/L1CTL_PortType.ttcn index a366a1b..bdcf024 100644 --- a/library/L1CTL_PortType.ttcn +++ b/library/L1CTL_PortType.ttcn @@ -1,4 +1,14 @@ -/* dual-faced port that wraps an Unixdomain port and encodes/decodes L1CTL */ +/* dual-faced port that wraps an Unixdomain port and encodes/decodes L1CTL + * (C) 2017-2019 Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module L1CTL_PortType { import from L1CTL_Types all; import from UD_PortType all; diff --git a/library/L1CTL_Types.ttcn b/library/L1CTL_Types.ttcn index 6ffbbb8..69e7dbe 100644 --- a/library/L1CTL_Types.ttcn +++ b/library/L1CTL_Types.ttcn @@ -1,6 +1,14 @@ /* Data Types / Encoding / Decoding for OsmocomBB L1CTL interface */ /* (C) 2017 by Harald Welte , derived from l1ctl_proto.h - * (C) 2010 by Harald Welte + Holger Hans Peter Freyther */ + * which is (C) 2010 by Harald Welte + Holger Hans Peter Freyther + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module L1CTL_Types { import from General_Types all; diff --git a/library/L3_Common.ttcn b/library/L3_Common.ttcn index 01f0a34..0a80593 100644 --- a/library/L3_Common.ttcn +++ b/library/L3_Common.ttcn @@ -1,3 +1,14 @@ +/* Common L3 helper functions in TTCN-3 + * (C) 2018 Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module L3_Common { import from Osmocom_Types all; diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn index cf6d64c..a2fe67a 100644 --- a/library/L3_Templates.ttcn +++ b/library/L3_Templates.ttcn @@ -7,6 +7,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from General_Types all; diff --git a/library/LAPDm_RAW_PT.ttcn b/library/LAPDm_RAW_PT.ttcn index 6b8f9fb..164d31a 100644 --- a/library/LAPDm_RAW_PT.ttcn +++ b/library/LAPDm_RAW_PT.ttcn @@ -1,6 +1,16 @@ /* Test Port that stacks on top of L1CTL test port and performs LAPDm encoding/decoding, so the user can send * and receive LAPDm frames in decoded TTCN-3 data types. This is particularly useful for sending/receiving * all kinds of hand-crafted LAPDm frames for testing of the remote LAPDm layer */ + +/* (C) 2017-2018 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module LAPDm_RAW_PT { import from GSM_Types all; import from GSM_RR_Types all; diff --git a/library/LAPDm_Types.ttcn b/library/LAPDm_Types.ttcn index 32e1ba6..a1ca5fe 100644 --- a/library/LAPDm_Types.ttcn +++ b/library/LAPDm_Types.ttcn @@ -1,5 +1,13 @@ -/* LAPDm definitiona according to 3GPP TS 44.006 */ -/* (C) 2017-2018 bh Harald Welte */ +/* LAPDm definitions according to 3GPP TS 44.006 + * (C) 2017-2018 by Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module LAPDm_Types { import from General_Types all; diff --git a/library/LLC_Templates.ttcn b/library/LLC_Templates.ttcn index b71bce1..ed2ca6f 100644 --- a/library/LLC_Templates.ttcn +++ b/library/LLC_Templates.ttcn @@ -1,3 +1,14 @@ +/* LLC Templates in TTCN-3 + * (C) 2018-2019 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + + module LLC_Templates { import from LLC_Types all; diff --git a/library/MGCP_CodecPort.ttcn b/library/MGCP_CodecPort.ttcn index c206986..d33afe1 100644 --- a/library/MGCP_CodecPort.ttcn +++ b/library/MGCP_CodecPort.ttcn @@ -5,10 +5,13 @@ * which carry the decoded MGCP data types as payload. * * (C) 2017 by Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH * All rights reserved. * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from IPL4asp_PortType all; diff --git a/library/MGCP_Emulation.ttcn b/library/MGCP_Emulation.ttcn index 3dfbbc8..23cfeb4 100644 --- a/library/MGCP_Emulation.ttcn +++ b/library/MGCP_Emulation.ttcn @@ -25,6 +25,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from MGCP_CodecPort all; diff --git a/library/MNCC_Emulation.ttcn b/library/MNCC_Emulation.ttcn index 94ed1c4..ee9b58e 100644 --- a/library/MNCC_Emulation.ttcn +++ b/library/MNCC_Emulation.ttcn @@ -27,6 +27,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ diff --git a/library/MNCC_Types.ttcn b/library/MNCC_Types.ttcn index f5028d2..828f341 100644 --- a/library/MNCC_Types.ttcn +++ b/library/MNCC_Types.ttcn @@ -1,3 +1,15 @@ +/* Osmocom MNCC type definitions in TTCN-3 + * (C) 2017-2019 Harald Welte + * contributions by sysmocom -s.f.m.c. GmbH + * (C) 2018 Vadim Yanitskiy + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module MNCC_Types { import from Osmocom_Types all; diff --git a/library/NS_Emulation.ttcn b/library/NS_Emulation.ttcn index 89e25ea..697a482 100644 --- a/library/NS_Emulation.ttcn +++ b/library/NS_Emulation.ttcn @@ -1,3 +1,14 @@ +/* GPRS-NS Emulation in TTCN-3 + * (C) 2018 Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module NS_Emulation { import from NS_Types all; import from BSSGP_Types all; diff --git a/library/NS_Types.ttcn b/library/NS_Types.ttcn index ba1c461..6432d6c 100644 --- a/library/NS_Types.ttcn +++ b/library/NS_Types.ttcn @@ -1,3 +1,13 @@ +/* GPRS-NS type definitions in TTCN-3 + * (C) 2017 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module NS_Types { import from General_Types all; import from Osmocom_Types all; diff --git a/library/Native_FunctionDefs.cc b/library/Native_FunctionDefs.cc index 8aa31b4..f6d5d1d 100644 --- a/library/Native_FunctionDefs.cc +++ b/library/Native_FunctionDefs.cc @@ -1,7 +1,13 @@ /* Utility functions that I'm used to from C but for which I couldn't find TTCN-3 implementations * - * (C) 2017 by Harald Welte + * (C) 2017 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ #include diff --git a/library/Osmocom_CTRL_Adapter.ttcn b/library/Osmocom_CTRL_Adapter.ttcn index f1002bd..93e893f 100644 --- a/library/Osmocom_CTRL_Adapter.ttcn +++ b/library/Osmocom_CTRL_Adapter.ttcn @@ -1,6 +1,15 @@ module Osmocom_CTRL_Adapter { -/* Module that test suites can 'inherit' in order to have a CTRL connection to the IUT which they're testing */ +/* Module that test suites can 'inherit' in order to have a CTRL connection to the IUT which they're testing + * (C) 2018 Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ import from IPL4asp_Types all; diff --git a/library/Osmocom_CTRL_Types.ttcn b/library/Osmocom_CTRL_Types.ttcn index 1d77668..eb22056 100644 --- a/library/Osmocom_CTRL_Types.ttcn +++ b/library/Osmocom_CTRL_Types.ttcn @@ -3,11 +3,13 @@ /* Definition of abstract types for the CTRL protocol as used in Osmocom. * Uses the TITAN "TEXT" codec to auto-generate encoder/decoder functions. * - * (C) 2017 by Harald Welte + * (C) 2017-2018 by Harald Welte * All rights reserved. * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ type charstring CtrlVerb ("GET", "SET") with { diff --git a/library/Osmocom_Types.ttcn b/library/Osmocom_Types.ttcn index 2a4f68c..ffd5df5 100644 --- a/library/Osmocom_Types.ttcn +++ b/library/Osmocom_Types.ttcn @@ -1,3 +1,13 @@ +/* Osmocom utility type definitions in TTCN-3 + * (C) 2017-2019 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module Osmocom_Types { import from General_Types all; diff --git a/library/Osmocom_VTY_Functions.ttcn b/library/Osmocom_VTY_Functions.ttcn index fde05b3..b61a655 100644 --- a/library/Osmocom_VTY_Functions.ttcn +++ b/library/Osmocom_VTY_Functions.ttcn @@ -1,3 +1,14 @@ +/* Osmocom VTY interface functions in TTCN-3 + * (C) 2017-2018 Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module Osmocom_VTY_Functions { import from TELNETasp_PortType all; import from Osmocom_Types all; diff --git a/library/PAP_Types.ttcn b/library/PAP_Types.ttcn index 4e3f14f..eb0c1d1 100644 --- a/library/PAP_Types.ttcn +++ b/library/PAP_Types.ttcn @@ -5,6 +5,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from Osmocom_Types all; diff --git a/library/PCUIF_CodecPort.ttcn b/library/PCUIF_CodecPort.ttcn index cc86fee..91f9bf9 100644 --- a/library/PCUIF_CodecPort.ttcn +++ b/library/PCUIF_CodecPort.ttcn @@ -1,3 +1,14 @@ +/* PCU Interface codec poart in TTCN-3 + * (C) 2018 Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module PCUIF_CodecPort { import from Osmocom_Types all; diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn index 455082a..132b72d 100644 --- a/library/PCUIF_Types.ttcn +++ b/library/PCUIF_Types.ttcn @@ -1,10 +1,19 @@ +/* Osmocom PCU Interface Types, as per osmo-pcu/include/osmocom/pcu/pcuif_proto.h + * (C) 2018-2019 Harald Welte + * contributions by Vadim Yanitskiy + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module PCUIF_Types { import from General_Types all; import from Osmocom_Types all; -/* Osmocom PCU Interface Types, as per osmo-pcu/include/osmocom/pcu/pcuif_proto.h */ - const charstring PCU_SOCK_DEFAULT := "/tmp/pcu_bts"; const uint32_t PCU_IF_VERSION := 9; diff --git a/library/RAN_Adapter.ttcnpp b/library/RAN_Adapter.ttcnpp index 27d22ca..30a1a9e 100644 --- a/library/RAN_Adapter.ttcnpp +++ b/library/RAN_Adapter.ttcnpp @@ -5,6 +5,16 @@ * with deoded BSSAP/RANAP payload. Use this if you want to have full control about what you transmit or * receive, without any automatisms in place. Allows you to refuse connections or other abnormal behavior. */ +/* (C) 2017-2019 Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from General_Types all; import from Osmocom_Types all; diff --git a/library/RLCMAC_CSN1_Types.ttcn b/library/RLCMAC_CSN1_Types.ttcn index 9a7c867..1c8e74c 100644 --- a/library/RLCMAC_CSN1_Types.ttcn +++ b/library/RLCMAC_CSN1_Types.ttcn @@ -1,7 +1,17 @@ /* GPRS RLC/MAC Control Messages as per 3GPP TS 44.060 manually transcribed from the CSN.1 syntax, as no CSN.1 * tool for Eclipse TITAN could be found. Implements only the minimum necessary messages for Osmocom teseting - * purposes. - * (C) 2017 by Harald Welte */ + * purposes. */ + +/* (C) 2017-2018 Harald Welte + * contributions by sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module RLCMAC_CSN1_Types { import from General_Types all; import from Osmocom_Types all; diff --git a/library/RLCMAC_EncDec.cc b/library/RLCMAC_EncDec.cc index 0c1dd84..4ae65b1 100644 --- a/library/RLCMAC_EncDec.cc +++ b/library/RLCMAC_EncDec.cc @@ -4,6 +4,12 @@ * beyond what TITAN RAW coder can handle internally. * * (C) 2017 by Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ namespace RLCMAC__Types { diff --git a/library/RLCMAC_Types.ttcn b/library/RLCMAC_Types.ttcn index c946594..f3deafc 100644 --- a/library/RLCMAC_Types.ttcn +++ b/library/RLCMAC_Types.ttcn @@ -1,4 +1,14 @@ /* TITAN REW encode/decode definitions for 3GPP TS 44.060 RLC/MAC Blocks */ + +/* (C) 2017-2018 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module RLCMAC_Types { import from General_Types all; import from Osmocom_Types all; diff --git a/library/RSL_Emulation.ttcn b/library/RSL_Emulation.ttcn index cdeca74..790dd7a 100644 --- a/library/RSL_Emulation.ttcn +++ b/library/RSL_Emulation.ttcn @@ -21,6 +21,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from Misc_Helpers all; diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index bfa0af4..4d23c3f 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -9,6 +9,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from General_Types all; diff --git a/library/RTP_CodecPort.ttcn b/library/RTP_CodecPort.ttcn index 8f85fd9..b94ae73 100644 --- a/library/RTP_CodecPort.ttcn +++ b/library/RTP_CodecPort.ttcn @@ -9,6 +9,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from IPL4asp_PortType all; diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn index 7b9be68..31bf68a 100644 --- a/library/RTP_Emulation.ttcn +++ b/library/RTP_Emulation.ttcn @@ -14,6 +14,17 @@ * * enable/disable generation/verification of RTCP */ +/* (C) 2017-2018 Harald Welte + * (C) 2018-2019 sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + + /* Ideas: * each component consists of transmitter and receiver diff --git a/library/SCCP_Templates.ttcn b/library/SCCP_Templates.ttcn index f4019b8..a5af073 100644 --- a/library/SCCP_Templates.ttcn +++ b/library/SCCP_Templates.ttcn @@ -3,6 +3,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ module SCCP_Templates { diff --git a/library/SGsAP_CodecPort.ttcn b/library/SGsAP_CodecPort.ttcn index 2981fa2..47fe2cd 100644 --- a/library/SGsAP_CodecPort.ttcn +++ b/library/SGsAP_CodecPort.ttcn @@ -9,6 +9,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from IPL4asp_PortType all; diff --git a/library/SGsAP_Emulation.ttcn b/library/SGsAP_Emulation.ttcn index 442cc7c..f91e076 100644 --- a/library/SGsAP_Emulation.ttcn +++ b/library/SGsAP_Emulation.ttcn @@ -23,6 +23,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from SGsAP_CodecPort all; diff --git a/library/SGsAP_Templates.ttcn b/library/SGsAP_Templates.ttcn index 428924f..4414dd1 100644 --- a/library/SGsAP_Templates.ttcn +++ b/library/SGsAP_Templates.ttcn @@ -6,6 +6,8 @@ * * Released under the terms of the GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from SGsAP_Types all; diff --git a/library/SIP_Emulation.ttcn b/library/SIP_Emulation.ttcn index 98f7371..e71c611 100644 --- a/library/SIP_Emulation.ttcn +++ b/library/SIP_Emulation.ttcn @@ -24,6 +24,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from SIPmsg_Types all; diff --git a/library/SMPP_CodecPort.ttcn b/library/SMPP_CodecPort.ttcn index 0ac81ae..b415c09 100644 --- a/library/SMPP_CodecPort.ttcn +++ b/library/SMPP_CodecPort.ttcn @@ -9,6 +9,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ diff --git a/library/SMPP_Emulation.ttcn b/library/SMPP_Emulation.ttcn index 6dc78e9..fdeed4b 100644 --- a/library/SMPP_Emulation.ttcn +++ b/library/SMPP_Emulation.ttcn @@ -7,6 +7,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ diff --git a/library/SS_Templates.ttcn b/library/SS_Templates.ttcn index 6d8fcf2..069b4e9 100644 --- a/library/SS_Templates.ttcn +++ b/library/SS_Templates.ttcn @@ -7,6 +7,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from General_Types all; diff --git a/library/TRXC_Types.ttcn b/library/TRXC_Types.ttcn index 77666d9..37b8610 100644 --- a/library/TRXC_Types.ttcn +++ b/library/TRXC_Types.ttcn @@ -1,5 +1,15 @@ module TRXC_Types { +/* TRX Control protocol type definitions in TTCN-3 + * (C) 2018 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from Osmocom_Types all; type charstring TrxcType ("CMD", "RSP", "IND") with { diff --git a/library/USSD_Helpers.ttcn b/library/USSD_Helpers.ttcn index 5dd4bb1..0d23073 100644 --- a/library/USSD_Helpers.ttcn +++ b/library/USSD_Helpers.ttcn @@ -8,6 +8,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ import from General_Types all; diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn index ec3070e..31c2a1d 100644 --- a/mgw/MGCP_Test.ttcn +++ b/mgw/MGCP_Test.ttcn @@ -1,3 +1,14 @@ +/* MGW (Media Gateway) test suite in TTCN-3 + * (C) 2017-2018 Harald Welte + * (C) 2018-2019 sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module MGCP_Test { import from Osmocom_Types all; import from MGCP_Types all; diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index f83407a..c1114a6 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -1,3 +1,15 @@ +/* BSC Connection Handler of MSC test suite in TTCN-3 + * (C) 2018-2019 Harald Welte + * (C) 2018-2019 sysmocom - s.f.m.c. GmbH + * (C) 2018 Vadim Yanitskiy + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + module BSC_ConnectionHandler { import from General_Types all; diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 0d6083e..16f7b9b 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -1,5 +1,17 @@ module MSC_Tests { +/* Osmocom MSC test suite in in TTCN-3 + * (C) 2017-2019 Harald Welte + * (C) 2018-2019 sysmocom - s.f.m.c. GmbH + * (C) 2018-2019 Vadim Yanitskiy + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + friend module MSC_Tests_Iu; import from General_Types all; diff --git a/msc/MSC_Tests_Iu.ttcn b/msc/MSC_Tests_Iu.ttcn index 5798821..e592573 100644 --- a/msc/MSC_Tests_Iu.ttcn +++ b/msc/MSC_Tests_Iu.ttcn @@ -1,5 +1,15 @@ module MSC_Tests_Iu { +/* Osmocom MSC test suite for Iu interface in TTCN-3 + * (C) 2019 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from General_Types all; import from Osmocom_Types all; diff --git a/pcu/GPRS_TBF.ttcn b/pcu/GPRS_TBF.ttcn index 951cf4a..9fbe191 100644 --- a/pcu/GPRS_TBF.ttcn +++ b/pcu/GPRS_TBF.ttcn @@ -7,9 +7,10 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ - import from GSM_Types all; import from Osmocom_Types all; import from General_Types all; diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn index 4dce7dd..e00f92b 100644 --- a/pcu/PCU_Tests.ttcn +++ b/pcu/PCU_Tests.ttcn @@ -1,5 +1,15 @@ module PCU_Tests { +/* Osmocom PCU test suite in TTCN-3 + * (C) 2018-2019 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from General_Types all; import from Osmocom_Types all; import from GSM_Types all; diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn index 96a3f86..36db225 100644 --- a/pcu/PCU_Tests_RAW.ttcn +++ b/pcu/PCU_Tests_RAW.ttcn @@ -6,6 +6,15 @@ standard procedures on the NS and BSSGP level. The goal of these tests is to test exactly those NS and BSSGP implementations on the BSS (PCU) side. */ +/* (C) 2018-2019 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from General_Types all; import from Osmocom_Types all; import from GSM_Types all; diff --git a/pcu/PCU_Tests_RAW_SNS.ttcn b/pcu/PCU_Tests_RAW_SNS.ttcn index 9bedff9..28dd654 100644 --- a/pcu/PCU_Tests_RAW_SNS.ttcn +++ b/pcu/PCU_Tests_RAW_SNS.ttcn @@ -1,5 +1,15 @@ module PCU_Tests_RAW_SNS { +/* Osmocom PCU test suite for IP Sub-Network-Service (SNS) in TTCN-3 + * (C) 2018-2019 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from Osmocom_Types all; import from PCU_Tests all; import from PCU_Tests_RAW all; diff --git a/sccp/SCCP_Tests.ttcn b/sccp/SCCP_Tests.ttcn index ea2522a..e76e9ac 100644 --- a/sccp/SCCP_Tests.ttcn +++ b/sccp/SCCP_Tests.ttcn @@ -4,6 +4,8 @@ * * Released under the terms of GNU General Public License, Version 2 or * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ module SCCP_Tests { diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index 2bdbfb9..5633183 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -1,5 +1,16 @@ module SGSN_Tests { +/* Osmocom SGSN test suite in TTCN-3 + * (C) 2018-2019 Harald Welte + * (C) 2018-2019 sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from General_Types all; import from Osmocom_Types all; import from Native_Functions all; diff --git a/sip/SIP_Tests.ttcn b/sip/SIP_Tests.ttcn index 67650c8..9de2723 100644 --- a/sip/SIP_Tests.ttcn +++ b/sip/SIP_Tests.ttcn @@ -1,5 +1,15 @@ module SIP_Tests { +/* osmo-sip-connector test suite in TTCN-3 + * (C) 2018-2019 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + import from General_Types all; import from Osmocom_Types all; -- To view, visit https://gerrit.osmocom.org/14198 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If7fa19ce484b415bc645e39b3d0d666b44b5f0fd Gerrit-Change-Number: 14198 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 10:00:29 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 May 2019 10:00:29 +0000 Subject: Change in osmo-sgsn[master]: osmo-sgsn: get rid of OSMO_ASSERT() in 'auth-policy' handler In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14195 ) Change subject: osmo-sgsn: get rid of OSMO_ASSERT() in 'auth-policy' handler ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/14195/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/#/c/14195/1//COMMIT_MSG at 22 PS1, Line 22: auth-policy c > Yes, the VTY parser would pass any of those variations. [?] Sure, matching like that is fine and expected. What I am saying is once matched, strings passed as argv[*] to VTY apps functions should be "complete" commands, aka "accept" instead of "acc" even if you typed "acc". This patch imho is just a quick fix in some place, but I bet we have similar issues in lots of other places, so we should fix it in libosmocore code instead of here. Otherwise having to check for all possible argv strings in all commands becomes unmanageable. -- To view, visit https://gerrit.osmocom.org/14195 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If9b0c0d031477ca87786aab5c269d00748e896c8 Gerrit-Change-Number: 14195 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 27 May 2019 10:00:29 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 11:49:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 11:49:53 +0000 Subject: Change in osmo-msc[master]: sgs_iface: detect and react to VLR/HLR failure In-Reply-To: References: Message-ID: Harald Welte has uploaded a new patch set (#4) to the change originally created by dexter. ( https://gerrit.osmocom.org/13559 ) Change subject: sgs_iface: detect and react to VLR/HLR failure ...................................................................... sgs_iface: detect and react to VLR/HLR failure The HLR (which is connected via the GSUP interface) may fail and disconnect. On the next location update the VLR will try to talk to the HLR and fail. This failure event is not communicated towards the SGs related code and the SGs-association will remain in the LA-PRESENT state forever. Lets add code to report the problem to the SGs code and trigger a RESET an the SGs interface. - Add a flag to report an HLR problem back to the SGs code - Fix the FSM that controls the reset - Make sure the all SGs associations are reset when the failure occurs. Change-Id: Icc7df92879728bc98c85fc1d5d8b4c6246501b12 Related: OS#3859 --- M include/osmocom/msc/vlr_sgs.h M src/libmsc/sgs_iface.c M src/libvlr/vlr.c M src/libvlr/vlr_sgs_fsm.c 4 files changed, 50 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/59/13559/4 -- To view, visit https://gerrit.osmocom.org/13559 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Icc7df92879728bc98c85fc1d5d8b4c6246501b12 Gerrit-Change-Number: 13559 Gerrit-PatchSet: 4 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 11:50:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 11:50:08 +0000 Subject: Change in osmo-msc[master]: sgs_iface: detect and react to VLR/HLR failure In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13559 ) Change subject: sgs_iface: detect and react to VLR/HLR failure ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13559 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icc7df92879728bc98c85fc1d5d8b4c6246501b12 Gerrit-Change-Number: 13559 Gerrit-PatchSet: 4 Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 27 May 2019 11:50:08 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 11:50:35 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 11:50:35 +0000 Subject: Change in osmo-bsc[master]: rx_fail_evt_rep(): Don't recycle variable In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14175 ) Change subject: rx_fail_evt_rep(): Don't recycle variable ...................................................................... rx_fail_evt_rep(): Don't recycle variable the 'p_val' variable should represent he 'probabl cause value' and nothing else. Let's use other local variables for other things. Change-Id: Ie79279fc1d42cd57e7478820493b250fe38c2f4f --- M src/osmo-bsc/abis_nm.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c index 240517b..bff6c12 100644 --- a/src/osmo-bsc/abis_nm.c +++ b/src/osmo-bsc/abis_nm.c @@ -368,8 +368,8 @@ oh->length-sizeof(*foh)); if (TLVP_PRESENT(&tp, NM_ATT_ADD_TEXT)) { - p_val = TLVP_VAL(&tp, NM_ATT_ADD_TEXT); - p_text = talloc_strndup(tall_bsc_ctx, (const char *) p_val, + const uint8_t *val = TLVP_VAL(&tp, NM_ATT_ADD_TEXT); + p_text = talloc_strndup(tall_bsc_ctx, (const char *) val, TLVP_LEN(&tp, NM_ATT_ADD_TEXT)); } -- To view, visit https://gerrit.osmocom.org/14175 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie79279fc1d42cd57e7478820493b250fe38c2f4f Gerrit-Change-Number: 14175 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 13:27:27 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 13:27:27 +0000 Subject: Change in osmo-msc[master]: sgs_iface: detect and react to VLR/HLR failure In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13559 ) Change subject: sgs_iface: detect and react to VLR/HLR failure ...................................................................... sgs_iface: detect and react to VLR/HLR failure The HLR (which is connected via the GSUP interface) may fail and disconnect. On the next location update the VLR will try to talk to the HLR and fail. This failure event is not communicated towards the SGs related code and the SGs-association will remain in the LA-PRESENT state forever. Lets add code to report the problem to the SGs code and trigger a RESET an the SGs interface. - Add a flag to report an HLR problem back to the SGs code - Fix the FSM that controls the reset - Make sure the all SGs associations are reset when the failure occurs. Change-Id: Icc7df92879728bc98c85fc1d5d8b4c6246501b12 Related: OS#3859 --- M include/osmocom/msc/vlr_sgs.h M src/libmsc/sgs_iface.c M src/libvlr/vlr.c M src/libvlr/vlr_sgs_fsm.c 4 files changed, 50 insertions(+), 20 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/msc/vlr_sgs.h b/include/osmocom/msc/vlr_sgs.h index 00d52f7..fa9d948 100644 --- a/include/osmocom/msc/vlr_sgs.h +++ b/include/osmocom/msc/vlr_sgs.h @@ -75,6 +75,7 @@ /* This callback function is called when an SGs location update is complete */ struct sgs_lu_response { bool accepted; + bool error; struct vlr_subscr *vsub; }; typedef void (*vlr_sgs_lu_response_cb_t) (struct sgs_lu_response *response); diff --git a/src/libmsc/sgs_iface.c b/src/libmsc/sgs_iface.c index d83a730..53ab853 100644 --- a/src/libmsc/sgs_iface.c +++ b/src/libmsc/sgs_iface.c @@ -376,15 +376,26 @@ unsigned int new_id_len = 0; uint8_t resp_msg_type; + /* Determine message type that is sent next (needed for logging) */ if (response->accepted) resp_msg_type = SGSAP_MSGT_LOC_UPD_ACK; + else if (response->error) + resp_msg_type = SGSAP_MSGT_RESET_IND; else resp_msg_type = SGSAP_MSGT_LOC_UPD_REJ; + /* Determine MME */ mme = sgs_mme_ctx_by_vsub(vsub, resp_msg_type); if (!mme) return; + /* Handle error (HLR failure) */ + if (response->error) { + osmo_fsm_inst_dispatch(mme->fi, SGS_VLRR_E_START_RESET, NULL); + return; + } + + /* Handle LU accept/reject */ if (response->accepted) { if (vsub->tmsi_new != GSM_RESERVED_TMSI) { new_id_len = gsm48_generate_mid_from_tmsi(new_id, vsub->tmsi_new); @@ -1120,6 +1131,10 @@ reset_params.vlr_name_present = true; reset_ind = gsm29118_create_reset_ind(&reset_params); sgs_tx(sgc, reset_ind); + + /* Perform a reset of the SGS FSM of all subscribers that are present in the VLR */ + vlr_sgs_reset(gsm_network->vlr); + osmo_fsm_inst_state_chg(fi, SGS_VLRR_ST_WAIT_ACK, sgs->cfg.timer[SGS_STATE_TS11], 11); break; default: @@ -1187,6 +1202,7 @@ static struct osmo_fsm sgs_vlr_reset_fsm = { .name = "SGs-VLR-RESET", .states = sgs_vlr_reset_fsm_states, + .num_states = ARRAY_SIZE(sgs_vlr_reset_fsm_states), .allstate_event_mask = S(SGS_VLRR_E_START_RESET), .allstate_action = sgs_vlr_reset_fsm_allstate, .timer_cb = sgs_vlr_reset_fsm_timer_cb, diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index b156b43..2753096 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -854,7 +854,7 @@ static int vlr_subscr_handle_lu_res(struct vlr_subscr *vsub, const struct osmo_gsup_message *gsup) { - struct sgs_lu_response sgs_lu_response; + struct sgs_lu_response sgs_lu_response = {0}; bool sgs_lu_in_progress = false; if (vsub->sgs_fsm->state == SGS_UE_ST_LA_UPD_PRES) @@ -885,7 +885,7 @@ static int vlr_subscr_handle_lu_err(struct vlr_subscr *vsub, const struct osmo_gsup_message *gsup) { - struct sgs_lu_response sgs_lu_response; + struct sgs_lu_response sgs_lu_response = {0}; bool sgs_lu_in_progress = false; if (vsub->sgs_fsm->state == SGS_UE_ST_LA_UPD_PRES) diff --git a/src/libvlr/vlr_sgs_fsm.c b/src/libvlr/vlr_sgs_fsm.c index 13639ca..49ad09a 100644 --- a/src/libvlr/vlr_sgs_fsm.c +++ b/src/libvlr/vlr_sgs_fsm.c @@ -48,24 +48,6 @@ {0, NULL} }; -/* Initiate location update and change to SGS_UE_ST_LA_UPD_PRES state */ -static void perform_lu(struct osmo_fsm_inst *fi) -{ - struct vlr_subscr *vsub = fi->priv; - int rc; - osmo_fsm_inst_state_chg(fi, SGS_UE_ST_LA_UPD_PRES, 0, 0); - vsub->ms_not_reachable_flag = false; - - /* Note: At the moment we allocate a new TMSI on each LU. */ - rc = vlr_subscr_alloc_tmsi(vsub); - if (rc != 0) - LOGPFSML(fi, LOGL_ERROR, "(sub %s) VLR LU tmsi allocation failed\n", vlr_subscr_name(vsub)); - - rc = vlr_subscr_req_lu(vsub); - if (rc != 0) - LOGPFSML(fi, LOGL_ERROR, "(sub %s) HLR LU request failed\n", vlr_subscr_name(vsub)); -} - /* Send the SGs Association to NULL state immediately */ static void to_null(struct osmo_fsm_inst *fi) { @@ -86,6 +68,37 @@ osmo_timer_del(&vsub->sgs.Ts5); } +/* Initiate location update and change to SGS_UE_ST_LA_UPD_PRES state */ +static void perform_lu(struct osmo_fsm_inst *fi) +{ + struct vlr_subscr *vsub = fi->priv; + struct sgs_lu_response sgs_lu_response = {0}; + int rc; + + /* Note: At the moment we allocate a new TMSI on each LU. */ + rc = vlr_subscr_alloc_tmsi(vsub); + if (rc != 0) { + LOGPFSML(fi, LOGL_ERROR, "(sub %s) VLR LU tmsi allocation failed\n", vlr_subscr_name(vsub)); + goto error; + } + + rc = vlr_subscr_req_lu(vsub); + if (rc != 0) { + LOGPFSML(fi, LOGL_ERROR, "(sub %s) HLR LU request failed\n", vlr_subscr_name(vsub)); + goto error; + } + + osmo_fsm_inst_state_chg(fi, SGS_UE_ST_LA_UPD_PRES, 0, 0); + vsub->ms_not_reachable_flag = false; + return; + +error: + to_null(fi); + sgs_lu_response.error = true; + sgs_lu_response.vsub = vsub; + vsub->sgs.response_cb(&sgs_lu_response); +} + /* Respawn a pending paging (Timer is reset and a new paging request is sent) */ static void respawn_paging(struct vlr_subscr *vsub) { -- To view, visit https://gerrit.osmocom.org/13559 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Icc7df92879728bc98c85fc1d5d8b4c6246501b12 Gerrit-Change-Number: 13559 Gerrit-PatchSet: 4 Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 13:29:59 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 13:29:59 +0000 Subject: Change in docker-playground[master]: ttcn3-bscnat: Prepare cfgs for VTY & Osmux support In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14130 ) Change subject: ttcn3-bscnat: Prepare cfgs for VTY & Osmux support ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14130 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I794a17bdeaff9ab9316d7a6acb1e58dfd815b645 Gerrit-Change-Number: 14130 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 27 May 2019 13:29:59 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 13:33:03 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 13:33:03 +0000 Subject: Change in libosmocore[master]: utils: add gsmtap_logread.py a gsmtap log reader In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14196 ) Change subject: utils: add gsmtap_logread.py a gsmtap log reader ...................................................................... Patch Set 1: (1 comment) deferring to Pau's technical comments https://gerrit.osmocom.org/#/c/14196/1/utils/gsmtap_logread.py File utils/gsmtap_logread.py: https://gerrit.osmocom.org/#/c/14196/1/utils/gsmtap_logread.py at 3 PS1, Line 3: # license: MIT > do we want it to be MIT? It's unusual for Osmocom, but for such a "small external utility" I won't insist on copyleft. Also, it doesn't state sysmocom as copyright holder, so I assume it's written in spare time and hence lynxis gets to decide. Might be good to use a SPDX-Identifier right away. -- To view, visit https://gerrit.osmocom.org/14196 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I24478d8e16066c6118e867bdba54c6418c15e170 Gerrit-Change-Number: 14196 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-CC: Harald Welte Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 27 May 2019 13:33:03 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 14:43:49 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 27 May 2019 14:43:49 +0000 Subject: Change in osmo-bts[master]: Fix passing of RR SUSPEND REQ from DCCH to PCU socket In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14193 ) Change subject: Fix passing of RR SUSPEND REQ from DCCH to PCU socket ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14193 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic75486f8edaefa9c07bd92515ba1832b1c482fa6 Gerrit-Change-Number: 14193 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Mon, 27 May 2019 14:43:49 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 15:04:00 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 15:04:00 +0000 Subject: Change in libosmocore[master]: rsl: Add osmocom-specific extensions to RSL channel numbers for CBCH Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14199 Change subject: rsl: Add osmocom-specific extensions to RSL channel numbers for CBCH ...................................................................... rsl: Add osmocom-specific extensions to RSL channel numbers for CBCH We don't really *need* it in libosmocore as such, but the lack of having all osmocom extensions listed here lead to using overlapping definitions: 0x18 was used for dynamic PDCH on the Abis side, but also for CBCH on the L1SAP side. Let's list them all here to increase visibility in case anyone wants to extend this further... Related: OS#4027 Change-Id: I93e557358cf1c1b622f77f906959df7ca6d5cb12 --- M include/osmocom/gsm/protocol/gsm_08_58.h M src/gsm/rsl.c 2 files changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/99/14199/1 diff --git a/include/osmocom/gsm/protocol/gsm_08_58.h b/include/osmocom/gsm/protocol/gsm_08_58.h index 3ea4e63..d36920d 100644 --- a/include/osmocom/gsm/protocol/gsm_08_58.h +++ b/include/osmocom/gsm/protocol/gsm_08_58.h @@ -50,6 +50,8 @@ #define ABIS_RSL_CHAN_NR_CBITS_RACH 0x11 #define ABIS_RSL_CHAN_NR_CBITS_PCH_AGCH 0x12 #define ABIS_RSL_CHAN_NR_CBITS_OSMO_PDCH 0x18 /*< non-standard, for dyn TS */ +#define ABIS_RSL_CHAN_NR_CBITS_OSMO_CBCH4 0x19 /*< non-standard, for CBCH/SDCCH4 */ +#define ABIS_RSL_CHAN_NR_CBITS_OSMO_CBCH8 0x1a /*< non-standard, for CBCH/SDCCH8 */ /* Link Identifier 9.3.2 */ union abis_rsl_link_id { @@ -424,6 +426,8 @@ #define RSL_CHAN_RACH 0x88 #define RSL_CHAN_PCH_AGCH 0x90 #define RSL_CHAN_OSMO_PDCH 0xc0 /*< non-standard, for dyn TS */ +#define RSL_CHAN_OSMO_CBCH4 0xc1 /*< non-standard, for CBCH/SDCCH4 */ +#define RSL_CHAN_OSMO_CBCH8 0xc2 /*< non-standard, for CBCH/SDCCH8 */ /* Chapter 9.3.3 */ #define RSL_ACT_TYPE_INITIAL 0x00 diff --git a/src/gsm/rsl.c b/src/gsm/rsl.c index 1777479..ea58bfd 100644 --- a/src/gsm/rsl.c +++ b/src/gsm/rsl.c @@ -209,6 +209,13 @@ } else if ((chan_nr & 0xf8) == RSL_CHAN_OSMO_PDCH) { *type = RSL_CHAN_OSMO_PDCH; *subch = 0; + } else if ((chan_nr & 0xf8) == RSL_CHAN_OSMO_CBCH4) { + *type = RSL_CHAN_OSMO_CBCH4; + *subch = 0; + } else if ((chan_nr & 0xf8) == RSL_CHAN_OSMO_CBCH8) { + *type = RSL_CHAN_OSMO_CBCH8; + *subch = 0; + } else } else return -EINVAL; @@ -242,6 +249,10 @@ snprintf(buf, buf_len, "PCH/AGCH on TS%d", ts); else if (cbits == 0x18) snprintf(buf, buf_len, "PDCH on TS%d", ts); + else if (cbits == 0x19) + snprintf(buf, buf_len, "CBCH(SDCCH/4) on TS%d", ts); + else if (cbits == 0x1a) + snprintf(buf, buf_len, "CBCH(SDCCH/8) on TS%d", ts); else snprintf(buf, buf_len, "UNKNOWN on TS%d", ts); -- To view, visit https://gerrit.osmocom.org/14199 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I93e557358cf1c1b622f77f906959df7ca6d5cb12 Gerrit-Change-Number: 14199 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 15:04:01 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 15:04:01 +0000 Subject: Change in libosmocore[master]: fsm: Allow millisecond granularity in osmo_fsm built-in timer Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14200 Change subject: fsm: Allow millisecond granularity in osmo_fsm built-in timer ...................................................................... fsm: Allow millisecond granularity in osmo_fsm built-in timer So far, the public API of osmo_fsm only allowed integral seconds as timeout. Let's change that to milli-seconds in order to cover more use cases. This introduces * osmo_fsm_inst_state_chg_ms() * osmo_fsm_inst_state_chg_keep_or_start_timer_ms() Which both work exactly like their previous counterparts without the _ms suffix - the only difference being that the timeout parameter is specified in milli-seconds, not in seconds. The value range for an unsigned long in milli-seconds even on a 32bit platform extends to about 48 days. This patch also removes the documentation notice about limiting the maximum value to 0x7fffffff due to time_t signed-ness. We don't use time_t but unsigned long. Change-Id: I35b330e460e80bb67376c77e997e464439ac5397 --- M include/osmocom/core/fsm.h M src/fsm.c 2 files changed, 37 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/00/14200/1 diff --git a/include/osmocom/core/fsm.h b/include/osmocom/core/fsm.h index 41d01a5..1701c45 100644 --- a/include/osmocom/core/fsm.h +++ b/include/osmocom/core/fsm.h @@ -243,6 +243,13 @@ unsigned long timeout_secs, int T, const char *file, int line); +#define osmo_fsm_inst_state_chg_ms(fi, new_state, timeout_ms, T) \ + _osmo_fsm_inst_state_chg_ms(fi, new_state, timeout_ms, T, \ + __FILE__, __LINE__) +int _osmo_fsm_inst_state_chg_ms(struct osmo_fsm_inst *fi, uint32_t new_state, + unsigned long timeout_ms, int T, + const char *file, int line); + /*! perform a state change while keeping the current timer running. * * This is useful to keep a timeout across several states (without having to round the @@ -273,6 +280,14 @@ unsigned long timeout_secs, int T, const char *file, int line); +#define osmo_fsm_inst_state_chg_keep_or_start_timer_ms(fi, new_state, timeout_ms, T) \ + _osmo_fsm_inst_state_chg_keep_or_start_timer_ms(fi, new_state, timeout_ms, T, \ + __FILE__, __LINE__) +int _osmo_fsm_inst_state_chg_keep_or_start_timer_ms(struct osmo_fsm_inst *fi, uint32_t new_state, + unsigned long timeout_ms, int T, + const char *file, int line); + + /*! dispatch an event to an osmocom finite state machine instance * * This is a macro that calls _osmo_fsm_inst_dispatch() with the given diff --git a/src/fsm.c b/src/fsm.c index 882a2b4..2d769b8 100644 --- a/src/fsm.c +++ b/src/fsm.c @@ -1,7 +1,7 @@ /*! \file fsm.c * Osmocom generic Finite State Machine implementation. */ /* - * (C) 2016 by Harald Welte + * (C) 2016-2019 by Harald Welte * * SPDX-License-Identifier: GPL-2.0+ * @@ -584,7 +584,7 @@ } static int state_chg(struct osmo_fsm_inst *fi, uint32_t new_state, - bool keep_timer, unsigned long timeout_secs, int T, + bool keep_timer, unsigned long timeout_ms, int T, const char *file, int line) { struct osmo_fsm *fsm = fi->fsm; @@ -592,11 +592,6 @@ const struct osmo_fsm_state *st = &fsm->states[fi->state]; struct timeval remaining; - /* Limit to 0x7fffffff seconds as explained by - * _osmo_fsm_inst_state_chg()'s API doc. */ - if (timeout_secs > 0x7fffffff) - timeout_secs = 0x7fffffff; - /* validate if new_state is a valid state */ if (!(st->out_state_mask & (1 << new_state))) { LOGPFSMLSRC(fi, LOGL_ERROR, file, line, @@ -627,10 +622,10 @@ "State change to %s (keeping " OSMO_T_FMT ", %ld.%03lds remaining)\n", osmo_fsm_state_name(fsm, new_state), OSMO_T_FMT_ARGS(fi->T), remaining.tv_sec, remaining.tv_usec / 1000); - } else if (timeout_secs) - LOGPFSMSRC(fi, file, line, "State change to %s (" OSMO_T_FMT ", %lus)\n", + } else if (timeout_ms) + LOGPFSMSRC(fi, file, line, "State change to %s (" OSMO_T_FMT ", %lums)\n", osmo_fsm_state_name(fsm, new_state), - OSMO_T_FMT_ARGS(T), timeout_secs); + OSMO_T_FMT_ARGS(T), timeout_ms); else LOGPFSMSRC(fi, file, line, "State change to %s (no timeout)\n", osmo_fsm_state_name(fsm, new_state)); @@ -645,8 +640,8 @@ if (!keep_timer || (keep_timer && !osmo_timer_pending(&fi->timer))) { fi->T = T; - if (timeout_secs) - osmo_timer_schedule(&fi->timer, timeout_secs, 0); + if (timeout_ms) + osmo_timer_schedule(&fi->timer, timeout_ms / 1000, timeout_ms % 1000); } /* Call 'onenter' last, user might terminate FSM from there */ @@ -686,13 +681,6 @@ * provides a unified way to configure and apply GSM style Tnnnn timers to FSM * state transitions. * - * Range: since time_t's maximum value is not well defined in a cross platform - * way, clamp timeout_secs to the maximum of the signed 32bit range, or roughly - * 68 years (float(0x7fffffff) / (60. * 60 * 24 * 365.25) = 68.0497). Thus - * ensure that very large timeouts do not wrap around to become very small - * ones. Note though that this might still be unsafe on systems with a time_t - * range below 32 bits. - * * \param[in] fi FSM instance whose state is to change * \param[in] new_state The new state into which we should change * \param[in] timeout_secs Timeout in seconds (if !=0), maximum-clamped to 2147483647 seconds. @@ -707,7 +695,13 @@ unsigned long timeout_secs, int T, const char *file, int line) { - return state_chg(fi, new_state, false, timeout_secs, T, file, line); + return state_chg(fi, new_state, false, timeout_secs*1000, T, file, line); +} +int _osmo_fsm_inst_state_chg_ms(struct osmo_fsm_inst *fi, uint32_t new_state, + unsigned long timeout_ms, int T, + const char *file, int line) +{ + return state_chg(fi, new_state, false, timeout_ms, T, file, line); } /*! perform a state change while keeping the current timer running. @@ -761,8 +755,15 @@ unsigned long timeout_secs, int T, const char *file, int line) { - return state_chg(fi, new_state, true, timeout_secs, T, file, line); + return state_chg(fi, new_state, true, timeout_secs*1000, T, file, line); } +int _osmo_fsm_inst_state_chg_keep_or_start_timer_ms(struct osmo_fsm_inst *fi, uint32_t new_state, + unsigned long timeout_ms, int T, + const char *file, int line) +{ + return state_chg(fi, new_state, true, timeout_ms, T, file, line); +} + /*! dispatch an event to an osmocom finite state machine instance * -- To view, visit https://gerrit.osmocom.org/14200 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I35b330e460e80bb67376c77e997e464439ac5397 Gerrit-Change-Number: 14200 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 15:06:56 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 May 2019 15:06:56 +0000 Subject: Change in osmo-ggsn[master]: ggsn: Start gtp retrans timer during startup Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14201 Change subject: ggsn: Start gtp retrans timer during startup ...................................................................... ggsn: Start gtp retrans timer during startup This timer was added in osmo-ggsn.git dda21ed7d4a897c9284c69175d0da598598eae40, but it was never initially started since it was introducing, and as a result retransmissions never being triggered. Also as a consequence, gtp_retrans is never called. That function is responsible from triggering retransmissions and to free old responses waiting in the resp queue (to check for duplicates). Since it's never called, the retransmit resp queue will grow over time. Fixes: dda21ed7d4a897c9284c69175d0da598598eae40 Fixes: OS#3997 Change-Id: Ie4adc52829446539fbbb5e9e0cf75a04f91c7eea --- M ggsn/ggsn.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/01/14201/1 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index bd8647f..f22beb7 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -1022,6 +1022,7 @@ /* Start GTP re-transmission timer */ osmo_timer_setup(&ggsn->gtp_timer, ggsn_gtp_tmr_cb, ggsn); + ggsn_gtp_tmr_start(ggsn); gtp_set_cb_data_ind(ggsn->gsn, encaps_tun); gtp_set_cb_delete_context(ggsn->gsn, delete_context); -- To view, visit https://gerrit.osmocom.org/14201 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ie4adc52829446539fbbb5e9e0cf75a04f91c7eea Gerrit-Change-Number: 14201 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 15:21:03 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 15:21:03 +0000 Subject: Change in libosmocore[master]: rsl: Add osmocom-specific extensions to RSL channel numbers for CBCH In-Reply-To: References: Message-ID: Harald Welte has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/14199 ) Change subject: rsl: Add osmocom-specific extensions to RSL channel numbers for CBCH ...................................................................... rsl: Add osmocom-specific extensions to RSL channel numbers for CBCH We don't really *need* it in libosmocore as such, but the lack of having all osmocom extensions listed here lead to using overlapping definitions: 0x18 was used for dynamic PDCH on the Abis side, but also for CBCH on the L1SAP side. Let's list them all here to increase visibility in case anyone wants to extend this further... Related: OS#4027 Change-Id: I93e557358cf1c1b622f77f906959df7ca6d5cb12 --- M include/osmocom/gsm/protocol/gsm_08_58.h M src/gsm/rsl.c 2 files changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/99/14199/2 -- To view, visit https://gerrit.osmocom.org/14199 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I93e557358cf1c1b622f77f906959df7ca6d5cb12 Gerrit-Change-Number: 14199 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 15:22:37 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 15:22:37 +0000 Subject: Change in osmocom-bb[master]: trxcon: Fix CBCH related RSL channel numbers Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14202 Change subject: trxcon: Fix CBCH related RSL channel numbers ...................................................................... trxcon: Fix CBCH related RSL channel numbers OsmoBTS, BSC and TTCN3 used cbits == 0x18 for dynamic PDCH, while trxcon wanted to use 0x18 for CBCH on SDCCH/4. Let's fix this and bring everyone in agreement. Change-Id: Ia9a415628c659cbc2dd5dc65b875b7f935d6e211 --- M src/host/trxcon/sched_lchan_desc.c M src/host/trxcon/sched_trx.c 2 files changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/02/14202/1 diff --git a/src/host/trxcon/sched_lchan_desc.c b/src/host/trxcon/sched_lchan_desc.c index 93639a3..ee712d5 100644 --- a/src/host/trxcon/sched_lchan_desc.c +++ b/src/host/trxcon/sched_lchan_desc.c @@ -304,13 +304,13 @@ }, [TRXC_SDCCH4_CBCH] = { TRXC_SDCCH4_CBCH, "SDCCH/4(CBCH)", - 0xc0, TRX_CH_LID_DEDIC, + 0xc8, TRX_CH_LID_DEDIC, 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_AUTO, rx_data_fn, NULL, }, [TRXC_SDCCH8_CBCH] = { TRXC_SDCCH8_CBCH, "SDCCH/8(CBCH)", - 0xc8, TRX_CH_LID_DEDIC, + 0xd0, TRX_CH_LID_DEDIC, 4 * GSM_BURST_PL_LEN, 0x00, rx_data_fn, NULL, }, diff --git a/src/host/trxcon/sched_trx.c b/src/host/trxcon/sched_trx.c index 18516d3..6c3f557 100644 --- a/src/host/trxcon/sched_trx.c +++ b/src/host/trxcon/sched_trx.c @@ -536,11 +536,13 @@ return GSM_PCHAN_TCH_H; else if ((cbits & 0x1c) == 0x04) return GSM_PCHAN_CCCH_SDCCH4; - else if ((cbits & 0x1f) == 0x18) - return GSM_PCHAN_CCCH_SDCCH4_CBCH; else if ((cbits & 0x18) == 0x08) return GSM_PCHAN_SDCCH8_SACCH8C; + else if ((cbits & 0x1f) == 0x18) + return GSM_PCHAN_TCH_F_TCH_H_PDCH; else if ((cbits & 0x1f) == 0x19) + return GSM_PCHAN_CCCH_SDCCH4_CBCH; + else if ((cbits & 0x1f) == 0x1a) return GSM_PCHAN_SDCCH8_SACCH8C_CBCH; return GSM_PCHAN_NONE; -- To view, visit https://gerrit.osmocom.org/14202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ia9a415628c659cbc2dd5dc65b875b7f935d6e211 Gerrit-Change-Number: 14202 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 15:22:37 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 15:22:37 +0000 Subject: Change in osmocom-bb[master]: virt_phy: Fix typo in log message Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14203 Change subject: virt_phy: Fix typo in log message ...................................................................... virt_phy: Fix typo in log message Change-Id: I9291957ef5d7033d46060d07f2aa0a3880612e1a --- M src/host/virt_phy/src/l1ctl_sap.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/03/14203/1 diff --git a/src/host/virt_phy/src/l1ctl_sap.c b/src/host/virt_phy/src/l1ctl_sap.c index aac49bf..8944398 100644 --- a/src/host/virt_phy/src/l1ctl_sap.c +++ b/src/host/virt_phy/src/l1ctl_sap.c @@ -563,7 +563,7 @@ } if (ms->state.state == MS_STATE_DEDICATED) - LOGPMS(DL1C, LOGL_NOTICE, ms, "Harrd termiation of DEDICATED mode, fix L23!\n"); + LOGPMS(DL1C, LOGL_NOTICE, ms, "Hard termination of DEDICATED mode, fix L23!\n"); if (cfg_req->is_uplink) { for (i = 0; i < 8; i++) -- To view, visit https://gerrit.osmocom.org/14203 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I9291957ef5d7033d46060d07f2aa0a3880612e1a Gerrit-Change-Number: 14203 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 15:22:56 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 15:22:56 +0000 Subject: Change in osmocom-bb[master]: trxcon: Fix CBCH related RSL channel numbers In-Reply-To: References: Message-ID: Harald Welte has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/14202 ) Change subject: trxcon: Fix CBCH related RSL channel numbers ...................................................................... trxcon: Fix CBCH related RSL channel numbers OsmoBTS, BSC and TTCN3 used cbits == 0x18 for dynamic PDCH, while trxcon wanted to use 0x18 for CBCH on SDCCH/4. Let's fix this and bring everyone in agreement. Related: OS#4027 Change-Id: Ia9a415628c659cbc2dd5dc65b875b7f935d6e211 --- M src/host/trxcon/sched_lchan_desc.c M src/host/trxcon/sched_trx.c 2 files changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/02/14202/2 -- To view, visit https://gerrit.osmocom.org/14202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia9a415628c659cbc2dd5dc65b875b7f935d6e211 Gerrit-Change-Number: 14202 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 15:22:56 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 15:22:56 +0000 Subject: Change in osmocom-bb[master]: layer23: fix tons of compiler warnings, mostly OSMO_DEPRECATED related In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14136 to look at the new patch set (#4). Change subject: layer23: fix tons of compiler warnings, mostly OSMO_DEPRECATED related ...................................................................... layer23: fix tons of compiler warnings, mostly OSMO_DEPRECATED related Change-Id: I03918bd864c711b377a795186123c85bb6f4dc4a --- M src/host/layer23/src/common/networks.c M src/host/layer23/src/misc/bcch_scan.c M src/host/layer23/src/mobile/gsm322.c M src/host/layer23/src/mobile/gsm411_sms.c M src/host/layer23/src/mobile/gsm480_ss.c M src/host/layer23/src/mobile/gsm48_rr.c M src/host/layer23/src/mobile/subscriber.c 7 files changed, 36 insertions(+), 26 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/36/14136/4 -- To view, visit https://gerrit.osmocom.org/14136 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I03918bd864c711b377a795186123c85bb6f4dc4a Gerrit-Change-Number: 14136 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 15:22:56 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 15:22:56 +0000 Subject: Change in osmocom-bb[master]: virt_phy: Fix typo in log message In-Reply-To: References: Message-ID: Harald Welte has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/14203 ) Change subject: virt_phy: Fix typo in log message ...................................................................... virt_phy: Fix typo in log message Change-Id: I9291957ef5d7033d46060d07f2aa0a3880612e1a --- M src/host/virt_phy/src/l1ctl_sap.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/03/14203/2 -- To view, visit https://gerrit.osmocom.org/14203 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9291957ef5d7033d46060d07f2aa0a3880612e1a Gerrit-Change-Number: 14203 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 15:24:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 15:24:08 +0000 Subject: Change in osmo-ttcn3-hacks[master]: L1CTL: Add support for CCCH_MODE_COMBINED_CBCH Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14204 Change subject: L1CTL: Add support for CCCH_MODE_COMBINED_CBCH ...................................................................... L1CTL: Add support for CCCH_MODE_COMBINED_CBCH In OsmocomBB/trxcon Change-Id Ia94ebf22a2ec439dfe1f31d703b832ae57b48ef2 we introduced a new mode CCCH_MODE_COMBINED_CBCH to indicate that the channel combination is a CCCH+SDCCH/4 with one SDCCH stolen for CBCH. Let's make sure we actually use that mode in our CBCH related tests Change-Id: I27ee2c81bec7175c1ea09d4f3f6037f2866fe242 --- M bts/BTS_Tests.ttcn M bts/BTS_Tests_SMSCB.ttcn M library/L1CTL_Types.ttcn 3 files changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/04/14204/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 1c20657..47c16c2 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -451,8 +451,8 @@ } } -friend function f_l1_tune(L1CTL_PT L1CTL) { - f_L1CTL_FBSB(L1CTL, { false, mp_trx0_arfcn }, CCCH_MODE_COMBINED, mp_rxlev_exp); +friend function f_l1_tune(L1CTL_PT L1CTL, L1ctlCcchMode ccch_mode := CCCH_MODE_COMBINED) { + f_L1CTL_FBSB(L1CTL, { false, mp_trx0_arfcn }, ccch_mode, mp_rxlev_exp); } private function f_trxc_connect() runs on ConnHdlr { diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn index 0712a90..c02522b 100644 --- a/bts/BTS_Tests_SMSCB.ttcn +++ b/bts/BTS_Tests_SMSCB.ttcn @@ -216,7 +216,7 @@ f_init(testcasename()); f_init_l1ctl(); - f_l1_tune(L1CTL); + f_l1_tune(L1CTL, ccch_mode := CCCH_MODE_COMBINED_CBCH); /* FIXME: switch to dedicated mode for SDCCH/8 */ /* send SMSCB[s] via RSL */ diff --git a/library/L1CTL_Types.ttcn b/library/L1CTL_Types.ttcn index 69e7dbe..87849f5 100644 --- a/library/L1CTL_Types.ttcn +++ b/library/L1CTL_Types.ttcn @@ -62,7 +62,8 @@ type enumerated L1ctlCcchMode { CCCH_MODE_NONE (0), CCCH_MODE_NON_COMBINED, - CCCH_MODE_COMBINED + CCCH_MODE_COMBINED, + CCCH_MODE_COMBINED_CBCH } with { variant "FIELDLENGTH(8)" }; type enumerated L1ctlNeighMode { -- To view, visit https://gerrit.osmocom.org/14204 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I27ee2c81bec7175c1ea09d4f3f6037f2866fe242 Gerrit-Change-Number: 14204 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 15:24:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 15:24:08 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Fix use of osmocom-extended RSL Channel Numbers Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14205 Change subject: Fix use of osmocom-extended RSL Channel Numbers ...................................................................... Fix use of osmocom-extended RSL Channel Numbers Bring our TTCN-3 view of how RSL channel numbers are defined in sync with that of our other implementations (BTS, libosmocore, trxcon, ...) Change-Id: I48908058ac2501a3b5ae7c74e4e8527cbaee1b01 Related: OS#4027 --- M bts/BTS_Tests_SMSCB.ttcn M library/GSM_Types.ttcn 2 files changed, 20 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/05/14205/1 diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn index c02522b..4d357ba 100644 --- a/bts/BTS_Tests_SMSCB.ttcn +++ b/bts/BTS_Tests_SMSCB.ttcn @@ -321,8 +321,17 @@ } } +private function t_cbch_chan_nr(CbchTestPars pars, template uint8_t tn) return template RslChannelNr { + if (pars.use_sdcch4) { + return t_RslChanNr_CBCH4(tn); + } else { + return t_RslChanNr_CBCH8(tn); + } +} + /* shared function doing the heavy lifting for most CBCH tests */ private function f_TC_smscb(CbchTestPars pars) runs on test_CT { + var template RslChannelNr t_chan_nr := t_cbch_chan_nr(pars, 0); /* FIXME: TS number */ var L1ctlDlMessage dl; var integer msg_count; timer T; @@ -344,8 +353,7 @@ T.start(5.0 + 3.0 * int2float(msg_count)); /* Expect this to show up exactly once on the basic CBCH (four blocks) */ alt { - /* FIXME: Channel Nr for SDCCH/8 */ - [] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_CBCH(0))) -> value dl { + [] L1CTL.receive(tr_L1CTL_DATA_IND(t_chan_nr)) -> value dl { var integer tb := f_cbch_fn2tb(dl.dl_info.frame_nr); var CBCH_Block cb := dec_CBCH_Block(dl.payload.data_ind.payload); log("Tb=", tb, ", CBCH: ", dl, ", block: ", cb); @@ -378,6 +386,7 @@ } private function f_TC_smscb_default_only(CbchTestPars pars) runs on test_CT { + var template RslChannelNr t_chan_nr := t_cbch_chan_nr(pars, 0); /* FIXME: TS number */ var L1ctlDlMessage dl; timer T := 5.0; @@ -389,7 +398,7 @@ T.start; alt { - [] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_CBCH(0))) -> value dl { + [] L1CTL.receive(tr_L1CTL_DATA_IND(t_chan_nr)) -> value dl { var integer tb := f_cbch_fn2tb(dl.dl_info.frame_nr); log("CBCH: ", dl); var CBCH_Block cb := dec_CBCH_Block(dl.payload.data_ind.payload); @@ -658,6 +667,7 @@ basic := valueof(t_CbchPC(msgs_1m_3b_default)), extended := omit }; + var template RslChannelNr t_chan_nr := t_RslChanNr_CBCH4(0); var L1ctlDlMessage dl; timer T := 5.0; @@ -672,7 +682,7 @@ T.start; alt { - [] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_CBCH(0))) -> value dl { + [] L1CTL.receive(tr_L1CTL_DATA_IND(t_chan_nr)) -> value dl { log("CBCH: ", dl); var CBCH_Block cb := dec_CBCH_Block(dl.payload.data_ind.payload); /* detect the proper CBCH messages; check frame number */ diff --git a/library/GSM_Types.ttcn b/library/GSM_Types.ttcn index 3e24f81..ec74ce5 100644 --- a/library/GSM_Types.ttcn +++ b/library/GSM_Types.ttcn @@ -68,7 +68,8 @@ RSL_CHAN_NR_RACH ('10001'B), RSL_CHAN_NR_PCH_AGCH ('10010'B), RSL_CHAN_NR_OSMO_PDCH ('11000'B), - RSL_CHAN_NR_OSMO_CBCH ('11001'B) + RSL_CHAN_NR_OSMO_CBCH4 ('11001'B), + RSL_CHAN_NR_OSMO_CBCH8 ('11010'B) } with { variant "FIELDLENGTH(5)" variant "FIELDORDER(msb)" }; type record RslChanNr2 { @@ -115,7 +116,8 @@ template RslChannelNr t_RslChanNr_PCH_AGCH(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_PCH_AGCH); template RslChannelNr t_RslChanNr_Bm(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_Bm_ACCH); template RslChannelNr t_RslChanNr_PDCH(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_OSMO_PDCH); - template RslChannelNr t_RslChanNr_CBCH(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH); + template RslChannelNr t_RslChanNr_CBCH4(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH4); + template RslChannelNr t_RslChanNr_CBCH8(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH8); template RslChannelNr t_RslChanNr_Lm(template uint3_t tn, template uint1_t sub_slot) := { u := { lm := { tag := '0001'B, sub_chan := sub_slot } }, tn := tn @@ -138,7 +140,8 @@ template (value) RslChannelNr ts_RslChanNr_PCH_AGCH(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_PCH_AGCH); template (value) RslChannelNr ts_RslChanNr_Bm(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_Bm_ACCH); template (value) RslChannelNr ts_RslChanNr_PDCH(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_OSMO_PDCH); - template (value) RslChannelNr ts_RslChanNr_CBCH(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH); + template (value) RslChannelNr ts_RslChanNr_CBCH4(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH4); + template (value) RslChannelNr ts_RslChanNr_CBCH8(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH8); template (value) RslChannelNr ts_RslChanNr_Lm(uint3_t tn, uint1_t sub_slot) := { u := { lm := { tag := '0001'B, sub_chan := sub_slot } }, tn := tn -- To view, visit https://gerrit.osmocom.org/14205 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I48908058ac2501a3b5ae7c74e4e8527cbaee1b01 Gerrit-Change-Number: 14205 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 15:33:59 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 15:33:59 +0000 Subject: Change in libosmocore[master]: rsl: Add osmocom-specific extensions to RSL channel numbers for CBCH In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14199 ) Change subject: rsl: Add osmocom-specific extensions to RSL channel numbers for CBCH ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14199 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I93e557358cf1c1b622f77f906959df7ca6d5cb12 Gerrit-Change-Number: 14199 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Mon, 27 May 2019 15:33:59 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 15:35:40 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 May 2019 15:35:40 +0000 Subject: Change in osmo-sgsn[master]: sgsn: vty: Improve log warning content with spec section Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14206 Change subject: sgsn: vty: Improve log warning content with spec section ...................................................................... sgsn: vty: Improve log warning content with spec section Change-Id: I68e87f29711a282a97a43b175f13b3c70112ab60 --- M src/gprs/sgsn_vty.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/06/14206/1 diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c index c01de3b..6389d92 100644 --- a/src/gprs/sgsn_vty.c +++ b/src/gprs/sgsn_vty.c @@ -381,7 +381,7 @@ ggc->echo_interval = atoi(argv[1]); if (ggc->echo_interval < 60) - vty_out(vty, "%% 3GPP TS 29.060 section states inteval should " \ + vty_out(vty, "%% 3GPP TS 29.060 section 7.2.1 states interval should " \ "not be lower than 60 seconds, use this value for " \ "testing purposes only!%s", VTY_NEWLINE); -- To view, visit https://gerrit.osmocom.org/14206 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I68e87f29711a282a97a43b175f13b3c70112ab60 Gerrit-Change-Number: 14206 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 15:42:41 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 15:42:41 +0000 Subject: Change in osmocom-bb[master]: trxcon: Use RSL channel mode #defines from libosmogsm Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14207 Change subject: trxcon: Use RSL channel mode #defines from libosmogsm ...................................................................... trxcon: Use RSL channel mode #defines from libosmogsm Wherever possible, use #defines from libosmogsm as opposed to magic numbers. Using magic numbers in several places has the danger of different programs/repositories having different views on what those values mean. Change-Id: I7ab4958801b3422973b67ff0452b90afa8a3f501 Related: OS#4027 Depends: libosmocore Change-Id I93e557358cf1c1b622f77f906959df7ca6d5cb12 --- M src/host/trxcon/sched_lchan_desc.c M src/host/trxcon/sched_trx.c 2 files changed, 18 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/07/14207/1 diff --git a/src/host/trxcon/sched_lchan_desc.c b/src/host/trxcon/sched_lchan_desc.c index ee712d5..8bc336e 100644 --- a/src/host/trxcon/sched_lchan_desc.c +++ b/src/host/trxcon/sched_lchan_desc.c @@ -23,6 +23,7 @@ * */ +#include #include "sched_trx.h" /* Forward declaration of handlers */ @@ -94,31 +95,31 @@ }, { TRXC_BCCH, "BCCH", - 0x80, TRX_CH_LID_DEDIC, + RSL_CHAN_BCCH, TRX_CH_LID_DEDIC, 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_AUTO, rx_data_fn, NULL, }, { TRXC_RACH, "RACH", - 0x88, TRX_CH_LID_DEDIC, + RSL_CHAN_RACH, TRX_CH_LID_DEDIC, 0x00, TRX_CH_FLAG_AUTO, NULL, tx_rach_fn, }, { TRXC_CCCH, "CCCH", - 0x90, TRX_CH_LID_DEDIC, + RSL_CHAN_PCH_AGCH, TRX_CH_LID_DEDIC, 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_AUTO, rx_data_fn, NULL, }, { TRXC_TCHF, "TCH/F", - 0x08, TRX_CH_LID_DEDIC, + RSL_CHAN_Bm_ACCHs, TRX_CH_LID_DEDIC, 8 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, rx_tchf_fn, tx_tchf_fn, }, { TRXC_TCHH_0, "TCH/H(0)", - 0x10, TRX_CH_LID_DEDIC, + RSL_CHAN_Lm_ACCHs, TRX_CH_LID_DEDIC, 6 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, rx_tchh_fn, tx_tchh_fn, }, @@ -292,25 +293,25 @@ }, { TRXC_PDTCH, "PDTCH", - 0xc0, TRX_CH_LID_DEDIC, + RSL_CHAN_OSMO_PDCH, TRX_CH_LID_DEDIC, 12 * GSM_BURST_PL_LEN, TRX_CH_FLAG_PDCH, rx_pdtch_fn, tx_pdtch_fn, }, { TRXC_PTCCH, "PTCCH", - 0xc0, TRX_CH_LID_DEDIC, + RSL_CHAN_OSMO_PDCH, TRX_CH_LID_DEDIC, 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_PDCH, rx_data_fn, tx_data_fn, }, [TRXC_SDCCH4_CBCH] = { TRXC_SDCCH4_CBCH, "SDCCH/4(CBCH)", - 0xc8, TRX_CH_LID_DEDIC, + RSL_CHAN_OSMO_CBCH4, TRX_CH_LID_DEDIC, 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_AUTO, rx_data_fn, NULL, }, [TRXC_SDCCH8_CBCH] = { TRXC_SDCCH8_CBCH, "SDCCH/8(CBCH)", - 0xd0, TRX_CH_LID_DEDIC, + RSL_CHAN_OSMO_CBCH8, TRX_CH_LID_DEDIC, 4 * GSM_BURST_PL_LEN, 0x00, rx_data_fn, NULL, }, diff --git a/src/host/trxcon/sched_trx.c b/src/host/trxcon/sched_trx.c index 6c3f557..fcaba52 100644 --- a/src/host/trxcon/sched_trx.c +++ b/src/host/trxcon/sched_trx.c @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -530,19 +531,19 @@ { uint8_t cbits = chan_nr >> 3; - if (cbits == 0x01) + if (cbits == ABIS_RSL_CHAN_NR_CBITS_Bm_ACCHs) return GSM_PCHAN_TCH_F; - else if ((cbits & 0x1e) == 0x02) + else if ((cbits & 0x1e) == ABIS_RSL_CHAN_NR_CBITS_Lm_ACCHs(0)) return GSM_PCHAN_TCH_H; - else if ((cbits & 0x1c) == 0x04) + else if ((cbits & 0x1c) == ABIS_RSL_CHAN_NR_CBITS_SDCCH4_ACCH(0)) return GSM_PCHAN_CCCH_SDCCH4; - else if ((cbits & 0x18) == 0x08) + else if ((cbits & 0x18) == ABIS_RSL_CHAN_NR_CBITS_SDCCH8_ACCH(0)) return GSM_PCHAN_SDCCH8_SACCH8C; - else if ((cbits & 0x1f) == 0x18) + else if ((cbits & 0x1f) == ABIS_RSL_CHAN_NR_CBITS_OSMO_PDCH) return GSM_PCHAN_TCH_F_TCH_H_PDCH; - else if ((cbits & 0x1f) == 0x19) + else if ((cbits & 0x1f) == ABIS_RSL_CHAN_NR_CBITS_OSMO_CBCH4) return GSM_PCHAN_CCCH_SDCCH4_CBCH; - else if ((cbits & 0x1f) == 0x1a) + else if ((cbits & 0x1f) == ABIS_RSL_CHAN_NR_CBITS_OSMO_CBCH8) return GSM_PCHAN_SDCCH8_SACCH8C_CBCH; return GSM_PCHAN_NONE; -- To view, visit https://gerrit.osmocom.org/14207 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I7ab4958801b3422973b67ff0452b90afa8a3f501 Gerrit-Change-Number: 14207 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 15:43:45 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 May 2019 15:43:45 +0000 Subject: Change in libosmocore[master]: fsm: Allow millisecond granularity in osmo_fsm built-in timer In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14200 ) Change subject: fsm: Allow millisecond granularity in osmo_fsm built-in timer ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14200 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I35b330e460e80bb67376c77e997e464439ac5397 Gerrit-Change-Number: 14200 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 27 May 2019 15:43:45 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 15:46:31 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 15:46:31 +0000 Subject: Change in osmocom-bb[master]: trxcon: Fix CBCH related RSL channel numbers In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14202 ) Change subject: trxcon: Fix CBCH related RSL channel numbers ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/14202/2/src/host/trxcon/sched_trx.c File src/host/trxcon/sched_trx.c: https://gerrit.osmocom.org/#/c/14202/2/src/host/trxcon/sched_trx.c at 542 PS2, Line 542: GSM_PCHAN_TCH_F_TCH_H_PDCH not sure if this particular line is correct. @fixeria? -- To view, visit https://gerrit.osmocom.org/14202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia9a415628c659cbc2dd5dc65b875b7f935d6e211 Gerrit-Change-Number: 14202 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Assignee: fixeria Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: fixeria Gerrit-Comment-Date: Mon, 27 May 2019 15:46:31 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 15:46:48 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 May 2019 15:46:48 +0000 Subject: Change in osmocom-bb[master]: trxcon: Fix CBCH related RSL channel numbers In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14202 ) Change subject: trxcon: Fix CBCH related RSL channel numbers ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/14202/2//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/#/c/14202/2//COMMIT_MSG at 11 PS2, Line 11: bring everyone in agreement. So can you please add here which value is now used for CBCH? 0x1a? -- To view, visit https://gerrit.osmocom.org/14202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia9a415628c659cbc2dd5dc65b875b7f935d6e211 Gerrit-Change-Number: 14202 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Assignee: fixeria Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Pau Espin Pedrol Gerrit-CC: fixeria Gerrit-Comment-Date: Mon, 27 May 2019 15:46:48 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 15:47:02 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 15:47:02 +0000 Subject: Change in osmo-sgsn[master]: sgsn: vty: Improve log warning content with spec section In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14206 ) Change subject: sgsn: vty: Improve log warning content with spec section ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14206 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I68e87f29711a282a97a43b175f13b3c70112ab60 Gerrit-Change-Number: 14206 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 27 May 2019 15:47:02 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 15:47:03 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 15:47:03 +0000 Subject: Change in osmo-sgsn[master]: sgsn: vty: Improve log warning content with spec section In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14206 ) Change subject: sgsn: vty: Improve log warning content with spec section ...................................................................... sgsn: vty: Improve log warning content with spec section Change-Id: I68e87f29711a282a97a43b175f13b3c70112ab60 --- M src/gprs/sgsn_vty.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c index c01de3b..6389d92 100644 --- a/src/gprs/sgsn_vty.c +++ b/src/gprs/sgsn_vty.c @@ -381,7 +381,7 @@ ggc->echo_interval = atoi(argv[1]); if (ggc->echo_interval < 60) - vty_out(vty, "%% 3GPP TS 29.060 section states inteval should " \ + vty_out(vty, "%% 3GPP TS 29.060 section 7.2.1 states interval should " \ "not be lower than 60 seconds, use this value for " \ "testing purposes only!%s", VTY_NEWLINE); -- To view, visit https://gerrit.osmocom.org/14206 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I68e87f29711a282a97a43b175f13b3c70112ab60 Gerrit-Change-Number: 14206 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 15:47:12 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 May 2019 15:47:12 +0000 Subject: Change in osmocom-bb[master]: virt_phy: Fix typo in log message In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14203 ) Change subject: virt_phy: Fix typo in log message ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14203 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9291957ef5d7033d46060d07f2aa0a3880612e1a Gerrit-Change-Number: 14203 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 27 May 2019 15:47:12 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 15:47:14 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 15:47:14 +0000 Subject: Change in osmo-bts[master]: Fix passing of RR SUSPEND REQ from DCCH to PCU socket In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14193 ) Change subject: Fix passing of RR SUSPEND REQ from DCCH to PCU socket ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14193 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic75486f8edaefa9c07bd92515ba1832b1c482fa6 Gerrit-Change-Number: 14193 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Mon, 27 May 2019 15:47:14 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 15:47:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 15:47:16 +0000 Subject: Change in osmo-bts[master]: Fix passing of RR SUSPEND REQ from DCCH to PCU socket In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14193 ) Change subject: Fix passing of RR SUSPEND REQ from DCCH to PCU socket ...................................................................... Fix passing of RR SUSPEND REQ from DCCH to PCU socket The existing code ssumed that the RR SUSPEND REQ would be a LAPDm/RSL unitdata request. I couldn't find any spec reference that would support this. Rather, the message is sent via the normal main dedicated channel, which is operated in ABM mode. As the somewhat similar check for diverting measurement results is in fact looking for UNITDATA, we have to untangle this slightly. Change-Id: Ic75486f8edaefa9c07bd92515ba1832b1c482fa6 Related: OS#2249 Related: OS#4023 --- M src/common/rsl.c 1 file changed, 33 insertions(+), 9 deletions(-) Approvals: Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve Pau Espin Pedrol: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/common/rsl.c b/src/common/rsl.c index f8c7daa..f76a006 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -2642,7 +2642,17 @@ return 0; } -static int rslms_get_meas_msg_type(struct msgb *msg, bool rllh_link_id_is_sacch) +static int rslms_get_rll_msg_type(struct msgb *msg) +{ + struct abis_rsl_common_hdr *rh = msgb_l2(msg); + + if ((rh->msg_discr & 0xfe) != ABIS_RSL_MDISC_RLL) + return -1; + + return rh->msg_type; +} + +static int rslms_get_rr_msg_type(struct msgb *msg, bool rllh_link_id_is_sacch) { struct abis_rsl_common_hdr *rh = msgb_l2(msg); struct abis_rsl_rll_hdr *rllh; @@ -2651,8 +2661,6 @@ if ((rh->msg_discr & 0xfe) != ABIS_RSL_MDISC_RLL) return -1; - if (rh->msg_type != RSL_MT_UNIT_DATA_IND) - return -2; rllh = msgb_l2(msg); if (rsl_link_id_is_sacch(rllh->link_id) != rllh_link_id_is_sacch) @@ -2665,23 +2673,39 @@ return gh->msg_type; } -static int rslms_is_meas_rep(struct msgb *msg) +static bool rslms_is_meas_rep(struct msgb *msg) { - switch (rslms_get_meas_msg_type(msg, 1)) { + int rll_msg_type = rslms_get_rll_msg_type(msg); + int rr_msg_type; + + if (rll_msg_type != RSL_MT_UNIT_DATA_IND) + return false; + + rr_msg_type = rslms_get_rr_msg_type(msg, 1); + + switch (rr_msg_type) { case GSM48_MT_RR_MEAS_REP: case GSM48_MT_RR_EXT_MEAS_REP: - return 1; + return true; } /* FIXME: this does not cover the Bter frame format and the associated * short RR protocol descriptor for ENHANCED MEASUREMENT REPORT */ - return 0; + return false; } -static int rslms_is_gprs_susp_req(struct msgb *msg) +static bool rslms_is_gprs_susp_req(struct msgb *msg) { - return rslms_get_meas_msg_type(msg, 0) == GSM48_MT_RR_GPRS_SUSP_REQ; + int rll_msg_type = rslms_get_rll_msg_type(msg); + int rr_msg_type; + + if (rll_msg_type != RSL_MT_DATA_IND) + return false; + + rr_msg_type = rslms_get_rr_msg_type(msg, false); + + return rr_msg_type == GSM48_MT_RR_GPRS_SUSP_REQ; } /* TS 44.018 9.1.13b GPRS suspension request */ -- To view, visit https://gerrit.osmocom.org/14193 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ic75486f8edaefa9c07bd92515ba1832b1c482fa6 Gerrit-Change-Number: 14193 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 15:47:49 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 15:47:49 +0000 Subject: Change in osmo-ggsn[master]: ggsn: Start gtp retrans timer during startup In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14201 ) Change subject: ggsn: Start gtp retrans timer during startup ...................................................................... Patch Set 1: Code-Review+1 let's first introduce a test and then fix it with this commit? -- To view, visit https://gerrit.osmocom.org/14201 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie4adc52829446539fbbb5e9e0cf75a04f91c7eea Gerrit-Change-Number: 14201 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 27 May 2019 15:47:49 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 15:48:42 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 May 2019 15:48:42 +0000 Subject: Change in osmo-ttcn3-hacks[master]: L1CTL: Add support for CCCH_MODE_COMBINED_CBCH In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14204 ) Change subject: L1CTL: Add support for CCCH_MODE_COMBINED_CBCH ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14204 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I27ee2c81bec7175c1ea09d4f3f6037f2866fe242 Gerrit-Change-Number: 14204 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 27 May 2019 15:48:42 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 15:50:23 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 May 2019 15:50:23 +0000 Subject: Change in libosmocore[master]: rsl: Add osmocom-specific extensions to RSL channel numbers for CBCH In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14199 ) Change subject: rsl: Add osmocom-specific extensions to RSL channel numbers for CBCH ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14199 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I93e557358cf1c1b622f77f906959df7ca6d5cb12 Gerrit-Change-Number: 14199 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 27 May 2019 15:50:23 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 15:51:06 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 May 2019 15:51:06 +0000 Subject: Change in osmocom-bb[master]: trxcon: Use RSL channel mode #defines from libosmogsm In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14207 ) Change subject: trxcon: Use RSL channel mode #defines from libosmogsm ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14207 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I7ab4958801b3422973b67ff0452b90afa8a3f501 Gerrit-Change-Number: 14207 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 27 May 2019 15:51:06 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 16:25:25 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 16:25:25 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add test ensuring only one connection to PCU interface accepted Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14208 Change subject: bts: Add test ensuring only one connection to PCU interface accepted ...................................................................... bts: Add test ensuring only one connection to PCU interface accepted This adds TC_pcu_socket_connect_multi, which verifies that a second connection to the PCU Intrerface socket is denied while the first connection is still established. Change-Id: Ib484a0a39e719cb2ce00a9464fc1207357ec9e93 Related: OS#4023 --- M bts/BTS_Tests.ttcn 1 file changed, 26 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/08/14208/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 47c16c2..2885628 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -50,6 +50,7 @@ import from PCUIF_Types all; import from PCUIF_CodecPort all; +import from UD_Types all; import from MobileL3_CommonIE_Types all; import from MobileL3_RRM_Types all; @@ -3896,6 +3897,30 @@ vc_conn.done; } +/* Ensure that PCUIF socket can accept only a single connection */ +testcase TC_pcu_socket_connect_multi() runs on test_CT { + timer T := 5.0; + + /* this (among other things) establishes the first connection to the PCUIF socket */ + f_init(); + + /* try to establish a second connection, expect it to fail */ + PCU.send(UD_connect:{mp_pcu_socket, -1}); + T.start; + alt { + [] PCU.receive(UD_connect_result:{id := ?, result := { result_code := ERROR, err := ? }}) { + setverdict(pass); + } + [] PCU.receive(UD_connect_result:?) { + setverdict(fail, "Unexpected unix domain connect result"); + } + [] T.timeout { + setverdict(pass); + } + } + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + /*********************************************************************** * Osmocom Style Dynamic Timeslot Support @@ -5204,6 +5229,7 @@ execute( TC_pcu_rts_req() ); execute( TC_pcu_oml_alert() ); execute( TC_pcu_rr_suspend() ); + execute( TC_pcu_socket_connect_multi() ); } else { log("PCU socket path not available, skipping PCU tests"); } -- To view, visit https://gerrit.osmocom.org/14208 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ib484a0a39e719cb2ce00a9464fc1207357ec9e93 Gerrit-Change-Number: 14208 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 16:25:25 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 16:25:25 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Verify PCU socket can disconnect + re-connect Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14209 Change subject: bts: Verify PCU socket can disconnect + re-connect ...................................................................... bts: Verify PCU socket can disconnect + re-connect Change-Id: Ic69c3f34405012d42319bd9752f875071aae2243 Related: OS#4023 --- M bts/BTS_Tests.ttcn M library/PCUIF_CodecPort.ttcn 2 files changed, 26 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/09/14209/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 2885628..6786d68 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -3921,6 +3921,26 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } +/* Ensure that PCUIF socket can disconnect + reconnect */ +testcase TC_pcu_socket_reconnect() runs on test_CT { + /* this (among other things) establishes the first connection to the PCUIF socket */ + f_init(); + + f_sleep(1.0); + + f_pcuif_close(PCU, g_pcu_conn_id); + g_pcu_conn_id := -1; + + f_sleep(1.0); + + /* re-connect */ + PCU.clear; + f_init_pcu(PCU, testcasename(), g_pcu_conn_id, g_pcu_last_info); + setverdict(pass); + + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + /*********************************************************************** * Osmocom Style Dynamic Timeslot Support @@ -5230,6 +5250,7 @@ execute( TC_pcu_oml_alert() ); execute( TC_pcu_rr_suspend() ); execute( TC_pcu_socket_connect_multi() ); + execute( TC_pcu_socket_reconnect() ); } else { log("PCU socket path not available, skipping PCU tests"); } diff --git a/library/PCUIF_CodecPort.ttcn b/library/PCUIF_CodecPort.ttcn index 91f9bf9..3d6ceac 100644 --- a/library/PCUIF_CodecPort.ttcn +++ b/library/PCUIF_CodecPort.ttcn @@ -94,6 +94,11 @@ return -23; } +function f_pcuif_close(PCUIF_CODEC_PT pt, integer id) +{ + pt.send(UD_close:{id := id}); +} + function f_pcuif_listen(PCUIF_CODEC_PT pt, charstring sock) return integer { var UD_listen_result res; var UD_connected udc; -- To view, visit https://gerrit.osmocom.org/14209 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ic69c3f34405012d42319bd9752f875071aae2243 Gerrit-Change-Number: 14209 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 17:10:26 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 May 2019 17:10:26 +0000 Subject: Change in osmo-sgsn[master]: sgsn: Fix echo timer not started upon first pdp ctx created Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14210 Change subject: sgsn: Fix echo timer not started upon first pdp ctx created ...................................................................... sgsn: Fix echo timer not started upon first pdp ctx created Commit 176a4d2f33865a5c0433f8679f5e68f209d7b874 moved echo timer related code to its own function but did some mistakes when moving the logic from several places into its own function. As a result, echo timer was only enabled after the 2nd pdp ctx was created, instead of the expected 1st. First, let's be consistent and always call the function *after* changing state, since that's what the function expects. This fixes the issue. Finally make the logic in the function more intuitive by checking in the if clause the only case where actually the echo timer should be enabled: Only if policy specifies so and we have at least 1 pdp ctx against that ggsn. Fixes: 176a4d2f33865a5c0433f8679f5e68f209d7b874 Change-Id: I826030978edb61ea5a172c2b72f63758206a6246 --- M src/gprs/gprs_sgsn.c 1 file changed, 9 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/10/14210/1 diff --git a/src/gprs/gprs_sgsn.c b/src/gprs/gprs_sgsn.c index 01f039a..f725811 100644 --- a/src/gprs/gprs_sgsn.c +++ b/src/gprs/gprs_sgsn.c @@ -492,12 +492,15 @@ void sgsn_ggsn_ctx_check_echo_timer(struct sgsn_ggsn_ctx *ggc) { - if (llist_empty(&ggc->pdp_list) || ggc->echo_interval <= 0) { - if (osmo_timer_pending(&ggc->echo_timer)) - osmo_timer_del(&ggc->echo_timer); - } else { - if (!osmo_timer_pending(&ggc->echo_timer)) + bool pending = osmo_timer_pending(&ggc->echo_timer); + + /* Only enable if allowed by policy and at least 1 pdp ctx exists against ggsn */ + if (!llist_empty(&ggc->pdp_list) && ggc->echo_interval > 0) { + if (!pending) osmo_timer_schedule(&ggc->echo_timer, ggc->echo_interval, 0); + } else { + if (pending) + osmo_timer_del(&ggc->echo_timer); } } @@ -754,9 +757,8 @@ void sgsn_ggsn_ctx_add_pdp(struct sgsn_ggsn_ctx *ggc, struct sgsn_pdp_ctx *pdp) { - sgsn_ggsn_ctx_check_echo_timer(ggc); - llist_add(&pdp->ggsn_list, &ggc->pdp_list); + sgsn_ggsn_ctx_check_echo_timer(ggc); } void sgsn_ggsn_ctx_remove_pdp(struct sgsn_ggsn_ctx *ggc, struct sgsn_pdp_ctx *pdp) { -- To view, visit https://gerrit.osmocom.org/14210 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I826030978edb61ea5a172c2b72f63758206a6246 Gerrit-Change-Number: 14210 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 17:12:59 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 May 2019 17:12:59 +0000 Subject: Change in osmo-ggsn[master]: gtp: Take queue_resp into account to schedule retrans timer Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14211 Change subject: gtp: Take queue_resp into account to schedule retrans timer ...................................................................... gtp: Take queue_resp into account to schedule retrans timer Before this patch they were not taken into account, which means some resp messages could stay more time than required enqueued. Change-Id: Iebf405b2310a34785f3b363cc2a9f415281f6030 --- M gtp/gtp.c 1 file changed, 15 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/11/14211/1 diff --git a/gtp/gtp.c b/gtp/gtp.c index b98fba0..b50b592 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -590,22 +590,34 @@ int gtp_retranstimeout(struct gsn_t *gsn, struct timeval *timeout) { - time_t now, later; + time_t now, later, diff; struct qmsg_t *qmsg; + timeout->tv_usec = 0; if (queue_getfirst(gsn->queue_req, &qmsg)) { timeout->tv_sec = 10; - timeout->tv_usec = 0; } else { now = time(NULL); later = qmsg->timeout; timeout->tv_sec = later - now; - timeout->tv_usec = 0; if (timeout->tv_sec < 0) timeout->tv_sec = 0; /* No negative allowed */ if (timeout->tv_sec > 10) timeout->tv_sec = 10; /* Max sleep for 10 sec */ } + + if (queue_getfirst(gsn->queue_resp, &qmsg)) { + /* already set by queue_req, do nothing */ + } else { /* trigger faster if earlier timeout exists in queue_resp */ + now = time(NULL); + later = qmsg->timeout; + diff = later - now; + if (diff < 0) + diff = 0; + if (diff < timeout->tv_sec) + timeout->tv_sec = diff; + } + return 0; } -- To view, visit https://gerrit.osmocom.org/14211 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Iebf405b2310a34785f3b363cc2a9f415281f6030 Gerrit-Change-Number: 14211 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 17:26:04 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 27 May 2019 17:26:04 +0000 Subject: Change in osmocom-bb[master]: trxcon: Fix CBCH related RSL channel numbers In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14202 ) Change subject: trxcon: Fix CBCH related RSL channel numbers ...................................................................... Patch Set 2: Code-Review-1 (2 comments) https://gerrit.osmocom.org/#/c/14202/2//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/#/c/14202/2//COMMIT_MSG at 11 PS2, Line 11: bring everyone in agreement. > So can you please add here which value is now used for CBCH? 0x1a? It can be seen from the code I think. https://gerrit.osmocom.org/#/c/14202/2/src/host/trxcon/sched_trx.c File src/host/trxcon/sched_trx.c: https://gerrit.osmocom.org/#/c/14202/2/src/host/trxcon/sched_trx.c at 542 PS2, Line 542: GSM_PCHAN_TCH_F_TCH_H_PDCH > not sure if this particular line is correct. [?] I don't think we really need to support dynamic TCH/PDCH channels in trxcon. It makes a lot of sense on the BTS side, but not on the MS side ;) Moreover, there is no such pchan definition in sched_mframe.c. I'll remove it in the next patch set. -- To view, visit https://gerrit.osmocom.org/14202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia9a415628c659cbc2dd5dc65b875b7f935d6e211 Gerrit-Change-Number: 14202 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Assignee: fixeria Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Pau Espin Pedrol Gerrit-CC: fixeria Gerrit-Comment-Date: Mon, 27 May 2019 17:26:04 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 18:06:02 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 May 2019 18:06:02 +0000 Subject: Change in docker-playground[master]: ttcn3-bscnat: Prepare cfgs for VTY & Osmux support In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14130 ) Change subject: ttcn3-bscnat: Prepare cfgs for VTY & Osmux support ...................................................................... Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/14130 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I794a17bdeaff9ab9316d7a6acb1e58dfd815b645 Gerrit-Change-Number: 14130 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 27 May 2019 18:06:02 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 18:06:06 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 May 2019 18:06:06 +0000 Subject: Change in docker-playground[master]: ttcn3-bscnat: Prepare cfgs for VTY & Osmux support In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/14130 ) Change subject: ttcn3-bscnat: Prepare cfgs for VTY & Osmux support ...................................................................... ttcn3-bscnat: Prepare cfgs for VTY & Osmux support * Adding "osmux on" for each BSC will be required to enable Osmux later on, but still it doesn't change behavior now because Osmux must be enabled globally too (will be done through VTY). * Set up correct bind and remote IP addr to have VTY working later on. * Use extended timestamp to have subsecond accuracy to match with pcap easily. Change-Id: I794a17bdeaff9ab9316d7a6acb1e58dfd815b645 --- M ttcn3-bscnat-test/BSCNAT_Tests.cfg M ttcn3-bscnat-test/bscs.config M ttcn3-bscnat-test/osmo-bsc-nat.cfg 3 files changed, 6 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Pau Espin Pedrol: Verified diff --git a/ttcn3-bscnat-test/BSCNAT_Tests.cfg b/ttcn3-bscnat-test/BSCNAT_Tests.cfg index d23178f..e6b544c 100644 --- a/ttcn3-bscnat-test/BSCNAT_Tests.cfg +++ b/ttcn3-bscnat-test/BSCNAT_Tests.cfg @@ -6,6 +6,7 @@ *.JUnitLogger.testsuite_name := "BSCNAT_Tests" [TESTPORT_PARAMETERS] +*.BSCNATVTY.CTRL_HOSTNAME := "172.18.15.20" [MODULE_PARAMETERS] mp_bsc_port := 49999; diff --git a/ttcn3-bscnat-test/bscs.config b/ttcn3-bscnat-test/bscs.config index 6afa09b..16cfa2b 100644 --- a/ttcn3-bscnat-test/bscs.config +++ b/ttcn3-bscnat-test/bscs.config @@ -5,15 +5,18 @@ description bsc max-endpoints 32 paging forbidden 0 + osmux on bsc 1 token BSC1 location_area_code 2 description bsc max-endpoints 32 paging forbidden 0 + osmux on bsc 2 token BSC2 location_area_code 3 description bsc max-endpoints 32 paging forbidden 0 + osmux on diff --git a/ttcn3-bscnat-test/osmo-bsc-nat.cfg b/ttcn3-bscnat-test/osmo-bsc-nat.cfg index bca4628..ffc3ff0 100644 --- a/ttcn3-bscnat-test/osmo-bsc-nat.cfg +++ b/ttcn3-bscnat-test/osmo-bsc-nat.cfg @@ -7,10 +7,12 @@ logging color 0 logging print category 1 logging timestamp 1 + logging print extended-timestamp 1 logging level force-all debug ! line vty no login + bind 0.0.0.0 ! mgcp bind ip 172.18.15.20 -- To view, visit https://gerrit.osmocom.org/14130 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I794a17bdeaff9ab9316d7a6acb1e58dfd815b645 Gerrit-Change-Number: 14130 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 18:06:15 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 27 May 2019 18:06:15 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bsc-nat: Introduce Osmux test In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/14142 ) Change subject: bsc-nat: Introduce Osmux test ...................................................................... bsc-nat: Introduce Osmux test Depends: openbsc.git Iadc004064a5a237c93009f242cb943ebc4d2d7e6 Change-Id: I35f206aab713ccf0a4e074872e291c349c903b9d --- M bsc-nat/BSCNAT_Tests.default M bsc-nat/BSCNAT_Tests.ttcn M bsc-nat/BSC_MS_ConnectionHandler.ttcn M bsc-nat/BSC_MS_Simulation.ttcn M bsc-nat/gen_links.sh M bsc-nat/regen_makefile.sh 6 files changed, 80 insertions(+), 12 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/bsc-nat/BSCNAT_Tests.default b/bsc-nat/BSCNAT_Tests.default index 37c1048..3374bcf 100644 --- a/bsc-nat/BSCNAT_Tests.default +++ b/bsc-nat/BSCNAT_Tests.default @@ -4,8 +4,19 @@ [TESTPORT_PARAMETERS] #*.*.udpReuseAddress := "yes"; +*.BSCNATVTY.CTRL_MODE := "client" +*.BSCNATVTY.CTRL_HOSTNAME := "127.0.0.1" +*.BSCNATVTY.CTRL_PORTNUM := "4244" +*.BSCNATVTY.CTRL_LOGIN_SKIPPED := "yes" +*.BSCNATVTY.CTRL_DETECT_SERVER_DISCONNECTED := "yes" +*.BSCNATVTY.CTRL_READMODE := "buffered" +*.BSCNATVTY.CTRL_CLIENT_CLEANUP_LINEFEED := "yes" +*.BSCNATVTY.CTRL_DETECT_CONNECTION_ESTABLISHMENT_RESULT := "yes" +*.BSCNATVTY.PROMPT1 := "OsmoBSCNAT> " + [MODULE_PARAMETERS] +Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoBSCNAT"; mp_bsc_port := 49999; mp_bsc_ip := "127.0.0.1"; mp_msc_port := 5100; @@ -22,4 +33,3 @@ mp_mgw_udp_port := 2427; [EXECUTE] - diff --git a/bsc-nat/BSCNAT_Tests.ttcn b/bsc-nat/BSCNAT_Tests.ttcn index b9b031f..2fab4a3 100644 --- a/bsc-nat/BSCNAT_Tests.ttcn +++ b/bsc-nat/BSCNAT_Tests.ttcn @@ -26,6 +26,9 @@ import from MSC_Simulation all; import from BSC_MS_Simulation all; +import from Osmocom_VTY_Functions all; +import from TELNETasp_PortType all; + const integer NUM_MSC := 1; const integer NUM_BSC := 1; @@ -46,6 +49,8 @@ var MscState msc[NUM_MSC]; var BscState bsc[NUM_BSC]; + port TELNETasp_PT BSCNATVTY; + var boolean g_initialized := false; var octetstring g_sio := '83'O; } @@ -112,10 +117,31 @@ msc_st.sccp_addr_own := valueof(ts_SccpAddr_PC_SSN(opc, local_ssn)); } -function f_init() runs on test_CT { +function f_vty_allow_osmux(boolean allow) runs on test_CT { + if (allow) { + f_vty_config(BSCNATVTY, "mgcp", "osmux on"); + } else { + f_vty_config(BSCNATVTY, "mgcp", "osmux off"); + } +} + +function f_init_vty(charstring id := "foo") runs on test_CT { + if (BSCNATVTY.checkstate("Mapped")) { + /* skip initialization if already executed once */ + return; + } + map(self:BSCNATVTY, system:BSCNATVTY); + f_vty_set_prompts(BSCNATVTY); + f_vty_transceive(BSCNATVTY, "enable"); +} + +function f_init(boolean use_osmux) runs on test_CT { var integer i; var charstring id; + f_init_vty("VirtBSCNAT"); + f_vty_allow_osmux(use_osmux); + for (i := 0; i < NUM_MSC; i := i+1) { f_init_MscState(msc[i], mp_msc_pc +i, mp_bsc_pc, mp_msc_ssn, mp_bsc_ssn); id := "MSC" & int2str(i); @@ -125,22 +151,23 @@ /* Wait for bsc_nat to attach to MSC. Before that all BSC connections will be dropped */ f_sleep(5.0); + for (i := 0; i < NUM_BSC; i := i+1) { f_init_BscState(bsc[i], mp_bsc_pc +i, mp_msc_pc, mp_bsc_ssn, mp_msc_ssn); id := "BSC" & int2str(i); bsc[i].BSC := BSC_CT.create(id); bsc[i].BSC.start(BSC_MS_Simulation.main(mp_nat_ip, mp_nat_port, mp_bsc_ip, mp_bsc_port+i, bsc[i].sccp_pars, bsc[i].sccp_addr_own, - bsc[i].sccp_addr_peer, id)); + bsc[i].sccp_addr_peer, use_osmux, id)); } } -testcase TC_recv_dump() runs on test_CT { +function f_TC_recv_dump(boolean use_osmux := false) runs on test_CT { var integer i; timer T := 30.0; - f_init(); + f_init(use_osmux); alt { /* wait for BSC to stop. The idea is that the BSC components terminate first */ @@ -155,8 +182,17 @@ } } +testcase TC_recv_dump() runs on test_CT { + f_TC_recv_dump(); +} + +testcase TC_recv_dump_osmux() runs on test_CT { + f_TC_recv_dump(true); +} + control { execute( TC_recv_dump() ); + execute( TC_recv_dump_osmux() ); } } diff --git a/bsc-nat/BSC_MS_ConnectionHandler.ttcn b/bsc-nat/BSC_MS_ConnectionHandler.ttcn index 7777f03..f9f4db0 100644 --- a/bsc-nat/BSC_MS_ConnectionHandler.ttcn +++ b/bsc-nat/BSC_MS_ConnectionHandler.ttcn @@ -63,6 +63,7 @@ decode_dtap := false, role_ms := true, protocol := RAN_PROTOCOL_BSSAP, + /* Always false. We don't want to enable Osmux signalling in SCCPLite messages: */ use_osmux := false, sccp_addr_local := omit, sccp_addr_peer := omit @@ -89,11 +90,12 @@ } /* main function processing various incoming events */ -function main(SCCP_PAR_Address sccp_addr_own, SCCP_PAR_Address sccp_addr_remote) +function main(SCCP_PAR_Address sccp_addr_own, SCCP_PAR_Address sccp_addr_remote, boolean use_osmux) runs on BSC_MS_ConnHdlr { var PDU_BSSAP bssap; var MgcpCommand mgcp_cmd; - var MgcpResponse mgcp_resp; + var template MgcpResponse mgcp_resp; + var MgcpOsmuxCID osmux_cid; log("Starting main of BSC_MS_ConnHdlr"); @@ -127,7 +129,19 @@ valueof(ts_SDP_ptime(20)) })); /* respond with CRCX_ACK */ g_state := BSC_STATE_WAIT_MDCX; - BSSAP.send(ts_CRCX_ACK(mgcp_cmd.line.trans_id, g_mgcp_conn_id, g_sdp)); + + if (use_osmux != f_MgcpCmd_contains_par(mgcp_cmd, "X-OSMUX")) { + setverdict(fail, log2str("Received Osmux CID presence doesn't match presence expectancy (", use_osmux, ")")); + self.stop; + } + + if (use_osmux) { + osmux_cid := f_MgcpCmd_extract_osmux_cid(mgcp_cmd); + mgcp_resp := ts_CRCX_ACK_osmux(mgcp_cmd.line.trans_id, g_mgcp_conn_id, osmux_cid, g_sdp); + } else { + mgcp_resp := ts_CRCX_ACK(mgcp_cmd.line.trans_id, g_mgcp_conn_id, g_sdp); + } + BSSAP.send(valueof(mgcp_resp)); } /* MDCX -> OK */ diff --git a/bsc-nat/BSC_MS_Simulation.ttcn b/bsc-nat/BSC_MS_Simulation.ttcn index ed6e92d..d4e37a4 100644 --- a/bsc-nat/BSC_MS_Simulation.ttcn +++ b/bsc-nat/BSC_MS_Simulation.ttcn @@ -33,6 +33,7 @@ var SCCP_PAR_Address g_sccp_addr_own; var SCCP_PAR_Address g_sccp_addr_remote; + var boolean g_use_osmux; var charstring g_bsc_num_str; } @@ -45,7 +46,8 @@ charstring local_ip, PortNumber local_port, MSC_SCCP_MTP3_parameters sccp_pars, SCCP_PAR_Address sccp_addr_own, - SCCP_PAR_Address sccp_addr_remote, charstring id) runs on BSC_CT + SCCP_PAR_Address sccp_addr_remote, + boolean use_osmux, charstring id) runs on BSC_CT { var integer i := 0; timer T := 1.0; @@ -54,6 +56,7 @@ g_sccp_addr_own := sccp_addr_own; g_sccp_addr_remote := sccp_addr_remote; + g_use_osmux := use_osmux; /* create components for IPA/SCCP/BSS[M]AP stack */ vc_IPA := IPA_Emulation_CT.create(id & "-IPA"); @@ -98,7 +101,7 @@ /* connect client BSSAP port to BSSAP dispatcher */ connect(vc_conn:BSSAP, vc_BSSMAP:CLIENT); /* start component */ - vc_conn.start(BSC_MS_ConnectionHandler.main(g_sccp_addr_own, g_sccp_addr_remote)); + vc_conn.start(BSC_MS_ConnectionHandler.main(g_sccp_addr_own, g_sccp_addr_remote, g_use_osmux)); /* blocking wait until component terminates. If you want to start MSs in parallel, * you have to remove this statement here */ vc_conn.done; diff --git a/bsc-nat/gen_links.sh b/bsc-nat/gen_links.sh index 7b7f928..01d4c7b 100755 --- a/bsc-nat/gen_links.sh +++ b/bsc-nat/gen_links.sh @@ -20,6 +20,11 @@ FILES="IPL4asp_Functions.ttcn IPL4asp_PT.cc IPL4asp_PT.hh IPL4asp_PortType.ttcn IPL4asp_Types.ttcn IPL4asp_discovery.cc IPL4asp_protocol_L234.hh" gen_links $DIR $FILES +# for Osmocom_VTY +DIR=$BASEDIR/titan.TestPorts.TELNETasp/src +FILES="TELNETasp_PT.cc TELNETasp_PT.hh TELNETasp_PortType.ttcn" +gen_links $DIR $FILES + # required by SCCP Emulation DIR=$BASEDIR/titan.TestPorts.MTP3asp/src FILES="MTP3asp_PortType.ttcn MTP3asp_Types.ttcn" @@ -47,7 +52,7 @@ gen_links $DIR $FILES DIR=../library -FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp L3_Templates.ttcn BSSMAP_Templates.ttcn RAN_Emulation.ttcnpp MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn BSSAP_CodecPort.ttcn" +FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp L3_Templates.ttcn BSSMAP_Templates.ttcn RAN_Emulation.ttcnpp MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc Osmocom_CTRL_Types.ttcn Osmocom_VTY_Functions.ttcn Osmocom_CTRL_Functions.ttcn BSSAP_CodecPort.ttcn" gen_links $DIR $FILES ignore_pp_results diff --git a/bsc-nat/regen_makefile.sh b/bsc-nat/regen_makefile.sh index f49df7e..0f3cfab 100755 --- a/bsc-nat/regen_makefile.sh +++ b/bsc-nat/regen_makefile.sh @@ -2,7 +2,7 @@ MAIN=BSCNAT_Tests.ttcn -FILES="*.ttcn *.ttcnpp SCCP_EncDec.cc IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc RTP_EncDec.cc SDP_EncDec.cc *.c MGCP_CodecPort_CtrlFunctDef.cc" +FILES="*.ttcn *.ttcnpp SCCP_EncDec.cc IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc RTP_EncDec.cc SDP_EncDec.cc *.c MGCP_CodecPort_CtrlFunctDef.cc TELNETasp_PT.cc" export CPPFLAGS_TTCN3="-DIPA_EMULATION_SCCP -DIPA_EMULATION_MGCP -DRAN_EMULATION_BSSAP -DRAN_EMULATION_MGCP -DUSE_MTP3_DISTRIBUTOR" -- To view, visit https://gerrit.osmocom.org/14142 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I35f206aab713ccf0a4e074872e291c349c903b9d Gerrit-Change-Number: 14142 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 18:49:26 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 27 May 2019 18:49:26 +0000 Subject: Change in libosmocore[master]: rsl: Add osmocom-specific extensions to RSL channel numbers for CBCH In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14199 ) Change subject: rsl: Add osmocom-specific extensions to RSL channel numbers for CBCH ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14199 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I93e557358cf1c1b622f77f906959df7ca6d5cb12 Gerrit-Change-Number: 14199 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Mon, 27 May 2019 18:49:26 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 20:40:22 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 20:40:22 +0000 Subject: Change in osmo-bts[master]: clear GPRS indicator in SI3 while PCU is disconnected In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/10170 ) Change subject: clear GPRS indicator in SI3 while PCU is disconnected ...................................................................... Patch Set 3: Code-Review-2 actually, this code gets it wrong. The SI3 manipulation must be done at every PCU connect/disconnect, not at the time the BSC sends the BCCH INFO. That step might only happen once on BTS boot/connect time, while PCU might come and go all day long (hopefully not) -- To view, visit https://gerrit.osmocom.org/10170 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1a6f5c636c0fe098ee31c280d4572a3f8122b44b Gerrit-Change-Number: 10170 Gerrit-PatchSet: 3 Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Stefan Sperling Gerrit-CC: Max Gerrit-Comment-Date: Mon, 27 May 2019 20:40:22 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 21:24:25 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 21:24:25 +0000 Subject: Change in libosmocore[master]: oap_client: Fix liense: GPLv2+ instead of AGPLv3+ Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14212 Change subject: oap_client: Fix liense: GPLv2+ instead of AGPLv3+ ...................................................................... oap_client: Fix liense: GPLv2+ instead of AGPLv3+ libosmo{core,gsm,vty} code is GPLv2+. The OAP code originated in osmo-msc.git and was moved here without changing the license. That was a mistake, it always was meant to be under GPLv2-or-later after moving to libosmocore.git. Copyright is with sysmocom, so I as the managing director can approve the license change. Change-Id: I08311fa8214c15f8df8945b9894226608cf96f15 --- M include/osmocom/gsm/oap_client.h M src/gsm/oap_client.c M tests/oap/oap_client_test.c 3 files changed, 16 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/12/14212/1 diff --git a/include/osmocom/gsm/oap_client.h b/include/osmocom/gsm/oap_client.h index 763f982..f94cc83 100644 --- a/include/osmocom/gsm/oap_client.h +++ b/include/osmocom/gsm/oap_client.h @@ -6,18 +6,19 @@ * Author: Neels Hofmeyr * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. + * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see . * + * SPDX-License-Identifier: GPL-2.0+ */ #pragma once diff --git a/src/gsm/oap_client.c b/src/gsm/oap_client.c index ea40634..a2974b5 100644 --- a/src/gsm/oap_client.c +++ b/src/gsm/oap_client.c @@ -6,18 +6,20 @@ * Author: Neels Hofmeyr * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. + * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see . * + * SPDX-License-Identifier: GPL-2.0+ + * */ #include diff --git a/tests/oap/oap_client_test.c b/tests/oap/oap_client_test.c index a841b38..dadf2ee 100644 --- a/tests/oap/oap_client_test.c +++ b/tests/oap/oap_client_test.c @@ -4,18 +4,19 @@ * All Rights Reserved * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. + * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see . * + * SPDX-License-Identifier: GPLv2+ */ #include -- To view, visit https://gerrit.osmocom.org/14212 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I08311fa8214c15f8df8945b9894226608cf96f15 Gerrit-Change-Number: 14212 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 21:25:04 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 21:25:04 +0000 Subject: Change in libosmocore[master]: tdef: Fix liense: GPLv2+ instead of AGPLv3+ Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14213 Change subject: tdef: Fix liense: GPLv2+ instead of AGPLv3+ ...................................................................... tdef: Fix liense: GPLv2+ instead of AGPLv3+ libosmo{core,gsm,vty} code is GPLv2+. The tdef code originated in osmo-msc.git and was moved here without changing the license. That was a mistake, it always was meant to be under GPLv2-or-later after moving to libosmocore.git. Copyright is with sysmocom, so I as the managing director can approve the license change. Change-Id: Ie483ff6f6ea0a56c477649677b4b163c49df11d7 --- M include/osmocom/vty/tdef_vty.h M src/tdef.c M src/vty/tdef_vty.c 3 files changed, 15 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/13/14213/1 diff --git a/include/osmocom/vty/tdef_vty.h b/include/osmocom/vty/tdef_vty.h index 16d9498..3027913 100644 --- a/include/osmocom/vty/tdef_vty.h +++ b/include/osmocom/vty/tdef_vty.h @@ -8,17 +8,19 @@ * All Rights Reserved * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. + * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see . + * + * SPDX-License-Identifier: GPL-2.0+ */ #pragma once diff --git a/src/tdef.c b/src/tdef.c index 692e2cf..9d5d736 100644 --- a/src/tdef.c +++ b/src/tdef.c @@ -11,16 +11,16 @@ * Author: Neels Hofmeyr * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. + * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ diff --git a/src/vty/tdef_vty.c b/src/vty/tdef_vty.c index 0dac2bf..eb05c3c 100644 --- a/src/vty/tdef_vty.c +++ b/src/vty/tdef_vty.c @@ -8,18 +8,19 @@ * All Rights Reserved * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. + * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see . * + * SPDX-License-Identifier: GPLv2+ */ #include -- To view, visit https://gerrit.osmocom.org/14213 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ie483ff6f6ea0a56c477649677b4b163c49df11d7 Gerrit-Change-Number: 14213 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 21:25:04 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 21:25:04 +0000 Subject: Change in libosmocore[master]: gsm48_rest_octets: Fix liense: GPLv2+ instead of AGPLv3+ Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14214 Change subject: gsm48_rest_octets: Fix liense: GPLv2+ instead of AGPLv3+ ...................................................................... gsm48_rest_octets: Fix liense: GPLv2+ instead of AGPLv3+ libosmo{core,gsm,vty} code is GPLv2+. The rest octet code originated in osmo-bsc.git and was moved here without changing the license. That was a mistake, it always was meant to be under GPLv2-or-later after moving to libosmocore.git. Original copyright is mine. For contributions by sysmocom, I as the managing director can approve the license change. This means only Holger needs to ACK this. Change-Id: Ief3009dc28dd83e1e26a7101af2eed2341684a87 --- M src/gsm/gsm48_rest_octets.c 1 file changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/14/14214/1 diff --git a/src/gsm/gsm48_rest_octets.c b/src/gsm/gsm48_rest_octets.c index 619dc6d..cdb61f1 100644 --- a/src/gsm/gsm48_rest_octets.c +++ b/src/gsm/gsm48_rest_octets.c @@ -7,18 +7,20 @@ * All Rights Reserved * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. + * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see . * + * SPDX-License-Identifier: GPL-2.0+ + * */ #include -- To view, visit https://gerrit.osmocom.org/14214 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ief3009dc28dd83e1e26a7101af2eed2341684a87 Gerrit-Change-Number: 14214 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 21:25:38 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 21:25:38 +0000 Subject: Change in libosmocore[master]: rsl: Add osmocom-specific extensions to RSL channel numbers for CBCH In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14199 ) Change subject: rsl: Add osmocom-specific extensions to RSL channel numbers for CBCH ...................................................................... rsl: Add osmocom-specific extensions to RSL channel numbers for CBCH We don't really *need* it in libosmocore as such, but the lack of having all osmocom extensions listed here lead to using overlapping definitions: 0x18 was used for dynamic PDCH on the Abis side, but also for CBCH on the L1SAP side. Let's list them all here to increase visibility in case anyone wants to extend this further... Related: OS#4027 Change-Id: I93e557358cf1c1b622f77f906959df7ca6d5cb12 --- M include/osmocom/gsm/protocol/gsm_08_58.h M src/gsm/rsl.c 2 files changed, 14 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Pau Espin Pedrol: Looks good to me, approved Vadim Yanitskiy: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/gsm/protocol/gsm_08_58.h b/include/osmocom/gsm/protocol/gsm_08_58.h index 3ea4e63..1d4530d 100644 --- a/include/osmocom/gsm/protocol/gsm_08_58.h +++ b/include/osmocom/gsm/protocol/gsm_08_58.h @@ -50,6 +50,8 @@ #define ABIS_RSL_CHAN_NR_CBITS_RACH 0x11 #define ABIS_RSL_CHAN_NR_CBITS_PCH_AGCH 0x12 #define ABIS_RSL_CHAN_NR_CBITS_OSMO_PDCH 0x18 /*< non-standard, for dyn TS */ +#define ABIS_RSL_CHAN_NR_CBITS_OSMO_CBCH4 0x19 /*< non-standard, for CBCH/SDCCH4 */ +#define ABIS_RSL_CHAN_NR_CBITS_OSMO_CBCH8 0x1a /*< non-standard, for CBCH/SDCCH8 */ /* Link Identifier 9.3.2 */ union abis_rsl_link_id { @@ -424,6 +426,8 @@ #define RSL_CHAN_RACH 0x88 #define RSL_CHAN_PCH_AGCH 0x90 #define RSL_CHAN_OSMO_PDCH 0xc0 /*< non-standard, for dyn TS */ +#define RSL_CHAN_OSMO_CBCH4 0xc8 /*< non-standard, for CBCH/SDCCH4 */ +#define RSL_CHAN_OSMO_CBCH8 0xd0 /*< non-standard, for CBCH/SDCCH8 */ /* Chapter 9.3.3 */ #define RSL_ACT_TYPE_INITIAL 0x00 diff --git a/src/gsm/rsl.c b/src/gsm/rsl.c index 1777479..0409734 100644 --- a/src/gsm/rsl.c +++ b/src/gsm/rsl.c @@ -209,6 +209,12 @@ } else if ((chan_nr & 0xf8) == RSL_CHAN_OSMO_PDCH) { *type = RSL_CHAN_OSMO_PDCH; *subch = 0; + } else if ((chan_nr & 0xf8) == RSL_CHAN_OSMO_CBCH4) { + *type = RSL_CHAN_OSMO_CBCH4; + *subch = 0; + } else if ((chan_nr & 0xf8) == RSL_CHAN_OSMO_CBCH8) { + *type = RSL_CHAN_OSMO_CBCH8; + *subch = 0; } else return -EINVAL; @@ -242,6 +248,10 @@ snprintf(buf, buf_len, "PCH/AGCH on TS%d", ts); else if (cbits == 0x18) snprintf(buf, buf_len, "PDCH on TS%d", ts); + else if (cbits == 0x19) + snprintf(buf, buf_len, "CBCH(SDCCH/4) on TS%d", ts); + else if (cbits == 0x1a) + snprintf(buf, buf_len, "CBCH(SDCCH/8) on TS%d", ts); else snprintf(buf, buf_len, "UNKNOWN on TS%d", ts); -- To view, visit https://gerrit.osmocom.org/14199 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I93e557358cf1c1b622f77f906959df7ca6d5cb12 Gerrit-Change-Number: 14199 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 21:26:38 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 21:26:38 +0000 Subject: Change in libosmocore[master]: oap_client: Fix license: GPLv2+ instead of AGPLv3+ In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14212 to look at the new patch set (#2). Change subject: oap_client: Fix license: GPLv2+ instead of AGPLv3+ ...................................................................... oap_client: Fix license: GPLv2+ instead of AGPLv3+ libosmo{core,gsm,vty} code is GPLv2+. The OAP code originated in osmo-msc.git and was moved here without changing the license. That was a mistake, it always was meant to be under GPLv2-or-later after moving to libosmocore.git. Copyright is with sysmocom, so I as the managing director can approve the license change. Change-Id: I08311fa8214c15f8df8945b9894226608cf96f15 --- M include/osmocom/gsm/oap_client.h M src/gsm/oap_client.c M tests/oap/oap_client_test.c 3 files changed, 16 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/12/14212/2 -- To view, visit https://gerrit.osmocom.org/14212 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I08311fa8214c15f8df8945b9894226608cf96f15 Gerrit-Change-Number: 14212 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 21:26:38 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 21:26:38 +0000 Subject: Change in libosmocore[master]: tdef: Fix license: GPLv2+ instead of AGPLv3+ In-Reply-To: References: Message-ID: Harald Welte has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/14213 ) Change subject: tdef: Fix license: GPLv2+ instead of AGPLv3+ ...................................................................... tdef: Fix license: GPLv2+ instead of AGPLv3+ libosmo{core,gsm,vty} code is GPLv2+. The tdef code originated in osmo-msc.git and was moved here without changing the license. That was a mistake, it always was meant to be under GPLv2-or-later after moving to libosmocore.git. Copyright is with sysmocom, so I as the managing director can approve the license change. Change-Id: Ie483ff6f6ea0a56c477649677b4b163c49df11d7 --- M include/osmocom/vty/tdef_vty.h M src/tdef.c M src/vty/tdef_vty.c 3 files changed, 15 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/13/14213/2 -- To view, visit https://gerrit.osmocom.org/14213 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie483ff6f6ea0a56c477649677b4b163c49df11d7 Gerrit-Change-Number: 14213 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-CC: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 21:26:38 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 21:26:38 +0000 Subject: Change in libosmocore[master]: gsm48_rest_octets: Fix license: GPLv2+ instead of AGPLv3+ In-Reply-To: References: Message-ID: Harald Welte has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/14214 ) Change subject: gsm48_rest_octets: Fix license: GPLv2+ instead of AGPLv3+ ...................................................................... gsm48_rest_octets: Fix license: GPLv2+ instead of AGPLv3+ libosmo{core,gsm,vty} code is GPLv2+. The rest octet code originated in osmo-bsc.git and was moved here without changing the license. That was a mistake, it always was meant to be under GPLv2-or-later after moving to libosmocore.git. Original copyright is mine. For contributions by sysmocom, I as the managing director can approve the license change. This means only Holger needs to ACK this. Change-Id: Ief3009dc28dd83e1e26a7101af2eed2341684a87 --- M src/gsm/gsm48_rest_octets.c 1 file changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/14/14214/2 -- To view, visit https://gerrit.osmocom.org/14214 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ief3009dc28dd83e1e26a7101af2eed2341684a87 Gerrit-Change-Number: 14214 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 21:27:25 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 21:27:25 +0000 Subject: Change in libosmocore[master]: oap_client: Fix license: GPLv2+ instead of AGPLv3+ In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14212 ) Change subject: oap_client: Fix license: GPLv2+ instead of AGPLv3+ ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14212 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I08311fa8214c15f8df8945b9894226608cf96f15 Gerrit-Change-Number: 14212 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 27 May 2019 21:27:25 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 21:27:30 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 21:27:30 +0000 Subject: Change in libosmocore[master]: tdef: Fix license: GPLv2+ instead of AGPLv3+ In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14213 ) Change subject: tdef: Fix license: GPLv2+ instead of AGPLv3+ ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14213 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie483ff6f6ea0a56c477649677b4b163c49df11d7 Gerrit-Change-Number: 14213 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 27 May 2019 21:27:30 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 21:29:03 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 21:29:03 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Verify SI3 GPRS indication reflects PCU interface status Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14215 Change subject: bts: Verify SI3 GPRS indication reflects PCU interface status ...................................................................... bts: Verify SI3 GPRS indication reflects PCU interface status When no PCU is connected to the BTS, the BTS should mask the GPRS indicator from the SI3 rest octets to indicate "no GPRS support" in the cell. This will cause phones not even trying to send us RACH requests for GPRS ATTACH, RAU, etc. Change-Id: I37efb712ee0c513aea230beeb35e7dabce698a34 Related: OS#4023 Related: OS#3075 --- M bts/BTS_Tests.ttcn 1 file changed, 172 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/15/14215/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 6786d68..c5e3f7e 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -245,7 +245,7 @@ }, cell_sel_par := ts_CellSelPar_default, rach_control := ts_RachCtrl_default, - rest_octets := '2B2B2B2B'O + rest_octets := '2C2B2B2B'O /* GPRS present */ } } } @@ -3941,6 +3941,174 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } +/* Ensure that GPRS capability is not advertised before PCU socket conncet */ +private function f_get_si3(L1CTL_PT pt) runs on test_CT return SystemInformationType3 { + var L1ctlDlMessage l1_dl; + var SystemInformation si; + timer T := 5.0; + T.start; + alt { + [] pt.receive(tr_L1CTL_DATA_IND(t_RslChanNr_BCCH(0), ?)) -> value l1_dl { + /* somehow dec_SystemInformation will try to decode even non-RR as SI */ + if (not (l1_dl.payload.data_ind.payload[1] == '06'O)) { + log("Ignoring non-RR SI ", l1_dl); + repeat; + } + si := dec_SystemInformation(l1_dl.payload.data_ind.payload) + if (not ischosen(si.payload.si3)) { + repeat; + } + } + [] pt.receive { + repeat; + } + [] T.timeout { + setverdict(fail, "Timeout waiting for SI3"); + } + } + return si.payload.si3; +} + +/* CSN.1 L/H logic: is the bit at the current position using "inverted logic" (true) or not? */ +private function f_bitpos_is_inv(integer idx) return boolean { + select (idx mod 8) { + case ((2, 4, 6, 7)) { return true; } /* 1-bits of 0x2B */ + case else { return false; } /* 0-bits of 0x2B */ + } +} +/* determine if the bit at position 'idx' in 'str' is a CSN.1 'H' (true) or 'L' (false) */ +private function f_bit_is_high(bitstring str, integer idx) return boolean { + var boolean invert := f_bitpos_is_inv(idx); + if (invert) { + if (str[idx] == '1'B) { + return false; + } else { + return true; + } + } else { + if (str[idx] == '1'B) { + return true; + } else { + return false; + } + } +} +/* As the TITAN RAW codec cannot expres the CSN.1 L/H concept yet, we have to do this + manually. Let's hope https://www.eclipse.org/forums/index.php/t/1099087/ takes off and + we can replace this piece of code soon ... */ +private function f_si3_has_gprs_indicator(OCT4 si3_restoctets) return boolean { + var bitstring bits := oct2bit(si3_restoctets); + var integer idx := 0; + + if (f_bit_is_high(bits, idx)) { + /* skip Optional selection parameters */ + idx := idx + 16; + } else { + idx := idx + 1; + } + + if (f_bit_is_high(bits, idx)) { + /* skip Optional power offset */ + idx := idx + 3; + } else { + idx := idx + 1; + } + + /* skip SI2ter Indicator */ + idx := idx + 1; + + /* skip Early CM Sending Control */ + idx := idx + 1; + + /* skip Scheduling if and where */ + if (f_bit_is_high(bits, idx)) { + idx := idx + 4; + } else { + idx := idx + 1; + } + + return f_bit_is_high(bits, idx); +} + +testcase TC_pcu_socket_noconnect_nosi3gprs() runs on test_CT { + var SystemInformationType3 si3; + timer T := 5.0; + + /* don't call f_init() as this would connect PCU socket */ + f_init_rsl(testcasename()); + T.start; + alt { + [] RSL_CCHAN.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP}); + [] T.timeout { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Timeout waiting for ASP_IPA_EVENT_UP"); + } + } + f_rsl_bcch_fill(RSL_SYSTEM_INFO_3, ts_SI3_default); + + f_init_l1ctl(); + f_l1_tune(L1CTL); + + f_sleep(2.0); + L1CTL.clear; + si3 := f_get_si3(L1CTL); + if (f_si3_has_gprs_indicator(si3.rest_octets)) { + setverdict(fail, "SI3 indicates GPRS even before PCU socket connected"); + } else { + setverdict(pass); + } + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + +/* Ensure that GPRS capability is advertised after PCU socket connect */ +testcase TC_pcu_socket_connect_si3gprs() runs on test_CT { + var SystemInformationType3 si3; + + /* this (among other things) establishes the first connection to the PCUIF socket */ + f_init(); + f_init_l1ctl(); + f_l1_tune(L1CTL); + + f_sleep(2.0); + L1CTL.clear; + si3 := f_get_si3(L1CTL); + if (not f_si3_has_gprs_indicator(si3.rest_octets)) { + setverdict(fail, "SI3 indicates no GPRS despite PCU socket connected"); + } else { + setverdict(pass); + } + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + +/* Ensure that GPRS capability is no longer advertised after PCU socket disconnect */ +testcase TC_pcu_socket_disconnect_nosi3gprs() runs on test_CT { + var SystemInformationType3 si3; + + /* this (among other things) establishes the first connection to the PCUIF socket */ + f_init(); + f_init_l1ctl(); + f_l1_tune(L1CTL); + + f_pcuif_close(PCU, g_pcu_conn_id); + g_pcu_conn_id := -1; + + f_sleep(1.0); + + /* re-connect */ + PCU.clear; + f_init_pcu(PCU, testcasename(), g_pcu_conn_id, g_pcu_last_info); + + f_sleep(2.0); + L1CTL.clear; + si3 := f_get_si3(L1CTL); + if (f_si3_has_gprs_indicator(si3.rest_octets)) { + setverdict(fail, "SI3 indicates GPRS after PCU socket disconnected"); + } else { + setverdict(pass); + } + + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + /*********************************************************************** * Osmocom Style Dynamic Timeslot Support @@ -5251,6 +5419,9 @@ execute( TC_pcu_rr_suspend() ); execute( TC_pcu_socket_connect_multi() ); execute( TC_pcu_socket_reconnect() ); + execute( TC_pcu_socket_noconnect_nosi3gprs() ); + execute( TC_pcu_socket_connect_si3gprs() ); + execute( TC_pcu_socket_disconnect_nosi3gprs() ); } else { log("PCU socket path not available, skipping PCU tests"); } -- To view, visit https://gerrit.osmocom.org/14215 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I37efb712ee0c513aea230beeb35e7dabce698a34 Gerrit-Change-Number: 14215 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 21:31:41 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 21:31:41 +0000 Subject: Change in osmo-ttcn3-hacks[master]: L1CTL: Add support for CCCH_MODE_COMBINED_CBCH In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14204 ) Change subject: L1CTL: Add support for CCCH_MODE_COMBINED_CBCH ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14204 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I27ee2c81bec7175c1ea09d4f3f6037f2866fe242 Gerrit-Change-Number: 14204 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 27 May 2019 21:31:41 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 21:31:43 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 21:31:43 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Fix use of osmocom-extended RSL Channel Numbers In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14205 ) Change subject: Fix use of osmocom-extended RSL Channel Numbers ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14205 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I48908058ac2501a3b5ae7c74e4e8527cbaee1b01 Gerrit-Change-Number: 14205 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 27 May 2019 21:31:43 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 21:31:52 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 21:31:52 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add test ensuring only one connection to PCU interface accepted In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14208 ) Change subject: bts: Add test ensuring only one connection to PCU interface accepted ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14208 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib484a0a39e719cb2ce00a9464fc1207357ec9e93 Gerrit-Change-Number: 14208 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 27 May 2019 21:31:52 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 21:31:55 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 21:31:55 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Verify PCU socket can disconnect + re-connect In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14209 ) Change subject: bts: Verify PCU socket can disconnect + re-connect ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14209 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic69c3f34405012d42319bd9752f875071aae2243 Gerrit-Change-Number: 14209 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Mon, 27 May 2019 21:31:55 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 21:31:56 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 21:31:56 +0000 Subject: Change in osmo-ttcn3-hacks[master]: L1CTL: Add support for CCCH_MODE_COMBINED_CBCH In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14204 ) Change subject: L1CTL: Add support for CCCH_MODE_COMBINED_CBCH ...................................................................... L1CTL: Add support for CCCH_MODE_COMBINED_CBCH In OsmocomBB/trxcon Change-Id Ia94ebf22a2ec439dfe1f31d703b832ae57b48ef2 we introduced a new mode CCCH_MODE_COMBINED_CBCH to indicate that the channel combination is a CCCH+SDCCH/4 with one SDCCH stolen for CBCH. Let's make sure we actually use that mode in our CBCH related tests Change-Id: I27ee2c81bec7175c1ea09d4f3f6037f2866fe242 --- M bts/BTS_Tests.ttcn M bts/BTS_Tests_SMSCB.ttcn M library/L1CTL_Types.ttcn 3 files changed, 5 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Pau Espin Pedrol: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 1c20657..47c16c2 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -451,8 +451,8 @@ } } -friend function f_l1_tune(L1CTL_PT L1CTL) { - f_L1CTL_FBSB(L1CTL, { false, mp_trx0_arfcn }, CCCH_MODE_COMBINED, mp_rxlev_exp); +friend function f_l1_tune(L1CTL_PT L1CTL, L1ctlCcchMode ccch_mode := CCCH_MODE_COMBINED) { + f_L1CTL_FBSB(L1CTL, { false, mp_trx0_arfcn }, ccch_mode, mp_rxlev_exp); } private function f_trxc_connect() runs on ConnHdlr { diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn index 0712a90..c02522b 100644 --- a/bts/BTS_Tests_SMSCB.ttcn +++ b/bts/BTS_Tests_SMSCB.ttcn @@ -216,7 +216,7 @@ f_init(testcasename()); f_init_l1ctl(); - f_l1_tune(L1CTL); + f_l1_tune(L1CTL, ccch_mode := CCCH_MODE_COMBINED_CBCH); /* FIXME: switch to dedicated mode for SDCCH/8 */ /* send SMSCB[s] via RSL */ diff --git a/library/L1CTL_Types.ttcn b/library/L1CTL_Types.ttcn index 69e7dbe..87849f5 100644 --- a/library/L1CTL_Types.ttcn +++ b/library/L1CTL_Types.ttcn @@ -62,7 +62,8 @@ type enumerated L1ctlCcchMode { CCCH_MODE_NONE (0), CCCH_MODE_NON_COMBINED, - CCCH_MODE_COMBINED + CCCH_MODE_COMBINED, + CCCH_MODE_COMBINED_CBCH } with { variant "FIELDLENGTH(8)" }; type enumerated L1ctlNeighMode { -- To view, visit https://gerrit.osmocom.org/14204 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I27ee2c81bec7175c1ea09d4f3f6037f2866fe242 Gerrit-Change-Number: 14204 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 21:31:56 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 21:31:56 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Fix use of osmocom-extended RSL Channel Numbers In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14205 ) Change subject: Fix use of osmocom-extended RSL Channel Numbers ...................................................................... Fix use of osmocom-extended RSL Channel Numbers Bring our TTCN-3 view of how RSL channel numbers are defined in sync with that of our other implementations (BTS, libosmocore, trxcon, ...) Change-Id: I48908058ac2501a3b5ae7c74e4e8527cbaee1b01 Related: OS#4027 --- M bts/BTS_Tests_SMSCB.ttcn M library/GSM_Types.ttcn 2 files changed, 20 insertions(+), 7 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn index c02522b..4d357ba 100644 --- a/bts/BTS_Tests_SMSCB.ttcn +++ b/bts/BTS_Tests_SMSCB.ttcn @@ -321,8 +321,17 @@ } } +private function t_cbch_chan_nr(CbchTestPars pars, template uint8_t tn) return template RslChannelNr { + if (pars.use_sdcch4) { + return t_RslChanNr_CBCH4(tn); + } else { + return t_RslChanNr_CBCH8(tn); + } +} + /* shared function doing the heavy lifting for most CBCH tests */ private function f_TC_smscb(CbchTestPars pars) runs on test_CT { + var template RslChannelNr t_chan_nr := t_cbch_chan_nr(pars, 0); /* FIXME: TS number */ var L1ctlDlMessage dl; var integer msg_count; timer T; @@ -344,8 +353,7 @@ T.start(5.0 + 3.0 * int2float(msg_count)); /* Expect this to show up exactly once on the basic CBCH (four blocks) */ alt { - /* FIXME: Channel Nr for SDCCH/8 */ - [] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_CBCH(0))) -> value dl { + [] L1CTL.receive(tr_L1CTL_DATA_IND(t_chan_nr)) -> value dl { var integer tb := f_cbch_fn2tb(dl.dl_info.frame_nr); var CBCH_Block cb := dec_CBCH_Block(dl.payload.data_ind.payload); log("Tb=", tb, ", CBCH: ", dl, ", block: ", cb); @@ -378,6 +386,7 @@ } private function f_TC_smscb_default_only(CbchTestPars pars) runs on test_CT { + var template RslChannelNr t_chan_nr := t_cbch_chan_nr(pars, 0); /* FIXME: TS number */ var L1ctlDlMessage dl; timer T := 5.0; @@ -389,7 +398,7 @@ T.start; alt { - [] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_CBCH(0))) -> value dl { + [] L1CTL.receive(tr_L1CTL_DATA_IND(t_chan_nr)) -> value dl { var integer tb := f_cbch_fn2tb(dl.dl_info.frame_nr); log("CBCH: ", dl); var CBCH_Block cb := dec_CBCH_Block(dl.payload.data_ind.payload); @@ -658,6 +667,7 @@ basic := valueof(t_CbchPC(msgs_1m_3b_default)), extended := omit }; + var template RslChannelNr t_chan_nr := t_RslChanNr_CBCH4(0); var L1ctlDlMessage dl; timer T := 5.0; @@ -672,7 +682,7 @@ T.start; alt { - [] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_CBCH(0))) -> value dl { + [] L1CTL.receive(tr_L1CTL_DATA_IND(t_chan_nr)) -> value dl { log("CBCH: ", dl); var CBCH_Block cb := dec_CBCH_Block(dl.payload.data_ind.payload); /* detect the proper CBCH messages; check frame number */ diff --git a/library/GSM_Types.ttcn b/library/GSM_Types.ttcn index 3e24f81..ec74ce5 100644 --- a/library/GSM_Types.ttcn +++ b/library/GSM_Types.ttcn @@ -68,7 +68,8 @@ RSL_CHAN_NR_RACH ('10001'B), RSL_CHAN_NR_PCH_AGCH ('10010'B), RSL_CHAN_NR_OSMO_PDCH ('11000'B), - RSL_CHAN_NR_OSMO_CBCH ('11001'B) + RSL_CHAN_NR_OSMO_CBCH4 ('11001'B), + RSL_CHAN_NR_OSMO_CBCH8 ('11010'B) } with { variant "FIELDLENGTH(5)" variant "FIELDORDER(msb)" }; type record RslChanNr2 { @@ -115,7 +116,8 @@ template RslChannelNr t_RslChanNr_PCH_AGCH(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_PCH_AGCH); template RslChannelNr t_RslChanNr_Bm(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_Bm_ACCH); template RslChannelNr t_RslChanNr_PDCH(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_OSMO_PDCH); - template RslChannelNr t_RslChanNr_CBCH(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH); + template RslChannelNr t_RslChanNr_CBCH4(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH4); + template RslChannelNr t_RslChanNr_CBCH8(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH8); template RslChannelNr t_RslChanNr_Lm(template uint3_t tn, template uint1_t sub_slot) := { u := { lm := { tag := '0001'B, sub_chan := sub_slot } }, tn := tn @@ -138,7 +140,8 @@ template (value) RslChannelNr ts_RslChanNr_PCH_AGCH(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_PCH_AGCH); template (value) RslChannelNr ts_RslChanNr_Bm(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_Bm_ACCH); template (value) RslChannelNr ts_RslChanNr_PDCH(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_OSMO_PDCH); - template (value) RslChannelNr ts_RslChanNr_CBCH(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH); + template (value) RslChannelNr ts_RslChanNr_CBCH4(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH4); + template (value) RslChannelNr ts_RslChanNr_CBCH8(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH8); template (value) RslChannelNr ts_RslChanNr_Lm(uint3_t tn, uint1_t sub_slot) := { u := { lm := { tag := '0001'B, sub_chan := sub_slot } }, tn := tn -- To view, visit https://gerrit.osmocom.org/14205 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I48908058ac2501a3b5ae7c74e4e8527cbaee1b01 Gerrit-Change-Number: 14205 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 21:31:57 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 21:31:57 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add test ensuring only one connection to PCU interface accepted In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14208 ) Change subject: bts: Add test ensuring only one connection to PCU interface accepted ...................................................................... bts: Add test ensuring only one connection to PCU interface accepted This adds TC_pcu_socket_connect_multi, which verifies that a second connection to the PCU Intrerface socket is denied while the first connection is still established. Change-Id: Ib484a0a39e719cb2ce00a9464fc1207357ec9e93 Related: OS#4023 --- M bts/BTS_Tests.ttcn 1 file changed, 26 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 47c16c2..2885628 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -50,6 +50,7 @@ import from PCUIF_Types all; import from PCUIF_CodecPort all; +import from UD_Types all; import from MobileL3_CommonIE_Types all; import from MobileL3_RRM_Types all; @@ -3896,6 +3897,30 @@ vc_conn.done; } +/* Ensure that PCUIF socket can accept only a single connection */ +testcase TC_pcu_socket_connect_multi() runs on test_CT { + timer T := 5.0; + + /* this (among other things) establishes the first connection to the PCUIF socket */ + f_init(); + + /* try to establish a second connection, expect it to fail */ + PCU.send(UD_connect:{mp_pcu_socket, -1}); + T.start; + alt { + [] PCU.receive(UD_connect_result:{id := ?, result := { result_code := ERROR, err := ? }}) { + setverdict(pass); + } + [] PCU.receive(UD_connect_result:?) { + setverdict(fail, "Unexpected unix domain connect result"); + } + [] T.timeout { + setverdict(pass); + } + } + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + /*********************************************************************** * Osmocom Style Dynamic Timeslot Support @@ -5204,6 +5229,7 @@ execute( TC_pcu_rts_req() ); execute( TC_pcu_oml_alert() ); execute( TC_pcu_rr_suspend() ); + execute( TC_pcu_socket_connect_multi() ); } else { log("PCU socket path not available, skipping PCU tests"); } -- To view, visit https://gerrit.osmocom.org/14208 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ib484a0a39e719cb2ce00a9464fc1207357ec9e93 Gerrit-Change-Number: 14208 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 21:31:57 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 21:31:57 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Verify PCU socket can disconnect + re-connect In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14209 ) Change subject: bts: Verify PCU socket can disconnect + re-connect ...................................................................... bts: Verify PCU socket can disconnect + re-connect Change-Id: Ic69c3f34405012d42319bd9752f875071aae2243 Related: OS#4023 --- M bts/BTS_Tests.ttcn M library/PCUIF_CodecPort.ttcn 2 files changed, 26 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 2885628..6786d68 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -3921,6 +3921,26 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } +/* Ensure that PCUIF socket can disconnect + reconnect */ +testcase TC_pcu_socket_reconnect() runs on test_CT { + /* this (among other things) establishes the first connection to the PCUIF socket */ + f_init(); + + f_sleep(1.0); + + f_pcuif_close(PCU, g_pcu_conn_id); + g_pcu_conn_id := -1; + + f_sleep(1.0); + + /* re-connect */ + PCU.clear; + f_init_pcu(PCU, testcasename(), g_pcu_conn_id, g_pcu_last_info); + setverdict(pass); + + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + /*********************************************************************** * Osmocom Style Dynamic Timeslot Support @@ -5230,6 +5250,7 @@ execute( TC_pcu_oml_alert() ); execute( TC_pcu_rr_suspend() ); execute( TC_pcu_socket_connect_multi() ); + execute( TC_pcu_socket_reconnect() ); } else { log("PCU socket path not available, skipping PCU tests"); } diff --git a/library/PCUIF_CodecPort.ttcn b/library/PCUIF_CodecPort.ttcn index 91f9bf9..3d6ceac 100644 --- a/library/PCUIF_CodecPort.ttcn +++ b/library/PCUIF_CodecPort.ttcn @@ -94,6 +94,11 @@ return -23; } +function f_pcuif_close(PCUIF_CODEC_PT pt, integer id) +{ + pt.send(UD_close:{id := id}); +} + function f_pcuif_listen(PCUIF_CODEC_PT pt, charstring sock) return integer { var UD_listen_result res; var UD_connected udc; -- To view, visit https://gerrit.osmocom.org/14209 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ic69c3f34405012d42319bd9752f875071aae2243 Gerrit-Change-Number: 14209 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 21:34:56 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 21:34:56 +0000 Subject: Change in osmocom-bb[master]: trxcon: Fix CBCH related RSL channel numbers In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14202 to look at the new patch set (#3). Change subject: trxcon: Fix CBCH related RSL channel numbers ...................................................................... trxcon: Fix CBCH related RSL channel numbers OsmoBTS, BSC and TTCN3 used cbits == 0x18 for dynamic PDCH, while trxcon wanted to use 0x18 for CBCH on SDCCH/4. Let's fix this and bring everyone in agreement. Related: OS#4027 Change-Id: Ia9a415628c659cbc2dd5dc65b875b7f935d6e211 --- M src/host/trxcon/sched_lchan_desc.c M src/host/trxcon/sched_trx.c 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/02/14202/3 -- To view, visit https://gerrit.osmocom.org/14202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia9a415628c659cbc2dd5dc65b875b7f935d6e211 Gerrit-Change-Number: 14202 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Assignee: fixeria Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Pau Espin Pedrol Gerrit-CC: fixeria -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 21:34:56 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 21:34:56 +0000 Subject: Change in osmocom-bb[master]: trxcon: Use RSL channel mode #defines from libosmogsm In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14207 to look at the new patch set (#2). Change subject: trxcon: Use RSL channel mode #defines from libosmogsm ...................................................................... trxcon: Use RSL channel mode #defines from libosmogsm Wherever possible, use #defines from libosmogsm as opposed to magic numbers. Using magic numbers in several places has the danger of different programs/repositories having different views on what those values mean. Change-Id: I7ab4958801b3422973b67ff0452b90afa8a3f501 Related: OS#4027 Depends: libosmocore Change-Id I93e557358cf1c1b622f77f906959df7ca6d5cb12 --- M src/host/trxcon/sched_lchan_desc.c M src/host/trxcon/sched_trx.c 2 files changed, 17 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/07/14207/2 -- To view, visit https://gerrit.osmocom.org/14207 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I7ab4958801b3422973b67ff0452b90afa8a3f501 Gerrit-Change-Number: 14207 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 21:35:14 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 21:35:14 +0000 Subject: Change in osmocom-bb[master]: trxcon: Fix CBCH related RSL channel numbers In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14202 ) Change subject: trxcon: Fix CBCH related RSL channel numbers ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia9a415628c659cbc2dd5dc65b875b7f935d6e211 Gerrit-Change-Number: 14202 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Assignee: fixeria Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Pau Espin Pedrol Gerrit-CC: fixeria Gerrit-Comment-Date: Mon, 27 May 2019 21:35:14 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 21:35:21 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 21:35:21 +0000 Subject: Change in osmocom-bb[master]: trxcon: Use RSL channel mode #defines from libosmogsm In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14207 ) Change subject: trxcon: Use RSL channel mode #defines from libosmogsm ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14207 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I7ab4958801b3422973b67ff0452b90afa8a3f501 Gerrit-Change-Number: 14207 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 27 May 2019 21:35:21 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 21:44:55 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 21:44:55 +0000 Subject: Change in osmocom-bb[master]: trxcon: Fix CBCH related RSL channel numbers In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14202 ) Change subject: trxcon: Fix CBCH related RSL channel numbers ...................................................................... trxcon: Fix CBCH related RSL channel numbers OsmoBTS, BSC and TTCN3 used cbits == 0x18 for dynamic PDCH, while trxcon wanted to use 0x18 for CBCH on SDCCH/4. Let's fix this and bring everyone in agreement. Related: OS#4027 Change-Id: Ia9a415628c659cbc2dd5dc65b875b7f935d6e211 --- M src/host/trxcon/sched_lchan_desc.c M src/host/trxcon/sched_trx.c 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/trxcon/sched_lchan_desc.c b/src/host/trxcon/sched_lchan_desc.c index 93639a3..ee712d5 100644 --- a/src/host/trxcon/sched_lchan_desc.c +++ b/src/host/trxcon/sched_lchan_desc.c @@ -304,13 +304,13 @@ }, [TRXC_SDCCH4_CBCH] = { TRXC_SDCCH4_CBCH, "SDCCH/4(CBCH)", - 0xc0, TRX_CH_LID_DEDIC, + 0xc8, TRX_CH_LID_DEDIC, 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_AUTO, rx_data_fn, NULL, }, [TRXC_SDCCH8_CBCH] = { TRXC_SDCCH8_CBCH, "SDCCH/8(CBCH)", - 0xc8, TRX_CH_LID_DEDIC, + 0xd0, TRX_CH_LID_DEDIC, 4 * GSM_BURST_PL_LEN, 0x00, rx_data_fn, NULL, }, diff --git a/src/host/trxcon/sched_trx.c b/src/host/trxcon/sched_trx.c index 18516d3..721db02 100644 --- a/src/host/trxcon/sched_trx.c +++ b/src/host/trxcon/sched_trx.c @@ -536,11 +536,11 @@ return GSM_PCHAN_TCH_H; else if ((cbits & 0x1c) == 0x04) return GSM_PCHAN_CCCH_SDCCH4; - else if ((cbits & 0x1f) == 0x18) - return GSM_PCHAN_CCCH_SDCCH4_CBCH; else if ((cbits & 0x18) == 0x08) return GSM_PCHAN_SDCCH8_SACCH8C; else if ((cbits & 0x1f) == 0x19) + return GSM_PCHAN_CCCH_SDCCH4_CBCH; + else if ((cbits & 0x1f) == 0x1a) return GSM_PCHAN_SDCCH8_SACCH8C_CBCH; return GSM_PCHAN_NONE; -- To view, visit https://gerrit.osmocom.org/14202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ia9a415628c659cbc2dd5dc65b875b7f935d6e211 Gerrit-Change-Number: 14202 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Assignee: fixeria Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Pau Espin Pedrol Gerrit-CC: fixeria -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 21:44:56 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 21:44:56 +0000 Subject: Change in osmocom-bb[master]: trxcon: Use RSL channel mode #defines from libosmogsm In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14207 ) Change subject: trxcon: Use RSL channel mode #defines from libosmogsm ...................................................................... trxcon: Use RSL channel mode #defines from libosmogsm Wherever possible, use #defines from libosmogsm as opposed to magic numbers. Using magic numbers in several places has the danger of different programs/repositories having different views on what those values mean. Change-Id: I7ab4958801b3422973b67ff0452b90afa8a3f501 Related: OS#4027 Depends: libosmocore Change-Id I93e557358cf1c1b622f77f906959df7ca6d5cb12 --- M src/host/trxcon/sched_lchan_desc.c M src/host/trxcon/sched_trx.c 2 files changed, 17 insertions(+), 15 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/trxcon/sched_lchan_desc.c b/src/host/trxcon/sched_lchan_desc.c index ee712d5..8bc336e 100644 --- a/src/host/trxcon/sched_lchan_desc.c +++ b/src/host/trxcon/sched_lchan_desc.c @@ -23,6 +23,7 @@ * */ +#include #include "sched_trx.h" /* Forward declaration of handlers */ @@ -94,31 +95,31 @@ }, { TRXC_BCCH, "BCCH", - 0x80, TRX_CH_LID_DEDIC, + RSL_CHAN_BCCH, TRX_CH_LID_DEDIC, 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_AUTO, rx_data_fn, NULL, }, { TRXC_RACH, "RACH", - 0x88, TRX_CH_LID_DEDIC, + RSL_CHAN_RACH, TRX_CH_LID_DEDIC, 0x00, TRX_CH_FLAG_AUTO, NULL, tx_rach_fn, }, { TRXC_CCCH, "CCCH", - 0x90, TRX_CH_LID_DEDIC, + RSL_CHAN_PCH_AGCH, TRX_CH_LID_DEDIC, 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_AUTO, rx_data_fn, NULL, }, { TRXC_TCHF, "TCH/F", - 0x08, TRX_CH_LID_DEDIC, + RSL_CHAN_Bm_ACCHs, TRX_CH_LID_DEDIC, 8 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, rx_tchf_fn, tx_tchf_fn, }, { TRXC_TCHH_0, "TCH/H(0)", - 0x10, TRX_CH_LID_DEDIC, + RSL_CHAN_Lm_ACCHs, TRX_CH_LID_DEDIC, 6 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, rx_tchh_fn, tx_tchh_fn, }, @@ -292,25 +293,25 @@ }, { TRXC_PDTCH, "PDTCH", - 0xc0, TRX_CH_LID_DEDIC, + RSL_CHAN_OSMO_PDCH, TRX_CH_LID_DEDIC, 12 * GSM_BURST_PL_LEN, TRX_CH_FLAG_PDCH, rx_pdtch_fn, tx_pdtch_fn, }, { TRXC_PTCCH, "PTCCH", - 0xc0, TRX_CH_LID_DEDIC, + RSL_CHAN_OSMO_PDCH, TRX_CH_LID_DEDIC, 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_PDCH, rx_data_fn, tx_data_fn, }, [TRXC_SDCCH4_CBCH] = { TRXC_SDCCH4_CBCH, "SDCCH/4(CBCH)", - 0xc8, TRX_CH_LID_DEDIC, + RSL_CHAN_OSMO_CBCH4, TRX_CH_LID_DEDIC, 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_AUTO, rx_data_fn, NULL, }, [TRXC_SDCCH8_CBCH] = { TRXC_SDCCH8_CBCH, "SDCCH/8(CBCH)", - 0xd0, TRX_CH_LID_DEDIC, + RSL_CHAN_OSMO_CBCH8, TRX_CH_LID_DEDIC, 4 * GSM_BURST_PL_LEN, 0x00, rx_data_fn, NULL, }, diff --git a/src/host/trxcon/sched_trx.c b/src/host/trxcon/sched_trx.c index 721db02..4c93a3c 100644 --- a/src/host/trxcon/sched_trx.c +++ b/src/host/trxcon/sched_trx.c @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -530,17 +531,17 @@ { uint8_t cbits = chan_nr >> 3; - if (cbits == 0x01) + if (cbits == ABIS_RSL_CHAN_NR_CBITS_Bm_ACCHs) return GSM_PCHAN_TCH_F; - else if ((cbits & 0x1e) == 0x02) + else if ((cbits & 0x1e) == ABIS_RSL_CHAN_NR_CBITS_Lm_ACCHs(0)) return GSM_PCHAN_TCH_H; - else if ((cbits & 0x1c) == 0x04) + else if ((cbits & 0x1c) == ABIS_RSL_CHAN_NR_CBITS_SDCCH4_ACCH(0)) return GSM_PCHAN_CCCH_SDCCH4; - else if ((cbits & 0x18) == 0x08) + else if ((cbits & 0x18) == ABIS_RSL_CHAN_NR_CBITS_SDCCH8_ACCH(0)) return GSM_PCHAN_SDCCH8_SACCH8C; - else if ((cbits & 0x1f) == 0x19) + else if ((cbits & 0x1f) == ABIS_RSL_CHAN_NR_CBITS_OSMO_CBCH4) return GSM_PCHAN_CCCH_SDCCH4_CBCH; - else if ((cbits & 0x1f) == 0x1a) + else if ((cbits & 0x1f) == ABIS_RSL_CHAN_NR_CBITS_OSMO_CBCH8) return GSM_PCHAN_SDCCH8_SACCH8C_CBCH; return GSM_PCHAN_NONE; -- To view, visit https://gerrit.osmocom.org/14207 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I7ab4958801b3422973b67ff0452b90afa8a3f501 Gerrit-Change-Number: 14207 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 21:49:51 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 21:49:51 +0000 Subject: Change in libosmocore[master]: oap_client: Fix license: GPLv2+ instead of AGPLv3+ In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14212 ) Change subject: oap_client: Fix license: GPLv2+ instead of AGPLv3+ ...................................................................... oap_client: Fix license: GPLv2+ instead of AGPLv3+ libosmo{core,gsm,vty} code is GPLv2+. The OAP code originated in osmo-msc.git and was moved here without changing the license. That was a mistake, it always was meant to be under GPLv2-or-later after moving to libosmocore.git. Copyright is with sysmocom, so I as the managing director can approve the license change. Change-Id: I08311fa8214c15f8df8945b9894226608cf96f15 --- M include/osmocom/gsm/oap_client.h M src/gsm/oap_client.c M tests/oap/oap_client_test.c 3 files changed, 16 insertions(+), 12 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/gsm/oap_client.h b/include/osmocom/gsm/oap_client.h index 763f982..f94cc83 100644 --- a/include/osmocom/gsm/oap_client.h +++ b/include/osmocom/gsm/oap_client.h @@ -6,18 +6,19 @@ * Author: Neels Hofmeyr * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. + * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see . * + * SPDX-License-Identifier: GPL-2.0+ */ #pragma once diff --git a/src/gsm/oap_client.c b/src/gsm/oap_client.c index ea40634..a2974b5 100644 --- a/src/gsm/oap_client.c +++ b/src/gsm/oap_client.c @@ -6,18 +6,20 @@ * Author: Neels Hofmeyr * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. + * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see . * + * SPDX-License-Identifier: GPL-2.0+ + * */ #include diff --git a/tests/oap/oap_client_test.c b/tests/oap/oap_client_test.c index a841b38..dadf2ee 100644 --- a/tests/oap/oap_client_test.c +++ b/tests/oap/oap_client_test.c @@ -4,18 +4,19 @@ * All Rights Reserved * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. + * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see . * + * SPDX-License-Identifier: GPLv2+ */ #include -- To view, visit https://gerrit.osmocom.org/14212 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I08311fa8214c15f8df8945b9894226608cf96f15 Gerrit-Change-Number: 14212 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon May 27 21:49:51 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 27 May 2019 21:49:51 +0000 Subject: Change in libosmocore[master]: tdef: Fix license: GPLv2+ instead of AGPLv3+ In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14213 ) Change subject: tdef: Fix license: GPLv2+ instead of AGPLv3+ ...................................................................... tdef: Fix license: GPLv2+ instead of AGPLv3+ libosmo{core,gsm,vty} code is GPLv2+. The tdef code originated in osmo-msc.git and was moved here without changing the license. That was a mistake, it always was meant to be under GPLv2-or-later after moving to libosmocore.git. Copyright is with sysmocom, so I as the managing director can approve the license change. Change-Id: Ie483ff6f6ea0a56c477649677b4b163c49df11d7 --- M include/osmocom/vty/tdef_vty.h M src/tdef.c M src/vty/tdef_vty.c 3 files changed, 15 insertions(+), 12 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/vty/tdef_vty.h b/include/osmocom/vty/tdef_vty.h index 16d9498..3027913 100644 --- a/include/osmocom/vty/tdef_vty.h +++ b/include/osmocom/vty/tdef_vty.h @@ -8,17 +8,19 @@ * All Rights Reserved * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. + * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see . + * + * SPDX-License-Identifier: GPL-2.0+ */ #pragma once diff --git a/src/tdef.c b/src/tdef.c index 692e2cf..9d5d736 100644 --- a/src/tdef.c +++ b/src/tdef.c @@ -11,16 +11,16 @@ * Author: Neels Hofmeyr * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. + * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ diff --git a/src/vty/tdef_vty.c b/src/vty/tdef_vty.c index 0dac2bf..eb05c3c 100644 --- a/src/vty/tdef_vty.c +++ b/src/vty/tdef_vty.c @@ -8,18 +8,19 @@ * All Rights Reserved * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. + * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see . * + * SPDX-License-Identifier: GPLv2+ */ #include -- To view, visit https://gerrit.osmocom.org/14213 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie483ff6f6ea0a56c477649677b4b163c49df11d7 Gerrit-Change-Number: 14213 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 00:12:39 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 28 May 2019 00:12:39 +0000 Subject: Change in osmocom-bb[master]: firmware/scheduler: Fix CBCH related RSL channel numbers Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14216 Change subject: firmware/scheduler: Fix CBCH related RSL channel numbers ...................................................................... firmware/scheduler: Fix CBCH related RSL channel numbers CBCH support in the firmware has been introduced almost at the same time it was implemented in trxcon, and the same mistake was made as described in Ia9a415628c659cbc2dd5dc65b875b7f935d6e211. Despite Calypso based PHY does not support PDCH (GPRS channels), let's avoid collisions and use the following cbits values: 0x19 / 0b11001 - MF_TASK_SDCCH4_CBCH on GSM_DCHAN_SDCCH_4_CBCH, 0x1a / 0b11010 - MF_TASK_SDCCH8_CBCH on GSM_DCHAN_SDCCH_8_CBCH. Change-Id: Ibb0f90695460e6ede12016c12a0cfdf9c74dfb24 Related: OS#4027 --- M src/target/firmware/layer1/l23_api.c M src/target/firmware/layer1/mframe_sched.c 2 files changed, 15 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/16/14216/1 diff --git a/src/target/firmware/layer1/l23_api.c b/src/target/firmware/layer1/l23_api.c index daffaf8..e78020d 100644 --- a/src/target/firmware/layer1/l23_api.c +++ b/src/target/firmware/layer1/l23_api.c @@ -97,10 +97,13 @@ lch_idx = cbits & 0x7; master_task = MF_TASK_SDCCH8_0 + lch_idx; multiframe = MF51; - } else if ((cbits & 0x1e) == 0x18) { - /* Osmocom specific extension for CBCH */ - master_task = (cbits & 0x01) ? /* 0b1100T */ - MF_TASK_SDCCH4_CBCH : MF_TASK_SDCCH8_CBCH; + } else if ((cbits & 0x1f) == 0x19) { + /* Osmocom specific extension for CBCH on SDCCH/4 */ + master_task = MF_TASK_SDCCH4_CBCH; + multiframe = MF51; + } else if ((cbits & 0x1f) == 0x1a) { + /* Osmocom specific extension for CBCH on SDCCH/8 */ + master_task = MF_TASK_SDCCH8_CBCH; multiframe = MF51; #if 0 } else if (cbits == 0x10) { @@ -141,10 +144,12 @@ return GSM_DCHAN_SDCCH_4; } else if ((cbits & 0x18) == 0x08) { return GSM_DCHAN_SDCCH_8; - } else if ((cbits & 0x1e) == 0x18) { - /* Osmocom-specific extension for CBCH */ - return (cbits & 0x01) ? /* 0b1100T */ - GSM_DCHAN_SDCCH_8_CBCH : GSM_DCHAN_SDCCH_4_CBCH; + } else if ((cbits & 0x1f) == 0x19) { + /* Osmocom-specific extension for CBCH on SDCCH/4 */ + return GSM_DCHAN_SDCCH_4_CBCH; + } else if ((cbits & 0x1f) == 0x1a) { + /* Osmocom-specific extension for CBCH on SDCCH/8 */ + return GSM_DCHAN_SDCCH_8_CBCH; } return GSM_DCHAN_UNKNOWN; diff --git a/src/target/firmware/layer1/mframe_sched.c b/src/target/firmware/layer1/mframe_sched.c index 7fa38c1..9c2954c 100644 --- a/src/target/firmware/layer1/mframe_sched.c +++ b/src/target/firmware/layer1/mframe_sched.c @@ -416,10 +416,10 @@ /* Osmocom specific extensions */ case MF_TASK_SDCCH4_CBCH: - cbits = 0x18; + cbits = 0x19; break; case MF_TASK_SDCCH8_CBCH: - cbits = 0x19; + cbits = 0x1a; break; case MF_TASK_UL_ALL_NB: -- To view, visit https://gerrit.osmocom.org/14216 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ibb0f90695460e6ede12016c12a0cfdf9c74dfb24 Gerrit-Change-Number: 14216 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 00:12:40 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 28 May 2019 00:12:40 +0000 Subject: Change in osmocom-bb[master]: trxcon/sched_trx.c: add missing branch for GSM_PCHAN_PDCH Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14217 Change subject: trxcon/sched_trx.c: add missing branch for GSM_PCHAN_PDCH ...................................................................... trxcon/sched_trx.c: add missing branch for GSM_PCHAN_PDCH PDCH channel support was introduced quite a while ago, but there was no way to activate it via L1CTL so far. Let's fix this. Change-Id: I3b66cab26108ab999a7fe969365ab57dc661399c --- M src/host/trxcon/sched_trx.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/17/14217/1 diff --git a/src/host/trxcon/sched_trx.c b/src/host/trxcon/sched_trx.c index 4c93a3c..62fe870 100644 --- a/src/host/trxcon/sched_trx.c +++ b/src/host/trxcon/sched_trx.c @@ -543,6 +543,8 @@ return GSM_PCHAN_CCCH_SDCCH4_CBCH; else if ((cbits & 0x1f) == ABIS_RSL_CHAN_NR_CBITS_OSMO_CBCH8) return GSM_PCHAN_SDCCH8_SACCH8C_CBCH; + else if ((cbits & 0x1f) == ABIS_RSL_CHAN_NR_CBITS_OSMO_PDCH) + return GSM_PCHAN_PDCH; return GSM_PCHAN_NONE; } -- To view, visit https://gerrit.osmocom.org/14217 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I3b66cab26108ab999a7fe969365ab57dc661399c Gerrit-Change-Number: 14217 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 00:12:41 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 28 May 2019 00:12:41 +0000 Subject: Change in osmocom-bb[master]: trxcon/scheduler: refactor description of TRXC_* lchans Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14218 Change subject: trxcon/scheduler: refactor description of TRXC_* lchans ...................................................................... trxcon/scheduler: refactor description of TRXC_* lchans Let's avoid fancy alignment in the description of logical channels for the benefits of having better readability, the ability to add more comments and fields without making it look ugly. Also, let's get rid of field 'chan' of 'trx_lchan_desc' structure since it's not used anywhere, and not actually needed because the position of each lchan description is defined by its TRXC_* type. As a bonus, let's add a human readable description to each lchan definition, so it can be printed in the VTY some day. Change-Id: I2fc61e1cdca4690a34e2861b9ee3b7c64ea64843 --- M src/host/trxcon/sched_lchan_desc.c M src/host/trxcon/sched_trx.h 2 files changed, 438 insertions(+), 211 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/18/14218/1 diff --git a/src/host/trxcon/sched_lchan_desc.c b/src/host/trxcon/sched_lchan_desc.c index 8bc336e..5cee7c8 100644 --- a/src/host/trxcon/sched_lchan_desc.c +++ b/src/host/trxcon/sched_lchan_desc.c @@ -63,256 +63,482 @@ struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid); const struct trx_lchan_desc trx_lchan_desc[_TRX_CHAN_MAX] = { - { - TRXC_IDLE, "IDLE", - 0x00, TRX_CH_LID_DEDIC, - 0x00, 0x00, + [TRXC_IDLE] = { + .name = "IDLE", + .desc = "Idle channel", + /* The MS needs to perform neighbour measurements during + * IDLE slots, however this is not implemented (yet). */ + }, + [TRXC_FCCH] = { + .name = "FCCH", /* 3GPP TS 05.02, section 3.3.2.1 */ + .desc = "Frequency correction channel", + /* Handled by transceiver, nothing to do. */ + }, + [TRXC_SCH] = { + .name = "SCH", /* 3GPP TS 05.02, section 3.3.2.2 */ + .desc = "Synchronization channel", - /** - * MS: do nothing, save power... - * BTS: send dummy burst on C0 - */ - NULL, NULL, + /* 3GPP TS 05.03, section 4.7. Handled by transceiver, + * however we still need to parse BSIC (BCC / NCC). */ + .flags = TRX_CH_FLAG_AUTO, + .rx_fn = rx_sch_fn, }, - { - TRXC_FCCH, "FCCH", - 0x00, TRX_CH_LID_DEDIC, - 0x00, 0x00, + [TRXC_BCCH] = { + .name = "BCCH", /* 3GPP TS 05.02, section 3.3.2.3 */ + .desc = "Broadcast control channel", + .chan_nr = RSL_CHAN_BCCH, - /* FCCH is handled by transceiver */ - NULL, NULL, + /* Rx only, xCCH convolutional coding (3GPP TS 05.03, section 4.4), + * regular interleaving (3GPP TS 05.02, clause 7, table 3): + * a L2 frame is interleaved over 4 consecutive bursts. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_AUTO, + .rx_fn = rx_data_fn, }, - { - TRXC_SCH, "SCH", - 0x00, TRX_CH_LID_DEDIC, - 0x00, TRX_CH_FLAG_AUTO, + [TRXC_RACH] = { + .name = "RACH", /* 3GPP TS 05.02, section 3.3.3.1 */ + .desc = "Random access channel", + .chan_nr = RSL_CHAN_RACH, - /** - * We already have clock indications from TRX, - * but we also need BSIC (BCC / NCC) value. - */ - rx_sch_fn, NULL, + /* Tx only, RACH convolutional coding (3GPP TS 05.03, section 4.6). */ + .flags = TRX_CH_FLAG_AUTO, + .tx_fn = tx_rach_fn, }, - { - TRXC_BCCH, "BCCH", - RSL_CHAN_BCCH, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_AUTO, - rx_data_fn, NULL, + [TRXC_CCCH] = { + .name = "CCCH", /* 3GPP TS 05.02, section 3.3.3.1 */ + .desc = "Common control channel", + .chan_nr = RSL_CHAN_PCH_AGCH, + + /* Rx only, xCCH convolutional coding (3GPP TS 05.03, section 4.4), + * regular interleaving (3GPP TS 05.02, clause 7, table 3): + * a L2 frame is interleaved over 4 consecutive bursts. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_AUTO, + .rx_fn = rx_data_fn, }, - { - TRXC_RACH, "RACH", - RSL_CHAN_RACH, TRX_CH_LID_DEDIC, - 0x00, TRX_CH_FLAG_AUTO, - NULL, tx_rach_fn, + [TRXC_TCHF] = { + .name = "TCH/F", /* 3GPP TS 05.02, section 3.2 */ + .desc = "Full Rate traffic channel", + .chan_nr = RSL_CHAN_Bm_ACCHs, + .link_id = TRX_CH_LID_DEDIC, + + /* Rx and Tx, multiple convolutional coding types (3GPP TS 05.03, + * chapter 3), block diagonal interleaving (3GPP TS 05.02, clause 7): + * + * - a traffic frame is interleaved over 8 consecutive bursts + * using the even numbered bits of the first 4 bursts + * and odd numbered bits of the last 4 bursts; + * - a FACCH/F frame 'steals' (replaces) one traffic frame, + * interleaving is done in the same way. + * + * The MS shall continuously transmit bursts, even if there is nothing + * to send, unless DTX (Discontinuous Transmission) is used. */ + .burst_buf_size = 8 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_tchf_fn, + .tx_fn = tx_tchf_fn, }, - { - TRXC_CCCH, "CCCH", - RSL_CHAN_PCH_AGCH, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_AUTO, - rx_data_fn, NULL, + [TRXC_TCHH_0] = { + .name = "TCH/H(0)", /* 3GPP TS 05.02, section 3.2 */ + .desc = "Half Rate traffic channel (sub-channel 0)", + .chan_nr = RSL_CHAN_Lm_ACCHs + (0 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Rx and Tx, multiple convolutional coding types (3GPP TS 05.03, + * chapter 3), block diagonal interleaving (3GPP TS 05.02, clause 7): + * + * - a traffic frame is interleaved over 6 consecutive bursts + * using the even numbered bits of the first 2 bursts, + * all bits of the middle two 2 bursts, + * and odd numbered bits of the last 2 bursts; + * - a FACCH/H frame 'steals' (replaces) two traffic frames, + * interleaving is done over 4 consecutive bursts, + * the same as given for a TCH/FS. + * + * The MS shall continuously transmit bursts, even if there is nothing + * to send, unless DTX (Discontinuous Transmission) is used. */ + .burst_buf_size = 6 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_tchh_fn, + .tx_fn = tx_tchh_fn, }, - { - TRXC_TCHF, "TCH/F", - RSL_CHAN_Bm_ACCHs, TRX_CH_LID_DEDIC, - 8 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_tchf_fn, tx_tchf_fn, + [TRXC_TCHH_1] = { + .name = "TCH/H(1)", /* 3GPP TS 05.02, section 3.2 */ + .desc = "Half Rate traffic channel (sub-channel 1)", + .chan_nr = RSL_CHAN_Lm_ACCHs + (1 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Same as for TRXC_TCHH_0, see above. */ + .burst_buf_size = 6 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_tchh_fn, + .tx_fn = tx_tchh_fn, }, - { - TRXC_TCHH_0, "TCH/H(0)", - RSL_CHAN_Lm_ACCHs, TRX_CH_LID_DEDIC, - 6 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_tchh_fn, tx_tchh_fn, + [TRXC_SDCCH4_0] = { + .name = "SDCCH/4(0)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Stand-alone dedicated control channel (sub-channel 0)", + .chan_nr = RSL_CHAN_SDCCH4_ACCH + (0 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Same as for TRXC_BCCH (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_TCHH_1, "TCH/H(1)", - 0x18, TRX_CH_LID_DEDIC, - 6 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_tchh_fn, tx_tchh_fn, + [TRXC_SDCCH4_1] = { + .name = "SDCCH/4(1)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Stand-alone dedicated control channel (sub-channel 1)", + .chan_nr = RSL_CHAN_SDCCH4_ACCH + (1 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Same as for TRXC_BCCH (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SDCCH4_0, "SDCCH/4(0)", - 0x20, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SDCCH4_2] = { + .name = "SDCCH/4(2)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Stand-alone dedicated control channel (sub-channel 2)", + .chan_nr = RSL_CHAN_SDCCH4_ACCH + (2 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Same as for TRXC_BCCH (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SDCCH4_1, "SDCCH/4(1)", - 0x28, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SDCCH4_3] = { + .name = "SDCCH/4(3)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Stand-alone dedicated control channel (sub-channel 3)", + .chan_nr = RSL_CHAN_SDCCH4_ACCH + (3 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Same as for TRXC_BCCH (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SDCCH4_2, "SDCCH/4(2)", - 0x30, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SDCCH8_0] = { + .name = "SDCCH/8(0)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Stand-alone dedicated control channel (sub-channel 0)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (0 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Same as for TRXC_BCCH and TRXC_SDCCH4_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SDCCH4_3, "SDCCH/4(3)", - 0x38, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SDCCH8_1] = { + .name = "SDCCH/8(1)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Stand-alone dedicated control channel (sub-channel 1)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (1 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Same as for TRXC_BCCH and TRXC_SDCCH4_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SDCCH8_0, "SDCCH/8(0)", - 0x40, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SDCCH8_2] = { + .name = "SDCCH/8(2)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Stand-alone dedicated control channel (sub-channel 2)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (2 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Same as for TRXC_BCCH and TRXC_SDCCH4_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SDCCH8_1, "SDCCH/8(1)", - 0x48, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SDCCH8_3] = { + .name = "SDCCH/8(3)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Stand-alone dedicated control channel (sub-channel 3)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (3 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Same as for TRXC_BCCH and TRXC_SDCCH4_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SDCCH8_2, "SDCCH/8(2)", - 0x50, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SDCCH8_4] = { + .name = "SDCCH/8(4)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Stand-alone dedicated control channel (sub-channel 4)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (4 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Same as for TRXC_BCCH and TRXC_SDCCH4_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SDCCH8_3, "SDCCH/8(3)", - 0x58, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SDCCH8_5] = { + .name = "SDCCH/8(5)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Stand-alone dedicated control channel (sub-channel 5)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (5 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Same as for TRXC_BCCH and TRXC_SDCCH4_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SDCCH8_4, "SDCCH/8(4)", - 0x60, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SDCCH8_6] = { + .name = "SDCCH/8(6)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Stand-alone dedicated control channel (sub-channel 6)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (6 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Same as for TRXC_BCCH and TRXC_SDCCH4_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SDCCH8_5, "SDCCH/8(5)", - 0x68, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SDCCH8_7] = { + .name = "SDCCH/8(7)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Stand-alone dedicated control channel (sub-channel 7)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (7 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Same as for TRXC_BCCH and TRXC_SDCCH4_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SDCCH8_6, "SDCCH/8(6)", - 0x70, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCHTF] = { + .name = "SACCH/TF", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow TCH/F associated control channel", + .chan_nr = RSL_CHAN_Bm_ACCHs, + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SDCCH8_7, "SDCCH/8(7)", - 0x78, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCHTH_0] = { + .name = "SACCH/TH(0)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow TCH/H associated control channel (sub-channel 0)", + .chan_nr = RSL_CHAN_Lm_ACCHs + (0 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCHTF, "SACCH/TF", - 0x08, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCHTH_1] = { + .name = "SACCH/TH(1)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow TCH/H associated control channel (sub-channel 1)", + .chan_nr = RSL_CHAN_Lm_ACCHs + (1 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCHTH_0, "SACCH/TH(0)", - 0x10, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCH4_0] = { + .name = "SACCH/4(0)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow SDCCH/4 associated control channel (sub-channel 0)", + .chan_nr = RSL_CHAN_SDCCH4_ACCH + (0 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH and TRXC_SDCCH4_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCHTH_1, "SACCH/TH(1)", - 0x18, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCH4_1] = { + .name = "SACCH/4(1)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow SDCCH/4 associated control channel (sub-channel 1)", + .chan_nr = RSL_CHAN_SDCCH4_ACCH + (1 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH and TRXC_SDCCH4_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCH4_0, "SACCH/4(0)", - 0x20, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCH4_2] = { + .name = "SACCH/4(2)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow SDCCH/4 associated control channel (sub-channel 2)", + .chan_nr = RSL_CHAN_SDCCH4_ACCH + (2 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH and TRXC_SDCCH4_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCH4_1, "SACCH/4(1)", - 0x28, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCH4_3] = { + .name = "SACCH/4(3)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow SDCCH/4 associated control channel (sub-channel 3)", + .chan_nr = RSL_CHAN_SDCCH4_ACCH + (3 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH and TRXC_SDCCH4_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCH4_2, "SACCH/4(2)", - 0x30, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCH8_0] = { + .name = "SACCH/8(0)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow SDCCH/8 associated control channel (sub-channel 0)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (0 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH and TRXC_SDCCH8_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCH4_3, "SACCH/4(3)", - 0x38, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCH8_1] = { + .name = "SACCH/8(1)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow SDCCH/8 associated control channel (sub-channel 1)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (1 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH and TRXC_SDCCH8_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCH8_0, "SACCH/8(0)", - 0x40, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCH8_2] = { + .name = "SACCH/8(2)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow SDCCH/8 associated control channel (sub-channel 2)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (2 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH and TRXC_SDCCH8_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCH8_1, "SACCH/8(1)", - 0x48, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCH8_3] = { + .name = "SACCH/8(3)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow SDCCH/8 associated control channel (sub-channel 3)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (3 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH and TRXC_SDCCH8_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCH8_2, "SACCH/8(2)", - 0x50, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCH8_4] = { + .name = "SACCH/8(4)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow SDCCH/8 associated control channel (sub-channel 4)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (4 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH and TRXC_SDCCH8_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCH8_3, "SACCH/8(3)", - 0x58, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCH8_5] = { + .name = "SACCH/8(5)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow SDCCH/8 associated control channel (sub-channel 5)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (5 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH and TRXC_SDCCH8_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCH8_4, "SACCH/8(4)", - 0x60, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCH8_6] = { + .name = "SACCH/8(6)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow SDCCH/8 associated control channel (sub-channel 6)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (6 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH and TRXC_SDCCH8_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCH8_5, "SACCH/8(5)", - 0x68, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCH8_7] = { + .name = "SACCH/8(7)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow SDCCH/8 associated control channel (sub-channel 7)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (7 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH and TRXC_SDCCH8_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCH8_6, "SACCH/8(6)", - 0x70, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_PDTCH] = { + .name = "PDTCH", /* 3GPP TS 05.02, sections 3.2.4, 3.3.2.4 */ + .desc = "Packet data traffic & control channel", + .chan_nr = RSL_CHAN_OSMO_PDCH, + + /* Rx and Tx, multiple coding schemes: CS-2..4 and MCS-1..9 (3GPP TS + * 05.03, chapter 5), regular interleaving as specified for xCCH. + * NOTE: the burst buffer is three times bigger because the + * payload of EDGE bursts is three times longer. */ + .burst_buf_size = 3 * 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_PDCH, + .rx_fn = rx_pdtch_fn, + .tx_fn = tx_pdtch_fn, }, - { - TRXC_SACCH8_7, "SACCH/8(7)", - 0x78, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, - }, - { - TRXC_PDTCH, "PDTCH", - RSL_CHAN_OSMO_PDCH, TRX_CH_LID_DEDIC, - 12 * GSM_BURST_PL_LEN, TRX_CH_FLAG_PDCH, - rx_pdtch_fn, tx_pdtch_fn, - }, - { - TRXC_PTCCH, "PTCCH", - RSL_CHAN_OSMO_PDCH, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_PDCH, - rx_data_fn, tx_data_fn, + [TRXC_PTCCH] = { + .name = "PTCCH", /* 3GPP TS 05.02, section 3.3.4.2 */ + .desc = "Packet Timing advance control channel", + .chan_nr = RSL_CHAN_OSMO_PDCH, + + /* Same as for TRXC_BCCH (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_PDCH, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, [TRXC_SDCCH4_CBCH] = { - TRXC_SDCCH4_CBCH, "SDCCH/4(CBCH)", - RSL_CHAN_OSMO_CBCH4, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_AUTO, - rx_data_fn, NULL, + .name = "SDCCH/4(CBCH)", /* 3GPP TS 05.02, section 3.3.5 */ + .desc = "Cell Broadcast channel on SDCCH/4", + .chan_nr = RSL_CHAN_OSMO_CBCH4, + + /* Same as for TRXC_BCCH (xCCH), but Rx only. See above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .rx_fn = rx_data_fn, }, [TRXC_SDCCH8_CBCH] = { - TRXC_SDCCH8_CBCH, "SDCCH/8(CBCH)", - RSL_CHAN_OSMO_CBCH8, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, 0x00, - rx_data_fn, NULL, + .name = "SDCCH/8(CBCH)", /* 3GPP TS 05.02, section 3.3.5 */ + .desc = "Cell Broadcast channel on SDCCH/8", + .chan_nr = RSL_CHAN_OSMO_CBCH8, + + /* Same as for TRXC_BCCH (xCCH), but Rx only. See above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .rx_fn = rx_data_fn, }, }; diff --git a/src/host/trxcon/sched_trx.h b/src/host/trxcon/sched_trx.h index 72d9549..fcb78a7 100644 --- a/src/host/trxcon/sched_trx.h +++ b/src/host/trxcon/sched_trx.h @@ -101,10 +101,11 @@ uint32_t fn, uint8_t bid); struct trx_lchan_desc { - /*! \brief TRX Channel Type */ - enum trx_lchan_type chan; /*! \brief Human-readable name */ const char *name; + /*! \brief Human-readable description */ + const char *desc; + /*! \brief Channel Number (like in RSL) */ uint8_t chan_nr; /*! \brief Link ID (like in RSL) */ -- To view, visit https://gerrit.osmocom.org/14218 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I2fc61e1cdca4690a34e2861b9ee3b7c64ea64843 Gerrit-Change-Number: 14218 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 06:31:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 06:31:09 +0000 Subject: Change in osmocom-bb[master]: firmware/scheduler: Fix CBCH related RSL channel numbers In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14216 ) Change subject: firmware/scheduler: Fix CBCH related RSL channel numbers ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14216 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibb0f90695460e6ede12016c12a0cfdf9c74dfb24 Gerrit-Change-Number: 14216 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 28 May 2019 06:31:09 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 06:31:22 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 06:31:22 +0000 Subject: Change in osmocom-bb[master]: trxcon/sched_trx.c: add missing branch for GSM_PCHAN_PDCH In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14217 ) Change subject: trxcon/sched_trx.c: add missing branch for GSM_PCHAN_PDCH ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14217 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I3b66cab26108ab999a7fe969365ab57dc661399c Gerrit-Change-Number: 14217 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 28 May 2019 06:31:22 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 06:32:22 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 06:32:22 +0000 Subject: Change in osmocom-bb[master]: trxcon/scheduler: refactor description of TRXC_* lchans In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14218 ) Change subject: trxcon/scheduler: refactor description of TRXC_* lchans ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14218 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2fc61e1cdca4690a34e2861b9ee3b7c64ea64843 Gerrit-Change-Number: 14218 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 28 May 2019 06:32:22 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 06:32:24 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 06:32:24 +0000 Subject: Change in osmocom-bb[master]: firmware/scheduler: Fix CBCH related RSL channel numbers In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14216 ) Change subject: firmware/scheduler: Fix CBCH related RSL channel numbers ...................................................................... firmware/scheduler: Fix CBCH related RSL channel numbers CBCH support in the firmware has been introduced almost at the same time it was implemented in trxcon, and the same mistake was made as described in Ia9a415628c659cbc2dd5dc65b875b7f935d6e211. Despite Calypso based PHY does not support PDCH (GPRS channels), let's avoid collisions and use the following cbits values: 0x19 / 0b11001 - MF_TASK_SDCCH4_CBCH on GSM_DCHAN_SDCCH_4_CBCH, 0x1a / 0b11010 - MF_TASK_SDCCH8_CBCH on GSM_DCHAN_SDCCH_8_CBCH. Change-Id: Ibb0f90695460e6ede12016c12a0cfdf9c74dfb24 Related: OS#4027 --- M src/target/firmware/layer1/l23_api.c M src/target/firmware/layer1/mframe_sched.c 2 files changed, 15 insertions(+), 10 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/target/firmware/layer1/l23_api.c b/src/target/firmware/layer1/l23_api.c index daffaf8..e78020d 100644 --- a/src/target/firmware/layer1/l23_api.c +++ b/src/target/firmware/layer1/l23_api.c @@ -97,10 +97,13 @@ lch_idx = cbits & 0x7; master_task = MF_TASK_SDCCH8_0 + lch_idx; multiframe = MF51; - } else if ((cbits & 0x1e) == 0x18) { - /* Osmocom specific extension for CBCH */ - master_task = (cbits & 0x01) ? /* 0b1100T */ - MF_TASK_SDCCH4_CBCH : MF_TASK_SDCCH8_CBCH; + } else if ((cbits & 0x1f) == 0x19) { + /* Osmocom specific extension for CBCH on SDCCH/4 */ + master_task = MF_TASK_SDCCH4_CBCH; + multiframe = MF51; + } else if ((cbits & 0x1f) == 0x1a) { + /* Osmocom specific extension for CBCH on SDCCH/8 */ + master_task = MF_TASK_SDCCH8_CBCH; multiframe = MF51; #if 0 } else if (cbits == 0x10) { @@ -141,10 +144,12 @@ return GSM_DCHAN_SDCCH_4; } else if ((cbits & 0x18) == 0x08) { return GSM_DCHAN_SDCCH_8; - } else if ((cbits & 0x1e) == 0x18) { - /* Osmocom-specific extension for CBCH */ - return (cbits & 0x01) ? /* 0b1100T */ - GSM_DCHAN_SDCCH_8_CBCH : GSM_DCHAN_SDCCH_4_CBCH; + } else if ((cbits & 0x1f) == 0x19) { + /* Osmocom-specific extension for CBCH on SDCCH/4 */ + return GSM_DCHAN_SDCCH_4_CBCH; + } else if ((cbits & 0x1f) == 0x1a) { + /* Osmocom-specific extension for CBCH on SDCCH/8 */ + return GSM_DCHAN_SDCCH_8_CBCH; } return GSM_DCHAN_UNKNOWN; diff --git a/src/target/firmware/layer1/mframe_sched.c b/src/target/firmware/layer1/mframe_sched.c index 7fa38c1..9c2954c 100644 --- a/src/target/firmware/layer1/mframe_sched.c +++ b/src/target/firmware/layer1/mframe_sched.c @@ -416,10 +416,10 @@ /* Osmocom specific extensions */ case MF_TASK_SDCCH4_CBCH: - cbits = 0x18; + cbits = 0x19; break; case MF_TASK_SDCCH8_CBCH: - cbits = 0x19; + cbits = 0x1a; break; case MF_TASK_UL_ALL_NB: -- To view, visit https://gerrit.osmocom.org/14216 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ibb0f90695460e6ede12016c12a0cfdf9c74dfb24 Gerrit-Change-Number: 14216 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 06:32:25 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 06:32:25 +0000 Subject: Change in osmocom-bb[master]: trxcon/sched_trx.c: add missing branch for GSM_PCHAN_PDCH In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14217 ) Change subject: trxcon/sched_trx.c: add missing branch for GSM_PCHAN_PDCH ...................................................................... trxcon/sched_trx.c: add missing branch for GSM_PCHAN_PDCH PDCH channel support was introduced quite a while ago, but there was no way to activate it via L1CTL so far. Let's fix this. Change-Id: I3b66cab26108ab999a7fe969365ab57dc661399c --- M src/host/trxcon/sched_trx.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/host/trxcon/sched_trx.c b/src/host/trxcon/sched_trx.c index 4c93a3c..62fe870 100644 --- a/src/host/trxcon/sched_trx.c +++ b/src/host/trxcon/sched_trx.c @@ -543,6 +543,8 @@ return GSM_PCHAN_CCCH_SDCCH4_CBCH; else if ((cbits & 0x1f) == ABIS_RSL_CHAN_NR_CBITS_OSMO_CBCH8) return GSM_PCHAN_SDCCH8_SACCH8C_CBCH; + else if ((cbits & 0x1f) == ABIS_RSL_CHAN_NR_CBITS_OSMO_PDCH) + return GSM_PCHAN_PDCH; return GSM_PCHAN_NONE; } -- To view, visit https://gerrit.osmocom.org/14217 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I3b66cab26108ab999a7fe969365ab57dc661399c Gerrit-Change-Number: 14217 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 06:32:26 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 06:32:26 +0000 Subject: Change in osmocom-bb[master]: trxcon/scheduler: refactor description of TRXC_* lchans In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14218 ) Change subject: trxcon/scheduler: refactor description of TRXC_* lchans ...................................................................... trxcon/scheduler: refactor description of TRXC_* lchans Let's avoid fancy alignment in the description of logical channels for the benefits of having better readability, the ability to add more comments and fields without making it look ugly. Also, let's get rid of field 'chan' of 'trx_lchan_desc' structure since it's not used anywhere, and not actually needed because the position of each lchan description is defined by its TRXC_* type. As a bonus, let's add a human readable description to each lchan definition, so it can be printed in the VTY some day. Change-Id: I2fc61e1cdca4690a34e2861b9ee3b7c64ea64843 --- M src/host/trxcon/sched_lchan_desc.c M src/host/trxcon/sched_trx.h 2 files changed, 438 insertions(+), 211 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/host/trxcon/sched_lchan_desc.c b/src/host/trxcon/sched_lchan_desc.c index 8bc336e..5cee7c8 100644 --- a/src/host/trxcon/sched_lchan_desc.c +++ b/src/host/trxcon/sched_lchan_desc.c @@ -63,256 +63,482 @@ struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid); const struct trx_lchan_desc trx_lchan_desc[_TRX_CHAN_MAX] = { - { - TRXC_IDLE, "IDLE", - 0x00, TRX_CH_LID_DEDIC, - 0x00, 0x00, + [TRXC_IDLE] = { + .name = "IDLE", + .desc = "Idle channel", + /* The MS needs to perform neighbour measurements during + * IDLE slots, however this is not implemented (yet). */ + }, + [TRXC_FCCH] = { + .name = "FCCH", /* 3GPP TS 05.02, section 3.3.2.1 */ + .desc = "Frequency correction channel", + /* Handled by transceiver, nothing to do. */ + }, + [TRXC_SCH] = { + .name = "SCH", /* 3GPP TS 05.02, section 3.3.2.2 */ + .desc = "Synchronization channel", - /** - * MS: do nothing, save power... - * BTS: send dummy burst on C0 - */ - NULL, NULL, + /* 3GPP TS 05.03, section 4.7. Handled by transceiver, + * however we still need to parse BSIC (BCC / NCC). */ + .flags = TRX_CH_FLAG_AUTO, + .rx_fn = rx_sch_fn, }, - { - TRXC_FCCH, "FCCH", - 0x00, TRX_CH_LID_DEDIC, - 0x00, 0x00, + [TRXC_BCCH] = { + .name = "BCCH", /* 3GPP TS 05.02, section 3.3.2.3 */ + .desc = "Broadcast control channel", + .chan_nr = RSL_CHAN_BCCH, - /* FCCH is handled by transceiver */ - NULL, NULL, + /* Rx only, xCCH convolutional coding (3GPP TS 05.03, section 4.4), + * regular interleaving (3GPP TS 05.02, clause 7, table 3): + * a L2 frame is interleaved over 4 consecutive bursts. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_AUTO, + .rx_fn = rx_data_fn, }, - { - TRXC_SCH, "SCH", - 0x00, TRX_CH_LID_DEDIC, - 0x00, TRX_CH_FLAG_AUTO, + [TRXC_RACH] = { + .name = "RACH", /* 3GPP TS 05.02, section 3.3.3.1 */ + .desc = "Random access channel", + .chan_nr = RSL_CHAN_RACH, - /** - * We already have clock indications from TRX, - * but we also need BSIC (BCC / NCC) value. - */ - rx_sch_fn, NULL, + /* Tx only, RACH convolutional coding (3GPP TS 05.03, section 4.6). */ + .flags = TRX_CH_FLAG_AUTO, + .tx_fn = tx_rach_fn, }, - { - TRXC_BCCH, "BCCH", - RSL_CHAN_BCCH, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_AUTO, - rx_data_fn, NULL, + [TRXC_CCCH] = { + .name = "CCCH", /* 3GPP TS 05.02, section 3.3.3.1 */ + .desc = "Common control channel", + .chan_nr = RSL_CHAN_PCH_AGCH, + + /* Rx only, xCCH convolutional coding (3GPP TS 05.03, section 4.4), + * regular interleaving (3GPP TS 05.02, clause 7, table 3): + * a L2 frame is interleaved over 4 consecutive bursts. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_AUTO, + .rx_fn = rx_data_fn, }, - { - TRXC_RACH, "RACH", - RSL_CHAN_RACH, TRX_CH_LID_DEDIC, - 0x00, TRX_CH_FLAG_AUTO, - NULL, tx_rach_fn, + [TRXC_TCHF] = { + .name = "TCH/F", /* 3GPP TS 05.02, section 3.2 */ + .desc = "Full Rate traffic channel", + .chan_nr = RSL_CHAN_Bm_ACCHs, + .link_id = TRX_CH_LID_DEDIC, + + /* Rx and Tx, multiple convolutional coding types (3GPP TS 05.03, + * chapter 3), block diagonal interleaving (3GPP TS 05.02, clause 7): + * + * - a traffic frame is interleaved over 8 consecutive bursts + * using the even numbered bits of the first 4 bursts + * and odd numbered bits of the last 4 bursts; + * - a FACCH/F frame 'steals' (replaces) one traffic frame, + * interleaving is done in the same way. + * + * The MS shall continuously transmit bursts, even if there is nothing + * to send, unless DTX (Discontinuous Transmission) is used. */ + .burst_buf_size = 8 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_tchf_fn, + .tx_fn = tx_tchf_fn, }, - { - TRXC_CCCH, "CCCH", - RSL_CHAN_PCH_AGCH, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_AUTO, - rx_data_fn, NULL, + [TRXC_TCHH_0] = { + .name = "TCH/H(0)", /* 3GPP TS 05.02, section 3.2 */ + .desc = "Half Rate traffic channel (sub-channel 0)", + .chan_nr = RSL_CHAN_Lm_ACCHs + (0 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Rx and Tx, multiple convolutional coding types (3GPP TS 05.03, + * chapter 3), block diagonal interleaving (3GPP TS 05.02, clause 7): + * + * - a traffic frame is interleaved over 6 consecutive bursts + * using the even numbered bits of the first 2 bursts, + * all bits of the middle two 2 bursts, + * and odd numbered bits of the last 2 bursts; + * - a FACCH/H frame 'steals' (replaces) two traffic frames, + * interleaving is done over 4 consecutive bursts, + * the same as given for a TCH/FS. + * + * The MS shall continuously transmit bursts, even if there is nothing + * to send, unless DTX (Discontinuous Transmission) is used. */ + .burst_buf_size = 6 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_tchh_fn, + .tx_fn = tx_tchh_fn, }, - { - TRXC_TCHF, "TCH/F", - RSL_CHAN_Bm_ACCHs, TRX_CH_LID_DEDIC, - 8 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_tchf_fn, tx_tchf_fn, + [TRXC_TCHH_1] = { + .name = "TCH/H(1)", /* 3GPP TS 05.02, section 3.2 */ + .desc = "Half Rate traffic channel (sub-channel 1)", + .chan_nr = RSL_CHAN_Lm_ACCHs + (1 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Same as for TRXC_TCHH_0, see above. */ + .burst_buf_size = 6 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_tchh_fn, + .tx_fn = tx_tchh_fn, }, - { - TRXC_TCHH_0, "TCH/H(0)", - RSL_CHAN_Lm_ACCHs, TRX_CH_LID_DEDIC, - 6 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_tchh_fn, tx_tchh_fn, + [TRXC_SDCCH4_0] = { + .name = "SDCCH/4(0)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Stand-alone dedicated control channel (sub-channel 0)", + .chan_nr = RSL_CHAN_SDCCH4_ACCH + (0 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Same as for TRXC_BCCH (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_TCHH_1, "TCH/H(1)", - 0x18, TRX_CH_LID_DEDIC, - 6 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_tchh_fn, tx_tchh_fn, + [TRXC_SDCCH4_1] = { + .name = "SDCCH/4(1)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Stand-alone dedicated control channel (sub-channel 1)", + .chan_nr = RSL_CHAN_SDCCH4_ACCH + (1 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Same as for TRXC_BCCH (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SDCCH4_0, "SDCCH/4(0)", - 0x20, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SDCCH4_2] = { + .name = "SDCCH/4(2)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Stand-alone dedicated control channel (sub-channel 2)", + .chan_nr = RSL_CHAN_SDCCH4_ACCH + (2 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Same as for TRXC_BCCH (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SDCCH4_1, "SDCCH/4(1)", - 0x28, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SDCCH4_3] = { + .name = "SDCCH/4(3)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Stand-alone dedicated control channel (sub-channel 3)", + .chan_nr = RSL_CHAN_SDCCH4_ACCH + (3 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Same as for TRXC_BCCH (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SDCCH4_2, "SDCCH/4(2)", - 0x30, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SDCCH8_0] = { + .name = "SDCCH/8(0)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Stand-alone dedicated control channel (sub-channel 0)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (0 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Same as for TRXC_BCCH and TRXC_SDCCH4_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SDCCH4_3, "SDCCH/4(3)", - 0x38, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SDCCH8_1] = { + .name = "SDCCH/8(1)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Stand-alone dedicated control channel (sub-channel 1)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (1 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Same as for TRXC_BCCH and TRXC_SDCCH4_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SDCCH8_0, "SDCCH/8(0)", - 0x40, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SDCCH8_2] = { + .name = "SDCCH/8(2)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Stand-alone dedicated control channel (sub-channel 2)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (2 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Same as for TRXC_BCCH and TRXC_SDCCH4_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SDCCH8_1, "SDCCH/8(1)", - 0x48, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SDCCH8_3] = { + .name = "SDCCH/8(3)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Stand-alone dedicated control channel (sub-channel 3)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (3 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Same as for TRXC_BCCH and TRXC_SDCCH4_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SDCCH8_2, "SDCCH/8(2)", - 0x50, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SDCCH8_4] = { + .name = "SDCCH/8(4)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Stand-alone dedicated control channel (sub-channel 4)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (4 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Same as for TRXC_BCCH and TRXC_SDCCH4_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SDCCH8_3, "SDCCH/8(3)", - 0x58, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SDCCH8_5] = { + .name = "SDCCH/8(5)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Stand-alone dedicated control channel (sub-channel 5)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (5 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Same as for TRXC_BCCH and TRXC_SDCCH4_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SDCCH8_4, "SDCCH/8(4)", - 0x60, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SDCCH8_6] = { + .name = "SDCCH/8(6)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Stand-alone dedicated control channel (sub-channel 6)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (6 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Same as for TRXC_BCCH and TRXC_SDCCH4_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SDCCH8_5, "SDCCH/8(5)", - 0x68, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SDCCH8_7] = { + .name = "SDCCH/8(7)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Stand-alone dedicated control channel (sub-channel 7)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (7 << 3), + .link_id = TRX_CH_LID_DEDIC, + + /* Same as for TRXC_BCCH and TRXC_SDCCH4_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SDCCH8_6, "SDCCH/8(6)", - 0x70, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCHTF] = { + .name = "SACCH/TF", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow TCH/F associated control channel", + .chan_nr = RSL_CHAN_Bm_ACCHs, + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SDCCH8_7, "SDCCH/8(7)", - 0x78, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCHTH_0] = { + .name = "SACCH/TH(0)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow TCH/H associated control channel (sub-channel 0)", + .chan_nr = RSL_CHAN_Lm_ACCHs + (0 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCHTF, "SACCH/TF", - 0x08, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCHTH_1] = { + .name = "SACCH/TH(1)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow TCH/H associated control channel (sub-channel 1)", + .chan_nr = RSL_CHAN_Lm_ACCHs + (1 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCHTH_0, "SACCH/TH(0)", - 0x10, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCH4_0] = { + .name = "SACCH/4(0)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow SDCCH/4 associated control channel (sub-channel 0)", + .chan_nr = RSL_CHAN_SDCCH4_ACCH + (0 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH and TRXC_SDCCH4_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCHTH_1, "SACCH/TH(1)", - 0x18, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCH4_1] = { + .name = "SACCH/4(1)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow SDCCH/4 associated control channel (sub-channel 1)", + .chan_nr = RSL_CHAN_SDCCH4_ACCH + (1 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH and TRXC_SDCCH4_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCH4_0, "SACCH/4(0)", - 0x20, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCH4_2] = { + .name = "SACCH/4(2)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow SDCCH/4 associated control channel (sub-channel 2)", + .chan_nr = RSL_CHAN_SDCCH4_ACCH + (2 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH and TRXC_SDCCH4_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCH4_1, "SACCH/4(1)", - 0x28, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCH4_3] = { + .name = "SACCH/4(3)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow SDCCH/4 associated control channel (sub-channel 3)", + .chan_nr = RSL_CHAN_SDCCH4_ACCH + (3 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH and TRXC_SDCCH4_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCH4_2, "SACCH/4(2)", - 0x30, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCH8_0] = { + .name = "SACCH/8(0)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow SDCCH/8 associated control channel (sub-channel 0)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (0 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH and TRXC_SDCCH8_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCH4_3, "SACCH/4(3)", - 0x38, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCH8_1] = { + .name = "SACCH/8(1)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow SDCCH/8 associated control channel (sub-channel 1)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (1 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH and TRXC_SDCCH8_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCH8_0, "SACCH/8(0)", - 0x40, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCH8_2] = { + .name = "SACCH/8(2)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow SDCCH/8 associated control channel (sub-channel 2)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (2 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH and TRXC_SDCCH8_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCH8_1, "SACCH/8(1)", - 0x48, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCH8_3] = { + .name = "SACCH/8(3)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow SDCCH/8 associated control channel (sub-channel 3)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (3 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH and TRXC_SDCCH8_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCH8_2, "SACCH/8(2)", - 0x50, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCH8_4] = { + .name = "SACCH/8(4)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow SDCCH/8 associated control channel (sub-channel 4)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (4 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH and TRXC_SDCCH8_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCH8_3, "SACCH/8(3)", - 0x58, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCH8_5] = { + .name = "SACCH/8(5)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow SDCCH/8 associated control channel (sub-channel 5)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (5 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH and TRXC_SDCCH8_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCH8_4, "SACCH/8(4)", - 0x60, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCH8_6] = { + .name = "SACCH/8(6)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow SDCCH/8 associated control channel (sub-channel 6)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (6 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH and TRXC_SDCCH8_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCH8_5, "SACCH/8(5)", - 0x68, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_SACCH8_7] = { + .name = "SACCH/8(7)", /* 3GPP TS 05.02, section 3.3.4.1 */ + .desc = "Slow SDCCH/8 associated control channel (sub-channel 7)", + .chan_nr = RSL_CHAN_SDCCH8_ACCH + (7 << 3), + .link_id = TRX_CH_LID_SACCH, + + /* Same as for TRXC_BCCH and TRXC_SDCCH8_* (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_CBTX, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, - { - TRXC_SACCH8_6, "SACCH/8(6)", - 0x70, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, + [TRXC_PDTCH] = { + .name = "PDTCH", /* 3GPP TS 05.02, sections 3.2.4, 3.3.2.4 */ + .desc = "Packet data traffic & control channel", + .chan_nr = RSL_CHAN_OSMO_PDCH, + + /* Rx and Tx, multiple coding schemes: CS-2..4 and MCS-1..9 (3GPP TS + * 05.03, chapter 5), regular interleaving as specified for xCCH. + * NOTE: the burst buffer is three times bigger because the + * payload of EDGE bursts is three times longer. */ + .burst_buf_size = 3 * 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_PDCH, + .rx_fn = rx_pdtch_fn, + .tx_fn = tx_pdtch_fn, }, - { - TRXC_SACCH8_7, "SACCH/8(7)", - 0x78, TRX_CH_LID_SACCH, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_CBTX, - rx_data_fn, tx_data_fn, - }, - { - TRXC_PDTCH, "PDTCH", - RSL_CHAN_OSMO_PDCH, TRX_CH_LID_DEDIC, - 12 * GSM_BURST_PL_LEN, TRX_CH_FLAG_PDCH, - rx_pdtch_fn, tx_pdtch_fn, - }, - { - TRXC_PTCCH, "PTCCH", - RSL_CHAN_OSMO_PDCH, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_PDCH, - rx_data_fn, tx_data_fn, + [TRXC_PTCCH] = { + .name = "PTCCH", /* 3GPP TS 05.02, section 3.3.4.2 */ + .desc = "Packet Timing advance control channel", + .chan_nr = RSL_CHAN_OSMO_PDCH, + + /* Same as for TRXC_BCCH (xCCH), see above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_PDCH, + .rx_fn = rx_data_fn, + .tx_fn = tx_data_fn, }, [TRXC_SDCCH4_CBCH] = { - TRXC_SDCCH4_CBCH, "SDCCH/4(CBCH)", - RSL_CHAN_OSMO_CBCH4, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, TRX_CH_FLAG_AUTO, - rx_data_fn, NULL, + .name = "SDCCH/4(CBCH)", /* 3GPP TS 05.02, section 3.3.5 */ + .desc = "Cell Broadcast channel on SDCCH/4", + .chan_nr = RSL_CHAN_OSMO_CBCH4, + + /* Same as for TRXC_BCCH (xCCH), but Rx only. See above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .rx_fn = rx_data_fn, }, [TRXC_SDCCH8_CBCH] = { - TRXC_SDCCH8_CBCH, "SDCCH/8(CBCH)", - RSL_CHAN_OSMO_CBCH8, TRX_CH_LID_DEDIC, - 4 * GSM_BURST_PL_LEN, 0x00, - rx_data_fn, NULL, + .name = "SDCCH/8(CBCH)", /* 3GPP TS 05.02, section 3.3.5 */ + .desc = "Cell Broadcast channel on SDCCH/8", + .chan_nr = RSL_CHAN_OSMO_CBCH8, + + /* Same as for TRXC_BCCH (xCCH), but Rx only. See above. */ + .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .rx_fn = rx_data_fn, }, }; diff --git a/src/host/trxcon/sched_trx.h b/src/host/trxcon/sched_trx.h index 72d9549..fcb78a7 100644 --- a/src/host/trxcon/sched_trx.h +++ b/src/host/trxcon/sched_trx.h @@ -101,10 +101,11 @@ uint32_t fn, uint8_t bid); struct trx_lchan_desc { - /*! \brief TRX Channel Type */ - enum trx_lchan_type chan; /*! \brief Human-readable name */ const char *name; + /*! \brief Human-readable description */ + const char *desc; + /*! \brief Channel Number (like in RSL) */ uint8_t chan_nr; /*! \brief Link ID (like in RSL) */ -- To view, visit https://gerrit.osmocom.org/14218 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I2fc61e1cdca4690a34e2861b9ee3b7c64ea64843 Gerrit-Change-Number: 14218 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 06:32:31 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 06:32:31 +0000 Subject: Change in osmocom-bb[master]: layer23: fix tons of compiler warnings, mostly OSMO_DEPRECATED related In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14136 ) Change subject: layer23: fix tons of compiler warnings, mostly OSMO_DEPRECATED related ...................................................................... Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14136 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I03918bd864c711b377a795186123c85bb6f4dc4a Gerrit-Change-Number: 14136 Gerrit-PatchSet: 6 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 28 May 2019 06:32:31 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 06:32:34 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 06:32:34 +0000 Subject: Change in osmocom-bb[master]: layer23: fix tons of compiler warnings, mostly OSMO_DEPRECATED related In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14136 ) Change subject: layer23: fix tons of compiler warnings, mostly OSMO_DEPRECATED related ...................................................................... layer23: fix tons of compiler warnings, mostly OSMO_DEPRECATED related Change-Id: I03918bd864c711b377a795186123c85bb6f4dc4a --- M src/host/layer23/src/common/networks.c M src/host/layer23/src/misc/bcch_scan.c M src/host/layer23/src/mobile/gsm322.c M src/host/layer23/src/mobile/gsm411_sms.c M src/host/layer23/src/mobile/gsm480_ss.c M src/host/layer23/src/mobile/gsm48_rr.c M src/host/layer23/src/mobile/subscriber.c 7 files changed, 36 insertions(+), 26 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/common/networks.c b/src/host/layer23/src/common/networks.c index 40b70a1..b4757e9 100644 --- a/src/host/layer23/src/common/networks.c +++ b/src/host/layer23/src/common/networks.c @@ -1822,33 +1822,33 @@ const char *gsm_print_mcc(uint16_t mcc) { - static char string[5] = "000"; + static char string[6] = "000"; - snprintf(string, 4, "%03x", mcc); + snprintf(string, 5, "%03x", mcc); return string; } const char *gsm_print_mnc(uint16_t mnc) { - static char string[7]; + static char string[8]; /* invalid format: return hex value */ if ((mnc & 0xf000) || (mnc & 0x0f00) > 0x0900 || (mnc & 0x00f0) > 0x0090 || ((mnc & 0x000f) > 0x0009 && (mnc & 0x000f) < 0x000f)) { - snprintf(string, 6, "0x%03x", mnc); + snprintf(string, 7, "0x%03x", mnc); return string; } /* two digits */ if ((mnc & 0x000f) == 0x000f) { - snprintf(string, 6, "%02x", mnc >> 4); + snprintf(string, 7, "%02x", mnc >> 4); return string; } /* three digits */ - snprintf(string, 6, "%03x", mnc); + snprintf(string, 7, "%03x", mnc); return string; } diff --git a/src/host/layer23/src/misc/bcch_scan.c b/src/host/layer23/src/misc/bcch_scan.c index 3ba3a1c..5dc0bc3 100644 --- a/src/host/layer23/src/misc/bcch_scan.c +++ b/src/host/layer23/src/misc/bcch_scan.c @@ -199,9 +199,13 @@ case BSCAN_S_WAIT_DATA: cinfo_next_cell(data); break; + case BSCAN_S_NONE: + case BSCAN_S_DONE: + break; } } +#if 0 /* Update cell_info for current cell with received BCCH info */ static int rx_bcch_info(const uint8_t *data) { @@ -233,12 +237,13 @@ static int rx_sch_info() { /* FIXME */ + return 0; } +#endif static int bscan_sig_cb(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data) { - struct cell_info *ci = fps.cur_cell; struct osmocom_ms *ms; struct osmobb_meas_res *mr; uint16_t arfcn; @@ -279,6 +284,9 @@ } _cinfo_start_arfcn(rc); break; + case FPS_S_NONE: + case FPS_S_BINFO: + break; } break; case S_L1CTL_FBSB_RESP: diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index bfe6329..cfd70d8 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -1867,7 +1867,7 @@ /* check C1 criteria not fullfilled */ // TODO: class 3 DCS mobile - band = gsm_arfcn2band(index2arfcn(i)); + gsm_arfcn2band_rc(index2arfcn(i), &band); class = class_of_band(ms, band); c1 = calculate_c1(DCS, rxlev2dbm(cs->list[i].rxlev), s->rxlev_acc_min_db, @@ -4129,7 +4129,8 @@ struct gsm48_sysinfo *s; int i = 0, reselect = 0; uint16_t acc_class; - int band, class; + int class; + enum gsm_band band; struct gsm322_neighbour *nb; time_t now; char arfcn_text[10]; @@ -4200,7 +4201,7 @@ nb->prio_low = 1; /* get C1 & C2 */ - band = gsm_arfcn2band(nb->arfcn); + gsm_arfcn2band_rc(nb->arfcn, &band); class = class_of_band(ms, band); nb->c1 = calculate_c1(DNB, nb->rla_c_dbm, s->rxlev_acc_min_db, ms_pwr_dbm(band, s->ms_txpwr_max_cch), @@ -4697,9 +4698,11 @@ struct llist_head sorted; struct llist_head *lh, *lh2; struct gsm48_sysinfo *s = &cs->sel_si; - int band = gsm_arfcn2band(cs->arfcn); - int class = class_of_band(cs->ms, band); + enum gsm_band band; + int class; + gsm_arfcn2band_rc(cs->arfcn, &band); + class = class_of_band(cs->ms, band); /* calculate the RAL_C of serving cell */ if (cs->rxlev_count) { diff --git a/src/host/layer23/src/mobile/gsm411_sms.c b/src/host/layer23/src/mobile/gsm411_sms.c index c476ff4..08df0f2 100644 --- a/src/host/layer23/src/mobile/gsm411_sms.c +++ b/src/host/layer23/src/mobile/gsm411_sms.c @@ -271,8 +271,8 @@ strcpy(gsms->address, "0"); else gsms->address[0] = '\0'; - gsm48_decode_bcd_number(gsms->address + strlen(gsms->address), - sizeof(gsms->address) - strlen(gsms->address), address_lv, 1); + gsm48_decode_bcd_number2(gsms->address + strlen(gsms->address), + sizeof(gsms->address) - strlen(gsms->address), address_lv, sizeof(address_lv), 1); smsp += oa_len_bytes; gsms->protocol_id = *smsp++; diff --git a/src/host/layer23/src/mobile/gsm480_ss.c b/src/host/layer23/src/mobile/gsm480_ss.c index 5ff3ce6..edc9c97 100644 --- a/src/host/layer23/src/mobile/gsm480_ss.c +++ b/src/host/layer23/src/mobile/gsm480_ss.c @@ -884,9 +884,9 @@ strcpy(number, "0"); else number[0] = '\0'; - gsm48_decode_bcd_number(number + strlen(number), + gsm48_decode_bcd_number2(number + strlen(number), sizeof(number) - strlen(number), - tag_data - 1, 1); + tag_data - 1, tag_len + 1, 1); vty_notify(ms, "Destination: %s\n", number); break; } diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c index c074323..a94fc99 100644 --- a/src/host/layer23/src/mobile/gsm48_rr.c +++ b/src/host/layer23/src/mobile/gsm48_rr.c @@ -1516,6 +1516,9 @@ int slots; uint8_t chan_req; uint8_t tx_power; + enum gsm_band band; + + gsm_arfcn2band_rc(cs->arfcn, &band); /* already assigned */ if (rr->wait_assign == 2) @@ -1657,8 +1660,7 @@ if (set->alter_tx_power) { tx_power = set->alter_tx_power_value; LOGP(DRR, LOGL_INFO, "Use alternative tx-power %d (%d dBm)\n", - tx_power, - ms_pwr_dbm(gsm_arfcn2band(cs->arfcn), tx_power)); + tx_power, ms_pwr_dbm(band, tx_power)); } else { tx_power = s->ms_txpwr_max_cch; /* power offset in case of DCS1800 */ @@ -1666,15 +1668,12 @@ && (cs->arfcn & 1023) <= 885) { LOGP(DRR, LOGL_INFO, "Use MS-TXPWR-MAX-CCH power value " "%d (%d dBm) with offset %d dBm\n", tx_power, - ms_pwr_dbm(gsm_arfcn2band(cs->arfcn), tx_power), - s->po_value * 2); + ms_pwr_dbm(band, tx_power), s->po_value * 2); /* use reserved bits 7,8 for offset (+ X * 2dB) */ tx_power |= s->po_value << 6; } else LOGP(DRR, LOGL_INFO, "Use MS-TXPWR-MAX-CCH power value " - "%d (%d dBm)\n", tx_power, - ms_pwr_dbm(gsm_arfcn2band(cs->arfcn), - tx_power)); + "%d (%d dBm)\n", tx_power, ms_pwr_dbm(band, tx_power)); } ncch->data[7] = tx_power; diff --git a/src/host/layer23/src/mobile/subscriber.c b/src/host/layer23/src/mobile/subscriber.c index e1e6331..b2eacc5 100644 --- a/src/host/layer23/src/mobile/subscriber.c +++ b/src/host/layer23/src/mobile/subscriber.c @@ -348,9 +348,9 @@ strcpy(subscr->sms_sca, "+"); if (((smsp->ts_sca[1] & 0x70) >> 4) == 2) strcpy(subscr->sms_sca, "0"); - gsm48_decode_bcd_number(subscr->sms_sca + - strlen(subscr->sms_sca), sizeof(subscr->sms_sca) - - strlen(subscr->sms_sca), smsp->ts_sca, 1); + gsm48_decode_bcd_number2(subscr->sms_sca + strlen(subscr->sms_sca), + sizeof(subscr->sms_sca) - strlen(subscr->sms_sca), + smsp->ts_sca, sizeof(smsp->ts_sca), 1); } LOGP(DMM, LOGL_INFO, "received SMSP from SIM (sca=%s)\n", -- To view, visit https://gerrit.osmocom.org/14136 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I03918bd864c711b377a795186123c85bb6f4dc4a Gerrit-Change-Number: 14136 Gerrit-PatchSet: 7 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 06:32:35 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 06:32:35 +0000 Subject: Change in osmocom-bb[master]: virt_phy: Fix typo in log message In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14203 ) Change subject: virt_phy: Fix typo in log message ...................................................................... virt_phy: Fix typo in log message Change-Id: I9291957ef5d7033d46060d07f2aa0a3880612e1a --- M src/host/virt_phy/src/l1ctl_sap.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/virt_phy/src/l1ctl_sap.c b/src/host/virt_phy/src/l1ctl_sap.c index aac49bf..8944398 100644 --- a/src/host/virt_phy/src/l1ctl_sap.c +++ b/src/host/virt_phy/src/l1ctl_sap.c @@ -563,7 +563,7 @@ } if (ms->state.state == MS_STATE_DEDICATED) - LOGPMS(DL1C, LOGL_NOTICE, ms, "Harrd termiation of DEDICATED mode, fix L23!\n"); + LOGPMS(DL1C, LOGL_NOTICE, ms, "Hard termination of DEDICATED mode, fix L23!\n"); if (cfg_req->is_uplink) { for (i = 0; i < 8; i++) -- To view, visit https://gerrit.osmocom.org/14203 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I9291957ef5d7033d46060d07f2aa0a3880612e1a Gerrit-Change-Number: 14203 Gerrit-PatchSet: 5 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 06:33:02 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 06:33:02 +0000 Subject: Change in libosmocore[master]: gsm0408/gsm0408_test.c: introduce BCD number encoding / decoding test In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14184 ) Change subject: gsm0408/gsm0408_test.c: introduce BCD number encoding / decoding test ...................................................................... Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14184 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4b2c330cf8ffe4427c0bee7d5f3b74be56ecd85d Gerrit-Change-Number: 14184 Gerrit-PatchSet: 6 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 28 May 2019 06:33:02 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 06:33:14 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 06:33:14 +0000 Subject: Change in libosmocore[master]: gsm0408/gsm0408_test.c: introduce BCD number encoding / decoding test In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14184 ) Change subject: gsm0408/gsm0408_test.c: introduce BCD number encoding / decoding test ...................................................................... gsm0408/gsm0408_test.c: introduce BCD number encoding / decoding test So far, both gsm48_encode_bcd_number() and gsm48_decode_bcd_number2() did not have any unit test coverage. Let's fill this gap by testing the following scenarios: - encoding / decoding of a regular 9-digit MSISDN; - encoding / decoding of a MSISDN with optional LHV; - encoding / decoding of a long 15-digit MSISDN; - encoding / decoding of a MSISDN to a buffer: - with exactly matching size, - with lower size (truncation); - decoding LV buffer with incorrect length, - encoding / decoding an empty input buffer. As it turns out, gsm48_decode_bcd_number2() does not properly handle encoded LV if the output buffer size is equal to the original MSISDN length + 1 (\0-terminator): one digit is lost. For example, decoding of 15-digit long MSISDN to a buffer of size 16 (15 digits + 1 for \0) would give us only 14 digits. This is reflected in the unit test output: Decoding HEX (buffer limit=16) '0821436587092143f5'... Expected: (rc=0) '123456789012345' Actual: (rc=0) '12345678901234' Moreover, if the output buffer is shorter than decoded number, gsm48_decode_bcd_number2() silently truncates it and returns 0, while its description states, that the rc should reflect this. To be fixed in the follow-up patches. Change-Id: I4b2c330cf8ffe4427c0bee7d5f3b74be56ecd85d Related: OS#4025 --- M tests/gsm0408/gsm0408_test.c M tests/gsm0408/gsm0408_test.ok 2 files changed, 224 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved Pau Espin Pedrol: Looks good to me, but someone else must approve diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index 2d60b84..3ccbf4d 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -610,6 +610,181 @@ printf("\n"); } +static const struct bcd_number_test { + /* Human-readable test name */ + const char *test_name; + + /* To be encoded number in ASCII */ + const char *enc_ascii; + /* Expected encoding result in HEX */ + const char *enc_hex; + /* Optional header length (LHV) */ + uint8_t enc_h_len; + /* Expected return code */ + int enc_rc; + + /* To be decoded buffer in HEX */ + const char *dec_hex; + /* Expected decoding result in ASCII */ + const char *dec_ascii; + /* Optional header length (LHV) */ + uint8_t dec_h_len; + /* Expected return code */ + int dec_rc; + + /* Encoding buffer limit (0 means unlimited) */ + size_t enc_buf_lim; + /* Decoding buffer limit (0 means unlimited) */ + size_t dec_buf_lim; +} bcd_number_test_set[] = { + { + .test_name = "regular 9-digit MSISDN", + + /* Encoding test */ + .enc_ascii = "123456789", + .enc_hex = "0521436587f9", + .enc_rc = 6, + + /* Decoding test */ + .dec_hex = "0521436587f9", + .dec_ascii = "123456789", + }, + { + .test_name = "regular 6-digit MSISDN with optional header (LHV)", + + /* Encoding test */ + .enc_ascii = "123456", + .enc_hex = "0700000000214365", + .enc_h_len = 4, /* LHV */ + .enc_rc = 4 + 4, + + /* Decoding test */ + .dec_hex = "07deadbeef214365", + .dec_ascii = "123456", + .dec_h_len = 4, /* LHV */ + }, + { + .test_name = "long 15-digit (maximum) MSISDN", + + /* Encoding test */ + .enc_ascii = "123456789012345", + .enc_hex = "0821436587092143f5", + .enc_rc = 9, + + /* Decoding test */ + .dec_hex = "0821436587092143f5", + .dec_ascii = "123456789012345", + }, + { + .test_name = "long 15-digit (maximum) MSISDN, limited buffer", + + /* Encoding test */ + .enc_ascii = "123456789012345", + .enc_hex = "0821436587092143f5", + .enc_rc = 9, + + /* Decoding test */ + .dec_hex = "0821436587092143f5", + .dec_ascii = "123456789012345", + + /* Buffer length limitations */ + .dec_buf_lim = 15 + 1, + .enc_buf_lim = 9, + }, + { + .test_name = "to be truncated 20-digit MSISDN", + + /* Encoding test (not enough room in buffer) */ + .enc_ascii = "12345678901234567890", + .enc_hex = "", /* nothing */ + .enc_rc = -EIO, + + /* Decoding test (one 5 digits do not fit) */ + .dec_hex = "0a21436587092143658709", + .dec_ascii = "123456789012345", + .dec_rc = 0, + + /* Buffer length limitations */ + .dec_buf_lim = 15 + 1, /* 5 digits less */ + .enc_buf_lim = 9, + }, + { + .test_name = "LV incorrect length", + .dec_hex = "05214365", /* should be 0x03 */ + .dec_ascii = "(none)", + .dec_rc = -EIO, + }, + { + .test_name = "empty input buffer", + + /* Encoding test */ + .enc_ascii = "", + .enc_hex = "00", + .enc_rc = 1, + + /* Decoding test */ + .dec_hex = "", + .dec_ascii = "(none)", + .dec_rc = -EIO, + }, +}; + +static void test_bcd_number_encode_decode() +{ + const struct bcd_number_test *test; + uint8_t buf_enc[0xff] = { 0 }; + char buf_dec[0xff] = { 0 }; + size_t buf_len, i; + int rc; + + printf("BSD number encoding / decoding test\n"); + + for (i = 0; i < ARRAY_SIZE(bcd_number_test_set); i++) { + test = &bcd_number_test_set[i]; + printf("- Running test: %s\n", test->test_name); + + if (test->enc_ascii) { + if (test->enc_buf_lim) + buf_len = test->enc_buf_lim; + else + buf_len = sizeof(buf_enc); + + printf(" - Encoding ASCII (buffer limit=%zu) '%s'...\n", + test->enc_buf_lim, test->enc_ascii); + + rc = gsm48_encode_bcd_number(buf_enc, buf_len, + test->enc_h_len, test->enc_ascii); + printf(" - Expected: (rc=%d) '%s'\n", + test->enc_rc, test->enc_hex); + printf(" - Actual: (rc=%d) '%s'\n", + rc, osmo_hexdump_nospc(buf_enc, rc >= 0 ? rc : 0)); + } + + if (test->dec_hex) { + /* Parse a HEX string */ + rc = osmo_hexparse(test->dec_hex, buf_enc, sizeof(buf_enc)); + OSMO_ASSERT(rc >= 0); + + if (test->dec_buf_lim) + buf_len = test->dec_buf_lim; + else + buf_len = sizeof(buf_dec); + + printf(" - Decoding HEX (buffer limit=%zu) '%s'...\n", + test->dec_buf_lim, test->dec_hex); + + rc = gsm48_decode_bcd_number2(buf_dec, buf_len, + buf_enc, rc, test->dec_h_len); + printf(" - Expected: (rc=%d) '%s'\n", + test->dec_rc, test->dec_ascii); + printf(" - Actual: (rc=%d) '%s'\n", + rc, rc == 0 ? buf_dec : "(none)"); + } + } + + printf("\n"); +} + struct { int range; int arfcns_num; @@ -949,6 +1124,7 @@ test_mid_from_imsi(); test_mid_encode_decode(); test_mid_decode_zero_length(); + test_bcd_number_encode_decode(); test_ra_cap(); test_lai_encode_decode(); diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok index 0bd101d..2441b2b 100644 --- a/tests/gsm0408/gsm0408_test.ok +++ b/tests/gsm0408/gsm0408_test.ok @@ -139,6 +139,54 @@ rc=1 returned empty string +BSD number encoding / decoding test +- Running test: regular 9-digit MSISDN + - Encoding ASCII (buffer limit=0) '123456789'... + - Expected: (rc=6) '0521436587f9' + - Actual: (rc=6) '0521436587f9' + - Decoding HEX (buffer limit=0) '0521436587f9'... + - Expected: (rc=0) '123456789' + - Actual: (rc=0) '123456789' +- Running test: regular 6-digit MSISDN with optional header (LHV) + - Encoding ASCII (buffer limit=0) '123456'... + - Expected: (rc=8) '0700000000214365' + - Actual: (rc=8) '0721436587214365' + - Decoding HEX (buffer limit=0) '07deadbeef214365'... + - Expected: (rc=0) '123456' + - Actual: (rc=0) '123456' +- Running test: long 15-digit (maximum) MSISDN + - Encoding ASCII (buffer limit=0) '123456789012345'... + - Expected: (rc=9) '0821436587092143f5' + - Actual: (rc=9) '0821436587092143f5' + - Decoding HEX (buffer limit=0) '0821436587092143f5'... + - Expected: (rc=0) '123456789012345' + - Actual: (rc=0) '123456789012345' +- Running test: long 15-digit (maximum) MSISDN, limited buffer + - Encoding ASCII (buffer limit=9) '123456789012345'... + - Expected: (rc=9) '0821436587092143f5' + - Actual: (rc=9) '0821436587092143f5' + - Decoding HEX (buffer limit=16) '0821436587092143f5'... + - Expected: (rc=0) '123456789012345' + - Actual: (rc=0) '12345678901234' +- Running test: to be truncated 20-digit MSISDN + - Encoding ASCII (buffer limit=9) '12345678901234567890'... + - Expected: (rc=-5) '' + - Actual: (rc=-5) '' + - Decoding HEX (buffer limit=16) '0a21436587092143658709'... + - Expected: (rc=0) '123456789012345' + - Actual: (rc=0) '12345678901234' +- Running test: LV incorrect length + - Decoding HEX (buffer limit=0) '05214365'... + - Expected: (rc=-5) '(none)' + - Actual: (rc=-5) '(none)' +- Running test: empty input buffer + - Encoding ASCII (buffer limit=0) ''... + - Expected: (rc=1) '00' + - Actual: (rc=1) '00' + - Decoding HEX (buffer limit=0) ''... + - Expected: (rc=-5) '(none)' + - Actual: (rc=-5) '(none)' + Constructed RA: 077-121-666-5 MCC+MNC in BCD: 70 17 21 -- To view, visit https://gerrit.osmocom.org/14184 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I4b2c330cf8ffe4427c0bee7d5f3b74be56ecd85d Gerrit-Change-Number: 14184 Gerrit-PatchSet: 6 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 06:33:14 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 06:33:14 +0000 Subject: Change in libosmocore[master]: gsm48_decode_bcd_number2(): fix output truncation In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14185 ) Change subject: gsm48_decode_bcd_number2(): fix output truncation ...................................................................... gsm48_decode_bcd_number2(): fix output truncation Thanks to the new unit test for BCD number encoding / decoding, it was discovered that gsm48_decode_bcd_number2() does not properly handle encoded LV if the output buffer size is equal to the original MSISDN length + 1 (\0-terminator): one digit is lost. For example, decoding of 15-digit long MSISDN to a buffer of size 16 (15 digits + 1 for \0) would give us only 14 digits. The problem was that 'output_len' was being decremented before checking the remaining buffer length and writing a digit to it. As a result, the maximum length was always one byte shorter. Change-Id: I61d49387fedbf7b238e21540a5eff22f6861e27a Fixes: OS#4025 --- M src/gsm/gsm48_ie.c M tests/gsm0408/gsm0408_test.ok 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/gsm/gsm48_ie.c b/src/gsm/gsm48_ie.c index ca6489a..48d0d37 100644 --- a/src/gsm/gsm48_ie.c +++ b/src/gsm/gsm48_ie.c @@ -88,16 +88,16 @@ for (i = 1 + h_len; i <= in_len; i++) { /* lower nibble */ - output_len--; if (output_len <= 1) break; *output++ = bcd_num_digits[bcd_lv[i] & 0xf]; + output_len--; /* higher nibble */ - output_len--; if (output_len <= 1) break; *output++ = bcd_num_digits[bcd_lv[i] >> 4]; + output_len--; } if (output_len >= 1) *output++ = '\0'; diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok index 2441b2b..3938e87 100644 --- a/tests/gsm0408/gsm0408_test.ok +++ b/tests/gsm0408/gsm0408_test.ok @@ -167,14 +167,14 @@ - Actual: (rc=9) '0821436587092143f5' - Decoding HEX (buffer limit=16) '0821436587092143f5'... - Expected: (rc=0) '123456789012345' - - Actual: (rc=0) '12345678901234' + - Actual: (rc=0) '123456789012345' - Running test: to be truncated 20-digit MSISDN - Encoding ASCII (buffer limit=9) '12345678901234567890'... - Expected: (rc=-5) '' - Actual: (rc=-5) '' - Decoding HEX (buffer limit=16) '0a21436587092143658709'... - Expected: (rc=0) '123456789012345' - - Actual: (rc=0) '12345678901234' + - Actual: (rc=0) '123456789012345' - Running test: LV incorrect length - Decoding HEX (buffer limit=0) '05214365'... - Expected: (rc=-5) '(none)' -- To view, visit https://gerrit.osmocom.org/14185 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I61d49387fedbf7b238e21540a5eff22f6861e27a Gerrit-Change-Number: 14185 Gerrit-PatchSet: 6 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 06:33:15 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 06:33:15 +0000 Subject: Change in libosmocore[master]: gsm48_decode_bcd_number2(): fix: return -ENOSPC on truncation In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14186 ) Change subject: gsm48_decode_bcd_number2(): fix: return -ENOSPC on truncation ...................................................................... gsm48_decode_bcd_number2(): fix: return -ENOSPC on truncation The documentation of gsm48_decode_bcd_number2() clearly states that the output truncation is a erroneous case, so it should actually return negative in such cases. Let's return -ENOSPC. Change-Id: I75680f232001ba419a587fed4c24f32c70c3ad2b --- M src/gsm/gsm48_ie.c M tests/gsm0408/gsm0408_test.c M tests/gsm0408/gsm0408_test.ok 3 files changed, 17 insertions(+), 7 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/gsm/gsm48_ie.c b/src/gsm/gsm48_ie.c index 48d0d37..311836d 100644 --- a/src/gsm/gsm48_ie.c +++ b/src/gsm/gsm48_ie.c @@ -66,9 +66,15 @@ * \param[in] bcd_lv Length-Value part of to-be-decoded IE. * \param[in] input_len Size of the bcd_lv buffer for bounds checking. * \param[in] h_len Length of an optional header between L and V parts. - * \return 0 in case of success, negative on error. Errors checked: no or too little input data, no or too little - * output buffer size, IE length exceeds input data size, decoded number exceeds size of the output buffer. The output - * is guaranteed to be nul terminated iff output_len > 0. + * \return 0 in case of success, negative on error. + * + * Errors checked: + * - no or too little input data (-EIO), + * - IE length exceeds input data size (-EIO), + * - no or too little output buffer size (-ENOSPC), + * - decoded number exceeds size of the output buffer (-ENOSPC). + * + * The output is guaranteed to be nul terminated iff output_len > 0. */ int gsm48_decode_bcd_number2(char *output, size_t output_len, const uint8_t *bcd_lv, size_t input_len, @@ -102,6 +108,10 @@ if (output_len >= 1) *output++ = '\0'; + /* Indicate whether the output was truncated */ + if (i < in_len) + return -ENOSPC; + return 0; } diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index 3ccbf4d..55c9b61 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -702,7 +702,7 @@ /* Decoding test (one 5 digits do not fit) */ .dec_hex = "0a21436587092143658709", .dec_ascii = "123456789012345", - .dec_rc = 0, + .dec_rc = -ENOSPC, /* Buffer length limitations */ .dec_buf_lim = 15 + 1, /* 5 digits less */ @@ -778,7 +778,7 @@ printf(" - Expected: (rc=%d) '%s'\n", test->dec_rc, test->dec_ascii); printf(" - Actual: (rc=%d) '%s'\n", - rc, rc == 0 ? buf_dec : "(none)"); + rc, (rc == 0 || rc == -ENOSPC) ? buf_dec : "(none)"); } } diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok index 3938e87..b080411 100644 --- a/tests/gsm0408/gsm0408_test.ok +++ b/tests/gsm0408/gsm0408_test.ok @@ -173,8 +173,8 @@ - Expected: (rc=-5) '' - Actual: (rc=-5) '' - Decoding HEX (buffer limit=16) '0a21436587092143658709'... - - Expected: (rc=0) '123456789012345' - - Actual: (rc=0) '123456789012345' + - Expected: (rc=-28) '123456789012345' + - Actual: (rc=-28) '123456789012345' - Running test: LV incorrect length - Decoding HEX (buffer limit=0) '05214365'... - Expected: (rc=-5) '(none)' -- To view, visit https://gerrit.osmocom.org/14186 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I75680f232001ba419a587fed4c24f32c70c3ad2b Gerrit-Change-Number: 14186 Gerrit-PatchSet: 6 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 06:33:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 06:33:16 +0000 Subject: Change in libosmocore[master]: gsm48_decode_bcd_number2(): return -EINVAL if LV has too big length In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14187 ) Change subject: gsm48_decode_bcd_number2(): return -EINVAL if LV has too big length ...................................................................... gsm48_decode_bcd_number2(): return -EINVAL if LV has too big length Change-Id: Ie07b2e8bc2f9628904e88448b4ee63b359655123 --- M src/gsm/gsm48_ie.c M tests/gsm0408/gsm0408_test.c M tests/gsm0408/gsm0408_test.ok 3 files changed, 5 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/gsm/gsm48_ie.c b/src/gsm/gsm48_ie.c index 311836d..688698d 100644 --- a/src/gsm/gsm48_ie.c +++ b/src/gsm/gsm48_ie.c @@ -70,7 +70,7 @@ * * Errors checked: * - no or too little input data (-EIO), - * - IE length exceeds input data size (-EIO), + * - IE length exceeds input data size (-EINVAL), * - no or too little output buffer size (-ENOSPC), * - decoded number exceeds size of the output buffer (-ENOSPC). * @@ -90,7 +90,7 @@ in_len = bcd_lv[0]; /* len + 1: the BCD length plus the length byte itself must fit in the input buffer. */ if (input_len < in_len + 1) - return -EIO; + return -EINVAL; for (i = 1 + h_len; i <= in_len; i++) { /* lower nibble */ diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index 55c9b61..d7bae77 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -712,7 +712,7 @@ .test_name = "LV incorrect length", .dec_hex = "05214365", /* should be 0x03 */ .dec_ascii = "(none)", - .dec_rc = -EIO, + .dec_rc = -EINVAL, }, { .test_name = "empty input buffer", diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok index b080411..075886e 100644 --- a/tests/gsm0408/gsm0408_test.ok +++ b/tests/gsm0408/gsm0408_test.ok @@ -177,8 +177,8 @@ - Actual: (rc=-28) '123456789012345' - Running test: LV incorrect length - Decoding HEX (buffer limit=0) '05214365'... - - Expected: (rc=-5) '(none)' - - Actual: (rc=-5) '(none)' + - Expected: (rc=-22) '(none)' + - Actual: (rc=-22) '(none)' - Running test: empty input buffer - Encoding ASCII (buffer limit=0) ''... - Expected: (rc=1) '00' -- To view, visit https://gerrit.osmocom.org/14187 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie07b2e8bc2f9628904e88448b4ee63b359655123 Gerrit-Change-Number: 14187 Gerrit-PatchSet: 6 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 09:29:39 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 28 May 2019 09:29:39 +0000 Subject: Change in osmocom-bb[master]: trxcon/sched_lchan_desc.c: fix missing TRX_CH_FLAG_AUTO flag Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14219 Change subject: trxcon/sched_lchan_desc.c: fix missing TRX_CH_FLAG_AUTO flag ...................................................................... trxcon/sched_lchan_desc.c: fix missing TRX_CH_FLAG_AUTO flag In I2fc61e1cdca4690a34e2861b9ee3b7c64ea64843 I introduced a regression. TRXC_SDCCH4_CBCH should have TRX_CH_FLAG_AUTO, because it's a part of GSM_PCHAN_CCCH_SDCCH4_CBCH multi-frame layout. If the controlling side on the other end of the L1CTL link requests this particular multi-frame layout, CBCH channel is expected to be active. Change-Id: I3ed942106a03220417b5cb9176107af057120fbe --- M src/host/trxcon/sched_lchan_desc.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/19/14219/1 diff --git a/src/host/trxcon/sched_lchan_desc.c b/src/host/trxcon/sched_lchan_desc.c index 5cee7c8..667a88d 100644 --- a/src/host/trxcon/sched_lchan_desc.c +++ b/src/host/trxcon/sched_lchan_desc.c @@ -530,6 +530,7 @@ /* Same as for TRXC_BCCH (xCCH), but Rx only. See above. */ .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_AUTO, .rx_fn = rx_data_fn, }, [TRXC_SDCCH8_CBCH] = { -- To view, visit https://gerrit.osmocom.org/14219 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I3ed942106a03220417b5cb9176107af057120fbe Gerrit-Change-Number: 14219 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 09:32:08 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 28 May 2019 09:32:08 +0000 Subject: Change in osmocom-bb[master]: trxcon/sched_lchan_desc.c: fix missing TRX_CH_FLAG_AUTO flag In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14219 ) Change subject: trxcon/sched_lchan_desc.c: fix missing TRX_CH_FLAG_AUTO flag ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14219 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I3ed942106a03220417b5cb9176107af057120fbe Gerrit-Change-Number: 14219 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 28 May 2019 09:32:08 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 09:32:12 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 28 May 2019 09:32:12 +0000 Subject: Change in osmocom-bb[master]: trxcon/sched_lchan_desc.c: fix missing TRX_CH_FLAG_AUTO flag In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/14219 ) Change subject: trxcon/sched_lchan_desc.c: fix missing TRX_CH_FLAG_AUTO flag ...................................................................... trxcon/sched_lchan_desc.c: fix missing TRX_CH_FLAG_AUTO flag In I2fc61e1cdca4690a34e2861b9ee3b7c64ea64843 I introduced a regression. TRXC_SDCCH4_CBCH should have TRX_CH_FLAG_AUTO, because it's a part of GSM_PCHAN_CCCH_SDCCH4_CBCH multi-frame layout. If the controlling side on the other end of the L1CTL link requests this particular multi-frame layout, CBCH channel is expected to be active. Change-Id: I3ed942106a03220417b5cb9176107af057120fbe --- M src/host/trxcon/sched_lchan_desc.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, approved diff --git a/src/host/trxcon/sched_lchan_desc.c b/src/host/trxcon/sched_lchan_desc.c index 5cee7c8..667a88d 100644 --- a/src/host/trxcon/sched_lchan_desc.c +++ b/src/host/trxcon/sched_lchan_desc.c @@ -530,6 +530,7 @@ /* Same as for TRXC_BCCH (xCCH), but Rx only. See above. */ .burst_buf_size = 4 * GSM_BURST_PL_LEN, + .flags = TRX_CH_FLAG_AUTO, .rx_fn = rx_data_fn, }, [TRXC_SDCCH8_CBCH] = { -- To view, visit https://gerrit.osmocom.org/14219 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I3ed942106a03220417b5cb9176107af057120fbe Gerrit-Change-Number: 14219 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 10:19:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 10:19:18 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: TC_pcu_{time, rts}_ind: Higher tolerances Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14220 Change subject: bts: TC_pcu_{time,rts}_ind: Higher tolerances ...................................................................... bts: TC_pcu_{time,rts}_ind: Higher tolerances When executing the test on our build slaves, we ran into the following: > Number of TDMA Frames (1100) not matching (1073 .. 1093) > Number of TDMA Frames (1096) not matching (1073 .. 1093) So it seems the tolerance was a bit too tight. If the timer runs for a bit more than the requested amount of seconds (e.g. due to high system load), the number of TDMA frames is likely a bit higher and hence we need to permit a larger tolerance. Change-Id: Ib00bb7e7f223fb0329d00e3835127b8c31299e27 --- M bts/BTS_Tests.ttcn 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/20/14220/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 6786d68..968ed6c 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -3713,7 +3713,7 @@ /* verify the number of frames expired matches our expectation */ const float c_GSM_FN_DURATION_MS := 4.61538; var float fn_expected := test_duration * 1000.0 / c_GSM_FN_DURATION_MS; - var template integer t_fn_expected := f_tolerance(float2int(fn_expected), 1, 100000, 10); + var template integer t_fn_expected := f_tolerance(float2int(fn_expected), 1, 100000, 20); if (not match(fn_expired, t_fn_expected)) { setverdict(fail, "Number of TDMA Frames (", fn_expired, ") not matching ", t_fn_expected); } @@ -3778,7 +3778,7 @@ /* verify the number of frames expired matches our expectation */ const float c_GSM_FN_DURATION_MS := 4.61538; var float fn_expected := test_duration * 1000.0 / c_GSM_FN_DURATION_MS; - var template integer t_fn_expected := f_tolerance(float2int(fn_expected), 1, 100000, 10); + var template integer t_fn_expected := f_tolerance(float2int(fn_expected), 1, 100000, 20); if (not match(fn_expired, t_fn_expected)) { setverdict(fail, "Number of TDMA Frames (", fn_expired, ") not matching ", t_fn_expected); } -- To view, visit https://gerrit.osmocom.org/14220 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ib00bb7e7f223fb0329d00e3835127b8c31299e27 Gerrit-Change-Number: 14220 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 10:44:31 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 10:44:31 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: TC_pcu_{time, rts}_ind: Higher tolerances In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14220 ) Change subject: bts: TC_pcu_{time,rts}_ind: Higher tolerances ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14220 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib00bb7e7f223fb0329d00e3835127b8c31299e27 Gerrit-Change-Number: 14220 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 28 May 2019 10:44:31 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 10:44:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 10:44:33 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: TC_pcu_{time, rts}_ind: Higher tolerances In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14220 ) Change subject: bts: TC_pcu_{time,rts}_ind: Higher tolerances ...................................................................... bts: TC_pcu_{time,rts}_ind: Higher tolerances When executing the test on our build slaves, we ran into the following: > Number of TDMA Frames (1100) not matching (1073 .. 1093) > Number of TDMA Frames (1096) not matching (1073 .. 1093) So it seems the tolerance was a bit too tight. If the timer runs for a bit more than the requested amount of seconds (e.g. due to high system load), the number of TDMA frames is likely a bit higher and hence we need to permit a larger tolerance. Change-Id: Ib00bb7e7f223fb0329d00e3835127b8c31299e27 --- M bts/BTS_Tests.ttcn 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 6786d68..968ed6c 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -3713,7 +3713,7 @@ /* verify the number of frames expired matches our expectation */ const float c_GSM_FN_DURATION_MS := 4.61538; var float fn_expected := test_duration * 1000.0 / c_GSM_FN_DURATION_MS; - var template integer t_fn_expected := f_tolerance(float2int(fn_expected), 1, 100000, 10); + var template integer t_fn_expected := f_tolerance(float2int(fn_expected), 1, 100000, 20); if (not match(fn_expired, t_fn_expected)) { setverdict(fail, "Number of TDMA Frames (", fn_expired, ") not matching ", t_fn_expected); } @@ -3778,7 +3778,7 @@ /* verify the number of frames expired matches our expectation */ const float c_GSM_FN_DURATION_MS := 4.61538; var float fn_expected := test_duration * 1000.0 / c_GSM_FN_DURATION_MS; - var template integer t_fn_expected := f_tolerance(float2int(fn_expected), 1, 100000, 10); + var template integer t_fn_expected := f_tolerance(float2int(fn_expected), 1, 100000, 20); if (not match(fn_expired, t_fn_expected)) { setverdict(fail, "Number of TDMA Frames (", fn_expired, ") not matching ", t_fn_expected); } -- To view, visit https://gerrit.osmocom.org/14220 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ib00bb7e7f223fb0329d00e3835127b8c31299e27 Gerrit-Change-Number: 14220 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 11:32:30 2019 From: gerrit-no-reply at lists.osmocom.org (Eric Wild) Date: Tue, 28 May 2019 11:32:30 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Extend BTS_Tests.ttcn with test for RSL channel activation with stati... Message-ID: Eric Wild has uploaded this change for review. ( https://gerrit.osmocom.org/14221 Change subject: Extend BTS_Tests.ttcn with test for RSL channel activation with static MS Power ...................................................................... Extend BTS_Tests.ttcn with test for RSL channel activation with static MS Power Change-Id: Icecf18c77bfe8b049cc0896c4c5b441187be1c0e Related: OS##3750 --- M bts/BTS_Tests.ttcn 1 file changed, 42 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/21/14221/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 1c20657..76a2e68 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -1989,6 +1989,47 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } +/* establish DChan, verify that the BTS sets MS power in the first SACCH L1 header. */ +function f_tc_rsl_chan_initial_ms_pwr(charstring id) runs on ConnHdlr { + var L1ctlDlMessage l1_dl; + var uint5_t ms_power_level := 7; + + var RSL_IE_MS_Power ms_power; + ms_power.reserved := 0; + ms_power.fpc_epc := false; + ms_power.power_level := ms_power_level; + + f_l1_tune(L1CTL); + RSL.clear; + + f_est_dchan(more_ies :={valueof(t_RSL_IE(RSL_IE_MS_POWER, RSL_IE_Body:{ms_power := ms_power}))} ); + + timer T := 1.0; + T.start; + alt { + /* Pick all SACCH blocks for checking */ + [] L1CTL.receive(tr_L1CTL_DATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) -> value l1_dl { + /* The first byte of the L1 header contains the power level.. */ + if (not (l1_dl.payload.data_ind.payload[0] == int2oct(ms_power_level, 1))) { + setverdict(fail, "Power Level in L1 header does not match the signaled (RSL) MS Power Level."); + } + } + /* Ignore all other blocks */ + [] L1CTL.receive { repeat; } + [] T.timeout { + setverdict(fail, "Power Level in L1 header does not match the signaled (RSL) MS Power Level."); + } + } + + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); +} + +testcase TC_rsl_chan_initial_ms_pwr() runs on test_CT { + var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN)); + f_testmatrix_each_chan(pars, refers(f_tc_rsl_chan_initial_ms_pwr)); +} + /* Test if a channel without valid uplink bursts generates RSL CONN FAIL IND (TS 48.058 4.10) */ private function f_TC_conn_fail_crit(charstring id) runs on ConnHdlr { f_l1_tune(L1CTL); @@ -5155,6 +5196,7 @@ execute( TC_meas_res_sign_sdcch8() ); execute( TC_meas_res_sign_tchh_toa256() ); execute( TC_rsl_ms_pwr_ctrl() ); + execute( TC_rsl_chan_initial_ms_pwr() ); execute( TC_rsl_chan_initial_ta() ); execute( TC_conn_fail_crit() ); execute( TC_paging_imsi_80percent() ); -- To view, visit https://gerrit.osmocom.org/14221 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Icecf18c77bfe8b049cc0896c4c5b441187be1c0e Gerrit-Change-Number: 14221 Gerrit-PatchSet: 1 Gerrit-Owner: Eric Wild -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 13:25:55 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 28 May 2019 13:25:55 +0000 Subject: Change in osmocom-bb[master]: trxcon/sched_mframe.c: do not hard-code lchan combinations Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14222 Change subject: trxcon/sched_mframe.c: do not hard-code lchan combinations ...................................................................... trxcon/sched_mframe.c: do not hard-code lchan combinations Having magic pre-calculated hex-masks gives one quite high chances to shoot oneself in the foot, and decreases readability in general. Let's do this pre-calculation during the compilation process, so it's much easier to read, extend and spot potential bugs. Change-Id: If945b3654e35c83fc0220fdd6d99c1c7a0503386 --- M src/host/trxcon/sched_mframe.c 1 file changed, 82 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/22/14222/1 diff --git a/src/host/trxcon/sched_mframe.c b/src/host/trxcon/sched_mframe.c index 0dcf3e7..d427993 100644 --- a/src/host/trxcon/sched_mframe.c +++ b/src/host/trxcon/sched_mframe.c @@ -1916,6 +1916,50 @@ { TRXC_IDLE, 0, TRXC_IDLE, 0 }, }; +/* Logical channel mask for a single channel */ +#define M64(x) \ + ((uint64_t) 0x01 << x) + +/* Logical channel mask for BCCH+CCCH */ +#define M64_BCCH_CCCH \ + (uint64_t) 0x00 \ + | M64(TRXC_FCCH) \ + | M64(TRXC_SCH) \ + | M64(TRXC_BCCH) \ + | M64(TRXC_RACH) \ + | M64(TRXC_CCCH) + +/* Logical channel mask for SDCCH4 (with SACCH, all sub-channels) */ +#define M64_SDCCH4 \ + (uint64_t) 0x00 \ + | M64(TRXC_SDCCH4_0) | M64(TRXC_SACCH4_0) \ + | M64(TRXC_SDCCH4_1) | M64(TRXC_SACCH4_1) \ + | M64(TRXC_SDCCH4_2) | M64(TRXC_SACCH4_2) \ + | M64(TRXC_SDCCH4_3) | M64(TRXC_SACCH4_3) + +/* Logical channel mask for SDCCH8 (with SACCH, all sub-channels) */ +#define M64_SDCCH8 \ + (uint64_t) 0x00 \ + | M64(TRXC_SDCCH8_0) | M64(TRXC_SACCH8_0) \ + | M64(TRXC_SDCCH8_1) | M64(TRXC_SACCH8_1) \ + | M64(TRXC_SDCCH8_2) | M64(TRXC_SACCH8_2) \ + | M64(TRXC_SDCCH8_3) | M64(TRXC_SACCH8_3) \ + | M64(TRXC_SDCCH8_4) | M64(TRXC_SACCH8_4) \ + | M64(TRXC_SDCCH8_5) | M64(TRXC_SACCH8_5) \ + | M64(TRXC_SDCCH8_6) | M64(TRXC_SACCH8_6) \ + | M64(TRXC_SDCCH8_7) | M64(TRXC_SACCH8_7) + +/* Logical channel mask for TCH/F (with SACCH) */ +#define M64_TCHF \ + (uint64_t) 0x00 \ + | M64(TRXC_TCHF) | M64(TRXC_SACCHTF) + +/* Logical channel mask for TCH/H (with SACCH, all sub-channels) */ +#define M64_TCHH \ + (uint64_t) 0x00 \ + | M64(TRXC_TCHH_0) | M64(TRXC_SACCHTH_0) \ + | M64(TRXC_TCHH_1) | M64(TRXC_SACCHTH_1) + /** * A few notes about frame count: * @@ -1928,97 +1972,116 @@ static const struct trx_multiframe layouts[] = { { GSM_PCHAN_NONE, "NONE", - 0, 0xff, (uint64_t) 0x00, + 0, 0xff, + 0x00, NULL }, { GSM_PCHAN_CCCH, "BCCH+CCCH", - 51, 0xff, (uint64_t) 0x3e, + 51, 0xff, + M64_BCCH_CCCH, frame_bcch }, { GSM_PCHAN_CCCH_SDCCH4, "BCCH+CCCH+SDCCH/4+SACCH/4", - 102, 0xff, (uint64_t) 0xf001e3e, + 102, 0xff, + M64_BCCH_CCCH | M64_SDCCH4, frame_bcch_sdcch4 }, { GSM_PCHAN_CCCH_SDCCH4_CBCH, "BCCH+CCCH+SDCCH/4+SACCH/4+CBCH", - 102, 0xff, (uint64_t) 0x400f001e3e, + 102, 0xff, + M64_BCCH_CCCH | M64_SDCCH4 | M64(TRXC_SDCCH4_CBCH), frame_bcch_sdcch4_cbch }, { GSM_PCHAN_SDCCH8_SACCH8C, "SDCCH/8+SACCH/8", - 102, 0xff, (uint64_t) 0xff01fe000, + 102, 0xff, + M64_SDCCH8, frame_sdcch8 }, { GSM_PCHAN_SDCCH8_SACCH8C_CBCH, "SDCCH/8+SACCH/8+CBCH", - 102, 0xff, (uint64_t) 0x8ff01fe000, + 102, 0xff, + M64_SDCCH8 | M64(TRXC_SDCCH8_CBCH), frame_sdcch8_cbch }, { GSM_PCHAN_TCH_F, "TCH/F+SACCH", - 104, 0x01, (uint64_t) 0x200040, + 104, 0x01, + M64_TCHF, frame_tchf_ts0 }, { GSM_PCHAN_TCH_F, "TCH/F+SACCH", - 104, 0x02, (uint64_t) 0x200040, + 104, 0x02, + M64_TCHF, frame_tchf_ts1 }, { GSM_PCHAN_TCH_F, "TCH/F+SACCH", - 104, 0x04, (uint64_t) 0x200040, + 104, 0x04, + M64_TCHF, frame_tchf_ts2 }, { GSM_PCHAN_TCH_F, "TCH/F+SACCH", - 104, 0x08, (uint64_t) 0x200040, + 104, 0x08, + M64_TCHF, frame_tchf_ts3 }, { GSM_PCHAN_TCH_F, "TCH/F+SACCH", - 104, 0x10, (uint64_t) 0x200040, + 104, 0x10, + M64_TCHF, frame_tchf_ts4 }, { GSM_PCHAN_TCH_F, "TCH/F+SACCH", - 104, 0x20, (uint64_t) 0x200040, + 104, 0x20, + M64_TCHF, frame_tchf_ts5 }, { GSM_PCHAN_TCH_F, "TCH/F+SACCH", - 104, 0x40, (uint64_t) 0x200040, + 104, 0x40, + M64_TCHF, frame_tchf_ts6 }, { GSM_PCHAN_TCH_F, "TCH/F+SACCH", - 104, 0x80, (uint64_t) 0x200040, + 104, 0x80, + M64_TCHF, frame_tchf_ts7 }, { GSM_PCHAN_TCH_H, "TCH/H+SACCH", - 104, 0x03, (uint64_t) 0xc00180, + 104, 0x03, + M64_TCHH, frame_tchh_ts01 }, { GSM_PCHAN_TCH_H, "TCH/H+SACCH", - 104, 0x0c, (uint64_t) 0xc00180, + 104, 0x0c, + M64_TCHH, frame_tchh_ts23 }, { GSM_PCHAN_TCH_H, "TCH/H+SACCH", - 104, 0x30, (uint64_t) 0xc00180, + 104, 0x30, + M64_TCHH, frame_tchh_ts45 }, { GSM_PCHAN_TCH_H, "TCH/H+SACCH", - 104, 0xc0, (uint64_t) 0xc00180, + 104, 0xc0, + M64_TCHH, frame_tchh_ts67 }, { GSM_PCHAN_PDCH, "PDCH", - 104, 0xff, (uint64_t) 0x3000000000, + 104, 0xff, + M64(TRXC_PDTCH) | M64(TRXC_PTCCH), frame_pdch }, }; -- To view, visit https://gerrit.osmocom.org/14222 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If945b3654e35c83fc0220fdd6d99c1c7a0503386 Gerrit-Change-Number: 14222 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 13:25:55 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 28 May 2019 13:25:55 +0000 Subject: Change in osmocom-bb[master]: trxcon/l1ctl.c: use #define for RSL_CHAN_RACH Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14223 Change subject: trxcon/l1ctl.c: use #define for RSL_CHAN_RACH ...................................................................... trxcon/l1ctl.c: use #define for RSL_CHAN_RACH Change-Id: Ifdb1703217c7540344cf6772efe812c8a786a0c2 --- M src/host/trxcon/l1ctl.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/23/14223/1 diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c index e6f8f82..65b6a7d 100644 --- a/src/host/trxcon/l1ctl.c +++ b/src/host/trxcon/l1ctl.c @@ -537,7 +537,7 @@ * FIXME: l1ctl_info_ul doesn't provide channel description * FIXME: Can we use other than TS0? */ - chan_nr = 0x88; + chan_nr = RSL_CHAN_RACH; link_id = 0x00; /* Init a new primitive */ -- To view, visit https://gerrit.osmocom.org/14223 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ifdb1703217c7540344cf6772efe812c8a786a0c2 Gerrit-Change-Number: 14223 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 13:27:50 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 28 May 2019 13:27:50 +0000 Subject: Change in osmocom-bb[master]: trxcon/l1ctl.c: use #define for RSL_CHAN_RACH In-Reply-To: References: Message-ID: Vadim Yanitskiy has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/14223 ) Change subject: trxcon/l1ctl.c: use #define for RSL_CHAN_RACH ...................................................................... trxcon/l1ctl.c: use #define for RSL_CHAN_RACH Change-Id: Ifdb1703217c7540344cf6772efe812c8a786a0c2 --- M src/host/trxcon/l1ctl.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/23/14223/2 -- To view, visit https://gerrit.osmocom.org/14223 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ifdb1703217c7540344cf6772efe812c8a786a0c2 Gerrit-Change-Number: 14223 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-CC: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 13:40:02 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 28 May 2019 13:40:02 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Extend BTS_Tests.ttcn with test for RSL channel activation with stati... In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14221 ) Change subject: Extend BTS_Tests.ttcn with test for RSL channel activation with static MS Power ...................................................................... Patch Set 1: (3 comments) https://gerrit.osmocom.org/#/c/14221/1/bts/BTS_Tests.ttcn File bts/BTS_Tests.ttcn: https://gerrit.osmocom.org/#/c/14221/1/bts/BTS_Tests.ttcn at 2013 PS1, Line 2013: l1_dl.payload.data_ind.payload[0] There is a definition for that header in library/GSM_RR_Types.ttcn: type record SacchL1Header { ... }; and a ts_* template: template (value) SacchL1Header ts_SacchL1Header ...; I think we can implement the tr_* (matching) version of this template, and use it here? https://gerrit.osmocom.org/#/c/14221/1/bts/BTS_Tests.ttcn at 2015 PS1, Line 2015: } I think you probably (I am not sure) need to add: setverdict(pass); otherwise the test result is undefined? https://gerrit.osmocom.org/#/c/14221/1/bts/BTS_Tests.ttcn at 2021 PS1, Line 2021: } +1 tab -- To view, visit https://gerrit.osmocom.org/14221 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icecf18c77bfe8b049cc0896c4c5b441187be1c0e Gerrit-Change-Number: 14221 Gerrit-PatchSet: 1 Gerrit-Owner: Eric Wild Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 28 May 2019 13:40:02 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 13:58:36 2019 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 28 May 2019 13:58:36 +0000 Subject: Change in libosmocore[master]: gsm48_rest_octets: Fix license: GPLv2+ instead of AGPLv3+ In-Reply-To: References: Message-ID: Holger Freyther has removed a vote on this change. Change subject: gsm48_rest_octets: Fix license: GPLv2+ instead of AGPLv3+ ...................................................................... Removed Code-Review-2 by Harald Welte -- To view, visit https://gerrit.osmocom.org/14214 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: deleteVote Gerrit-Change-Id: Ief3009dc28dd83e1e26a7101af2eed2341684a87 Gerrit-Change-Number: 14214 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Assignee: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Holger Freyther -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 15:38:07 2019 From: gerrit-no-reply at lists.osmocom.org (Eric Wild) Date: Tue, 28 May 2019 15:38:07 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Extend BTS_Tests.ttcn with test for RSL MODE MODIFY with encryption IE Message-ID: Eric Wild has uploaded this change for review. ( https://gerrit.osmocom.org/14224 Change subject: Extend BTS_Tests.ttcn with test for RSL MODE MODIFY with encryption IE ...................................................................... Extend BTS_Tests.ttcn with test for RSL MODE MODIFY with encryption IE This test will currently fail due to a MODE MODIFY NACK, even though the channel mode is not modified. Related: OS##3750 Change-Id: I4cbea499bb6a331d314e6573548a4540945208b5 --- M bts/BTS_Tests.ttcn M library/RSL_Types.ttcn 2 files changed, 89 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/24/14224/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 968ed6c..429c784 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -4834,6 +4834,71 @@ f_testmatrix_each_chan(pars, refers(f_TC_chan_act_encr)); } +/* Test channel activation with A5/n right from the beginning and RSL MODE MODIFY + which should break the en/decryption on purpose by supplying a new key that is unknown to the MS*/ +function f_TC_rsl_modify_encr(charstring id) runs on ConnHdlr { + f_l1_tune(L1CTL); + f_est_dchan(true); + + /* now we actually need to transmit some data both ways to check if the encryption works */ + var L1ctlDlMessage dl; + + var octetstring l3 := f_rnd_octstring(20); + var RslLinkId link_id := valueof(ts_RslLinkID_DCCH(0)); + + /* send UNITDATA_REQ from BTS to MS and expect it to arrive */ + f_unitdata_mt(link_id, l3); + + /* Send UI frame from MS and expect it to arrive as RLL UNITDATA IND on Abis */ + f_unitdata_mo(link_id, l3); + + var RSL_Message rsl; + rsl := valueof(ts_RSL_MODE_MODIFY_REQ(g_chan_nr, valueof(ts_RSL_ChanMode_SIGN(false)))); + + /* modify key to break proper encryption */ + g_pars.encr.key := f_rnd_octstring(8); + var RSL_IE ei := valueof(t_RSL_IE(RSL_IE_ENCR_INFO, RSL_IE_Body:{encr_info := g_pars.encr})); + rsl.ies := rsl.ies & { ei }; + RSL.send(rsl); + + timer T0 := 1.0; + T0.start; + /* Expect RSL MODIFY ACK */ + alt { + [] RSL.receive(tr_RSL_MODE_MODIFY_ACK(g_chan_nr)) {} + [] RSL.receive(tr_RSL_MODE_MODIFY_NACK(g_chan_nr, ?)) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,"MODE MODIFY NACK"); + } + [] T0.timeout { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "MODE MODIFY NACK"); + } + } + + var octetstring l3msg := f_rnd_octstring(15); + timer T1 := 3.0; + /* Send UI frame from MS, do not expect it to arrive as RLL UNITDATA IND on Abis + due to broken encryption */ + f_tx_lapdm(ts_LAPDm_UI(link_id.sapi, cr_MO_CMD, l3msg), link_id); + T1.start; + alt { + [] RSL.receive(tr_RSL_UNITDATA_IND(g_chan_nr, link_id, l3msg)) { + setverdict(fail); + } + [] T1.timeout { + setverdict(pass); + } + } + + /* release the channel */ + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); + f_rslem_unregister(0, g_chan_nr); +} +testcase TC_rsl_modify_encr() runs on test_CT { + var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN)); + pars.encr := valueof(ts_RSL_IE_EncrInfo(RSL_ALG_ID_A5_1, f_rnd_octstring(8))); + f_testmatrix_each_chan(pars, refers(f_TC_rsl_modify_encr)); +} /* Test unencrypted channel activation followed by explicit ENCR CMD later */ function f_TC_encr_cmd(charstring id) runs on ConnHdlr { @@ -5201,6 +5266,7 @@ execute( TC_meas_res_sign_tchh_toa256() ); execute( TC_rsl_ms_pwr_ctrl() ); execute( TC_rsl_chan_initial_ta() ); + execute( TC_rsl_modify_encr() ); execute( TC_conn_fail_crit() ); execute( TC_paging_imsi_80percent() ); execute( TC_paging_tmsi_80percent() ); diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index 4d23c3f..ef3f45b 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -1353,7 +1353,29 @@ } } - + /* 8.4.9 BSC -> BTS */ + template (value) RSL_Message ts_RSL_MODE_MODIFY_REQ(template (value) RslChannelNr chan_nr, + template (value) RSL_IE_ChannelMode mode) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), + msg_type := RSL_MT_MODE_MODIFY_REQ, + ies :={ + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + t_RSL_IE(RSL_IE_CHAN_MODE, RSL_IE_Body:{chan_mode := mode}) + /* lots of optional IEs */ + } + } + template RSL_Message tr_RSL_MODE_MODIFY_REQ(template RslChannelNr chan_nr, + template RSL_IE_ChannelMode mode) := { + msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), + msg_type := RSL_MT_MODE_MODIFY_REQ, + ies :={ + tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), + tr_RSL_IE(RSL_IE_Body:{chan_mode := mode}), + /* lots of optional IEs */ + * + } + } + /* 8.4.10 BTS -> BSC */ template (value) RSL_Message ts_RSL_MODE_MODIFY_ACK(template (value) RslChannelNr chan_nr) := { msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), -- To view, visit https://gerrit.osmocom.org/14224 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I4cbea499bb6a331d314e6573548a4540945208b5 Gerrit-Change-Number: 14224 Gerrit-PatchSet: 1 Gerrit-Owner: Eric Wild -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 15:50:34 2019 From: gerrit-no-reply at lists.osmocom.org (roh) Date: Tue, 28 May 2019 15:50:34 +0000 Subject: Change in osmo-remsim[master]: osmo-remsim-bankd: Fix typo in help for --num-slots Message-ID: roh has uploaded this change for review. ( https://gerrit.osmocom.org/14225 Change subject: osmo-remsim-bankd: Fix typo in help for --num-slots ...................................................................... osmo-remsim-bankd: Fix typo in help for --num-slots Change-Id: If09833f0d0ba46d7bb204ac9b3b7f8128b4b3799 --- M src/bankd/bankd_main.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/25/14225/1 diff --git a/src/bankd/bankd_main.c b/src/bankd/bankd_main.c index 268794b..8cfeb96 100644 --- a/src/bankd/bankd_main.c +++ b/src/bankd/bankd_main.c @@ -219,7 +219,7 @@ " -i --server-host A.B.C.D remsim-server IP address (default: 127.0.0.1)\n" " -p --server-port <1-65535> remsim-server TCP port (default: 9998)\n" " -b --bank-id <1-65535> Bank Identifier of this SIM bank (default: 1)\n" -" -b --num-slots <1-65535> Number of Slots in this SIM bank (default: 8)\n" +" -n --num-slots <1-65535> Number of Slots in this SIM bank (default: 8)\n" " -I --bind-ip A.B.C.D Local IP address to bind for incoming client\n" " connections (default: INADDR_ANY)\n" " -P --bind-port <1-65535> Local TCP port to bind for incoming client\n" -- To view, visit https://gerrit.osmocom.org/14225 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If09833f0d0ba46d7bb204ac9b3b7f8128b4b3799 Gerrit-Change-Number: 14225 Gerrit-PatchSet: 1 Gerrit-Owner: roh -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 15:50:34 2019 From: gerrit-no-reply at lists.osmocom.org (roh) Date: Tue, 28 May 2019 15:50:34 +0000 Subject: Change in osmo-remsim[master]: osmo-remsim-server: add systemd service script Message-ID: roh has uploaded this change for review. ( https://gerrit.osmocom.org/14226 Change subject: osmo-remsim-server: add systemd service script ...................................................................... osmo-remsim-server: add systemd service script Change-Id: I310a78b49a8a17e4f954179553ed2a3376e3bd50 --- A contrib/systemd/osmo-remsim-server.service 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/26/14226/1 diff --git a/contrib/systemd/osmo-remsim-server.service b/contrib/systemd/osmo-remsim-server.service new file mode 100644 index 0000000..e91e08b --- /dev/null +++ b/contrib/systemd/osmo-remsim-server.service @@ -0,0 +1,12 @@ +[Unit] +Description=Osmocom Remote SIM Server + +[Service] +Type=simple +Restart=always +ExecStart=/usr/bin/osmo-remsim-server +RestartSec=2 + +[Install] +WantedBy=multi-user.target + -- To view, visit https://gerrit.osmocom.org/14226 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I310a78b49a8a17e4f954179553ed2a3376e3bd50 Gerrit-Change-Number: 14226 Gerrit-PatchSet: 1 Gerrit-Owner: roh -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 16:13:19 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 May 2019 16:13:19 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bsc: Add module param to disable osmux (fix bsc-latest jenkins job) Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14227 Change subject: bsc: Add module param to disable osmux (fix bsc-latest jenkins job) ...................................................................... bsc: Add module param to disable osmux (fix bsc-latest jenkins job) ttcn3-bsc-test-latest currently fails on most tests because it tries to use "osmux off" VTY param and only current osmo-bsc master supports it. Change-Id: I61e4c59b2926f3f70cb6d0190a8683861e54179a --- M bsc/BSC_Tests.ttcn 1 file changed, 11 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/27/14227/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 85260bc..a84277f 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -122,6 +122,11 @@ sio := '83'O, rctx := 0 }; + + /* Whether to enable osmux tests. Can be dropped completely and enable + unconditionally once new version of osmo-bsc is released (current + version: 1.4.1) */ + boolean mp_enable_osmux_test := true; } private function f_gen_test_hdlr_pars() return TestHdlrParams { @@ -335,7 +340,9 @@ activate(as_Tguard()); f_init_vty("VirtMSC"); - f_vty_allow_osmux(allow_osmux); + if (mp_enable_osmux_test) { + f_vty_allow_osmux(allow_osmux); + } /* Call a function of our 'parent component' RAN_Adapter_CT to start the * MSC-side BSSAP emulation */ @@ -4061,7 +4068,9 @@ execute( TC_assignment_codec_req_hr_fr() ); execute( TC_assignment_codec_req_fr_hr() ); - execute( TC_assignment_osmux() ); + if (mp_enable_osmux_test) { + execute( TC_assignment_osmux() ); + } /* RLL Establish Indication on inactive DCHAN / SAPI */ execute( TC_rll_est_ind_inact_lchan() ); -- To view, visit https://gerrit.osmocom.org/14227 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I61e4c59b2926f3f70cb6d0190a8683861e54179a Gerrit-Change-Number: 14227 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 16:23:29 2019 From: gerrit-no-reply at lists.osmocom.org (Eric Wild) Date: Tue, 28 May 2019 16:23:29 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Extend BTS_Tests.ttcn with test for RSL channel activation with stati... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14221 to look at the new patch set (#2). Change subject: Extend BTS_Tests.ttcn with test for RSL channel activation with static MS Power ...................................................................... Extend BTS_Tests.ttcn with test for RSL channel activation with static MS Power Change-Id: Icecf18c77bfe8b049cc0896c4c5b441187be1c0e Related: OS##3750 --- M bts/BTS_Tests.ttcn 1 file changed, 43 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/21/14221/2 -- To view, visit https://gerrit.osmocom.org/14221 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Icecf18c77bfe8b049cc0896c4c5b441187be1c0e Gerrit-Change-Number: 14221 Gerrit-PatchSet: 2 Gerrit-Owner: Eric Wild Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 16:26:46 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 28 May 2019 16:26:46 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Extend BTS_Tests.ttcn with test for RSL channel activation with stati... In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14221 ) Change subject: Extend BTS_Tests.ttcn with test for RSL channel activation with static MS Power ...................................................................... Patch Set 2: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/14221/1/bts/BTS_Tests.ttcn File bts/BTS_Tests.ttcn: https://gerrit.osmocom.org/#/c/14221/1/bts/BTS_Tests.ttcn at 2013 PS1, Line 2013: l1_dl.payload.data_ind.payload[0] > There is a definition for that header in library/GSM_RR_Types.ttcn: [?] Not a merge blocker though. I am currently working on this. -- To view, visit https://gerrit.osmocom.org/14221 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icecf18c77bfe8b049cc0896c4c5b441187be1c0e Gerrit-Change-Number: 14221 Gerrit-PatchSet: 2 Gerrit-Owner: Eric Wild Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 28 May 2019 16:26:46 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 16:27:56 2019 From: gerrit-no-reply at lists.osmocom.org (roh) Date: Tue, 28 May 2019 16:27:56 +0000 Subject: Change in osmo-remsim[master]: osmo-remsim-bankd: add systemd service script and etc/default config Message-ID: roh has uploaded this change for review. ( https://gerrit.osmocom.org/14228 Change subject: osmo-remsim-bankd: add systemd service script and etc/default config ...................................................................... osmo-remsim-bankd: add systemd service script and etc/default config Change-Id: Iefa6e65c7a03b232a124758cf8890b660abf6885 --- A contrib/etc_default/osmo-remsim-bankd A contrib/systemd/osmo-remsim-bankd.service 2 files changed, 19 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/28/14228/1 diff --git a/contrib/etc_default/osmo-remsim-bankd b/contrib/etc_default/osmo-remsim-bankd new file mode 100644 index 0000000..9f8a9a9 --- /dev/null +++ b/contrib/etc_default/osmo-remsim-bankd @@ -0,0 +1,5 @@ +# Default settings for osmo-remsim-bankd This file is sourced by systemd + +# Options to pass to osmo-remsim-bankd +BANKD_OPTS="-i 10.9.99.1 -n 5" + diff --git a/contrib/systemd/osmo-remsim-bankd.service b/contrib/systemd/osmo-remsim-bankd.service new file mode 100644 index 0000000..58f5435 --- /dev/null +++ b/contrib/systemd/osmo-remsim-bankd.service @@ -0,0 +1,14 @@ +[Unit] +Description=Osmocom Remote SIM BankD + +[Service] +Type=simple +Restart=always +EnvironmentFile=/etc/default/osmo-remsim-bankd +WorkingDirectory=/etc/osmocom +ExecStart=/usr/bin/osmo-remsim-bankd $BANKD_OPTS +RestartSec=2 + +[Install] +WantedBy=multi-user.target + -- To view, visit https://gerrit.osmocom.org/14228 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Iefa6e65c7a03b232a124758cf8890b660abf6885 Gerrit-Change-Number: 14228 Gerrit-PatchSet: 1 Gerrit-Owner: roh -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 16:36:20 2019 From: gerrit-no-reply at lists.osmocom.org (Eric Wild) Date: Tue, 28 May 2019 16:36:20 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Extend BTS_Tests.ttcn with test for RSL channel activation with stati... In-Reply-To: References: Message-ID: Eric Wild has posted comments on this change. ( https://gerrit.osmocom.org/14221 ) Change subject: Extend BTS_Tests.ttcn with test for RSL channel activation with static MS Power ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/14221/1/bts/BTS_Tests.ttcn File bts/BTS_Tests.ttcn: https://gerrit.osmocom.org/#/c/14221/1/bts/BTS_Tests.ttcn at 2013 PS1, Line 2013: l1_dl.payload.data_ind.payload[0] > Not a merge blocker though. I am currently working on this. I'v pretty much just copied what other tests do, I guess in this particular case there is no real need to match a single byte in a two byte message. -- To view, visit https://gerrit.osmocom.org/14221 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icecf18c77bfe8b049cc0896c4c5b441187be1c0e Gerrit-Change-Number: 14221 Gerrit-PatchSet: 2 Gerrit-Owner: Eric Wild Gerrit-Reviewer: Eric Wild Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 28 May 2019 16:36:20 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 16:43:21 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 May 2019 16:43:21 +0000 Subject: Change in docker-playground[master]: bsc: Disable osmux for ttcn3-bsc-test-latest Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14229 Change subject: bsc: Disable osmux for ttcn3-bsc-test-latest ...................................................................... bsc: Disable osmux for ttcn3-bsc-test-latest Latest tagged version of osmo-bsc doesn't support "osmux on/off" VTY commands, so we have to enable osmux use on that version to avoid most TTCN3 tests failing during set up phase. Depends: osmo-ttcn3-hacks I61e4c59b2926f3f70cb6d0190a8683861e54179a Change-Id: I745b210f43cb147d323a15f78c294f70ee077729 --- M ttcn3-bsc-test/BSC_Tests.cfg M ttcn3-bsc-test/jenkins-sccplite.sh M ttcn3-bsc-test/jenkins.sh 3 files changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/29/14229/1 diff --git a/ttcn3-bsc-test/BSC_Tests.cfg b/ttcn3-bsc-test/BSC_Tests.cfg index 24e8a61..97ce617 100644 --- a/ttcn3-bsc-test/BSC_Tests.cfg +++ b/ttcn3-bsc-test/BSC_Tests.cfg @@ -11,6 +11,7 @@ [MODULE_PARAMETERS] BSC_Tests.mp_bsc_ip := "172.18.2.20"; BSC_Tests.mp_test_ip := "172.18.2.203"; +BSC_Tests.mp_enable_osmux_test := true; BSC_Tests.mp_bssap_cfg := { transport := BSSAP_TRANSPORT_AoIP, sccp_service_type := "mtp3_itu", diff --git a/ttcn3-bsc-test/jenkins-sccplite.sh b/ttcn3-bsc-test/jenkins-sccplite.sh index 0a2ff8b..ed8ffc3 100755 --- a/ttcn3-bsc-test/jenkins-sccplite.sh +++ b/ttcn3-bsc-test/jenkins-sccplite.sh @@ -14,6 +14,9 @@ mkdir $VOL_BASE_DIR/bsc-tester cp sccplite/BSC_Tests.cfg $VOL_BASE_DIR/bsc-tester/ +if [ "$IMAGE_SUFFIX" = "latest" ]; then + sed "s/BSC_Tests.mp_enable_osmux_test := true;/BSC_Tests.mp_enable_osmux_test := false;/g" -i $VOL_BASE_DIR/bsc-tester/BSC_Tests.cfg +fi mkdir $VOL_BASE_DIR/bsc cp sccplite/osmo-bsc.cfg $VOL_BASE_DIR/bsc/ diff --git a/ttcn3-bsc-test/jenkins.sh b/ttcn3-bsc-test/jenkins.sh index af5c965..453fcf0 100755 --- a/ttcn3-bsc-test/jenkins.sh +++ b/ttcn3-bsc-test/jenkins.sh @@ -12,6 +12,10 @@ mkdir $VOL_BASE_DIR/bsc-tester cp BSC_Tests.cfg $VOL_BASE_DIR/bsc-tester/ +# osmux must be disabled until release AFTER osmo-bsc 1.4.1 is tagged +if [ "$IMAGE_SUFFIX" = "latest" ]; then + sed "s/BSC_Tests.mp_enable_osmux_test := true;/BSC_Tests.mp_enable_osmux_test := false;/g" -i $VOL_BASE_DIR/bsc-tester/BSC_Tests.cfg +fi mkdir $VOL_BASE_DIR/stp cp osmo-stp.cfg $VOL_BASE_DIR/stp/ -- To view, visit https://gerrit.osmocom.org/14229 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I745b210f43cb147d323a15f78c294f70ee077729 Gerrit-Change-Number: 14229 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 16:52:50 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 28 May 2019 16:52:50 +0000 Subject: Change in osmo-ttcn3-hacks[master]: L1CTL_Types.ttcn: do not restrict the length of L1ctlDataInd Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14230 Change subject: L1CTL_Types.ttcn: do not restrict the length of L1ctlDataInd ...................................................................... L1CTL_Types.ttcn: do not restrict the length of L1ctlDataInd In the existing TC_pcu_* test cases we use L1CTL_DATA_* messages to send / receive (E)GPRS related MAC-blocks. The length of such blocks can be greater than 23 octets (i.e. fixed MAC-block length in GSM), up to 162 octets to be precise. Change-Id: Iced78796882b757016d02a266d55bc2a98b62a3d --- M library/L1CTL_Types.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/30/14230/1 diff --git a/library/L1CTL_Types.ttcn b/library/L1CTL_Types.ttcn index 87849f5..f59d194 100644 --- a/library/L1CTL_Types.ttcn +++ b/library/L1CTL_Types.ttcn @@ -159,7 +159,7 @@ } with { variant "" }; type record L1ctlDataInd { - octetstring payload length(23) + octetstring payload } with { variant (payload) "BYTEORDER(first)" }; -- To view, visit https://gerrit.osmocom.org/14230 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Iced78796882b757016d02a266d55bc2a98b62a3d Gerrit-Change-Number: 14230 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 16:52:51 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 28 May 2019 16:52:51 +0000 Subject: Change in osmo-ttcn3-hacks[master]: L1CTL_Types.ttcn: accept SacchL1Header in ts_L1CTL_DATA_REQ_SACCH Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14231 Change subject: L1CTL_Types.ttcn: accept SacchL1Header in ts_L1CTL_DATA_REQ_SACCH ...................................................................... L1CTL_Types.ttcn: accept SacchL1Header in ts_L1CTL_DATA_REQ_SACCH In BTS_Tests.ttcn we used to compose L1ctlDataReq manually. This can be done by ts_L1CTL_DATA_REQ_SACCH() template itself, so let's abstract BTS_Tests.ttcn from doing that. Change-Id: I1ae948bd0314cdf15c21ce4b6346d5e32f1fcf95 --- M bts/BTS_Tests.ttcn M library/L1CTL_Types.ttcn 2 files changed, 26 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/31/14231/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 968ed6c..21c697f 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -1523,12 +1523,15 @@ var LapdmFrameAB lb := valueof(ts_LAPDm_AB(0, false, false, enc_GsmRrL3Message(meas_rep))); log("LAPDm: ", lb); - var L1ctlDataReq data_req := { - l1header := valueof(ts_SacchL1Header(g_pars.l1_pars.ms_power_level, false, g_pars.l1_pars.ms_actual_ta)), - l2_payload := f_pad_oct(enc_LapdmFrameAB(lb), 21, '2B'O) - } - log("Sending Measurement Report: ", data_req); - L1CTL.send(ts_L1CTL_DATA_REQ_SACCH(g_chan_nr, ts_RslLinkID_SACCH(0), data_req)); + var template (value) SacchL1Header l1h := ts_SacchL1Header( + g_pars.l1_pars.ms_power_level, false, + g_pars.l1_pars.ms_actual_ta); + + /* TODO: we can use an extension of TTCN-3 for that, i.e. PADDING('2B'O) */ + var octetstring l2 := f_pad_oct(enc_LapdmFrameAB(lb), 21, '2B'O); + + log("Sending Measurement Report: ", l1h, l2); + L1CTL.send(ts_L1CTL_DATA_REQ_SACCH(g_chan_nr, ts_RslLinkID_SACCH(0), l1h, l2)); repeat; } } @@ -4320,19 +4323,16 @@ private function f_tx_lapdm(template (value) LapdmFrame l, template (value) RslLinkId link_id) runs on ConnHdlr { var octetstring l2 := enc_LapdmFrame(valueof(l)); + var template (value) SacchL1Header l1h; + + /* TODO: we can use an extension of TTCN-3 for padding, i.e. PADDING('2B'O) */ if (valueof(link_id.c) == SACCH) { - /* prepend dummy L1 header */ - var L1ctlDataReq l1hl2 := { - l1header := valueof(ts_SacchL1Header(g_pars.l1_pars.ms_power_level, false, g_pars.l1_pars.ms_actual_ta)), - l2_payload := f_pad_oct(l2, 21, '2B'O) - } - L1CTL.send(ts_L1CTL_DATA_REQ_SACCH(g_chan_nr, link_id, l1hl2)); + /* Compose dummy L1 header */ + l1h := ts_SacchL1Header(g_pars.l1_pars.ms_power_level, false, g_pars.l1_pars.ms_actual_ta); + L1CTL.send(ts_L1CTL_DATA_REQ_SACCH(g_chan_nr, link_id, l1h, f_pad_oct(l2, 21, '2B'O))); } else { /* If required, pad L2 frame with constant 0x2b filling */ - l2 := f_pad_oct(l2, 23, '2B'O); - - log("encoding ", l, " to ", l2); - L1CTL.send(ts_L1CTL_DATA_REQ(g_chan_nr, link_id, l2)); + L1CTL.send(ts_L1CTL_DATA_REQ(g_chan_nr, link_id, f_pad_oct(l2, 23, '2B'O))); } } diff --git a/library/L1CTL_Types.ttcn b/library/L1CTL_Types.ttcn index f59d194..2a97099 100644 --- a/library/L1CTL_Types.ttcn +++ b/library/L1CTL_Types.ttcn @@ -594,13 +594,17 @@ ul_info_tbf := omit, ul_info_abs := omit, payload := { - other := l2_data + data_req := { + l1header := omit, + l2_payload := l2_data + } } } template (value) L1ctlUlMessage ts_L1CTL_DATA_REQ_SACCH(template (value) RslChannelNr chan_nr, template (value) RslLinkId link_id, - L1ctlDataReq data_req) := { + template (value) SacchL1Header l1h, + octetstring l2_data) := { header := ts_L1ctlHeader(L1CTL_DATA_REQ), ul_info := { chan_nr := chan_nr, @@ -610,7 +614,10 @@ ul_info_tbf := omit, ul_info_abs := omit, payload := { - data_req := data_req + data_req := { + l1header := l1h, + l2_payload := l2_data + } } } -- To view, visit https://gerrit.osmocom.org/14231 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I1ae948bd0314cdf15c21ce4b6346d5e32f1fcf95 Gerrit-Change-Number: 14231 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 17:03:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 17:03:53 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Extend BTS_Tests.ttcn with test for RSL channel activation with stati... In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14221 ) Change subject: Extend BTS_Tests.ttcn with test for RSL channel activation with static MS Power ...................................................................... Patch Set 1: (2 comments) https://gerrit.osmocom.org/#/c/14221/1/bts/BTS_Tests.ttcn File bts/BTS_Tests.ttcn: https://gerrit.osmocom.org/#/c/14221/1/bts/BTS_Tests.ttcn at 2005 PS1, Line 2005: more_ies :={valueof(t_RSL_IE(RSL_IE_MS_POWER, RSL_IE_Body:{ms_power := ms_power}))} this looks a bit 'clumsy' in terms of stuffing a lot in a single line without good reason. I'd sugest to first define a derived template like template t_RSL_IE_MsPower() := t_RSL_IE(RSL_IE_MS_POWER ... and then use that, or simply split it in two lines: * first assigne the valueof(...) to a local variable * then pass that variable as f_est_dchan(more_ies := {my_var}); https://gerrit.osmocom.org/#/c/14221/1/bts/BTS_Tests.ttcn at 2013 PS1, Line 2013: l1_dl.payload.data_ind.payload[0] > I'v pretty much just copied what other tests do, I guess in this particular case there is no real ne [?] agreed we can avoid going through decode + template match here. -- To view, visit https://gerrit.osmocom.org/14221 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icecf18c77bfe8b049cc0896c4c5b441187be1c0e Gerrit-Change-Number: 14221 Gerrit-PatchSet: 1 Gerrit-Owner: Eric Wild Gerrit-Reviewer: Eric Wild Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Harald Welte Gerrit-Comment-Date: Tue, 28 May 2019 17:03:53 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 17:53:21 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 17:53:21 +0000 Subject: Change in libosmocore[master]: rest_octets: Actually include gsm48_rest_octets.c in Makefile.am Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14232 Change subject: rest_octets: Actually include gsm48_rest_octets.c in Makefile.am ...................................................................... rest_octets: Actually include gsm48_rest_octets.c in Makefile.am The gsm48_rest_octets.c file was added in Change-Id I47888965ab11bba1186c21987f1365c9270abeab, but it never actually ended up being compiled as it wasn't listed in the makefile :/ Change-Id: I0355115c2645f236c9e32cf7a563cf51a857e8a3 Relsted: OS#3075 --- M src/gsm/Makefile.am 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/32/14232/1 diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index 658ef2d..5740b67 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -32,7 +32,7 @@ milenage/milenage.c gan.c ipa.c gsm0341.c apn.c \ gsup.c gsup_sms.c gprs_gea.c gsm0503_conv.c oap.c gsm0808_utils.c \ gsm23003.c mncc.c bts_features.c oap_client.c \ - gsm29118.c + gsm29118.c gsm48_rest_octets.c libgsmint_la_LDFLAGS = -no-undefined libgsmint_la_LIBADD = $(top_builddir)/src/libosmocore.la -- To view, visit https://gerrit.osmocom.org/14232 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I0355115c2645f236c9e32cf7a563cf51a857e8a3 Gerrit-Change-Number: 14232 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 17:53:21 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 17:53:21 +0000 Subject: Change in libosmocore[master]: rest_octets: Use correct symbols names for range encoder Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14233 Change subject: rest_octets: Use correct symbols names for range encoder ...................................................................... rest_octets: Use correct symbols names for range encoder As gsm48_rest_octets.c is not listed in the Makefile.am, it's never actually compiled and we never noticed that it's calling functions by symbol names that don't exist :/ Change-Id: I7b1e436f70e0c60979261db87606f38271ec47d3 Related: OS#3075 --- M src/gsm/gsm48_rest_octets.c 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/33/14233/1 diff --git a/src/gsm/gsm48_rest_octets.c b/src/gsm/gsm48_rest_octets.c index cdb61f1..0171fd9 100644 --- a/src/gsm/gsm48_rest_octets.c +++ b/src/gsm/gsm48_rest_octets.c @@ -256,13 +256,13 @@ /* Select the range and the amount of bits needed */ switch (r) { case OSMO_GSM48_ARFCN_RANGE_128: - return osmo_gsm48_range_enc_range128(chan_list, f0, w); + return osmo_gsm48_range_enc_128(chan_list, f0, w); case OSMO_GSM48_ARFCN_RANGE_256: - return osmo_gsm48_range_enc_range256(chan_list, f0, w); + return osmo_gsm48_range_enc_256(chan_list, f0, w); case OSMO_GSM48_ARFCN_RANGE_512: - return osmo_gsm48_range_enc_range512(chan_list, f0, w); + return osmo_gsm48_range_enc_512(chan_list, f0, w); case OSMO_GSM48_ARFCN_RANGE_1024: - return osmo_gsm48_range_enc_range1024(chan_list, f0, f0_included, w); + return osmo_gsm48_range_enc_1024(chan_list, f0, f0_included, w); default: return -ERANGE; }; -- To view, visit https://gerrit.osmocom.org/14233 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I7b1e436f70e0c60979261db87606f38271ec47d3 Gerrit-Change-Number: 14233 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 17:53:22 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 17:53:22 +0000 Subject: Change in libosmocore[master]: rest_octets: Fix export of osmo_gsm48_rest_octets Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14234 Change subject: rest_octets: Fix export of osmo_gsm48_rest_octets ...................................................................... rest_octets: Fix export of osmo_gsm48_rest_octets the symbols had an omso_ prefix, while the entry in the .map file didn't. As a result, all related symbols were never exported and hence not usable by any users of the dynamic library. Change-Id: I8b1ee2405f6338507e9dfb5f1f437c4c2db2e330 --- M src/gsm/libosmogsm.map 1 file changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/34/14234/1 diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 299504e..319969a 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -301,14 +301,14 @@ gsm48_push_l3hdr; gsm48_att_tlvdef; gsm48_cc_msg_name; -gsm48_rest_octets_si1; -gsm48_rest_octets_si2quater; -gsm48_rest_octets_si2ter; -gsm48_rest_octets_si2bis; -gsm48_rest_octets_si6; -gsm48_rest_octets_si3; -gsm48_rest_octets_si4; -gsm48_rest_octets_si13; +osmo_gsm48_rest_octets_si1; +osmo_gsm48_rest_octets_si2quater; +osmo_gsm48_rest_octets_si2ter; +osmo_gsm48_rest_octets_si2bis; +osmo_gsm48_rest_octets_si6; +osmo_gsm48_rest_octets_si3; +osmo_gsm48_rest_octets_si4; +osmo_gsm48_rest_octets_si13; gsm48_rr_msg_name; gsm48_cc_state_name; gsm48_construct_ra; -- To view, visit https://gerrit.osmocom.org/14234 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I8b1ee2405f6338507e9dfb5f1f437c4c2db2e330 Gerrit-Change-Number: 14234 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 17:53:23 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 17:53:23 +0000 Subject: Change in libosmocore[master]: rest_octets: Suffix encoder functiosn with _encode Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14235 Change subject: rest_octets: Suffix encoder functiosn with _encode ...................................................................... rest_octets: Suffix encoder functiosn with _encode ... otherwise it's not really clear what they do. Change-Id: I08e0ca9a8d13c7aa40b9d90f34f0e13adb87d4e0 --- M include/osmocom/gsm/gsm48_rest_octets.h M src/gsm/gsm48_rest_octets.c M src/gsm/libosmogsm.map 3 files changed, 32 insertions(+), 28 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/35/14235/1 diff --git a/include/osmocom/gsm/gsm48_rest_octets.h b/include/osmocom/gsm/gsm48_rest_octets.h index 6280b6a..3029ac5 100644 --- a/include/osmocom/gsm/gsm48_rest_octets.h +++ b/include/osmocom/gsm/gsm48_rest_octets.h @@ -12,13 +12,15 @@ #define SI2Q_MIN_LEN 18 /* generate SI1 rest octets */ -int osmo_gsm48_rest_octets_si1(uint8_t *data, uint8_t *nch_pos, int is1800_net); -int osmo_gsm48_rest_octets_si2quater(uint8_t *data, uint8_t si2q_index, uint8_t si2q_count, const uint16_t *uarfcn_list, - size_t *u_offset, size_t uarfcn_length, uint16_t *scramble_list, - struct osmo_earfcn_si2q *si2quater_neigh_list, size_t *e_offset); -int osmo_gsm48_rest_octets_si2ter(uint8_t *data); -int osmo_gsm48_rest_octets_si2bis(uint8_t *data); -int osmo_gsm48_rest_octets_si6(uint8_t *data, bool is1800_net); +int osmo_gsm48_rest_octets_si1_encode(uint8_t *data, uint8_t *nch_pos, int is1800_net); +int osmo_gsm48_rest_octets_si2quater_encode(uint8_t *data, uint8_t si2q_index, uint8_t si2q_count, + const uint16_t *uarfcn_list, size_t *u_offset, + size_t uarfcn_length, uint16_t *scramble_list, + struct osmo_earfcn_si2q *si2quater_neigh_list, + size_t *e_offset); +int osmo_gsm48_rest_octets_si2ter_encode(uint8_t *data); +int osmo_gsm48_rest_octets_si2bis_encode(uint8_t *data); +int osmo_gsm48_rest_octets_si6_encode(uint8_t *data, bool is1800_net); struct osmo_gsm48_si_selection_params { uint16_t penalty_time:5, @@ -67,10 +69,10 @@ }; /* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */ -int osmo_gsm48_rest_octets_si3(uint8_t *data, const struct osmo_gsm48_si_ro_info *si3); +int osmo_gsm48_rest_octets_si3_encode(uint8_t *data, const struct osmo_gsm48_si_ro_info *si3); /* Generate SI4 Rest Octets (Chapter 10.5.2.35) */ -int osmo_gsm48_rest_octets_si4(uint8_t *data, const struct osmo_gsm48_si_ro_info *si4, int len); +int osmo_gsm48_rest_octets_si4_encode(uint8_t *data, const struct osmo_gsm48_si_ro_info *si4, int len); struct osmo_gsm48_si13_info { struct osmo_gprs_cell_options cell_opts; @@ -84,4 +86,4 @@ }; /* Generate SI13 Rest Octests (Chapter 10.5.2.37b) */ -int osmo_gsm48_rest_octets_si13(uint8_t *data, const struct osmo_gsm48_si13_info *si13); +int osmo_gsm48_rest_octets_si13_encode(uint8_t *data, const struct osmo_gsm48_si13_info *si13); diff --git a/src/gsm/gsm48_rest_octets.c b/src/gsm/gsm48_rest_octets.c index 0171fd9..b9d5275 100644 --- a/src/gsm/gsm48_rest_octets.c +++ b/src/gsm/gsm48_rest_octets.c @@ -35,7 +35,7 @@ #include /* generate SI1 rest octets */ -int osmo_gsm48_rest_octets_si1(uint8_t *data, uint8_t *nch_pos, int is1800_net) +int osmo_gsm48_rest_octets_si1_encode(uint8_t *data, uint8_t *nch_pos, int is1800_net) { struct bitvec bv; @@ -430,9 +430,11 @@ } /* generate SI2quater rest octets: 3GPP TS 44.018 ? 10.5.2.33b */ -int osmo_gsm48_rest_octets_si2quater(uint8_t *data, uint8_t si2q_index, uint8_t si2q_count, const uint16_t *uarfcn_list, - size_t *u_offset, size_t uarfcn_length, uint16_t *scramble_list, - struct osmo_earfcn_si2q *si2quater_neigh_list, size_t *e_offset) +int osmo_gsm48_rest_octets_si2quater_encode(uint8_t *data, uint8_t si2q_index, uint8_t si2q_count, + const uint16_t *uarfcn_list, size_t *u_offset, + size_t uarfcn_length, uint16_t *scramble_list, + struct osmo_earfcn_si2q *si2quater_neigh_list, + size_t *e_offset) { int rc; struct bitvec bv; @@ -535,7 +537,7 @@ } /* Generate SI2ter Rest Octests 3GPP TS 44.018 Table 10.5.2.33a.1 */ -int osmo_gsm48_rest_octets_si2ter(uint8_t *data) +int osmo_gsm48_rest_octets_si2ter_encode(uint8_t *data) { struct bitvec bv; @@ -552,7 +554,7 @@ } /* Generate SI2bis Rest Octests 3GPP TS 44.018 Table 10.5.2.33.1 */ -int osmo_gsm48_rest_octets_si2bis(uint8_t *data) +int osmo_gsm48_rest_octets_si2bis_encode(uint8_t *data) { struct bitvec bv; @@ -566,7 +568,7 @@ } /* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */ -int osmo_gsm48_rest_octets_si3(uint8_t *data, const struct osmo_gsm48_si_ro_info *si3) +int osmo_gsm48_rest_octets_si3_encode(uint8_t *data, const struct osmo_gsm48_si_ro_info *si3) { struct bitvec bv; @@ -626,7 +628,7 @@ } /* Generate SI4 Rest Octets (Chapter 10.5.2.35) */ -int osmo_gsm48_rest_octets_si4(uint8_t *data, const struct osmo_gsm48_si_ro_info *si4, int len) +int osmo_gsm48_rest_octets_si4_encode(uint8_t *data, const struct osmo_gsm48_si_ro_info *si4, int len) { struct bitvec bv; @@ -685,7 +687,7 @@ { L | H < GPRS_MS_TXPWR_MAX_CCH : bit (5) > } ; */ -int osmo_gsm48_rest_octets_si6(uint8_t *data, bool is1800_net) +int osmo_gsm48_rest_octets_si6_encode(uint8_t *data, bool is1800_net) { struct bitvec bv; @@ -908,7 +910,7 @@ } /* Generate SI13 Rest Octests (04.08 Chapter 10.5.2.37b) */ -int osmo_gsm48_rest_octets_si13(uint8_t *data, const struct osmo_gsm48_si13_info *si13) +int osmo_gsm48_rest_octets_si13_encode(uint8_t *data, const struct osmo_gsm48_si13_info *si13) { struct bitvec bv; diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 319969a..56fed0f 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -301,14 +301,14 @@ gsm48_push_l3hdr; gsm48_att_tlvdef; gsm48_cc_msg_name; -osmo_gsm48_rest_octets_si1; -osmo_gsm48_rest_octets_si2quater; -osmo_gsm48_rest_octets_si2ter; -osmo_gsm48_rest_octets_si2bis; -osmo_gsm48_rest_octets_si6; -osmo_gsm48_rest_octets_si3; -osmo_gsm48_rest_octets_si4; -osmo_gsm48_rest_octets_si13; +osmo_gsm48_rest_octets_si1_encode; +osmo_gsm48_rest_octets_si2quater_encode; +osmo_gsm48_rest_octets_si2ter_encode; +osmo_gsm48_rest_octets_si2bis_encode; +osmo_gsm48_rest_octets_si6_encode; +osmo_gsm48_rest_octets_si3_encode; +osmo_gsm48_rest_octets_si4_encode; +osmo_gsm48_rest_octets_si13_encode; gsm48_rr_msg_name; gsm48_cc_state_name; gsm48_construct_ra; -- To view, visit https://gerrit.osmocom.org/14235 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I08e0ca9a8d13c7aa40b9d90f34f0e13adb87d4e0 Gerrit-Change-Number: 14235 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 17:53:23 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 17:53:23 +0000 Subject: Change in libosmocore[master]: rest_octets: Add function to parse SI3 rest octets Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14236 Change subject: rest_octets: Add function to parse SI3 rest octets ...................................................................... rest_octets: Add function to parse SI3 rest octets Change-Id: I690cf308311f910005a325d50f5d5d825678d2b2 Related: OS#3075 Related: OS#4023 --- M include/osmocom/gsm/gsm48_rest_octets.h M src/gsm/gsm48_rest_octets.c M src/gsm/libosmogsm.map 3 files changed, 82 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/36/14236/1 diff --git a/include/osmocom/gsm/gsm48_rest_octets.h b/include/osmocom/gsm/gsm48_rest_octets.h index 3029ac5..bc5023a 100644 --- a/include/osmocom/gsm/gsm48_rest_octets.h +++ b/include/osmocom/gsm/gsm48_rest_octets.h @@ -87,3 +87,6 @@ /* Generate SI13 Rest Octests (Chapter 10.5.2.37b) */ int osmo_gsm48_rest_octets_si13_encode(uint8_t *data, const struct osmo_gsm48_si13_info *si13); + +/* Parse SI3 Rest Octets */ +void osmo_gsm48_rest_octets_si3_decode(struct osmo_gsm48_si_ro_info *si3, const uint8_t *data); diff --git a/src/gsm/gsm48_rest_octets.c b/src/gsm/gsm48_rest_octets.c index b9d5275..d5c93fe 100644 --- a/src/gsm/gsm48_rest_octets.c +++ b/src/gsm/gsm48_rest_octets.c @@ -951,3 +951,81 @@ bitvec_spare_padding(&bv, (bv.data_len*8)-1); return bv.data_len; } + + +/*********************************************************************** + * Decoder + ***********************************************************************/ + +/*! Decode SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72). + * \param[out] si3 decoded SI3 rest octets + * \param[in] encoded SI3 rest octets, 4 octets long */ +void osmo_gsm48_rest_octets_si3_decode(struct osmo_gsm48_si_ro_info *si3, const uint8_t *data) +{ + struct osmo_gsm48_si_selection_params *sp = &si3->selection_params; + struct osmo_gsm48_si_power_offset *po = &si3->power_offset; + struct osmo_gsm48_si3_gprs_ind *gi = &si3->gprs_ind; + struct bitvec bv; + + memset(&bv, 0, sizeof(bv)); + bv.data = (uint8_t *) data; + bv.data_len = 4; + + memset(si3, 0, sizeof(*si3)); + + /* Optional Selection Paraosmo_gsm48_si_ro_infometers */ + if (bitvec_get_bit_high(&bv) == H) { + sp->present = 1; + sp->cbq = bitvec_get_uint(&bv, 1); + sp->cell_resel_off = bitvec_get_uint(&bv, 6); + sp->temp_offs = bitvec_get_uint(&bv, 3); + sp->penalty_time = bitvec_get_uint(&bv, 5); + } else + sp->present = 0; + + /* Optional Power Offset */ + if (bitvec_get_bit_high(&bv) == H) { + po->present = 1; + po->power_offset = bitvec_get_uint(&bv, 2); + } else + po->present = 0; + + /* System Information 2ter Indicator */ + if (bitvec_get_bit_high(&bv) == H) + si3->si2ter_indicator = 1; + else + si3->si2ter_indicator = 0; + + /* Early Classmark Sending Control */ + if (bitvec_get_bit_high(&bv) == H) + si3->early_cm_ctrl = 1; + else + si3->early_cm_ctrl = 0; + + /* Scheduling if and where */ + if (bitvec_get_bit_high(&bv) == H) { + si3->scheduling.present = 1; + si3->scheduling.where = bitvec_get_uint(&bv, 3); + } else + si3->scheduling.present = 0; + + /* GPRS Indicator */ + if (bitvec_get_bit_high(&bv) == H) { + gi->present = 1; + gi->ra_colour = bitvec_get_uint(&bv, 3); + gi->si13_position = bitvec_get_uint(&bv, 1); + } else + gi->present = 0; + + /* 3G Early Classmark Sending Restriction. If H, then controlled by + * early_cm_ctrl above */ + if (bitvec_get_bit_high(&bv) == H) + si3->early_cm_restrict_3g = 1; + else + si3->early_cm_restrict_3g = 0; + + if (bitvec_get_bit_high(&bv) == H) + si3->si2quater_indicator = 1; + else + si3->si2quater_indicator = 0; +} diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 56fed0f..84d71e6 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -309,6 +309,7 @@ osmo_gsm48_rest_octets_si3_encode; osmo_gsm48_rest_octets_si4_encode; osmo_gsm48_rest_octets_si13_encode; +osmo_gsm48_rest_octets_si3_decode; gsm48_rr_msg_name; gsm48_cc_state_name; gsm48_construct_ra; -- To view, visit https://gerrit.osmocom.org/14236 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I690cf308311f910005a325d50f5d5d825678d2b2 Gerrit-Change-Number: 14236 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 17:53:23 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 17:53:23 +0000 Subject: Change in libosmocore[master]: rest_octets: Implement actual SI6 rest octets encoding Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14237 Change subject: rest_octets: Implement actual SI6 rest octets encoding ...................................................................... rest_octets: Implement actual SI6 rest octets encoding There's very little sense behind introducing a function into libosmogsm which doesn't implement 90% of the spec. Let's allow the caller to provide the various optional bits of information to the encoder, rather than generating mostly static SI6 rest octets. Change-Id: Id75005a0c4a02ce7f809692d58b3bd226bc582b2 --- M include/osmocom/gsm/gsm48_rest_octets.h M src/gsm/gsm48_rest_octets.c 2 files changed, 75 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/37/14237/1 diff --git a/include/osmocom/gsm/gsm48_rest_octets.h b/include/osmocom/gsm/gsm48_rest_octets.h index bc5023a..7163672 100644 --- a/include/osmocom/gsm/gsm48_rest_octets.h +++ b/include/osmocom/gsm/gsm48_rest_octets.h @@ -20,7 +20,44 @@ size_t *e_offset); int osmo_gsm48_rest_octets_si2ter_encode(uint8_t *data); int osmo_gsm48_rest_octets_si2bis_encode(uint8_t *data); -int osmo_gsm48_rest_octets_si6_encode(uint8_t *data, bool is1800_net); + +struct osmo_gsm48_si_pch_nch_info { + bool present; + bool paging_channel_restructuring; + uint8_t nln_sacch; + bool call_priority_present; + uint8_t call_priority; + bool nln_status_sacch; +}; + +struct osmo_gsm48_si_vbs_vgcs_options { + bool present; + bool inband_notifications; + bool inband_pagings; +}; + +struct osmo_gsm48_si_dtm_support { + bool present; + uint8_t rac; + uint8_t max_lapdm; +}; + +struct osmo_gsm48_si_gprs_ms_txpwr_max_ccch { + bool present; + uint8_t max_txpwr; +}; + +struct osmo_gsm48_si6_ro_info { + struct osmo_gsm48_si_pch_nch_info pch_nch_info; + struct osmo_gsm48_si_vbs_vgcs_options vbs_vgcs_options; + struct osmo_gsm48_si_dtm_support dtm_support; + bool band_indicator_1900; + struct osmo_gsm48_si_gprs_ms_txpwr_max_ccch gprs_ms_txpwr_max_ccch; + /* MBMS: not supported in Osmocom */ + /* AMR config (group channel): not supported in Osmocom */ +}; + +int osmo_gsm48_rest_octets_si6_encode(uint8_t *data, const struct osmo_gsm48_si6_ro_info *in); struct osmo_gsm48_si_selection_params { uint16_t penalty_time:5, diff --git a/src/gsm/gsm48_rest_octets.c b/src/gsm/gsm48_rest_octets.c index d5c93fe..c1e4b30 100644 --- a/src/gsm/gsm48_rest_octets.c +++ b/src/gsm/gsm48_rest_octets.c @@ -687,7 +687,7 @@ { L | H < GPRS_MS_TXPWR_MAX_CCH : bit (5) > } ; */ -int osmo_gsm48_rest_octets_si6_encode(uint8_t *data, bool is1800_net) +int osmo_gsm48_rest_octets_si6_encode(uint8_t *data, const struct osmo_gsm48_si6_ro_info *in) { struct bitvec bv; @@ -695,19 +695,43 @@ bv.data = data; bv.data_len = 1; - /* no PCH/NCH info */ - bitvec_set_bit(&bv, L); - /* no VBS/VGCS options */ - bitvec_set_bit(&bv, L); - /* no DTM_support */ - bitvec_set_bit(&bv, L); - /* band indicator */ - if (is1800_net) - bitvec_set_bit(&bv, L); - else + if (in->pch_nch_info.present) { bitvec_set_bit(&bv, H); - /* no GPRS_MS_TXPWR_MAX_CCH */ - bitvec_set_bit(&bv, L); + bitvec_set_bit(&bv, !!in->pch_nch_info.paging_channel_restructuring); + bitvec_set_uint(&bv, in->pch_nch_info.nln_sacch, 2); + if (in->pch_nch_info.call_priority_present) { + bitvec_set_bit(&bv, 1); + bitvec_set_uint(&bv, in->pch_nch_info.call_priority, 3); + } else + bitvec_set_bit(&bv, 0); + bitvec_set_bit(&bv, !!in->pch_nch_info.nln_status_sacch); + } else + bitvec_set_bit(&bv, L); + + if (in->vbs_vgcs_options.present) { + bitvec_set_bit(&bv, H); + bitvec_set_bit(&bv, !!in->vbs_vgcs_options.inband_notifications); + bitvec_set_bit(&bv, !!in->vbs_vgcs_options.inband_pagings); + } else + bitvec_set_bit(&bv, L); + + if (in->dtm_support.present) { + bitvec_set_bit(&bv, H); + bitvec_set_uint(&bv, in->dtm_support.rac, 8); + bitvec_set_uint(&bv, in->dtm_support.max_lapdm, 3); + } else + bitvec_set_bit(&bv, L); + + if (in->band_indicator_1900) + bitvec_set_bit(&bv, H); + else + bitvec_set_bit(&bv, L); + + if (in->gprs_ms_txpwr_max_ccch.present) { + bitvec_set_bit(&bv, H); + bitvec_set_uint(&bv, in->gprs_ms_txpwr_max_ccch.max_txpwr, 5); + } else + bitvec_set_bit(&bv, L); bitvec_spare_padding(&bv, (bv.data_len * 8) - 1); return bv.data_len; -- To view, visit https://gerrit.osmocom.org/14237 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id75005a0c4a02ce7f809692d58b3bd226bc582b2 Gerrit-Change-Number: 14237 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 17:53:24 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 17:53:24 +0000 Subject: Change in libosmocore[master]: rest_octets: Remove SI2ter + SI2bis encoders that don't do anything Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14238 Change subject: rest_octets: Remove SI2ter + SI2bis encoders that don't do anything ...................................................................... rest_octets: Remove SI2ter + SI2bis encoders that don't do anything The library should either provide functions that implement encoding of those rest octets, or it shouldn't. Providing a function that doesn't do anything but pad the buffer is useless. Change-Id: Ie10684de6a6b2663e2a871fcdb2b275b6ad7a1e7 --- M include/osmocom/gsm/gsm48_rest_octets.h M src/gsm/gsm48_rest_octets.c M src/gsm/libosmogsm.map 3 files changed, 0 insertions(+), 35 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/38/14238/1 diff --git a/include/osmocom/gsm/gsm48_rest_octets.h b/include/osmocom/gsm/gsm48_rest_octets.h index 7163672..d3bb878 100644 --- a/include/osmocom/gsm/gsm48_rest_octets.h +++ b/include/osmocom/gsm/gsm48_rest_octets.h @@ -18,8 +18,6 @@ size_t uarfcn_length, uint16_t *scramble_list, struct osmo_earfcn_si2q *si2quater_neigh_list, size_t *e_offset); -int osmo_gsm48_rest_octets_si2ter_encode(uint8_t *data); -int osmo_gsm48_rest_octets_si2bis_encode(uint8_t *data); struct osmo_gsm48_si_pch_nch_info { bool present; diff --git a/src/gsm/gsm48_rest_octets.c b/src/gsm/gsm48_rest_octets.c index c1e4b30..84136c6 100644 --- a/src/gsm/gsm48_rest_octets.c +++ b/src/gsm/gsm48_rest_octets.c @@ -536,37 +536,6 @@ bitvec_set_bit(bv, L); } -/* Generate SI2ter Rest Octests 3GPP TS 44.018 Table 10.5.2.33a.1 */ -int osmo_gsm48_rest_octets_si2ter_encode(uint8_t *data) -{ - struct bitvec bv; - - memset(&bv, 0, sizeof(bv)); - bv.data = data; - bv.data_len = 4; - - /* No SI2ter_MP_CHANGE_MARK */ - bitvec_set_bit(&bv, L); - - bitvec_spare_padding(&bv, (bv.data_len * 8) - 1); - - return bv.data_len; -} - -/* Generate SI2bis Rest Octests 3GPP TS 44.018 Table 10.5.2.33.1 */ -int osmo_gsm48_rest_octets_si2bis_encode(uint8_t *data) -{ - struct bitvec bv; - - memset(&bv, 0, sizeof(bv)); - bv.data = data; - bv.data_len = 1; - - bitvec_spare_padding(&bv, (bv.data_len * 8) - 1); - - return bv.data_len; -} - /* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */ int osmo_gsm48_rest_octets_si3_encode(uint8_t *data, const struct osmo_gsm48_si_ro_info *si3) { diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 84d71e6..d49401d 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -303,8 +303,6 @@ gsm48_cc_msg_name; osmo_gsm48_rest_octets_si1_encode; osmo_gsm48_rest_octets_si2quater_encode; -osmo_gsm48_rest_octets_si2ter_encode; -osmo_gsm48_rest_octets_si2bis_encode; osmo_gsm48_rest_octets_si6_encode; osmo_gsm48_rest_octets_si3_encode; osmo_gsm48_rest_octets_si4_encode; -- To view, visit https://gerrit.osmocom.org/14238 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ie10684de6a6b2663e2a871fcdb2b275b6ad7a1e7 Gerrit-Change-Number: 14238 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 17:56:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 17:56:16 +0000 Subject: Change in osmo-bts[master]: clear GPRS indicator in SI3 while PCU is disconnected In-Reply-To: References: Message-ID: Harald Welte has uploaded a new patch set (#4) to the change originally created by Stefan Sperling. ( https://gerrit.osmocom.org/10170 ) Change subject: clear GPRS indicator in SI3 while PCU is disconnected ...................................................................... clear GPRS indicator in SI3 while PCU is disconnected osmo-bts cannot provide GPRS service while osmo-pcu is not connected. The BSC has no knowledge of the PCU connection state. Prevent MSs from trying to register for GPRS while the PCU is disconnected by erasing the GPRS Indicator in SI3. Change-Id: I1a6f5c636c0fe098ee31c280d4572a3f8122b44b Depends: I690cf308311f910005a325d50f5d5d825678d2b2 (libosmocore.git) Depends: I08e0ca9a8d13c7aa40b9d90f34f0e13adb87d4e0 (libosmocore.git) Depends: I8b1ee2405f6338507e9dfb5f1f437c4c2db2e330 (libosmocore.git) Related: OS#3075 --- M include/osmo-bts/bts.h M include/osmo-bts/gsm_data_shared.h M src/common/pcu_sock.c M src/common/rsl.c M src/common/sysinfo.c 5 files changed, 65 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/70/10170/4 -- To view, visit https://gerrit.osmocom.org/10170 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1a6f5c636c0fe098ee31c280d4572a3f8122b44b Gerrit-Change-Number: 10170 Gerrit-PatchSet: 4 Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Stefan Sperling Gerrit-CC: Max -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 17:56:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 17:56:18 +0000 Subject: Change in osmo-bts[master]: lc15, sysmo, oc2g: fix dsp-trace-flag command Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14239 Change subject: lc15,sysmo,oc2g: fix dsp-trace-flag command ...................................................................... lc15,sysmo,oc2g: fix dsp-trace-flag command Remove the '~' from '|= flag', it is plain wrong. This affects the correct parsing of DSP trace flags from the config file only. The bug is not present in the interactive VTY command at runtime. Change-Id: I915971f49642967c969f5dd475e8faa960ef3960 --- M src/osmo-bts-litecell15/lc15bts_vty.c M src/osmo-bts-oc2g/oc2gbts_vty.c M src/osmo-bts-sysmo/sysmobts_vty.c 3 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/39/14239/1 diff --git a/src/osmo-bts-litecell15/lc15bts_vty.c b/src/osmo-bts-litecell15/lc15bts_vty.c index d0edc88..d27ec28 100644 --- a/src/osmo-bts-litecell15/lc15bts_vty.c +++ b/src/osmo-bts-litecell15/lc15bts_vty.c @@ -88,7 +88,7 @@ unsigned int flag; flag = get_string_value(lc15bts_tracef_names, argv[1]); - pinst->u.lc15.dsp_trace_f |= ~flag; + pinst->u.lc15.dsp_trace_f |= flag; return CMD_SUCCESS; } diff --git a/src/osmo-bts-oc2g/oc2gbts_vty.c b/src/osmo-bts-oc2g/oc2gbts_vty.c index 4c3915b..1f092dd 100644 --- a/src/osmo-bts-oc2g/oc2gbts_vty.c +++ b/src/osmo-bts-oc2g/oc2gbts_vty.c @@ -114,7 +114,7 @@ unsigned int flag; flag = get_string_value(oc2gbts_tracef_names, argv[1]); - pinst->u.oc2g.dsp_trace_f |= ~flag; + pinst->u.oc2g.dsp_trace_f |= flag; return CMD_SUCCESS; } diff --git a/src/osmo-bts-sysmo/sysmobts_vty.c b/src/osmo-bts-sysmo/sysmobts_vty.c index b105bf4..3199c8e 100644 --- a/src/osmo-bts-sysmo/sysmobts_vty.c +++ b/src/osmo-bts-sysmo/sysmobts_vty.c @@ -179,7 +179,7 @@ unsigned int flag; flag = get_string_value(femtobts_tracef_names, argv[1]); - pinst->u.sysmobts.dsp_trace_f |= ~flag; + pinst->u.sysmobts.dsp_trace_f |= flag; return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/14239 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I915971f49642967c969f5dd475e8faa960ef3960 Gerrit-Change-Number: 14239 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 17:56:39 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 17:56:39 +0000 Subject: Change in osmo-bts[master]: clear GPRS indicator in SI3 while PCU is disconnected In-Reply-To: References: Message-ID: Harald Welte has removed a vote on this change. Change subject: clear GPRS indicator in SI3 while PCU is disconnected ...................................................................... Removed Code-Review-2 by Harald Welte -- To view, visit https://gerrit.osmocom.org/10170 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: deleteVote Gerrit-Change-Id: I1a6f5c636c0fe098ee31c280d4572a3f8122b44b Gerrit-Change-Number: 10170 Gerrit-PatchSet: 4 Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Stefan Sperling Gerrit-CC: Max -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 17:56:50 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 17:56:50 +0000 Subject: Change in osmo-bts[master]: lc15, sysmo, oc2g: fix dsp-trace-flag command In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14239 ) Change subject: lc15,sysmo,oc2g: fix dsp-trace-flag command ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14239 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I915971f49642967c969f5dd475e8faa960ef3960 Gerrit-Change-Number: 14239 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-CC: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 28 May 2019 17:56:50 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 17:57:58 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 17:57:58 +0000 Subject: Change in osmo-bts[master]: clear GPRS indicator in SI3 while PCU is disconnected In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/10170 ) Change subject: clear GPRS indicator in SI3 while PCU is disconnected ...................................................................... Patch Set 4: Code-Review+1 this new patch has been verified using https://gerrit.osmocom.org/#/c/osmo-ttcn3-hacks/+/14215/ -- To view, visit https://gerrit.osmocom.org/10170 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1a6f5c636c0fe098ee31c280d4572a3f8122b44b Gerrit-Change-Number: 10170 Gerrit-PatchSet: 4 Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Stefan Sperling Gerrit-CC: Max Gerrit-Comment-Date: Tue, 28 May 2019 17:57:58 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 17:59:35 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 17:59:35 +0000 Subject: Change in osmo-bts[master]: clear GPRS indicator in SI3 while PCU is disconnected In-Reply-To: References: Message-ID: Harald Welte has uploaded a new patch set (#5) to the change originally created by Stefan Sperling. ( https://gerrit.osmocom.org/10170 ) Change subject: clear GPRS indicator in SI3 while PCU is disconnected ...................................................................... clear GPRS indicator in SI3 while PCU is disconnected osmo-bts cannot provide GPRS service while osmo-pcu is not connected. The BSC has no knowledge of the PCU connection state. Prevent MSs from trying to register for GPRS while the PCU is disconnected by erasing the GPRS Indicator in SI3. Change-Id: I1a6f5c636c0fe098ee31c280d4572a3f8122b44b Depends: I690cf308311f910005a325d50f5d5d825678d2b2 (libosmocore.git) Depends: I08e0ca9a8d13c7aa40b9d90f34f0e13adb87d4e0 (libosmocore.git) Depends: I8b1ee2405f6338507e9dfb5f1f437c4c2db2e330 (libosmocore.git) Related: OS#3075 --- M include/osmo-bts/bts.h M include/osmo-bts/gsm_data_shared.h M src/common/pcu_sock.c M src/common/rsl.c M src/common/sysinfo.c 5 files changed, 63 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/70/10170/5 -- To view, visit https://gerrit.osmocom.org/10170 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1a6f5c636c0fe098ee31c280d4572a3f8122b44b Gerrit-Change-Number: 10170 Gerrit-PatchSet: 5 Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Stefan Sperling Gerrit-CC: Max -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 18:01:00 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 18:01:00 +0000 Subject: Change in osmo-bts[master]: clear GPRS indicator in SI3 while PCU is disconnected In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/10170 ) Change subject: clear GPRS indicator in SI3 while PCU is disconnected ...................................................................... Patch Set 5: Verified+1 Code-Review+1 -- To view, visit https://gerrit.osmocom.org/10170 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1a6f5c636c0fe098ee31c280d4572a3f8122b44b Gerrit-Change-Number: 10170 Gerrit-PatchSet: 5 Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Stefan Sperling Gerrit-CC: Max Gerrit-Comment-Date: Tue, 28 May 2019 18:01:00 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 18:01:29 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 18:01:29 +0000 Subject: Change in libosmocore[master]: gsm48_rest_octets: Fix license: GPLv2+ instead of AGPLv3+ In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14214 ) Change subject: gsm48_rest_octets: Fix license: GPLv2+ instead of AGPLv3+ ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/14214 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ief3009dc28dd83e1e26a7101af2eed2341684a87 Gerrit-Change-Number: 14214 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Assignee: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Holger Freyther Gerrit-Comment-Date: Tue, 28 May 2019 18:01:29 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 18:01:36 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 18:01:36 +0000 Subject: Change in libosmocore[master]: gsm48_rest_octets: Fix license: GPLv2+ instead of AGPLv3+ In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14214 ) Change subject: gsm48_rest_octets: Fix license: GPLv2+ instead of AGPLv3+ ...................................................................... gsm48_rest_octets: Fix license: GPLv2+ instead of AGPLv3+ libosmo{core,gsm,vty} code is GPLv2+. The rest octet code originated in osmo-bsc.git and was moved here without changing the license. That was a mistake, it always was meant to be under GPLv2-or-later after moving to libosmocore.git. Original copyright is mine. For contributions by sysmocom, I as the managing director can approve the license change. This means only Holger needs to ACK this. Change-Id: Ief3009dc28dd83e1e26a7101af2eed2341684a87 --- M src/gsm/gsm48_rest_octets.c 1 file changed, 6 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gsm/gsm48_rest_octets.c b/src/gsm/gsm48_rest_octets.c index 619dc6d..cdb61f1 100644 --- a/src/gsm/gsm48_rest_octets.c +++ b/src/gsm/gsm48_rest_octets.c @@ -7,18 +7,20 @@ * All Rights Reserved * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. + * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see . * + * SPDX-License-Identifier: GPL-2.0+ + * */ #include -- To view, visit https://gerrit.osmocom.org/14214 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ief3009dc28dd83e1e26a7101af2eed2341684a87 Gerrit-Change-Number: 14214 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Assignee: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Holger Freyther -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 18:07:35 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 18:07:35 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Extend BTS_Tests.ttcn with test for RSL MODE MODIFY with encryption IE In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14224 ) Change subject: Extend BTS_Tests.ttcn with test for RSL MODE MODIFY with encryption IE ...................................................................... Patch Set 1: (2 comments) https://gerrit.osmocom.org/#/c/14224/1/bts/BTS_Tests.ttcn File bts/BTS_Tests.ttcn: https://gerrit.osmocom.org/#/c/14224/1/bts/BTS_Tests.ttcn at 4873 PS1, Line 4873: "MODE MODIFY NACK" this should state something like "timeout waiting for mode modify ack" or the like. https://gerrit.osmocom.org/#/c/14224/1/bts/BTS_Tests.ttcn at 4885 PS1, Line 4885: setverdict(fail); would be good to state why it fails like setverdict(fail, "BTS shouldn't be able to decrypt after key change") or actually, even better to use Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "BTS shouldn't be able to decrypt after key change") -- To view, visit https://gerrit.osmocom.org/14224 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4cbea499bb6a331d314e6573548a4540945208b5 Gerrit-Change-Number: 14224 Gerrit-PatchSet: 1 Gerrit-Owner: Eric Wild Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Harald Welte Gerrit-Comment-Date: Tue, 28 May 2019 18:07:35 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 18:09:46 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 18:09:46 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Extend BTS_Tests.ttcn with test for RSL channel activation with stati... In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14221 ) Change subject: Extend BTS_Tests.ttcn with test for RSL channel activation with static MS Power ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14221 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icecf18c77bfe8b049cc0896c4c5b441187be1c0e Gerrit-Change-Number: 14221 Gerrit-PatchSet: 2 Gerrit-Owner: Eric Wild Gerrit-Reviewer: Eric Wild Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 28 May 2019 18:09:46 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 18:09:48 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 18:09:48 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Extend BTS_Tests.ttcn with test for RSL channel activation with stati... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14221 ) Change subject: Extend BTS_Tests.ttcn with test for RSL channel activation with static MS Power ...................................................................... Extend BTS_Tests.ttcn with test for RSL channel activation with static MS Power Change-Id: Icecf18c77bfe8b049cc0896c4c5b441187be1c0e Related: OS##3750 --- M bts/BTS_Tests.ttcn 1 file changed, 43 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 968ed6c..066aba0 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -1990,6 +1990,48 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } +/* establish DChan, verify that the BTS sets MS power in the first SACCH L1 header. */ +function f_tc_rsl_chan_initial_ms_pwr(charstring id) runs on ConnHdlr { + var L1ctlDlMessage l1_dl; + var uint5_t ms_power_level := 7; + + var RSL_IE_MS_Power ms_power; + ms_power.reserved := 0; + ms_power.fpc_epc := false; + ms_power.power_level := ms_power_level; + + f_l1_tune(L1CTL); + RSL.clear; + + f_est_dchan(more_ies :={valueof(t_RSL_IE(RSL_IE_MS_POWER, RSL_IE_Body:{ms_power := ms_power}))} ); + + timer T := 1.0; + T.start; + alt { + /* Pick all SACCH blocks for checking */ + [] L1CTL.receive(tr_L1CTL_DATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) -> value l1_dl { + /* The first byte of the L1 header contains the power level.. */ + if (not (l1_dl.payload.data_ind.payload[0] == int2oct(ms_power_level, 1))) { + setverdict(fail, "Power Level in L1 header does not match the signaled (RSL) MS Power Level."); + } + } + /* Ignore all other blocks */ + [] L1CTL.receive { repeat; } + [] T.timeout { + setverdict(fail, "Power Level in L1 header does not match the signaled (RSL) MS Power Level."); + } + } + + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); + setverdict(pass); +} + +testcase TC_rsl_chan_initial_ms_pwr() runs on test_CT { + var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN)); + f_testmatrix_each_chan(pars, refers(f_tc_rsl_chan_initial_ms_pwr)); +} + /* Test if a channel without valid uplink bursts generates RSL CONN FAIL IND (TS 48.058 4.10) */ private function f_TC_conn_fail_crit(charstring id) runs on ConnHdlr { f_l1_tune(L1CTL); @@ -5200,6 +5242,7 @@ execute( TC_meas_res_sign_sdcch8() ); execute( TC_meas_res_sign_tchh_toa256() ); execute( TC_rsl_ms_pwr_ctrl() ); + execute( TC_rsl_chan_initial_ms_pwr() ); execute( TC_rsl_chan_initial_ta() ); execute( TC_conn_fail_crit() ); execute( TC_paging_imsi_80percent() ); -- To view, visit https://gerrit.osmocom.org/14221 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Icecf18c77bfe8b049cc0896c4c5b441187be1c0e Gerrit-Change-Number: 14221 Gerrit-PatchSet: 3 Gerrit-Owner: Eric Wild Gerrit-Reviewer: Eric Wild Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 18:25:25 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 May 2019 18:25:25 +0000 Subject: Change in osmo-ttcn3-hacks[master]: ggsn: Add tests to verify retransmit queue Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14240 Change subject: ggsn: Add tests to verify retransmit queue ...................................................................... ggsn: Add tests to verify retransmit queue Change-Id: I8d937d0af9af8462418b174a54022655f9d77a5f --- M ggsn_tests/GGSN_Tests.ttcn M ggsn_tests/expected-results.xml 2 files changed, 35 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/40/14240/1 diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn index 9577a60..dc9d07c 100644 --- a/ggsn_tests/GGSN_Tests.ttcn +++ b/ggsn_tests/GGSN_Tests.ttcn @@ -300,16 +300,25 @@ T_default.stop; } - function f_pdp_ctx_del(PdpContext ctx, template BIT1 teardown_ind) runs on GT_CT { + function f_pdp_ctx_del(PdpContext ctx, template BIT1 teardown_ind, OCT1 expect_causevalue := '80'O) runs on GT_CT { var Gtp1cUnitdata ud; var default d; + var OCT4 expect_teid; + + /* 3GPP TS 29.060 sec 7.3.6 specifies TEID used in response + message with cause value "Non existent" shall be zero. */ + if (expect_causevalue == 'C0'O) { + expect_teid := '00000000'O; + } else { + expect_teid := ctx.teic; + } f_send_gtpc(ts_GTPC_DeletePDP(g_peer_c, g_c_seq_nr, ctx.teic_remote, ctx.nsapi, teardown_ind)); T_default.start; d := activate(pingpong()); alt { - [] GTPC.receive(tr_GTPC_MsgType(g_peer_c, deletePDPContextResponse, ctx.teic)) -> value ud { - if (ud.gtpc.gtpc_pdu.deletePDPContextResponse.cause.causevalue == '80'O) { + [] GTPC.receive(tr_GTPC_MsgType(g_peer_c, deletePDPContextResponse, expect_teid)) -> value ud { + if (ud.gtpc.gtpc_pdu.deletePDPContextResponse.cause.causevalue == expect_causevalue) { setverdict(pass); } else { setverdict(fail); @@ -1244,6 +1253,27 @@ f_pdp_ctx_del(ctxA, '1'B); } + /* Send a duplicate echo req. osmo-ggsn maintains a queue for sent + responses (60 seconds): If same delete req is sent and duplicate is + detected, saved duplicate response should be sent back. */ + testcase TC_act_deact_retrans_duplicate() runs on GT_CT { + f_init(); + var PdpContext ctx := valueof(t_DefinePDP(f_rnd_imsi('26242'H), '1234'O, c_ApnInternet, valueof(t_EuaIPv4Dyn))); + f_pdp_ctx_act(ctx); + f_pdp_ctx_del(ctx, '1'B); + /* leave some time in between to make sure retransmit response queue keeps packets for a while */ + f_sleep(1.0); + /* g_c_seq_nr was increased during f_pdp_ctx_del(), we want a + duplicate. If it was not a duplicate, osmo-ggsn would answer + with a failure since that PDP ctx was already deleted. */ + g_c_seq_nr := g_c_seq_nr - 1; + f_pdp_ctx_del(ctx, '1'B); + + /* Now send a new pdp ctx del (increased seqnum). It should fail with cause "non-existent": */ + var OCT1 cause_nonexistent := 'C0'O; + f_pdp_ctx_del(ctx, '1'B, cause_nonexistent); + } + control { execute(TC_pdp4_act_deact()); execute(TC_pdp4_act_deact_ipcp()); @@ -1269,5 +1299,6 @@ execute(TC_pdp46_clients_interact()); execute(TC_echo_req_resp()); + execute(TC_act_deact_retrans_duplicate()); } } diff --git a/ggsn_tests/expected-results.xml b/ggsn_tests/expected-results.xml index 081325e..c2defea 100644 --- a/ggsn_tests/expected-results.xml +++ b/ggsn_tests/expected-results.xml @@ -19,4 +19,5 @@ + -- To view, visit https://gerrit.osmocom.org/14240 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I8d937d0af9af8462418b174a54022655f9d77a5f Gerrit-Change-Number: 14240 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 18:26:07 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 May 2019 18:26:07 +0000 Subject: Change in osmo-ttcn3-hacks[master]: ggsn: Add test to verify retransmit queue_resp In-Reply-To: References: Message-ID: Pau Espin Pedrol has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/14240 ) Change subject: ggsn: Add test to verify retransmit queue_resp ...................................................................... ggsn: Add test to verify retransmit queue_resp Change-Id: I8d937d0af9af8462418b174a54022655f9d77a5f --- M ggsn_tests/GGSN_Tests.ttcn M ggsn_tests/expected-results.xml 2 files changed, 35 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/40/14240/2 -- To view, visit https://gerrit.osmocom.org/14240 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8d937d0af9af8462418b174a54022655f9d77a5f Gerrit-Change-Number: 14240 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-CC: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 18:28:41 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 May 2019 18:28:41 +0000 Subject: Change in osmo-ttcn3-hacks[master]: ggsn: Add test to verify retransmit queue_resp In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14240 to look at the new patch set (#3). Change subject: ggsn: Add test to verify retransmit queue_resp ...................................................................... ggsn: Add test to verify retransmit queue_resp Related: OS#3997 Change-Id: I8d937d0af9af8462418b174a54022655f9d77a5f --- M ggsn_tests/GGSN_Tests.ttcn M ggsn_tests/expected-results.xml 2 files changed, 35 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/40/14240/3 -- To view, visit https://gerrit.osmocom.org/14240 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8d937d0af9af8462418b174a54022655f9d77a5f Gerrit-Change-Number: 14240 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 18:47:36 2019 From: gerrit-no-reply at lists.osmocom.org (Eric Wild) Date: Tue, 28 May 2019 18:47:36 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Extend BTS_Tests.ttcn with test for RSL MODE MODIFY with encryption IE In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14224 to look at the new patch set (#2). Change subject: Extend BTS_Tests.ttcn with test for RSL MODE MODIFY with encryption IE ...................................................................... Extend BTS_Tests.ttcn with test for RSL MODE MODIFY with encryption IE This test will currently fail due to a MODE MODIFY NACK, even though the channel mode is not modified. Related: OS##3750 Change-Id: I4cbea499bb6a331d314e6573548a4540945208b5 --- M bts/BTS_Tests.ttcn M library/RSL_Types.ttcn 2 files changed, 89 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/24/14224/2 -- To view, visit https://gerrit.osmocom.org/14224 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4cbea499bb6a331d314e6573548a4540945208b5 Gerrit-Change-Number: 14224 Gerrit-PatchSet: 2 Gerrit-Owner: Eric Wild Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 19:28:33 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 May 2019 19:28:33 +0000 Subject: Change in osmo-sgsn[master]: Document max retransmit times for T3395 Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14241 Change subject: Document max retransmit times for T3395 ...................................................................... Document max retransmit times for T3395 Spec also states same value is used for T3390, which we don't yet implement. Change-Id: I1a2276bd42d1ea5706cf9cc26d3e44baa6fbf066 --- M src/gprs/gprs_gmm.c 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/41/14241/1 diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c index a18a54e..e7f0bfe 100644 --- a/src/gprs/gprs_gmm.c +++ b/src/gprs/gprs_gmm.c @@ -67,6 +67,9 @@ #define PTMSI_ALLOC +/* 3GPP TS 04.08 sec 6.1.3.4.3(.a) "Abnormal cases" */ +#define T339X_MAX_RETRANS 4 + extern struct sgsn_instance *sgsn; extern void *tall_sgsn_ctx; @@ -2797,8 +2800,8 @@ switch (pdp->T) { case 3395: /* waiting for PDP CTX DEACT ACK */ - if (pdp->num_T_exp >= 5) { - LOGPDPCTXP(LOGL_NOTICE, pdp, "T3395 expired >= 5 times\n"); + if (pdp->num_T_exp > T339X_MAX_RETRANS) { + LOGPDPCTXP(LOGL_NOTICE, pdp, "T3395 expired > %d times\n", T339X_MAX_RETRANS); pdp->state = PDP_STATE_INACTIVE; if (pdp->ggsn) sgsn_delete_pdp_ctx(pdp); -- To view, visit https://gerrit.osmocom.org/14241 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I1a2276bd42d1ea5706cf9cc26d3e44baa6fbf066 Gerrit-Change-Number: 14241 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 19:34:13 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 28 May 2019 19:34:13 +0000 Subject: Change in docker-playground[master]: bsc: Disable osmux for ttcn3-bsc-test-latest In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14229 ) Change subject: bsc: Disable osmux for ttcn3-bsc-test-latest ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/14229 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I745b210f43cb147d323a15f78c294f70ee077729 Gerrit-Change-Number: 14229 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 28 May 2019 19:34:13 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 21:00:54 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 21:00:54 +0000 Subject: Change in osmo-sgsn[master]: Document max retransmit times for T3395 In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14241 ) Change subject: Document max retransmit times for T3395 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14241 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1a2276bd42d1ea5706cf9cc26d3e44baa6fbf066 Gerrit-Change-Number: 14241 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 28 May 2019 21:00:54 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 21:01:07 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 21:01:07 +0000 Subject: Change in osmo-sgsn[master]: Document max retransmit times for T3395 In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14241 ) Change subject: Document max retransmit times for T3395 ...................................................................... Document max retransmit times for T3395 Spec also states same value is used for T3390, which we don't yet implement. Change-Id: I1a2276bd42d1ea5706cf9cc26d3e44baa6fbf066 --- M src/gprs/gprs_gmm.c 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c index a18a54e..e7f0bfe 100644 --- a/src/gprs/gprs_gmm.c +++ b/src/gprs/gprs_gmm.c @@ -67,6 +67,9 @@ #define PTMSI_ALLOC +/* 3GPP TS 04.08 sec 6.1.3.4.3(.a) "Abnormal cases" */ +#define T339X_MAX_RETRANS 4 + extern struct sgsn_instance *sgsn; extern void *tall_sgsn_ctx; @@ -2797,8 +2800,8 @@ switch (pdp->T) { case 3395: /* waiting for PDP CTX DEACT ACK */ - if (pdp->num_T_exp >= 5) { - LOGPDPCTXP(LOGL_NOTICE, pdp, "T3395 expired >= 5 times\n"); + if (pdp->num_T_exp > T339X_MAX_RETRANS) { + LOGPDPCTXP(LOGL_NOTICE, pdp, "T3395 expired > %d times\n", T339X_MAX_RETRANS); pdp->state = PDP_STATE_INACTIVE; if (pdp->ggsn) sgsn_delete_pdp_ctx(pdp); -- To view, visit https://gerrit.osmocom.org/14241 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I1a2276bd42d1ea5706cf9cc26d3e44baa6fbf066 Gerrit-Change-Number: 14241 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 21:01:25 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 21:01:25 +0000 Subject: Change in docker-playground[master]: bsc: Disable osmux for ttcn3-bsc-test-latest In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14229 ) Change subject: bsc: Disable osmux for ttcn3-bsc-test-latest ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14229 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I745b210f43cb147d323a15f78c294f70ee077729 Gerrit-Change-Number: 14229 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 28 May 2019 21:01:25 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 21:01:26 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 21:01:26 +0000 Subject: Change in docker-playground[master]: bsc: Disable osmux for ttcn3-bsc-test-latest In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14229 ) Change subject: bsc: Disable osmux for ttcn3-bsc-test-latest ...................................................................... bsc: Disable osmux for ttcn3-bsc-test-latest Latest tagged version of osmo-bsc doesn't support "osmux on/off" VTY commands, so we have to enable osmux use on that version to avoid most TTCN3 tests failing during set up phase. Depends: osmo-ttcn3-hacks I61e4c59b2926f3f70cb6d0190a8683861e54179a Change-Id: I745b210f43cb147d323a15f78c294f70ee077729 --- M ttcn3-bsc-test/BSC_Tests.cfg M ttcn3-bsc-test/jenkins-sccplite.sh M ttcn3-bsc-test/jenkins.sh 3 files changed, 8 insertions(+), 0 deletions(-) Approvals: Pau Espin Pedrol: Verified Harald Welte: Looks good to me, approved diff --git a/ttcn3-bsc-test/BSC_Tests.cfg b/ttcn3-bsc-test/BSC_Tests.cfg index 24e8a61..97ce617 100644 --- a/ttcn3-bsc-test/BSC_Tests.cfg +++ b/ttcn3-bsc-test/BSC_Tests.cfg @@ -11,6 +11,7 @@ [MODULE_PARAMETERS] BSC_Tests.mp_bsc_ip := "172.18.2.20"; BSC_Tests.mp_test_ip := "172.18.2.203"; +BSC_Tests.mp_enable_osmux_test := true; BSC_Tests.mp_bssap_cfg := { transport := BSSAP_TRANSPORT_AoIP, sccp_service_type := "mtp3_itu", diff --git a/ttcn3-bsc-test/jenkins-sccplite.sh b/ttcn3-bsc-test/jenkins-sccplite.sh index 0a2ff8b..ed8ffc3 100755 --- a/ttcn3-bsc-test/jenkins-sccplite.sh +++ b/ttcn3-bsc-test/jenkins-sccplite.sh @@ -14,6 +14,9 @@ mkdir $VOL_BASE_DIR/bsc-tester cp sccplite/BSC_Tests.cfg $VOL_BASE_DIR/bsc-tester/ +if [ "$IMAGE_SUFFIX" = "latest" ]; then + sed "s/BSC_Tests.mp_enable_osmux_test := true;/BSC_Tests.mp_enable_osmux_test := false;/g" -i $VOL_BASE_DIR/bsc-tester/BSC_Tests.cfg +fi mkdir $VOL_BASE_DIR/bsc cp sccplite/osmo-bsc.cfg $VOL_BASE_DIR/bsc/ diff --git a/ttcn3-bsc-test/jenkins.sh b/ttcn3-bsc-test/jenkins.sh index af5c965..453fcf0 100755 --- a/ttcn3-bsc-test/jenkins.sh +++ b/ttcn3-bsc-test/jenkins.sh @@ -12,6 +12,10 @@ mkdir $VOL_BASE_DIR/bsc-tester cp BSC_Tests.cfg $VOL_BASE_DIR/bsc-tester/ +# osmux must be disabled until release AFTER osmo-bsc 1.4.1 is tagged +if [ "$IMAGE_SUFFIX" = "latest" ]; then + sed "s/BSC_Tests.mp_enable_osmux_test := true;/BSC_Tests.mp_enable_osmux_test := false;/g" -i $VOL_BASE_DIR/bsc-tester/BSC_Tests.cfg +fi mkdir $VOL_BASE_DIR/stp cp osmo-stp.cfg $VOL_BASE_DIR/stp/ -- To view, visit https://gerrit.osmocom.org/14229 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I745b210f43cb147d323a15f78c294f70ee077729 Gerrit-Change-Number: 14229 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 21:01:44 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 21:01:44 +0000 Subject: Change in osmocom-bb[master]: trxcon/sched_mframe.c: do not hard-code lchan combinations In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14222 ) Change subject: trxcon/sched_mframe.c: do not hard-code lchan combinations ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14222 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If945b3654e35c83fc0220fdd6d99c1c7a0503386 Gerrit-Change-Number: 14222 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 28 May 2019 21:01:44 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 21:01:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 21:01:53 +0000 Subject: Change in osmocom-bb[master]: trxcon/l1ctl.c: use #define for RSL_CHAN_RACH In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14223 ) Change subject: trxcon/l1ctl.c: use #define for RSL_CHAN_RACH ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14223 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ifdb1703217c7540344cf6772efe812c8a786a0c2 Gerrit-Change-Number: 14223 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 28 May 2019 21:01:53 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 21:02:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 21:02:18 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Extend BTS_Tests.ttcn with test for RSL MODE MODIFY with encryption IE In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14224 ) Change subject: Extend BTS_Tests.ttcn with test for RSL MODE MODIFY with encryption IE ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14224 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4cbea499bb6a331d314e6573548a4540945208b5 Gerrit-Change-Number: 14224 Gerrit-PatchSet: 2 Gerrit-Owner: Eric Wild Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 28 May 2019 21:02:18 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 21:02:20 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 21:02:20 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Extend BTS_Tests.ttcn with test for RSL MODE MODIFY with encryption IE In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14224 ) Change subject: Extend BTS_Tests.ttcn with test for RSL MODE MODIFY with encryption IE ...................................................................... Extend BTS_Tests.ttcn with test for RSL MODE MODIFY with encryption IE This test will currently fail due to a MODE MODIFY NACK, even though the channel mode is not modified. Related: OS##3750 Change-Id: I4cbea499bb6a331d314e6573548a4540945208b5 --- M bts/BTS_Tests.ttcn M library/RSL_Types.ttcn 2 files changed, 89 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 066aba0..f60da24 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -4876,6 +4876,71 @@ f_testmatrix_each_chan(pars, refers(f_TC_chan_act_encr)); } +/* Test channel activation with A5/n right from the beginning and RSL MODE MODIFY + which should break the en/decryption on purpose by supplying a new key that is unknown to the MS*/ +function f_TC_rsl_modify_encr(charstring id) runs on ConnHdlr { + f_l1_tune(L1CTL); + f_est_dchan(true); + + /* now we actually need to transmit some data both ways to check if the encryption works */ + var L1ctlDlMessage dl; + + var octetstring l3 := f_rnd_octstring(20); + var RslLinkId link_id := valueof(ts_RslLinkID_DCCH(0)); + + /* send UNITDATA_REQ from BTS to MS and expect it to arrive */ + f_unitdata_mt(link_id, l3); + + /* Send UI frame from MS and expect it to arrive as RLL UNITDATA IND on Abis */ + f_unitdata_mo(link_id, l3); + + var RSL_Message rsl; + rsl := valueof(ts_RSL_MODE_MODIFY_REQ(g_chan_nr, valueof(ts_RSL_ChanMode_SIGN(false)))); + + /* modify key to break proper encryption */ + g_pars.encr.key := f_rnd_octstring(8); + var RSL_IE ei := valueof(t_RSL_IE(RSL_IE_ENCR_INFO, RSL_IE_Body:{encr_info := g_pars.encr})); + rsl.ies := rsl.ies & { ei }; + RSL.send(rsl); + + timer T0 := 1.0; + T0.start; + /* Expect RSL MODIFY ACK */ + alt { + [] RSL.receive(tr_RSL_MODE_MODIFY_ACK(g_chan_nr)) {} + [] RSL.receive(tr_RSL_MODE_MODIFY_NACK(g_chan_nr, ?)) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,"MODE MODIFY NACK"); + } + [] T0.timeout { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Timeout waiting for MODE MODIFY (N)ACK"); + } + } + + var octetstring l3msg := f_rnd_octstring(15); + timer T1 := 3.0; + /* Send UI frame from MS, do not expect it to arrive as RLL UNITDATA IND on Abis + due to broken encryption */ + f_tx_lapdm(ts_LAPDm_UI(link_id.sapi, cr_MO_CMD, l3msg), link_id); + T1.start; + alt { + [] RSL.receive(tr_RSL_UNITDATA_IND(g_chan_nr, link_id, l3msg)) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "BTS shouldn't be able to decrypt after key change") + } + [] T1.timeout { + setverdict(pass); + } + } + + /* release the channel */ + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); + f_rslem_unregister(0, g_chan_nr); +} +testcase TC_rsl_modify_encr() runs on test_CT { + var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN)); + pars.encr := valueof(ts_RSL_IE_EncrInfo(RSL_ALG_ID_A5_1, f_rnd_octstring(8))); + f_testmatrix_each_chan(pars, refers(f_TC_rsl_modify_encr)); +} /* Test unencrypted channel activation followed by explicit ENCR CMD later */ function f_TC_encr_cmd(charstring id) runs on ConnHdlr { @@ -5244,6 +5309,7 @@ execute( TC_rsl_ms_pwr_ctrl() ); execute( TC_rsl_chan_initial_ms_pwr() ); execute( TC_rsl_chan_initial_ta() ); + execute( TC_rsl_modify_encr() ); execute( TC_conn_fail_crit() ); execute( TC_paging_imsi_80percent() ); execute( TC_paging_tmsi_80percent() ); diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index 4d23c3f..ef3f45b 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -1353,7 +1353,29 @@ } } - + /* 8.4.9 BSC -> BTS */ + template (value) RSL_Message ts_RSL_MODE_MODIFY_REQ(template (value) RslChannelNr chan_nr, + template (value) RSL_IE_ChannelMode mode) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), + msg_type := RSL_MT_MODE_MODIFY_REQ, + ies :={ + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + t_RSL_IE(RSL_IE_CHAN_MODE, RSL_IE_Body:{chan_mode := mode}) + /* lots of optional IEs */ + } + } + template RSL_Message tr_RSL_MODE_MODIFY_REQ(template RslChannelNr chan_nr, + template RSL_IE_ChannelMode mode) := { + msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), + msg_type := RSL_MT_MODE_MODIFY_REQ, + ies :={ + tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), + tr_RSL_IE(RSL_IE_Body:{chan_mode := mode}), + /* lots of optional IEs */ + * + } + } + /* 8.4.10 BTS -> BSC */ template (value) RSL_Message ts_RSL_MODE_MODIFY_ACK(template (value) RslChannelNr chan_nr) := { msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), -- To view, visit https://gerrit.osmocom.org/14224 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I4cbea499bb6a331d314e6573548a4540945208b5 Gerrit-Change-Number: 14224 Gerrit-PatchSet: 3 Gerrit-Owner: Eric Wild Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 21:03:15 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 21:03:15 +0000 Subject: Change in osmo-ttcn3-hacks[master]: ggsn: Add test to verify retransmit queue_resp In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14240 ) Change subject: ggsn: Add test to verify retransmit queue_resp ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14240 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8d937d0af9af8462418b174a54022655f9d77a5f Gerrit-Change-Number: 14240 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 28 May 2019 21:03:15 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 21:03:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 21:03:16 +0000 Subject: Change in osmo-ttcn3-hacks[master]: ggsn: Add test to verify retransmit queue_resp In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14240 ) Change subject: ggsn: Add test to verify retransmit queue_resp ...................................................................... ggsn: Add test to verify retransmit queue_resp Related: OS#3997 Change-Id: I8d937d0af9af8462418b174a54022655f9d77a5f --- M ggsn_tests/GGSN_Tests.ttcn M ggsn_tests/expected-results.xml 2 files changed, 35 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn index 9577a60..dc9d07c 100644 --- a/ggsn_tests/GGSN_Tests.ttcn +++ b/ggsn_tests/GGSN_Tests.ttcn @@ -300,16 +300,25 @@ T_default.stop; } - function f_pdp_ctx_del(PdpContext ctx, template BIT1 teardown_ind) runs on GT_CT { + function f_pdp_ctx_del(PdpContext ctx, template BIT1 teardown_ind, OCT1 expect_causevalue := '80'O) runs on GT_CT { var Gtp1cUnitdata ud; var default d; + var OCT4 expect_teid; + + /* 3GPP TS 29.060 sec 7.3.6 specifies TEID used in response + message with cause value "Non existent" shall be zero. */ + if (expect_causevalue == 'C0'O) { + expect_teid := '00000000'O; + } else { + expect_teid := ctx.teic; + } f_send_gtpc(ts_GTPC_DeletePDP(g_peer_c, g_c_seq_nr, ctx.teic_remote, ctx.nsapi, teardown_ind)); T_default.start; d := activate(pingpong()); alt { - [] GTPC.receive(tr_GTPC_MsgType(g_peer_c, deletePDPContextResponse, ctx.teic)) -> value ud { - if (ud.gtpc.gtpc_pdu.deletePDPContextResponse.cause.causevalue == '80'O) { + [] GTPC.receive(tr_GTPC_MsgType(g_peer_c, deletePDPContextResponse, expect_teid)) -> value ud { + if (ud.gtpc.gtpc_pdu.deletePDPContextResponse.cause.causevalue == expect_causevalue) { setverdict(pass); } else { setverdict(fail); @@ -1244,6 +1253,27 @@ f_pdp_ctx_del(ctxA, '1'B); } + /* Send a duplicate echo req. osmo-ggsn maintains a queue for sent + responses (60 seconds): If same delete req is sent and duplicate is + detected, saved duplicate response should be sent back. */ + testcase TC_act_deact_retrans_duplicate() runs on GT_CT { + f_init(); + var PdpContext ctx := valueof(t_DefinePDP(f_rnd_imsi('26242'H), '1234'O, c_ApnInternet, valueof(t_EuaIPv4Dyn))); + f_pdp_ctx_act(ctx); + f_pdp_ctx_del(ctx, '1'B); + /* leave some time in between to make sure retransmit response queue keeps packets for a while */ + f_sleep(1.0); + /* g_c_seq_nr was increased during f_pdp_ctx_del(), we want a + duplicate. If it was not a duplicate, osmo-ggsn would answer + with a failure since that PDP ctx was already deleted. */ + g_c_seq_nr := g_c_seq_nr - 1; + f_pdp_ctx_del(ctx, '1'B); + + /* Now send a new pdp ctx del (increased seqnum). It should fail with cause "non-existent": */ + var OCT1 cause_nonexistent := 'C0'O; + f_pdp_ctx_del(ctx, '1'B, cause_nonexistent); + } + control { execute(TC_pdp4_act_deact()); execute(TC_pdp4_act_deact_ipcp()); @@ -1269,5 +1299,6 @@ execute(TC_pdp46_clients_interact()); execute(TC_echo_req_resp()); + execute(TC_act_deact_retrans_duplicate()); } } diff --git a/ggsn_tests/expected-results.xml b/ggsn_tests/expected-results.xml index 081325e..c2defea 100644 --- a/ggsn_tests/expected-results.xml +++ b/ggsn_tests/expected-results.xml @@ -19,4 +19,5 @@ + -- To view, visit https://gerrit.osmocom.org/14240 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I8d937d0af9af8462418b174a54022655f9d77a5f Gerrit-Change-Number: 14240 Gerrit-PatchSet: 4 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 21:03:42 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 21:03:42 +0000 Subject: Change in osmo-bts[master]: lc15, sysmo, oc2g: fix dsp-trace-flag command In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14239 ) Change subject: lc15,sysmo,oc2g: fix dsp-trace-flag command ...................................................................... lc15,sysmo,oc2g: fix dsp-trace-flag command Remove the '~' from '|= flag', it is plain wrong. This affects the correct parsing of DSP trace flags from the config file only. The bug is not present in the interactive VTY command at runtime. Change-Id: I915971f49642967c969f5dd475e8faa960ef3960 --- M src/osmo-bts-litecell15/lc15bts_vty.c M src/osmo-bts-oc2g/oc2gbts_vty.c M src/osmo-bts-sysmo/sysmobts_vty.c 3 files changed, 3 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bts-litecell15/lc15bts_vty.c b/src/osmo-bts-litecell15/lc15bts_vty.c index d0edc88..d27ec28 100644 --- a/src/osmo-bts-litecell15/lc15bts_vty.c +++ b/src/osmo-bts-litecell15/lc15bts_vty.c @@ -88,7 +88,7 @@ unsigned int flag; flag = get_string_value(lc15bts_tracef_names, argv[1]); - pinst->u.lc15.dsp_trace_f |= ~flag; + pinst->u.lc15.dsp_trace_f |= flag; return CMD_SUCCESS; } diff --git a/src/osmo-bts-oc2g/oc2gbts_vty.c b/src/osmo-bts-oc2g/oc2gbts_vty.c index 4c3915b..1f092dd 100644 --- a/src/osmo-bts-oc2g/oc2gbts_vty.c +++ b/src/osmo-bts-oc2g/oc2gbts_vty.c @@ -114,7 +114,7 @@ unsigned int flag; flag = get_string_value(oc2gbts_tracef_names, argv[1]); - pinst->u.oc2g.dsp_trace_f |= ~flag; + pinst->u.oc2g.dsp_trace_f |= flag; return CMD_SUCCESS; } diff --git a/src/osmo-bts-sysmo/sysmobts_vty.c b/src/osmo-bts-sysmo/sysmobts_vty.c index b105bf4..3199c8e 100644 --- a/src/osmo-bts-sysmo/sysmobts_vty.c +++ b/src/osmo-bts-sysmo/sysmobts_vty.c @@ -179,7 +179,7 @@ unsigned int flag; flag = get_string_value(femtobts_tracef_names, argv[1]); - pinst->u.sysmobts.dsp_trace_f |= ~flag; + pinst->u.sysmobts.dsp_trace_f |= flag; return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/14239 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I915971f49642967c969f5dd475e8faa960ef3960 Gerrit-Change-Number: 14239 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 21:04:03 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 21:04:03 +0000 Subject: Change in osmo-ttcn3-hacks[master]: L1CTL_Types.ttcn: do not restrict the length of L1ctlDataInd In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14230 ) Change subject: L1CTL_Types.ttcn: do not restrict the length of L1ctlDataInd ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14230 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iced78796882b757016d02a266d55bc2a98b62a3d Gerrit-Change-Number: 14230 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 28 May 2019 21:04:03 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 21:04:39 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 21:04:39 +0000 Subject: Change in osmo-ttcn3-hacks[master]: L1CTL_Types.ttcn: do not restrict the length of L1ctlDataInd In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14230 ) Change subject: L1CTL_Types.ttcn: do not restrict the length of L1ctlDataInd ...................................................................... L1CTL_Types.ttcn: do not restrict the length of L1ctlDataInd In the existing TC_pcu_* test cases we use L1CTL_DATA_* messages to send / receive (E)GPRS related MAC-blocks. The length of such blocks can be greater than 23 octets (i.e. fixed MAC-block length in GSM), up to 162 octets to be precise. Change-Id: Iced78796882b757016d02a266d55bc2a98b62a3d --- M library/L1CTL_Types.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/L1CTL_Types.ttcn b/library/L1CTL_Types.ttcn index 87849f5..f59d194 100644 --- a/library/L1CTL_Types.ttcn +++ b/library/L1CTL_Types.ttcn @@ -159,7 +159,7 @@ } with { variant "" }; type record L1ctlDataInd { - octetstring payload length(23) + octetstring payload } with { variant (payload) "BYTEORDER(first)" }; -- To view, visit https://gerrit.osmocom.org/14230 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iced78796882b757016d02a266d55bc2a98b62a3d Gerrit-Change-Number: 14230 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 21:05:01 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 21:05:01 +0000 Subject: Change in osmo-remsim[master]: osmo-remsim-bankd: Fix typo in help for --num-slots In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14225 ) Change subject: osmo-remsim-bankd: Fix typo in help for --num-slots ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14225 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If09833f0d0ba46d7bb204ac9b3b7f8128b4b3799 Gerrit-Change-Number: 14225 Gerrit-PatchSet: 1 Gerrit-Owner: roh Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 28 May 2019 21:05:01 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 21:05:02 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 21:05:02 +0000 Subject: Change in osmo-remsim[master]: osmo-remsim-bankd: Fix typo in help for --num-slots In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14225 ) Change subject: osmo-remsim-bankd: Fix typo in help for --num-slots ...................................................................... osmo-remsim-bankd: Fix typo in help for --num-slots Change-Id: If09833f0d0ba46d7bb204ac9b3b7f8128b4b3799 --- M src/bankd/bankd_main.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/bankd/bankd_main.c b/src/bankd/bankd_main.c index 268794b..8cfeb96 100644 --- a/src/bankd/bankd_main.c +++ b/src/bankd/bankd_main.c @@ -219,7 +219,7 @@ " -i --server-host A.B.C.D remsim-server IP address (default: 127.0.0.1)\n" " -p --server-port <1-65535> remsim-server TCP port (default: 9998)\n" " -b --bank-id <1-65535> Bank Identifier of this SIM bank (default: 1)\n" -" -b --num-slots <1-65535> Number of Slots in this SIM bank (default: 8)\n" +" -n --num-slots <1-65535> Number of Slots in this SIM bank (default: 8)\n" " -I --bind-ip A.B.C.D Local IP address to bind for incoming client\n" " connections (default: INADDR_ANY)\n" " -P --bind-port <1-65535> Local TCP port to bind for incoming client\n" -- To view, visit https://gerrit.osmocom.org/14225 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If09833f0d0ba46d7bb204ac9b3b7f8128b4b3799 Gerrit-Change-Number: 14225 Gerrit-PatchSet: 1 Gerrit-Owner: roh Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 21:05:10 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 21:05:10 +0000 Subject: Change in osmo-remsim[master]: osmo-remsim-server: add systemd service script In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14226 ) Change subject: osmo-remsim-server: add systemd service script ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14226 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I310a78b49a8a17e4f954179553ed2a3376e3bd50 Gerrit-Change-Number: 14226 Gerrit-PatchSet: 1 Gerrit-Owner: roh Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 28 May 2019 21:05:10 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 21:05:14 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 21:05:14 +0000 Subject: Change in osmo-remsim[master]: osmo-remsim-server: add systemd service script In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14226 ) Change subject: osmo-remsim-server: add systemd service script ...................................................................... osmo-remsim-server: add systemd service script Change-Id: I310a78b49a8a17e4f954179553ed2a3376e3bd50 --- A contrib/systemd/osmo-remsim-server.service 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/contrib/systemd/osmo-remsim-server.service b/contrib/systemd/osmo-remsim-server.service new file mode 100644 index 0000000..e91e08b --- /dev/null +++ b/contrib/systemd/osmo-remsim-server.service @@ -0,0 +1,12 @@ +[Unit] +Description=Osmocom Remote SIM Server + +[Service] +Type=simple +Restart=always +ExecStart=/usr/bin/osmo-remsim-server +RestartSec=2 + +[Install] +WantedBy=multi-user.target + -- To view, visit https://gerrit.osmocom.org/14226 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I310a78b49a8a17e4f954179553ed2a3376e3bd50 Gerrit-Change-Number: 14226 Gerrit-PatchSet: 1 Gerrit-Owner: roh Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 21:05:35 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 21:05:35 +0000 Subject: Change in osmo-remsim[master]: osmo-remsim-bankd: add systemd service script and etc/default config In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14228 ) Change subject: osmo-remsim-bankd: add systemd service script and etc/default config ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14228 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iefa6e65c7a03b232a124758cf8890b660abf6885 Gerrit-Change-Number: 14228 Gerrit-PatchSet: 1 Gerrit-Owner: roh Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 28 May 2019 21:05:35 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 21:05:36 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 21:05:36 +0000 Subject: Change in osmo-remsim[master]: osmo-remsim-bankd: add systemd service script and etc/default config In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14228 ) Change subject: osmo-remsim-bankd: add systemd service script and etc/default config ...................................................................... osmo-remsim-bankd: add systemd service script and etc/default config Change-Id: Iefa6e65c7a03b232a124758cf8890b660abf6885 --- A contrib/etc_default/osmo-remsim-bankd A contrib/systemd/osmo-remsim-bankd.service 2 files changed, 19 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/contrib/etc_default/osmo-remsim-bankd b/contrib/etc_default/osmo-remsim-bankd new file mode 100644 index 0000000..9f8a9a9 --- /dev/null +++ b/contrib/etc_default/osmo-remsim-bankd @@ -0,0 +1,5 @@ +# Default settings for osmo-remsim-bankd This file is sourced by systemd + +# Options to pass to osmo-remsim-bankd +BANKD_OPTS="-i 10.9.99.1 -n 5" + diff --git a/contrib/systemd/osmo-remsim-bankd.service b/contrib/systemd/osmo-remsim-bankd.service new file mode 100644 index 0000000..58f5435 --- /dev/null +++ b/contrib/systemd/osmo-remsim-bankd.service @@ -0,0 +1,14 @@ +[Unit] +Description=Osmocom Remote SIM BankD + +[Service] +Type=simple +Restart=always +EnvironmentFile=/etc/default/osmo-remsim-bankd +WorkingDirectory=/etc/osmocom +ExecStart=/usr/bin/osmo-remsim-bankd $BANKD_OPTS +RestartSec=2 + +[Install] +WantedBy=multi-user.target + -- To view, visit https://gerrit.osmocom.org/14228 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iefa6e65c7a03b232a124758cf8890b660abf6885 Gerrit-Change-Number: 14228 Gerrit-PatchSet: 1 Gerrit-Owner: roh Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 22:12:43 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 28 May 2019 22:12:43 +0000 Subject: Change in libosmocore[master]: rest_octets: Use correct symbols names for range encoder In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14233 ) Change subject: rest_octets: Use correct symbols names for range encoder ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14233 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I7b1e436f70e0c60979261db87606f38271ec47d3 Gerrit-Change-Number: 14233 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 28 May 2019 22:12:43 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 22:34:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 22:34:19 +0000 Subject: Change in libosmocore[master]: rest_octets: Use correct symbols names for range encoder In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14233 ) Change subject: rest_octets: Use correct symbols names for range encoder ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14233 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I7b1e436f70e0c60979261db87606f38271ec47d3 Gerrit-Change-Number: 14233 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 28 May 2019 22:34:19 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 22:34:21 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 22:34:21 +0000 Subject: Change in libosmocore[master]: rest_octets: Actually include gsm48_rest_octets.c in Makefile.am In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14232 ) Change subject: rest_octets: Actually include gsm48_rest_octets.c in Makefile.am ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14232 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0355115c2645f236c9e32cf7a563cf51a857e8a3 Gerrit-Change-Number: 14232 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 28 May 2019 22:34:21 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 22:34:23 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 22:34:23 +0000 Subject: Change in libosmocore[master]: rest_octets: Fix export of osmo_gsm48_rest_octets In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14234 ) Change subject: rest_octets: Fix export of osmo_gsm48_rest_octets ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14234 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8b1ee2405f6338507e9dfb5f1f437c4c2db2e330 Gerrit-Change-Number: 14234 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 28 May 2019 22:34:23 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 22:34:25 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 22:34:25 +0000 Subject: Change in libosmocore[master]: rest_octets: Suffix encoder functiosn with _encode In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14235 ) Change subject: rest_octets: Suffix encoder functiosn with _encode ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14235 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I08e0ca9a8d13c7aa40b9d90f34f0e13adb87d4e0 Gerrit-Change-Number: 14235 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 28 May 2019 22:34:25 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 22:34:27 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 22:34:27 +0000 Subject: Change in libosmocore[master]: rest_octets: Add function to parse SI3 rest octets In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14236 ) Change subject: rest_octets: Add function to parse SI3 rest octets ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14236 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I690cf308311f910005a325d50f5d5d825678d2b2 Gerrit-Change-Number: 14236 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 28 May 2019 22:34:27 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 22:34:28 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 22:34:28 +0000 Subject: Change in libosmocore[master]: rest_octets: Implement actual SI6 rest octets encoding In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14237 ) Change subject: rest_octets: Implement actual SI6 rest octets encoding ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14237 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id75005a0c4a02ce7f809692d58b3bd226bc582b2 Gerrit-Change-Number: 14237 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 28 May 2019 22:34:28 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 22:34:30 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 22:34:30 +0000 Subject: Change in libosmocore[master]: rest_octets: Remove SI2ter + SI2bis encoders that don't do anything In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14238 ) Change subject: rest_octets: Remove SI2ter + SI2bis encoders that don't do anything ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14238 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie10684de6a6b2663e2a871fcdb2b275b6ad7a1e7 Gerrit-Change-Number: 14238 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 28 May 2019 22:34:30 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 22:34:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 22:34:33 +0000 Subject: Change in libosmocore[master]: rest_octets: Use correct symbols names for range encoder In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14233 ) Change subject: rest_octets: Use correct symbols names for range encoder ...................................................................... rest_octets: Use correct symbols names for range encoder As gsm48_rest_octets.c is not listed in the Makefile.am, it's never actually compiled and we never noticed that it's calling functions by symbol names that don't exist :/ Change-Id: I7b1e436f70e0c60979261db87606f38271ec47d3 Related: OS#3075 --- M src/gsm/gsm48_rest_octets.c 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved diff --git a/src/gsm/gsm48_rest_octets.c b/src/gsm/gsm48_rest_octets.c index cdb61f1..0171fd9 100644 --- a/src/gsm/gsm48_rest_octets.c +++ b/src/gsm/gsm48_rest_octets.c @@ -256,13 +256,13 @@ /* Select the range and the amount of bits needed */ switch (r) { case OSMO_GSM48_ARFCN_RANGE_128: - return osmo_gsm48_range_enc_range128(chan_list, f0, w); + return osmo_gsm48_range_enc_128(chan_list, f0, w); case OSMO_GSM48_ARFCN_RANGE_256: - return osmo_gsm48_range_enc_range256(chan_list, f0, w); + return osmo_gsm48_range_enc_256(chan_list, f0, w); case OSMO_GSM48_ARFCN_RANGE_512: - return osmo_gsm48_range_enc_range512(chan_list, f0, w); + return osmo_gsm48_range_enc_512(chan_list, f0, w); case OSMO_GSM48_ARFCN_RANGE_1024: - return osmo_gsm48_range_enc_range1024(chan_list, f0, f0_included, w); + return osmo_gsm48_range_enc_1024(chan_list, f0, f0_included, w); default: return -ERANGE; }; -- To view, visit https://gerrit.osmocom.org/14233 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I7b1e436f70e0c60979261db87606f38271ec47d3 Gerrit-Change-Number: 14233 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 22:34:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 22:34:33 +0000 Subject: Change in libosmocore[master]: rest_octets: Actually include gsm48_rest_octets.c in Makefile.am In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14232 ) Change subject: rest_octets: Actually include gsm48_rest_octets.c in Makefile.am ...................................................................... rest_octets: Actually include gsm48_rest_octets.c in Makefile.am The gsm48_rest_octets.c file was added in Change-Id I47888965ab11bba1186c21987f1365c9270abeab, but it never actually ended up being compiled as it wasn't listed in the makefile :/ Change-Id: I0355115c2645f236c9e32cf7a563cf51a857e8a3 Relsted: OS#3075 --- M src/gsm/Makefile.am 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index 658ef2d..5740b67 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -32,7 +32,7 @@ milenage/milenage.c gan.c ipa.c gsm0341.c apn.c \ gsup.c gsup_sms.c gprs_gea.c gsm0503_conv.c oap.c gsm0808_utils.c \ gsm23003.c mncc.c bts_features.c oap_client.c \ - gsm29118.c + gsm29118.c gsm48_rest_octets.c libgsmint_la_LDFLAGS = -no-undefined libgsmint_la_LIBADD = $(top_builddir)/src/libosmocore.la -- To view, visit https://gerrit.osmocom.org/14232 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I0355115c2645f236c9e32cf7a563cf51a857e8a3 Gerrit-Change-Number: 14232 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 22:34:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 22:34:33 +0000 Subject: Change in libosmocore[master]: rest_octets: Fix export of osmo_gsm48_rest_octets In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14234 ) Change subject: rest_octets: Fix export of osmo_gsm48_rest_octets ...................................................................... rest_octets: Fix export of osmo_gsm48_rest_octets the symbols had an omso_ prefix, while the entry in the .map file didn't. As a result, all related symbols were never exported and hence not usable by any users of the dynamic library. Change-Id: I8b1ee2405f6338507e9dfb5f1f437c4c2db2e330 --- M src/gsm/libosmogsm.map 1 file changed, 8 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 299504e..319969a 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -301,14 +301,14 @@ gsm48_push_l3hdr; gsm48_att_tlvdef; gsm48_cc_msg_name; -gsm48_rest_octets_si1; -gsm48_rest_octets_si2quater; -gsm48_rest_octets_si2ter; -gsm48_rest_octets_si2bis; -gsm48_rest_octets_si6; -gsm48_rest_octets_si3; -gsm48_rest_octets_si4; -gsm48_rest_octets_si13; +osmo_gsm48_rest_octets_si1; +osmo_gsm48_rest_octets_si2quater; +osmo_gsm48_rest_octets_si2ter; +osmo_gsm48_rest_octets_si2bis; +osmo_gsm48_rest_octets_si6; +osmo_gsm48_rest_octets_si3; +osmo_gsm48_rest_octets_si4; +osmo_gsm48_rest_octets_si13; gsm48_rr_msg_name; gsm48_cc_state_name; gsm48_construct_ra; -- To view, visit https://gerrit.osmocom.org/14234 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I8b1ee2405f6338507e9dfb5f1f437c4c2db2e330 Gerrit-Change-Number: 14234 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 22:34:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 22:34:33 +0000 Subject: Change in libosmocore[master]: rest_octets: Suffix encoder functiosn with _encode In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14235 ) Change subject: rest_octets: Suffix encoder functiosn with _encode ...................................................................... rest_octets: Suffix encoder functiosn with _encode ... otherwise it's not really clear what they do. Change-Id: I08e0ca9a8d13c7aa40b9d90f34f0e13adb87d4e0 --- M include/osmocom/gsm/gsm48_rest_octets.h M src/gsm/gsm48_rest_octets.c M src/gsm/libosmogsm.map 3 files changed, 32 insertions(+), 28 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/include/osmocom/gsm/gsm48_rest_octets.h b/include/osmocom/gsm/gsm48_rest_octets.h index 6280b6a..3029ac5 100644 --- a/include/osmocom/gsm/gsm48_rest_octets.h +++ b/include/osmocom/gsm/gsm48_rest_octets.h @@ -12,13 +12,15 @@ #define SI2Q_MIN_LEN 18 /* generate SI1 rest octets */ -int osmo_gsm48_rest_octets_si1(uint8_t *data, uint8_t *nch_pos, int is1800_net); -int osmo_gsm48_rest_octets_si2quater(uint8_t *data, uint8_t si2q_index, uint8_t si2q_count, const uint16_t *uarfcn_list, - size_t *u_offset, size_t uarfcn_length, uint16_t *scramble_list, - struct osmo_earfcn_si2q *si2quater_neigh_list, size_t *e_offset); -int osmo_gsm48_rest_octets_si2ter(uint8_t *data); -int osmo_gsm48_rest_octets_si2bis(uint8_t *data); -int osmo_gsm48_rest_octets_si6(uint8_t *data, bool is1800_net); +int osmo_gsm48_rest_octets_si1_encode(uint8_t *data, uint8_t *nch_pos, int is1800_net); +int osmo_gsm48_rest_octets_si2quater_encode(uint8_t *data, uint8_t si2q_index, uint8_t si2q_count, + const uint16_t *uarfcn_list, size_t *u_offset, + size_t uarfcn_length, uint16_t *scramble_list, + struct osmo_earfcn_si2q *si2quater_neigh_list, + size_t *e_offset); +int osmo_gsm48_rest_octets_si2ter_encode(uint8_t *data); +int osmo_gsm48_rest_octets_si2bis_encode(uint8_t *data); +int osmo_gsm48_rest_octets_si6_encode(uint8_t *data, bool is1800_net); struct osmo_gsm48_si_selection_params { uint16_t penalty_time:5, @@ -67,10 +69,10 @@ }; /* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */ -int osmo_gsm48_rest_octets_si3(uint8_t *data, const struct osmo_gsm48_si_ro_info *si3); +int osmo_gsm48_rest_octets_si3_encode(uint8_t *data, const struct osmo_gsm48_si_ro_info *si3); /* Generate SI4 Rest Octets (Chapter 10.5.2.35) */ -int osmo_gsm48_rest_octets_si4(uint8_t *data, const struct osmo_gsm48_si_ro_info *si4, int len); +int osmo_gsm48_rest_octets_si4_encode(uint8_t *data, const struct osmo_gsm48_si_ro_info *si4, int len); struct osmo_gsm48_si13_info { struct osmo_gprs_cell_options cell_opts; @@ -84,4 +86,4 @@ }; /* Generate SI13 Rest Octests (Chapter 10.5.2.37b) */ -int osmo_gsm48_rest_octets_si13(uint8_t *data, const struct osmo_gsm48_si13_info *si13); +int osmo_gsm48_rest_octets_si13_encode(uint8_t *data, const struct osmo_gsm48_si13_info *si13); diff --git a/src/gsm/gsm48_rest_octets.c b/src/gsm/gsm48_rest_octets.c index 0171fd9..b9d5275 100644 --- a/src/gsm/gsm48_rest_octets.c +++ b/src/gsm/gsm48_rest_octets.c @@ -35,7 +35,7 @@ #include /* generate SI1 rest octets */ -int osmo_gsm48_rest_octets_si1(uint8_t *data, uint8_t *nch_pos, int is1800_net) +int osmo_gsm48_rest_octets_si1_encode(uint8_t *data, uint8_t *nch_pos, int is1800_net) { struct bitvec bv; @@ -430,9 +430,11 @@ } /* generate SI2quater rest octets: 3GPP TS 44.018 ? 10.5.2.33b */ -int osmo_gsm48_rest_octets_si2quater(uint8_t *data, uint8_t si2q_index, uint8_t si2q_count, const uint16_t *uarfcn_list, - size_t *u_offset, size_t uarfcn_length, uint16_t *scramble_list, - struct osmo_earfcn_si2q *si2quater_neigh_list, size_t *e_offset) +int osmo_gsm48_rest_octets_si2quater_encode(uint8_t *data, uint8_t si2q_index, uint8_t si2q_count, + const uint16_t *uarfcn_list, size_t *u_offset, + size_t uarfcn_length, uint16_t *scramble_list, + struct osmo_earfcn_si2q *si2quater_neigh_list, + size_t *e_offset) { int rc; struct bitvec bv; @@ -535,7 +537,7 @@ } /* Generate SI2ter Rest Octests 3GPP TS 44.018 Table 10.5.2.33a.1 */ -int osmo_gsm48_rest_octets_si2ter(uint8_t *data) +int osmo_gsm48_rest_octets_si2ter_encode(uint8_t *data) { struct bitvec bv; @@ -552,7 +554,7 @@ } /* Generate SI2bis Rest Octests 3GPP TS 44.018 Table 10.5.2.33.1 */ -int osmo_gsm48_rest_octets_si2bis(uint8_t *data) +int osmo_gsm48_rest_octets_si2bis_encode(uint8_t *data) { struct bitvec bv; @@ -566,7 +568,7 @@ } /* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */ -int osmo_gsm48_rest_octets_si3(uint8_t *data, const struct osmo_gsm48_si_ro_info *si3) +int osmo_gsm48_rest_octets_si3_encode(uint8_t *data, const struct osmo_gsm48_si_ro_info *si3) { struct bitvec bv; @@ -626,7 +628,7 @@ } /* Generate SI4 Rest Octets (Chapter 10.5.2.35) */ -int osmo_gsm48_rest_octets_si4(uint8_t *data, const struct osmo_gsm48_si_ro_info *si4, int len) +int osmo_gsm48_rest_octets_si4_encode(uint8_t *data, const struct osmo_gsm48_si_ro_info *si4, int len) { struct bitvec bv; @@ -685,7 +687,7 @@ { L | H < GPRS_MS_TXPWR_MAX_CCH : bit (5) > } ; */ -int osmo_gsm48_rest_octets_si6(uint8_t *data, bool is1800_net) +int osmo_gsm48_rest_octets_si6_encode(uint8_t *data, bool is1800_net) { struct bitvec bv; @@ -908,7 +910,7 @@ } /* Generate SI13 Rest Octests (04.08 Chapter 10.5.2.37b) */ -int osmo_gsm48_rest_octets_si13(uint8_t *data, const struct osmo_gsm48_si13_info *si13) +int osmo_gsm48_rest_octets_si13_encode(uint8_t *data, const struct osmo_gsm48_si13_info *si13) { struct bitvec bv; diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 319969a..56fed0f 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -301,14 +301,14 @@ gsm48_push_l3hdr; gsm48_att_tlvdef; gsm48_cc_msg_name; -osmo_gsm48_rest_octets_si1; -osmo_gsm48_rest_octets_si2quater; -osmo_gsm48_rest_octets_si2ter; -osmo_gsm48_rest_octets_si2bis; -osmo_gsm48_rest_octets_si6; -osmo_gsm48_rest_octets_si3; -osmo_gsm48_rest_octets_si4; -osmo_gsm48_rest_octets_si13; +osmo_gsm48_rest_octets_si1_encode; +osmo_gsm48_rest_octets_si2quater_encode; +osmo_gsm48_rest_octets_si2ter_encode; +osmo_gsm48_rest_octets_si2bis_encode; +osmo_gsm48_rest_octets_si6_encode; +osmo_gsm48_rest_octets_si3_encode; +osmo_gsm48_rest_octets_si4_encode; +osmo_gsm48_rest_octets_si13_encode; gsm48_rr_msg_name; gsm48_cc_state_name; gsm48_construct_ra; -- To view, visit https://gerrit.osmocom.org/14235 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I08e0ca9a8d13c7aa40b9d90f34f0e13adb87d4e0 Gerrit-Change-Number: 14235 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 22:34:34 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 22:34:34 +0000 Subject: Change in libosmocore[master]: rest_octets: Add function to parse SI3 rest octets In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14236 ) Change subject: rest_octets: Add function to parse SI3 rest octets ...................................................................... rest_octets: Add function to parse SI3 rest octets Change-Id: I690cf308311f910005a325d50f5d5d825678d2b2 Related: OS#3075 Related: OS#4023 --- M include/osmocom/gsm/gsm48_rest_octets.h M src/gsm/gsm48_rest_octets.c M src/gsm/libosmogsm.map 3 files changed, 82 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/include/osmocom/gsm/gsm48_rest_octets.h b/include/osmocom/gsm/gsm48_rest_octets.h index 3029ac5..bc5023a 100644 --- a/include/osmocom/gsm/gsm48_rest_octets.h +++ b/include/osmocom/gsm/gsm48_rest_octets.h @@ -87,3 +87,6 @@ /* Generate SI13 Rest Octests (Chapter 10.5.2.37b) */ int osmo_gsm48_rest_octets_si13_encode(uint8_t *data, const struct osmo_gsm48_si13_info *si13); + +/* Parse SI3 Rest Octets */ +void osmo_gsm48_rest_octets_si3_decode(struct osmo_gsm48_si_ro_info *si3, const uint8_t *data); diff --git a/src/gsm/gsm48_rest_octets.c b/src/gsm/gsm48_rest_octets.c index b9d5275..d5c93fe 100644 --- a/src/gsm/gsm48_rest_octets.c +++ b/src/gsm/gsm48_rest_octets.c @@ -951,3 +951,81 @@ bitvec_spare_padding(&bv, (bv.data_len*8)-1); return bv.data_len; } + + +/*********************************************************************** + * Decoder + ***********************************************************************/ + +/*! Decode SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72). + * \param[out] si3 decoded SI3 rest octets + * \param[in] encoded SI3 rest octets, 4 octets long */ +void osmo_gsm48_rest_octets_si3_decode(struct osmo_gsm48_si_ro_info *si3, const uint8_t *data) +{ + struct osmo_gsm48_si_selection_params *sp = &si3->selection_params; + struct osmo_gsm48_si_power_offset *po = &si3->power_offset; + struct osmo_gsm48_si3_gprs_ind *gi = &si3->gprs_ind; + struct bitvec bv; + + memset(&bv, 0, sizeof(bv)); + bv.data = (uint8_t *) data; + bv.data_len = 4; + + memset(si3, 0, sizeof(*si3)); + + /* Optional Selection Paraosmo_gsm48_si_ro_infometers */ + if (bitvec_get_bit_high(&bv) == H) { + sp->present = 1; + sp->cbq = bitvec_get_uint(&bv, 1); + sp->cell_resel_off = bitvec_get_uint(&bv, 6); + sp->temp_offs = bitvec_get_uint(&bv, 3); + sp->penalty_time = bitvec_get_uint(&bv, 5); + } else + sp->present = 0; + + /* Optional Power Offset */ + if (bitvec_get_bit_high(&bv) == H) { + po->present = 1; + po->power_offset = bitvec_get_uint(&bv, 2); + } else + po->present = 0; + + /* System Information 2ter Indicator */ + if (bitvec_get_bit_high(&bv) == H) + si3->si2ter_indicator = 1; + else + si3->si2ter_indicator = 0; + + /* Early Classmark Sending Control */ + if (bitvec_get_bit_high(&bv) == H) + si3->early_cm_ctrl = 1; + else + si3->early_cm_ctrl = 0; + + /* Scheduling if and where */ + if (bitvec_get_bit_high(&bv) == H) { + si3->scheduling.present = 1; + si3->scheduling.where = bitvec_get_uint(&bv, 3); + } else + si3->scheduling.present = 0; + + /* GPRS Indicator */ + if (bitvec_get_bit_high(&bv) == H) { + gi->present = 1; + gi->ra_colour = bitvec_get_uint(&bv, 3); + gi->si13_position = bitvec_get_uint(&bv, 1); + } else + gi->present = 0; + + /* 3G Early Classmark Sending Restriction. If H, then controlled by + * early_cm_ctrl above */ + if (bitvec_get_bit_high(&bv) == H) + si3->early_cm_restrict_3g = 1; + else + si3->early_cm_restrict_3g = 0; + + if (bitvec_get_bit_high(&bv) == H) + si3->si2quater_indicator = 1; + else + si3->si2quater_indicator = 0; +} diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 56fed0f..84d71e6 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -309,6 +309,7 @@ osmo_gsm48_rest_octets_si3_encode; osmo_gsm48_rest_octets_si4_encode; osmo_gsm48_rest_octets_si13_encode; +osmo_gsm48_rest_octets_si3_decode; gsm48_rr_msg_name; gsm48_cc_state_name; gsm48_construct_ra; -- To view, visit https://gerrit.osmocom.org/14236 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I690cf308311f910005a325d50f5d5d825678d2b2 Gerrit-Change-Number: 14236 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 22:34:34 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 22:34:34 +0000 Subject: Change in libosmocore[master]: rest_octets: Implement actual SI6 rest octets encoding In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14237 ) Change subject: rest_octets: Implement actual SI6 rest octets encoding ...................................................................... rest_octets: Implement actual SI6 rest octets encoding There's very little sense behind introducing a function into libosmogsm which doesn't implement 90% of the spec. Let's allow the caller to provide the various optional bits of information to the encoder, rather than generating mostly static SI6 rest octets. Change-Id: Id75005a0c4a02ce7f809692d58b3bd226bc582b2 --- M include/osmocom/gsm/gsm48_rest_octets.h M src/gsm/gsm48_rest_octets.c 2 files changed, 75 insertions(+), 14 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/include/osmocom/gsm/gsm48_rest_octets.h b/include/osmocom/gsm/gsm48_rest_octets.h index bc5023a..7163672 100644 --- a/include/osmocom/gsm/gsm48_rest_octets.h +++ b/include/osmocom/gsm/gsm48_rest_octets.h @@ -20,7 +20,44 @@ size_t *e_offset); int osmo_gsm48_rest_octets_si2ter_encode(uint8_t *data); int osmo_gsm48_rest_octets_si2bis_encode(uint8_t *data); -int osmo_gsm48_rest_octets_si6_encode(uint8_t *data, bool is1800_net); + +struct osmo_gsm48_si_pch_nch_info { + bool present; + bool paging_channel_restructuring; + uint8_t nln_sacch; + bool call_priority_present; + uint8_t call_priority; + bool nln_status_sacch; +}; + +struct osmo_gsm48_si_vbs_vgcs_options { + bool present; + bool inband_notifications; + bool inband_pagings; +}; + +struct osmo_gsm48_si_dtm_support { + bool present; + uint8_t rac; + uint8_t max_lapdm; +}; + +struct osmo_gsm48_si_gprs_ms_txpwr_max_ccch { + bool present; + uint8_t max_txpwr; +}; + +struct osmo_gsm48_si6_ro_info { + struct osmo_gsm48_si_pch_nch_info pch_nch_info; + struct osmo_gsm48_si_vbs_vgcs_options vbs_vgcs_options; + struct osmo_gsm48_si_dtm_support dtm_support; + bool band_indicator_1900; + struct osmo_gsm48_si_gprs_ms_txpwr_max_ccch gprs_ms_txpwr_max_ccch; + /* MBMS: not supported in Osmocom */ + /* AMR config (group channel): not supported in Osmocom */ +}; + +int osmo_gsm48_rest_octets_si6_encode(uint8_t *data, const struct osmo_gsm48_si6_ro_info *in); struct osmo_gsm48_si_selection_params { uint16_t penalty_time:5, diff --git a/src/gsm/gsm48_rest_octets.c b/src/gsm/gsm48_rest_octets.c index d5c93fe..c1e4b30 100644 --- a/src/gsm/gsm48_rest_octets.c +++ b/src/gsm/gsm48_rest_octets.c @@ -687,7 +687,7 @@ { L | H < GPRS_MS_TXPWR_MAX_CCH : bit (5) > } ; */ -int osmo_gsm48_rest_octets_si6_encode(uint8_t *data, bool is1800_net) +int osmo_gsm48_rest_octets_si6_encode(uint8_t *data, const struct osmo_gsm48_si6_ro_info *in) { struct bitvec bv; @@ -695,19 +695,43 @@ bv.data = data; bv.data_len = 1; - /* no PCH/NCH info */ - bitvec_set_bit(&bv, L); - /* no VBS/VGCS options */ - bitvec_set_bit(&bv, L); - /* no DTM_support */ - bitvec_set_bit(&bv, L); - /* band indicator */ - if (is1800_net) - bitvec_set_bit(&bv, L); - else + if (in->pch_nch_info.present) { bitvec_set_bit(&bv, H); - /* no GPRS_MS_TXPWR_MAX_CCH */ - bitvec_set_bit(&bv, L); + bitvec_set_bit(&bv, !!in->pch_nch_info.paging_channel_restructuring); + bitvec_set_uint(&bv, in->pch_nch_info.nln_sacch, 2); + if (in->pch_nch_info.call_priority_present) { + bitvec_set_bit(&bv, 1); + bitvec_set_uint(&bv, in->pch_nch_info.call_priority, 3); + } else + bitvec_set_bit(&bv, 0); + bitvec_set_bit(&bv, !!in->pch_nch_info.nln_status_sacch); + } else + bitvec_set_bit(&bv, L); + + if (in->vbs_vgcs_options.present) { + bitvec_set_bit(&bv, H); + bitvec_set_bit(&bv, !!in->vbs_vgcs_options.inband_notifications); + bitvec_set_bit(&bv, !!in->vbs_vgcs_options.inband_pagings); + } else + bitvec_set_bit(&bv, L); + + if (in->dtm_support.present) { + bitvec_set_bit(&bv, H); + bitvec_set_uint(&bv, in->dtm_support.rac, 8); + bitvec_set_uint(&bv, in->dtm_support.max_lapdm, 3); + } else + bitvec_set_bit(&bv, L); + + if (in->band_indicator_1900) + bitvec_set_bit(&bv, H); + else + bitvec_set_bit(&bv, L); + + if (in->gprs_ms_txpwr_max_ccch.present) { + bitvec_set_bit(&bv, H); + bitvec_set_uint(&bv, in->gprs_ms_txpwr_max_ccch.max_txpwr, 5); + } else + bitvec_set_bit(&bv, L); bitvec_spare_padding(&bv, (bv.data_len * 8) - 1); return bv.data_len; -- To view, visit https://gerrit.osmocom.org/14237 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id75005a0c4a02ce7f809692d58b3bd226bc582b2 Gerrit-Change-Number: 14237 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 22:34:35 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 22:34:35 +0000 Subject: Change in libosmocore[master]: rest_octets: Remove SI2ter + SI2bis encoders that don't do anything In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14238 ) Change subject: rest_octets: Remove SI2ter + SI2bis encoders that don't do anything ...................................................................... rest_octets: Remove SI2ter + SI2bis encoders that don't do anything The library should either provide functions that implement encoding of those rest octets, or it shouldn't. Providing a function that doesn't do anything but pad the buffer is useless. Change-Id: Ie10684de6a6b2663e2a871fcdb2b275b6ad7a1e7 --- M include/osmocom/gsm/gsm48_rest_octets.h M src/gsm/gsm48_rest_octets.c M src/gsm/libosmogsm.map 3 files changed, 0 insertions(+), 35 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/include/osmocom/gsm/gsm48_rest_octets.h b/include/osmocom/gsm/gsm48_rest_octets.h index 7163672..d3bb878 100644 --- a/include/osmocom/gsm/gsm48_rest_octets.h +++ b/include/osmocom/gsm/gsm48_rest_octets.h @@ -18,8 +18,6 @@ size_t uarfcn_length, uint16_t *scramble_list, struct osmo_earfcn_si2q *si2quater_neigh_list, size_t *e_offset); -int osmo_gsm48_rest_octets_si2ter_encode(uint8_t *data); -int osmo_gsm48_rest_octets_si2bis_encode(uint8_t *data); struct osmo_gsm48_si_pch_nch_info { bool present; diff --git a/src/gsm/gsm48_rest_octets.c b/src/gsm/gsm48_rest_octets.c index c1e4b30..84136c6 100644 --- a/src/gsm/gsm48_rest_octets.c +++ b/src/gsm/gsm48_rest_octets.c @@ -536,37 +536,6 @@ bitvec_set_bit(bv, L); } -/* Generate SI2ter Rest Octests 3GPP TS 44.018 Table 10.5.2.33a.1 */ -int osmo_gsm48_rest_octets_si2ter_encode(uint8_t *data) -{ - struct bitvec bv; - - memset(&bv, 0, sizeof(bv)); - bv.data = data; - bv.data_len = 4; - - /* No SI2ter_MP_CHANGE_MARK */ - bitvec_set_bit(&bv, L); - - bitvec_spare_padding(&bv, (bv.data_len * 8) - 1); - - return bv.data_len; -} - -/* Generate SI2bis Rest Octests 3GPP TS 44.018 Table 10.5.2.33.1 */ -int osmo_gsm48_rest_octets_si2bis_encode(uint8_t *data) -{ - struct bitvec bv; - - memset(&bv, 0, sizeof(bv)); - bv.data = data; - bv.data_len = 1; - - bitvec_spare_padding(&bv, (bv.data_len * 8) - 1); - - return bv.data_len; -} - /* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */ int osmo_gsm48_rest_octets_si3_encode(uint8_t *data, const struct osmo_gsm48_si_ro_info *si3) { diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 84d71e6..d49401d 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -303,8 +303,6 @@ gsm48_cc_msg_name; osmo_gsm48_rest_octets_si1_encode; osmo_gsm48_rest_octets_si2quater_encode; -osmo_gsm48_rest_octets_si2ter_encode; -osmo_gsm48_rest_octets_si2bis_encode; osmo_gsm48_rest_octets_si6_encode; osmo_gsm48_rest_octets_si3_encode; osmo_gsm48_rest_octets_si4_encode; -- To view, visit https://gerrit.osmocom.org/14238 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie10684de6a6b2663e2a871fcdb2b275b6ad7a1e7 Gerrit-Change-Number: 14238 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 22:35:39 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 28 May 2019 22:35:39 +0000 Subject: Change in osmo-bts[master]: clear GPRS indicator in SI3 while PCU is disconnected In-Reply-To: References: Message-ID: Harald Welte has removed a vote on this change. Change subject: clear GPRS indicator in SI3 while PCU is disconnected ...................................................................... Removed Verified+1 by Harald Welte -- To view, visit https://gerrit.osmocom.org/10170 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: deleteVote Gerrit-Change-Id: I1a6f5c636c0fe098ee31c280d4572a3f8122b44b Gerrit-Change-Number: 10170 Gerrit-PatchSet: 5 Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Stefan Sperling Gerrit-CC: Max -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 22:59:47 2019 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 28 May 2019 22:59:47 +0000 Subject: Change in libosmocore[master]: gsm48_rest_octets: Fix license: GPLv2+ instead of AGPLv3+ In-Reply-To: References: Message-ID: Holger Freyther has posted comments on this change. ( https://gerrit.osmocom.org/14214 ) Change subject: gsm48_rest_octets: Fix license: GPLv2+ instead of AGPLv3+ ...................................................................... Patch Set 4: Code-Review+2 No objection from me. -- To view, visit https://gerrit.osmocom.org/14214 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ief3009dc28dd83e1e26a7101af2eed2341684a87 Gerrit-Change-Number: 14214 Gerrit-PatchSet: 4 Gerrit-Owner: Harald Welte Gerrit-Assignee: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Tue, 28 May 2019 22:59:47 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 28 23:31:41 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 28 May 2019 23:31:41 +0000 Subject: Change in osmo-bts[master]: clear GPRS indicator in SI3 while PCU is disconnected In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/10170 ) Change subject: clear GPRS indicator in SI3 while PCU is disconnected ...................................................................... Patch Set 5: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/10170/5/src/common/pcu_sock.c File src/common/pcu_sock.c: https://gerrit.osmocom.org/#/c/10170/5/src/common/pcu_sock.c at 602 PS5, Line 602: regenerate_si3_restoctets I think this should be rather done in pcu_sock_accept(). This function should do what the name says - process TXT indications. -- To view, visit https://gerrit.osmocom.org/10170 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1a6f5c636c0fe098ee31c280d4572a3f8122b44b Gerrit-Change-Number: 10170 Gerrit-PatchSet: 5 Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Max Gerrit-Comment-Date: Tue, 28 May 2019 23:31:41 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Wed May 29 03:07:26 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 29 May 2019 03:07:26 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in xUbuntu_19.04/x86_64 In-Reply-To: References: Message-ID: <5cedf7879ff1_2441fa05f03021ad@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/xUbuntu_19.04/x86_64 Package network:osmocom:nightly/osmo-hlr failed to build in xUbuntu_19.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 128s] | #define HAVE_STDLIB_H 1 [ 128s] | #define HAVE_STRING_H 1 [ 128s] | #define HAVE_MEMORY_H 1 [ 128s] | #define HAVE_STRINGS_H 1 [ 128s] | #define HAVE_INTTYPES_H 1 [ 128s] | #define HAVE_STDINT_H 1 [ 128s] | #define HAVE_UNISTD_H 1 [ 128s] | #define HAVE_DLFCN_H 1 [ 128s] | #define LT_OBJDIR ".libs/" [ 128s] | #define PACKAGE "osmo-hlr" [ 128s] | #define VERSION "1.0.0.32-29f3" [ 128s] | #define STDC_HEADERS 1 [ 128s] | [ 128s] | configure: exit 0 [ 128s] [ 128s] make[1]: *** [debian/rules:17: override_dh_auto_test] Error 1 [ 128s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 128s] make: *** [debian/rules:7: build] Error 2 [ 128s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 128s] [ 128s] lamb03 failed "build osmo-hlr_1.0.0.32.29f3.dsc" at Wed May 29 03:07:21 UTC 2019. [ 128s] [ 128s] ### VM INTERACTION START ### [ 131s] [ 119.018051] sysrq: SysRq : Power Off [ 131s] [ 119.022700] reboot: Power down [ 131s] ### VM INTERACTION END ### [ 131s] [ 131s] lamb03 failed "build osmo-hlr_1.0.0.32.29f3.dsc" at Wed May 29 03:07:24 UTC 2019. [ 131s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed May 29 04:33:26 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 29 May 2019 04:33:26 +0000 Subject: Build failure of network:osmocom:latest/osmo-sysmon in Debian_Unstable/x86_64 In-Reply-To: References: Message-ID: <5cee0badafc97_2441fa05f03142ba@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sysmon/Debian_Unstable/x86_64 Package network:osmocom:latest/osmo-sysmon failed to build in Debian_Unstable/x86_64 Check out the package for editing: osc checkout network:osmocom:latest osmo-sysmon Last lines of build log: [ 81s] #define PACKAGE "osmo-sysmon" [ 81s] #define VERSION "0.1.0" [ 81s] #define STDC_HEADERS 1 [ 81s] #define HAVE_SYS_TYPES_H 1 [ 81s] #define HAVE_SYS_STAT_H 1 [ 81s] #define HAVE_STDLIB_H 1 [ 81s] #define HAVE_STRING_H 1 [ 81s] #define HAVE_MEMORY_H 1 [ 81s] #define HAVE_STRINGS_H 1 [ 81s] #define HAVE_INTTYPES_H 1 [ 81s] #define HAVE_STDINT_H 1 [ 81s] #define HAVE_UNISTD_H 1 [ 81s] #define HAVE_DLFCN_H 1 [ 81s] #define LT_OBJDIR ".libs/" [ 81s] [ 81s] configure: exit 1 [ 81s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/x86_64-linux-gnu --libexecdir=\${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 81s] make: *** [debian/rules:45: build] Error 2 [ 81s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 81s] [ 81s] sheep84 failed "build osmo-sysmon_0.1.0.dsc" at Wed May 29 04:33:14 UTC 2019. [ 81s] [ 81s] ### VM INTERACTION START ### [ 84s] [ 74.592173] sysrq: SysRq : Power Off [ 84s] [ 74.600849] reboot: Power down [ 84s] ### VM INTERACTION END ### [ 84s] [ 84s] sheep84 failed "build osmo-sysmon_0.1.0.dsc" at Wed May 29 04:33:17 UTC 2019. [ 84s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed May 29 04:38:52 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 29 May 2019 04:38:52 +0000 Subject: Build failure of network:osmocom:latest/openbsc in Debian_Unstable/x86_64 In-Reply-To: References: Message-ID: <5cee0cfa508cd_2441fa05f03152f2@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/openbsc/Debian_Unstable/x86_64 Package network:osmocom:latest/openbsc failed to build in Debian_Unstable/x86_64 Check out the package for editing: osc checkout network:osmocom:latest openbsc Last lines of build log: [ 197s] | #define HAVE_MEMORY_H 1 [ 197s] | #define HAVE_STRINGS_H 1 [ 197s] | #define HAVE_INTTYPES_H 1 [ 197s] | #define HAVE_STDINT_H 1 [ 197s] | #define HAVE_UNISTD_H 1 [ 197s] | #define HAVE_DLFCN_H 1 [ 197s] | #define LT_OBJDIR ".libs/" [ 197s] | #define BUILD_SMPP 1 [ 197s] | #define STDC_HEADERS 1 [ 197s] | #define HAVE_DBI_DBD_H 1 [ 197s] | #define HAVE_PCAP_PCAP_H 1 [ 197s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 197s] | [ 197s] | configure: exit 0 [ 197s] [ 197s] # -*- compilation -*- [ 197s] 4. testsuite.at:23: testing db ... [ 197s] ./testsuite.at:28: $abs_top_builddir/tests/db/db_test [ 197s] --- expout 2019-05-29 04:38:41.932336272 +0000 [ 198s] +++ /usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/4/stdout 2019-05-29 04:38:42.212336270 +0000 [ 198s] @@ -1,4 +1,6 @@ [ 198s] Testing subscriber database code. [ 198s] DB: Database initialized. [ 200s] +no tables in statemen[ 186.861958] sysrq: SysRq : Power Off [ 200s] [ 186.889577] reboot: Power down [ 200s] ### VM INTERACTION END ### [ 200s] [ 200s] build72 failed "build openbsc_1.2.0.dsc" at Wed May 29 04:38:46 UTC 2019. [ 200s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Wed May 29 06:06:10 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 06:06:10 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Verify SI3 GPRS indication reflects PCU interface status In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14215 ) Change subject: bts: Verify SI3 GPRS indication reflects PCU interface status ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14215 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I37efb712ee0c513aea230beeb35e7dabce698a34 Gerrit-Change-Number: 14215 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 29 May 2019 06:06:10 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 06:06:29 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 06:06:29 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bsc: Add module param to disable osmux (fix bsc-latest jenkins job) In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14227 ) Change subject: bsc: Add module param to disable osmux (fix bsc-latest jenkins job) ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14227 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I61e4c59b2926f3f70cb6d0190a8683861e54179a Gerrit-Change-Number: 14227 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 29 May 2019 06:06:29 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 06:06:31 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 06:06:31 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bsc: Add module param to disable osmux (fix bsc-latest jenkins job) In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14227 ) Change subject: bsc: Add module param to disable osmux (fix bsc-latest jenkins job) ...................................................................... bsc: Add module param to disable osmux (fix bsc-latest jenkins job) ttcn3-bsc-test-latest currently fails on most tests because it tries to use "osmux off" VTY param and only current osmo-bsc master supports it. Change-Id: I61e4c59b2926f3f70cb6d0190a8683861e54179a --- M bsc/BSC_Tests.ttcn 1 file changed, 11 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 85260bc..a84277f 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -122,6 +122,11 @@ sio := '83'O, rctx := 0 }; + + /* Whether to enable osmux tests. Can be dropped completely and enable + unconditionally once new version of osmo-bsc is released (current + version: 1.4.1) */ + boolean mp_enable_osmux_test := true; } private function f_gen_test_hdlr_pars() return TestHdlrParams { @@ -335,7 +340,9 @@ activate(as_Tguard()); f_init_vty("VirtMSC"); - f_vty_allow_osmux(allow_osmux); + if (mp_enable_osmux_test) { + f_vty_allow_osmux(allow_osmux); + } /* Call a function of our 'parent component' RAN_Adapter_CT to start the * MSC-side BSSAP emulation */ @@ -4061,7 +4068,9 @@ execute( TC_assignment_codec_req_hr_fr() ); execute( TC_assignment_codec_req_fr_hr() ); - execute( TC_assignment_osmux() ); + if (mp_enable_osmux_test) { + execute( TC_assignment_osmux() ); + } /* RLL Establish Indication on inactive DCHAN / SAPI */ execute( TC_rll_est_ind_inact_lchan() ); -- To view, visit https://gerrit.osmocom.org/14227 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I61e4c59b2926f3f70cb6d0190a8683861e54179a Gerrit-Change-Number: 14227 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 06:07:07 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 06:07:07 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Verify SI3 GPRS indication reflects PCU interface status In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14215 ) Change subject: bts: Verify SI3 GPRS indication reflects PCU interface status ...................................................................... bts: Verify SI3 GPRS indication reflects PCU interface status When no PCU is connected to the BTS, the BTS should mask the GPRS indicator from the SI3 rest octets to indicate "no GPRS support" in the cell. This will cause phones not even trying to send us RACH requests for GPRS ATTACH, RAU, etc. Change-Id: I37efb712ee0c513aea230beeb35e7dabce698a34 Related: OS#4023 Related: OS#3075 --- M bts/BTS_Tests.ttcn 1 file changed, 172 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index f60da24..0506e64 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -245,7 +245,7 @@ }, cell_sel_par := ts_CellSelPar_default, rach_control := ts_RachCtrl_default, - rest_octets := '2B2B2B2B'O + rest_octets := '2C2B2B2B'O /* GPRS present */ } } } @@ -3983,6 +3983,174 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } +/* Ensure that GPRS capability is not advertised before PCU socket conncet */ +private function f_get_si3(L1CTL_PT pt) runs on test_CT return SystemInformationType3 { + var L1ctlDlMessage l1_dl; + var SystemInformation si; + timer T := 5.0; + T.start; + alt { + [] pt.receive(tr_L1CTL_DATA_IND(t_RslChanNr_BCCH(0), ?)) -> value l1_dl { + /* somehow dec_SystemInformation will try to decode even non-RR as SI */ + if (not (l1_dl.payload.data_ind.payload[1] == '06'O)) { + log("Ignoring non-RR SI ", l1_dl); + repeat; + } + si := dec_SystemInformation(l1_dl.payload.data_ind.payload) + if (not ischosen(si.payload.si3)) { + repeat; + } + } + [] pt.receive { + repeat; + } + [] T.timeout { + setverdict(fail, "Timeout waiting for SI3"); + } + } + return si.payload.si3; +} + +/* CSN.1 L/H logic: is the bit at the current position using "inverted logic" (true) or not? */ +private function f_bitpos_is_inv(integer idx) return boolean { + select (idx mod 8) { + case ((2, 4, 6, 7)) { return true; } /* 1-bits of 0x2B */ + case else { return false; } /* 0-bits of 0x2B */ + } +} +/* determine if the bit at position 'idx' in 'str' is a CSN.1 'H' (true) or 'L' (false) */ +private function f_bit_is_high(bitstring str, integer idx) return boolean { + var boolean invert := f_bitpos_is_inv(idx); + if (invert) { + if (str[idx] == '1'B) { + return false; + } else { + return true; + } + } else { + if (str[idx] == '1'B) { + return true; + } else { + return false; + } + } +} +/* As the TITAN RAW codec cannot expres the CSN.1 L/H concept yet, we have to do this + manually. Let's hope https://www.eclipse.org/forums/index.php/t/1099087/ takes off and + we can replace this piece of code soon ... */ +private function f_si3_has_gprs_indicator(OCT4 si3_restoctets) return boolean { + var bitstring bits := oct2bit(si3_restoctets); + var integer idx := 0; + + if (f_bit_is_high(bits, idx)) { + /* skip Optional selection parameters */ + idx := idx + 16; + } else { + idx := idx + 1; + } + + if (f_bit_is_high(bits, idx)) { + /* skip Optional power offset */ + idx := idx + 3; + } else { + idx := idx + 1; + } + + /* skip SI2ter Indicator */ + idx := idx + 1; + + /* skip Early CM Sending Control */ + idx := idx + 1; + + /* skip Scheduling if and where */ + if (f_bit_is_high(bits, idx)) { + idx := idx + 4; + } else { + idx := idx + 1; + } + + return f_bit_is_high(bits, idx); +} + +testcase TC_pcu_socket_noconnect_nosi3gprs() runs on test_CT { + var SystemInformationType3 si3; + timer T := 5.0; + + /* don't call f_init() as this would connect PCU socket */ + f_init_rsl(testcasename()); + T.start; + alt { + [] RSL_CCHAN.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP}); + [] T.timeout { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Timeout waiting for ASP_IPA_EVENT_UP"); + } + } + f_rsl_bcch_fill(RSL_SYSTEM_INFO_3, ts_SI3_default); + + f_init_l1ctl(); + f_l1_tune(L1CTL); + + f_sleep(2.0); + L1CTL.clear; + si3 := f_get_si3(L1CTL); + if (f_si3_has_gprs_indicator(si3.rest_octets)) { + setverdict(fail, "SI3 indicates GPRS even before PCU socket connected"); + } else { + setverdict(pass); + } + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + +/* Ensure that GPRS capability is advertised after PCU socket connect */ +testcase TC_pcu_socket_connect_si3gprs() runs on test_CT { + var SystemInformationType3 si3; + + /* this (among other things) establishes the first connection to the PCUIF socket */ + f_init(); + f_init_l1ctl(); + f_l1_tune(L1CTL); + + f_sleep(2.0); + L1CTL.clear; + si3 := f_get_si3(L1CTL); + if (not f_si3_has_gprs_indicator(si3.rest_octets)) { + setverdict(fail, "SI3 indicates no GPRS despite PCU socket connected"); + } else { + setverdict(pass); + } + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + +/* Ensure that GPRS capability is no longer advertised after PCU socket disconnect */ +testcase TC_pcu_socket_disconnect_nosi3gprs() runs on test_CT { + var SystemInformationType3 si3; + + /* this (among other things) establishes the first connection to the PCUIF socket */ + f_init(); + f_init_l1ctl(); + f_l1_tune(L1CTL); + + f_pcuif_close(PCU, g_pcu_conn_id); + g_pcu_conn_id := -1; + + f_sleep(1.0); + + /* re-connect */ + PCU.clear; + f_init_pcu(PCU, testcasename(), g_pcu_conn_id, g_pcu_last_info); + + f_sleep(2.0); + L1CTL.clear; + si3 := f_get_si3(L1CTL); + if (f_si3_has_gprs_indicator(si3.rest_octets)) { + setverdict(fail, "SI3 indicates GPRS after PCU socket disconnected"); + } else { + setverdict(pass); + } + + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + /*********************************************************************** * Osmocom Style Dynamic Timeslot Support @@ -5360,6 +5528,9 @@ execute( TC_pcu_rr_suspend() ); execute( TC_pcu_socket_connect_multi() ); execute( TC_pcu_socket_reconnect() ); + execute( TC_pcu_socket_noconnect_nosi3gprs() ); + execute( TC_pcu_socket_connect_si3gprs() ); + execute( TC_pcu_socket_disconnect_nosi3gprs() ); } else { log("PCU socket path not available, skipping PCU tests"); } -- To view, visit https://gerrit.osmocom.org/14215 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I37efb712ee0c513aea230beeb35e7dabce698a34 Gerrit-Change-Number: 14215 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 08:18:00 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 08:18:00 +0000 Subject: Change in osmo-gsm-manuals[master]: Makefile.am: include osmo-release.mk Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/14242 Change subject: Makefile.am: include osmo-release.mk ...................................................................... Makefile.am: include osmo-release.mk Allow using the same release process, as with other Osmocom components: https://osmocom.org/projects/cellular-infrastructure/wiki/Make_a_new_release Related: OS#3899 Change-Id: Id31b8aa3f8c46509774c44ee027ab89862249766 --- M Makefile.am M configure.ac 2 files changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/42/14242/1 diff --git a/Makefile.am b/Makefile.am index 479fe8e..75b642e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,6 +10,8 @@ $(top_srcdir)/.version: echo $(VERSION) > $@-t && mv $@-t $@ + at RELMAKE@ + dist-hook: echo $(VERSION) > $(distdir)/.tarball-version diff --git a/configure.ac b/configure.ac index d2858e4..9858af6 100644 --- a/configure.ac +++ b/configure.ac @@ -8,6 +8,10 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2 1.6 subdir-objects]) +dnl include release helper +RELMAKE='-include osmo-release.mk' +AC_SUBST([RELMAKE]) + dnl checks for programs AC_PROG_INSTALL LT_INIT -- To view, visit https://gerrit.osmocom.org/14242 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id31b8aa3f8c46509774c44ee027ab89862249766 Gerrit-Change-Number: 14242 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 08:18:01 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 08:18:01 +0000 Subject: =?UTF-8?Q?Change_in_osmo-gsm-manuals=5Bmaster=5D=3A_Bump_version=3A_0=2E1=2E0=2E8-09689_=E2=86=92_0=2E1=2E1?= Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/14243 Change subject: Bump version: 0.1.0.8-09689 ? 0.1.1 ...................................................................... Bump version: 0.1.0.8-09689 ? 0.1.1 Change-Id: If5a1b56158f867f7f93a98e1a473a853c8c61439 --- M debian/changelog 1 file changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/43/14243/1 diff --git a/debian/changelog b/debian/changelog index 33251f9..65f1046 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,21 @@ +osmo-gsm-manuals-dev (0.1.1) unstable; urgency=medium + + [ Daniel Willmann ] + * Add a chapter to explain our different counters + * Change VTY samples from OsmoNITB to OsmoMSC + + [ Oliver Smith ] + * debian: add patch for debian 8 + * debian: fix empty debian package + * GSUP: document inter-MSC handover additions + * debian: more explicit dependencies for debian 8 + * Makefile.am: include osmo-release.mk + + [ Harald Welte ] + * port_numbers: Add VTY + CTRL port of upcoming OsmoCBC + + -- Oliver Smith Wed, 29 May 2019 10:13:44 +0200 + osmo-gsm-manuals-dev (0.1.0) unstable; urgency=medium * Proper release number, which will also get tagged. -- To view, visit https://gerrit.osmocom.org/14243 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If5a1b56158f867f7f93a98e1a473a853c8c61439 Gerrit-Change-Number: 14243 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 08:40:31 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 08:40:31 +0000 Subject: Change in osmo-bts[master]: clear GPRS indicator in SI3 while PCU is disconnected In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/10170 ) Change subject: clear GPRS indicator in SI3 while PCU is disconnected ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/10170 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1a6f5c636c0fe098ee31c280d4572a3f8122b44b Gerrit-Change-Number: 10170 Gerrit-PatchSet: 5 Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Max Gerrit-Comment-Date: Wed, 29 May 2019 08:40:31 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 08:40:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 08:40:33 +0000 Subject: Change in osmo-bts[master]: clear GPRS indicator in SI3 while PCU is disconnected In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/10170 ) Change subject: clear GPRS indicator in SI3 while PCU is disconnected ...................................................................... clear GPRS indicator in SI3 while PCU is disconnected osmo-bts cannot provide GPRS service while osmo-pcu is not connected. The BSC has no knowledge of the PCU connection state. Prevent MSs from trying to register for GPRS while the PCU is disconnected by erasing the GPRS Indicator in SI3. Change-Id: I1a6f5c636c0fe098ee31c280d4572a3f8122b44b Depends: I690cf308311f910005a325d50f5d5d825678d2b2 (libosmocore.git) Depends: I08e0ca9a8d13c7aa40b9d90f34f0e13adb87d4e0 (libosmocore.git) Depends: I8b1ee2405f6338507e9dfb5f1f437c4c2db2e330 (libosmocore.git) Related: OS#3075 --- M include/osmo-bts/bts.h M include/osmo-bts/gsm_data_shared.h M src/common/pcu_sock.c M src/common/rsl.c M src/common/sysinfo.c 5 files changed, 63 insertions(+), 9 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h index d7c4bbf..970fb1b 100644 --- a/include/osmo-bts/bts.h +++ b/include/osmo-bts/bts.h @@ -48,6 +48,7 @@ int is_ag_res); uint8_t *bts_sysinfo_get(struct gsm_bts *bts, const struct gsm_time *g_time); +void regenerate_si3_restoctets(struct gsm_bts *bts); uint8_t *lchan_sacch_get(struct gsm_lchan *lchan); int lchan_init_lapdm(struct gsm_lchan *lchan); diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index 415e6bc..90772e2 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -620,6 +621,10 @@ /* offsets used while generating SI2quater */ size_t e_offset; size_t u_offset; + /* decoded SI3 rest octets - *unmodified* as received from BSC */ + struct osmo_gsm48_si_ro_info si3_ro_decoded; + /* is SI3 GPRS Indicator currently disabled due to lack of PCU connection? */ + bool si3_gprs_ind_disabled; /* ip.accesss Unit ID's have Site/BTS/TRX layout */ union { diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index e4f2d66..39b4568 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -1,6 +1,6 @@ /* pcu_sock.c: Connect from PCU via unix domain socket */ -/* (C) 2008-2010 by Harald Welte +/* (C) 2008-2019 by Harald Welte * (C) 2009-2012 by Andreas Eversberg * (C) 2012 by Holger Hans Peter Freyther * All Rights Reserved @@ -598,6 +598,9 @@ oml_tx_failure_event_rep(&bts->gprs.cell.mo, NM_SEVER_CEASED, OSMO_EVT_PCU_VERS, txt->text); osmo_strlcpy(bts->pcu_version, txt->text, MAX_VERSION_LENGTH); + /* patch SI3 to advertise GPRS, *if* the SI3 sent by BSC said so */ + regenerate_si3_restoctets(bts); + if (GSM_BTS_HAS_SI(bts, SYSINFO_TYPE_13)) return pcu_tx_si13(bts, true); @@ -741,6 +744,9 @@ bfd->fd = -1; osmo_fd_unregister(bfd); + /* patch SI3 to remove GPRS indicator */ + regenerate_si3_restoctets(bts); + /* re-enable the generation of ACCEPT for new connections */ state->listen_bfd.when |= BSC_FD_READ; diff --git a/src/common/rsl.c b/src/common/rsl.c index f76a006..b96182f 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1,7 +1,7 @@ /* GSM TS 08.58 RSL, BTS Side */ /* (C) 2011 by Andreas Eversberg - * (C) 2011-2017 by Harald Welte + * (C) 2011-2019 by Harald Welte * * All Rights Reserved * @@ -360,12 +360,18 @@ bts->si_valid |= (1 << osmo_si); - if (SYSINFO_TYPE_3 == osmo_si && trx->nr == 0 && - num_agch(trx, "RSL") != 1) { - lchan_deactivate(&trx->bts->c0->ts[0].lchan[CCCH_LCHAN]); - /* will be reactivated by sapi_deactivate_cb() */ - trx->bts->c0->ts[0].lchan[CCCH_LCHAN].rel_act_kind = - LCHAN_REL_ACT_REACT; + if (SYSINFO_TYPE_3 == osmo_si) { + if (trx->nr == 0 && num_agch(trx, "RSL") != 1) { + lchan_deactivate(&trx->bts->c0->ts[0].lchan[CCCH_LCHAN]); + /* will be reactivated by sapi_deactivate_cb() */ + trx->bts->c0->ts[0].lchan[CCCH_LCHAN].rel_act_kind = + LCHAN_REL_ACT_REACT; + } + /* decode original SI3 Rest Octets as sent by BSC */ + osmo_gsm48_rest_octets_si3_decode(&bts->si3_ro_decoded, GSM_BTS_SI(bts, osmo_si)); + /* patch out GPRS indicator from binary if PCU is not connected; will be enabled + * after PCU connects */ + regenerate_si3_restoctets(bts); } if (SYSINFO_TYPE_13 == osmo_si) @@ -387,6 +393,8 @@ get_value_string(osmo_sitype_strs, osmo_si)); if (SYSINFO_TYPE_13 == osmo_si) pcu_tx_si13(trx->bts, false); + if (SYSINFO_TYPE_3 == osmo_si) + memset(&bts->si3_ro_decoded, 0, sizeof(bts->si3_ro_decoded)); } osmo_signal_dispatch(SS_GLOBAL, S_NEW_SYSINFO, bts); diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c index e4a05c8..c41f9d6 100644 --- a/src/common/sysinfo.c +++ b/src/common/sysinfo.c @@ -1,4 +1,4 @@ -/* (C) 2011 by Harald Welte +/* (C) 2011-2019 by Harald Welte * * All Rights Reserved * @@ -24,6 +24,7 @@ #include #include +#include /* properly increment SI2q index and return SI2q data for scheduling */ static inline uint8_t *get_si2q_inc_index(struct gsm_bts *bts) @@ -175,3 +176,36 @@ LOGPLCHAN(lchan, DL1P, LOGL_NOTICE, "SACCH no SI available\n"); return NULL; } + +/* re-generate SI3 restoctets with GPRS indicator depending on the PCU socket connection state */ +void regenerate_si3_restoctets(struct gsm_bts *bts) +{ + uint8_t *si3_buf = GSM_BTS_SI(bts, SYSINFO_TYPE_3); + size_t si3_size = offsetof(struct gsm48_system_information_type_3, rest_octets); + struct osmo_gsm48_si_ro_info si3ro_tmp; + + /* If BSC has never set SI3, there's nothing to patch */ + if (!GSM_BTS_HAS_SI(bts, SYSINFO_TYPE_3)) + return; + + /* If SI3 from BSC doesn't have a GPRS indicator, we won't have anything to patch */ + if (!bts->si3_ro_decoded.gprs_ind.present) + return; + + /* Create a temporary copy and patch that, if no PCU is around */ + si3ro_tmp = bts->si3_ro_decoded; + if (!pcu_connected()) { + if (!bts->si3_gprs_ind_disabled) + LOGP(DPCU, LOGL_NOTICE, "Disabling GPRS Indicator in SI3 (No PCU connected)\n"); + bts->si3_gprs_ind_disabled = true; + si3ro_tmp.gprs_ind.present = 0; + } else { + if (bts->si3_gprs_ind_disabled) + LOGP(DPCU, LOGL_NOTICE, "Enabling GPRS Indicator in SI3 (PCU connected)\n"); + bts->si3_gprs_ind_disabled = false; + si3ro_tmp.gprs_ind.present = 1; /* is a no-op as we copy from bts->si3_ro_decoded */ + } + + /* re-generate the binary SI3 rest octets */ + osmo_gsm48_rest_octets_si3_encode(si3_buf + si3_size, &si3ro_tmp); +} -- To view, visit https://gerrit.osmocom.org/10170 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I1a6f5c636c0fe098ee31c280d4572a3f8122b44b Gerrit-Change-Number: 10170 Gerrit-PatchSet: 5 Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Max -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 08:40:57 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 08:40:57 +0000 Subject: Change in osmo-gsm-manuals[master]: Makefile.am: include osmo-release.mk In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14242 ) Change subject: Makefile.am: include osmo-release.mk ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14242 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id31b8aa3f8c46509774c44ee027ab89862249766 Gerrit-Change-Number: 14242 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 29 May 2019 08:40:57 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 08:41:06 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 08:41:06 +0000 Subject: =?UTF-8?Q?Change_in_osmo-gsm-manuals=5Bmaster=5D=3A_Bump_version=3A_0=2E1=2E0=2E8-09689_=E2=86=92_0=2E1=2E1?= In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14243 ) Change subject: Bump version: 0.1.0.8-09689 ? 0.1.1 ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14243 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If5a1b56158f867f7f93a98e1a473a853c8c61439 Gerrit-Change-Number: 14243 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 29 May 2019 08:41:06 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 08:41:17 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 08:41:17 +0000 Subject: Change in osmocom-bb[master]: trxcon/sched_mframe.c: do not hard-code lchan combinations In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14222 ) Change subject: trxcon/sched_mframe.c: do not hard-code lchan combinations ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14222 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If945b3654e35c83fc0220fdd6d99c1c7a0503386 Gerrit-Change-Number: 14222 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 29 May 2019 08:41:17 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 08:41:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 08:41:18 +0000 Subject: Change in osmocom-bb[master]: trxcon/sched_mframe.c: do not hard-code lchan combinations In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14222 ) Change subject: trxcon/sched_mframe.c: do not hard-code lchan combinations ...................................................................... trxcon/sched_mframe.c: do not hard-code lchan combinations Having magic pre-calculated hex-masks gives one quite high chances to shoot oneself in the foot, and decreases readability in general. Let's do this pre-calculation during the compilation process, so it's much easier to read, extend and spot potential bugs. Change-Id: If945b3654e35c83fc0220fdd6d99c1c7a0503386 --- M src/host/trxcon/sched_mframe.c 1 file changed, 82 insertions(+), 19 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/host/trxcon/sched_mframe.c b/src/host/trxcon/sched_mframe.c index 0dcf3e7..d427993 100644 --- a/src/host/trxcon/sched_mframe.c +++ b/src/host/trxcon/sched_mframe.c @@ -1916,6 +1916,50 @@ { TRXC_IDLE, 0, TRXC_IDLE, 0 }, }; +/* Logical channel mask for a single channel */ +#define M64(x) \ + ((uint64_t) 0x01 << x) + +/* Logical channel mask for BCCH+CCCH */ +#define M64_BCCH_CCCH \ + (uint64_t) 0x00 \ + | M64(TRXC_FCCH) \ + | M64(TRXC_SCH) \ + | M64(TRXC_BCCH) \ + | M64(TRXC_RACH) \ + | M64(TRXC_CCCH) + +/* Logical channel mask for SDCCH4 (with SACCH, all sub-channels) */ +#define M64_SDCCH4 \ + (uint64_t) 0x00 \ + | M64(TRXC_SDCCH4_0) | M64(TRXC_SACCH4_0) \ + | M64(TRXC_SDCCH4_1) | M64(TRXC_SACCH4_1) \ + | M64(TRXC_SDCCH4_2) | M64(TRXC_SACCH4_2) \ + | M64(TRXC_SDCCH4_3) | M64(TRXC_SACCH4_3) + +/* Logical channel mask for SDCCH8 (with SACCH, all sub-channels) */ +#define M64_SDCCH8 \ + (uint64_t) 0x00 \ + | M64(TRXC_SDCCH8_0) | M64(TRXC_SACCH8_0) \ + | M64(TRXC_SDCCH8_1) | M64(TRXC_SACCH8_1) \ + | M64(TRXC_SDCCH8_2) | M64(TRXC_SACCH8_2) \ + | M64(TRXC_SDCCH8_3) | M64(TRXC_SACCH8_3) \ + | M64(TRXC_SDCCH8_4) | M64(TRXC_SACCH8_4) \ + | M64(TRXC_SDCCH8_5) | M64(TRXC_SACCH8_5) \ + | M64(TRXC_SDCCH8_6) | M64(TRXC_SACCH8_6) \ + | M64(TRXC_SDCCH8_7) | M64(TRXC_SACCH8_7) + +/* Logical channel mask for TCH/F (with SACCH) */ +#define M64_TCHF \ + (uint64_t) 0x00 \ + | M64(TRXC_TCHF) | M64(TRXC_SACCHTF) + +/* Logical channel mask for TCH/H (with SACCH, all sub-channels) */ +#define M64_TCHH \ + (uint64_t) 0x00 \ + | M64(TRXC_TCHH_0) | M64(TRXC_SACCHTH_0) \ + | M64(TRXC_TCHH_1) | M64(TRXC_SACCHTH_1) + /** * A few notes about frame count: * @@ -1928,97 +1972,116 @@ static const struct trx_multiframe layouts[] = { { GSM_PCHAN_NONE, "NONE", - 0, 0xff, (uint64_t) 0x00, + 0, 0xff, + 0x00, NULL }, { GSM_PCHAN_CCCH, "BCCH+CCCH", - 51, 0xff, (uint64_t) 0x3e, + 51, 0xff, + M64_BCCH_CCCH, frame_bcch }, { GSM_PCHAN_CCCH_SDCCH4, "BCCH+CCCH+SDCCH/4+SACCH/4", - 102, 0xff, (uint64_t) 0xf001e3e, + 102, 0xff, + M64_BCCH_CCCH | M64_SDCCH4, frame_bcch_sdcch4 }, { GSM_PCHAN_CCCH_SDCCH4_CBCH, "BCCH+CCCH+SDCCH/4+SACCH/4+CBCH", - 102, 0xff, (uint64_t) 0x400f001e3e, + 102, 0xff, + M64_BCCH_CCCH | M64_SDCCH4 | M64(TRXC_SDCCH4_CBCH), frame_bcch_sdcch4_cbch }, { GSM_PCHAN_SDCCH8_SACCH8C, "SDCCH/8+SACCH/8", - 102, 0xff, (uint64_t) 0xff01fe000, + 102, 0xff, + M64_SDCCH8, frame_sdcch8 }, { GSM_PCHAN_SDCCH8_SACCH8C_CBCH, "SDCCH/8+SACCH/8+CBCH", - 102, 0xff, (uint64_t) 0x8ff01fe000, + 102, 0xff, + M64_SDCCH8 | M64(TRXC_SDCCH8_CBCH), frame_sdcch8_cbch }, { GSM_PCHAN_TCH_F, "TCH/F+SACCH", - 104, 0x01, (uint64_t) 0x200040, + 104, 0x01, + M64_TCHF, frame_tchf_ts0 }, { GSM_PCHAN_TCH_F, "TCH/F+SACCH", - 104, 0x02, (uint64_t) 0x200040, + 104, 0x02, + M64_TCHF, frame_tchf_ts1 }, { GSM_PCHAN_TCH_F, "TCH/F+SACCH", - 104, 0x04, (uint64_t) 0x200040, + 104, 0x04, + M64_TCHF, frame_tchf_ts2 }, { GSM_PCHAN_TCH_F, "TCH/F+SACCH", - 104, 0x08, (uint64_t) 0x200040, + 104, 0x08, + M64_TCHF, frame_tchf_ts3 }, { GSM_PCHAN_TCH_F, "TCH/F+SACCH", - 104, 0x10, (uint64_t) 0x200040, + 104, 0x10, + M64_TCHF, frame_tchf_ts4 }, { GSM_PCHAN_TCH_F, "TCH/F+SACCH", - 104, 0x20, (uint64_t) 0x200040, + 104, 0x20, + M64_TCHF, frame_tchf_ts5 }, { GSM_PCHAN_TCH_F, "TCH/F+SACCH", - 104, 0x40, (uint64_t) 0x200040, + 104, 0x40, + M64_TCHF, frame_tchf_ts6 }, { GSM_PCHAN_TCH_F, "TCH/F+SACCH", - 104, 0x80, (uint64_t) 0x200040, + 104, 0x80, + M64_TCHF, frame_tchf_ts7 }, { GSM_PCHAN_TCH_H, "TCH/H+SACCH", - 104, 0x03, (uint64_t) 0xc00180, + 104, 0x03, + M64_TCHH, frame_tchh_ts01 }, { GSM_PCHAN_TCH_H, "TCH/H+SACCH", - 104, 0x0c, (uint64_t) 0xc00180, + 104, 0x0c, + M64_TCHH, frame_tchh_ts23 }, { GSM_PCHAN_TCH_H, "TCH/H+SACCH", - 104, 0x30, (uint64_t) 0xc00180, + 104, 0x30, + M64_TCHH, frame_tchh_ts45 }, { GSM_PCHAN_TCH_H, "TCH/H+SACCH", - 104, 0xc0, (uint64_t) 0xc00180, + 104, 0xc0, + M64_TCHH, frame_tchh_ts67 }, { GSM_PCHAN_PDCH, "PDCH", - 104, 0xff, (uint64_t) 0x3000000000, + 104, 0xff, + M64(TRXC_PDTCH) | M64(TRXC_PTCCH), frame_pdch }, }; -- To view, visit https://gerrit.osmocom.org/14222 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If945b3654e35c83fc0220fdd6d99c1c7a0503386 Gerrit-Change-Number: 14222 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 08:41:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 08:41:19 +0000 Subject: Change in osmocom-bb[master]: trxcon/l1ctl.c: use #define for RSL_CHAN_RACH In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14223 ) Change subject: trxcon/l1ctl.c: use #define for RSL_CHAN_RACH ...................................................................... trxcon/l1ctl.c: use #define for RSL_CHAN_RACH Change-Id: Ifdb1703217c7540344cf6772efe812c8a786a0c2 --- M src/host/trxcon/l1ctl.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c index e6f8f82..d745295 100644 --- a/src/host/trxcon/l1ctl.c +++ b/src/host/trxcon/l1ctl.c @@ -37,6 +37,7 @@ #include #include #include +#include #include "logging.h" #include "l1ctl_link.h" @@ -537,7 +538,7 @@ * FIXME: l1ctl_info_ul doesn't provide channel description * FIXME: Can we use other than TS0? */ - chan_nr = 0x88; + chan_nr = RSL_CHAN_RACH; link_id = 0x00; /* Init a new primitive */ -- To view, visit https://gerrit.osmocom.org/14223 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ifdb1703217c7540344cf6772efe812c8a786a0c2 Gerrit-Change-Number: 14223 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 08:43:35 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 08:43:35 +0000 Subject: Change in osmo-msc[master]: libmsc/msc_vty.c: refactor 'show subscr / conn / trans' commands In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14069 ) Change subject: libmsc/msc_vty.c: refactor 'show subscr / conn / trans' commands ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14069 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5e58b56204c3f3d019e8d4c3c96cefdbb4af4d47 Gerrit-Change-Number: 14069 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 29 May 2019 08:43:35 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 08:44:38 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 08:44:38 +0000 Subject: Change in osmo-ggsn[master]: gtp: Take queue_resp into account to schedule retrans timer In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14211 ) Change subject: gtp: Take queue_resp into account to schedule retrans timer ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14211 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iebf405b2310a34785f3b363cc2a9f415281f6030 Gerrit-Change-Number: 14211 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 29 May 2019 08:44:38 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 08:45:42 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 08:45:42 +0000 Subject: Change in osmo-sgsn[master]: sgsn: Fix echo timer not started upon first pdp ctx created In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14210 ) Change subject: sgsn: Fix echo timer not started upon first pdp ctx created ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14210 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I826030978edb61ea5a172c2b72f63758206a6246 Gerrit-Change-Number: 14210 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 29 May 2019 08:45:42 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 08:45:43 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 08:45:43 +0000 Subject: Change in osmo-sgsn[master]: sgsn: Fix echo timer not started upon first pdp ctx created In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14210 ) Change subject: sgsn: Fix echo timer not started upon first pdp ctx created ...................................................................... sgsn: Fix echo timer not started upon first pdp ctx created Commit 176a4d2f33865a5c0433f8679f5e68f209d7b874 moved echo timer related code to its own function but did some mistakes when moving the logic from several places into its own function. As a result, echo timer was only enabled after the 2nd pdp ctx was created, instead of the expected 1st. First, let's be consistent and always call the function *after* changing state, since that's what the function expects. This fixes the issue. Finally make the logic in the function more intuitive by checking in the if clause the only case where actually the echo timer should be enabled: Only if policy specifies so and we have at least 1 pdp ctx against that ggsn. Fixes: 176a4d2f33865a5c0433f8679f5e68f209d7b874 Change-Id: I826030978edb61ea5a172c2b72f63758206a6246 --- M src/gprs/gprs_sgsn.c 1 file changed, 9 insertions(+), 7 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gprs/gprs_sgsn.c b/src/gprs/gprs_sgsn.c index 01f039a..f725811 100644 --- a/src/gprs/gprs_sgsn.c +++ b/src/gprs/gprs_sgsn.c @@ -492,12 +492,15 @@ void sgsn_ggsn_ctx_check_echo_timer(struct sgsn_ggsn_ctx *ggc) { - if (llist_empty(&ggc->pdp_list) || ggc->echo_interval <= 0) { - if (osmo_timer_pending(&ggc->echo_timer)) - osmo_timer_del(&ggc->echo_timer); - } else { - if (!osmo_timer_pending(&ggc->echo_timer)) + bool pending = osmo_timer_pending(&ggc->echo_timer); + + /* Only enable if allowed by policy and at least 1 pdp ctx exists against ggsn */ + if (!llist_empty(&ggc->pdp_list) && ggc->echo_interval > 0) { + if (!pending) osmo_timer_schedule(&ggc->echo_timer, ggc->echo_interval, 0); + } else { + if (pending) + osmo_timer_del(&ggc->echo_timer); } } @@ -754,9 +757,8 @@ void sgsn_ggsn_ctx_add_pdp(struct sgsn_ggsn_ctx *ggc, struct sgsn_pdp_ctx *pdp) { - sgsn_ggsn_ctx_check_echo_timer(ggc); - llist_add(&pdp->ggsn_list, &ggc->pdp_list); + sgsn_ggsn_ctx_check_echo_timer(ggc); } void sgsn_ggsn_ctx_remove_pdp(struct sgsn_ggsn_ctx *ggc, struct sgsn_pdp_ctx *pdp) { -- To view, visit https://gerrit.osmocom.org/14210 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I826030978edb61ea5a172c2b72f63758206a6246 Gerrit-Change-Number: 14210 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 08:47:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 08:47:09 +0000 Subject: Change in osmo-sgsn[master]: osmo-sgsn: add VTY parameter to toggle authentication In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14194 ) Change subject: osmo-sgsn: add VTY parameter to toggle authentication ...................................................................... Patch Set 2: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/14194/2//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/#/c/14194/2//COMMIT_MSG at 11 PS2, Line 11: with 'subscriber-create-on-demand' feature of OsmoHLR. > If authroization policy is "remote", shouldn't then OsmoHLR be the one deciding whether to require a [?] The HLR never decides anythign. It is just asked for auth tuples (if the MSC/VLR/SGSN need some) and it's updated with information. -- To view, visit https://gerrit.osmocom.org/14194 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9909145e7e0af587c28827e16301a61b13eedaa9 Gerrit-Change-Number: 14194 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: lynxis lazus Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 29 May 2019 08:47:09 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 08:47:42 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 08:47:42 +0000 Subject: Change in osmo-sgsn[master]: osmo-sgsn: add VTY parameter to toggle authentication In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14194 ) Change subject: osmo-sgsn: add VTY parameter to toggle authentication ...................................................................... Patch Set 2: Code-Review-1 actually, what we're missing is an update to the user manual here. -- To view, visit https://gerrit.osmocom.org/14194 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9909145e7e0af587c28827e16301a61b13eedaa9 Gerrit-Change-Number: 14194 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: lynxis lazus Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 29 May 2019 08:47:42 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 08:48:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 08:48:09 +0000 Subject: Change in osmo-msc[master]: Use GSM23003_MSISDN_MAX_DIGITS from libosmogsm In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14188 ) Change subject: Use GSM23003_MSISDN_MAX_DIGITS from libosmogsm ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14188 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If9eb46b83b6ad45f210b86b46dd416352adcc3ff Gerrit-Change-Number: 14188 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 29 May 2019 08:48:09 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 08:48:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 08:48:16 +0000 Subject: Change in osmo-msc[master]: Use GSM23003_MSISDN_MAX_DIGITS from libosmogsm In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14188 ) Change subject: Use GSM23003_MSISDN_MAX_DIGITS from libosmogsm ...................................................................... Use GSM23003_MSISDN_MAX_DIGITS from libosmogsm Change-Id: If9eb46b83b6ad45f210b86b46dd416352adcc3ff Depends on: Idc74f4d94ad44b9fc1b6d43178f5f33d551ebfb1 --- M include/osmocom/msc/vlr.h M src/libmsc/msc_t.c M src/libmsc/sms_queue.c M tests/sms_queue/sms_queue_test.c 4 files changed, 5 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Pau Espin Pedrol: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index b1c0d5d..56314b7 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -113,7 +113,6 @@ struct vlr_instance; #define VLR_NAME_LENGTH 160 -#define VLR_MSISDN_LENGTH 15 /* The VLR subscriber is the part of the GSM subscriber state in VLR (CS) or * SGSN (PS), particularly while interacting with the HLR via GSUP */ @@ -127,7 +126,7 @@ /* Data from HLR */ /* 3GPP TS 23.008 */ /* Always use vlr_subscr_set_imsi() to write to imsi[] */ char imsi[GSM23003_IMSI_MAX_DIGITS+1]; /* 2.1.1.1 */ - char msisdn[VLR_MSISDN_LENGTH+1]; /* 2.1.2 */ + char msisdn[GSM23003_MSISDN_MAX_DIGITS+1]; /* 2.1.2 */ char name[VLR_NAME_LENGTH+1]; /* proprietary */ OSMO_LBUF_DECL(hlr, 16); /* 2.4.7 */ uint32_t periodic_lu_timer; /* 2.4.24 */ diff --git a/src/libmsc/msc_t.c b/src/libmsc/msc_t.c index 8eefccc..6b96c26 100644 --- a/src/libmsc/msc_t.c +++ b/src/libmsc/msc_t.c @@ -75,7 +75,7 @@ int rc; uint64_t started_at; uint64_t ho_nr; - char ho_nr_str[VLR_MSISDN_LENGTH+1]; + char ho_nr_str[GSM23003_MSISDN_MAX_DIGITS+1]; struct gsm_network *net = msc_t_net(msc_t); bool usable = false; @@ -417,7 +417,7 @@ struct rtp_stream *rtp_cn = msc_t->inter_msc.call_leg? msc_t->inter_msc.call_leg->rtp[RTP_TO_CN] : NULL; /* Since it's BCD, it needs rounded-up half the char* length of an MSISDN plus a type byte. * But no need to introduce obscure math to save a few stack bytes, just have more. */ - uint8_t msisdn_enc_buf[VLR_MSISDN_LENGTH + 1]; + uint8_t msisdn_enc_buf[GSM23003_MSISDN_MAX_DIGITS+1]; /* Copy an_apdu and an_apdu->e_info in "copy-on-write" method, because they are const and we * need to add the Handover Number to e_info. */ const struct ran_handover_request_ack *r = &ran_dec->handover_request_ack; diff --git a/src/libmsc/sms_queue.c b/src/libmsc/sms_queue.c index 2c380b2..6346c1d 100644 --- a/src/libmsc/sms_queue.c +++ b/src/libmsc/sms_queue.c @@ -66,7 +66,7 @@ struct llist_head pending_sms; - char last_msisdn[VLR_MSISDN_LENGTH+1]; + char last_msisdn[GSM23003_MSISDN_MAX_DIGITS+1]; }; static int sms_subscr_cb(unsigned int, unsigned int, void *, void *); diff --git a/tests/sms_queue/sms_queue_test.c b/tests/sms_queue/sms_queue_test.c index 25fc312..4918be2 100644 --- a/tests/sms_queue/sms_queue_test.c +++ b/tests/sms_queue/sms_queue_test.c @@ -158,7 +158,7 @@ static void test_next_sms() { int i; - char last_msisdn[VLR_MSISDN_LENGTH+1] = ""; + char last_msisdn[GSM23003_MSISDN_MAX_DIGITS+1] = ""; printf("Testing smsq_take_next_sms()\n"); -- To view, visit https://gerrit.osmocom.org/14188 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If9eb46b83b6ad45f210b86b46dd416352adcc3ff Gerrit-Change-Number: 14188 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 08:48:44 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 08:48:44 +0000 Subject: Change in libosmocore[master]: gsm48_encode_bcd_number(): clarify optional LHV header initialization In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14189 ) Change subject: gsm48_encode_bcd_number(): clarify optional LHV header initialization ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14189 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iafd911dd55691b3715391e3899cd6971245c8d7f Gerrit-Change-Number: 14189 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Wed, 29 May 2019 08:48:44 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 08:48:46 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 08:48:46 +0000 Subject: Change in libosmocore[master]: gsm48_encode_bcd_number(): clarify optional LHV header initialization In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14189 ) Change subject: gsm48_encode_bcd_number(): clarify optional LHV header initialization ...................................................................... gsm48_encode_bcd_number(): clarify optional LHV header initialization Change-Id: Iafd911dd55691b3715391e3899cd6971245c8d7f --- M src/gsm/gsm48_ie.c M tests/gsm0408/gsm0408_test.c M tests/gsm0408/gsm0408_test.ok 3 files changed, 16 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gsm/gsm48_ie.c b/src/gsm/gsm48_ie.c index 688698d..59f931b 100644 --- a/src/gsm/gsm48_ie.c +++ b/src/gsm/gsm48_ie.c @@ -132,7 +132,13 @@ * \param[in] max_len Maximum Length of \a bcd_lv * \param[in] h_len Length of an optional heder between L and V portion * \param[in] input phone number as 0-terminated ASCII - * \returns number of bytes used in \a bcd_lv */ + * \returns number of bytes used in \a bcd_lv + * + * Depending on a context (e.g. called or calling party BCD number), the + * optional header between L and V parts can contain TON (Type Of Number), + * NPI (Numbering Plan Indication), presentation or screening indicator. + * NOTE: it is up to the caller to initialize this header! + */ int gsm48_encode_bcd_number(uint8_t *bcd_lv, uint8_t max_len, int h_len, const char *input) { diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index d7bae77..b5f8061 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -654,7 +654,7 @@ /* Encoding test */ .enc_ascii = "123456", - .enc_hex = "0700000000214365", + .enc_hex = "07ffffffff214365", .enc_h_len = 4, /* LHV */ .enc_rc = 4 + 4, @@ -732,8 +732,8 @@ static void test_bcd_number_encode_decode() { const struct bcd_number_test *test; - uint8_t buf_enc[0xff] = { 0 }; - char buf_dec[0xff] = { 0 }; + uint8_t buf_enc[0xff] = { 0xff }; + char buf_dec[0xff] = { 0xff }; size_t buf_len, i; int rc; @@ -780,6 +780,10 @@ printf(" - Actual: (rc=%d) '%s'\n", rc, (rc == 0 || rc == -ENOSPC) ? buf_dec : "(none)"); } + + /* Poison buffers between the test iterations */ + memset(buf_enc, 0xff, sizeof(buf_enc)); + memset(buf_dec, 0xff, sizeof(buf_dec)); } printf("\n"); diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok index 075886e..844c201 100644 --- a/tests/gsm0408/gsm0408_test.ok +++ b/tests/gsm0408/gsm0408_test.ok @@ -149,8 +149,8 @@ - Actual: (rc=0) '123456789' - Running test: regular 6-digit MSISDN with optional header (LHV) - Encoding ASCII (buffer limit=0) '123456'... - - Expected: (rc=8) '0700000000214365' - - Actual: (rc=8) '0721436587214365' + - Expected: (rc=8) '07ffffffff214365' + - Actual: (rc=8) '07ffffffff214365' - Decoding HEX (buffer limit=0) '07deadbeef214365'... - Expected: (rc=0) '123456' - Actual: (rc=0) '123456' -- To view, visit https://gerrit.osmocom.org/14189 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iafd911dd55691b3715391e3899cd6971245c8d7f Gerrit-Change-Number: 14189 Gerrit-PatchSet: 5 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 08:55:15 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 08:55:15 +0000 Subject: =?UTF-8?Q?Change_in_osmo-gsm-manuals=5Bmaster=5D=3A_Bump_version=3A_0=2E1=2E0=2E8-09689_=E2=86=92_0=2E1=2E1?= In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14243 ) Change subject: Bump version: 0.1.0.8-09689 ? 0.1.1 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14243 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If5a1b56158f867f7f93a98e1a473a853c8c61439 Gerrit-Change-Number: 14243 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 29 May 2019 08:55:15 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 08:55:17 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 08:55:17 +0000 Subject: Change in osmo-gsm-manuals[master]: Makefile.am: include osmo-release.mk In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14242 ) Change subject: Makefile.am: include osmo-release.mk ...................................................................... Makefile.am: include osmo-release.mk Allow using the same release process, as with other Osmocom components: https://osmocom.org/projects/cellular-infrastructure/wiki/Make_a_new_release Related: OS#3899 Change-Id: Id31b8aa3f8c46509774c44ee027ab89862249766 --- M Makefile.am M configure.ac 2 files changed, 6 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/Makefile.am b/Makefile.am index 479fe8e..75b642e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,6 +10,8 @@ $(top_srcdir)/.version: echo $(VERSION) > $@-t && mv $@-t $@ + at RELMAKE@ + dist-hook: echo $(VERSION) > $(distdir)/.tarball-version diff --git a/configure.ac b/configure.ac index d2858e4..9858af6 100644 --- a/configure.ac +++ b/configure.ac @@ -8,6 +8,10 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2 1.6 subdir-objects]) +dnl include release helper +RELMAKE='-include osmo-release.mk' +AC_SUBST([RELMAKE]) + dnl checks for programs AC_PROG_INSTALL LT_INIT -- To view, visit https://gerrit.osmocom.org/14242 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id31b8aa3f8c46509774c44ee027ab89862249766 Gerrit-Change-Number: 14242 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 08:55:17 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 08:55:17 +0000 Subject: =?UTF-8?Q?Change_in_osmo-gsm-manuals=5Bmaster=5D=3A_Bump_version=3A_0=2E1=2E0=2E8-09689_=E2=86=92_0=2E1=2E1?= In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14243 ) Change subject: Bump version: 0.1.0.8-09689 ? 0.1.1 ...................................................................... Bump version: 0.1.0.8-09689 ? 0.1.1 Change-Id: If5a1b56158f867f7f93a98e1a473a853c8c61439 --- M debian/changelog 1 file changed, 18 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/debian/changelog b/debian/changelog index 33251f9..65f1046 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,21 @@ +osmo-gsm-manuals-dev (0.1.1) unstable; urgency=medium + + [ Daniel Willmann ] + * Add a chapter to explain our different counters + * Change VTY samples from OsmoNITB to OsmoMSC + + [ Oliver Smith ] + * debian: add patch for debian 8 + * debian: fix empty debian package + * GSUP: document inter-MSC handover additions + * debian: more explicit dependencies for debian 8 + * Makefile.am: include osmo-release.mk + + [ Harald Welte ] + * port_numbers: Add VTY + CTRL port of upcoming OsmoCBC + + -- Oliver Smith Wed, 29 May 2019 10:13:44 +0200 + osmo-gsm-manuals-dev (0.1.0) unstable; urgency=medium * Proper release number, which will also get tagged. -- To view, visit https://gerrit.osmocom.org/14243 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If5a1b56158f867f7f93a98e1a473a853c8c61439 Gerrit-Change-Number: 14243 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 09:58:12 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 09:58:12 +0000 Subject: Change in osmo-ci[master]: OBS: build osmo-gsm-manuals-dev in latest Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/14244 Change subject: OBS: build osmo-gsm-manuals-dev in latest ...................................................................... OBS: build osmo-gsm-manuals-dev in latest Enable in osmocom-latest-packages.sh. Check it out and create the source package for the latest release as usually, but also create a second version for debian 8 with adjusted dependencies (like in nightly [1]). [1] Change-Id: I3570599ede51b974d350064f44f77e360fafd8b0 Related: OS#3899 Change-Id: Ib7251cca9116151e473798879375cd5eb48ff3ad --- M scripts/osmocom-latest-packages.sh 1 file changed, 30 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/44/14244/1 diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index 020efaa..bc94e24 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -58,6 +58,30 @@ git checkout -f -B "$VER" "refs/tags/$VER" } +# Copy an already checked out repository dir. The debian8 patch will be applied +# later, since build() does a "git checkout" to the latest version (unlike in +# osmocom-nightly-packages.sh). +# $1: Osmocom repository +checkout_copy_debian8_jessie() { + echo + echo "====> Checking out $1-debian8-jessie" + cd "$TOP" + if [ -d "$1-debian8-jessie" ]; then + rm -rf "$1-debian8-jessie" + fi + cp -a "$1" "$1-debian8-jessie" +} + +# $1: checkout directory name +apply_distro_specific_patch() { + case "$1" in + *"-debian8-jessie") + patch -p1 < debian/patches/build-for-debian8.patch + git commit --amend --no-edit debian/ + ;; + esac +} + build() { project=$1 gitbpargs="$2" @@ -67,6 +91,7 @@ cd "$TOP/$project" VER=$(get_last_tag "$project") git checkout -f -B "$VER" "refs/tags/$VER" + apply_distro_specific_patch "$project" if [ -x ./git-version-gen ]; then ./git-version-gen . > .tarball-version 2>/dev/null gbp buildpackage -S -uc -us -d --git-ignore-branch "--git-export-dir=$output" \ @@ -102,12 +127,12 @@ # add those once they have tagged any versions that include the 'debian' sub-dir: #rtl-sdr #osmo-fl2k -#osmo-gsm-manuals build_osmocom() { prepare checkout limesuite + checkout osmo-gsm-manuals checkout libosmocore checkout libosmo-sccp checkout libosmo-abis @@ -135,7 +160,11 @@ # TODO: enable once libosmo-abis > 0.6.0 is available (IPA keepalive FSM) # checkout osmo-remsim + checkout_copy_debian8_jessie "osmo-gsm-manuals" + build limesuite --git-upstream-tree="$(get_last_tag limesuite)" + build osmo-gsm-manuals + build osmo-gsm-manuals-debian8-jessie build libosmocore build libosmo-sccp build libosmo-abis -- To view, visit https://gerrit.osmocom.org/14244 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ib7251cca9116151e473798879375cd5eb48ff3ad Gerrit-Change-Number: 14244 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:00:17 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 10:00:17 +0000 Subject: Change in osmo-ci[master]: OBS: build osmo-gsm-manuals-dev in latest In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/14244 ) Change subject: OBS: build osmo-gsm-manuals-dev in latest ...................................................................... Patch Set 1: Verified+1 Tested in own OBS namespace, that this script works, and the generated packages build properly: https://build.opensuse.org/project/show/home:osmith42:latest -- To view, visit https://gerrit.osmocom.org/14244 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib7251cca9116151e473798879375cd5eb48ff3ad Gerrit-Change-Number: 14244 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 29 May 2019 10:00:17 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:14:07 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 10:14:07 +0000 Subject: Change in libosmo-sccp[master]: debian: create -doc subpackage with pdf manuals Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/14245 Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... debian: create -doc subpackage with pdf manuals I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: I1f412953e60c10e6146327a90edbd18d738e1365 --- M debian/control A debian/osmo-stp-doc.install M debian/rules M doc/manuals/Makefile.am 4 files changed, 18 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/45/14245/1 diff --git a/debian/control b/debian/control index 44d0fc6..cede17a 100644 --- a/debian/control +++ b/debian/control @@ -14,7 +14,8 @@ doxygen, libdpkg-perl, libosmo-netif-dev (>= 0.3.0), - libsctp-dev + libsctp-dev, + osmo-gsm-manuals-dev Standards-Version: 3.9.7 Vcs-Git: git://git.osmocom.org/libosmo-sccp.git Vcs-Browser: http://git.osmocom.org/libosmo-sccp/ @@ -121,3 +122,12 @@ networks. At this point it is a very minimal implementation, missing lots of the functionality usually present in a STP, such as Global Title Routing, Global Title Translation. + +Package: osmo-stp-doc +Architecture: all +Section: doc +Priority: optional +Depends: ${misc:Depends} +Description: ${misc:Package} PDF documentation + Various manuals: user manual, VTY reference manual and/or + protocol/interface manuals. diff --git a/debian/osmo-stp-doc.install b/debian/osmo-stp-doc.install new file mode 100644 index 0000000..d5db594 --- /dev/null +++ b/debian/osmo-stp-doc.install @@ -0,0 +1 @@ +usr/share/doc/osmo-stp-doc/*.pdf diff --git a/debian/rules b/debian/rules index f443aee..a8eeff5 100755 --- a/debian/rules +++ b/debian/rules @@ -22,7 +22,7 @@ # enable-static: we require the tests to link to the static libosmo-sigtran # library to access symbols not starting with osmo_* override_dh_auto_configure: - dh_auto_configure -- --enable-static --with-systemdsystemunitdir=/lib/systemd/system + dh_auto_configure -- --enable-static --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals # Print test results in case of a failure override_dh_auto_test: @@ -31,3 +31,7 @@ override_dh_clean: dh_clean rm -f .version tests/package.m4 tests/testsuite + +# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers) +override_dh_compress: + dh_compress -X.pdf diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am index ce5b128..68c2d86 100644 --- a/doc/manuals/Makefile.am +++ b/doc/manuals/Makefile.am @@ -13,5 +13,6 @@ VTY_REFERENCE = osmostp-vty-reference.xml include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc + OSMO_REPOSITORY=osmo-stp include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc endif -- To view, visit https://gerrit.osmocom.org/14245 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I1f412953e60c10e6146327a90edbd18d738e1365 Gerrit-Change-Number: 14245 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:14:09 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 10:14:09 +0000 Subject: Change in osmo-bsc[master]: debian: create -doc subpackage with pdf manuals Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/14246 Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... debian: create -doc subpackage with pdf manuals I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: I8dfb5658e567978aa8fe82f45d8287dbd1df969c --- M debian/control A debian/osmo-bsc-doc.install M debian/rules M doc/manuals/Makefile.am 4 files changed, 18 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/46/14246/1 diff --git a/debian/control b/debian/control index 141cb5e..7410193 100644 --- a/debian/control +++ b/debian/control @@ -17,7 +17,8 @@ libosmo-sigtran-dev (>= 0.10.0), libosmo-abis-dev (>= 0.5.1), libosmo-netif-dev (>= 0.3.0), - libosmo-mgcp-client-dev (>= 1.4.0) + libosmo-mgcp-client-dev (>= 1.4.0), + osmo-gsm-manuals-dev Standards-Version: 3.9.8 Vcs-Git: git://git.osmocom.org/osmo-bsc.git Vcs-Browser: https://git.osmocom.org/osmo-bsc/ @@ -64,3 +65,12 @@ Multi-Arch: foreign Depends: ${misc:Depends}, ${shlibs:Depends} Description: Command line utilities to manage measurement reports. + +Package: osmo-bsc-doc +Architecture: all +Section: doc +Priority: optional +Depends: ${misc:Depends} +Description: ${misc:Package} PDF documentation + Various manuals: user manual, VTY reference manual and/or + protocol/interface manuals. diff --git a/debian/osmo-bsc-doc.install b/debian/osmo-bsc-doc.install new file mode 100644 index 0000000..b0e2cc4 --- /dev/null +++ b/debian/osmo-bsc-doc.install @@ -0,0 +1 @@ +usr/share/doc/osmo-bsc-doc/*.pdf diff --git a/debian/rules b/debian/rules index ffc99db..a6646c1 100755 --- a/debian/rules +++ b/debian/rules @@ -45,7 +45,7 @@ dh $@ --with autoreconf # debmake generated override targets -CONFIGURE_FLAGS += --with-systemdsystemunitdir=/lib/systemd/system +CONFIGURE_FLAGS += --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals override_dh_auto_configure: dh_auto_configure -- $(CONFIGURE_FLAGS) # @@ -60,3 +60,7 @@ # Print test results in case of a failure override_dh_auto_test: dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false) + +# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers) +override_dh_compress: + dh_compress -X.pdf diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am index 482c1ab..49ddc18 100644 --- a/doc/manuals/Makefile.am +++ b/doc/manuals/Makefile.am @@ -20,5 +20,6 @@ VTY_REFERENCE = osmobsc-vty-reference.xml include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc + OSMO_REPOSITORY = osmo-bsc include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc endif -- To view, visit https://gerrit.osmocom.org/14246 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I8dfb5658e567978aa8fe82f45d8287dbd1df969c Gerrit-Change-Number: 14246 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:14:11 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 10:14:11 +0000 Subject: Change in osmo-bts[master]: debian: create -doc subpackage with pdf manuals Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/14247 Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... debian: create -doc subpackage with pdf manuals I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: I6d7a182d0a668693a5014aca0edc50ada9ac0d0f --- M include/osmo-bts/bts.h M include/osmo-bts/gsm_data_shared.h M src/common/pcu_sock.c M src/common/rsl.c M src/common/sysinfo.c 5 files changed, 63 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/47/14247/1 diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h index d7c4bbf..970fb1b 100644 --- a/include/osmo-bts/bts.h +++ b/include/osmo-bts/bts.h @@ -48,6 +48,7 @@ int is_ag_res); uint8_t *bts_sysinfo_get(struct gsm_bts *bts, const struct gsm_time *g_time); +void regenerate_si3_restoctets(struct gsm_bts *bts); uint8_t *lchan_sacch_get(struct gsm_lchan *lchan); int lchan_init_lapdm(struct gsm_lchan *lchan); diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index 415e6bc..90772e2 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -620,6 +621,10 @@ /* offsets used while generating SI2quater */ size_t e_offset; size_t u_offset; + /* decoded SI3 rest octets - *unmodified* as received from BSC */ + struct osmo_gsm48_si_ro_info si3_ro_decoded; + /* is SI3 GPRS Indicator currently disabled due to lack of PCU connection? */ + bool si3_gprs_ind_disabled; /* ip.accesss Unit ID's have Site/BTS/TRX layout */ union { diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index e4f2d66..39b4568 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -1,6 +1,6 @@ /* pcu_sock.c: Connect from PCU via unix domain socket */ -/* (C) 2008-2010 by Harald Welte +/* (C) 2008-2019 by Harald Welte * (C) 2009-2012 by Andreas Eversberg * (C) 2012 by Holger Hans Peter Freyther * All Rights Reserved @@ -598,6 +598,9 @@ oml_tx_failure_event_rep(&bts->gprs.cell.mo, NM_SEVER_CEASED, OSMO_EVT_PCU_VERS, txt->text); osmo_strlcpy(bts->pcu_version, txt->text, MAX_VERSION_LENGTH); + /* patch SI3 to advertise GPRS, *if* the SI3 sent by BSC said so */ + regenerate_si3_restoctets(bts); + if (GSM_BTS_HAS_SI(bts, SYSINFO_TYPE_13)) return pcu_tx_si13(bts, true); @@ -741,6 +744,9 @@ bfd->fd = -1; osmo_fd_unregister(bfd); + /* patch SI3 to remove GPRS indicator */ + regenerate_si3_restoctets(bts); + /* re-enable the generation of ACCEPT for new connections */ state->listen_bfd.when |= BSC_FD_READ; diff --git a/src/common/rsl.c b/src/common/rsl.c index f76a006..b96182f 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1,7 +1,7 @@ /* GSM TS 08.58 RSL, BTS Side */ /* (C) 2011 by Andreas Eversberg - * (C) 2011-2017 by Harald Welte + * (C) 2011-2019 by Harald Welte * * All Rights Reserved * @@ -360,12 +360,18 @@ bts->si_valid |= (1 << osmo_si); - if (SYSINFO_TYPE_3 == osmo_si && trx->nr == 0 && - num_agch(trx, "RSL") != 1) { - lchan_deactivate(&trx->bts->c0->ts[0].lchan[CCCH_LCHAN]); - /* will be reactivated by sapi_deactivate_cb() */ - trx->bts->c0->ts[0].lchan[CCCH_LCHAN].rel_act_kind = - LCHAN_REL_ACT_REACT; + if (SYSINFO_TYPE_3 == osmo_si) { + if (trx->nr == 0 && num_agch(trx, "RSL") != 1) { + lchan_deactivate(&trx->bts->c0->ts[0].lchan[CCCH_LCHAN]); + /* will be reactivated by sapi_deactivate_cb() */ + trx->bts->c0->ts[0].lchan[CCCH_LCHAN].rel_act_kind = + LCHAN_REL_ACT_REACT; + } + /* decode original SI3 Rest Octets as sent by BSC */ + osmo_gsm48_rest_octets_si3_decode(&bts->si3_ro_decoded, GSM_BTS_SI(bts, osmo_si)); + /* patch out GPRS indicator from binary if PCU is not connected; will be enabled + * after PCU connects */ + regenerate_si3_restoctets(bts); } if (SYSINFO_TYPE_13 == osmo_si) @@ -387,6 +393,8 @@ get_value_string(osmo_sitype_strs, osmo_si)); if (SYSINFO_TYPE_13 == osmo_si) pcu_tx_si13(trx->bts, false); + if (SYSINFO_TYPE_3 == osmo_si) + memset(&bts->si3_ro_decoded, 0, sizeof(bts->si3_ro_decoded)); } osmo_signal_dispatch(SS_GLOBAL, S_NEW_SYSINFO, bts); diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c index e4a05c8..c41f9d6 100644 --- a/src/common/sysinfo.c +++ b/src/common/sysinfo.c @@ -1,4 +1,4 @@ -/* (C) 2011 by Harald Welte +/* (C) 2011-2019 by Harald Welte * * All Rights Reserved * @@ -24,6 +24,7 @@ #include #include +#include /* properly increment SI2q index and return SI2q data for scheduling */ static inline uint8_t *get_si2q_inc_index(struct gsm_bts *bts) @@ -175,3 +176,36 @@ LOGPLCHAN(lchan, DL1P, LOGL_NOTICE, "SACCH no SI available\n"); return NULL; } + +/* re-generate SI3 restoctets with GPRS indicator depending on the PCU socket connection state */ +void regenerate_si3_restoctets(struct gsm_bts *bts) +{ + uint8_t *si3_buf = GSM_BTS_SI(bts, SYSINFO_TYPE_3); + size_t si3_size = offsetof(struct gsm48_system_information_type_3, rest_octets); + struct osmo_gsm48_si_ro_info si3ro_tmp; + + /* If BSC has never set SI3, there's nothing to patch */ + if (!GSM_BTS_HAS_SI(bts, SYSINFO_TYPE_3)) + return; + + /* If SI3 from BSC doesn't have a GPRS indicator, we won't have anything to patch */ + if (!bts->si3_ro_decoded.gprs_ind.present) + return; + + /* Create a temporary copy and patch that, if no PCU is around */ + si3ro_tmp = bts->si3_ro_decoded; + if (!pcu_connected()) { + if (!bts->si3_gprs_ind_disabled) + LOGP(DPCU, LOGL_NOTICE, "Disabling GPRS Indicator in SI3 (No PCU connected)\n"); + bts->si3_gprs_ind_disabled = true; + si3ro_tmp.gprs_ind.present = 0; + } else { + if (bts->si3_gprs_ind_disabled) + LOGP(DPCU, LOGL_NOTICE, "Enabling GPRS Indicator in SI3 (PCU connected)\n"); + bts->si3_gprs_ind_disabled = false; + si3ro_tmp.gprs_ind.present = 1; /* is a no-op as we copy from bts->si3_ro_decoded */ + } + + /* re-generate the binary SI3 rest octets */ + osmo_gsm48_rest_octets_si3_encode(si3_buf + si3_size, &si3ro_tmp); +} -- To view, visit https://gerrit.osmocom.org/14247 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I6d7a182d0a668693a5014aca0edc50ada9ac0d0f Gerrit-Change-Number: 14247 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:14:12 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 10:14:12 +0000 Subject: Change in osmo-ggsn[master]: debian: create -doc subpackage with pdf manuals Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/14248 Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... debian: create -doc subpackage with pdf manuals I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: I5563e023dc3c8b158a79ce0c9e1478e117b0ec37 --- M debian/control A debian/osmo-ggsn-doc.install M debian/rules M doc/manuals/Makefile.am 4 files changed, 18 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/48/14248/1 diff --git a/debian/control b/debian/control index 1524438..272fd79 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,8 @@ pkg-config, libdpkg-perl, git, dh-autoreconf, - libosmocore-dev (>= 0.8.0) + libosmocore-dev (>= 0.8.0), + osmo-gsm-manuals-dev Standards-Version: 3.9.6 Vcs-Browser: http://git.osmocom.org/osmo-ggsn/ Vcs-Git: git://git.osmocom.org/osmo-ggsn @@ -74,3 +75,12 @@ . The library libgtp implements the GTP protocol between SGSN and GGSN and this package contains the development files for this library. + +Package: osmo-ggsn-doc +Architecture: all +Section: doc +Priority: optional +Depends: ${misc:Depends} +Description: ${misc:Package} PDF documentation + Various manuals: user manual, VTY reference manual and/or + protocol/interface manuals. diff --git a/debian/osmo-ggsn-doc.install b/debian/osmo-ggsn-doc.install new file mode 100644 index 0000000..32c2212 --- /dev/null +++ b/debian/osmo-ggsn-doc.install @@ -0,0 +1 @@ +usr/share/doc/osmo-ggsn-doc/*.pdf diff --git a/debian/rules b/debian/rules index bca65bb..d0f5935 100755 --- a/debian/rules +++ b/debian/rules @@ -19,4 +19,8 @@ dh_strip -plibgtp4 --dbg-package=libgtp-dbg override_dh_auto_configure: - dh_auto_configure -- --with-systemdsystemunitdir=/lib/systemd/system + dh_auto_configure -- --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals + +# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers) +override_dh_compress: + dh_compress -X.pdf diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am index d41ca2c..0c9e2e1 100644 --- a/doc/manuals/Makefile.am +++ b/doc/manuals/Makefile.am @@ -12,5 +12,6 @@ VTY_REFERENCE = osmoggsn-vty-reference.xml include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc + OSMO_REPOSITORY=osmo-ggsn include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc endif -- To view, visit https://gerrit.osmocom.org/14248 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I5563e023dc3c8b158a79ce0c9e1478e117b0ec37 Gerrit-Change-Number: 14248 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:14:14 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 10:14:14 +0000 Subject: Change in osmo-hlr[master]: debian: create -doc subpackage with pdf manuals Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/14249 Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... debian: create -doc subpackage with pdf manuals I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: I4a327bac68769892634236c573c313c7859c6199 --- M debian/control A debian/osmo-hlr-doc.install M debian/rules M doc/manuals/Makefile.am 4 files changed, 18 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/49/14249/1 diff --git a/debian/control b/debian/control index 23c39ce..debf669 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,8 @@ libosmo-abis-dev, libosmo-netif-dev, libsqlite3-dev, - sqlite3 + sqlite3, + osmo-gsm-manuals-dev Standards-Version: 3.9.6 Vcs-Browser: http://cgit.osmocom.org/osmo-hlr Vcs-Git: git://git.osmocom.org/osmo-hlr @@ -57,3 +58,12 @@ and External USSD Entities (EUSEs) using this library to implement clients. . This package contains the development headers. + +Package: osmo-hlr-doc +Architecture: all +Section: doc +Priority: optional +Depends: ${misc:Depends} +Description: ${misc:Package} PDF documentation + Various manuals: user manual, VTY reference manual and/or + protocol/interface manuals. diff --git a/debian/osmo-hlr-doc.install b/debian/osmo-hlr-doc.install new file mode 100644 index 0000000..f876859 --- /dev/null +++ b/debian/osmo-hlr-doc.install @@ -0,0 +1 @@ +usr/share/doc/osmo-hlr-doc/*.pdf diff --git a/debian/rules b/debian/rules index 9e97c6c..f5a79fb 100755 --- a/debian/rules +++ b/debian/rules @@ -17,4 +17,8 @@ dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false) override_dh_auto_configure: - dh_auto_configure -- --with-systemdsystemunitdir=/lib/systemd/system + dh_auto_configure -- --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals + +# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers) +override_dh_compress: + dh_compress -X.pdf diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am index 687698f..9e1295a 100644 --- a/doc/manuals/Makefile.am +++ b/doc/manuals/Makefile.am @@ -15,6 +15,7 @@ VTY_REFERENCE = osmohlr-vty-reference.xml include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc + OSMO_REPOSITORY = osmo-hlr include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc endif -- To view, visit https://gerrit.osmocom.org/14249 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I4a327bac68769892634236c573c313c7859c6199 Gerrit-Change-Number: 14249 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:14:16 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 10:14:16 +0000 Subject: Change in osmo-mgw[master]: debian: create -doc subpackage with pdf manuals Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/14250 Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... debian: create -doc subpackage with pdf manuals I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: I8466713a8d414ea56ca24f6f7119338ad2b98ce5 --- M debian/control A debian/osmo-mgw-doc.install M debian/rules M doc/manuals/Makefile.am 4 files changed, 18 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/50/14250/1 diff --git a/debian/control b/debian/control index 6fb34c0..8e0e079 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,8 @@ pkg-config, autotools-dev, libosmocore-dev, - libosmo-netif-dev + libosmo-netif-dev, + osmo-gsm-manuals-dev Standards-Version: 3.9.8 Vcs-Git: git://git.osmocom.org/osmo-mgw.git Vcs-Browser: https://git.osmocom.org/osmo-mgw/ @@ -33,3 +34,12 @@ Multi-Arch: same Depends: libosmo-mgcp-client5 (= ${binary:Version}), ${misc:Depends} Description: libosmo-mgcp-client: Osmocom's Media Gateway Control Protocol client utilities + +Package: osmo-mgw-doc +Architecture: all +Section: doc +Priority: optional +Depends: ${misc:Depends} +Description: ${misc:Package} PDF documentation + Various manuals: user manual, VTY reference manual and/or + protocol/interface manuals. diff --git a/debian/osmo-mgw-doc.install b/debian/osmo-mgw-doc.install new file mode 100644 index 0000000..7cb07ad --- /dev/null +++ b/debian/osmo-mgw-doc.install @@ -0,0 +1 @@ +usr/share/doc/osmo-mgw-doc/*.pdf diff --git a/debian/rules b/debian/rules index d67243c..d38898d 100755 --- a/debian/rules +++ b/debian/rules @@ -30,6 +30,10 @@ dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false) override_dh_auto_configure: - dh_auto_configure -- --with-systemdsystemunitdir=/lib/systemd/system + dh_auto_configure -- --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals + +# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers) +override_dh_compress: + dh_compress -X.pdf # See https://www.debian.org/doc/manuals/developers-reference/best-pkging-practices.html#bpp-dbg diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am index 901cffa..0faebf3 100644 --- a/doc/manuals/Makefile.am +++ b/doc/manuals/Makefile.am @@ -12,5 +12,6 @@ VTY_REFERENCE = osmomgw-vty-reference.xml include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc + OSMO_REPOSITORY = osmo-mgw include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc endif -- To view, visit https://gerrit.osmocom.org/14250 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I8466713a8d414ea56ca24f6f7119338ad2b98ce5 Gerrit-Change-Number: 14250 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:14:18 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 10:14:18 +0000 Subject: Change in osmo-msc[master]: debian: create -doc subpackage with pdf manuals Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/14251 Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... debian: create -doc subpackage with pdf manuals I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: Iafa9fba60b3ad4478ec24d6ba8538ec80ce99f52 --- M debian/control A debian/osmo-msc-doc.install M debian/rules M doc/manuals/Makefile.am 4 files changed, 18 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/51/14251/1 diff --git a/debian/control b/debian/control index 54a3546..8b0d690 100644 --- a/debian/control +++ b/debian/control @@ -21,7 +21,8 @@ libosmo-mgcp-client-dev (>= 1.1.0), libosmo-gsup-client-dev (>= 0.2.1), libosmo-netif-dev (>= 0.1.0), - libosmo-ranap-dev (>= 0.2.0) + libosmo-ranap-dev (>= 0.2.0), + osmo-gsm-manuals-dev Standards-Version: 3.9.8 Vcs-Git: git://git.osmocom.org/osmo-msc.git Vcs-Browser: https://git.osmocom.org/osmo-msc/ @@ -62,3 +63,12 @@ . This package contains the debug symbols for osmo-msc in order to generate meaningful backtraces in bug-reports. + +Package: osmo-msc-doc +Architecture: all +Section: doc +Priority: optional +Depends: ${misc:Depends} +Description: ${misc:Package} PDF documentation + Various manuals: user manual, VTY reference manual and/or + protocol/interface manuals. diff --git a/debian/osmo-msc-doc.install b/debian/osmo-msc-doc.install new file mode 100644 index 0000000..ee15cf9 --- /dev/null +++ b/debian/osmo-msc-doc.install @@ -0,0 +1 @@ +usr/share/doc/osmo-msc-doc/*.pdf diff --git a/debian/rules b/debian/rules index 1cf3a35..5925ca9 100755 --- a/debian/rules +++ b/debian/rules @@ -46,7 +46,7 @@ # debmake generated override targets # Set options for ./configure -CONFIGURE_FLAGS += --enable-iu --enable-smpp --with-systemdsystemunitdir=/lib/systemd/system +CONFIGURE_FLAGS += --enable-iu --enable-smpp --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals override_dh_auto_configure: dh_auto_configure -- $(CONFIGURE_FLAGS) # @@ -61,3 +61,7 @@ # Print test results in case of a failure override_dh_auto_test: dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false) + +# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers) +override_dh_compress: + dh_compress -X.pdf diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am index 42e353d..2ce6a0a 100644 --- a/doc/manuals/Makefile.am +++ b/doc/manuals/Makefile.am @@ -13,5 +13,6 @@ VTY_REFERENCE = osmomsc-vty-reference.xml include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc + OSMO_REPOSITORY = osmo-msc include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc endif -- To view, visit https://gerrit.osmocom.org/14251 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Iafa9fba60b3ad4478ec24d6ba8538ec80ce99f52 Gerrit-Change-Number: 14251 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:14:20 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 10:14:20 +0000 Subject: Change in osmo-pcu[master]: debian: create -doc subpackage with pdf manuals Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/14252 Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... debian: create -doc subpackage with pdf manuals I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: I9f2e7cfd93ee0b13d064c606a20378c1ea01400e --- M debian/control A debian/osmo-pcu-doc.install M debian/rules M doc/manuals/Makefile.am 4 files changed, 18 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/52/14252/1 diff --git a/debian/control b/debian/control index f6aaaba..c808795 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,8 @@ dh-systemd (>= 1.5), autotools-dev, pkg-config, - libosmocore-dev (>= 0.10.1) + libosmocore-dev (>= 0.10.1), + osmo-gsm-manuals-dev Standards-Version: 3.9.8 Homepage: http://osmocom.org/projects/osmopcu Vcs-Git: git://git.osmocom.org/osmo-pcu @@ -35,3 +36,12 @@ networks. OsmoPCU is the Osmcoom implementation of this network element. It interfaces to osmo-bts via the PCU socket of OsmoBTS and via Gb (NS-over-IP) interface with the SGSN such as OsmoSGSN. + +Package: osmo-pcu-doc +Architecture: all +Section: doc +Priority: optional +Depends: ${misc:Depends} +Description: ${misc:Package} PDF documentation + Various manuals: user manual, VTY reference manual and/or + protocol/interface manuals. diff --git a/debian/osmo-pcu-doc.install b/debian/osmo-pcu-doc.install new file mode 100644 index 0000000..8411fbc --- /dev/null +++ b/debian/osmo-pcu-doc.install @@ -0,0 +1 @@ +usr/share/doc/osmo-pcu-doc/*.pdf diff --git a/debian/rules b/debian/rules index 712dd75..2e4284a 100755 --- a/debian/rules +++ b/debian/rules @@ -24,4 +24,8 @@ dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false) override_dh_auto_configure: - dh_auto_configure -- --with-systemdsystemunitdir=/lib/systemd/system + dh_auto_configure -- --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals + +# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers) +override_dh_compress: + dh_compress -X.pdf diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am index a41c063..96675ec 100644 --- a/doc/manuals/Makefile.am +++ b/doc/manuals/Makefile.am @@ -16,5 +16,6 @@ VTY_REFERENCE = osmopcu-vty-reference.xml include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc + OSMO_REPOSITORY = osmo-pcu include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc endif -- To view, visit https://gerrit.osmocom.org/14252 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I9f2e7cfd93ee0b13d064c606a20378c1ea01400e Gerrit-Change-Number: 14252 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:14:22 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 10:14:22 +0000 Subject: Change in osmo-sgsn[master]: debian: create -doc subpackage with pdf manuals Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/14253 Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... debian: create -doc subpackage with pdf manuals I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: I9c09a0cb5c65fa2e2cd9817edb4656b2a1a35bb9 --- M debian/control A debian/osmo-sgsn-doc.install M debian/rules M doc/manuals/Makefile.am 4 files changed, 18 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/53/14253/1 diff --git a/debian/control b/debian/control index 9594a08..9ad95a1 100644 --- a/debian/control +++ b/debian/control @@ -20,7 +20,8 @@ libosmo-sccp-dev, libosmo-sigtran-dev, libosmo-netif-dev, - libosmo-gsup-client-dev + libosmo-gsup-client-dev, + osmo-gsm-manuals-dev Standards-Version: 3.9.8 Vcs-Git: git://git.osmocom.org/osmo-sgsn.git Vcs-Browser: https://git.osmocom.org/osmo-sgsn @@ -67,3 +68,12 @@ Priority: extra Depends: osmo-gbproxy (= ${binary:Version}), ${misc:Depends} Description: Debug symbols for Osmocom GPRS Gb Interface Proxy + +Package: osmo-sgsn-doc +Architecture: all +Section: doc +Priority: optional +Depends: ${misc:Depends} +Description: ${misc:Package} PDF documentation + Various manuals: user manual, VTY reference manual and/or + protocol/interface manuals. diff --git a/debian/osmo-sgsn-doc.install b/debian/osmo-sgsn-doc.install new file mode 100644 index 0000000..bdc6a99 --- /dev/null +++ b/debian/osmo-sgsn-doc.install @@ -0,0 +1 @@ +usr/share/doc/osmo-sgsn-doc/*.pdf diff --git a/debian/rules b/debian/rules index af6b5b6..cfd692a 100755 --- a/debian/rules +++ b/debian/rules @@ -46,7 +46,7 @@ # debmake generated override targets # Set options for ./configure -CONFIGURE_FLAGS += --enable-iu --with-systemdsystemunitdir=/lib/systemd/system +CONFIGURE_FLAGS += --enable-iu --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals override_dh_auto_configure: dh_auto_configure -- $(CONFIGURE_FLAGS) # @@ -63,3 +63,7 @@ # Print test results in case of a failure override_dh_auto_test: dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false) + +# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers) +override_dh_compress: + dh_compress -X.pdf diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am index 00a08c8..52283ab 100644 --- a/doc/manuals/Makefile.am +++ b/doc/manuals/Makefile.am @@ -12,5 +12,6 @@ VTY_REFERENCE = osmosgsn-vty-reference.xml include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc + OSMO_REPOSITORY = osmo-sgsn include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc endif -- To view, visit https://gerrit.osmocom.org/14253 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I9c09a0cb5c65fa2e2cd9817edb4656b2a1a35bb9 Gerrit-Change-Number: 14253 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:14:24 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 10:14:24 +0000 Subject: Change in osmo-sip-connector[master]: debian: create -doc subpackage with pdf manuals Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/14255 Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... debian: create -doc subpackage with pdf manuals I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: I30df67b1c31f07e85002da4c2c75afb67ba529d2 --- M debian/control A debian/osmo-sip-connector-doc.install M debian/rules M doc/manuals/Makefile.am 4 files changed, 18 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector refs/changes/55/14255/1 diff --git a/debian/control b/debian/control index 21de9c0..38de657 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,8 @@ libsofia-sip-ua-glib-dev, libsofia-sip-ua-dev, dh-systemd (>= 1.5), - dh-autoreconf + dh-autoreconf, + osmo-gsm-manuals-dev Standards-Version: 3.8.4 Homepage: https://osmocom.org/projects/osmo-sip-conector/wiki Vcs-Git: git://git.osmocom.org/osmo-sip-connector.git @@ -28,3 +29,12 @@ Depends: osmo-sip-connector (= ${binary:Version}), ${misc:Depends} Description: Debug symbols for the osmo-sip-connector Make debugging possible + +Package: osmo-sip-connector-doc +Architecture: all +Section: doc +Priority: optional +Depends: ${misc:Depends} +Description: ${misc:Package} PDF documentation + Various manuals: user manual, VTY reference manual and/or + protocol/interface manuals. diff --git a/debian/osmo-sip-connector-doc.install b/debian/osmo-sip-connector-doc.install new file mode 100644 index 0000000..b814eae --- /dev/null +++ b/debian/osmo-sip-connector-doc.install @@ -0,0 +1 @@ +usr/share/doc/osmo-sip-connector-doc/*.pdf diff --git a/debian/rules b/debian/rules index e4e7ca9..b63a132 100755 --- a/debian/rules +++ b/debian/rules @@ -15,4 +15,8 @@ dh_strip --dbg-package=osmo-sip-connector-dbg override_dh_auto_configure: - dh_auto_configure -- --with-systemdsystemunitdir=/lib/systemd/system + dh_auto_configure -- --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals + +# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers) +override_dh_compress: + dh_compress -X.pdf diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am index 1a9b5b9..6bb46cc 100644 --- a/doc/manuals/Makefile.am +++ b/doc/manuals/Makefile.am @@ -12,5 +12,6 @@ VTY_REFERENCE = osmosipconnector-vty-reference.xml include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc + OSMO_REPOSITORY = osmo-sip-connector include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc endif -- To view, visit https://gerrit.osmocom.org/14255 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I30df67b1c31f07e85002da4c2c75afb67ba529d2 Gerrit-Change-Number: 14255 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:14:23 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 10:14:23 +0000 Subject: Change in osmo-sip-connector[master]: Cosmetic: debian: build-depends in multiple lines Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/14254 Change subject: Cosmetic: debian: build-depends in multiple lines ...................................................................... Cosmetic: debian: build-depends in multiple lines Change-Id: I2d126341d8653408b0a6a371088aead58b61bb84 --- M debian/control 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector refs/changes/54/14254/1 diff --git a/debian/control b/debian/control index aad1da0..21de9c0 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,14 @@ Section: net Priority: optional Maintainer: Holger Hans Peter Freyther -Build-Depends: debhelper (>= 7.0.0~), autotools-dev, pkg-config, libosmocore-dev, libsofia-sip-ua-glib-dev, libsofia-sip-ua-dev, dh-systemd (>= 1.5), dh-autoreconf +Build-Depends: debhelper (>= 7.0.0~), + autotools-dev, + pkg-config, + libosmocore-dev, + libsofia-sip-ua-glib-dev, + libsofia-sip-ua-dev, + dh-systemd (>= 1.5), + dh-autoreconf Standards-Version: 3.8.4 Homepage: https://osmocom.org/projects/osmo-sip-conector/wiki Vcs-Git: git://git.osmocom.org/osmo-sip-connector.git -- To view, visit https://gerrit.osmocom.org/14254 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I2d126341d8653408b0a6a371088aead58b61bb84 Gerrit-Change-Number: 14254 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:14:25 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 10:14:25 +0000 Subject: Change in osmo-trx[master]: debian: create -doc subpackage with pdf manuals Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/14256 Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... debian: create -doc subpackage with pdf manuals I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: I34858a18a34fc467f274ac164697a242f4cf0df8 --- M debian/control A debian/osmo-trx-doc.install M debian/patches/build-for-debian8.patch M debian/rules M doc/manuals/Makefile.am 5 files changed, 37 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/56/14256/1 diff --git a/debian/control b/debian/control index ffb9ac1..8ff59f0 100644 --- a/debian/control +++ b/debian/control @@ -14,7 +14,8 @@ libtalloc-dev, libusrp-dev, liblimesuite-dev, - libosmocore-dev (>= 0.10.0) + libosmocore-dev (>= 0.10.0), + osmo-gsm-manuals-dev Standards-Version: 3.9.6 Vcs-Browser: http://cgit.osmocom.org/osmo-trx Vcs-Git: git://git.osmocom.org/osmo-trx @@ -89,3 +90,12 @@ 3GPP is the "3rd Generation Partnership Project" which is the collaboration between different telecommunication associations for developing new generations of mobile phone networks. (post-2G/GSM) + +Package: osmo-trx-doc +Architecture: all +Section: doc +Priority: optional +Depends: ${misc:Depends} +Description: ${misc:Package} PDF documentation + Various manuals: user manual, VTY reference manual and/or + protocol/interface manuals. diff --git a/debian/osmo-trx-doc.install b/debian/osmo-trx-doc.install new file mode 100644 index 0000000..aa207b5 --- /dev/null +++ b/debian/osmo-trx-doc.install @@ -0,0 +1 @@ +usr/share/doc/osmo-trx-doc/*.pdf diff --git a/debian/patches/build-for-debian8.patch b/debian/patches/build-for-debian8.patch index cd1f356..6b917c4 100644 --- a/debian/patches/build-for-debian8.patch +++ b/debian/patches/build-for-debian8.patch @@ -1,16 +1,16 @@ -Index: osmo-trx/debian/control -=================================================================== ---- osmo-trx.orig/debian/control -+++ osmo-trx/debian/control +diff --git a/debian/control b/debian/control +index 8ff59f0..126c16a 100644 +--- a/debian/control ++++ b/debian/control @@ -13,7 +13,6 @@ Build-Depends: debhelper (>= 9), libfftw3-dev, libtalloc-dev, libusrp-dev, - liblimesuite-dev, - libosmocore-dev (>= 0.10.0) + libosmocore-dev (>= 0.10.0), + osmo-gsm-manuals-dev Standards-Version: 3.9.6 - Vcs-Browser: http://cgit.osmocom.org/osmo-trx -@@ -29,7 +28,7 @@ Package: osmo-trx-dbg +@@ -30,7 +29,7 @@ Package: osmo-trx-dbg Architecture: any Section: debug Priority: extra @@ -19,11 +19,10 @@ Description: Debug symbols for the osmo-trx-* Make debugging possible -@@ -70,22 +70,3 @@ Description: SDR transceiver that implem - 3GPP is the "3rd Generation Partnership Project" which is the collaboration +@@ -72,25 +71,6 @@ Description: SDR transceiver that implements Layer 1 of a GSM BTS (USRP1) between different telecommunication associations for developing new generations of mobile phone networks. (post-2G/GSM) -- + -Package: osmo-trx-lms -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} @@ -42,16 +41,20 @@ - 3GPP is the "3rd Generation Partnership Project" which is the collaboration - between different telecommunication associations for developing new - generations of mobile phone networks. (post-2G/GSM) -Index: osmo-trx/debian/rules -=================================================================== ---- osmo-trx.orig/debian/rules -+++ osmo-trx/debian/rules +- + Package: osmo-trx-doc + Architecture: all + Section: doc +diff --git a/debian/rules b/debian/rules +index 627c0c8..d9285e2 100755 +--- a/debian/rules ++++ b/debian/rules @@ -9,7 +9,7 @@ override_dh_shlibdeps: dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info override_dh_auto_configure: -- dh_auto_configure -- --with-uhd --with-usrp1 --with-lms --with-systemdsystemunitdir=/lib/systemd/system -+ dh_auto_configure -- --with-uhd --with-usrp1 --with-systemdsystemunitdir=/lib/systemd/system +- dh_auto_configure -- --with-uhd --with-usrp1 --with-lms --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals ++ dh_auto_configure -- --with-uhd --with-usrp1 --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals override_dh_strip: dh_strip --dbg-package=osmo-trx-dbg diff --git a/debian/rules b/debian/rules index 68de706..627c0c8 100755 --- a/debian/rules +++ b/debian/rules @@ -9,7 +9,11 @@ dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info override_dh_auto_configure: - dh_auto_configure -- --with-uhd --with-usrp1 --with-lms --with-systemdsystemunitdir=/lib/systemd/system + dh_auto_configure -- --with-uhd --with-usrp1 --with-lms --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals override_dh_strip: dh_strip --dbg-package=osmo-trx-dbg + +# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers) +override_dh_compress: + dh_compress -X.pdf diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am index a1f3bfb..7bf1f58 100644 --- a/doc/manuals/Makefile.am +++ b/doc/manuals/Makefile.am @@ -12,5 +12,6 @@ VTY_REFERENCE = osmotrx-vty-reference.xml include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc + OSMO_REPOSITORY = osmo-trx include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc endif -- To view, visit https://gerrit.osmocom.org/14256 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I34858a18a34fc467f274ac164697a242f4cf0df8 Gerrit-Change-Number: 14256 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:20:51 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 May 2019 10:20:51 +0000 Subject: Change in osmo-ci[master]: OBS: build osmo-gsm-manuals-dev in latest In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14244 ) Change subject: OBS: build osmo-gsm-manuals-dev in latest ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/14244/1/scripts/osmocom-latest-packages.sh File scripts/osmocom-latest-packages.sh: https://gerrit.osmocom.org/#/c/14244/1/scripts/osmocom-latest-packages.sh at 93 PS1, Line 93: git checkout -f -B "$VER" "refs/tags/$VER" What about dropping this line instead? as far as I can tell the checkout is already done in checkout(), line 58. -- To view, visit https://gerrit.osmocom.org/14244 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib7251cca9116151e473798879375cd5eb48ff3ad Gerrit-Change-Number: 14244 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: osmith Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 29 May 2019 10:20:51 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:21:53 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 10:21:53 +0000 Subject: Change in osmo-trx[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/14256 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/14256 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I34858a18a34fc467f274ac164697a242f4cf0df8 Gerrit-Change-Number: 14256 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-CC: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 29 May 2019 10:21:53 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:25:50 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 10:25:50 +0000 Subject: Change in osmo-ci[master]: OBS: build osmo-gsm-manuals-dev in latest In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/14244 ) Change subject: OBS: build osmo-gsm-manuals-dev in latest ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/14244/1/scripts/osmocom-latest-packages.sh File scripts/osmocom-latest-packages.sh: https://gerrit.osmocom.org/#/c/14244/1/scripts/osmocom-latest-packages.sh at 93 PS1, Line 93: git checkout -f -B "$VER" "refs/tags/$VER" > What about dropping this line instead? as far as I can tell the checkout is already done in checkout [?] Right, this is redundant. I'll create a separate patch that drops this checkout line, and rebase this patch on top (and then make the checkout_copy_debian8_jessie() function more similar to osmocom-nightly-packages.sh). -- To view, visit https://gerrit.osmocom.org/14244 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib7251cca9116151e473798879375cd5eb48ff3ad Gerrit-Change-Number: 14244 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: osmith Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 29 May 2019 10:25:50 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:48:35 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 10:48:35 +0000 Subject: Change in osmo-ci[master]: OBS: build osmo-gsm-manuals-dev in latest In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/14244 ) Change subject: OBS: build osmo-gsm-manuals-dev in latest ...................................................................... OBS: build osmo-gsm-manuals-dev in latest Enable in osmocom-latest-packages.sh. Check it out and create the source package for the latest release as usually, but also create a second version for debian 8 with adjusted dependencies (like in nightly [1]). [1] Change-Id: I3570599ede51b974d350064f44f77e360fafd8b0 Related: OS#3899 Change-Id: Ib7251cca9116151e473798879375cd5eb48ff3ad --- M scripts/osmocom-latest-packages.sh 1 file changed, 21 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/44/14244/2 -- To view, visit https://gerrit.osmocom.org/14244 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib7251cca9116151e473798879375cd5eb48ff3ad Gerrit-Change-Number: 14244 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: osmith Gerrit-CC: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:48:35 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 10:48:35 +0000 Subject: Change in osmo-ci[master]: OBS: latest: remove redundant checkout in build() Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/14257 Change subject: OBS: latest: remove redundant checkout in build() ...................................................................... OBS: latest: remove redundant checkout in build() Don't checkout a specific version in build(), this is already done in checkout(). Change-Id: I74290968fe25a6311da0de26ff675bbd687ba156 --- M scripts/osmocom-latest-packages.sh 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/57/14257/1 diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index 020efaa..58b4a9f 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -66,7 +66,6 @@ echo "====> Building $project" cd "$TOP/$project" VER=$(get_last_tag "$project") - git checkout -f -B "$VER" "refs/tags/$VER" if [ -x ./git-version-gen ]; then ./git-version-gen . > .tarball-version 2>/dev/null gbp buildpackage -S -uc -us -d --git-ignore-branch "--git-export-dir=$output" \ -- To view, visit https://gerrit.osmocom.org/14257 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I74290968fe25a6311da0de26ff675bbd687ba156 Gerrit-Change-Number: 14257 Gerrit-PatchSet: 1 Gerrit-Owner: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:50:08 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 10:50:08 +0000 Subject: Change in osmo-ci[master]: OBS: build osmo-gsm-manuals-dev in latest In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/14244 ) Change subject: OBS: build osmo-gsm-manuals-dev in latest ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/14244/1/scripts/osmocom-latest-packages.sh File scripts/osmocom-latest-packages.sh: https://gerrit.osmocom.org/#/c/14244/1/scripts/osmocom-latest-packages.sh at 93 PS1, Line 93: git checkout -f -B "$VER" "refs/tags/$VER" > Right, this is redundant. [?] Done -- To view, visit https://gerrit.osmocom.org/14244 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib7251cca9116151e473798879375cd5eb48ff3ad Gerrit-Change-Number: 14244 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: osmith Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 29 May 2019 10:50:08 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:52:31 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 May 2019 10:52:31 +0000 Subject: Change in osmo-ci[master]: OBS: latest: remove redundant checkout in build() In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14257 ) Change subject: OBS: latest: remove redundant checkout in build() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14257 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I74290968fe25a6311da0de26ff675bbd687ba156 Gerrit-Change-Number: 14257 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 29 May 2019 10:52:31 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:55:45 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 May 2019 10:55:45 +0000 Subject: Change in osmo-ci[master]: OBS: build osmo-gsm-manuals-dev in latest In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14244 ) Change subject: OBS: build osmo-gsm-manuals-dev in latest ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14244 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib7251cca9116151e473798879375cd5eb48ff3ad Gerrit-Change-Number: 14244 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 29 May 2019 10:55:45 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:56:09 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 May 2019 10:56:09 +0000 Subject: Change in libosmo-sccp[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14245 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14245 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1f412953e60c10e6146327a90edbd18d738e1365 Gerrit-Change-Number: 14245 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 29 May 2019 10:56:09 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:56:11 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 May 2019 10:56:11 +0000 Subject: Change in osmo-ggsn[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14248 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14248 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5563e023dc3c8b158a79ce0c9e1478e117b0ec37 Gerrit-Change-Number: 14248 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 29 May 2019 10:56:11 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:56:14 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 May 2019 10:56:14 +0000 Subject: Change in osmo-bsc[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14246 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14246 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8dfb5658e567978aa8fe82f45d8287dbd1df969c Gerrit-Change-Number: 14246 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 29 May 2019 10:56:14 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:56:16 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 May 2019 10:56:16 +0000 Subject: Change in osmo-hlr[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14249 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14249 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4a327bac68769892634236c573c313c7859c6199 Gerrit-Change-Number: 14249 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 29 May 2019 10:56:16 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:56:19 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 May 2019 10:56:19 +0000 Subject: Change in osmo-sgsn[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14253 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14253 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9c09a0cb5c65fa2e2cd9817edb4656b2a1a35bb9 Gerrit-Change-Number: 14253 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 29 May 2019 10:56:19 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:56:22 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 May 2019 10:56:22 +0000 Subject: Change in osmo-sip-connector[master]: Cosmetic: debian: build-depends in multiple lines In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14254 ) Change subject: Cosmetic: debian: build-depends in multiple lines ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14254 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2d126341d8653408b0a6a371088aead58b61bb84 Gerrit-Change-Number: 14254 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 29 May 2019 10:56:22 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:56:24 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 May 2019 10:56:24 +0000 Subject: Change in osmo-pcu[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14252 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14252 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9f2e7cfd93ee0b13d064c606a20378c1ea01400e Gerrit-Change-Number: 14252 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 29 May 2019 10:56:24 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:56:57 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 May 2019 10:56:57 +0000 Subject: Change in osmo-bts[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14247 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14247 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6d7a182d0a668693a5014aca0edc50ada9ac0d0f Gerrit-Change-Number: 14247 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 29 May 2019 10:56:57 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:56:59 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 May 2019 10:56:59 +0000 Subject: Change in osmo-mgw[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14250 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14250 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8466713a8d414ea56ca24f6f7119338ad2b98ce5 Gerrit-Change-Number: 14250 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 29 May 2019 10:56:59 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:57:05 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 May 2019 10:57:05 +0000 Subject: Change in osmo-sip-connector[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14255 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14255 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I30df67b1c31f07e85002da4c2c75afb67ba529d2 Gerrit-Change-Number: 14255 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 29 May 2019 10:57:05 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:57:07 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 May 2019 10:57:07 +0000 Subject: Change in osmo-trx[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14256 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14256 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I34858a18a34fc467f274ac164697a242f4cf0df8 Gerrit-Change-Number: 14256 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 29 May 2019 10:57:07 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:58:02 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 May 2019 10:58:02 +0000 Subject: Change in osmo-bts[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14247 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... Patch Set 1: Code-Review-1 -- To view, visit https://gerrit.osmocom.org/14247 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6d7a182d0a668693a5014aca0edc50ada9ac0d0f Gerrit-Change-Number: 14247 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 29 May 2019 10:58:02 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 10:58:12 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 May 2019 10:58:12 +0000 Subject: Change in osmo-bts[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14247 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... Patch Set 1: There's non-related stuff in this patch. -- To view, visit https://gerrit.osmocom.org/14247 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6d7a182d0a668693a5014aca0edc50ada9ac0d0f Gerrit-Change-Number: 14247 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 29 May 2019 10:58:12 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 11:53:58 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 May 2019 11:53:58 +0000 Subject: Change in docker-playground[master]: ttcn3-sgsn: Run log_merge.sh after tests Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14258 Change subject: ttcn3-sgsn: Run log_merge.sh after tests ...................................................................... ttcn3-sgsn: Run log_merge.sh after tests Change-Id: If03422bb8fb126fe6f204a4f8bc6edf0cbb7f194 --- M ttcn3-sgsn-test/Dockerfile 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/58/14258/1 diff --git a/ttcn3-sgsn-test/Dockerfile b/ttcn3-sgsn-test/Dockerfile index 42a53f2..fcc2c02 100644 --- a/ttcn3-sgsn-test/Dockerfile +++ b/ttcn3-sgsn-test/Dockerfile @@ -28,5 +28,8 @@ COPY SGSN_Tests.cfg /data/SGSN_Tests.cfg -WORKDIR /data -ENTRYPOINT ["/osmo-ttcn3-hacks/start-testsuite.sh", "/osmo-ttcn3-hacks/sgsn/SGSN_Tests"] +CMD cd /data && \ + /osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/sgsn/SGSN_Tests; \ + exit_code=$?; \ + /osmo-ttcn3-hacks/log_merge.sh SGSN_Tests --rm; \ + exit $exit_code -- To view, visit https://gerrit.osmocom.org/14258 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If03422bb8fb126fe6f204a4f8bc6edf0cbb7f194 Gerrit-Change-Number: 14258 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 12:37:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 12:37:05 +0000 Subject: Change in osmo-msc[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14251 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14251 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iafa9fba60b3ad4478ec24d6ba8538ec80ce99f52 Gerrit-Change-Number: 14251 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 29 May 2019 12:37:05 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 12:37:59 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 12:37:59 +0000 Subject: Change in docker-playground[master]: ttcn3-sgsn: Run log_merge.sh after tests In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14258 ) Change subject: ttcn3-sgsn: Run log_merge.sh after tests ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14258 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If03422bb8fb126fe6f204a4f8bc6edf0cbb7f194 Gerrit-Change-Number: 14258 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Wed, 29 May 2019 12:37:59 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 12:58:33 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 12:58:33 +0000 Subject: Change in osmo-bts[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14247 to look at the new patch set (#2). Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... debian: create -doc subpackage with pdf manuals I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: I6d7a182d0a668693a5014aca0edc50ada9ac0d0f --- M debian/control A debian/osmo-bts-doc.install M debian/rules M doc/manuals/Makefile.am 4 files changed, 18 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/47/14247/2 -- To view, visit https://gerrit.osmocom.org/14247 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6d7a182d0a668693a5014aca0edc50ada9ac0d0f Gerrit-Change-Number: 14247 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 13:03:12 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 13:03:12 +0000 Subject: Change in osmo-bts[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/14247 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... Patch Set 2: > There's non-related stuff in this patch. Right, I've amended the current HEAD and replaced the commit message by accident. Now the patch has the right content. I've made sure that it builds again, before submitting (note that the web server doesn't have the -doc debian package yet, seems like it takes some time until it gets updated; but the build log shows that it built the -doc and everything else successfully): https://build.opensuse.org/package/show/home:osmith42/osmo-bts -- To view, visit https://gerrit.osmocom.org/14247 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6d7a182d0a668693a5014aca0edc50ada9ac0d0f Gerrit-Change-Number: 14247 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 29 May 2019 13:03:12 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 13:25:28 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 13:25:28 +0000 Subject: Change in docker-playground[master]: ttcn3-sgsn: Run log_merge.sh after tests In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/14258 ) Change subject: ttcn3-sgsn: Run log_merge.sh after tests ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14258 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If03422bb8fb126fe6f204a4f8bc6edf0cbb7f194 Gerrit-Change-Number: 14258 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 29 May 2019 13:25:28 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 13:42:15 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 13:42:15 +0000 Subject: Change in osmo-ggsn[master]: gtp: Take queue_resp into account to schedule retrans timer In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/14211 ) Change subject: gtp: Take queue_resp into account to schedule retrans timer ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14211 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iebf405b2310a34785f3b363cc2a9f415281f6030 Gerrit-Change-Number: 14211 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 29 May 2019 13:42:15 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 14:03:10 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 14:03:10 +0000 Subject: Change in osmo-msc[master]: libmsc/msc_vty.c: refactor 'show subscr / conn / trans' commands In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/14069 ) Change subject: libmsc/msc_vty.c: refactor 'show subscr / conn / trans' commands ...................................................................... Patch Set 3: Code-Review-1 (2 comments) https://gerrit.osmocom.org/#/c/14069/3/src/libmsc/msc_vty.c File src/libmsc/msc_vty.c: https://gerrit.osmocom.org/#/c/14069/3/src/libmsc/msc_vty.c at 717 PS3, Line 717: trans->msc_a->c.msub trans->msc_a is not checked for NULL, although the FIXME above says it could be NULL. https://gerrit.osmocom.org/#/c/14069/3/src/libmsc/msc_vty.c at 826 PS3, Line 826: vsub->imeisv[0] != '\0' (Consistency: ->imei and ->imeisv have != \0, but ->name and ->msisdn above have strlen(). It would be nicer to use the same method for all of them.) -- To view, visit https://gerrit.osmocom.org/14069 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5e58b56204c3f3d019e8d4c3c96cefdbb4af4d47 Gerrit-Change-Number: 14069 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 29 May 2019 14:03:10 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 14:15:14 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 May 2019 14:15:14 +0000 Subject: Change in osmo-bts[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14247 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14247 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6d7a182d0a668693a5014aca0edc50ada9ac0d0f Gerrit-Change-Number: 14247 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 29 May 2019 14:15:14 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 14:17:37 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 14:17:37 +0000 Subject: Change in libosmocore[master]: fix isdigit taking unsigned as input In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/14149 ) Change subject: fix isdigit taking unsigned as input ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14149 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia13fd5ee79fc6dc3291c0b99958ab3c01afee17d Gerrit-Change-Number: 14149 Gerrit-PatchSet: 1 Gerrit-Owner: K?vin Redon Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 29 May 2019 14:17:37 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 14:24:33 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 14:24:33 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Validate osmux cid value during mgcp_msg_gen In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/14146 ) Change subject: mgcp-cli: Validate osmux cid value during mgcp_msg_gen ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14146 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5c4d39b346b94de933f86200902c6c0ea2e1d5df Gerrit-Change-Number: 14146 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 29 May 2019 14:24:33 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 14:34:35 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 May 2019 14:34:35 +0000 Subject: Change in osmo-mgw[master]: mgcp-cli: Validate osmux cid value during mgcp_msg_gen In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/14146 ) Change subject: mgcp-cli: Validate osmux cid value during mgcp_msg_gen ...................................................................... mgcp-cli: Validate osmux cid value during mgcp_msg_gen Change-Id: I5c4d39b346b94de933f86200902c6c0ea2e1d5df --- M src/libosmo-mgcp-client/mgcp_client.c 1 file changed, 11 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, but someone else must approve osmith: Looks good to me, approved diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index 7074328..f2204e1 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -36,6 +36,10 @@ #include #include +#ifndef OSMUX_CID_MAX +#define OSMUX_CID_MAX 255 /* FIXME: use OSMUX_CID_MAX from libosmo-netif? */ +#endif + /* Codec descripton for dynamic payload types (SDP) */ const struct value_string osmo_mgcpc_codec_names[] = { { CODEC_PCMU_8000_1, "PCMU/8000/1" }, @@ -414,9 +418,6 @@ return -2; } -#ifndef OSMUX_CID_MAX -#define OSMUX_CID_MAX 255 /* FIXME: use OSMUX_CID_MAX from libosmo-netif? */ -#endif if (osmux_cid > OSMUX_CID_MAX) { /* OSMUX_CID_MAX from libosmo-netif */ LOGP(DLMGCP, LOGL_ERROR, "Osmux ID too large: %u > %u\n", osmux_cid, OSMUX_CID_MAX); @@ -1260,6 +1261,13 @@ /* Add X-Osmo-Osmux */ if ((mgcp_msg->presence & MGCP_MSG_PRESENCE_X_OSMO_OSMUX_CID)) { + if (mgcp_msg->x_osmo_osmux_cid < -1 || mgcp_msg->x_osmo_osmux_cid > OSMUX_CID_MAX) { + LOGP(DLMGCP, LOGL_ERROR, + "Wrong Osmux CID %d, can not generate MGCP message\n", + mgcp_msg->x_osmo_osmux_cid); + msgb_free(msg); + return NULL; + } snprintf(buf, sizeof(buf), " %d", mgcp_msg->x_osmo_osmux_cid); rc += msgb_printf(msg, MGCP_X_OSMO_OSMUX_HEADER "%s\r\n", -- To view, visit https://gerrit.osmocom.org/14146 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I5c4d39b346b94de933f86200902c6c0ea2e1d5df Gerrit-Change-Number: 14146 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 14:34:45 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 May 2019 14:34:45 +0000 Subject: Change in docker-playground[master]: ttcn3-sgsn: Run log_merge.sh after tests In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14258 ) Change subject: ttcn3-sgsn: Run log_merge.sh after tests ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/14258 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If03422bb8fb126fe6f204a4f8bc6edf0cbb7f194 Gerrit-Change-Number: 14258 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 29 May 2019 14:34:45 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 14:34:46 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 May 2019 14:34:46 +0000 Subject: Change in docker-playground[master]: ttcn3-sgsn: Run log_merge.sh after tests In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/14258 ) Change subject: ttcn3-sgsn: Run log_merge.sh after tests ...................................................................... ttcn3-sgsn: Run log_merge.sh after tests Change-Id: If03422bb8fb126fe6f204a4f8bc6edf0cbb7f194 --- M ttcn3-sgsn-test/Dockerfile 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved osmith: Looks good to me, but someone else must approve Pau Espin Pedrol: Verified diff --git a/ttcn3-sgsn-test/Dockerfile b/ttcn3-sgsn-test/Dockerfile index 42a53f2..fcc2c02 100644 --- a/ttcn3-sgsn-test/Dockerfile +++ b/ttcn3-sgsn-test/Dockerfile @@ -28,5 +28,8 @@ COPY SGSN_Tests.cfg /data/SGSN_Tests.cfg -WORKDIR /data -ENTRYPOINT ["/osmo-ttcn3-hacks/start-testsuite.sh", "/osmo-ttcn3-hacks/sgsn/SGSN_Tests"] +CMD cd /data && \ + /osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/sgsn/SGSN_Tests; \ + exit_code=$?; \ + /osmo-ttcn3-hacks/log_merge.sh SGSN_Tests --rm; \ + exit $exit_code -- To view, visit https://gerrit.osmocom.org/14258 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If03422bb8fb126fe6f204a4f8bc6edf0cbb7f194 Gerrit-Change-Number: 14258 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 14:42:49 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 29 May 2019 14:42:49 +0000 Subject: Change in gr-gsm[master]: Filter out SoapyAudio devices In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/13812 ) Change subject: Filter out SoapyAudio devices ...................................................................... Patch Set 3: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/13812/3/python/misc_utils/device.py File python/misc_utils/device.py: https://gerrit.osmocom.org/#/c/13812/3/python/misc_utils/device.py at 35 PS3, Line 35: else: : return True (I haven't seen for...else before, but this is valid: https://book.pythontips.com/en/latest/for_-_else.html#else-clause ) -- To view, visit https://gerrit.osmocom.org/13812 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: gr-gsm Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib84081041ca6c2bc18b9da0c32bac9d3ecef65ca Gerrit-Change-Number: 13812 Gerrit-PatchSet: 3 Gerrit-Owner: Vasil Velichkov Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Piotr Krysik Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: Vasil Velichkov Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 29 May 2019 14:42:49 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 15:07:47 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 29 May 2019 15:07:47 +0000 Subject: Change in osmo-msc[master]: libmsc/msc_vty.c: refactor 'show subscr / conn / trans' commands In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14069 ) Change subject: libmsc/msc_vty.c: refactor 'show subscr / conn / trans' commands ...................................................................... Patch Set 3: (2 comments) https://gerrit.osmocom.org/#/c/14069/3/src/libmsc/msc_vty.c File src/libmsc/msc_vty.c: https://gerrit.osmocom.org/#/c/14069/3/src/libmsc/msc_vty.c at 717 PS3, Line 717: trans->msc_a->c.msub > trans->msc_a is not checked for NULL, although the FIXME above says it could be NULL. Oh, right! I will fix this FIXME ;) https://gerrit.osmocom.org/#/c/14069/3/src/libmsc/msc_vty.c at 826 PS3, Line 826: vsub->imeisv[0] != '\0' > (Consistency: ->imei and ->imeisv have != \0, but ->name and ->msisdn above have strlen(). [?] In general, I am agree. I will switch them all to foo[0] != '\0', but in a separate change if you don't insist. This change is more about appearance... -- To view, visit https://gerrit.osmocom.org/14069 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5e58b56204c3f3d019e8d4c3c96cefdbb4af4d47 Gerrit-Change-Number: 14069 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 29 May 2019 15:07:47 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 15:38:12 2019 From: gerrit-no-reply at lists.osmocom.org (Daniel Willmann) Date: Wed, 29 May 2019 15:38:12 +0000 Subject: Change in osmo-bts[master]: osmo-bts-oc2g: Fix status LED responsibilities Message-ID: Daniel Willmann has uploaded this change for review. ( https://gerrit.osmocom.org/14259 Change subject: osmo-bts-oc2g: Fix status LED responsibilities ...................................................................... osmo-bts-oc2g: Fix status LED responsibilities osmo-bts-oc2g no longer modifies the status LED and instead leaves that to the bts manager. The service file now also creates a directory in /var/run needed for osmo-bts to communicate with oc2gbts-mgr. This status file is used by oc2gbts-mgr to figure out when the bts is operational. Related: SYS#4493 Change-Id: Ifae634c6c2ecec7d32298c0f266f91f3e81308f5 --- M contrib/systemd/osmo-bts-oc2g.service M src/osmo-bts-oc2g/main.c 2 files changed, 3 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/59/14259/1 diff --git a/contrib/systemd/osmo-bts-oc2g.service b/contrib/systemd/osmo-bts-oc2g.service index 7b0168a..860aeb1 100644 --- a/contrib/systemd/osmo-bts-oc2g.service +++ b/contrib/systemd/osmo-bts-oc2g.service @@ -3,11 +3,8 @@ [Service] Type=simple -ExecStartPre=/bin/sh -c 'echo 1 > /sys/class/leds/usr0/brightness' -ExecStartPre=/bin/sh -c 'echo 1 > /sys/class/leds/usr1/brightness' ExecStart=/usr/bin/osmo-bts-oc2g -s -c /etc/osmocom/osmo-bts-oc2g.cfg -M -ExecStopPost=/bin/sh -c 'echo 1 > /sys/class/leds/usr0/brightness' -ExecStopPost=/bin/sh -c 'echo 0 > /sys/class/leds/usr1/brightness' +RuntimeDirectory=osmo-bts Restart=always RestartSec=2 RestartPreventExitStatus=1 diff --git a/src/osmo-bts-oc2g/main.c b/src/osmo-bts-oc2g/main.c index 29fab47..5b66c6f 100644 --- a/src/osmo-bts-oc2g/main.c +++ b/src/osmo-bts-oc2g/main.c @@ -151,24 +151,16 @@ { static uint64_t states = 0; uint64_t old_states = states; - int led_rf_active_on; if (on) states |= (1ULL << which); else states &= ~(1ULL << which); - led_rf_active_on = - (states & (1ULL << BTS_STATUS_RF_ACTIVE)) && - !(states & (1ULL << BTS_STATUS_RF_MUTE)); - LOGP(DL1C, LOGL_INFO, - "Set global status #%d to %d (%04llx -> %04llx), LEDs: ACT %d\n", + "Set global status #%d to %d (%04llx -> %04llx)\n", which, on, - (long long)old_states, (long long)states, - led_rf_active_on); - - oc2gbts_led_set(led_rf_active_on ? LED_GREEN : LED_OFF); + (long long)old_states, (long long)states); } void bts_model_print_help() -- To view, visit https://gerrit.osmocom.org/14259 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ifae634c6c2ecec7d32298c0f266f91f3e81308f5 Gerrit-Change-Number: 14259 Gerrit-PatchSet: 1 Gerrit-Owner: Daniel Willmann -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 15:38:13 2019 From: gerrit-no-reply at lists.osmocom.org (Daniel Willmann) Date: Wed, 29 May 2019 15:38:13 +0000 Subject: Change in osmo-bts[master]: osmo-bts-lc15: Change LED behaviour to be the same as oc2g Message-ID: Daniel Willmann has uploaded this change for review. ( https://gerrit.osmocom.org/14260 Change subject: osmo-bts-lc15: Change LED behaviour to be the same as oc2g ...................................................................... osmo-bts-lc15: Change LED behaviour to be the same as oc2g It looks like the status LED on the sysmobts2100 never worked correctly since lc15bts-mgr expects osmo-bts-lc15 to create and manage /var/run/osmo-bts/state, but there is nothing to do so in osmo-bts. This patch copies the functions from oc2g to manage the state file in lc15. Change-Id: Iad32a22fc72e2aba45e4f1b9ae585f6e0b8757ed Related: SYS#4493 --- M contrib/systemd/osmo-bts-lc15.service M src/osmo-bts-litecell15/main.c 2 files changed, 31 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/60/14260/1 diff --git a/contrib/systemd/osmo-bts-lc15.service b/contrib/systemd/osmo-bts-lc15.service index 90e7fc2..7c51110 100644 --- a/contrib/systemd/osmo-bts-lc15.service +++ b/contrib/systemd/osmo-bts-lc15.service @@ -3,11 +3,8 @@ [Service] Type=simple -ExecStartPre=/bin/sh -c 'echo 1 > /sys/class/leds/usr0/brightness' -ExecStartPre=/bin/sh -c 'echo 1 > /sys/class/leds/usr1/brightness' ExecStart=/usr/bin/osmo-bts-lc15 -t 2 -s -c /etc/osmocom/osmo-bts-lc15.cfg -M -ExecStopPost=/bin/sh -c 'echo 1 > /sys/class/leds/usr0/brightness' -ExecStopPost=/bin/sh -c 'echo 0 > /sys/class/leds/usr1/brightness' +RuntimeDirectory=osmo-bts Restart=always RestartSec=2 RestartPreventExitStatus=1 diff --git a/src/osmo-bts-litecell15/main.c b/src/osmo-bts-litecell15/main.c index e4f9a56..c47d76d 100644 --- a/src/osmo-bts-litecell15/main.c +++ b/src/osmo-bts-litecell15/main.c @@ -51,6 +51,25 @@ #include #include +static int write_status_file(char *status_file, char *status_str) +{ + FILE *outf; + char tmp[PATH_MAX+1]; + + snprintf(tmp, sizeof(tmp)-1, "/var/run/osmo-bts/%s", status_file); + tmp[PATH_MAX-1] = '\0'; + + outf = fopen(tmp, "w"); + if (!outf) + return -1; + + fprintf(outf, "%s\n", status_str); + + fclose(outf); + + return 0; +} + /*NTQD: Change how rx_nr is handle in multi-trx*/ #define LC15BTS_RF_LOCK_PATH "/var/lock/bts_rf_lock" @@ -116,6 +135,9 @@ int bts_model_oml_estab(struct gsm_bts *bts) { + /* update status file */ + write_status_file("state", ""); + return 0; } @@ -123,24 +145,16 @@ { static uint64_t states = 0; uint64_t old_states = states; - int led_rf_active_on; if (on) states |= (1ULL << which); else states &= ~(1ULL << which); - led_rf_active_on = - (states & (1ULL << BTS_STATUS_RF_ACTIVE)) && - !(states & (1ULL << BTS_STATUS_RF_MUTE)); - LOGP(DL1C, LOGL_INFO, - "Set global status #%d to %d (%04llx -> %04llx), LEDs: ACT %d\n", + "Set global status #%d to %d (%04llx -> %04llx)", which, on, - (long long)old_states, (long long)states, - led_rf_active_on); - - lc15bts_led_set(led_rf_active_on ? LED_GREEN : LED_OFF); + (long long)old_states, (long long)states); } void bts_model_print_help() @@ -197,11 +211,17 @@ void bts_model_abis_close(struct gsm_bts *bts) { + /* write to status file */ + write_status_file("state", "ABIS DOWN"); + /* for now, we simply terminate the program and re-spawn */ bts_shutdown(bts, "Abis close"); } int main(int argc, char **argv) { + /* create status file with initial state */ + write_status_file("state", "ABIS DOWN"); + return bts_main(argc, argv); } -- To view, visit https://gerrit.osmocom.org/14260 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Iad32a22fc72e2aba45e4f1b9ae585f6e0b8757ed Gerrit-Change-Number: 14260 Gerrit-PatchSet: 1 Gerrit-Owner: Daniel Willmann -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 15:40:33 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 29 May 2019 15:40:33 +0000 Subject: Change in osmo-msc[master]: libmsc/msc_vty.c: refactor 'show subscr / conn / trans' commands In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Neels Hofmeyr, Harald Welte, osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14069 to look at the new patch set (#4). Change subject: libmsc/msc_vty.c: refactor 'show subscr / conn / trans' commands ...................................................................... libmsc/msc_vty.c: refactor 'show subscr / conn / trans' commands The current way of printing subscriber, connection, and transaction info is ugly (sorry) and has several problems: - the terminal width should be large enough to fit quite long lines, otherwise the output is unreadable and looks misaligned; - some fields (such as subscriber name) can be larger than it's expected, so either they're getting truncated, or again, the output is misaligned and unreadable; - adding new info fields would require one to think about the alignment and would make the output even more cumbersome. Here is an example output of 'show connection' command: _Subscriber_______________________________________ _LAC_ _RAN___________________ _MSC-A_state_________ _MSC-A_use_ IMSI-123456789012345:MSISDN-12345:TMSI-0x12345678 1 GERAN-A-4294967295:A5-3 WAIT_CLASSMARK_UPDATE 2=cm_service,trans_cc IMSI-123456789012356:MSISDN-234567:TMSI-0x123ABC78 65535 UTRAN-Iu-4294967295 COMMUNICATING 2=cm_service,trans_sms IMSI-262073993158656:MSISDN-123456:TMSI-0x493026BA 1 GERAN-A-1 MSC_A_ST_COMMUNICATING 1=1 (silent_call) Another 'show subscriber' command mixes the information about subscriber, its connections and transactions without any alignment, what also decreases the readability. This change introduces a hierarchical approach, based on the old 'field per line' formatting. First of all, the VTY commands were extended with optional flags: show connection [trans] show subscriber cache [(conn|trans|conn+trans)] show subscriber TYPE ID [(conn|trans|conn+trans)] so it can be decided, whether to print child connections and/or transaction, or not. For example: show connection trans would print all connections and their child transactions with hierarchical alignment: Connection #00: Subscriber: IMSI-262073993158656:MSISDN-123456:TMSI-0x76760B75 RAN connection: GERAN-A-1 RAN connection state: MSC_A_ST_COMMUNICATING LAC / cell ID: 1 / 0 Use count total: 1 Use count: 1 (silent_call) Transaction #00: Unique (global) identifier: 0x00000000 GSM 04.07 identifier (MT): 0 Type: silent-call another example is: show subscriber cache conn+trans which would print all known subscribers, their active connections and transactions: Subscriber #00: MSISDN: 123456 LAC / cell ID: 1 / 0 RAN type: GERAN-A IMSI: 262073993158656 TMSI: 76760B75 ... Connection: RAN connection: GERAN-A-1 RAN connection state: MSC_A_ST_COMMUNICATING ... Transaction #00: Unique (global) identifier: 0x00000000 GSM 04.07 identifier (MT): 0 Type: silent-call Transaction #01: Unique (global) identifier: 0x00000001 GSM 04.07 identifier (MO): 0 Type: SMS Transaction #02: Unique (global) identifier: 0x00000002 GSM 04.07 identifier (MT): 0 Type: SMS Please note that we don't print redundant info in child nodes (i.e. connection and transaction info), such as subscriber name in connection info, nor connection name in transaction info - it is clear from the hierarchical formatting. Change-Id: I5e58b56204c3f3d019e8d4c3c96cefdbb4af4d47 --- M src/libmsc/msc_vty.c 1 file changed, 291 insertions(+), 170 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/69/14069/4 -- To view, visit https://gerrit.osmocom.org/14069 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I5e58b56204c3f3d019e8d4c3c96cefdbb4af4d47 Gerrit-Change-Number: 14069 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 15:40:34 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 29 May 2019 15:40:34 +0000 Subject: Change in osmo-msc[master]: libmsc/msc_vty.c: do not abuse strlen() to check char buffers Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14261 Change subject: libmsc/msc_vty.c: do not abuse strlen() to check char buffers ...................................................................... libmsc/msc_vty.c: do not abuse strlen() to check char buffers In the most cases we need to check whether particular char buffer is empty or not. Using strlen() for that involves more CPU power, so let's just check the first character against '\0'. Change-Id: I8728876b80c870e82247e6e56f719e10ed322a95 --- M src/libmsc/msc_vty.c 1 file changed, 3 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/61/14261/1 diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index 5b0cfc4..8a976cb 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -793,11 +793,11 @@ { char buf[128]; - if (strlen(vsub->name)) { + if (vsub->name[0] != '\0') { MSC_VTY_DUMP(vty, offset, "Name: '%s'%s", vsub->name, VTY_NEWLINE); } - if (strlen(vsub->msisdn)) { + if (vsub->msisdn[0] != '\0') { MSC_VTY_DUMP(vty, offset, "MSISDN: %s%s", vsub->msisdn, VTY_NEWLINE); } @@ -873,8 +873,7 @@ osmo_fsm_inst_state_name(vsub->sgs_fsm), VTY_NEWLINE); MSC_VTY_DUMP(vty, offset, "SGs-MME: %s%s", - strlen(vsub->sgs.mme_name) ? - vsub->sgs.mme_name : "(none)", + vsub->sgs.mme_name[0] != '\0' ? vsub->sgs.mme_name : "(none)", VTY_NEWLINE); MSC_VTY_DUMP(vty, offset, "Use count total: %d%s", -- To view, visit https://gerrit.osmocom.org/14261 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I8728876b80c870e82247e6e56f719e10ed322a95 Gerrit-Change-Number: 14261 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 15:45:40 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 May 2019 15:45:40 +0000 Subject: Change in osmo-msc[master]: libmsc/msc_vty.c: do not abuse strlen() to check char buffers In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14261 ) Change subject: libmsc/msc_vty.c: do not abuse strlen() to check char buffers ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14261 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8728876b80c870e82247e6e56f719e10ed322a95 Gerrit-Change-Number: 14261 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-CC: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 29 May 2019 15:45:40 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 15:59:11 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 May 2019 15:59:11 +0000 Subject: Change in osmo-ttcn3-hacks[master]: sgsn: Add tests to check GTP retransmit queue Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14262 Change subject: sgsn: Add tests to check GTP retransmit queue ...................................................................... sgsn: Add tests to check GTP retransmit queue Change-Id: I3c4a3573482bb1fa1549c732a0f78c2d00eadd86 --- M sgsn/SGSN_Tests.ttcn M sgsn/expected-results.xml 2 files changed, 121 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/62/14262/1 diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index 5633183..1f63dfa 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -1536,6 +1536,123 @@ vc_conn.done; } +/* ATTACH + PDP CTX ACT dropped + retrans */ +private function f_TC_attach_pdp_act_deact_gtp_retrans(charstring id) runs on BSSGP_ConnHdlr { + var PdpActPars apars := valueof(t_PdpActPars(mp_ggsn_ip)); + var Gtp1cUnitdata g_ud_first, g_ud_second; + /* first perform regular attach */ + f_TC_attach(id); + + /* then activate PDP context on the Gb side */ + f_send_l3_gmm_llc(ts_SM_ACT_PDP_REQ(apars.tid, apars.nsapi, apars.sapi, apars.qos, apars.addr, + apars.apn, apars.pco), 0); + + GTP.receive(tr_GTPC_MsgType(?, createPDPContextRequest, ?)) -> value g_ud_first {} + log("First createPDPContextRequest received, dropping & waiting for retransmission"); + GTP.receive(tr_GTPC_MsgType(?, createPDPContextRequest, ?)) -> value g_ud_second { + if (g_ud_first != g_ud_second) { + setverdict(fail, "Retransmitted GTP message createPDPContextRequest is different from original one!"); + mtc.stop; + } + f_process_gtp_ctx_act_req(apars, g_ud_second.gtpc); + var integer seq_nr := oct2int(g_ud_second.gtpc.opt_part.sequenceNumber); + GTP.send(ts_GTPC_CreatePdpResp(g_ud_second.peer, seq_nr, + apars.sgsn_tei_c, apars.gtp_resp_cause, + apars.ggsn_tei_c, apars.ggsn_tei_u, + apars.nsapi, + apars.ggsn_ip_c, apars.ggsn_ip_u, apars.chg_id, + omit, omit)); + } + BSSGP[0].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_ACCEPT)) {} + + /* Now the same with Deact */ + f_send_l3_gmm_llc(ts_SM_DEACT_PDP_REQ_MO(apars.tid, '00'O, false, omit), 0); + GTP.receive(tr_GTPC_MsgType(?, deletePDPContextRequest, apars.ggsn_tei_c)) -> value g_ud_first {} + log("First deletePDPContextRequest received, dropping & waiting for retransmission"); + GTP.receive(tr_GTPC_MsgType(?, deletePDPContextRequest, apars.ggsn_tei_c)) -> value g_ud_second { + if (g_ud_first != g_ud_second) { + setverdict(fail, "Retransmitted GTP message deletePDPContextRequest is different from original one!"); + mtc.stop; + } + var integer seq_nr := oct2int(g_ud_second.gtpc.opt_part.sequenceNumber); + BSSGP[0].clear; + GTP.send(ts_GTPC_DeletePdpResp(g_ud_second.peer, seq_nr, apars.sgsn_tei_c, '7F'O)); + } + alt { + [] BSSGP[0].receive(tr_BD_L3_MT(tr_SM_DEACT_PDP_ACCEPT_MT(apars.tid))) { + setverdict(pass); + } + [] as_xid(apars, 0); + } + + setverdict(pass); +} +testcase TC_attach_pdp_act_deact_gtp_retrans() runs on test_CT { + var BSSGP_ConnHdlr vc_conn; + f_init(); + vc_conn := f_start_handler(refers(f_TC_attach_pdp_act_deact_gtp_retrans), testcasename(), g_gb, 27); + vc_conn.done; +} + +/* Test that SGSN GTP response retransmit queue works fine */ +private function f_TC_attach_pdp_act_deact_gtp_retrans_resp(charstring id) runs on BSSGP_ConnHdlr { + var PdpActPars apars := valueof(t_PdpActPars(mp_ggsn_ip)); + var integer seq_nr := 23; + var Gtp1cUnitdata g_ud_first, g_ud_second; + var template Gtp1cUnitdata g_delete_req; + /* first perform regular attach + PDP context act */ + f_TC_attach(id); + f_pdp_ctx_act(apars); + + /* Now perform an MT DeleteCtxReq and emulate GGSN didn't receive response and sends a duplicated DeleteCtxReq */ + BSSGP[0].clear; + var GtpPeer peer := valueof(ts_GtpPeerC(apars.sgsn_ip_c)); + g_delete_req := ts_GTPC_DeletePDP(peer, seq_nr, apars.sgsn_tei_c, apars.nsapi, '1'B); + GTP.send(g_delete_req); + alt { + [] BSSGP[0].receive(tr_BD_L3_MT(tr_SM_DEACT_PDP_REQ_MT(apars.tid, ?, true))) { + f_send_l3_gmm_llc(ts_SM_DEACT_PDP_ACCEPT_MO(apars.tid), 0); + } + [] as_xid(apars, 0); + } + GTP.receive(tr_GTPC_MsgType(?, deletePDPContextResponse, apars.ggsn_tei_c)) -> value g_ud_first { + if (g_ud_first.gtpc.gtpc_pdu.deletePDPContextResponse.cause.causevalue != '80'O) { + setverdict(fail, "Received deletePDPContextResponse cause is not 'Request accepted'"); + mtc.stop; + } + }; + + /* Send duplicate DeleteCtxReq */ + log("First deletePDPContextResponse received, dropping & retransmitting retransmission of deletePDPContextRequest"); + GTP.send(g_delete_req); + GTP.receive(tr_GTPC_MsgType(?, deletePDPContextResponse, apars.ggsn_tei_c)) -> value g_ud_second { + if (g_ud_first != g_ud_second) { + setverdict(fail, "Retransmitted GTP message deletePDPContextResponse is different from original one!"); + mtc.stop; + } + } + + /* Let's send now a new DeleteCtxReq (increased seq_nr) to make sure it + * is handled differently by SGSN (expect "non-existent" cause) */ + g_delete_req := ts_GTPC_DeletePDP(peer, seq_nr + 1, apars.sgsn_tei_c, apars.nsapi, '1'B); + GTP.send(g_delete_req); + /* Response with cause "non-existent" must be sent with TEID 0 according to specs */ + GTP.receive(tr_GTPC_MsgType(?, deletePDPContextResponse, '00000000'O)) -> value g_ud_second { + if (g_ud_second.gtpc.gtpc_pdu.deletePDPContextResponse.cause.causevalue != 'C0'O) { + setverdict(fail, "Received deletePDPContextResponse cause is not 'Non-existent'"); + mtc.stop; + } + } + + setverdict(pass); +} +testcase TC_attach_pdp_act_deact_gtp_retrans_resp() runs on test_CT { + var BSSGP_ConnHdlr vc_conn; + f_init(); + vc_conn := f_start_handler(refers(f_TC_attach_pdp_act_deact_gtp_retrans_resp), testcasename(), g_gb, 28); + vc_conn.done; +} + private function f_TC_hlr_location_cancel_request_update(charstring id) runs on BSSGP_ConnHdlr { /* MS: perform regular attach */ f_TC_attach(id); @@ -2369,6 +2486,8 @@ execute( TC_attach_restart_ctr_echo() ); execute( TC_attach_restart_ctr_create() ); execute( TC_attach_pdp_act_deact_mt_t3395_expire() ); + execute( TC_attach_pdp_act_deact_gtp_retrans() ); + execute( TC_attach_pdp_act_deact_gtp_retrans_resp() ); execute( TC_attach_pdp_act_user_error_ind_ggsn() ); execute( TC_attach_pdp_act_gmm_detach() ); execute( TC_attach_gmm_attach_req_while_gmm_attach() ); diff --git a/sgsn/expected-results.xml b/sgsn/expected-results.xml index b53a6f3..0b477d1 100644 --- a/sgsn/expected-results.xml +++ b/sgsn/expected-results.xml @@ -56,6 +56,8 @@ + + -- To view, visit https://gerrit.osmocom.org/14262 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I3c4a3573482bb1fa1549c732a0f78c2d00eadd86 Gerrit-Change-Number: 14262 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 16:18:10 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 May 2019 16:18:10 +0000 Subject: Change in osmo-ggsn[master]: gtp: Fix typo dublicate->duplicate Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14263 Change subject: gtp: Fix typo dublicate->duplicate ...................................................................... gtp: Fix typo dublicate->duplicate Change-Id: Ic572c216e74fa937dfd12f9f3dc03de18b6b123e --- M gtp/gtp.c 1 file changed, 11 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/63/14263/1 diff --git a/gtp/gtp.c b/gtp/gtp.c index b50b592..a4f3ab2 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -383,13 +383,13 @@ * requires the receiving GSN to send a response, with the same information * as in the original response. For most messages this happens automatically: * - * Echo: Automatically dublicates the original response + * Echo: Automatically duplicates the original response * Create pdp context: The SGSN may send create context request even if * a context allready exist (imsi+nsapi?). This means that the reply will - automatically dublicate the original response. It might however have + automatically duplicate the original response. It might however have * side effects in the application which is asked twice to validate * the login. - * Update pdp context: Automatically dublicates the original response??? + * Update pdp context: Automatically duplicates the original response??? * Delete pdp context. Automatically in gtp0, but in gtp1 will generate * a nonexist reply message. * @@ -724,7 +724,7 @@ return 0; } -static int gtp_dublicate(struct gsn_t *gsn, uint8_t version, +static int gtp_duplicate(struct gsn_t *gsn, uint8_t version, struct sockaddr_in *peer, uint16_t seq) { struct qmsg_t *qmsg; @@ -984,8 +984,8 @@ int fd, void *pack, unsigned len) { - /* Check if it was a dublicate request */ - if (!gtp_dublicate(gsn, 0, peer, get_seq(pack))) + /* Check if it was a duplicate request */ + if (!gtp_duplicate(gsn, 0, peer, get_seq(pack))) return 0; /* Send off reply to request */ @@ -1370,7 +1370,7 @@ uint8_t linked_nsapi = 0; struct pdp_t *linked_pdp = NULL; - if (!gtp_dublicate(gsn, version, peer, seq)) + if (!gtp_duplicate(gsn, version, peer, seq)) return 0; pdp = &pdp_buf; @@ -2072,8 +2072,8 @@ uint64_t imsi; uint8_t nsapi; - /* Is this a dublicate ? */ - if (!gtp_dublicate(gsn, version, peer, seq)) { + /* Is this a duplicate ? */ + if (!gtp_duplicate(gsn, version, peer, seq)) { return 0; /* We allready send of response once */ } @@ -2565,8 +2565,8 @@ int n; int count = 0; - /* Is this a dublicate ? */ - if (!gtp_dublicate(gsn, version, peer, seq)) { + /* Is this a duplicate ? */ + if (!gtp_duplicate(gsn, version, peer, seq)) { return 0; /* We allready send off response once */ } -- To view, visit https://gerrit.osmocom.org/14263 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ic572c216e74fa937dfd12f9f3dc03de18b6b123e Gerrit-Change-Number: 14263 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 16:18:18 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 29 May 2019 16:18:18 +0000 Subject: Change in osmo-msc[master]: Introduce initial unit test for db_sms_* API In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13629 to look at the new patch set (#3). Change subject: Introduce initial unit test for db_sms_* API ...................................................................... Introduce initial unit test for db_sms_* API Since OsmoMSC has built-in SMSC, it needs to store the messages somewhere. Currently we use libdbi and SQLite3 back-end for that. For a long time, the db_sms_* API remained uncovered by unit tests. This change aims to fix that, and does cover the following calls: - db_sms_store(), - db_sms_get(), - db_sms_get_next_unsent(), - db_sms_mark_delivered(), - db_sms_delete_sent_message_by_id(), - db_sms_delete_by_msisdn(), - db_sms_delete_oldest_expired_message(). Due to performance reasons, the test database is initialized in RAM using the magic filename ':memory:'. This is a feature of SQLite3 (and not libdbi), see: https://www.sqlite.org/inmemorydb.html Of course, this unit test helped to discover some problems: 1) Storing an SMS with empty TP-User-Data (TP-UDL=0) causes buffer overruns in both db_sms_store() and db_sms_get(). 2) TP-User-Data-Length is always being interpreted in octets, regardless of DCS (Data Coding Scheme). This results in storing garbage in the database if the default 7-bit encoding is used. Fortunately, the 'user_data' buffer in structure 'gsm_sms' is large emough, so we don't experience buffer overruns. 3) db_sms_delete_oldest_expired_message() doesn't work as expected. Instead of removing the *oldest* expired message, it tries to remove the *newest* one. The current test expectations do reflect these problems. All of them will be fixed in the follow-up patches. Change-Id: Id94ad35b6f78f839137db2e17010fbf9b40111a3 --- M configure.ac M src/libmsc/db.c M tests/Makefile.am A tests/db_sms/Makefile.am A tests/db_sms/db_sms_test.c A tests/db_sms/db_sms_test.err A tests/db_sms/db_sms_test.ok M tests/testsuite.at 8 files changed, 731 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/29/13629/3 -- To view, visit https://gerrit.osmocom.org/13629 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id94ad35b6f78f839137db2e17010fbf9b40111a3 Gerrit-Change-Number: 13629 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Max -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 16:40:28 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 16:40:28 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Initial set of OML tests Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14264 Change subject: bts: Initial set of OML tests ...................................................................... bts: Initial set of OML tests The test coverage is far incomplete, but it at least is a starting point. Related: OS#4031 Change-Id: I82bb85b684d2db3a6b1e96a68ffde03e22affa6b --- M bts/BTS_Tests.cfg A bts/BTS_Tests_OML.ttcn M bts/gen_links.sh M bts/regen_makefile.sh 4 files changed, 628 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/64/14264/1 diff --git a/bts/BTS_Tests.cfg b/bts/BTS_Tests.cfg index a7ce68d..78a288d 100644 --- a/bts/BTS_Tests.cfg +++ b/bts/BTS_Tests.cfg @@ -19,6 +19,8 @@ #BTS_Tests.mp_rsl_ip := "10.9.1.2" # office BTS_Tests.mp_rsl_ip := "192.168.100.2" # home #BTS_Tests.mp_pcu_socket := "" +#BTS_Tests_OML.mp_oml_ip := "192.168.102.239" # home +#BTS_Tests_OML.mp_oml_port := 3002 # real BTS / RF #BTS_Tests.mp_bb_trxc_port := -1 diff --git a/bts/BTS_Tests_OML.ttcn b/bts/BTS_Tests_OML.ttcn new file mode 100644 index 0000000..84d46a4 --- /dev/null +++ b/bts/BTS_Tests_OML.ttcn @@ -0,0 +1,624 @@ +module BTS_Tests_OML { + +/* Integration Tests for OsmoBTS A-bis OML (Organization & Maintenance Link) + * + * (C) 2019 by Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +import from General_Types all; +import from Osmocom_Types all; +import from AbisOML_Types all; +import from IPA_Emulation all; +import from IPA_Types all; + +const integer NUM_TRX := 8; + +type record of uint16_t ArfcnList; + +modulepar { + charstring mp_oml_ip := "127.0.0.1"; + integer mp_oml_port := 3002; + ArfcnList mp_arfcn := { 100, 101, 102, 103, 104, 105, 106, 107 }; + OML_FOM_InterfLevBoundaries mp_interf_bound := { 85, 91, 97, 103, 109, 115 }; + OML_FOM_T200 mp_t200 := { + sdcch_5ms := 30, + facch_f_5ms := 36, + facch_h_5ms := 36, + sacch_tch_sapi0_10ms := 168, + sacch_sdcch_10ms := 52, + sdcch_sapi3_5ms := 33, + sacch_rch_sapi3_10ms := 168 + }; + uint8_t mp_max_ta := 63; + uint8_t mp_load_threshold := 10; + uint8_t mp_load_ind_period := 1; + uint8_t mp_rach_b_thresh := 90; + uint16_t mp_loadavg_slots := 1000; + uint8_t mp_air_timer := 100; + uint8_t mp_ny1 := 10; + uint8_t mp_bsic := 63; +}; + +/* BSC side OML component */ +type component BSC_OML_CT { + /* IPA emulation component underneath OML */ + var IPA_Emulation_CT vc_IPA_OML; + /* Port for OML */ + port IPA_OML_PT OML; + var uint8_t g_bts_nr := 0; + + /* global test case guard timer */ + timer T_oml_guard := 60.0; +}; + +private altstep as_Tguard() runs on BSC_OML_CT { + [] T_oml_guard.timeout { + setverdict(fail, "Timeout of T_guard"); + mtc.stop; + } +} + +private altstep as_SwAct() runs on BSC_OML_CT { + var OML_PDU rx; + [] OML.receive(tr_OML_SwActReq(?, ?, ?, ?)) -> value rx { + var OML_FOM_ObjectClass obj_class := rx.u.fom.hdr.obj_class; + var OML_FOM_ObjectInstance obj_inst := rx.u.fom.hdr.obj_inst; + + /* acknowledge the activate request */ + OML.send(f_OML_make_ack(rx)); + var octetstring file_id := ''O; + var octetstring sw_desc := ''O; + + /* Request activation of software and check for ACK */ + OML.send(ts_OML_ActivateSw(obj_class, obj_inst, file_id, sw_desc)); + interleave { + [] OML.receive(tr_OML_ActivateSwACK(obj_class, obj_inst, file_id, sw_desc)); + [] OML.receive(tr_OML_SwActivatedRep(obj_class, obj_inst)); + } + repeat; + } +} + +private altstep as_IPA_evt() runs on BSC_OML_CT { + var ASP_IPA_Event evt; + [] OML.receive(ASP_IPA_Event:?) -> value evt { + log("Ignoring ", evt); + repeat; + } +} + +function f_init_oml(charstring id) runs on BSC_OML_CT { + vc_IPA_OML := IPA_Emulation_CT.create(id & "-OML-IPA"); + map(vc_IPA_OML:IPA_PORT, system:IPA_CODEC_PT); + connect(vc_IPA_OML:IPA_OML_PORT, self:OML); + vc_IPA_OML.start(IPA_Emulation.main_server(mp_oml_ip, mp_oml_port)); + + T_oml_guard.start; + activate(as_Tguard()); + + OML.receive(t_ASP_IPA_EVT_UD(ASP_IPA_EVENT_UP)); + //OML.receive(t_ASP_IPA_EVT_UD(ASP_IPA_EVENT_ID_ACK)); + + activate(as_SwAct()); + activate(as_IPA_evt()); +} + + +/* Perform an "OPSTART" procedure with the speciifed MO" */ +private function f_oml_opstart(template (value) OML_FOM_ObjectClass obj_class, + template (value) OML_FOM_ObjectInstance obj_inst, + boolean exp_fail := false) +runs on BSC_OML_CT { + OML.send(ts_OML_Opstart(obj_class, obj_inst)); + alt { + [not exp_fail] OML.receive(tr_OML_OpstartACK(obj_class, obj_inst)) { + setverdict(pass); + } + [not exp_fail] OML.receive(tr_OML_OpstartNACK(obj_class, obj_inst)) { + setverdict(fail, "Unexpected OPSTART NACK for ", obj_class, " ", obj_inst); + } + [exp_fail] OML.receive(tr_OML_OpstartACK(obj_class, obj_inst)) { + setverdict(fail, "Unexpected OPSTART ACK for ", obj_class, " ", obj_inst); + } + [exp_fail] OML.receive(tr_OML_OpstartNACK(obj_class, obj_inst)) { + setverdict(pass); + } + [] OML.receive { repeat; } + } +} + +/* Perform a "CHANGE ADMINISTRATIVE STATE" procedure with the speciifed MO" */ +private function f_oml_chg_adm_st(template (value) OML_FOM_ObjectClass obj_class, + template (value) OML_FOM_ObjectInstance obj_inst, + template (value) OML_FOM_AdministrativeState adm_st, + boolean exp_fail := false) +runs on BSC_OML_CT { + OML.send(ts_OML_ChangeAdmState(obj_class, obj_inst, adm_st)); + alt { + [not exp_fail] OML.receive(tr_OML_ChangeAdmStateACK(obj_class, obj_inst, adm_st)) { + setverdict(pass); + } + [not exp_fail] OML.receive(tr_OML_ChangeAdmStateNACK(obj_class, obj_inst)) { + setverdict(fail, "Unexpected CHANGE ADM STATE NACK for ", obj_class, " ", obj_inst); + } + [exp_fail] OML.receive(tr_OML_ChangeAdmStateACK(obj_class, obj_inst, adm_st)) { + setverdict(fail, "Unexpected CHANGE ADM STATE ACK for ", obj_class, " ", obj_inst); + } + [exp_fail] OML.receive(tr_OML_ChangeAdmStateNACK(obj_class, obj_inst)) { + setverdict(pass); + } + [] OML.receive { repeat; } + } +} + +/* Perform a "SET RADIO CARRIER ATTRIBUTES" procedure with the BTS */ +private function f_oml_radio_attr(uint8_t trx_nr) +runs on BSC_OML_CT { + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, trx_nr, 255)); + var OML_PDU cmd := valueof(ts_OML_SetRadioAttr(obj_inst, 0, {mp_arfcn[trx_nr]})); + var template OML_PDU exp_ack := f_OML_make_ack_exp(cmd); + var template OML_PDU exp_nack := f_OML_make_nack_exp(cmd, ?); + var OML_PDU rx; + + OML.send(cmd); + alt { + [] OML.receive(exp_ack) -> value rx { + setverdict(pass); + } + [] OML.receive(exp_nack) -> value rx { + setverdict(fail, "SET RADIO CARRIER ATTRIBUTES NACK ", exp_nack); + } + [] OML.receive(tr_OML_MsgType(NM_MT_SET_RADIO_ATTR_ACK, NM_OC_RADIO_CARRIER, obj_inst, omit)) { + setverdict(fail, "SET RADIO CARRIER ATTRIBUTES ACK without IEs"); + } + [] OML.receive { repeat; } + } +} + +/* Perform a "SET CHANNEL ATTRIBUTES" procedure with the BTS */ +private function f_oml_ts_attr(uint8_t trx_nr, uint8_t ts_nr) +runs on BSC_OML_CT { + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, trx_nr, ts_nr)); + var OML_PDU cmd := valueof(ts_OML_SetChanAttr(obj_inst, NM_CHANC_TCHFull, tsc := 7)); + var template OML_PDU exp_ack := f_OML_make_ack_exp(cmd); + var template OML_PDU exp_nack := f_OML_make_nack_exp(cmd, ?); + var OML_PDU rx; + + OML.send(cmd); + alt { + [] OML.receive(exp_ack) -> value rx { + setverdict(pass); + } + [] OML.receive(exp_nack) -> value rx { + setverdict(fail, "SET CHANNEL ATTRIBUTES NACK ", exp_nack); + } + [] OML.receive(tr_OML_MsgType(NM_MT_SET_CHAN_ATTR_ACK, NM_OC_CHANNEL, obj_inst, omit)) { + setverdict(fail, "SET CHANNEL ATTRIBUTES ACK without IEs"); + } + [] OML.receive { repeat; } + } + +} + +/* Perform a "SET BTS ATTRIBUTES" procedure with the BTS */ +private function f_oml_bts_attr() +runs on BSC_OML_CT { + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, 255, 255)); + var template (value) OML_FOM_IE_List ies := { + ts_OML_IE(NM_ATT_INTERF_BOUND, OML_FOM_IE_Body:{interf_bound:=mp_interf_bound}), + ts_OML_IE(NM_ATT_BCCH_ARFCN, OML_FOM_IE_Body:{bcch_arfcn:=mp_arfcn[0]}), + ts_OML_IE(NM_ATT_CONN_FAIL_CRIT, OML_FOM_IE_Body:{other := ts_OML_IE_L16V(2, '0120'O)}), + ts_OML_IE(NM_ATT_T200, OML_FOM_IE_Body:{t200 := mp_t200}), + ts_OML_IE(NM_ATT_MAX_TA, OML_FOM_IE_Body:{max_ta := mp_max_ta}), + ts_OML_IE(NM_ATT_OVERL_PERIOD, OML_FOM_IE_Body:{other := ts_OML_IE_L16V(1, '0a'O)}), + ts_OML_IE(NM_ATT_CCCH_L_T, OML_FOM_IE_Body:{load_threshold := mp_load_threshold}), + ts_OML_IE(NM_ATT_CCCH_L_I_P, OML_FOM_IE_Body:{load_ind_period := mp_load_ind_period}), + ts_OML_IE(NM_ATT_RACH_B_THRESH, OML_FOM_IE_Body:{rach_b_thresh := mp_rach_b_thresh}), + ts_OML_IE(NM_ATT_LDAVG_SLOTS, OML_FOM_IE_Body:{loadavg_slots := mp_loadavg_slots}), + ts_OML_IE(NM_ATT_BTS_AIR_TIMER, OML_FOM_IE_Body:{air_timer := mp_air_timer}), + ts_OML_IE(NM_ATT_NY1, OML_FOM_IE_Body:{ny1 := mp_ny1}), + ts_OML_IE(NM_ATT_BSIC, OML_FOM_IE_Body:{bsic := mp_bsic}) + //ts_OML_IE(NM_ATT_IPACC_CGI, ...) + }; + var OML_PDU cmd := valueof(ts_OML_SetBtsAttr(obj_inst, ies)); + var template OML_PDU exp_ack := f_OML_make_ack_exp(cmd); + var template OML_PDU exp_nack := f_OML_make_nack_exp(cmd, ?); + var OML_PDU rx; + + OML.send(cmd); + alt { + [] OML.receive(exp_ack) -> value rx { + setverdict(pass); + } + [] OML.receive(exp_nack) -> value rx { + setverdict(fail, "SET BTS ATTRIBUTES NACK ", exp_nack); + } + + [] OML.receive(tr_OML_MsgType(NM_MT_SET_BTS_ATTR_ACK, NM_OC_BTS, obj_inst, omit)) { + setverdict(fail, "SET BTS ATTRIBUTES ACK without IEs"); + } + [] OML.receive { repeat; } + } +} + +/* Send an OML message and expect no response at all */ +private function f_oml_send_exp_no_resp(template (value) OML_PDU tx, charstring err_msg, + float tout := 5.0) runs on BSC_OML_CT +{ + timer T := 5.0; + + OML.send(tx); + T.start; + alt { + [] OML.receive { + setverdict(fail, err_msg); + } + [] T.timeout { + setverdict(pass); + } + } +} + +private function f_oml_exp_rx(template OML_PDU exp_rx, charstring err_msg) runs on BSC_OML_CT +{ + timer T := 5.0; + T.start; + alt { + [] OML.receive(exp_rx) { + setverdict(pass); + } + [] OML.receive { repeat; } + [] T.timeout { + setverdict(fail, "Timeout waiting for ", err_msg); + } + } +} + +/* Send an OML message and expect a failure event report in response */ +private function f_oml_send_exp_fail_rep(template (value) OML_PDU tx, charstring err_msg, + template OML_FOM_EventType evt := ?, + template OML_FOM_Severity severity := ?, + template OML_FOM_ProbableCause cause := ?, + float tout := 5.0) runs on BSC_OML_CT +{ + var template OML_FOM_ObjectClass obj_class := ?; + var template OML_FOM_ObjectInstance obj_inst := ?; + if (ischosen(tx.u.fom)) { + obj_class := tx.u.fom.hdr.obj_class; + obj_inst := tx.u.fom.hdr.obj_inst; + } + var template OML_PDU exp_fail := tr_OML_FailureEvtRep(obj_class,obj_inst, evt, severity, cause); + + OML.send(tx); + f_oml_exp_rx(exp_fail, "Failure Event Report"); +} + +/* Send an OML message and expect it to be NACKed with specified cause */ +private function f_oml_send_exp_nack(template (value) OML_PDU tx, template OML_FOM_NackCause exp_cause, + float tout := 5.0) runs on BSC_OML_CT +{ + timer T := 5.0; + + var template OML_PDU exp_nack := f_OML_make_nack_exp(valueof(tx), exp_cause); + var template OML_PDU exp_ack := f_OML_make_ack_exp(valueof(tx)); + var OML_PDU rx; + + OML.send(tx); + T.start; + alt { + [] OML.receive(exp_ack) -> value rx { + setverdict(fail, "Unexpected ACK ", rx); + } + [] OML.receive(exp_nack) -> value rx { + setverdict(pass); + } + [] OML.receive { repeat; } + [] T.timeout { + setverdict(fail, "Timeout waiting for NACK ", exp_nack); + } + } +} + + + + + + +testcase TC_oml_selftest() runs on BSC_OML_CT { + const octetstring state_chg_bts := '8080000d610100ffff'O & '2401'O & '07000107'O & '0401'O; + const octetstring set_attr_bts := '80800033410100ffff19555b61676d7318060e00020110331e2424a83421a81f3f2500010a0c1e0b642a0a2b03e80a80230a08007b0920'O + const octetstring set_attr_radio := '8080000c44020000ff2d00050002007b'O; + const octetstring set_attr_ts0 := '8080000947030000000d074000'O; + const octetstring ipa_rsl_connect := '1080000a0d636f6d2e697061636365737300e0040000ff8500810bbb'O; + + log(dec_OML_PDU(state_chg_bts)); + log(dec_OML_PDU(set_attr_bts)); + log(dec_OML_PDU(set_attr_radio)); + log(dec_OML_PDU(set_attr_ts0)); + log(dec_OML_PDU(ipa_rsl_connect)); +}; + +testcase TC_oml_nothing() runs on BSC_OML_CT { + f_init_oml(testcasename()); + f_sleep(100.0); +} + +/* test behavior for unsupported message discriminator */ +testcase TC_wrong_mdisc() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + var OML_PDU mmi_pdu := { + mdisc := ABIS_OM_MDISC_MMI, + placement := ABIS_OM_PLACEMENT_ONLY, + sequence := 0, + u := { + other := '01020304'O + } + }; + + f_oml_send_exp_fail_rep(mmi_pdu, "Unexpected response to MMI message"); +} + +/* send a message of unknown/unsupported type */ +testcase TC_wrong_msgtype() runs on BSC_OML_CT { + f_init_oml(testcasename()); + var OML_PDU tx := valueof(ts_OML_MsgType(NM_MT_ESTABLISH_TEI, NM_OC_BTS, + ts_OML_ObjectInstance(0, 255, 255), omit)); + f_oml_send_exp_fail_rep(tx, "ESTABLISH_TEI"); +} + +/* send message shorter than OML header length indicates */ +testcase TC_short_length() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + /* Send "Change Adm State (Locked) to BTS, but with length 09 instead of 07 */ + OML.send('80800009690100ffff0401'O); + + template OML_PDU exp_fail := tr_OML_FailureEvtRep(NM_OC_BTS, + ts_OML_ObjectInstance(0, 255, 255), + ?, ?, ?); + f_oml_exp_rx(exp_fail, "Failure Event Report"); +} + +/* send message longer than OML header length indicates */ +testcase TC_long_length() runs on BSC_OML_CT { + f_init_oml(testcasename()); + /* Send "Change Adm State (Locked) to BTS, but with two extra bytes at the end */ + OML.send('80800007690100ffff04010402'O); + + template OML_PDU exp := + tr_OML_ChangeAdmStateACK(NM_OC_BTS, ts_OML_ObjectInstance(0, 255, 255), + NM_STATE_LOCKED); + f_oml_exp_rx(exp, "Change ADM State ACK"); +} + +/* test behavior for unsupported placement (!= ONLY) */ +testcase TC_wrong_placement() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + var OML_FOM_ObjectClass obj_class := NM_OC_BTS + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, 255, 255)); + + var OML_PDU pdu := valueof(ts_OML_ChangeAdmState(obj_class, obj_inst, NM_STATE_LOCKED)); + + pdu.placement := ABIS_OM_PLACEMENT_FIRST; + f_oml_send_exp_fail_rep(pdu, "Unexpected response to PLACEMENT_FIRST"); + + pdu.placement := ABIS_OM_PLACEMENT_MIDDLE; + f_oml_send_exp_fail_rep(pdu, "Unexpected response to PLACEMENT_MIDDLE"); + + pdu.placement := ABIS_OM_PLACEMENT_LAST; + f_oml_send_exp_fail_rep(pdu, "Unexpected response to PLACEMENT_LAST"); +} + +/* test behavior for sequence != 0 (invalid if mdisc == ONLY) */ +testcase TC_wrong_seq() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + var OML_FOM_ObjectClass obj_class := NM_OC_BTS; + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, 255, 255)); + var OML_PDU pdu := valueof(ts_OML_ChangeAdmState(obj_class, obj_inst, NM_STATE_LOCKED)); + + OML.clear; + + pdu.sequence := 23; + f_oml_send_exp_fail_rep(pdu, "Unexpected response to sequence != 0"); +} + +/* test behavior for unsupported obj_class */ +testcase TC_wrong_obj_class() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + var OML_FOM_ObjectClass obj_class := NM_OC_BTS; + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, 255, 255)); + var OML_PDU pdu := valueof(ts_OML_ChangeAdmState(obj_class, obj_inst, NM_STATE_LOCKED)); + pdu.u.fom.hdr.obj_class := NM_OC_NULL; + + /* NM_NACK_OBJCLASS_INVAL */ + f_oml_send_exp_nack(pdu, NM_NACK_OBJCLASS_NOTSUPP); +} + +/* test behavior for wrong BTS number in object instance */ +testcase TC_wrong_bts_nr() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + var OML_FOM_ObjectClass obj_class := NM_OC_BTS; + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(250, 255, 255)); + var OML_PDU pdu := valueof(ts_OML_ChangeAdmState(obj_class, obj_inst, NM_STATE_LOCKED)); + + f_oml_send_exp_nack(pdu, NM_NACK_BTSNR_UNKN); +} + +/* test behavior for wrong TRX number in object instance */ +testcase TC_wrong_trx_nr() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + var OML_FOM_ObjectClass obj_class := NM_OC_RADIO_CARRIER; + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, 250, 255)); + var OML_PDU pdu := valueof(ts_OML_ChangeAdmState(obj_class, obj_inst, NM_STATE_LOCKED)); + + f_oml_send_exp_nack(pdu, NM_NACK_TRXNR_UNKN); +} + +/* test behavior for wrong TS number in object instance */ +testcase TC_wrong_ts_nr() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + var OML_FOM_ObjectClass obj_class := NM_OC_RADIO_CARRIER; + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, 0, 250)); + var OML_PDU pdu := valueof(ts_OML_ChangeAdmState(obj_class, obj_inst, NM_STATE_LOCKED)); + + f_oml_send_exp_nack(pdu, NM_NACK_OBJINST_UNKN); +} + +/* RADIO CARRIER: Test OPSTART with SET BTS ATTRIBUTES; expect ACK */ +testcase TC_radio_carrier_opstart() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + var OML_FOM_ObjectClass obj_class := NM_OC_RADIO_CARRIER; + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, 0, 255)); + + f_oml_radio_attr(0); + f_oml_opstart(obj_class, obj_inst); +} + +/* RADIO CARRIER: Test OPSTART without SET BTS ATTRIBUTES; expect NACK */ +testcase TC_radio_carrier_opstart_noattr() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + var OML_FOM_ObjectClass obj_class := NM_OC_RADIO_CARRIER; + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, 0, 255)); + + /* we are *not* setting any attributes here */ + f_oml_opstart(obj_class, obj_inst, exp_fail := true); +} + + +/* BTS: Test OPSTART after SET BTS ATTRIBUTES; expect ACK */ +testcase TC_bts_opstart() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + var OML_FOM_ObjectClass obj_class := NM_OC_BTS; + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, 255, 255)); + + f_oml_bts_attr(); + f_oml_opstart(obj_class, obj_inst); +} + + +/* BTS: Test OPSTART without SET BTS ATTRIBUTES; expect NACK */ +testcase TC_bts_opstart_noattr() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + var OML_FOM_ObjectClass obj_class := NM_OC_BTS; + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, 255, 255)); + + /* we are *not* setting any attributes here */ + f_oml_opstart(obj_class, obj_inst, exp_fail := true); +} + +/* CHANNEL: Test OPSTART after SET CHANNEL ATTRIBUTES; expect ACK */ +testcase TC_ts_opstart() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + var OML_FOM_ObjectClass obj_class := NM_OC_CHANNEL; + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, 0, 1)); + + f_oml_ts_attr(trx_nr := 0, ts_nr := 1); + f_oml_opstart(obj_class, obj_inst); +} + + +/* CHANNEL: Test OPSTART without SET CHANNEL ATTRIBUTES; expect NACK */ +testcase TC_ts_opstart_noattr() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + var OML_FOM_ObjectClass obj_class := NM_OC_CHANNEL; + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, 0, 1)); + + /* we are *not* setting any attributes here */ + f_oml_opstart(obj_class, obj_inst, exp_fail := true); +} + +/* Ensure the initial Event State Change Reports after OML connect match our expectation */ +testcase TC_initial_state_reports() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + interleave { + [] OML.receive(tr_OML_StateChgEvtRep(NM_OC_SITE_MANAGER, ts_OML_ObjectInstance(255, 255, 255), + NM_OPSTATE_ENABLED, NM_AVSTATE_OK)); + [] OML.receive(tr_OML_StateChgEvtRep(NM_OC_BTS, ts_OML_ObjectInstance(0, 255, 255), + NM_OPSTATE_DISABLED, NM_AVSTATE_DEPENDENCY)); + [] OML.receive(tr_OML_StateChgEvtRep(NM_OC_BTS, ts_OML_ObjectInstance(0, 255, 255), + NM_OPSTATE_DISABLED, NM_AVSTATE_DEPENDENCY)); + } +} + + +control { + execute( TC_wrong_mdisc() ); + execute( TC_wrong_msgtype() ); + execute( TC_short_length() ); + execute( TC_long_length() ); + execute( TC_wrong_placement() ); + execute( TC_wrong_seq() ); + execute( TC_wrong_obj_class() ); + execute( TC_wrong_bts_nr() ); + execute( TC_wrong_trx_nr() ); + execute( TC_radio_carrier_opstart_noattr() ); + execute( TC_bts_opstart() ); + execute( TC_bts_opstart_noattr() ); + execute( TC_ts_opstart() ); + execute( TC_ts_opstart_noattr() ); + execute( TC_initial_state_reports() ); +} + +/* BTS: + * - Evt: Disabled/Locked + * - SW ACT + * - Evt: Disabled/Dependency + * - SET BTS ATTR + * - Opstart + * - Chg Adm State Unlocked + * - Evt: Disabled/Dependency/Unlocked + * - Evt: Enabled/0 (after last channel unlocked?) + */ + +/* Radio Carrier: + * - Evt: Disabled/Offline after SW ACT + * - Set Radio Carrier Attributes ? (->NACL) + * - Evt: Disabled/Dependency + * - Set Radio Carrier Attributes ? + * - Opstart + * - Chg Adm State Unlocked + * - Evt: + */ + +/* Baseband Transceiver: + * - Evt: Disabled/Locked + * - SW Activation + * - Evt: Disabled/Dependency after SW ACT + * - IPA RSL Connect + * - Opstart + * - Chg Admin Unlocked + * - Evt: Disabled/Dependency/Unlocked + */ + +/* Channel: + * - Evt: Not Installed/Locked + * - Evt: Disabled/Dependency (after SW ACT Rep on BB Transc) + * - Set Channel Attr + * - Opstart + * - Evt: Disabled/Offline + * - Chg Admin Unlocked + * - Evt: Disabled/OK/Unlocked + * - Evt: Enabled/OK (after BB TRANSC Opstart) + */ + +}; diff --git a/bts/gen_links.sh b/bts/gen_links.sh index 2a07f16..aafe231 100755 --- a/bts/gen_links.sh +++ b/bts/gen_links.sh @@ -36,7 +36,7 @@ FILES="Misc_Helpers.ttcn General_Types.ttcn GSM_Types.ttcn GSM_RR_Types.ttcn Osmocom_VTY_Functions.ttcn GSM_SystemInformation.ttcn Osmocom_Types.ttcn RLCMAC_Types.ttcn RLCMAC_CSN1_Types.ttcn RLCMAC_EncDec.cc L1CTL_Types.ttcn L1CTL_PortType.ttcn L1CTL_PortType_CtrlFunct.ttcn L1CTL_PortType_CtrlFunctDef.cc LAPDm_RAW_PT.ttcn LAPDm_Types.ttcn " #FILES+="NS_Emulation.ttcn NS_CodecPort.ttcn NS_CodecPort_CtrlFunct.ttcn NS_CodecPort_CtrlFunctDef.cc " #FILES+="BSSGP_Emulation.ttcn Osmocom_Gb_Types.ttcn " -FILES+="IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp IPA_CodecPort.ttcn RSL_Types.ttcn RSL_Emulation.ttcn " +FILES+="IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp IPA_CodecPort.ttcn RSL_Types.ttcn RSL_Emulation.ttcn AbisOML_Types.ttcn " FILES+="Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn " FILES+="L3_Templates.ttcn L3_Common.ttcn " FILES+="Native_Functions.ttcn Native_FunctionDefs.cc " diff --git a/bts/regen_makefile.sh b/bts/regen_makefile.sh index 9ed5a06..c912da8 100755 --- a/bts/regen_makefile.sh +++ b/bts/regen_makefile.sh @@ -2,6 +2,6 @@ FILES="*.ttcn *.ttcnpp IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc UD_PT.cc RLCMAC_EncDec.cc Native_FunctionDefs.cc TRXC_CodecPort_CtrlFunctDef.cc L1CTL_PortType_CtrlFunctDef.cc TELNETasp_PT.cc" -export CPPFLAGS_TTCN3="-DIPA_EMULATION_RSL" +export CPPFLAGS_TTCN3="-DIPA_EMULATION_RSL -DIPA_EMULATION_OML" ../regen-makefile.sh BTS_Tests.ttcn $FILES -- To view, visit https://gerrit.osmocom.org/14264 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I82bb85b684d2db3a6b1e96a68ffde03e22affa6b Gerrit-Change-Number: 14264 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 17:08:38 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 29 May 2019 17:08:38 +0000 Subject: Change in osmo-ggsn[master]: ggsn: Drop unused param force in apn_stop() Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14265 Change subject: ggsn: Drop unused param force in apn_stop() ...................................................................... ggsn: Drop unused param force in apn_stop() Change-Id: I920679c7062d480c1cfaa3d89c90a0ed4a2ef58b --- M ggsn/ggsn.c M ggsn/ggsn.h M ggsn/ggsn_vty.c 3 files changed, 12 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/65/14265/1 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index d700933..5fd906b 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -111,9 +111,9 @@ } } -int apn_stop(struct apn_ctx *apn, bool force) +int apn_stop(struct apn_ctx *apn) { - LOGPAPN(LOGL_NOTICE, apn, "%sStopping\n", force ? "FORCED " : ""); + LOGPAPN(LOGL_NOTICE, apn, "Stopping\n"); /* check if pools have any active PDP contexts and bail out */ pool_close_all_pdp(apn->v4.pool); pool_close_all_pdp(apn->v6.pool); @@ -223,7 +223,7 @@ LOGPAPN(LOGL_INFO, apn, "Opening Kernel GTP device %s\n", apn->tun.cfg.dev_name); if (apn->cfg.apn_type_mask & (APN_TYPE_IPv6|APN_TYPE_IPv4v6)) { LOGPAPN(LOGL_ERROR, apn, "Kernel GTP currently supports only IPv4\n"); - apn_stop(apn, false); + apn_stop(apn); return -1; } if (gsn == NULL) { @@ -257,7 +257,7 @@ apn->v4.cfg.ifconfig_prefix.prefixlen)) { LOGPAPN(LOGL_ERROR, apn, "Failed to set tun IPv4 address %s: %s\n", in46p_ntoa(&apn->v4.cfg.ifconfig_prefix), strerror(errno)); - apn_stop(apn, false); + apn_stop(apn); return -1; } } @@ -270,7 +270,7 @@ LOGPAPN(LOGL_ERROR, apn, "Failed to set tun IPv6 address %s: %s. " "Ensure you have ipv6 support and not used the disable_ipv6 sysctl?\n", in46p_ntoa(&apn->v6.cfg.ifconfig_prefix), strerror(errno)); - apn_stop(apn, false); + apn_stop(apn); return -1; } } @@ -283,7 +283,7 @@ LOGPAPN(LOGL_ERROR, apn, "Failed to set tun IPv6 link-local address %s: %s. " "Ensure you have ipv6 support and not used the disable_ipv6 sysctl?\n", in46p_ntoa(&apn->v6.cfg.ll_prefix), strerror(errno)); - apn_stop(apn, false); + apn_stop(apn); return -1; } apn->v6_lladdr = apn->v6.cfg.ll_prefix.addr.v6; @@ -301,7 +301,7 @@ if (rc < 1) { LOGPAPN(LOGL_ERROR, apn, "Cannot obtain IPv6 link-local address of interface: %s\n", rc ? strerror(errno) : "tun interface has no link-local IP assigned"); - apn_stop(apn, false); + apn_stop(apn); return -1; } apn->v6_lladdr = ipv6_tun_linklocal_ip.addr.v6; @@ -318,7 +318,7 @@ blacklist, blacklist_size)) { LOGPAPN(LOGL_ERROR, apn, "Failed to create IPv4 pool\n"); talloc_free(blacklist); - apn_stop(apn, false); + apn_stop(apn); return -1; } talloc_free(blacklist); @@ -335,7 +335,7 @@ blacklist, blacklist_size)) { LOGPAPN(LOGL_ERROR, apn, "Failed to create IPv6 pool\n"); talloc_free(blacklist); - apn_stop(apn, false); + apn_stop(apn); return -1; } talloc_free(blacklist); @@ -1056,7 +1056,7 @@ /* iterate over all APNs and stop them */ llist_for_each_entry(apn, &ggsn->apn_list, list) - apn_stop(apn, true); + apn_stop(apn); osmo_timer_del(&ggsn->gtp_timer); diff --git a/ggsn/ggsn.h b/ggsn/ggsn.h index e252548..09cd0f6 100644 --- a/ggsn/ggsn.h +++ b/ggsn/ggsn.h @@ -140,4 +140,4 @@ extern int ggsn_start(struct ggsn_ctx *ggsn); extern int ggsn_stop(struct ggsn_ctx *ggsn); extern int apn_start(struct apn_ctx *apn); -extern int apn_stop(struct apn_ctx *apn, bool force); +extern int apn_stop(struct apn_ctx *apn); diff --git a/ggsn/ggsn_vty.c b/ggsn/ggsn_vty.c index c6dc0d9..3f012d2 100644 --- a/ggsn/ggsn_vty.c +++ b/ggsn/ggsn_vty.c @@ -604,7 +604,7 @@ struct apn_ctx *apn = (struct apn_ctx *) vty->index; if (!apn->cfg.shutdown) { - if (apn_stop(apn, false)) { + if (apn_stop(apn)) { vty_out(vty, "%% Failed to Stop APN%s", VTY_NEWLINE); return CMD_WARNING; } -- To view, visit https://gerrit.osmocom.org/14265 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I920679c7062d480c1cfaa3d89c90a0ed4a2ef58b Gerrit-Change-Number: 14265 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 18:15:29 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 18:15:29 +0000 Subject: Change in osmo-remsim[master]: doc: Describe how to obtains PC/SC reader string names Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14266 Change subject: doc: Describe how to obtains PC/SC reader string names ...................................................................... doc: Describe how to obtains PC/SC reader string names Change-Id: Ic99d9561281080c6865f512c2b819cf6cfc7a1e2 --- M doc/manuals/chapters/remsim-bankd.adoc 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/66/14266/1 diff --git a/doc/manuals/chapters/remsim-bankd.adoc b/doc/manuals/chapters/remsim-bankd.adoc index 317abf4..be9b2c0 100644 --- a/doc/manuals/chapters/remsim-bankd.adoc +++ b/doc/manuals/chapters/remsim-bankd.adoc @@ -106,3 +106,15 @@ "1","3","ACS ACR33 ICC Reader 00 03" "1","4","ACS ACR33 ICC Reader 00 04" ---- + +You can obtain the exact string to use as PC/SC reader name from the output of the +`pcsc_scan` utility (part of pcsc-lite package). The tool will produce output like: + +.Example: Output of `pcsc_scan` utility on a system with a single reader installed +---- +Scanning present readers... +0: Alcor Micro AU9560 00 00 +---- + +In this example, there's only a single PC/SC reader available, and it has a string of +"Alcor Micro AU9560 00 00" whcih needs to be copy-pasted into the CSV file. -- To view, visit https://gerrit.osmocom.org/14266 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ic99d9561281080c6865f512c2b819cf6cfc7a1e2 Gerrit-Change-Number: 14266 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 18:17:34 2019 From: gerrit-no-reply at lists.osmocom.org (roh) Date: Wed, 29 May 2019 18:17:34 +0000 Subject: Change in osmo-remsim[master]: osmo-remsim-client: add systemd service script template and etc/defau... Message-ID: roh has uploaded this change for review. ( https://gerrit.osmocom.org/14267 Change subject: osmo-remsim-client: add systemd service script template and etc/default config ...................................................................... osmo-remsim-client: add systemd service script template and etc/default config Change-Id: I243f3d8e090d49ca3a1d0a8cf568750b76273c03 --- A contrib/etc_default/osmo-remsim-client A contrib/systemd/osmo-remsim-client_.service 2 files changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/67/14267/1 diff --git a/contrib/etc_default/osmo-remsim-client b/contrib/etc_default/osmo-remsim-client new file mode 100644 index 0000000..23621de --- /dev/null +++ b/contrib/etc_default/osmo-remsim-client @@ -0,0 +1,5 @@ +# Default settings for osmo-remsim-client This file is sourced by systemd + +# (global) Options to pass to osmo-remsim-client +CLIENT_OPTS="-s 10.9.99.10 -V 1d50 -P 4004 -C 1" + diff --git a/contrib/systemd/osmo-remsim-client_.service b/contrib/systemd/osmo-remsim-client_.service new file mode 100644 index 0000000..e7129c2 --- /dev/null +++ b/contrib/systemd/osmo-remsim-client_.service @@ -0,0 +1,13 @@ +[Unit] +Description=Osmocom Remote SIM Client + +[Service] +Type=simple +Restart=always +EnvironmentFile=/etc/default/osmo-remsim-client +ExecStart=/usr/bin/osmo-remsim-client-st2 $CLIENT_OPTS -I 0 -H 2-1.1 -c 0 +RestartSec=2 + +[Install] +WantedBy=multi-user.target + -- To view, visit https://gerrit.osmocom.org/14267 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I243f3d8e090d49ca3a1d0a8cf568750b76273c03 Gerrit-Change-Number: 14267 Gerrit-PatchSet: 1 Gerrit-Owner: roh -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 18:24:44 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 18:24:44 +0000 Subject: Change in osmo-remsim[master]: osmo-remsim-client: add systemd service script template and etc/defau... In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14267 ) Change subject: osmo-remsim-client: add systemd service script template and etc/default config ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/14267/1/contrib/systemd/osmo-remsim-client_.service File contrib/systemd/osmo-remsim-client_.service: https://gerrit.osmocom.org/#/c/14267/1/contrib/systemd/osmo-remsim-client_.service at 8 PS1, Line 8: 2-1.1 wouldn't that mandate that it is attached at a certain position in the bus? -- To view, visit https://gerrit.osmocom.org/14267 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I243f3d8e090d49ca3a1d0a8cf568750b76273c03 Gerrit-Change-Number: 14267 Gerrit-PatchSet: 1 Gerrit-Owner: roh Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Harald Welte Gerrit-Comment-Date: Wed, 29 May 2019 18:24:44 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 18:25:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 18:25:18 +0000 Subject: Change in osmo-remsim[master]: doc: Describe how to obtains PC/SC reader string names In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14266 ) Change subject: doc: Describe how to obtains PC/SC reader string names ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14266 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic99d9561281080c6865f512c2b819cf6cfc7a1e2 Gerrit-Change-Number: 14266 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 29 May 2019 18:25:18 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 18:25:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 18:25:19 +0000 Subject: Change in osmo-remsim[master]: doc: Describe how to obtains PC/SC reader string names In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14266 ) Change subject: doc: Describe how to obtains PC/SC reader string names ...................................................................... doc: Describe how to obtains PC/SC reader string names Change-Id: Ic99d9561281080c6865f512c2b819cf6cfc7a1e2 --- M doc/manuals/chapters/remsim-bankd.adoc 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/doc/manuals/chapters/remsim-bankd.adoc b/doc/manuals/chapters/remsim-bankd.adoc index 317abf4..be9b2c0 100644 --- a/doc/manuals/chapters/remsim-bankd.adoc +++ b/doc/manuals/chapters/remsim-bankd.adoc @@ -106,3 +106,15 @@ "1","3","ACS ACR33 ICC Reader 00 03" "1","4","ACS ACR33 ICC Reader 00 04" ---- + +You can obtain the exact string to use as PC/SC reader name from the output of the +`pcsc_scan` utility (part of pcsc-lite package). The tool will produce output like: + +.Example: Output of `pcsc_scan` utility on a system with a single reader installed +---- +Scanning present readers... +0: Alcor Micro AU9560 00 00 +---- + +In this example, there's only a single PC/SC reader available, and it has a string of +"Alcor Micro AU9560 00 00" whcih needs to be copy-pasted into the CSV file. -- To view, visit https://gerrit.osmocom.org/14266 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ic99d9561281080c6865f512c2b819cf6cfc7a1e2 Gerrit-Change-Number: 14266 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 18:25:58 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 18:25:58 +0000 Subject: Change in osmo-ggsn[master]: ggsn: Drop unused param force in apn_stop() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14265 ) Change subject: ggsn: Drop unused param force in apn_stop() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14265 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I920679c7062d480c1cfaa3d89c90a0ed4a2ef58b Gerrit-Change-Number: 14265 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 29 May 2019 18:25:58 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 18:25:59 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 18:25:59 +0000 Subject: Change in osmo-ggsn[master]: ggsn: Drop unused param force in apn_stop() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14265 ) Change subject: ggsn: Drop unused param force in apn_stop() ...................................................................... ggsn: Drop unused param force in apn_stop() Change-Id: I920679c7062d480c1cfaa3d89c90a0ed4a2ef58b --- M ggsn/ggsn.c M ggsn/ggsn.h M ggsn/ggsn_vty.c 3 files changed, 12 insertions(+), 12 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index bd8647f..6306924 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -111,9 +111,9 @@ } } -int apn_stop(struct apn_ctx *apn, bool force) +int apn_stop(struct apn_ctx *apn) { - LOGPAPN(LOGL_NOTICE, apn, "%sStopping\n", force ? "FORCED " : ""); + LOGPAPN(LOGL_NOTICE, apn, "Stopping\n"); /* check if pools have any active PDP contexts and bail out */ pool_close_all_pdp(apn->v4.pool); pool_close_all_pdp(apn->v6.pool); @@ -223,7 +223,7 @@ LOGPAPN(LOGL_INFO, apn, "Opening Kernel GTP device %s\n", apn->tun.cfg.dev_name); if (apn->cfg.apn_type_mask & (APN_TYPE_IPv6|APN_TYPE_IPv4v6)) { LOGPAPN(LOGL_ERROR, apn, "Kernel GTP currently supports only IPv4\n"); - apn_stop(apn, false); + apn_stop(apn); return -1; } if (gsn == NULL) { @@ -257,7 +257,7 @@ apn->v4.cfg.ifconfig_prefix.prefixlen)) { LOGPAPN(LOGL_ERROR, apn, "Failed to set tun IPv4 address %s: %s\n", in46p_ntoa(&apn->v4.cfg.ifconfig_prefix), strerror(errno)); - apn_stop(apn, false); + apn_stop(apn); return -1; } } @@ -270,7 +270,7 @@ LOGPAPN(LOGL_ERROR, apn, "Failed to set tun IPv6 address %s: %s. " "Ensure you have ipv6 support and not used the disable_ipv6 sysctl?\n", in46p_ntoa(&apn->v6.cfg.ifconfig_prefix), strerror(errno)); - apn_stop(apn, false); + apn_stop(apn); return -1; } } @@ -283,7 +283,7 @@ LOGPAPN(LOGL_ERROR, apn, "Failed to set tun IPv6 link-local address %s: %s. " "Ensure you have ipv6 support and not used the disable_ipv6 sysctl?\n", in46p_ntoa(&apn->v6.cfg.ll_prefix), strerror(errno)); - apn_stop(apn, false); + apn_stop(apn); return -1; } apn->v6_lladdr = apn->v6.cfg.ll_prefix.addr.v6; @@ -301,7 +301,7 @@ if (rc < 1) { LOGPAPN(LOGL_ERROR, apn, "Cannot obtain IPv6 link-local address of interface: %s\n", rc ? strerror(errno) : "tun interface has no link-local IP assigned"); - apn_stop(apn, false); + apn_stop(apn); return -1; } apn->v6_lladdr = ipv6_tun_linklocal_ip.addr.v6; @@ -318,7 +318,7 @@ blacklist, blacklist_size)) { LOGPAPN(LOGL_ERROR, apn, "Failed to create IPv4 pool\n"); talloc_free(blacklist); - apn_stop(apn, false); + apn_stop(apn); return -1; } talloc_free(blacklist); @@ -335,7 +335,7 @@ blacklist, blacklist_size)) { LOGPAPN(LOGL_ERROR, apn, "Failed to create IPv6 pool\n"); talloc_free(blacklist); - apn_stop(apn, false); + apn_stop(apn); return -1; } talloc_free(blacklist); @@ -1046,7 +1046,7 @@ /* iterate over all APNs and stop them */ llist_for_each_entry(apn, &ggsn->apn_list, list) - apn_stop(apn, true); + apn_stop(apn); osmo_timer_del(&ggsn->gtp_timer); diff --git a/ggsn/ggsn.h b/ggsn/ggsn.h index e252548..09cd0f6 100644 --- a/ggsn/ggsn.h +++ b/ggsn/ggsn.h @@ -140,4 +140,4 @@ extern int ggsn_start(struct ggsn_ctx *ggsn); extern int ggsn_stop(struct ggsn_ctx *ggsn); extern int apn_start(struct apn_ctx *apn); -extern int apn_stop(struct apn_ctx *apn, bool force); +extern int apn_stop(struct apn_ctx *apn); diff --git a/ggsn/ggsn_vty.c b/ggsn/ggsn_vty.c index c6dc0d9..3f012d2 100644 --- a/ggsn/ggsn_vty.c +++ b/ggsn/ggsn_vty.c @@ -604,7 +604,7 @@ struct apn_ctx *apn = (struct apn_ctx *) vty->index; if (!apn->cfg.shutdown) { - if (apn_stop(apn, false)) { + if (apn_stop(apn)) { vty_out(vty, "%% Failed to Stop APN%s", VTY_NEWLINE); return CMD_WARNING; } -- To view, visit https://gerrit.osmocom.org/14265 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I920679c7062d480c1cfaa3d89c90a0ed4a2ef58b Gerrit-Change-Number: 14265 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 19:10:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 19:10:19 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Initial set of OML tests In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14264 ) Change subject: bts: Initial set of OML tests ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14264 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I82bb85b684d2db3a6b1e96a68ffde03e22affa6b Gerrit-Change-Number: 14264 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Wed, 29 May 2019 19:10:19 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 19:10:21 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 19:10:21 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Initial set of OML tests In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14264 ) Change subject: bts: Initial set of OML tests ...................................................................... bts: Initial set of OML tests The test coverage is far incomplete, but it at least is a starting point. Related: OS#4031 Change-Id: I82bb85b684d2db3a6b1e96a68ffde03e22affa6b --- M bts/BTS_Tests.cfg A bts/BTS_Tests_OML.ttcn M bts/gen_links.sh M bts/regen_makefile.sh 4 files changed, 628 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/bts/BTS_Tests.cfg b/bts/BTS_Tests.cfg index a7ce68d..78a288d 100644 --- a/bts/BTS_Tests.cfg +++ b/bts/BTS_Tests.cfg @@ -19,6 +19,8 @@ #BTS_Tests.mp_rsl_ip := "10.9.1.2" # office BTS_Tests.mp_rsl_ip := "192.168.100.2" # home #BTS_Tests.mp_pcu_socket := "" +#BTS_Tests_OML.mp_oml_ip := "192.168.102.239" # home +#BTS_Tests_OML.mp_oml_port := 3002 # real BTS / RF #BTS_Tests.mp_bb_trxc_port := -1 diff --git a/bts/BTS_Tests_OML.ttcn b/bts/BTS_Tests_OML.ttcn new file mode 100644 index 0000000..84d46a4 --- /dev/null +++ b/bts/BTS_Tests_OML.ttcn @@ -0,0 +1,624 @@ +module BTS_Tests_OML { + +/* Integration Tests for OsmoBTS A-bis OML (Organization & Maintenance Link) + * + * (C) 2019 by Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +import from General_Types all; +import from Osmocom_Types all; +import from AbisOML_Types all; +import from IPA_Emulation all; +import from IPA_Types all; + +const integer NUM_TRX := 8; + +type record of uint16_t ArfcnList; + +modulepar { + charstring mp_oml_ip := "127.0.0.1"; + integer mp_oml_port := 3002; + ArfcnList mp_arfcn := { 100, 101, 102, 103, 104, 105, 106, 107 }; + OML_FOM_InterfLevBoundaries mp_interf_bound := { 85, 91, 97, 103, 109, 115 }; + OML_FOM_T200 mp_t200 := { + sdcch_5ms := 30, + facch_f_5ms := 36, + facch_h_5ms := 36, + sacch_tch_sapi0_10ms := 168, + sacch_sdcch_10ms := 52, + sdcch_sapi3_5ms := 33, + sacch_rch_sapi3_10ms := 168 + }; + uint8_t mp_max_ta := 63; + uint8_t mp_load_threshold := 10; + uint8_t mp_load_ind_period := 1; + uint8_t mp_rach_b_thresh := 90; + uint16_t mp_loadavg_slots := 1000; + uint8_t mp_air_timer := 100; + uint8_t mp_ny1 := 10; + uint8_t mp_bsic := 63; +}; + +/* BSC side OML component */ +type component BSC_OML_CT { + /* IPA emulation component underneath OML */ + var IPA_Emulation_CT vc_IPA_OML; + /* Port for OML */ + port IPA_OML_PT OML; + var uint8_t g_bts_nr := 0; + + /* global test case guard timer */ + timer T_oml_guard := 60.0; +}; + +private altstep as_Tguard() runs on BSC_OML_CT { + [] T_oml_guard.timeout { + setverdict(fail, "Timeout of T_guard"); + mtc.stop; + } +} + +private altstep as_SwAct() runs on BSC_OML_CT { + var OML_PDU rx; + [] OML.receive(tr_OML_SwActReq(?, ?, ?, ?)) -> value rx { + var OML_FOM_ObjectClass obj_class := rx.u.fom.hdr.obj_class; + var OML_FOM_ObjectInstance obj_inst := rx.u.fom.hdr.obj_inst; + + /* acknowledge the activate request */ + OML.send(f_OML_make_ack(rx)); + var octetstring file_id := ''O; + var octetstring sw_desc := ''O; + + /* Request activation of software and check for ACK */ + OML.send(ts_OML_ActivateSw(obj_class, obj_inst, file_id, sw_desc)); + interleave { + [] OML.receive(tr_OML_ActivateSwACK(obj_class, obj_inst, file_id, sw_desc)); + [] OML.receive(tr_OML_SwActivatedRep(obj_class, obj_inst)); + } + repeat; + } +} + +private altstep as_IPA_evt() runs on BSC_OML_CT { + var ASP_IPA_Event evt; + [] OML.receive(ASP_IPA_Event:?) -> value evt { + log("Ignoring ", evt); + repeat; + } +} + +function f_init_oml(charstring id) runs on BSC_OML_CT { + vc_IPA_OML := IPA_Emulation_CT.create(id & "-OML-IPA"); + map(vc_IPA_OML:IPA_PORT, system:IPA_CODEC_PT); + connect(vc_IPA_OML:IPA_OML_PORT, self:OML); + vc_IPA_OML.start(IPA_Emulation.main_server(mp_oml_ip, mp_oml_port)); + + T_oml_guard.start; + activate(as_Tguard()); + + OML.receive(t_ASP_IPA_EVT_UD(ASP_IPA_EVENT_UP)); + //OML.receive(t_ASP_IPA_EVT_UD(ASP_IPA_EVENT_ID_ACK)); + + activate(as_SwAct()); + activate(as_IPA_evt()); +} + + +/* Perform an "OPSTART" procedure with the speciifed MO" */ +private function f_oml_opstart(template (value) OML_FOM_ObjectClass obj_class, + template (value) OML_FOM_ObjectInstance obj_inst, + boolean exp_fail := false) +runs on BSC_OML_CT { + OML.send(ts_OML_Opstart(obj_class, obj_inst)); + alt { + [not exp_fail] OML.receive(tr_OML_OpstartACK(obj_class, obj_inst)) { + setverdict(pass); + } + [not exp_fail] OML.receive(tr_OML_OpstartNACK(obj_class, obj_inst)) { + setverdict(fail, "Unexpected OPSTART NACK for ", obj_class, " ", obj_inst); + } + [exp_fail] OML.receive(tr_OML_OpstartACK(obj_class, obj_inst)) { + setverdict(fail, "Unexpected OPSTART ACK for ", obj_class, " ", obj_inst); + } + [exp_fail] OML.receive(tr_OML_OpstartNACK(obj_class, obj_inst)) { + setverdict(pass); + } + [] OML.receive { repeat; } + } +} + +/* Perform a "CHANGE ADMINISTRATIVE STATE" procedure with the speciifed MO" */ +private function f_oml_chg_adm_st(template (value) OML_FOM_ObjectClass obj_class, + template (value) OML_FOM_ObjectInstance obj_inst, + template (value) OML_FOM_AdministrativeState adm_st, + boolean exp_fail := false) +runs on BSC_OML_CT { + OML.send(ts_OML_ChangeAdmState(obj_class, obj_inst, adm_st)); + alt { + [not exp_fail] OML.receive(tr_OML_ChangeAdmStateACK(obj_class, obj_inst, adm_st)) { + setverdict(pass); + } + [not exp_fail] OML.receive(tr_OML_ChangeAdmStateNACK(obj_class, obj_inst)) { + setverdict(fail, "Unexpected CHANGE ADM STATE NACK for ", obj_class, " ", obj_inst); + } + [exp_fail] OML.receive(tr_OML_ChangeAdmStateACK(obj_class, obj_inst, adm_st)) { + setverdict(fail, "Unexpected CHANGE ADM STATE ACK for ", obj_class, " ", obj_inst); + } + [exp_fail] OML.receive(tr_OML_ChangeAdmStateNACK(obj_class, obj_inst)) { + setverdict(pass); + } + [] OML.receive { repeat; } + } +} + +/* Perform a "SET RADIO CARRIER ATTRIBUTES" procedure with the BTS */ +private function f_oml_radio_attr(uint8_t trx_nr) +runs on BSC_OML_CT { + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, trx_nr, 255)); + var OML_PDU cmd := valueof(ts_OML_SetRadioAttr(obj_inst, 0, {mp_arfcn[trx_nr]})); + var template OML_PDU exp_ack := f_OML_make_ack_exp(cmd); + var template OML_PDU exp_nack := f_OML_make_nack_exp(cmd, ?); + var OML_PDU rx; + + OML.send(cmd); + alt { + [] OML.receive(exp_ack) -> value rx { + setverdict(pass); + } + [] OML.receive(exp_nack) -> value rx { + setverdict(fail, "SET RADIO CARRIER ATTRIBUTES NACK ", exp_nack); + } + [] OML.receive(tr_OML_MsgType(NM_MT_SET_RADIO_ATTR_ACK, NM_OC_RADIO_CARRIER, obj_inst, omit)) { + setverdict(fail, "SET RADIO CARRIER ATTRIBUTES ACK without IEs"); + } + [] OML.receive { repeat; } + } +} + +/* Perform a "SET CHANNEL ATTRIBUTES" procedure with the BTS */ +private function f_oml_ts_attr(uint8_t trx_nr, uint8_t ts_nr) +runs on BSC_OML_CT { + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, trx_nr, ts_nr)); + var OML_PDU cmd := valueof(ts_OML_SetChanAttr(obj_inst, NM_CHANC_TCHFull, tsc := 7)); + var template OML_PDU exp_ack := f_OML_make_ack_exp(cmd); + var template OML_PDU exp_nack := f_OML_make_nack_exp(cmd, ?); + var OML_PDU rx; + + OML.send(cmd); + alt { + [] OML.receive(exp_ack) -> value rx { + setverdict(pass); + } + [] OML.receive(exp_nack) -> value rx { + setverdict(fail, "SET CHANNEL ATTRIBUTES NACK ", exp_nack); + } + [] OML.receive(tr_OML_MsgType(NM_MT_SET_CHAN_ATTR_ACK, NM_OC_CHANNEL, obj_inst, omit)) { + setverdict(fail, "SET CHANNEL ATTRIBUTES ACK without IEs"); + } + [] OML.receive { repeat; } + } + +} + +/* Perform a "SET BTS ATTRIBUTES" procedure with the BTS */ +private function f_oml_bts_attr() +runs on BSC_OML_CT { + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, 255, 255)); + var template (value) OML_FOM_IE_List ies := { + ts_OML_IE(NM_ATT_INTERF_BOUND, OML_FOM_IE_Body:{interf_bound:=mp_interf_bound}), + ts_OML_IE(NM_ATT_BCCH_ARFCN, OML_FOM_IE_Body:{bcch_arfcn:=mp_arfcn[0]}), + ts_OML_IE(NM_ATT_CONN_FAIL_CRIT, OML_FOM_IE_Body:{other := ts_OML_IE_L16V(2, '0120'O)}), + ts_OML_IE(NM_ATT_T200, OML_FOM_IE_Body:{t200 := mp_t200}), + ts_OML_IE(NM_ATT_MAX_TA, OML_FOM_IE_Body:{max_ta := mp_max_ta}), + ts_OML_IE(NM_ATT_OVERL_PERIOD, OML_FOM_IE_Body:{other := ts_OML_IE_L16V(1, '0a'O)}), + ts_OML_IE(NM_ATT_CCCH_L_T, OML_FOM_IE_Body:{load_threshold := mp_load_threshold}), + ts_OML_IE(NM_ATT_CCCH_L_I_P, OML_FOM_IE_Body:{load_ind_period := mp_load_ind_period}), + ts_OML_IE(NM_ATT_RACH_B_THRESH, OML_FOM_IE_Body:{rach_b_thresh := mp_rach_b_thresh}), + ts_OML_IE(NM_ATT_LDAVG_SLOTS, OML_FOM_IE_Body:{loadavg_slots := mp_loadavg_slots}), + ts_OML_IE(NM_ATT_BTS_AIR_TIMER, OML_FOM_IE_Body:{air_timer := mp_air_timer}), + ts_OML_IE(NM_ATT_NY1, OML_FOM_IE_Body:{ny1 := mp_ny1}), + ts_OML_IE(NM_ATT_BSIC, OML_FOM_IE_Body:{bsic := mp_bsic}) + //ts_OML_IE(NM_ATT_IPACC_CGI, ...) + }; + var OML_PDU cmd := valueof(ts_OML_SetBtsAttr(obj_inst, ies)); + var template OML_PDU exp_ack := f_OML_make_ack_exp(cmd); + var template OML_PDU exp_nack := f_OML_make_nack_exp(cmd, ?); + var OML_PDU rx; + + OML.send(cmd); + alt { + [] OML.receive(exp_ack) -> value rx { + setverdict(pass); + } + [] OML.receive(exp_nack) -> value rx { + setverdict(fail, "SET BTS ATTRIBUTES NACK ", exp_nack); + } + + [] OML.receive(tr_OML_MsgType(NM_MT_SET_BTS_ATTR_ACK, NM_OC_BTS, obj_inst, omit)) { + setverdict(fail, "SET BTS ATTRIBUTES ACK without IEs"); + } + [] OML.receive { repeat; } + } +} + +/* Send an OML message and expect no response at all */ +private function f_oml_send_exp_no_resp(template (value) OML_PDU tx, charstring err_msg, + float tout := 5.0) runs on BSC_OML_CT +{ + timer T := 5.0; + + OML.send(tx); + T.start; + alt { + [] OML.receive { + setverdict(fail, err_msg); + } + [] T.timeout { + setverdict(pass); + } + } +} + +private function f_oml_exp_rx(template OML_PDU exp_rx, charstring err_msg) runs on BSC_OML_CT +{ + timer T := 5.0; + T.start; + alt { + [] OML.receive(exp_rx) { + setverdict(pass); + } + [] OML.receive { repeat; } + [] T.timeout { + setverdict(fail, "Timeout waiting for ", err_msg); + } + } +} + +/* Send an OML message and expect a failure event report in response */ +private function f_oml_send_exp_fail_rep(template (value) OML_PDU tx, charstring err_msg, + template OML_FOM_EventType evt := ?, + template OML_FOM_Severity severity := ?, + template OML_FOM_ProbableCause cause := ?, + float tout := 5.0) runs on BSC_OML_CT +{ + var template OML_FOM_ObjectClass obj_class := ?; + var template OML_FOM_ObjectInstance obj_inst := ?; + if (ischosen(tx.u.fom)) { + obj_class := tx.u.fom.hdr.obj_class; + obj_inst := tx.u.fom.hdr.obj_inst; + } + var template OML_PDU exp_fail := tr_OML_FailureEvtRep(obj_class,obj_inst, evt, severity, cause); + + OML.send(tx); + f_oml_exp_rx(exp_fail, "Failure Event Report"); +} + +/* Send an OML message and expect it to be NACKed with specified cause */ +private function f_oml_send_exp_nack(template (value) OML_PDU tx, template OML_FOM_NackCause exp_cause, + float tout := 5.0) runs on BSC_OML_CT +{ + timer T := 5.0; + + var template OML_PDU exp_nack := f_OML_make_nack_exp(valueof(tx), exp_cause); + var template OML_PDU exp_ack := f_OML_make_ack_exp(valueof(tx)); + var OML_PDU rx; + + OML.send(tx); + T.start; + alt { + [] OML.receive(exp_ack) -> value rx { + setverdict(fail, "Unexpected ACK ", rx); + } + [] OML.receive(exp_nack) -> value rx { + setverdict(pass); + } + [] OML.receive { repeat; } + [] T.timeout { + setverdict(fail, "Timeout waiting for NACK ", exp_nack); + } + } +} + + + + + + +testcase TC_oml_selftest() runs on BSC_OML_CT { + const octetstring state_chg_bts := '8080000d610100ffff'O & '2401'O & '07000107'O & '0401'O; + const octetstring set_attr_bts := '80800033410100ffff19555b61676d7318060e00020110331e2424a83421a81f3f2500010a0c1e0b642a0a2b03e80a80230a08007b0920'O + const octetstring set_attr_radio := '8080000c44020000ff2d00050002007b'O; + const octetstring set_attr_ts0 := '8080000947030000000d074000'O; + const octetstring ipa_rsl_connect := '1080000a0d636f6d2e697061636365737300e0040000ff8500810bbb'O; + + log(dec_OML_PDU(state_chg_bts)); + log(dec_OML_PDU(set_attr_bts)); + log(dec_OML_PDU(set_attr_radio)); + log(dec_OML_PDU(set_attr_ts0)); + log(dec_OML_PDU(ipa_rsl_connect)); +}; + +testcase TC_oml_nothing() runs on BSC_OML_CT { + f_init_oml(testcasename()); + f_sleep(100.0); +} + +/* test behavior for unsupported message discriminator */ +testcase TC_wrong_mdisc() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + var OML_PDU mmi_pdu := { + mdisc := ABIS_OM_MDISC_MMI, + placement := ABIS_OM_PLACEMENT_ONLY, + sequence := 0, + u := { + other := '01020304'O + } + }; + + f_oml_send_exp_fail_rep(mmi_pdu, "Unexpected response to MMI message"); +} + +/* send a message of unknown/unsupported type */ +testcase TC_wrong_msgtype() runs on BSC_OML_CT { + f_init_oml(testcasename()); + var OML_PDU tx := valueof(ts_OML_MsgType(NM_MT_ESTABLISH_TEI, NM_OC_BTS, + ts_OML_ObjectInstance(0, 255, 255), omit)); + f_oml_send_exp_fail_rep(tx, "ESTABLISH_TEI"); +} + +/* send message shorter than OML header length indicates */ +testcase TC_short_length() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + /* Send "Change Adm State (Locked) to BTS, but with length 09 instead of 07 */ + OML.send('80800009690100ffff0401'O); + + template OML_PDU exp_fail := tr_OML_FailureEvtRep(NM_OC_BTS, + ts_OML_ObjectInstance(0, 255, 255), + ?, ?, ?); + f_oml_exp_rx(exp_fail, "Failure Event Report"); +} + +/* send message longer than OML header length indicates */ +testcase TC_long_length() runs on BSC_OML_CT { + f_init_oml(testcasename()); + /* Send "Change Adm State (Locked) to BTS, but with two extra bytes at the end */ + OML.send('80800007690100ffff04010402'O); + + template OML_PDU exp := + tr_OML_ChangeAdmStateACK(NM_OC_BTS, ts_OML_ObjectInstance(0, 255, 255), + NM_STATE_LOCKED); + f_oml_exp_rx(exp, "Change ADM State ACK"); +} + +/* test behavior for unsupported placement (!= ONLY) */ +testcase TC_wrong_placement() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + var OML_FOM_ObjectClass obj_class := NM_OC_BTS + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, 255, 255)); + + var OML_PDU pdu := valueof(ts_OML_ChangeAdmState(obj_class, obj_inst, NM_STATE_LOCKED)); + + pdu.placement := ABIS_OM_PLACEMENT_FIRST; + f_oml_send_exp_fail_rep(pdu, "Unexpected response to PLACEMENT_FIRST"); + + pdu.placement := ABIS_OM_PLACEMENT_MIDDLE; + f_oml_send_exp_fail_rep(pdu, "Unexpected response to PLACEMENT_MIDDLE"); + + pdu.placement := ABIS_OM_PLACEMENT_LAST; + f_oml_send_exp_fail_rep(pdu, "Unexpected response to PLACEMENT_LAST"); +} + +/* test behavior for sequence != 0 (invalid if mdisc == ONLY) */ +testcase TC_wrong_seq() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + var OML_FOM_ObjectClass obj_class := NM_OC_BTS; + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, 255, 255)); + var OML_PDU pdu := valueof(ts_OML_ChangeAdmState(obj_class, obj_inst, NM_STATE_LOCKED)); + + OML.clear; + + pdu.sequence := 23; + f_oml_send_exp_fail_rep(pdu, "Unexpected response to sequence != 0"); +} + +/* test behavior for unsupported obj_class */ +testcase TC_wrong_obj_class() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + var OML_FOM_ObjectClass obj_class := NM_OC_BTS; + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, 255, 255)); + var OML_PDU pdu := valueof(ts_OML_ChangeAdmState(obj_class, obj_inst, NM_STATE_LOCKED)); + pdu.u.fom.hdr.obj_class := NM_OC_NULL; + + /* NM_NACK_OBJCLASS_INVAL */ + f_oml_send_exp_nack(pdu, NM_NACK_OBJCLASS_NOTSUPP); +} + +/* test behavior for wrong BTS number in object instance */ +testcase TC_wrong_bts_nr() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + var OML_FOM_ObjectClass obj_class := NM_OC_BTS; + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(250, 255, 255)); + var OML_PDU pdu := valueof(ts_OML_ChangeAdmState(obj_class, obj_inst, NM_STATE_LOCKED)); + + f_oml_send_exp_nack(pdu, NM_NACK_BTSNR_UNKN); +} + +/* test behavior for wrong TRX number in object instance */ +testcase TC_wrong_trx_nr() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + var OML_FOM_ObjectClass obj_class := NM_OC_RADIO_CARRIER; + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, 250, 255)); + var OML_PDU pdu := valueof(ts_OML_ChangeAdmState(obj_class, obj_inst, NM_STATE_LOCKED)); + + f_oml_send_exp_nack(pdu, NM_NACK_TRXNR_UNKN); +} + +/* test behavior for wrong TS number in object instance */ +testcase TC_wrong_ts_nr() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + var OML_FOM_ObjectClass obj_class := NM_OC_RADIO_CARRIER; + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, 0, 250)); + var OML_PDU pdu := valueof(ts_OML_ChangeAdmState(obj_class, obj_inst, NM_STATE_LOCKED)); + + f_oml_send_exp_nack(pdu, NM_NACK_OBJINST_UNKN); +} + +/* RADIO CARRIER: Test OPSTART with SET BTS ATTRIBUTES; expect ACK */ +testcase TC_radio_carrier_opstart() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + var OML_FOM_ObjectClass obj_class := NM_OC_RADIO_CARRIER; + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, 0, 255)); + + f_oml_radio_attr(0); + f_oml_opstart(obj_class, obj_inst); +} + +/* RADIO CARRIER: Test OPSTART without SET BTS ATTRIBUTES; expect NACK */ +testcase TC_radio_carrier_opstart_noattr() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + var OML_FOM_ObjectClass obj_class := NM_OC_RADIO_CARRIER; + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, 0, 255)); + + /* we are *not* setting any attributes here */ + f_oml_opstart(obj_class, obj_inst, exp_fail := true); +} + + +/* BTS: Test OPSTART after SET BTS ATTRIBUTES; expect ACK */ +testcase TC_bts_opstart() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + var OML_FOM_ObjectClass obj_class := NM_OC_BTS; + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, 255, 255)); + + f_oml_bts_attr(); + f_oml_opstart(obj_class, obj_inst); +} + + +/* BTS: Test OPSTART without SET BTS ATTRIBUTES; expect NACK */ +testcase TC_bts_opstart_noattr() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + var OML_FOM_ObjectClass obj_class := NM_OC_BTS; + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, 255, 255)); + + /* we are *not* setting any attributes here */ + f_oml_opstart(obj_class, obj_inst, exp_fail := true); +} + +/* CHANNEL: Test OPSTART after SET CHANNEL ATTRIBUTES; expect ACK */ +testcase TC_ts_opstart() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + var OML_FOM_ObjectClass obj_class := NM_OC_CHANNEL; + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, 0, 1)); + + f_oml_ts_attr(trx_nr := 0, ts_nr := 1); + f_oml_opstart(obj_class, obj_inst); +} + + +/* CHANNEL: Test OPSTART without SET CHANNEL ATTRIBUTES; expect NACK */ +testcase TC_ts_opstart_noattr() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + var OML_FOM_ObjectClass obj_class := NM_OC_CHANNEL; + var OML_FOM_ObjectInstance obj_inst := valueof(ts_OML_ObjectInstance(g_bts_nr, 0, 1)); + + /* we are *not* setting any attributes here */ + f_oml_opstart(obj_class, obj_inst, exp_fail := true); +} + +/* Ensure the initial Event State Change Reports after OML connect match our expectation */ +testcase TC_initial_state_reports() runs on BSC_OML_CT { + f_init_oml(testcasename()); + + interleave { + [] OML.receive(tr_OML_StateChgEvtRep(NM_OC_SITE_MANAGER, ts_OML_ObjectInstance(255, 255, 255), + NM_OPSTATE_ENABLED, NM_AVSTATE_OK)); + [] OML.receive(tr_OML_StateChgEvtRep(NM_OC_BTS, ts_OML_ObjectInstance(0, 255, 255), + NM_OPSTATE_DISABLED, NM_AVSTATE_DEPENDENCY)); + [] OML.receive(tr_OML_StateChgEvtRep(NM_OC_BTS, ts_OML_ObjectInstance(0, 255, 255), + NM_OPSTATE_DISABLED, NM_AVSTATE_DEPENDENCY)); + } +} + + +control { + execute( TC_wrong_mdisc() ); + execute( TC_wrong_msgtype() ); + execute( TC_short_length() ); + execute( TC_long_length() ); + execute( TC_wrong_placement() ); + execute( TC_wrong_seq() ); + execute( TC_wrong_obj_class() ); + execute( TC_wrong_bts_nr() ); + execute( TC_wrong_trx_nr() ); + execute( TC_radio_carrier_opstart_noattr() ); + execute( TC_bts_opstart() ); + execute( TC_bts_opstart_noattr() ); + execute( TC_ts_opstart() ); + execute( TC_ts_opstart_noattr() ); + execute( TC_initial_state_reports() ); +} + +/* BTS: + * - Evt: Disabled/Locked + * - SW ACT + * - Evt: Disabled/Dependency + * - SET BTS ATTR + * - Opstart + * - Chg Adm State Unlocked + * - Evt: Disabled/Dependency/Unlocked + * - Evt: Enabled/0 (after last channel unlocked?) + */ + +/* Radio Carrier: + * - Evt: Disabled/Offline after SW ACT + * - Set Radio Carrier Attributes ? (->NACL) + * - Evt: Disabled/Dependency + * - Set Radio Carrier Attributes ? + * - Opstart + * - Chg Adm State Unlocked + * - Evt: + */ + +/* Baseband Transceiver: + * - Evt: Disabled/Locked + * - SW Activation + * - Evt: Disabled/Dependency after SW ACT + * - IPA RSL Connect + * - Opstart + * - Chg Admin Unlocked + * - Evt: Disabled/Dependency/Unlocked + */ + +/* Channel: + * - Evt: Not Installed/Locked + * - Evt: Disabled/Dependency (after SW ACT Rep on BB Transc) + * - Set Channel Attr + * - Opstart + * - Evt: Disabled/Offline + * - Chg Admin Unlocked + * - Evt: Disabled/OK/Unlocked + * - Evt: Enabled/OK (after BB TRANSC Opstart) + */ + +}; diff --git a/bts/gen_links.sh b/bts/gen_links.sh index 2a07f16..aafe231 100755 --- a/bts/gen_links.sh +++ b/bts/gen_links.sh @@ -36,7 +36,7 @@ FILES="Misc_Helpers.ttcn General_Types.ttcn GSM_Types.ttcn GSM_RR_Types.ttcn Osmocom_VTY_Functions.ttcn GSM_SystemInformation.ttcn Osmocom_Types.ttcn RLCMAC_Types.ttcn RLCMAC_CSN1_Types.ttcn RLCMAC_EncDec.cc L1CTL_Types.ttcn L1CTL_PortType.ttcn L1CTL_PortType_CtrlFunct.ttcn L1CTL_PortType_CtrlFunctDef.cc LAPDm_RAW_PT.ttcn LAPDm_Types.ttcn " #FILES+="NS_Emulation.ttcn NS_CodecPort.ttcn NS_CodecPort_CtrlFunct.ttcn NS_CodecPort_CtrlFunctDef.cc " #FILES+="BSSGP_Emulation.ttcn Osmocom_Gb_Types.ttcn " -FILES+="IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp IPA_CodecPort.ttcn RSL_Types.ttcn RSL_Emulation.ttcn " +FILES+="IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp IPA_CodecPort.ttcn RSL_Types.ttcn RSL_Emulation.ttcn AbisOML_Types.ttcn " FILES+="Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn " FILES+="L3_Templates.ttcn L3_Common.ttcn " FILES+="Native_Functions.ttcn Native_FunctionDefs.cc " diff --git a/bts/regen_makefile.sh b/bts/regen_makefile.sh index 9ed5a06..c912da8 100755 --- a/bts/regen_makefile.sh +++ b/bts/regen_makefile.sh @@ -2,6 +2,6 @@ FILES="*.ttcn *.ttcnpp IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc UD_PT.cc RLCMAC_EncDec.cc Native_FunctionDefs.cc TRXC_CodecPort_CtrlFunctDef.cc L1CTL_PortType_CtrlFunctDef.cc TELNETasp_PT.cc" -export CPPFLAGS_TTCN3="-DIPA_EMULATION_RSL" +export CPPFLAGS_TTCN3="-DIPA_EMULATION_RSL -DIPA_EMULATION_OML" ../regen-makefile.sh BTS_Tests.ttcn $FILES -- To view, visit https://gerrit.osmocom.org/14264 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I82bb85b684d2db3a6b1e96a68ffde03e22affa6b Gerrit-Change-Number: 14264 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 20:00:12 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 20:00:12 +0000 Subject: Change in docker-playground[master]: osmoocm-bb-host-master: Build virtphy, not only trxcon Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14268 Change subject: osmoocm-bb-host-master: Build virtphy, not only trxcon ...................................................................... osmoocm-bb-host-master: Build virtphy, not only trxcon There are some BTS_Tests which (so far) don't yet work with trxcon hence require virtphy. Change-Id: I0aabd73e2778b9144aa7945f25cae5cefea4111b --- M osmocom-bb-host-master/Dockerfile 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/68/14268/1 diff --git a/osmocom-bb-host-master/Dockerfile b/osmocom-bb-host-master/Dockerfile index 6ec0c9a..a4c8c16 100644 --- a/osmocom-bb-host-master/Dockerfile +++ b/osmocom-bb-host-master/Dockerfile @@ -34,6 +34,11 @@ ./configure && \ make -j8 install +RUN cd osmocom-bb/src/host/virt_phy && \ + autoreconf -fi && \ + ./configure && \ + make -j8 install + RUN mkdir -p /data/unix VOLUME /data -- To view, visit https://gerrit.osmocom.org/14268 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I0aabd73e2778b9144aa7945f25cae5cefea4111b Gerrit-Change-Number: 14268 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 20:00:12 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 20:00:12 +0000 Subject: Change in docker-playground[master]: ttcn3-bts-test/jenkins.sh: Move start of containers into shell functions Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14269 Change subject: ttcn3-bts-test/jenkins.sh: Move start of containers into shell functions ...................................................................... ttcn3-bts-test/jenkins.sh: Move start of containers into shell functions Change-Id: If9ac580aa5f0745468f69d413aa732891acb4a1c --- M ttcn3-bts-test/jenkins.sh 1 file changed, 61 insertions(+), 46 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/69/14269/1 diff --git a/ttcn3-bts-test/jenkins.sh b/ttcn3-bts-test/jenkins.sh index eb96e59..20f9373 100755 --- a/ttcn3-bts-test/jenkins.sh +++ b/ttcn3-bts-test/jenkins.sh @@ -11,6 +11,62 @@ "debian-stretch-titan" \ "ttcn3-bts-test" +start_bsc() { + echo Starting container with BSC + docker run --rm \ + --network $NET_NAME --ip 172.18.9.11 \ + -v $VOL_BASE_DIR/bsc:/data \ + --name ${BUILD_TAG}-bsc -d \ + $REPO_USER/osmo-bsc-$IMAGE_SUFFIX \ + osmo-bsc -c /data/osmo-bsc.cfg +} + +start_bts() { + echo Starting container with BTS + docker run --rm \ + --network $NET_NAME --ip 172.18.9.20 \ + -v $VOL_BASE_DIR/bts:/data \ + -v $VOL_BASE_DIR/unix:/data/unix \ + --name ${BUILD_TAG}-bts -d \ + $REPO_USER/osmo-bts-$IMAGE_SUFFIX \ + /usr/local/bin/respawn.sh osmo-bts-trx -c /data/osmo-bts.cfg -i 172.18.9.10 +} + +start_fake_trx() { + echo Starting container with fake_trx + docker run --rm \ + --network $NET_NAME --ip 172.18.9.21 \ + -v $VOL_BASE_DIR/fake_trx:/data \ + --name ${BUILD_TAG}-fake_trx -d \ + $REPO_USER/osmocom-bb-host-master \ + /tmp/osmocom-bb/src/target/trx_toolkit/fake_trx.py \ + --log-file-name /data/fake_trx.log \ + --log-file-level DEBUG \ + --log-level INFO \ + -R 172.18.9.20 -r 172.18.9.22 +} + +start_trxcon() { + echo Starting container with trxcon + docker run --rm \ + --network $NET_NAME --ip 172.18.9.22 \ + -v $VOL_BASE_DIR/unix:/data/unix \ + --name ${BUILD_TAG}-trxcon -d \ + $REPO_USER/osmocom-bb-host-master \ + trxcon -i 172.18.9.21 -s /data/unix/osmocom_l2 +} + +start_testsuite() { + echo Starting container with BTS testsuite + docker run --rm \ + --network $NET_NAME --ip 172.18.9.10 \ + -e "TTCN3_PCAP_PATH=/data" \ + -v $VOL_BASE_DIR/bts-tester:/data \ + -v $VOL_BASE_DIR/unix:/data/unix \ + --name ${BUILD_TAG}-ttcn3-bts-test \ + $REPO_USER/ttcn3-bts-test +} + network_create 172.18.9.0/24 mkdir $VOL_BASE_DIR/bts-tester @@ -28,52 +84,11 @@ mkdir $VOL_BASE_DIR/fake_trx -echo Starting container with BSC -docker run --rm \ - --network $NET_NAME --ip 172.18.9.11 \ - -v $VOL_BASE_DIR/bsc:/data \ - --name ${BUILD_TAG}-bsc -d \ - $REPO_USER/osmo-bsc-$IMAGE_SUFFIX \ - osmo-bsc -c /data/osmo-bsc.cfg - -echo Starting container with BTS -docker run --rm \ - --network $NET_NAME --ip 172.18.9.20 \ - -v $VOL_BASE_DIR/bts:/data \ - -v $VOL_BASE_DIR/unix:/data/unix \ - --name ${BUILD_TAG}-bts -d \ - $REPO_USER/osmo-bts-$IMAGE_SUFFIX \ - /usr/local/bin/respawn.sh osmo-bts-trx -c /data/osmo-bts.cfg -i 172.18.9.10 - -echo Starting container with fake_trx -docker run --rm \ - --network $NET_NAME --ip 172.18.9.21 \ - -v $VOL_BASE_DIR/fake_trx:/data \ - --name ${BUILD_TAG}-fake_trx -d \ - $REPO_USER/osmocom-bb-host-master \ - /tmp/osmocom-bb/src/target/trx_toolkit/fake_trx.py \ - --log-file-name /data/fake_trx.log \ - --log-file-level DEBUG \ - --log-level INFO \ - -R 172.18.9.20 -r 172.18.9.22 - -echo Starting container with trxcon -docker run --rm \ - --network $NET_NAME --ip 172.18.9.22 \ - -v $VOL_BASE_DIR/unix:/data/unix \ - --name ${BUILD_TAG}-trxcon -d \ - $REPO_USER/osmocom-bb-host-master \ - trxcon -i 172.18.9.21 -s /data/unix/osmocom_l2 - - -echo Starting container with BTS testsuite -docker run --rm \ - --network $NET_NAME --ip 172.18.9.10 \ - -e "TTCN3_PCAP_PATH=/data" \ - -v $VOL_BASE_DIR/bts-tester:/data \ - -v $VOL_BASE_DIR/unix:/data/unix \ - --name ${BUILD_TAG}-ttcn3-bts-test \ - $REPO_USER/ttcn3-bts-test +start_bsc +start_bts +start_fake_trx +start_trxcon +start_testsuite echo Stopping containers docker container kill ${BUILD_TAG}-trxcon -- To view, visit https://gerrit.osmocom.org/14269 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If9ac580aa5f0745468f69d413aa732891acb4a1c Gerrit-Change-Number: 14269 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 20:00:13 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 20:00:13 +0000 Subject: Change in docker-playground[master]: ttcn3-bts-test: Add virtphy based PCUIF tests Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14270 Change subject: ttcn3-bts-test: Add virtphy based PCUIF tests ...................................................................... ttcn3-bts-test: Add virtphy based PCUIF tests Some tests require GPRS features not yet present in trxcon, so we have to fall back using virtphy. Change-Id: I2f17f03194a4dfa0abca51b0d3e22b3934d08a9a --- M ttcn3-bts-test/jenkins.sh A ttcn3-bts-test/virtphy/BTS_Tests.cfg A ttcn3-bts-test/virtphy/osmo-bts.cfg 3 files changed, 142 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/70/14270/1 diff --git a/ttcn3-bts-test/jenkins.sh b/ttcn3-bts-test/jenkins.sh index 20f9373..4feb8f5 100755 --- a/ttcn3-bts-test/jenkins.sh +++ b/ttcn3-bts-test/jenkins.sh @@ -22,14 +22,20 @@ } start_bts() { + local variant + variant="$1" echo Starting container with BTS + if [ -z "$variant" ]; then + echo ERROR: You have to specify a BTS variant + exit 23 + fi docker run --rm \ --network $NET_NAME --ip 172.18.9.20 \ -v $VOL_BASE_DIR/bts:/data \ -v $VOL_BASE_DIR/unix:/data/unix \ --name ${BUILD_TAG}-bts -d \ $REPO_USER/osmo-bts-$IMAGE_SUFFIX \ - /usr/local/bin/respawn.sh osmo-bts-trx -c /data/osmo-bts.cfg -i 172.18.9.10 + /usr/local/bin/respawn.sh osmo-bts-$variant -c /data/osmo-bts.cfg -i 172.18.9.10 } start_fake_trx() { @@ -56,6 +62,16 @@ trxcon -i 172.18.9.21 -s /data/unix/osmocom_l2 } +start_virtphy() { + echo Starting container with virtphy + docker run --rm \ + --network $NET_NAME --ip 172.18.9.22 \ + -v $VOL_BASE_DIR/unix:/data/unix \ + --name ${BUILD_TAG}-virtphy -d \ + $REPO_USER/osmocom-bb-host-master \ + virtphy -s /data/unix/osmocom_l2 +} + start_testsuite() { echo Starting container with BTS testsuite docker run --rm \ @@ -84,16 +100,30 @@ mkdir $VOL_BASE_DIR/fake_trx +# 1) classic test suite with BSC for OML and trxcon+fake_trx start_bsc -start_bts +start_bts trx start_fake_trx start_trxcon start_testsuite -echo Stopping containers +# 2) some GPRS tests require virt_phy +echo "Changing to virtphy configuration" +# switch from osmo-bts-trx + trxcon + faketrx to virtphy + osmo-bts-virtual docker container kill ${BUILD_TAG}-trxcon docker container kill ${BUILD_TAG}-fake_trx docker container kill ${BUILD_TAG}-bts +cp virtphy/osmo-bts.cfg $VOL_BASE_DIR/bts/ +start_bts virtual +start_virtphy +# ... and execute the testsuite again with different cfg +cp virtphy/BTS_Tests.cfg $VOL_BASE_DIR/bts-tester/ +start_testsuite + + +echo Stopping containers +docker container kill ${BUILD_TAG}-virtphy +docker container kill ${BUILD_TAG}-bts docker container kill ${BUILD_TAG}-bsc network_remove diff --git a/ttcn3-bts-test/virtphy/BTS_Tests.cfg b/ttcn3-bts-test/virtphy/BTS_Tests.cfg new file mode 100644 index 0000000..ee3455d --- /dev/null +++ b/ttcn3-bts-test/virtphy/BTS_Tests.cfg @@ -0,0 +1,29 @@ +[ORDERED_INCLUDE] +"/osmo-ttcn3-hacks/Common.cfg" +"/osmo-ttcn3-hacks/bts/BTS_Tests.default" + +[LOGGING] +*.JUnitLogger.filename_stem := "junit-xml-virtphy" + +[TESTPORT_PARAMETERS] +*.BTSVTY.CTRL_HOSTNAME := "172.18.9.20" +*.BSCVTY.CTRL_HOSTNAME := "172.18.9.11" + +[MODULE_PARAMETERS] +BTS_Tests.mp_rsl_ip := "172.18.9.10" +BTS_Tests.mp_bts_trxc_ip := "172.18.9.21" +BTS_Tests.mp_pcu_socket := "/data/unix/pcu_sock" +L1CTL_PortType.m_l1ctl_sock_path := "/data/unix/osmocom_l2" +BTS_Tests.mp_ctrl_ip := "172.18.9.20" +BTS_Tests.mp_l1_supports_gprs := true +BTS_Tests.mp_bts_trxc_port := -1; + +[MAIN_CONTROLLER] + +[EXECUTE] +BTS_Tests.TC_pcu_data_req_pdtch +BTS_Tests.TC_pcu_data_req_ptcch +BTS_Tests.TC_pcu_data_req_wrong_bts +BTS_Tests.TC_pcu_data_req_wrong_trx +BTS_Tests.TC_pcu_data_req_wrong_ts +BTS_Tests.TC_pcu_data_req_ts_inactive diff --git a/ttcn3-bts-test/virtphy/osmo-bts.cfg b/ttcn3-bts-test/virtphy/osmo-bts.cfg new file mode 100644 index 0000000..5957f03 --- /dev/null +++ b/ttcn3-bts-test/virtphy/osmo-bts.cfg @@ -0,0 +1,80 @@ +! +! OsmoBTS (0.4.0.446-e0fb) configuration saved from vty +!! +! +log file /data/osmo-bts.log + logging filter all 1 + logging color 0 + logging print category 1 + logging timestamp 1 + logging print extended-timestamp 1 + logging level rsl info + logging level oml info + logging level rll notice + logging level rr notice + logging level meas info + logging level pag info + logging level l1c info + logging level l1p notice + logging level dsp info + logging level pcu debug + logging level ho notice + logging level trx info + logging level loop notice + logging level abis notice + logging level rtp notice + logging level sum notice + logging level lglobal notice + logging level llapd notice + logging level linp notice + logging level lmux notice + logging level lmi notice + logging level lmib debug + logging level lsms notice + logging level lctrl notice + logging level lgtp notice + logging level lstats notice + logging level lgsup notice + logging level loap notice + logging level lss7 notice + logging level lsccp notice + logging level lsua notice + logging level lm3ua notice +! +line vty + no login + bind 0.0.0.0 +! +e1_input + e1_line 0 driver ipa + e1_line 0 port 0 + no e1_line 0 keepalive +phy 0 + !virtual-um ms-multicast-group 239.193.23.1 + !virtual-um bts-multicast-group 239.193.23.2 + instance 0 +bts 0 + band DCS1800 + ipa unit-id 1234 0 + oml remote-ip 172.18.9.11 + rtp jitter-buffer 100 + paging queue-size 200 + paging lifetime 0 + uplink-power-target -75 + gsmtap-sapi rach + gsmtap-sapi agch + gsmtap-sapi bcch + gsmtap-sapi pch + gsmtap-sapi sdcch + gsmtap-sapi sacch + min-qual-rach 50 + min-qual-norm -5 + pcu-socket /data/unix/pcu_sock + trx 0 + power-ramp max-initial 0 mdBm + power-ramp step-size 2000 mdB + power-ramp step-interval 1 + ms-power-control dsp + phy 0 instance 0 +ctrl + bind 0.0.0.0 -- To view, visit https://gerrit.osmocom.org/14270 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I2f17f03194a4dfa0abca51b0d3e22b3934d08a9a Gerrit-Change-Number: 14270 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 20:00:13 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 20:00:13 +0000 Subject: Change in docker-playground[master]: ttcn3-bts-test: Execute OML tests without BSC Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14271 Change subject: ttcn3-bts-test: Execute OML tests without BSC ...................................................................... ttcn3-bts-test: Execute OML tests without BSC Run the testsuite one more time; this time for OML tests which require us to run without a BSC. We can run those with trxcon and omso-bts-trx and don't need virtphy for them. Related: OS#4031 Depends: osmo-ttcn3-hacks I82bb85b684d2db3a6b1e96a68ffde03e22affa6b Change-Id: I97db9c74c56ca93c75e5e5226955799cd945eec0 --- M ttcn3-bts-test/jenkins.sh A ttcn3-bts-test/oml/BTS_Tests.cfg A ttcn3-bts-test/oml/osmo-bts.cfg 3 files changed, 127 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/71/14271/1 diff --git a/ttcn3-bts-test/jenkins.sh b/ttcn3-bts-test/jenkins.sh index 4feb8f5..2d49e0b 100755 --- a/ttcn3-bts-test/jenkins.sh +++ b/ttcn3-bts-test/jenkins.sh @@ -118,13 +118,26 @@ start_virtphy # ... and execute the testsuite again with different cfg cp virtphy/BTS_Tests.cfg $VOL_BASE_DIR/bts-tester/ -start_testsuite +#start_testsuite - -echo Stopping containers +# 3) OML tests require us to run without BSC +docker container kill ${BUILD_TAG}-bsc +# switch back from virtphy + osmo-bts-virtual to osmo-bts-trx docker container kill ${BUILD_TAG}-virtphy docker container kill ${BUILD_TAG}-bts -docker container kill ${BUILD_TAG}-bsc +cp oml/osmo-bts.cfg $VOL_BASE_DIR/bts/ +start_bts trx +start_fake_trx +start_trxcon +# ... and execute the testsuite again with different cfg +cp oml/BTS_Tests.cfg $VOL_BASE_DIR/bts-tester/ +start_testsuite + +echo Stopping containers +docker container kill ${BUILD_TAG}-trxcon +docker container kill ${BUILD_TAG}-fake_trx +docker container kill ${BUILD_TAG}-bts + network_remove rm -rf $VOL_BASE_DIR/unix diff --git a/ttcn3-bts-test/oml/BTS_Tests.cfg b/ttcn3-bts-test/oml/BTS_Tests.cfg new file mode 100644 index 0000000..c7215e1 --- /dev/null +++ b/ttcn3-bts-test/oml/BTS_Tests.cfg @@ -0,0 +1,25 @@ +[ORDERED_INCLUDE] +"/osmo-ttcn3-hacks/Common.cfg" +"/osmo-ttcn3-hacks/bts/BTS_Tests.default" + +[LOGGING] +*.JUnitLogger.filename_stem := "junit-xml-oml" + +[TESTPORT_PARAMETERS] +*.BTSVTY.CTRL_HOSTNAME := "172.18.9.20" +*.BSCVTY.CTRL_HOSTNAME := "172.18.9.11" + +[MODULE_PARAMETERS] +BTS_Tests.mp_rsl_ip := "172.18.9.10" +BTS_Tests.mp_bts_trxc_ip := "172.18.9.21" +BTS_Tests.mp_pcu_socket := "/data/unix/pcu_sock" +L1CTL_PortType.m_l1ctl_sock_path := "/data/unix/osmocom_l2" +BTS_Tests.mp_ctrl_ip := "172.18.9.20" + +BTS_Tests_OML.mp_oml_ip := "172.18.9.10" +BTS_Tests_OML.mp_oml_port := 3002 + +[MAIN_CONTROLLER] + +[EXECUTE] +BTS_Tests_OML.control diff --git a/ttcn3-bts-test/oml/osmo-bts.cfg b/ttcn3-bts-test/oml/osmo-bts.cfg new file mode 100644 index 0000000..4ed1951 --- /dev/null +++ b/ttcn3-bts-test/oml/osmo-bts.cfg @@ -0,0 +1,85 @@ +! +! OsmoBTS (0.4.0.446-e0fb) configuration saved from vty +!! +! +log file /data/osmo-bts.log + logging filter all 1 + logging color 0 + logging print category 1 + logging timestamp 1 + logging print extended-timestamp 1 + logging level rsl info + logging level oml info + logging level rll notice + logging level rr notice + logging level meas info + logging level pag info + logging level l1c info + logging level l1p notice + logging level dsp info + logging level pcu debug + logging level ho notice + logging level trx info + logging level loop notice + logging level abis notice + logging level rtp notice + logging level sum notice + logging level lglobal notice + logging level llapd notice + logging level linp notice + logging level lmux notice + logging level lmi notice + logging level lmib debug + logging level lsms notice + logging level lctrl notice + logging level lgtp notice + logging level lstats notice + logging level lgsup notice + logging level loap notice + logging level lss7 notice + logging level lsccp notice + logging level lsua notice + logging level lm3ua notice +! +line vty + no login + bind 0.0.0.0 +! +e1_input + e1_line 0 driver ipa + e1_line 0 port 0 + no e1_line 0 keepalive +phy 0 + osmotrx ip local 172.18.9.20 + osmotrx ip remote 172.18.9.21 + osmotrx fn-advance 20 + osmotrx rts-advance 5 + instance 0 + osmotrx rx-gain 10 + osmotrx tx-attenuation 0 +bts 0 + band DCS1800 + ipa unit-id 1234 0 + oml remote-ip 172.18.9.10 + rtp jitter-buffer 100 + paging queue-size 200 + paging lifetime 0 + uplink-power-target -75 + gsmtap-sapi rach + gsmtap-sapi agch + gsmtap-sapi bcch + gsmtap-sapi pch + gsmtap-sapi sdcch + gsmtap-sapi sacch + min-qual-rach 50 + min-qual-norm -5 + !settsc + pcu-socket /data/unix/pcu_sock + trx 0 + power-ramp max-initial 0 mdBm + power-ramp step-size 2000 mdB + power-ramp step-interval 1 + ms-power-control dsp + phy 0 instance 0 +ctrl + bind 0.0.0.0 -- To view, visit https://gerrit.osmocom.org/14271 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I97db9c74c56ca93c75e5e5226955799cd945eec0 Gerrit-Change-Number: 14271 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 20:01:36 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 20:01:36 +0000 Subject: Change in docker-playground[master]: osmoocm-bb-host-master: Build virtphy, not only trxcon In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14268 ) Change subject: osmoocm-bb-host-master: Build virtphy, not only trxcon ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14268 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0aabd73e2778b9144aa7945f25cae5cefea4111b Gerrit-Change-Number: 14268 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Wed, 29 May 2019 20:01:36 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 20:01:48 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 20:01:48 +0000 Subject: Change in docker-playground[master]: ttcn3-bts-test/jenkins.sh: Move start of containers into shell functions In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14269 ) Change subject: ttcn3-bts-test/jenkins.sh: Move start of containers into shell functions ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14269 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If9ac580aa5f0745468f69d413aa732891acb4a1c Gerrit-Change-Number: 14269 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Wed, 29 May 2019 20:01:48 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 20:02:58 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 20:02:58 +0000 Subject: Change in docker-playground[master]: ttcn3-bts-test: Add virtphy based PCUIF tests In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14270 ) Change subject: ttcn3-bts-test: Add virtphy based PCUIF tests ...................................................................... Patch Set 1: Verified+1 Code-Review+2 the interesting question here is whether jenkins can deal with concatenated junit xml output, as we're now running titan multiple times, generating multiple junit xml files. Guess there's only one way to find out... -- To view, visit https://gerrit.osmocom.org/14270 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2f17f03194a4dfa0abca51b0d3e22b3934d08a9a Gerrit-Change-Number: 14270 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Wed, 29 May 2019 20:02:58 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 20:02:59 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 20:02:59 +0000 Subject: Change in docker-playground[master]: osmoocm-bb-host-master: Build virtphy, not only trxcon In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14268 ) Change subject: osmoocm-bb-host-master: Build virtphy, not only trxcon ...................................................................... osmoocm-bb-host-master: Build virtphy, not only trxcon There are some BTS_Tests which (so far) don't yet work with trxcon hence require virtphy. Change-Id: I0aabd73e2778b9144aa7945f25cae5cefea4111b --- M osmocom-bb-host-master/Dockerfile 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/osmocom-bb-host-master/Dockerfile b/osmocom-bb-host-master/Dockerfile index 6ec0c9a..a4c8c16 100644 --- a/osmocom-bb-host-master/Dockerfile +++ b/osmocom-bb-host-master/Dockerfile @@ -34,6 +34,11 @@ ./configure && \ make -j8 install +RUN cd osmocom-bb/src/host/virt_phy && \ + autoreconf -fi && \ + ./configure && \ + make -j8 install + RUN mkdir -p /data/unix VOLUME /data -- To view, visit https://gerrit.osmocom.org/14268 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I0aabd73e2778b9144aa7945f25cae5cefea4111b Gerrit-Change-Number: 14268 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 20:02:59 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 20:02:59 +0000 Subject: Change in docker-playground[master]: ttcn3-bts-test/jenkins.sh: Move start of containers into shell functions In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14269 ) Change subject: ttcn3-bts-test/jenkins.sh: Move start of containers into shell functions ...................................................................... ttcn3-bts-test/jenkins.sh: Move start of containers into shell functions Change-Id: If9ac580aa5f0745468f69d413aa732891acb4a1c --- M ttcn3-bts-test/jenkins.sh 1 file changed, 61 insertions(+), 46 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/ttcn3-bts-test/jenkins.sh b/ttcn3-bts-test/jenkins.sh index eb96e59..20f9373 100755 --- a/ttcn3-bts-test/jenkins.sh +++ b/ttcn3-bts-test/jenkins.sh @@ -11,6 +11,62 @@ "debian-stretch-titan" \ "ttcn3-bts-test" +start_bsc() { + echo Starting container with BSC + docker run --rm \ + --network $NET_NAME --ip 172.18.9.11 \ + -v $VOL_BASE_DIR/bsc:/data \ + --name ${BUILD_TAG}-bsc -d \ + $REPO_USER/osmo-bsc-$IMAGE_SUFFIX \ + osmo-bsc -c /data/osmo-bsc.cfg +} + +start_bts() { + echo Starting container with BTS + docker run --rm \ + --network $NET_NAME --ip 172.18.9.20 \ + -v $VOL_BASE_DIR/bts:/data \ + -v $VOL_BASE_DIR/unix:/data/unix \ + --name ${BUILD_TAG}-bts -d \ + $REPO_USER/osmo-bts-$IMAGE_SUFFIX \ + /usr/local/bin/respawn.sh osmo-bts-trx -c /data/osmo-bts.cfg -i 172.18.9.10 +} + +start_fake_trx() { + echo Starting container with fake_trx + docker run --rm \ + --network $NET_NAME --ip 172.18.9.21 \ + -v $VOL_BASE_DIR/fake_trx:/data \ + --name ${BUILD_TAG}-fake_trx -d \ + $REPO_USER/osmocom-bb-host-master \ + /tmp/osmocom-bb/src/target/trx_toolkit/fake_trx.py \ + --log-file-name /data/fake_trx.log \ + --log-file-level DEBUG \ + --log-level INFO \ + -R 172.18.9.20 -r 172.18.9.22 +} + +start_trxcon() { + echo Starting container with trxcon + docker run --rm \ + --network $NET_NAME --ip 172.18.9.22 \ + -v $VOL_BASE_DIR/unix:/data/unix \ + --name ${BUILD_TAG}-trxcon -d \ + $REPO_USER/osmocom-bb-host-master \ + trxcon -i 172.18.9.21 -s /data/unix/osmocom_l2 +} + +start_testsuite() { + echo Starting container with BTS testsuite + docker run --rm \ + --network $NET_NAME --ip 172.18.9.10 \ + -e "TTCN3_PCAP_PATH=/data" \ + -v $VOL_BASE_DIR/bts-tester:/data \ + -v $VOL_BASE_DIR/unix:/data/unix \ + --name ${BUILD_TAG}-ttcn3-bts-test \ + $REPO_USER/ttcn3-bts-test +} + network_create 172.18.9.0/24 mkdir $VOL_BASE_DIR/bts-tester @@ -28,52 +84,11 @@ mkdir $VOL_BASE_DIR/fake_trx -echo Starting container with BSC -docker run --rm \ - --network $NET_NAME --ip 172.18.9.11 \ - -v $VOL_BASE_DIR/bsc:/data \ - --name ${BUILD_TAG}-bsc -d \ - $REPO_USER/osmo-bsc-$IMAGE_SUFFIX \ - osmo-bsc -c /data/osmo-bsc.cfg - -echo Starting container with BTS -docker run --rm \ - --network $NET_NAME --ip 172.18.9.20 \ - -v $VOL_BASE_DIR/bts:/data \ - -v $VOL_BASE_DIR/unix:/data/unix \ - --name ${BUILD_TAG}-bts -d \ - $REPO_USER/osmo-bts-$IMAGE_SUFFIX \ - /usr/local/bin/respawn.sh osmo-bts-trx -c /data/osmo-bts.cfg -i 172.18.9.10 - -echo Starting container with fake_trx -docker run --rm \ - --network $NET_NAME --ip 172.18.9.21 \ - -v $VOL_BASE_DIR/fake_trx:/data \ - --name ${BUILD_TAG}-fake_trx -d \ - $REPO_USER/osmocom-bb-host-master \ - /tmp/osmocom-bb/src/target/trx_toolkit/fake_trx.py \ - --log-file-name /data/fake_trx.log \ - --log-file-level DEBUG \ - --log-level INFO \ - -R 172.18.9.20 -r 172.18.9.22 - -echo Starting container with trxcon -docker run --rm \ - --network $NET_NAME --ip 172.18.9.22 \ - -v $VOL_BASE_DIR/unix:/data/unix \ - --name ${BUILD_TAG}-trxcon -d \ - $REPO_USER/osmocom-bb-host-master \ - trxcon -i 172.18.9.21 -s /data/unix/osmocom_l2 - - -echo Starting container with BTS testsuite -docker run --rm \ - --network $NET_NAME --ip 172.18.9.10 \ - -e "TTCN3_PCAP_PATH=/data" \ - -v $VOL_BASE_DIR/bts-tester:/data \ - -v $VOL_BASE_DIR/unix:/data/unix \ - --name ${BUILD_TAG}-ttcn3-bts-test \ - $REPO_USER/ttcn3-bts-test +start_bsc +start_bts +start_fake_trx +start_trxcon +start_testsuite echo Stopping containers docker container kill ${BUILD_TAG}-trxcon -- To view, visit https://gerrit.osmocom.org/14269 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If9ac580aa5f0745468f69d413aa732891acb4a1c Gerrit-Change-Number: 14269 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 20:03:00 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 20:03:00 +0000 Subject: Change in docker-playground[master]: ttcn3-bts-test: Add virtphy based PCUIF tests In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14270 ) Change subject: ttcn3-bts-test: Add virtphy based PCUIF tests ...................................................................... ttcn3-bts-test: Add virtphy based PCUIF tests Some tests require GPRS features not yet present in trxcon, so we have to fall back using virtphy. Change-Id: I2f17f03194a4dfa0abca51b0d3e22b3934d08a9a --- M ttcn3-bts-test/jenkins.sh A ttcn3-bts-test/virtphy/BTS_Tests.cfg A ttcn3-bts-test/virtphy/osmo-bts.cfg 3 files changed, 142 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/ttcn3-bts-test/jenkins.sh b/ttcn3-bts-test/jenkins.sh index 20f9373..4feb8f5 100755 --- a/ttcn3-bts-test/jenkins.sh +++ b/ttcn3-bts-test/jenkins.sh @@ -22,14 +22,20 @@ } start_bts() { + local variant + variant="$1" echo Starting container with BTS + if [ -z "$variant" ]; then + echo ERROR: You have to specify a BTS variant + exit 23 + fi docker run --rm \ --network $NET_NAME --ip 172.18.9.20 \ -v $VOL_BASE_DIR/bts:/data \ -v $VOL_BASE_DIR/unix:/data/unix \ --name ${BUILD_TAG}-bts -d \ $REPO_USER/osmo-bts-$IMAGE_SUFFIX \ - /usr/local/bin/respawn.sh osmo-bts-trx -c /data/osmo-bts.cfg -i 172.18.9.10 + /usr/local/bin/respawn.sh osmo-bts-$variant -c /data/osmo-bts.cfg -i 172.18.9.10 } start_fake_trx() { @@ -56,6 +62,16 @@ trxcon -i 172.18.9.21 -s /data/unix/osmocom_l2 } +start_virtphy() { + echo Starting container with virtphy + docker run --rm \ + --network $NET_NAME --ip 172.18.9.22 \ + -v $VOL_BASE_DIR/unix:/data/unix \ + --name ${BUILD_TAG}-virtphy -d \ + $REPO_USER/osmocom-bb-host-master \ + virtphy -s /data/unix/osmocom_l2 +} + start_testsuite() { echo Starting container with BTS testsuite docker run --rm \ @@ -84,16 +100,30 @@ mkdir $VOL_BASE_DIR/fake_trx +# 1) classic test suite with BSC for OML and trxcon+fake_trx start_bsc -start_bts +start_bts trx start_fake_trx start_trxcon start_testsuite -echo Stopping containers +# 2) some GPRS tests require virt_phy +echo "Changing to virtphy configuration" +# switch from osmo-bts-trx + trxcon + faketrx to virtphy + osmo-bts-virtual docker container kill ${BUILD_TAG}-trxcon docker container kill ${BUILD_TAG}-fake_trx docker container kill ${BUILD_TAG}-bts +cp virtphy/osmo-bts.cfg $VOL_BASE_DIR/bts/ +start_bts virtual +start_virtphy +# ... and execute the testsuite again with different cfg +cp virtphy/BTS_Tests.cfg $VOL_BASE_DIR/bts-tester/ +start_testsuite + + +echo Stopping containers +docker container kill ${BUILD_TAG}-virtphy +docker container kill ${BUILD_TAG}-bts docker container kill ${BUILD_TAG}-bsc network_remove diff --git a/ttcn3-bts-test/virtphy/BTS_Tests.cfg b/ttcn3-bts-test/virtphy/BTS_Tests.cfg new file mode 100644 index 0000000..ee3455d --- /dev/null +++ b/ttcn3-bts-test/virtphy/BTS_Tests.cfg @@ -0,0 +1,29 @@ +[ORDERED_INCLUDE] +"/osmo-ttcn3-hacks/Common.cfg" +"/osmo-ttcn3-hacks/bts/BTS_Tests.default" + +[LOGGING] +*.JUnitLogger.filename_stem := "junit-xml-virtphy" + +[TESTPORT_PARAMETERS] +*.BTSVTY.CTRL_HOSTNAME := "172.18.9.20" +*.BSCVTY.CTRL_HOSTNAME := "172.18.9.11" + +[MODULE_PARAMETERS] +BTS_Tests.mp_rsl_ip := "172.18.9.10" +BTS_Tests.mp_bts_trxc_ip := "172.18.9.21" +BTS_Tests.mp_pcu_socket := "/data/unix/pcu_sock" +L1CTL_PortType.m_l1ctl_sock_path := "/data/unix/osmocom_l2" +BTS_Tests.mp_ctrl_ip := "172.18.9.20" +BTS_Tests.mp_l1_supports_gprs := true +BTS_Tests.mp_bts_trxc_port := -1; + +[MAIN_CONTROLLER] + +[EXECUTE] +BTS_Tests.TC_pcu_data_req_pdtch +BTS_Tests.TC_pcu_data_req_ptcch +BTS_Tests.TC_pcu_data_req_wrong_bts +BTS_Tests.TC_pcu_data_req_wrong_trx +BTS_Tests.TC_pcu_data_req_wrong_ts +BTS_Tests.TC_pcu_data_req_ts_inactive diff --git a/ttcn3-bts-test/virtphy/osmo-bts.cfg b/ttcn3-bts-test/virtphy/osmo-bts.cfg new file mode 100644 index 0000000..5957f03 --- /dev/null +++ b/ttcn3-bts-test/virtphy/osmo-bts.cfg @@ -0,0 +1,80 @@ +! +! OsmoBTS (0.4.0.446-e0fb) configuration saved from vty +!! +! +log file /data/osmo-bts.log + logging filter all 1 + logging color 0 + logging print category 1 + logging timestamp 1 + logging print extended-timestamp 1 + logging level rsl info + logging level oml info + logging level rll notice + logging level rr notice + logging level meas info + logging level pag info + logging level l1c info + logging level l1p notice + logging level dsp info + logging level pcu debug + logging level ho notice + logging level trx info + logging level loop notice + logging level abis notice + logging level rtp notice + logging level sum notice + logging level lglobal notice + logging level llapd notice + logging level linp notice + logging level lmux notice + logging level lmi notice + logging level lmib debug + logging level lsms notice + logging level lctrl notice + logging level lgtp notice + logging level lstats notice + logging level lgsup notice + logging level loap notice + logging level lss7 notice + logging level lsccp notice + logging level lsua notice + logging level lm3ua notice +! +line vty + no login + bind 0.0.0.0 +! +e1_input + e1_line 0 driver ipa + e1_line 0 port 0 + no e1_line 0 keepalive +phy 0 + !virtual-um ms-multicast-group 239.193.23.1 + !virtual-um bts-multicast-group 239.193.23.2 + instance 0 +bts 0 + band DCS1800 + ipa unit-id 1234 0 + oml remote-ip 172.18.9.11 + rtp jitter-buffer 100 + paging queue-size 200 + paging lifetime 0 + uplink-power-target -75 + gsmtap-sapi rach + gsmtap-sapi agch + gsmtap-sapi bcch + gsmtap-sapi pch + gsmtap-sapi sdcch + gsmtap-sapi sacch + min-qual-rach 50 + min-qual-norm -5 + pcu-socket /data/unix/pcu_sock + trx 0 + power-ramp max-initial 0 mdBm + power-ramp step-size 2000 mdB + power-ramp step-interval 1 + ms-power-control dsp + phy 0 instance 0 +ctrl + bind 0.0.0.0 -- To view, visit https://gerrit.osmocom.org/14270 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I2f17f03194a4dfa0abca51b0d3e22b3934d08a9a Gerrit-Change-Number: 14270 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 23:29:49 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 23:29:49 +0000 Subject: Change in docker-playground[master]: ttcn3-bts-test: Execute OML tests without BSC In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14271 ) Change subject: ttcn3-bts-test: Execute OML tests without BSC ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14271 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I97db9c74c56ca93c75e5e5226955799cd945eec0 Gerrit-Change-Number: 14271 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Wed, 29 May 2019 23:29:49 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 23:29:50 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 29 May 2019 23:29:50 +0000 Subject: Change in docker-playground[master]: ttcn3-bts-test: Execute OML tests without BSC In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14271 ) Change subject: ttcn3-bts-test: Execute OML tests without BSC ...................................................................... ttcn3-bts-test: Execute OML tests without BSC Run the testsuite one more time; this time for OML tests which require us to run without a BSC. We can run those with trxcon and omso-bts-trx and don't need virtphy for them. Related: OS#4031 Depends: osmo-ttcn3-hacks I82bb85b684d2db3a6b1e96a68ffde03e22affa6b Change-Id: I97db9c74c56ca93c75e5e5226955799cd945eec0 --- M ttcn3-bts-test/jenkins.sh A ttcn3-bts-test/oml/BTS_Tests.cfg A ttcn3-bts-test/oml/osmo-bts.cfg 3 files changed, 127 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/ttcn3-bts-test/jenkins.sh b/ttcn3-bts-test/jenkins.sh index 4feb8f5..2d49e0b 100755 --- a/ttcn3-bts-test/jenkins.sh +++ b/ttcn3-bts-test/jenkins.sh @@ -118,13 +118,26 @@ start_virtphy # ... and execute the testsuite again with different cfg cp virtphy/BTS_Tests.cfg $VOL_BASE_DIR/bts-tester/ -start_testsuite +#start_testsuite - -echo Stopping containers +# 3) OML tests require us to run without BSC +docker container kill ${BUILD_TAG}-bsc +# switch back from virtphy + osmo-bts-virtual to osmo-bts-trx docker container kill ${BUILD_TAG}-virtphy docker container kill ${BUILD_TAG}-bts -docker container kill ${BUILD_TAG}-bsc +cp oml/osmo-bts.cfg $VOL_BASE_DIR/bts/ +start_bts trx +start_fake_trx +start_trxcon +# ... and execute the testsuite again with different cfg +cp oml/BTS_Tests.cfg $VOL_BASE_DIR/bts-tester/ +start_testsuite + +echo Stopping containers +docker container kill ${BUILD_TAG}-trxcon +docker container kill ${BUILD_TAG}-fake_trx +docker container kill ${BUILD_TAG}-bts + network_remove rm -rf $VOL_BASE_DIR/unix diff --git a/ttcn3-bts-test/oml/BTS_Tests.cfg b/ttcn3-bts-test/oml/BTS_Tests.cfg new file mode 100644 index 0000000..c7215e1 --- /dev/null +++ b/ttcn3-bts-test/oml/BTS_Tests.cfg @@ -0,0 +1,25 @@ +[ORDERED_INCLUDE] +"/osmo-ttcn3-hacks/Common.cfg" +"/osmo-ttcn3-hacks/bts/BTS_Tests.default" + +[LOGGING] +*.JUnitLogger.filename_stem := "junit-xml-oml" + +[TESTPORT_PARAMETERS] +*.BTSVTY.CTRL_HOSTNAME := "172.18.9.20" +*.BSCVTY.CTRL_HOSTNAME := "172.18.9.11" + +[MODULE_PARAMETERS] +BTS_Tests.mp_rsl_ip := "172.18.9.10" +BTS_Tests.mp_bts_trxc_ip := "172.18.9.21" +BTS_Tests.mp_pcu_socket := "/data/unix/pcu_sock" +L1CTL_PortType.m_l1ctl_sock_path := "/data/unix/osmocom_l2" +BTS_Tests.mp_ctrl_ip := "172.18.9.20" + +BTS_Tests_OML.mp_oml_ip := "172.18.9.10" +BTS_Tests_OML.mp_oml_port := 3002 + +[MAIN_CONTROLLER] + +[EXECUTE] +BTS_Tests_OML.control diff --git a/ttcn3-bts-test/oml/osmo-bts.cfg b/ttcn3-bts-test/oml/osmo-bts.cfg new file mode 100644 index 0000000..4ed1951 --- /dev/null +++ b/ttcn3-bts-test/oml/osmo-bts.cfg @@ -0,0 +1,85 @@ +! +! OsmoBTS (0.4.0.446-e0fb) configuration saved from vty +!! +! +log file /data/osmo-bts.log + logging filter all 1 + logging color 0 + logging print category 1 + logging timestamp 1 + logging print extended-timestamp 1 + logging level rsl info + logging level oml info + logging level rll notice + logging level rr notice + logging level meas info + logging level pag info + logging level l1c info + logging level l1p notice + logging level dsp info + logging level pcu debug + logging level ho notice + logging level trx info + logging level loop notice + logging level abis notice + logging level rtp notice + logging level sum notice + logging level lglobal notice + logging level llapd notice + logging level linp notice + logging level lmux notice + logging level lmi notice + logging level lmib debug + logging level lsms notice + logging level lctrl notice + logging level lgtp notice + logging level lstats notice + logging level lgsup notice + logging level loap notice + logging level lss7 notice + logging level lsccp notice + logging level lsua notice + logging level lm3ua notice +! +line vty + no login + bind 0.0.0.0 +! +e1_input + e1_line 0 driver ipa + e1_line 0 port 0 + no e1_line 0 keepalive +phy 0 + osmotrx ip local 172.18.9.20 + osmotrx ip remote 172.18.9.21 + osmotrx fn-advance 20 + osmotrx rts-advance 5 + instance 0 + osmotrx rx-gain 10 + osmotrx tx-attenuation 0 +bts 0 + band DCS1800 + ipa unit-id 1234 0 + oml remote-ip 172.18.9.10 + rtp jitter-buffer 100 + paging queue-size 200 + paging lifetime 0 + uplink-power-target -75 + gsmtap-sapi rach + gsmtap-sapi agch + gsmtap-sapi bcch + gsmtap-sapi pch + gsmtap-sapi sdcch + gsmtap-sapi sacch + min-qual-rach 50 + min-qual-norm -5 + !settsc + pcu-socket /data/unix/pcu_sock + trx 0 + power-ramp max-initial 0 mdBm + power-ramp step-size 2000 mdB + power-ramp step-interval 1 + ms-power-control dsp + phy 0 instance 0 +ctrl + bind 0.0.0.0 -- To view, visit https://gerrit.osmocom.org/14271 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I97db9c74c56ca93c75e5e5226955799cd945eec0 Gerrit-Change-Number: 14271 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 23:47:36 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 29 May 2019 23:47:36 +0000 Subject: Change in osmocom-bb[master]: trxcon/l1ctl.c: on L1CTL_DM_EST_REQ, determine pchan_config first Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14272 Change subject: trxcon/l1ctl.c: on L1CTL_DM_EST_REQ, determine pchan_config first ...................................................................... trxcon/l1ctl.c: on L1CTL_DM_EST_REQ, determine pchan_config first It makes sense to do this first, before tuning to a different ARFCN and changing the training sequence. Otherwise, if no multi-frame configuration is found, trxcon would switch to a different channel and then remain inactive there. Change-Id: I274588ce3a9c49372b5da0629930afece46f799c --- M src/host/trxcon/l1ctl.c 1 file changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/72/14272/1 diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c index d745295..fff1c2b 100644 --- a/src/host/trxcon/l1ctl.c +++ b/src/host/trxcon/l1ctl.c @@ -637,6 +637,14 @@ "(tn=%u, chan_nr=0x%02x, tsc=%u, tch_mode=0x%02x)\n", tn, chan_nr, est_req->tsc, est_req->tch_mode); + /* Determine channel config */ + config = sched_trx_chan_nr2pchan_config(chan_nr); + if (config == GSM_PCHAN_NONE) { + LOGP(DL1C, LOGL_ERROR, "Couldn't determine channel config\n"); + rc = -EINVAL; + goto exit; + } + /* Frequency hopping? */ if (est_req->h) rc = l1ctl_proc_est_req_h1(l1l->trx, &est_req->h1); @@ -648,14 +656,6 @@ /* Update TSC (Training Sequence Code) */ l1l->trx->tsc = est_req->tsc; - /* Determine channel config */ - config = sched_trx_chan_nr2pchan_config(chan_nr); - if (config == GSM_PCHAN_NONE) { - LOGP(DL1C, LOGL_ERROR, "Couldn't determine channel config\n"); - rc = -EINVAL; - goto exit; - } - /* Configure requested TS */ rc = sched_trx_configure_ts(l1l->trx, tn, config); ts = l1l->trx->ts_list[tn]; -- To view, visit https://gerrit.osmocom.org/14272 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I274588ce3a9c49372b5da0629930afece46f799c Gerrit-Change-Number: 14272 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 23:47:37 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 29 May 2019 23:47:37 +0000 Subject: Change in osmocom-bb[master]: trxcon/scheduler: move PRIM_IS[_EXT]_RACH macros to sched_trx.h Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14273 Change subject: trxcon/scheduler: move PRIM_IS[_EXT]_RACH macros to sched_trx.h ...................................................................... trxcon/scheduler: move PRIM_IS[_EXT]_RACH macros to sched_trx.h Both PRIM_IS_RACH() and PRIM_IS_EXT_RACH() macros to be used for handover RACH detection in the follow up changes, thus we need have them widely available. Let's also give them better names: PRIM_IS_EXT_RACH -> PRIM_IS_RACH11 PRIM_IS_RACH -> PRIM_IS_RACH8 and introduce a new generic one for checking whether a given primitive is RACH in general (either 8-bit or 11-bit) or not. Change-Id: Ibc39c57fda000647be1829786f6423dcf3f435cd --- M src/host/trxcon/sched_lchan_rach.c M src/host/trxcon/sched_trx.h 2 files changed, 13 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/73/14273/1 diff --git a/src/host/trxcon/sched_lchan_rach.c b/src/host/trxcon/sched_lchan_rach.c index 565d693..7d202b8 100644 --- a/src/host/trxcon/sched_lchan_rach.c +++ b/src/host/trxcon/sched_lchan_rach.c @@ -40,12 +40,6 @@ #include "trx_if.h" #include "l1ctl.h" -/* FIXME: we need a better way to identify / distinguish primitives */ -#define PRIM_IS_EXT_RACH(prim) \ - (prim->payload_len == sizeof(struct l1ctl_ext_rach_req)) -#define PRIM_IS_RACH(prim) \ - (prim->payload_len == sizeof(struct l1ctl_rach_req)) - /* 3GPP TS 05.02, section 5.2.7 "Access burst (AB)" */ #define RACH_EXT_TAIL_BITS_LEN 8 #define RACH_SYNCH_SEQ_LEN 41 @@ -94,7 +88,7 @@ int i, rc; /* Is it extended (11-bit) RACH or not? */ - if (PRIM_IS_EXT_RACH(lchan->prim)) { + if (PRIM_IS_RACH11(lchan->prim)) { ext_req = (struct l1ctl_ext_rach_req *) lchan->prim->payload; synch_seq = ext_req->synch_seq; @@ -120,7 +114,7 @@ sched_prim_drop(lchan); return rc; } - } else if (PRIM_IS_RACH(lchan->prim)) { + } else if (PRIM_IS_RACH8(lchan->prim)) { req = (struct l1ctl_rach_req *) lchan->prim->payload; synch_seq = RACH_SYNCH_SEQ_TS0; @@ -162,7 +156,7 @@ memset(burst_ptr, 0, burst + GSM_BURST_LEN - burst_ptr); LOGP(DSCHD, LOGL_DEBUG, "Transmitting %s RACH (%s) fn=%u\n", - PRIM_IS_EXT_RACH(lchan->prim) ? "extended (11-bit)" : "regular (8-bit)", + PRIM_IS_RACH11(lchan->prim) ? "extended (11-bit)" : "regular (8-bit)", get_value_string(rach_synch_seq_names, synch_seq), fn); /* Forward burst to scheduler */ diff --git a/src/host/trxcon/sched_trx.h b/src/host/trxcon/sched_trx.h index fcb78a7..6ef9ce4 100644 --- a/src/host/trxcon/sched_trx.h +++ b/src/host/trxcon/sched_trx.h @@ -309,6 +309,16 @@ #define CHAN_IS_SACCH(chan) \ (trx_lchan_desc[chan].link_id & TRX_CH_LID_SACCH) +/* FIXME: we need a better way to identify / distinguish primitives */ +#define PRIM_IS_RACH11(prim) \ + (prim->payload_len == sizeof(struct l1ctl_ext_rach_req)) + +#define PRIM_IS_RACH8(prim) \ + (prim->payload_len == sizeof(struct l1ctl_rach_req)) + +#define PRIM_IS_RACH(prim) \ + (PRIM_IS_RACH8(prim) || PRIM_IS_RACH11(prim)) + #define PRIM_IS_TCH(prim) \ (CHAN_IS_TCH(prim->chan) && prim->payload_len != GSM_MACBLOCK_LEN) -- To view, visit https://gerrit.osmocom.org/14273 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ibc39c57fda000647be1829786f6423dcf3f435cd Gerrit-Change-Number: 14273 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed May 29 23:47:37 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 29 May 2019 23:47:37 +0000 Subject: Change in osmocom-bb[master]: trxcon/l1ctl.c: properly handle handover RACH request Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14274 Change subject: trxcon/l1ctl.c: properly handle handover RACH request ...................................................................... trxcon/l1ctl.c: properly handle handover RACH request During the handover the MS needs to release the existing dedicated channel(s), establish the new one(s) as indicated by the network, and then, depending on the synchronisation state, send one or more HANDOVER ACCESS messages carried by Access Bursts. In order to implement this, trxcon needs to be able to transmit Access Bursts on any TDMA timeslot regardless of the logical channel type and the associated handler, i.e. != TRXC_RACH. The controlling side on L1CTL (layer23 or TTCN-3) needs to send one or more L1CTL_RESET_REQ message(s) with properly populated UL info header. Otherwise a regular RACH on TS0 is assumed. Change-Id: Ia967820a536c99966ba2c60b63d2ea9edb093f46 --- M src/host/trxcon/l1ctl.c M src/host/trxcon/sched_trx.c 2 files changed, 17 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/74/14274/1 diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c index fff1c2b..ce83f95 100644 --- a/src/host/trxcon/l1ctl.c +++ b/src/host/trxcon/l1ctl.c @@ -509,7 +509,6 @@ struct l1ctl_rach_req *req; struct l1ctl_info_ul *ul; struct trx_ts_prim *prim; - uint8_t chan_nr, link_id; size_t len; int rc; @@ -534,25 +533,24 @@ "(offset=%u, ra=0x%02x)\n", req->offset, req->ra); } - /** - * FIXME: l1ctl_info_ul doesn't provide channel description - * FIXME: Can we use other than TS0? - */ - chan_nr = RSL_CHAN_RACH; - link_id = 0x00; + /* The controlling L1CTL side always include the UL info header, + * but may leave it empty. We assume RACH is on TS0 in this case. */ + if (ul->chan_nr == 0x00) { + LOGP(DL1C, LOGL_NOTICE, "The UL info header is empty, " + "assuming RACH is on TS0\n"); + ul->chan_nr = RSL_CHAN_RACH; + } /* Init a new primitive */ - rc = sched_prim_init(l1l->trx, &prim, len, chan_nr, link_id); + rc = sched_prim_init(l1l->trx, &prim, len, ul->chan_nr, ul->link_id); if (rc) goto exit; /** - * Push this primitive to transmit queue - * - * FIXME: what if requested TS is not configured? - * Or what if one (such as TCH) has no TRXC_RACH slots? + * Push this primitive to the transmit queue. + * Indicated timeslot needs to be configured. */ - rc = sched_prim_push(l1l->trx, prim, chan_nr); + rc = sched_prim_push(l1l->trx, prim, ul->chan_nr); if (rc) { talloc_free(prim); goto exit; diff --git a/src/host/trxcon/sched_trx.c b/src/host/trxcon/sched_trx.c index 62fe870..37d1acf 100644 --- a/src/host/trxcon/sched_trx.c +++ b/src/host/trxcon/sched_trx.c @@ -35,6 +35,7 @@ #include #include +#include "l1ctl_proto.h" #include "scheduler.h" #include "sched_trx.h" #include "trx_if.h" @@ -116,6 +117,11 @@ if (lchan->prim == NULL) continue; + /* Handover RACH needs to be handled regardless of the + * current channel type and the associated handler. */ + if (PRIM_IS_RACH(lchan->prim) && lchan->prim->chan != TRXC_RACH) + handler = trx_lchan_desc[TRXC_RACH].tx_fn; + /* Poke lchan handler */ handler(trx, ts, lchan, fn, bid); } -- To view, visit https://gerrit.osmocom.org/14274 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ia967820a536c99966ba2c60b63d2ea9edb093f46 Gerrit-Change-Number: 14274 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 30 00:43:13 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 30 May 2019 00:43:13 +0000 Subject: Change in osmo-bts[master]: clear GPRS indicator in SI3 while PCU is disconnected In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/10170 ) Change subject: clear GPRS indicator in SI3 while PCU is disconnected ...................................................................... Patch Set 5: (1 comment) https://gerrit.osmocom.org/#/c/10170/5/src/common/pcu_sock.c File src/common/pcu_sock.c: https://gerrit.osmocom.org/#/c/10170/5/src/common/pcu_sock.c at 602 PS5, Line 602: regenerate_si3_restoctets > I think this should be rather done in pcu_sock_accept(). [?] well, we "abuse" the PCU_VERSION "TXT" indication as some kind of logical "hello" message. I think it's better to wait for that rather than some random process having opened a unix domain socket without ever even having written a single valid message (or anything) to it. -- To view, visit https://gerrit.osmocom.org/10170 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1a6f5c636c0fe098ee31c280d4572a3f8122b44b Gerrit-Change-Number: 10170 Gerrit-PatchSet: 5 Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Max Gerrit-Comment-Date: Thu, 30 May 2019 00:43:13 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 30 08:45:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 30 May 2019 08:45:16 +0000 Subject: Change in osmocom-bb[master]: trxcon/l1ctl.c: on L1CTL_DM_EST_REQ, determine pchan_config first In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14272 ) Change subject: trxcon/l1ctl.c: on L1CTL_DM_EST_REQ, determine pchan_config first ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14272 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I274588ce3a9c49372b5da0629930afece46f799c Gerrit-Change-Number: 14272 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 30 May 2019 08:45:16 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 30 08:45:44 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 30 May 2019 08:45:44 +0000 Subject: Change in osmocom-bb[master]: trxcon/scheduler: move PRIM_IS[_EXT]_RACH macros to sched_trx.h In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14273 ) Change subject: trxcon/scheduler: move PRIM_IS[_EXT]_RACH macros to sched_trx.h ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14273 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibc39c57fda000647be1829786f6423dcf3f435cd Gerrit-Change-Number: 14273 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Thu, 30 May 2019 08:45:44 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 30 08:45:46 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 30 May 2019 08:45:46 +0000 Subject: Change in osmocom-bb[master]: trxcon/l1ctl.c: on L1CTL_DM_EST_REQ, determine pchan_config first In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14272 ) Change subject: trxcon/l1ctl.c: on L1CTL_DM_EST_REQ, determine pchan_config first ...................................................................... trxcon/l1ctl.c: on L1CTL_DM_EST_REQ, determine pchan_config first It makes sense to do this first, before tuning to a different ARFCN and changing the training sequence. Otherwise, if no multi-frame configuration is found, trxcon would switch to a different channel and then remain inactive there. Change-Id: I274588ce3a9c49372b5da0629930afece46f799c --- M src/host/trxcon/l1ctl.c 1 file changed, 8 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c index d745295..fff1c2b 100644 --- a/src/host/trxcon/l1ctl.c +++ b/src/host/trxcon/l1ctl.c @@ -637,6 +637,14 @@ "(tn=%u, chan_nr=0x%02x, tsc=%u, tch_mode=0x%02x)\n", tn, chan_nr, est_req->tsc, est_req->tch_mode); + /* Determine channel config */ + config = sched_trx_chan_nr2pchan_config(chan_nr); + if (config == GSM_PCHAN_NONE) { + LOGP(DL1C, LOGL_ERROR, "Couldn't determine channel config\n"); + rc = -EINVAL; + goto exit; + } + /* Frequency hopping? */ if (est_req->h) rc = l1ctl_proc_est_req_h1(l1l->trx, &est_req->h1); @@ -648,14 +656,6 @@ /* Update TSC (Training Sequence Code) */ l1l->trx->tsc = est_req->tsc; - /* Determine channel config */ - config = sched_trx_chan_nr2pchan_config(chan_nr); - if (config == GSM_PCHAN_NONE) { - LOGP(DL1C, LOGL_ERROR, "Couldn't determine channel config\n"); - rc = -EINVAL; - goto exit; - } - /* Configure requested TS */ rc = sched_trx_configure_ts(l1l->trx, tn, config); ts = l1l->trx->ts_list[tn]; -- To view, visit https://gerrit.osmocom.org/14272 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I274588ce3a9c49372b5da0629930afece46f799c Gerrit-Change-Number: 14272 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 30 08:45:46 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 30 May 2019 08:45:46 +0000 Subject: Change in osmocom-bb[master]: trxcon/scheduler: move PRIM_IS[_EXT]_RACH macros to sched_trx.h In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14273 ) Change subject: trxcon/scheduler: move PRIM_IS[_EXT]_RACH macros to sched_trx.h ...................................................................... trxcon/scheduler: move PRIM_IS[_EXT]_RACH macros to sched_trx.h Both PRIM_IS_RACH() and PRIM_IS_EXT_RACH() macros to be used for handover RACH detection in the follow up changes, thus we need have them widely available. Let's also give them better names: PRIM_IS_EXT_RACH -> PRIM_IS_RACH11 PRIM_IS_RACH -> PRIM_IS_RACH8 and introduce a new generic one for checking whether a given primitive is RACH in general (either 8-bit or 11-bit) or not. Change-Id: Ibc39c57fda000647be1829786f6423dcf3f435cd --- M src/host/trxcon/sched_lchan_rach.c M src/host/trxcon/sched_trx.h 2 files changed, 13 insertions(+), 9 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/host/trxcon/sched_lchan_rach.c b/src/host/trxcon/sched_lchan_rach.c index 565d693..7d202b8 100644 --- a/src/host/trxcon/sched_lchan_rach.c +++ b/src/host/trxcon/sched_lchan_rach.c @@ -40,12 +40,6 @@ #include "trx_if.h" #include "l1ctl.h" -/* FIXME: we need a better way to identify / distinguish primitives */ -#define PRIM_IS_EXT_RACH(prim) \ - (prim->payload_len == sizeof(struct l1ctl_ext_rach_req)) -#define PRIM_IS_RACH(prim) \ - (prim->payload_len == sizeof(struct l1ctl_rach_req)) - /* 3GPP TS 05.02, section 5.2.7 "Access burst (AB)" */ #define RACH_EXT_TAIL_BITS_LEN 8 #define RACH_SYNCH_SEQ_LEN 41 @@ -94,7 +88,7 @@ int i, rc; /* Is it extended (11-bit) RACH or not? */ - if (PRIM_IS_EXT_RACH(lchan->prim)) { + if (PRIM_IS_RACH11(lchan->prim)) { ext_req = (struct l1ctl_ext_rach_req *) lchan->prim->payload; synch_seq = ext_req->synch_seq; @@ -120,7 +114,7 @@ sched_prim_drop(lchan); return rc; } - } else if (PRIM_IS_RACH(lchan->prim)) { + } else if (PRIM_IS_RACH8(lchan->prim)) { req = (struct l1ctl_rach_req *) lchan->prim->payload; synch_seq = RACH_SYNCH_SEQ_TS0; @@ -162,7 +156,7 @@ memset(burst_ptr, 0, burst + GSM_BURST_LEN - burst_ptr); LOGP(DSCHD, LOGL_DEBUG, "Transmitting %s RACH (%s) fn=%u\n", - PRIM_IS_EXT_RACH(lchan->prim) ? "extended (11-bit)" : "regular (8-bit)", + PRIM_IS_RACH11(lchan->prim) ? "extended (11-bit)" : "regular (8-bit)", get_value_string(rach_synch_seq_names, synch_seq), fn); /* Forward burst to scheduler */ diff --git a/src/host/trxcon/sched_trx.h b/src/host/trxcon/sched_trx.h index fcb78a7..6ef9ce4 100644 --- a/src/host/trxcon/sched_trx.h +++ b/src/host/trxcon/sched_trx.h @@ -309,6 +309,16 @@ #define CHAN_IS_SACCH(chan) \ (trx_lchan_desc[chan].link_id & TRX_CH_LID_SACCH) +/* FIXME: we need a better way to identify / distinguish primitives */ +#define PRIM_IS_RACH11(prim) \ + (prim->payload_len == sizeof(struct l1ctl_ext_rach_req)) + +#define PRIM_IS_RACH8(prim) \ + (prim->payload_len == sizeof(struct l1ctl_rach_req)) + +#define PRIM_IS_RACH(prim) \ + (PRIM_IS_RACH8(prim) || PRIM_IS_RACH11(prim)) + #define PRIM_IS_TCH(prim) \ (CHAN_IS_TCH(prim->chan) && prim->payload_len != GSM_MACBLOCK_LEN) -- To view, visit https://gerrit.osmocom.org/14273 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ibc39c57fda000647be1829786f6423dcf3f435cd Gerrit-Change-Number: 14273 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 30 13:42:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 30 May 2019 13:42:16 +0000 Subject: Change in osmocom-bb[master]: trxcon: Suppress POWERON to TRX if we're already powered on. Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14275 Change subject: trxcon: Suppress POWERON to TRX if we're already powered on. ...................................................................... trxcon: Suppress POWERON to TRX if we're already powered on. The existing logic unconditionally wants to send a POWERUP command whenever L1CTL_DM_EST_REQ is received. That's odd, as it's perfectly legal to establish, then release (DM_REL_REQ) and finally establish another connection. The existing fsm state could unfortunately not been used, as it's a mixture between the TRX connection state and the command/response state. I'm explicitly not rejecting POWEROFF despite trxcon thinking it's powered up: This can happen if fake_trx is restarted while trxcon is running. Change-Id: I834e8897b95a2490811319697fc7cab6076db480 --- M src/host/trxcon/trx_if.c M src/host/trxcon/trx_if.h 2 files changed, 11 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/75/14275/1 diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c index 35ad3c0..894aed2 100644 --- a/src/host/trxcon/trx_if.c +++ b/src/host/trxcon/trx_if.c @@ -254,6 +254,10 @@ int trx_if_cmd_poweron(struct trx_instance *trx) { + if (trx->powered_up) { + LOGP(DTRX, LOGL_INFO, "Suppressing POWERON as we're already powered up\n"); + return 0; + } return trx_ctrl_cmd(trx, 1, "POWERON", ""); } @@ -495,10 +499,14 @@ } /* Trigger state machine */ - if (!strncmp(tcm->cmd + 4, "POWERON", 7)) + if (!strncmp(tcm->cmd + 4, "POWERON", 7)) { + trx->powered_up = true; osmo_fsm_inst_state_chg(trx->fsm, TRX_STATE_ACTIVE, 0, 0); - else if (!strncmp(tcm->cmd + 4, "POWEROFF", 8)) + } + else if (!strncmp(tcm->cmd + 4, "POWEROFF", 8)) { + trx->powered_up = false; osmo_fsm_inst_state_chg(trx->fsm, TRX_STATE_IDLE, 0, 0); + } else if (!strncmp(tcm->cmd + 4, "MEASURE", 7)) trx_if_measure_rsp_cb(trx, buf + 14); else if (!strncmp(tcm->cmd + 4, "ECHO", 4)) diff --git a/src/host/trxcon/trx_if.h b/src/host/trxcon/trx_if.h index 0b3f36f..8655c15 100644 --- a/src/host/trxcon/trx_if.h +++ b/src/host/trxcon/trx_if.h @@ -26,6 +26,7 @@ struct llist_head trx_ctrl_list; struct osmo_fsm_inst *fsm; uint32_t prev_state; + bool powered_up; /* GSM L1 specific */ uint16_t pm_band_arfcn_start; -- To view, visit https://gerrit.osmocom.org/14275 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I834e8897b95a2490811319697fc7cab6076db480 Gerrit-Change-Number: 14275 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 30 13:42:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 30 May 2019 13:42:16 +0000 Subject: Change in osmocom-bb[master]: trxcon: Dropping a to-be-transmitted message is a NOTICEable event Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14276 Change subject: trxcon: Dropping a to-be-transmitted message is a NOTICEable event ...................................................................... trxcon: Dropping a to-be-transmitted message is a NOTICEable event Change-Id: If5084feb9e847d212530b1a5985390405d91008b --- M src/host/trxcon/trx_if.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/76/14276/1 diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c index 894aed2..7d52541 100644 --- a/src/host/trxcon/trx_if.c +++ b/src/host/trxcon/trx_if.c @@ -616,7 +616,7 @@ * TODO: should we wait in TRX_STATE_RSP_WAIT state? */ if (trx->fsm->state != TRX_STATE_ACTIVE) { - LOGP(DTRXD, LOGL_DEBUG, "Ignoring TX data, " + LOGP(DTRXD, LOGL_NOTICE, "Ignoring TX data, " "transceiver isn't ready\n"); return -EAGAIN; } -- To view, visit https://gerrit.osmocom.org/14276 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If5084feb9e847d212530b1a5985390405d91008b Gerrit-Change-Number: 14276 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 30 13:45:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 30 May 2019 13:45:08 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: move f_pad_oct() to Osmocom_Types as it's generally useful Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14277 Change subject: bts: move f_pad_oct() to Osmocom_Types as it's generally useful ...................................................................... bts: move f_pad_oct() to Osmocom_Types as it's generally useful Change-Id: I4df99e5612c67006eb2998529425956fb4a664af --- M bts/BTS_Tests.ttcn M library/Osmocom_Types.ttcn 2 files changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/77/14277/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 0506e64..5481838 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -3676,14 +3676,6 @@ setverdict(pass); } -private function f_pad_oct(octetstring str, integer len, OCT1 pad) return octetstring { - var integer strlen := lengthof(str); - for (var integer i := 0; i < len-strlen; i := i+1) { - str := str & pad; - } - return str; -} - /* Send PAGING via RSL, expect it to shw up on PCU socket */ testcase TC_pcu_paging_from_rsl() runs on test_CT { f_init_pcu_test(); diff --git a/library/Osmocom_Types.ttcn b/library/Osmocom_Types.ttcn index ffd5df5..046a9ea 100644 --- a/library/Osmocom_Types.ttcn +++ b/library/Osmocom_Types.ttcn @@ -162,5 +162,13 @@ return ret; } +function f_pad_oct(octetstring str, integer len, OCT1 pad) return octetstring { + var integer strlen := lengthof(str); + for (var integer i := 0; i < len-strlen; i := i+1) { + str := str & pad; + } + return str; +} + } with { encode "RAW"; variant "FIELDORDER(msb)" } -- To view, visit https://gerrit.osmocom.org/14277 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I4df99e5612c67006eb2998529425956fb4a664af Gerrit-Change-Number: 14277 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 30 13:45:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 30 May 2019 13:45:08 +0000 Subject: Change in osmo-ttcn3-hacks[master]: LAPDm_RAW_PT: Always pad MAC blocks to their size Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14278 Change subject: LAPDm_RAW_PT: Always pad MAC blocks to their size ...................................................................... LAPDm_RAW_PT: Always pad MAC blocks to their size If a LAPDm message is shorter than the MAC block size, we must pad it before seding it to L1. trxcon e.g. would ignore any frames with the wrong length since Change-Id I258ee9f6d0124b183b1db23a73f1e523fcea89a8 Change-Id: I30bcce27f95974eaca4168a156d1548586c924d6 Related: OS#3415 --- M library/LAPDm_RAW_PT.ttcn 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/78/14278/1 diff --git a/library/LAPDm_RAW_PT.ttcn b/library/LAPDm_RAW_PT.ttcn index 164d31a..fe2d321 100644 --- a/library/LAPDm_RAW_PT.ttcn +++ b/library/LAPDm_RAW_PT.ttcn @@ -453,10 +453,11 @@ var RslLinkId link_id; if (lpd.sacch) { link_id := valueof(ts_RslLinkID_SACCH(lpd.sapi)); + buf := f_pad_oct(enc_LapdmFrame(lpd.lapdm), 21, '2B'O); } else { link_id := valueof(ts_RslLinkID_DCCH(lpd.sapi)); + buf := f_pad_oct(enc_LapdmFrame(lpd.lapdm), 23, '2B'O); } - buf := enc_LapdmFrame(lpd.lapdm); L1CTL.send(ts_L1CTL_DATA_REQ(chan_desc.chan_nr, link_id, buf)); } -- To view, visit https://gerrit.osmocom.org/14278 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I30bcce27f95974eaca4168a156d1548586c924d6 Gerrit-Change-Number: 14278 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 30 13:45:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 30 May 2019 13:45:08 +0000 Subject: Change in osmo-ttcn3-hacks[master]: lapdm: Enable all tests in control section Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14279 Change subject: lapdm: Enable all tests in control section ...................................................................... lapdm: Enable all tests in control section Change-Id: I0f402110c4387b334a55455221f596fcb5c7bc59 --- M lapdm/L1CTL_Test.ttcn 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/79/14279/1 diff --git a/lapdm/L1CTL_Test.ttcn b/lapdm/L1CTL_Test.ttcn index 97704ac..0e1a9b4 100644 --- a/lapdm/L1CTL_Test.ttcn +++ b/lapdm/L1CTL_Test.ttcn @@ -243,12 +243,10 @@ control { execute(TC_foo()); execute(TC_sabm_ua_dcch_sapi0()); -/* execute(TC_sabm_ua_dcch_sapi0_nopayload()); execute(TC_sabm_ua_dcch_sapi3()); execute(TC_sabm_ua_dcch_sapi4()); execute(TC_sabm_contention()); execute(TC_sabm_retransmit()); -*/ } } -- To view, visit https://gerrit.osmocom.org/14279 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I0f402110c4387b334a55455221f596fcb5c7bc59 Gerrit-Change-Number: 14279 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 30 13:45:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 30 May 2019 13:45:09 +0000 Subject: Change in osmo-ttcn3-hacks[master]: lapdm: fix comment 'thinko' about which type of message is retransmitted Message-ID: Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14280 Change subject: lapdm: fix comment 'thinko' about which type of message is retransmitted ...................................................................... lapdm: fix comment 'thinko' about which type of message is retransmitted Change-Id: I6585fc9f7e5e9fb57fe65372d0a14d68a939b73a --- M lapdm/L1CTL_Test.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/80/14280/1 diff --git a/lapdm/L1CTL_Test.ttcn b/lapdm/L1CTL_Test.ttcn index 0e1a9b4..28bf25c 100644 --- a/lapdm/L1CTL_Test.ttcn +++ b/lapdm/L1CTL_Test.ttcn @@ -195,7 +195,7 @@ } /* we test that a re-transmitted SABM with identical payload will result in the retransmission of a - * SABM. This is required during the contention resolution procedure as specified in 8.4.1.4 */ + * UA. This is required during the contention resolution procedure as specified in 8.4.1.4 */ testcase TC_sabm_retransmit() runs on dummy_CT { const octetstring payload := '00FEFEDEADBEEF'O; f_init(); -- To view, visit https://gerrit.osmocom.org/14280 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I6585fc9f7e5e9fb57fe65372d0a14d68a939b73a Gerrit-Change-Number: 14280 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 30 13:53:33 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 30 May 2019 13:53:33 +0000 Subject: Change in osmocom-bb[master]: trxcon: Dropping a to-be-transmitted message is a NOTICEable event In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14276 ) Change subject: trxcon: Dropping a to-be-transmitted message is a NOTICEable event ...................................................................... Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/14276/1/src/host/trxcon/trx_if.c File src/host/trxcon/trx_if.c: https://gerrit.osmocom.org/#/c/14276/1/src/host/trxcon/trx_if.c at 619 PS1, Line 619: LOGL_NOTICE I would even say this is a ERROR. -- To view, visit https://gerrit.osmocom.org/14276 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If5084feb9e847d212530b1a5985390405d91008b Gerrit-Change-Number: 14276 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 30 May 2019 13:53:33 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 30 14:02:46 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 30 May 2019 14:02:46 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: move f_pad_oct() to Osmocom_Types as it's generally useful In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14277 ) Change subject: bts: move f_pad_oct() to Osmocom_Types as it's generally useful ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14277 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4df99e5612c67006eb2998529425956fb4a664af Gerrit-Change-Number: 14277 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 30 May 2019 14:02:46 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 30 14:10:45 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 30 May 2019 14:10:45 +0000 Subject: Change in osmo-ttcn3-hacks[master]: LAPDm_RAW_PT: Always pad MAC blocks to their size In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14278 ) Change subject: LAPDm_RAW_PT: Always pad MAC blocks to their size ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14278 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I30bcce27f95974eaca4168a156d1548586c924d6 Gerrit-Change-Number: 14278 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 30 May 2019 14:10:45 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 30 14:12:28 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 30 May 2019 14:12:28 +0000 Subject: Change in osmo-ttcn3-hacks[master]: lapdm: Enable all tests in control section In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14279 ) Change subject: lapdm: Enable all tests in control section ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14279 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0f402110c4387b334a55455221f596fcb5c7bc59 Gerrit-Change-Number: 14279 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 30 May 2019 14:12:28 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 30 14:14:01 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 30 May 2019 14:14:01 +0000 Subject: Change in osmo-ttcn3-hacks[master]: lapdm: fix comment 'thinko' about which type of message is retransmitted In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14280 ) Change subject: lapdm: fix comment 'thinko' about which type of message is retransmitted ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14280 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6585fc9f7e5e9fb57fe65372d0a14d68a939b73a Gerrit-Change-Number: 14280 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 30 May 2019 14:14:01 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 30 14:16:17 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 30 May 2019 14:16:17 +0000 Subject: Change in osmocom-bb[master]: trxcon/sched_mframe.c: mark all stolen CBCH UL slots as TRXC_IDLE Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14281 Change subject: trxcon/sched_mframe.c: mark all stolen CBCH UL slots as TRXC_IDLE ...................................................................... trxcon/sched_mframe.c: mark all stolen CBCH UL slots as TRXC_IDLE According to 3GPP TS 05.02, section 6.4.1, CBCH replaces SDCCH number 2 in both V (BCCH+CCCH+SDCCH/4+SACCH/4) and VII (SDCCH/8+SACCH/8) logical channel combinations. Unfortunately it is not clear whether we can use stolen UL slots for RACH or not. For now, we should mark all of them as IDLE. Somehow TRXC_SDCCH4_2 slots were left in the definition of combination V (combined CCCH+BCCH). This is not critical, but may be looking confusing. Let's fix this. Change-Id: Id30f2fac3274de3edff4ae59f77d9c9cf8059155 --- M src/host/trxcon/sched_mframe.c 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/81/14281/1 diff --git a/src/host/trxcon/sched_mframe.c b/src/host/trxcon/sched_mframe.c index d427993..9b759af 100644 --- a/src/host/trxcon/sched_mframe.c +++ b/src/host/trxcon/sched_mframe.c @@ -292,10 +292,10 @@ { TRXC_IDLE, 2, TRXC_SDCCH4_1, 3 }, { TRXC_IDLE, 3, TRXC_RACH, 0 }, { TRXC_SACCH4_3, 0, TRXC_RACH, 0 }, - { TRXC_SACCH4_3, 1, TRXC_SDCCH4_2, 0 }, - { TRXC_SACCH4_3, 2, TRXC_SDCCH4_2, 1 }, - { TRXC_SACCH4_3, 3, TRXC_SDCCH4_2, 2 }, - { TRXC_IDLE, 0, TRXC_SDCCH4_2, 3 }, + { TRXC_SACCH4_3, 1, TRXC_IDLE, 0 }, + { TRXC_SACCH4_3, 2, TRXC_IDLE, 1 }, + { TRXC_SACCH4_3, 3, TRXC_IDLE, 2 }, + { TRXC_IDLE, 0, TRXC_IDLE, 3 }, }; static const struct trx_frame frame_sdcch8[102] = { -- To view, visit https://gerrit.osmocom.org/14281 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id30f2fac3274de3edff4ae59f77d9c9cf8059155 Gerrit-Change-Number: 14281 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 30 15:20:52 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 30 May 2019 15:20:52 +0000 Subject: Change in osmo-ggsn[master]: gtp: Document spec reasoning drop of Rx DeleteCtxReq Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14282 Change subject: gtp: Document spec reasoning drop of Rx DeleteCtxReq ...................................................................... gtp: Document spec reasoning drop of Rx DeleteCtxReq Change-Id: I563fc0b48595d71ebdf56a50f4e9984eee423676 --- M gtp/gtp.c 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/82/14282/1 diff --git a/gtp/gtp.c b/gtp/gtp.c index b98fba0..430eeb4 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -2613,6 +2613,14 @@ gtpie_gettv1(ie, GTPIE_TEARDOWN, 0, &teardown); if (!teardown) { + /* TS 29.060 section 7.3.5: If a GSN receives a Delete PDP context + * without a Teardown Indicator or with a Teardown Indicator with + * value set to "0" and only that PDP context is active for a PDN + * connection, then the GSN shall ignore the message. (Note: + * This is symptom of a race condition. The reliable delivery of + * signalling messages will eventually lead to a consistent + * situation, allowing the teardown of the PDP context.) + */ for (n = 0; n < PDP_MAXNSAPI; n++) if (linked_pdp->secondary_tei[n]) count++; -- To view, visit https://gerrit.osmocom.org/14282 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I563fc0b48595d71ebdf56a50f4e9984eee423676 Gerrit-Change-Number: 14282 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 30 15:20:52 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 30 May 2019 15:20:52 +0000 Subject: Change in osmo-ggsn[master]: pdp: Introduce new API pdp_count_secondary Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14283 Change subject: pdp: Introduce new API pdp_count_secondary ...................................................................... pdp: Introduce new API pdp_count_secondary Change-Id: Id2d84ad1cdb0f3b500efeda4cc0fbccb24ae0c61 --- M gtp/gtp.c M gtp/pdp.c M gtp/pdp.h 3 files changed, 20 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/83/14283/1 diff --git a/gtp/gtp.c b/gtp/gtp.c index 430eeb4..4bc18b1 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -2442,8 +2442,7 @@ get_default_gtp(pdp->version, GTP_DELETE_PDP_REQ, &packet); struct in_addr addr; struct pdp_t *linked_pdp; - int n; - int count = 0; + int count; if (gsna2in_addr(&addr, &pdp->gsnrc)) { gsn->err_address++; @@ -2458,9 +2457,7 @@ } if (!teardown) { - for (n = 0; n < PDP_MAXNSAPI; n++) - if (linked_pdp->secondary_tei[n]) - count++; + count = pdp_count_secondary(linked_pdp); if (count <= 1) { LOGP(DLGTP, LOGL_ERROR, "Must use teardown for last context: %d\n", count); @@ -2550,8 +2547,7 @@ uint8_t nsapi; uint8_t teardown = 0; - int n; - int count = 0; + int count; /* Is this a dublicate ? */ if (!gtp_dublicate(gsn, version, peer, seq)) { @@ -2621,9 +2617,7 @@ * signalling messages will eventually lead to a consistent * situation, allowing the teardown of the PDP context.) */ - for (n = 0; n < PDP_MAXNSAPI; n++) - if (linked_pdp->secondary_tei[n]) - count++; + count = pdp_count_secondary(linked_pdp); if (count <= 1) { GTP_LOGPKG(LOGL_NOTICE, peer, pack, len, "Ignoring CTX DEL without teardown and count=%d\n", diff --git a/gtp/pdp.c b/gtp/pdp.c index a630ee9..92fe5ec 100644 --- a/gtp/pdp.c +++ b/gtp/pdp.c @@ -374,3 +374,17 @@ pdp->imsi = teid & 0x0fffffffffffffffull; pdp->nsapi = (teid & 0xf000000000000000ull) >> 60; } + +/* Count amount of secondary PDP contexts linked to this primary PDP context + * (itself included). Must be called on a primary PDP context. */ +unsigned int pdp_count_secondary(struct pdp_t *pdp) +{ + unsigned int n; + unsigned int count = 0; + OSMO_ASSERT(!pdp->secondary); + + for (n = 0; n < PDP_MAXNSAPI; n++) + if (pdp->secondary_tei[n]) + count++; + return count; +} diff --git a/gtp/pdp.h b/gtp/pdp.h index 81a38f4..e48f1a1 100644 --- a/gtp/pdp.h +++ b/gtp/pdp.h @@ -260,6 +260,8 @@ void pdp_set_imsi_nsapi(struct pdp_t *pdp, uint64_t teid); +unsigned int pdp_count_secondary(struct pdp_t *pdp); + /* int pdp_iphash(void* ipif, struct ul66_t *eua); int pdp_ipset(struct pdp_t *pdp, void* ipif, struct ul66_t *eua); -- To view, visit https://gerrit.osmocom.org/14283 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id2d84ad1cdb0f3b500efeda4cc0fbccb24ae0c61 Gerrit-Change-Number: 14283 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 30 15:20:52 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 30 May 2019 15:20:52 +0000 Subject: Change in osmo-ggsn[master]: gtp_create_pdp_ind: simplify code by reordering and compacting parsing Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14284 Change subject: gtp_create_pdp_ind: simplify code by reordering and compacting parsing ...................................................................... gtp_create_pdp_ind: simplify code by reordering and compacting parsing Move all parsing with same conditions under same blocks to make code easier to follow and make it more compact. Change-Id: I52d5a3543ce6cf764bd84303b5a0d8b0643d998d --- M gtp/gtp.c 1 file changed, 92 insertions(+), 120 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/84/14284/1 diff --git a/gtp/gtp.c b/gtp/gtp.c index 4bc18b1..0fb4de0 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -1423,6 +1423,61 @@ pdp->apn_req = linked_pdp->apn_req; pdp->teic_gn = linked_pdp->teic_gn; pdp->secondary = 1; + } else { + /* Not Secondary PDP Context Activation Procedure */ + /* IMSI (conditional): If the MS is emergency attached + and the MS is UICCless, the IMSI cannot be included + in the message and therefore IMSI shall not be + included in the message. */ + if (gtpie_gettv0 + (ie, GTPIE_IMSI, 0, &pdp->imsi, sizeof(pdp->imsi))) { + gsn->missing++; + GTP_LOGPKG(LOGL_ERROR, peer, pack, + len, "Missing IMSI not supported\n"); + return gtp_create_pdp_resp(gsn, version, pdp, + GTPCAUSE_MAN_IE_MISSING); + } + } + + /* TEID (mandatory) */ + if (gtpie_gettv4(ie, GTPIE_TEI_DI, 0, &pdp->teid_gn)) { + gsn->missing++; + GTP_LOGPKG(LOGL_ERROR, peer, pack, + len, "Missing mandatory information field\n"); + return gtp_create_pdp_resp(gsn, version, pdp, + GTPCAUSE_MAN_IE_MISSING); + } + /* TEIC (conditional) */ + if (!linked_pdp) { /* Not Secondary PDP Context Activation Procedure */ + if (gtpie_gettv4(ie, GTPIE_TEI_C, 0, &pdp->teic_gn)) { + gsn->missing++; + GTP_LOGPKG(LOGL_ERROR, peer, + pack, len, + "Missing mandatory information field\n"); + return gtp_create_pdp_resp(gsn, version, pdp, + GTPCAUSE_MAN_IE_MISSING); + } + } + /* NSAPI (mandatory) */ + if (gtpie_gettv1(ie, GTPIE_NSAPI, 0, &pdp->nsapi)) { + gsn->missing++; + GTP_LOGPKG(LOGL_ERROR, peer, pack, + len, "Missing mandatory information field\n"); + return gtp_create_pdp_resp(gsn, version, pdp, + GTPCAUSE_MAN_IE_MISSING); + } + /* QoS (mandatory) */ + if (gtpie_gettlv(ie, GTPIE_QOS_PROFILE, 0, &pdp->qos_req.l, + &pdp->qos_req.v, sizeof(pdp->qos_req.v))) { + gsn->missing++; + GTP_LOGPKG(LOGL_ERROR, peer, pack, + len, "Missing mandatory information field\n"); + return gtp_create_pdp_resp(gsn, version, pdp, + GTPCAUSE_MAN_IE_MISSING); + } + /* TFT (conditional) */ + if (gtpie_gettlv(ie, GTPIE_TFT, 0, &pdp->tft.l, + &pdp->tft.v, sizeof(pdp->tft.v))) { } } /* if (version == 1) */ @@ -1435,40 +1490,6 @@ return gtp_create_pdp_resp(gsn, version, pdp, GTPCAUSE_MAN_IE_MISSING); } - } - - if ((version == 1) && (!linked_pdp)) { - /* Not Secondary PDP Context Activation Procedure */ - /* IMSI (conditional) */ - if (gtpie_gettv0 - (ie, GTPIE_IMSI, 0, &pdp->imsi, sizeof(pdp->imsi))) { - gsn->missing++; - GTP_LOGPKG(LOGL_ERROR, peer, pack, - len, "Missing mandatory information field\n"); - return gtp_create_pdp_resp(gsn, version, pdp, - GTPCAUSE_MAN_IE_MISSING); - } - } - - /* Recovery (optional) */ - if (!gtpie_gettv1(ie, GTPIE_RECOVERY, 0, &recovery)) { - /* we use recovery futher down after announcing new pdp ctx to user */ - recovery_recvd = true; - } - - /* Selection mode (conditional) */ - if (!linked_pdp) { /* Not Secondary PDP Context Activation Procedure */ - if (gtpie_gettv0(ie, GTPIE_SELECTION_MODE, 0, - &pdp->selmode, sizeof(pdp->selmode))) { - gsn->missing++; - GTP_LOGPKG(LOGL_ERROR, peer, pack, - len, "Missing mandatory information field\n"); - return gtp_create_pdp_resp(gsn, version, pdp, - GTPCAUSE_MAN_IE_MISSING); - } - } - - if (version == 0) { if (gtpie_gettv2(ie, GTPIE_FL_DI, 0, &pdp->flru)) { gsn->missing++; GTP_LOGPKG(LOGL_ERROR, peer, pack, @@ -1476,7 +1497,6 @@ return gtp_create_pdp_resp(gsn, version, pdp, GTPCAUSE_MAN_IE_MISSING); } - if (gtpie_gettv2(ie, GTPIE_FL_C, 0, &pdp->flrc)) { gsn->missing++; GTP_LOGPKG(LOGL_ERROR, peer, pack, @@ -1486,70 +1506,6 @@ } } - if (version == 1) { - /* TEID (mandatory) */ - if (gtpie_gettv4(ie, GTPIE_TEI_DI, 0, &pdp->teid_gn)) { - gsn->missing++; - GTP_LOGPKG(LOGL_ERROR, peer, pack, - len, "Missing mandatory information field\n"); - return gtp_create_pdp_resp(gsn, version, pdp, - GTPCAUSE_MAN_IE_MISSING); - } - - /* TEIC (conditional) */ - if (!linked_pdp) { /* Not Secondary PDP Context Activation Procedure */ - if (gtpie_gettv4(ie, GTPIE_TEI_C, 0, &pdp->teic_gn)) { - gsn->missing++; - GTP_LOGPKG(LOGL_ERROR, peer, - pack, len, - "Missing mandatory information field\n"); - return gtp_create_pdp_resp(gsn, version, pdp, - GTPCAUSE_MAN_IE_MISSING); - } - } - - /* NSAPI (mandatory) */ - if (gtpie_gettv1(ie, GTPIE_NSAPI, 0, &pdp->nsapi)) { - gsn->missing++; - GTP_LOGPKG(LOGL_ERROR, peer, pack, - len, "Missing mandatory information field\n"); - return gtp_create_pdp_resp(gsn, version, pdp, - GTPCAUSE_MAN_IE_MISSING); - } - } - - /* Charging Characteriatics (optional) */ - /* Trace reference (optional) */ - /* Trace type (optional) */ - /* Charging Characteriatics (optional) */ - - if (!linked_pdp) { /* Not Secondary PDP Context Activation Procedure */ - /* End User Address (conditional) */ - if (gtpie_gettlv(ie, GTPIE_EUA, 0, &pdp->eua.l, - &pdp->eua.v, sizeof(pdp->eua.v))) { - gsn->missing++; - GTP_LOGPKG(LOGL_ERROR, peer, pack, - len, "Missing mandatory information field\n"); - return gtp_create_pdp_resp(gsn, version, pdp, - GTPCAUSE_MAN_IE_MISSING); - } - - /* APN */ - if (gtpie_gettlv(ie, GTPIE_APN, 0, &pdp->apn_req.l, - &pdp->apn_req.v, sizeof(pdp->apn_req.v))) { - gsn->missing++; - GTP_LOGPKG(LOGL_ERROR, peer, pack, - len, "Missing mandatory information field\n"); - return gtp_create_pdp_resp(gsn, version, pdp, - GTPCAUSE_MAN_IE_MISSING); - } - - /* Extract protocol configuration options (optional) */ - if (!gtpie_gettlv(ie, GTPIE_PCO, 0, &pdp->pco_req.l, - &pdp->pco_req.v, sizeof(pdp->pco_req.v))) { - } - } - /* SGSN address for signalling (mandatory) */ if (gtpie_gettlv(ie, GTPIE_GSN_ADDR, 0, &pdp->gsnrc.l, &pdp->gsnrc.v, sizeof(pdp->gsnrc.v))) { @@ -1569,8 +1525,44 @@ return gtp_create_pdp_resp(gsn, version, pdp, GTPCAUSE_MAN_IE_MISSING); } + /* Recovery (optional) */ + if (!gtpie_gettv1(ie, GTPIE_RECOVERY, 0, &recovery)) { + /* we use recovery futher down after announcing new pdp ctx to user */ + recovery_recvd = true; + } if (!linked_pdp) { /* Not Secondary PDP Context Activation Procedure */ + /* Selection mode (conditional) */ + if (gtpie_gettv0(ie, GTPIE_SELECTION_MODE, 0, + &pdp->selmode, sizeof(pdp->selmode))) { + gsn->missing++; + GTP_LOGPKG(LOGL_ERROR, peer, pack, + len, "Missing mandatory information field\n"); + return gtp_create_pdp_resp(gsn, version, pdp, + GTPCAUSE_MAN_IE_MISSING); + } + /* End User Address (conditional) */ + if (gtpie_gettlv(ie, GTPIE_EUA, 0, &pdp->eua.l, + &pdp->eua.v, sizeof(pdp->eua.v))) { + gsn->missing++; + GTP_LOGPKG(LOGL_ERROR, peer, pack, + len, "Missing mandatory information field\n"); + return gtp_create_pdp_resp(gsn, version, pdp, + GTPCAUSE_MAN_IE_MISSING); + } + /* APN */ + if (gtpie_gettlv(ie, GTPIE_APN, 0, &pdp->apn_req.l, + &pdp->apn_req.v, sizeof(pdp->apn_req.v))) { + gsn->missing++; + GTP_LOGPKG(LOGL_ERROR, peer, pack, + len, "Missing mandatory information field\n"); + return gtp_create_pdp_resp(gsn, version, pdp, + GTPCAUSE_MAN_IE_MISSING); + } + /* Extract protocol configuration options (optional) */ + if (!gtpie_gettlv(ie, GTPIE_PCO, 0, &pdp->pco_req.l, + &pdp->pco_req.v, sizeof(pdp->pco_req.v))) { + } /* MSISDN (conditional) */ if (gtpie_gettlv(ie, GTPIE_MSISDN, 0, &pdp->msisdn.l, &pdp->msisdn.v, sizeof(pdp->msisdn.v))) { @@ -1582,26 +1574,6 @@ } } - if (version == 1) { - /* QoS (mandatory) */ - if (gtpie_gettlv(ie, GTPIE_QOS_PROFILE, 0, &pdp->qos_req.l, - &pdp->qos_req.v, sizeof(pdp->qos_req.v))) { - gsn->missing++; - GTP_LOGPKG(LOGL_ERROR, peer, pack, - len, "Missing mandatory information field\n"); - return gtp_create_pdp_resp(gsn, version, pdp, - GTPCAUSE_MAN_IE_MISSING); - } - - /* TFT (conditional) */ - if (gtpie_gettlv(ie, GTPIE_TFT, 0, &pdp->tft.l, - &pdp->tft.v, sizeof(pdp->tft.v))) { - } - - /* Trigger ID */ - /* OMC identity */ - } - /* Initialize our own IP addresses */ in_addr2gsna(&pdp->gsnlc, &gsn->gsnc); in_addr2gsna(&pdp->gsnlu, &gsn->gsnu); @@ -1676,7 +1648,7 @@ if (pdp) pdp->gsn = gsn; - /* Callback function to validata login */ + /* Callback function to validate login */ if (gsn->cb_create_context_ind != 0) rc = gsn->cb_create_context_ind(pdp); else { -- To view, visit https://gerrit.osmocom.org/14284 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I52d5a3543ce6cf764bd84303b5a0d8b0643d998d Gerrit-Change-Number: 14284 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 30 15:20:53 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 30 May 2019 15:20:53 +0000 Subject: Change in osmo-ggsn[master]: gtp: Refactor code to use gtp_freepdp(_teardown) APIs Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14285 Change subject: gtp: Refactor code to use gtp_freepdp(_teardown) APIs ...................................................................... gtp: Refactor code to use gtp_freepdp(_teardown) APIs * API gtp_freepdp was already there but was not really being used by anyone currently, so we can change its behaviour to call cb_delete_ctx. It makes sense to call the cb in there too to be consistent with rest of APIs. * Add API gtp_freepdp_teardown, which calls gtp_freepdp on pdp and its secondary contexts. It will also be used later on by osmo-ggsn. * Use new APIs in internal code to simplify it. Change-Id: I9f0b774e9385a7a8d81ec9702f158e2f9a50d571 --- M gtp/gtp.c M gtp/gtp.h 2 files changed, 32 insertions(+), 50 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/85/14285/1 diff --git a/gtp/gtp.c b/gtp/gtp.c index 0fb4de0..c57ecff 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -146,9 +146,36 @@ int gtp_freepdp(struct gsn_t *gsn, struct pdp_t *pdp) { + if (gsn->cb_delete_context) + gsn->cb_delete_context(pdp); return pdp_freepdp(pdp); } +/* Free pdp and all its secondary PDP contexts. Must be called on the primary PDP context. */ +int gtp_freepdp_teardown(struct gsn_t *gsn, struct pdp_t *pdp) +{ + int n; + struct pdp_t *secondary_pdp; + OSMO_ASSERT(!pdp->secondary); + + for (n = 0; n < PDP_MAXNSAPI; n++) { + if (pdp->secondary_tei[n]) { + if (pdp_getgtp1 + (&secondary_pdp, + pdp->secondary_tei[n])) { + LOGP(DLGTP, LOGL_ERROR, + "Unknown secondary PDP context\n"); + continue; + } + if (pdp != secondary_pdp) { + gtp_freepdp(gsn, secondary_pdp); + } + } + } + + return gtp_freepdp(gsn, pdp); +} + /* gtp_gpdu */ extern int gtp_fd(struct gsn_t *gsn) @@ -1636,9 +1663,7 @@ DEBUGP(DLGTP, "gtp_create_pdp_ind: Deleting old context\n"); - if (gsn->cb_delete_context) - gsn->cb_delete_context(pdp_old); - pdp_freepdp(pdp_old); + gtp_freepdp(gsn, pdp_old); DEBUGP(DLGTP, "gtp_create_pdp_ind: Deleted...\n"); } @@ -2359,8 +2384,6 @@ int teardown) { struct pdp_t *linked_pdp; - struct pdp_t *secondary_pdp; - int n; if (pdp_getgtp1(&linked_pdp, pdp->teic_own)) { LOGP(DLGTP, LOGL_ERROR, @@ -2372,26 +2395,7 @@ return EOF; if (teardown) { /* Remove all contexts */ - for (n = 0; n < PDP_MAXNSAPI; n++) { - if (linked_pdp->secondary_tei[n]) { - if (pdp_getgtp1 - (&secondary_pdp, - linked_pdp->secondary_tei[n])) { - LOGP(DLGTP, LOGL_ERROR, - "Unknown secondary PDP context\n"); - return EOF; - } - if (linked_pdp != secondary_pdp) { - if (gsn->cb_delete_context) - gsn->cb_delete_context - (secondary_pdp); - pdp_freepdp(secondary_pdp); - } - } - } - if (gsn->cb_delete_context) - gsn->cb_delete_context(linked_pdp); - pdp_freepdp(linked_pdp); + gtp_freepdp_teardown(gsn, linked_pdp); } else { if (gsn->cb_delete_context) gsn->cb_delete_context(pdp); @@ -2458,10 +2462,8 @@ uint8_t cause, int teardown) { union gtp_packet packet; - struct pdp_t *secondary_pdp; unsigned int length = get_default_gtp(version, GTP_DELETE_PDP_RSP, &packet); - int n; gtpie_tv1(&packet, &length, GTP_MAX, GTPIE_CAUSE, cause); @@ -2470,26 +2472,7 @@ if (cause == GTPCAUSE_ACC_REQ) { if ((teardown) || (version == 0)) { /* Remove all contexts */ - for (n = 0; n < PDP_MAXNSAPI; n++) { - if (linked_pdp->secondary_tei[n]) { - if (pdp_getgtp1 - (&secondary_pdp, - linked_pdp->secondary_tei[n])) { - LOGP(DLGTP, LOGL_ERROR, - "Unknown secondary PDP context\n"); - return EOF; - } - if (linked_pdp != secondary_pdp) { - if (gsn->cb_delete_context) - gsn->cb_delete_context - (secondary_pdp); - pdp_freepdp(secondary_pdp); - } - } - } - if (gsn->cb_delete_context) - gsn->cb_delete_context(linked_pdp); - pdp_freepdp(linked_pdp); + gtp_freepdp_teardown(gsn, linked_pdp); } else { /* Remove only current context */ if (gsn->cb_delete_context) gsn->cb_delete_context(pdp); @@ -2740,9 +2723,7 @@ * code should ever change. */ OSMO_ASSERT(pdp); - if (gsn->cb_delete_context) - gsn->cb_delete_context(pdp); - pdp_freepdp(pdp); + gtp_freepdp(gsn, pdp); return 0; } diff --git a/gtp/gtp.h b/gtp/gtp.h index 5f35ab5..6582319 100644 --- a/gtp/gtp.h +++ b/gtp/gtp.h @@ -309,6 +309,7 @@ extern int gtp_newpdp(struct gsn_t *gsn, struct pdp_t **pdp, uint64_t imsi, uint8_t nsapi); extern int gtp_freepdp(struct gsn_t *gsn, struct pdp_t *pdp); +extern int gtp_freepdp_teardown(struct gsn_t *gsn, struct pdp_t *pdp); extern int gtp_create_context_req(struct gsn_t *gsn, struct pdp_t *pdp, void *cbp); -- To view, visit https://gerrit.osmocom.org/14285 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I9f0b774e9385a7a8d81ec9702f158e2f9a50d571 Gerrit-Change-Number: 14285 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 30 15:20:53 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 30 May 2019 15:20:53 +0000 Subject: Change in osmo-ggsn[master]: gtp: Document free pdp ctx in non-teardown scenario Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14286 Change subject: gtp: Document free pdp ctx in non-teardown scenario ...................................................................... gtp: Document free pdp ctx in non-teardown scenario Code modified actually behaves the same, since gtp_freepdp() also calls delete cb, and this way it's more consistent with rest of the code base. Change-Id: Ia47ac792111fe1e9aa68222b32b5da823642206b --- M gtp/gtp.c 1 file changed, 39 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/86/14286/1 diff --git a/gtp/gtp.c b/gtp/gtp.c index c57ecff..87aa9f9 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -2397,13 +2397,26 @@ if (teardown) { /* Remove all contexts */ gtp_freepdp_teardown(gsn, linked_pdp); } else { - if (gsn->cb_delete_context) - gsn->cb_delete_context(pdp); + /* If we end up here (no teardown) it means we still + have at least another pdp context active for this + PDN connection (since last DeleteReq should come + with teardown enabled). If the ctx to delete is a + secondary ctx, simply free it. If it's the primary + ctx, mark it as nodata but don't free it since we + need it to hold data linked together and we'll + require it later to tear down the entire tree. Still, + we announce its deletion through cb_delete_context + because we don't want user to release its related + data and not use it anymore. + */ if (pdp == linked_pdp) { - linked_pdp->secondary_tei[pdp->nsapi & 0xf0] = 0; - linked_pdp->nodata = 1; - } else - pdp_freepdp(pdp); + if (gsn->cb_delete_context) + gsn->cb_delete_context(pdp); + pdp->secondary_tei[pdp->nsapi & 0xf0] = 0; + pdp->nodata = 1; + } else { + gtp_freepdp(gsn, pdp); + } } return 0; @@ -2473,15 +2486,27 @@ if (cause == GTPCAUSE_ACC_REQ) { if ((teardown) || (version == 0)) { /* Remove all contexts */ gtp_freepdp_teardown(gsn, linked_pdp); - } else { /* Remove only current context */ - if (gsn->cb_delete_context) - gsn->cb_delete_context(pdp); + } else { + /* If we end up here (no teardown) it means we still + have at least another pdp context active for this + PDN connection (since last DeleteReq should come + with teardown enabled). If the ctx to delete is a + secondary ctx, simply free it. If it's the primary + ctx, mark it as nodata but don't free it since we + need it to hold data linked together and we'll + require it later to tear down the entire tree. Still, + we announce its deletion through cb_delete_context + because we don't want user to release its related + data and not use it anymore. + */ if (pdp == linked_pdp) { - linked_pdp->secondary_tei[pdp->nsapi & 0xf0] = - 0; - linked_pdp->nodata = 1; - } else - pdp_freepdp(pdp); + if (gsn->cb_delete_context) + gsn->cb_delete_context(pdp); + pdp->secondary_tei[pdp->nsapi & 0xf0] = 0; + pdp->nodata = 1; + } else { + gtp_freepdp(gsn, pdp); + } } } /* if (cause == GTPCAUSE_ACC_REQ) */ -- To view, visit https://gerrit.osmocom.org/14286 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ia47ac792111fe1e9aa68222b32b5da823642206b Gerrit-Change-Number: 14286 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 30 15:29:50 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 30 May 2019 15:29:50 +0000 Subject: Change in osmo-ggsn[master]: ggsn: Fix undefined behaviour shifting beyond sign bit Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14287 Change subject: ggsn: Fix undefined behaviour shifting beyond sign bit ...................................................................... ggsn: Fix undefined behaviour shifting beyond sign bit Change-Id: I2b8d163dbc108b0fb5a1e820dc23181835d12869 --- M ggsn/ggsn_vty.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/87/14287/1 diff --git a/ggsn/ggsn_vty.c b/ggsn/ggsn_vty.c index 3f012d2..9101361 100644 --- a/ggsn/ggsn_vty.c +++ b/ggsn/ggsn_vty.c @@ -654,9 +654,9 @@ vty_out(vty, " ipdown-script %s%s", apn->tun.cfg.ipdown_script, VTY_NEWLINE); for (i = 0; i < 32; i++) { - if (!(apn->cfg.apn_type_mask & (1 << i))) + if (!(apn->cfg.apn_type_mask & (UINT32_C(1) << i))) continue; - vty_out(vty, " type-support %s%s", get_value_string(pdp_type_names, (1 << i)), + vty_out(vty, " type-support %s%s", get_value_string(pdp_type_names, (UINT32_C(1) << i)), VTY_NEWLINE); } -- To view, visit https://gerrit.osmocom.org/14287 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I2b8d163dbc108b0fb5a1e820dc23181835d12869 Gerrit-Change-Number: 14287 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 30 15:37:07 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 30 May 2019 15:37:07 +0000 Subject: Change in osmo-ggsn[master]: ggsn: Fix undefined behaviour shifting beyond sign bit In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14287 to look at the new patch set (#2). Change subject: ggsn: Fix undefined behaviour shifting beyond sign bit ...................................................................... ggsn: Fix undefined behaviour shifting beyond sign bit Fixes following ASan complaint during VTY "show running-config": osmo-ggsn/ggsn/ggsn_vty.c:657:37: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' Change-Id: I2b8d163dbc108b0fb5a1e820dc23181835d12869 --- M ggsn/ggsn_vty.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/87/14287/2 -- To view, visit https://gerrit.osmocom.org/14287 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2b8d163dbc108b0fb5a1e820dc23181835d12869 Gerrit-Change-Number: 14287 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 30 16:31:27 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 30 May 2019 16:31:27 +0000 Subject: Change in osmo-ggsn[master]: ggsn: Fix undefined behaviour shifting beyond sign bit In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14287 ) Change subject: ggsn: Fix undefined behaviour shifting beyond sign bit ...................................................................... Patch Set 2: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/14287/2/ggsn/ggsn_vty.c File ggsn/ggsn_vty.c: https://gerrit.osmocom.org/#/c/14287/2/ggsn/ggsn_vty.c at 657 PS2, Line 657: UINT32_C Never seen that macro before, but it should be the same as: (uint32_t) 1 << i -- To view, visit https://gerrit.osmocom.org/14287 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2b8d163dbc108b0fb5a1e820dc23181835d12869 Gerrit-Change-Number: 14287 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 30 May 2019 16:31:27 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu May 30 16:42:26 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 30 May 2019 16:42:26 +0000 Subject: Change in osmocom-bb[master]: trxcon: Suppress POWERON to TRX if we're already powered on. In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14275 ) Change subject: trxcon: Suppress POWERON to TRX if we're already powered on. ...................................................................... Patch Set 1: Code-Review-1 (2 comments) Let's clarify the commit description, it's a bit confusing now. I can take care and upload the new version if you don't mind. https://gerrit.osmocom.org/#/c/14275/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/#/c/14275/1//COMMIT_MSG at 9 PS1, Line 9: POWERUP POWERON https://gerrit.osmocom.org/#/c/14275/1//COMMIT_MSG at 10 PS1, Line 10: L1CTL_DM_EST_REQ actually L1CTL_FBSB_REQ -- To view, visit https://gerrit.osmocom.org/14275 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I834e8897b95a2490811319697fc7cab6076db480 Gerrit-Change-Number: 14275 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 30 May 2019 16:42:26 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 10:06:41 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 31 May 2019 10:06:41 +0000 Subject: Change in osmo-trx[master]: uhd: No need to use dynamic mem for rx_buffers In-Reply-To: References: Message-ID: Pau Espin Pedrol has abandoned this change. ( https://gerrit.osmocom.org/13833 ) Change subject: uhd: No need to use dynamic mem for rx_buffers ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/13833 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: I39b293c24053298256626fa78344102032fc2104 Gerrit-Change-Number: 13833 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: tnt -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 11:21:44 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 11:21:44 +0000 Subject: Change in osmo-ttcn3-hacks[master]: lapdm: fix comment 'thinko' about which type of message is retransmitted In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14280 ) Change subject: lapdm: fix comment 'thinko' about which type of message is retransmitted ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14280 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6585fc9f7e5e9fb57fe65372d0a14d68a939b73a Gerrit-Change-Number: 14280 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 31 May 2019 11:21:44 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 11:21:45 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 11:21:45 +0000 Subject: Change in osmo-ttcn3-hacks[master]: lapdm: Enable all tests in control section In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14279 ) Change subject: lapdm: Enable all tests in control section ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14279 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0f402110c4387b334a55455221f596fcb5c7bc59 Gerrit-Change-Number: 14279 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 31 May 2019 11:21:45 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 11:21:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 11:21:47 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: move f_pad_oct() to Osmocom_Types as it's generally useful In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14277 ) Change subject: bts: move f_pad_oct() to Osmocom_Types as it's generally useful ...................................................................... bts: move f_pad_oct() to Osmocom_Types as it's generally useful Change-Id: I4df99e5612c67006eb2998529425956fb4a664af --- M bts/BTS_Tests.ttcn M library/Osmocom_Types.ttcn 2 files changed, 8 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, approved diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 0506e64..5481838 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -3676,14 +3676,6 @@ setverdict(pass); } -private function f_pad_oct(octetstring str, integer len, OCT1 pad) return octetstring { - var integer strlen := lengthof(str); - for (var integer i := 0; i < len-strlen; i := i+1) { - str := str & pad; - } - return str; -} - /* Send PAGING via RSL, expect it to shw up on PCU socket */ testcase TC_pcu_paging_from_rsl() runs on test_CT { f_init_pcu_test(); diff --git a/library/Osmocom_Types.ttcn b/library/Osmocom_Types.ttcn index ffd5df5..046a9ea 100644 --- a/library/Osmocom_Types.ttcn +++ b/library/Osmocom_Types.ttcn @@ -162,5 +162,13 @@ return ret; } +function f_pad_oct(octetstring str, integer len, OCT1 pad) return octetstring { + var integer strlen := lengthof(str); + for (var integer i := 0; i < len-strlen; i := i+1) { + str := str & pad; + } + return str; +} + } with { encode "RAW"; variant "FIELDORDER(msb)" } -- To view, visit https://gerrit.osmocom.org/14277 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I4df99e5612c67006eb2998529425956fb4a664af Gerrit-Change-Number: 14277 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 11:21:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 11:21:47 +0000 Subject: Change in osmo-ttcn3-hacks[master]: LAPDm_RAW_PT: Always pad MAC blocks to their size In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14278 ) Change subject: LAPDm_RAW_PT: Always pad MAC blocks to their size ...................................................................... LAPDm_RAW_PT: Always pad MAC blocks to their size If a LAPDm message is shorter than the MAC block size, we must pad it before seding it to L1. trxcon e.g. would ignore any frames with the wrong length since Change-Id I258ee9f6d0124b183b1db23a73f1e523fcea89a8 Change-Id: I30bcce27f95974eaca4168a156d1548586c924d6 Related: OS#3415 --- M library/LAPDm_RAW_PT.ttcn 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, approved diff --git a/library/LAPDm_RAW_PT.ttcn b/library/LAPDm_RAW_PT.ttcn index 164d31a..fe2d321 100644 --- a/library/LAPDm_RAW_PT.ttcn +++ b/library/LAPDm_RAW_PT.ttcn @@ -453,10 +453,11 @@ var RslLinkId link_id; if (lpd.sacch) { link_id := valueof(ts_RslLinkID_SACCH(lpd.sapi)); + buf := f_pad_oct(enc_LapdmFrame(lpd.lapdm), 21, '2B'O); } else { link_id := valueof(ts_RslLinkID_DCCH(lpd.sapi)); + buf := f_pad_oct(enc_LapdmFrame(lpd.lapdm), 23, '2B'O); } - buf := enc_LapdmFrame(lpd.lapdm); L1CTL.send(ts_L1CTL_DATA_REQ(chan_desc.chan_nr, link_id, buf)); } -- To view, visit https://gerrit.osmocom.org/14278 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I30bcce27f95974eaca4168a156d1548586c924d6 Gerrit-Change-Number: 14278 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 11:21:48 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 11:21:48 +0000 Subject: Change in osmo-ttcn3-hacks[master]: lapdm: Enable all tests in control section In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14279 ) Change subject: lapdm: Enable all tests in control section ...................................................................... lapdm: Enable all tests in control section Change-Id: I0f402110c4387b334a55455221f596fcb5c7bc59 --- M lapdm/L1CTL_Test.ttcn 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved diff --git a/lapdm/L1CTL_Test.ttcn b/lapdm/L1CTL_Test.ttcn index 97704ac..0e1a9b4 100644 --- a/lapdm/L1CTL_Test.ttcn +++ b/lapdm/L1CTL_Test.ttcn @@ -243,12 +243,10 @@ control { execute(TC_foo()); execute(TC_sabm_ua_dcch_sapi0()); -/* execute(TC_sabm_ua_dcch_sapi0_nopayload()); execute(TC_sabm_ua_dcch_sapi3()); execute(TC_sabm_ua_dcch_sapi4()); execute(TC_sabm_contention()); execute(TC_sabm_retransmit()); -*/ } } -- To view, visit https://gerrit.osmocom.org/14279 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I0f402110c4387b334a55455221f596fcb5c7bc59 Gerrit-Change-Number: 14279 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 11:21:48 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 11:21:48 +0000 Subject: Change in osmo-ttcn3-hacks[master]: lapdm: fix comment 'thinko' about which type of message is retransmitted In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14280 ) Change subject: lapdm: fix comment 'thinko' about which type of message is retransmitted ...................................................................... lapdm: fix comment 'thinko' about which type of message is retransmitted Change-Id: I6585fc9f7e5e9fb57fe65372d0a14d68a939b73a --- M lapdm/L1CTL_Test.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved diff --git a/lapdm/L1CTL_Test.ttcn b/lapdm/L1CTL_Test.ttcn index 0e1a9b4..28bf25c 100644 --- a/lapdm/L1CTL_Test.ttcn +++ b/lapdm/L1CTL_Test.ttcn @@ -195,7 +195,7 @@ } /* we test that a re-transmitted SABM with identical payload will result in the retransmission of a - * SABM. This is required during the contention resolution procedure as specified in 8.4.1.4 */ + * UA. This is required during the contention resolution procedure as specified in 8.4.1.4 */ testcase TC_sabm_retransmit() runs on dummy_CT { const octetstring payload := '00FEFEDEADBEEF'O; f_init(); -- To view, visit https://gerrit.osmocom.org/14280 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I6585fc9f7e5e9fb57fe65372d0a14d68a939b73a Gerrit-Change-Number: 14280 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 12:50:20 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 31 May 2019 12:50:20 +0000 Subject: Change in docker-playground[master]: bsc: Fix: Disable osmux for ttcn3-bsc-test-sccplite-latest Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14288 Change subject: bsc: Fix: Disable osmux for ttcn3-bsc-test-sccplite-latest ...................................................................... bsc: Fix: Disable osmux for ttcn3-bsc-test-sccplite-latest Recent commit added bits to disable "osmux on/off" vty commands on "-latest" tested, but forgot to add required line in sccplite/BSC_Tests.cfg for sed command in jenkins.sh script to work. Fixes: 2cdab85e5f42c876a3024ca2154c67c21d1d78cc Change-Id: I9b4ce2d7151d65b4c83417a59fd01672971b3937 --- M ttcn3-bsc-test/sccplite/BSC_Tests.cfg 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/88/14288/1 diff --git a/ttcn3-bsc-test/sccplite/BSC_Tests.cfg b/ttcn3-bsc-test/sccplite/BSC_Tests.cfg index adb126c..6b72eec 100644 --- a/ttcn3-bsc-test/sccplite/BSC_Tests.cfg +++ b/ttcn3-bsc-test/sccplite/BSC_Tests.cfg @@ -11,6 +11,7 @@ [MODULE_PARAMETERS] BSC_Tests.mp_bsc_ip := "172.18.12.20"; BSC_Tests.mp_test_ip := "172.18.12.203"; +BSC_Tests.mp_enable_osmux_test := true; BSC_Tests.mp_bssap_cfg := { transport := BSSAP_TRANSPORT_SCCPlite_SERVER, sccp_service_type := "mtp3_itu", -- To view, visit https://gerrit.osmocom.org/14288 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I9b4ce2d7151d65b4c83417a59fd01672971b3937 Gerrit-Change-Number: 14288 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 12:55:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 12:55:08 +0000 Subject: Change in osmo-ggsn[master]: ggsn: Use gtp_delete_context_req2() everywhere In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14011 ) Change subject: ggsn: Use gtp_delete_context_req2() everywhere ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/14011 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iecc8c5ac45207e7e20129559c4ac7f3c67dfb36a Gerrit-Change-Number: 14011 Gerrit-PatchSet: 4 Gerrit-Owner: osmith Gerrit-Assignee: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 31 May 2019 12:55:08 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 13:02:19 2019 From: gerrit-no-reply at lists.osmocom.org (Daniel Willmann) Date: Fri, 31 May 2019 13:02:19 +0000 Subject: Change in docker-playground[master]: bsc: Fix: Disable osmux for ttcn3-bsc-test-sccplite-latest In-Reply-To: References: Message-ID: Daniel Willmann has posted comments on this change. ( https://gerrit.osmocom.org/14288 ) Change subject: bsc: Fix: Disable osmux for ttcn3-bsc-test-sccplite-latest ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14288 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9b4ce2d7151d65b4c83417a59fd01672971b3937 Gerrit-Change-Number: 14288 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Daniel Willmann Gerrit-Comment-Date: Fri, 31 May 2019 13:02:19 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 13:21:11 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 31 May 2019 13:21:11 +0000 Subject: Change in docker-playground[master]: bsc: Fix: Disable osmux for ttcn3-bsc-test-sccplite-latest In-Reply-To: References: Message-ID: Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/14288 ) Change subject: bsc: Fix: Disable osmux for ttcn3-bsc-test-sccplite-latest ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/14288 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9b4ce2d7151d65b4c83417a59fd01672971b3937 Gerrit-Change-Number: 14288 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 31 May 2019 13:21:11 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 13:21:12 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 31 May 2019 13:21:12 +0000 Subject: Change in docker-playground[master]: bsc: Fix: Disable osmux for ttcn3-bsc-test-sccplite-latest In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/14288 ) Change subject: bsc: Fix: Disable osmux for ttcn3-bsc-test-sccplite-latest ...................................................................... bsc: Fix: Disable osmux for ttcn3-bsc-test-sccplite-latest Recent commit added bits to disable "osmux on/off" vty commands on "-latest" tested, but forgot to add required line in sccplite/BSC_Tests.cfg for sed command in jenkins.sh script to work. Fixes: 2cdab85e5f42c876a3024ca2154c67c21d1d78cc Change-Id: I9b4ce2d7151d65b4c83417a59fd01672971b3937 --- M ttcn3-bsc-test/sccplite/BSC_Tests.cfg 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Daniel Willmann: Looks good to me, approved Pau Espin Pedrol: Verified diff --git a/ttcn3-bsc-test/sccplite/BSC_Tests.cfg b/ttcn3-bsc-test/sccplite/BSC_Tests.cfg index adb126c..6b72eec 100644 --- a/ttcn3-bsc-test/sccplite/BSC_Tests.cfg +++ b/ttcn3-bsc-test/sccplite/BSC_Tests.cfg @@ -11,6 +11,7 @@ [MODULE_PARAMETERS] BSC_Tests.mp_bsc_ip := "172.18.12.20"; BSC_Tests.mp_test_ip := "172.18.12.203"; +BSC_Tests.mp_enable_osmux_test := true; BSC_Tests.mp_bssap_cfg := { transport := BSSAP_TRANSPORT_SCCPlite_SERVER, sccp_service_type := "mtp3_itu", -- To view, visit https://gerrit.osmocom.org/14288 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I9b4ce2d7151d65b4c83417a59fd01672971b3937 Gerrit-Change-Number: 14288 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 13:29:47 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 13:29:47 +0000 Subject: Change in osmocom-bb[master]: trxcon: Suppress POWERON to TRX if we're already powered on. In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14275 ) Change subject: trxcon: Suppress POWERON to TRX if we're already powered on. ...................................................................... Patch Set 1: > (2 comments) > > Let's clarify the commit description, it's a bit confusing now. I > can take care and upload the new version if you don't mind. thanks, sure, go ahead! -- To view, visit https://gerrit.osmocom.org/14275 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I834e8897b95a2490811319697fc7cab6076db480 Gerrit-Change-Number: 14275 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 31 May 2019 13:29:47 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:17:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:17:09 +0000 Subject: Change in osmo-bts[master]: osmo-bts-oc2g: Fix status LED responsibilities In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14259 ) Change subject: osmo-bts-oc2g: Fix status LED responsibilities ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14259 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ifae634c6c2ecec7d32298c0f266f91f3e81308f5 Gerrit-Change-Number: 14259 Gerrit-PatchSet: 1 Gerrit-Owner: Daniel Willmann Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 31 May 2019 14:17:09 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:17:34 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:17:34 +0000 Subject: Change in osmo-bts[master]: osmo-bts-lc15: Change LED behaviour to be the same as oc2g In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14260 ) Change subject: osmo-bts-lc15: Change LED behaviour to be the same as oc2g ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14260 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iad32a22fc72e2aba45e4f1b9ae585f6e0b8757ed Gerrit-Change-Number: 14260 Gerrit-PatchSet: 1 Gerrit-Owner: Daniel Willmann Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 31 May 2019 14:17:34 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:17:36 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:17:36 +0000 Subject: Change in osmo-bts[master]: osmo-bts-oc2g: Fix status LED responsibilities In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14259 ) Change subject: osmo-bts-oc2g: Fix status LED responsibilities ...................................................................... osmo-bts-oc2g: Fix status LED responsibilities osmo-bts-oc2g no longer modifies the status LED and instead leaves that to the bts manager. The service file now also creates a directory in /var/run needed for osmo-bts to communicate with oc2gbts-mgr. This status file is used by oc2gbts-mgr to figure out when the bts is operational. Related: SYS#4493 Change-Id: Ifae634c6c2ecec7d32298c0f266f91f3e81308f5 --- M contrib/systemd/osmo-bts-oc2g.service M src/osmo-bts-oc2g/main.c 2 files changed, 3 insertions(+), 14 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/contrib/systemd/osmo-bts-oc2g.service b/contrib/systemd/osmo-bts-oc2g.service index 7b0168a..860aeb1 100644 --- a/contrib/systemd/osmo-bts-oc2g.service +++ b/contrib/systemd/osmo-bts-oc2g.service @@ -3,11 +3,8 @@ [Service] Type=simple -ExecStartPre=/bin/sh -c 'echo 1 > /sys/class/leds/usr0/brightness' -ExecStartPre=/bin/sh -c 'echo 1 > /sys/class/leds/usr1/brightness' ExecStart=/usr/bin/osmo-bts-oc2g -s -c /etc/osmocom/osmo-bts-oc2g.cfg -M -ExecStopPost=/bin/sh -c 'echo 1 > /sys/class/leds/usr0/brightness' -ExecStopPost=/bin/sh -c 'echo 0 > /sys/class/leds/usr1/brightness' +RuntimeDirectory=osmo-bts Restart=always RestartSec=2 RestartPreventExitStatus=1 diff --git a/src/osmo-bts-oc2g/main.c b/src/osmo-bts-oc2g/main.c index 29fab47..5b66c6f 100644 --- a/src/osmo-bts-oc2g/main.c +++ b/src/osmo-bts-oc2g/main.c @@ -151,24 +151,16 @@ { static uint64_t states = 0; uint64_t old_states = states; - int led_rf_active_on; if (on) states |= (1ULL << which); else states &= ~(1ULL << which); - led_rf_active_on = - (states & (1ULL << BTS_STATUS_RF_ACTIVE)) && - !(states & (1ULL << BTS_STATUS_RF_MUTE)); - LOGP(DL1C, LOGL_INFO, - "Set global status #%d to %d (%04llx -> %04llx), LEDs: ACT %d\n", + "Set global status #%d to %d (%04llx -> %04llx)\n", which, on, - (long long)old_states, (long long)states, - led_rf_active_on); - - oc2gbts_led_set(led_rf_active_on ? LED_GREEN : LED_OFF); + (long long)old_states, (long long)states); } void bts_model_print_help() -- To view, visit https://gerrit.osmocom.org/14259 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ifae634c6c2ecec7d32298c0f266f91f3e81308f5 Gerrit-Change-Number: 14259 Gerrit-PatchSet: 1 Gerrit-Owner: Daniel Willmann Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:17:37 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:17:37 +0000 Subject: Change in osmo-bts[master]: osmo-bts-lc15: Change LED behaviour to be the same as oc2g In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14260 ) Change subject: osmo-bts-lc15: Change LED behaviour to be the same as oc2g ...................................................................... osmo-bts-lc15: Change LED behaviour to be the same as oc2g It looks like the status LED on the sysmobts2100 never worked correctly since lc15bts-mgr expects osmo-bts-lc15 to create and manage /var/run/osmo-bts/state, but there is nothing to do so in osmo-bts. This patch copies the functions from oc2g to manage the state file in lc15. Change-Id: Iad32a22fc72e2aba45e4f1b9ae585f6e0b8757ed Related: SYS#4493 --- M contrib/systemd/osmo-bts-lc15.service M src/osmo-bts-litecell15/main.c 2 files changed, 31 insertions(+), 14 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/contrib/systemd/osmo-bts-lc15.service b/contrib/systemd/osmo-bts-lc15.service index 90e7fc2..7c51110 100644 --- a/contrib/systemd/osmo-bts-lc15.service +++ b/contrib/systemd/osmo-bts-lc15.service @@ -3,11 +3,8 @@ [Service] Type=simple -ExecStartPre=/bin/sh -c 'echo 1 > /sys/class/leds/usr0/brightness' -ExecStartPre=/bin/sh -c 'echo 1 > /sys/class/leds/usr1/brightness' ExecStart=/usr/bin/osmo-bts-lc15 -t 2 -s -c /etc/osmocom/osmo-bts-lc15.cfg -M -ExecStopPost=/bin/sh -c 'echo 1 > /sys/class/leds/usr0/brightness' -ExecStopPost=/bin/sh -c 'echo 0 > /sys/class/leds/usr1/brightness' +RuntimeDirectory=osmo-bts Restart=always RestartSec=2 RestartPreventExitStatus=1 diff --git a/src/osmo-bts-litecell15/main.c b/src/osmo-bts-litecell15/main.c index e4f9a56..c47d76d 100644 --- a/src/osmo-bts-litecell15/main.c +++ b/src/osmo-bts-litecell15/main.c @@ -51,6 +51,25 @@ #include #include +static int write_status_file(char *status_file, char *status_str) +{ + FILE *outf; + char tmp[PATH_MAX+1]; + + snprintf(tmp, sizeof(tmp)-1, "/var/run/osmo-bts/%s", status_file); + tmp[PATH_MAX-1] = '\0'; + + outf = fopen(tmp, "w"); + if (!outf) + return -1; + + fprintf(outf, "%s\n", status_str); + + fclose(outf); + + return 0; +} + /*NTQD: Change how rx_nr is handle in multi-trx*/ #define LC15BTS_RF_LOCK_PATH "/var/lock/bts_rf_lock" @@ -116,6 +135,9 @@ int bts_model_oml_estab(struct gsm_bts *bts) { + /* update status file */ + write_status_file("state", ""); + return 0; } @@ -123,24 +145,16 @@ { static uint64_t states = 0; uint64_t old_states = states; - int led_rf_active_on; if (on) states |= (1ULL << which); else states &= ~(1ULL << which); - led_rf_active_on = - (states & (1ULL << BTS_STATUS_RF_ACTIVE)) && - !(states & (1ULL << BTS_STATUS_RF_MUTE)); - LOGP(DL1C, LOGL_INFO, - "Set global status #%d to %d (%04llx -> %04llx), LEDs: ACT %d\n", + "Set global status #%d to %d (%04llx -> %04llx)", which, on, - (long long)old_states, (long long)states, - led_rf_active_on); - - lc15bts_led_set(led_rf_active_on ? LED_GREEN : LED_OFF); + (long long)old_states, (long long)states); } void bts_model_print_help() @@ -197,11 +211,17 @@ void bts_model_abis_close(struct gsm_bts *bts) { + /* write to status file */ + write_status_file("state", "ABIS DOWN"); + /* for now, we simply terminate the program and re-spawn */ bts_shutdown(bts, "Abis close"); } int main(int argc, char **argv) { + /* create status file with initial state */ + write_status_file("state", "ABIS DOWN"); + return bts_main(argc, argv); } -- To view, visit https://gerrit.osmocom.org/14260 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iad32a22fc72e2aba45e4f1b9ae585f6e0b8757ed Gerrit-Change-Number: 14260 Gerrit-PatchSet: 1 Gerrit-Owner: Daniel Willmann Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:18:07 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:18:07 +0000 Subject: Change in osmo-ggsn[master]: gtp: Document spec reasoning drop of Rx DeleteCtxReq In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14282 ) Change subject: gtp: Document spec reasoning drop of Rx DeleteCtxReq ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14282 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I563fc0b48595d71ebdf56a50f4e9984eee423676 Gerrit-Change-Number: 14282 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 31 May 2019 14:18:07 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:18:53 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:18:53 +0000 Subject: Change in osmo-ggsn[master]: pdp: Introduce new API pdp_count_secondary In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14283 ) Change subject: pdp: Introduce new API pdp_count_secondary ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14283 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id2d84ad1cdb0f3b500efeda4cc0fbccb24ae0c61 Gerrit-Change-Number: 14283 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 31 May 2019 14:18:53 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:19:21 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:19:21 +0000 Subject: Change in osmo-ggsn[master]: gtp_create_pdp_ind: simplify code by reordering and compacting parsing In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14284 ) Change subject: gtp_create_pdp_ind: simplify code by reordering and compacting parsing ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14284 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I52d5a3543ce6cf764bd84303b5a0d8b0643d998d Gerrit-Change-Number: 14284 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 31 May 2019 14:19:21 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:20:03 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:20:03 +0000 Subject: Change in osmo-ggsn[master]: gtp: Refactor code to use gtp_freepdp(_teardown) APIs In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14285 ) Change subject: gtp: Refactor code to use gtp_freepdp(_teardown) APIs ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14285 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9f0b774e9385a7a8d81ec9702f158e2f9a50d571 Gerrit-Change-Number: 14285 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 31 May 2019 14:20:03 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:20:06 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:20:06 +0000 Subject: Change in osmo-ggsn[master]: gtp: Document spec reasoning drop of Rx DeleteCtxReq In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14282 ) Change subject: gtp: Document spec reasoning drop of Rx DeleteCtxReq ...................................................................... gtp: Document spec reasoning drop of Rx DeleteCtxReq Change-Id: I563fc0b48595d71ebdf56a50f4e9984eee423676 --- M gtp/gtp.c 1 file changed, 8 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/gtp/gtp.c b/gtp/gtp.c index b98fba0..430eeb4 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -2613,6 +2613,14 @@ gtpie_gettv1(ie, GTPIE_TEARDOWN, 0, &teardown); if (!teardown) { + /* TS 29.060 section 7.3.5: If a GSN receives a Delete PDP context + * without a Teardown Indicator or with a Teardown Indicator with + * value set to "0" and only that PDP context is active for a PDN + * connection, then the GSN shall ignore the message. (Note: + * This is symptom of a race condition. The reliable delivery of + * signalling messages will eventually lead to a consistent + * situation, allowing the teardown of the PDP context.) + */ for (n = 0; n < PDP_MAXNSAPI; n++) if (linked_pdp->secondary_tei[n]) count++; -- To view, visit https://gerrit.osmocom.org/14282 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I563fc0b48595d71ebdf56a50f4e9984eee423676 Gerrit-Change-Number: 14282 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:21:23 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:21:23 +0000 Subject: Change in osmo-ggsn[master]: gtp: Document free pdp ctx in non-teardown scenario In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14286 ) Change subject: gtp: Document free pdp ctx in non-teardown scenario ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/14286/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/#/c/14286/1//COMMIT_MSG at 7 PS1, Line 7: gtp: Document free pdp ctx in non-teardown scenario I think that patch isn't only documenting something, but also changing code. -- To view, visit https://gerrit.osmocom.org/14286 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia47ac792111fe1e9aa68222b32b5da823642206b Gerrit-Change-Number: 14286 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Harald Welte Gerrit-Comment-Date: Fri, 31 May 2019 14:21:23 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:21:58 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:21:58 +0000 Subject: Change in osmo-ggsn[master]: ggsn: Use gtp_delete_context_req2() everywhere In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14011 ) Change subject: ggsn: Use gtp_delete_context_req2() everywhere ...................................................................... Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14011 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iecc8c5ac45207e7e20129559c4ac7f3c67dfb36a Gerrit-Change-Number: 14011 Gerrit-PatchSet: 4 Gerrit-Owner: osmith Gerrit-Assignee: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 31 May 2019 14:21:58 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:23:14 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:23:14 +0000 Subject: Change in osmo-ci[master]: OBS: latest: remove redundant checkout in build() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14257 ) Change subject: OBS: latest: remove redundant checkout in build() ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/14257 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I74290968fe25a6311da0de26ff675bbd687ba156 Gerrit-Change-Number: 14257 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 31 May 2019 14:23:14 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:23:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:23:16 +0000 Subject: Change in osmo-ci[master]: OBS: latest: remove redundant checkout in build() In-Reply-To: References: Message-ID: Harald Welte has removed a vote on this change. Change subject: OBS: latest: remove redundant checkout in build() ...................................................................... Removed Verified+1 by Harald Welte -- To view, visit https://gerrit.osmocom.org/14257 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: deleteVote Gerrit-Change-Id: I74290968fe25a6311da0de26ff675bbd687ba156 Gerrit-Change-Number: 14257 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:23:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:23:19 +0000 Subject: Change in osmo-ci[master]: OBS: latest: remove redundant checkout in build() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14257 ) Change subject: OBS: latest: remove redundant checkout in build() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14257 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I74290968fe25a6311da0de26ff675bbd687ba156 Gerrit-Change-Number: 14257 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 31 May 2019 14:23:19 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:23:23 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:23:23 +0000 Subject: Change in osmo-ci[master]: OBS: build osmo-gsm-manuals-dev in latest In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14244 ) Change subject: OBS: build osmo-gsm-manuals-dev in latest ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14244 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib7251cca9116151e473798879375cd5eb48ff3ad Gerrit-Change-Number: 14244 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 31 May 2019 14:23:23 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:23:59 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:23:59 +0000 Subject: Change in osmo-bts[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14247 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... debian: create -doc subpackage with pdf manuals I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: I6d7a182d0a668693a5014aca0edc50ada9ac0d0f --- M debian/control A debian/osmo-bts-doc.install M debian/rules M doc/manuals/Makefile.am 4 files changed, 18 insertions(+), 2 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/control b/debian/control index 0377d9f..2b66716 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,8 @@ libosmocore-dev, libosmo-abis-dev, libgps-dev, - txt2man + txt2man, + osmo-gsm-manuals-dev Standards-Version: 3.9.8 Vcs-Browser: http://git.osmocom.org/osmo-bts/ Vcs-Git: git://git.osmocom.org/osmo-bts @@ -48,3 +49,12 @@ Depends: osmo-bts-virtual (= ${binary:Version}), ${misc:Depends} Description: Debug symbols for the osmo-bts-virtual Make debugging possible + +Package: osmo-bts-doc +Architecture: all +Section: doc +Priority: optional +Depends: ${misc:Depends} +Description: ${misc:Package} PDF documentation + Various manuals: user manual, VTY reference manual and/or + protocol/interface manuals. diff --git a/debian/osmo-bts-doc.install b/debian/osmo-bts-doc.install new file mode 100644 index 0000000..65aaaf7 --- /dev/null +++ b/debian/osmo-bts-doc.install @@ -0,0 +1 @@ +usr/share/doc/osmo-bts-doc/*.pdf diff --git a/debian/rules b/debian/rules index 27de11b..94bed0e 100755 --- a/debian/rules +++ b/debian/rules @@ -16,7 +16,7 @@ dh_strip --package=osmo-bts-trx --dbg-package=osmo-bts-trx-dbg override_dh_auto_configure: - dh_auto_configure -- --enable-trx --with-systemdsystemunitdir=/lib/systemd/system + dh_auto_configure -- --enable-trx --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals override_dh_clean: dh_clean @@ -26,3 +26,7 @@ # Print test results in case of a failure override_dh_auto_test: dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false) + +# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers) +override_dh_compress: + dh_compress -X.pdf diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am index 90fff57..1d8125f 100644 --- a/doc/manuals/Makefile.am +++ b/doc/manuals/Makefile.am @@ -20,5 +20,6 @@ VTY_REFERENCE = osmobts-vty-reference.xml include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc + OSMO_REPOSITORY = osmo-bts include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc endif -- To view, visit https://gerrit.osmocom.org/14247 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I6d7a182d0a668693a5014aca0edc50ada9ac0d0f Gerrit-Change-Number: 14247 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:24:11 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:24:11 +0000 Subject: Change in osmo-ci[master]: OBS: latest: remove redundant checkout in build() In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14257 ) Change subject: OBS: latest: remove redundant checkout in build() ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/14257 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I74290968fe25a6311da0de26ff675bbd687ba156 Gerrit-Change-Number: 14257 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 31 May 2019 14:24:11 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:24:12 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:24:12 +0000 Subject: Change in osmo-ci[master]: OBS: latest: remove redundant checkout in build() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14257 ) Change subject: OBS: latest: remove redundant checkout in build() ...................................................................... OBS: latest: remove redundant checkout in build() Don't checkout a specific version in build(), this is already done in checkout(). Change-Id: I74290968fe25a6311da0de26ff675bbd687ba156 --- M scripts/osmocom-latest-packages.sh 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Harald Welte: Looks good to me, approved; Verified diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index 020efaa..58b4a9f 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -66,7 +66,6 @@ echo "====> Building $project" cd "$TOP/$project" VER=$(get_last_tag "$project") - git checkout -f -B "$VER" "refs/tags/$VER" if [ -x ./git-version-gen ]; then ./git-version-gen . > .tarball-version 2>/dev/null gbp buildpackage -S -uc -us -d --git-ignore-branch "--git-export-dir=$output" \ -- To view, visit https://gerrit.osmocom.org/14257 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I74290968fe25a6311da0de26ff675bbd687ba156 Gerrit-Change-Number: 14257 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:24:17 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:24:17 +0000 Subject: Change in osmo-ci[master]: OBS: build osmo-gsm-manuals-dev in latest In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14244 ) Change subject: OBS: build osmo-gsm-manuals-dev in latest ...................................................................... Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/14244 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib7251cca9116151e473798879375cd5eb48ff3ad Gerrit-Change-Number: 14244 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 31 May 2019 14:24:17 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:24:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:24:18 +0000 Subject: Change in osmo-ci[master]: OBS: build osmo-gsm-manuals-dev in latest In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14244 ) Change subject: OBS: build osmo-gsm-manuals-dev in latest ...................................................................... OBS: build osmo-gsm-manuals-dev in latest Enable in osmocom-latest-packages.sh. Check it out and create the source package for the latest release as usually, but also create a second version for debian 8 with adjusted dependencies (like in nightly [1]). [1] Change-Id: I3570599ede51b974d350064f44f77e360fafd8b0 Related: OS#3899 Change-Id: Ib7251cca9116151e473798879375cd5eb48ff3ad --- M scripts/osmocom-latest-packages.sh 1 file changed, 21 insertions(+), 1 deletion(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Harald Welte: Looks good to me, approved; Verified diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index 58b4a9f..543c43a 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -58,6 +58,22 @@ git checkout -f -B "$VER" "refs/tags/$VER" } +# Copy an already checked out repository dir and apply its debian 8 patch. +# $1: Osmocom repository +checkout_copy_debian8_jessie() { + echo + echo "====> Checking out $1-debian8-jessie" + cd "$TOP" + if [ -d "$1-debian8-jessie" ]; then + rm -rf "$1-debian8-jessie" + fi + cp -a "$1" "$1-debian8-jessie" + cd "$1-debian8-jessie" + patch -p1 < debian/patches/build-for-debian8.patch + git commit --amend --no-edit debian/ + cd .. +} + build() { project=$1 gitbpargs="$2" @@ -101,12 +117,12 @@ # add those once they have tagged any versions that include the 'debian' sub-dir: #rtl-sdr #osmo-fl2k -#osmo-gsm-manuals build_osmocom() { prepare checkout limesuite + checkout osmo-gsm-manuals checkout libosmocore checkout libosmo-sccp checkout libosmo-abis @@ -134,7 +150,11 @@ # TODO: enable once libosmo-abis > 0.6.0 is available (IPA keepalive FSM) # checkout osmo-remsim + checkout_copy_debian8_jessie "osmo-gsm-manuals" + build limesuite --git-upstream-tree="$(get_last_tag limesuite)" + build osmo-gsm-manuals + build osmo-gsm-manuals-debian8-jessie build libosmocore build libosmo-sccp build libosmo-abis -- To view, visit https://gerrit.osmocom.org/14244 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ib7251cca9116151e473798879375cd5eb48ff3ad Gerrit-Change-Number: 14244 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:24:38 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:24:38 +0000 Subject: Change in libosmo-sccp[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14245 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... debian: create -doc subpackage with pdf manuals I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: I1f412953e60c10e6146327a90edbd18d738e1365 --- M debian/control A debian/osmo-stp-doc.install M debian/rules M doc/manuals/Makefile.am 4 files changed, 18 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Pau Espin Pedrol: Looks good to me, approved diff --git a/debian/control b/debian/control index 44d0fc6..cede17a 100644 --- a/debian/control +++ b/debian/control @@ -14,7 +14,8 @@ doxygen, libdpkg-perl, libosmo-netif-dev (>= 0.3.0), - libsctp-dev + libsctp-dev, + osmo-gsm-manuals-dev Standards-Version: 3.9.7 Vcs-Git: git://git.osmocom.org/libosmo-sccp.git Vcs-Browser: http://git.osmocom.org/libosmo-sccp/ @@ -121,3 +122,12 @@ networks. At this point it is a very minimal implementation, missing lots of the functionality usually present in a STP, such as Global Title Routing, Global Title Translation. + +Package: osmo-stp-doc +Architecture: all +Section: doc +Priority: optional +Depends: ${misc:Depends} +Description: ${misc:Package} PDF documentation + Various manuals: user manual, VTY reference manual and/or + protocol/interface manuals. diff --git a/debian/osmo-stp-doc.install b/debian/osmo-stp-doc.install new file mode 100644 index 0000000..d5db594 --- /dev/null +++ b/debian/osmo-stp-doc.install @@ -0,0 +1 @@ +usr/share/doc/osmo-stp-doc/*.pdf diff --git a/debian/rules b/debian/rules index f443aee..a8eeff5 100755 --- a/debian/rules +++ b/debian/rules @@ -22,7 +22,7 @@ # enable-static: we require the tests to link to the static libosmo-sigtran # library to access symbols not starting with osmo_* override_dh_auto_configure: - dh_auto_configure -- --enable-static --with-systemdsystemunitdir=/lib/systemd/system + dh_auto_configure -- --enable-static --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals # Print test results in case of a failure override_dh_auto_test: @@ -31,3 +31,7 @@ override_dh_clean: dh_clean rm -f .version tests/package.m4 tests/testsuite + +# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers) +override_dh_compress: + dh_compress -X.pdf diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am index ce5b128..68c2d86 100644 --- a/doc/manuals/Makefile.am +++ b/doc/manuals/Makefile.am @@ -13,5 +13,6 @@ VTY_REFERENCE = osmostp-vty-reference.xml include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc + OSMO_REPOSITORY=osmo-stp include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc endif -- To view, visit https://gerrit.osmocom.org/14245 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I1f412953e60c10e6146327a90edbd18d738e1365 Gerrit-Change-Number: 14245 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:25:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:25:08 +0000 Subject: Change in osmo-ggsn[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14248 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... debian: create -doc subpackage with pdf manuals I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: I5563e023dc3c8b158a79ce0c9e1478e117b0ec37 --- M debian/control A debian/osmo-ggsn-doc.install M debian/rules M doc/manuals/Makefile.am 4 files changed, 18 insertions(+), 2 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/control b/debian/control index 1524438..272fd79 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,8 @@ pkg-config, libdpkg-perl, git, dh-autoreconf, - libosmocore-dev (>= 0.8.0) + libosmocore-dev (>= 0.8.0), + osmo-gsm-manuals-dev Standards-Version: 3.9.6 Vcs-Browser: http://git.osmocom.org/osmo-ggsn/ Vcs-Git: git://git.osmocom.org/osmo-ggsn @@ -74,3 +75,12 @@ . The library libgtp implements the GTP protocol between SGSN and GGSN and this package contains the development files for this library. + +Package: osmo-ggsn-doc +Architecture: all +Section: doc +Priority: optional +Depends: ${misc:Depends} +Description: ${misc:Package} PDF documentation + Various manuals: user manual, VTY reference manual and/or + protocol/interface manuals. diff --git a/debian/osmo-ggsn-doc.install b/debian/osmo-ggsn-doc.install new file mode 100644 index 0000000..32c2212 --- /dev/null +++ b/debian/osmo-ggsn-doc.install @@ -0,0 +1 @@ +usr/share/doc/osmo-ggsn-doc/*.pdf diff --git a/debian/rules b/debian/rules index bca65bb..d0f5935 100755 --- a/debian/rules +++ b/debian/rules @@ -19,4 +19,8 @@ dh_strip -plibgtp4 --dbg-package=libgtp-dbg override_dh_auto_configure: - dh_auto_configure -- --with-systemdsystemunitdir=/lib/systemd/system + dh_auto_configure -- --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals + +# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers) +override_dh_compress: + dh_compress -X.pdf diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am index d41ca2c..0c9e2e1 100644 --- a/doc/manuals/Makefile.am +++ b/doc/manuals/Makefile.am @@ -12,5 +12,6 @@ VTY_REFERENCE = osmoggsn-vty-reference.xml include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc + OSMO_REPOSITORY=osmo-ggsn include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc endif -- To view, visit https://gerrit.osmocom.org/14248 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I5563e023dc3c8b158a79ce0c9e1478e117b0ec37 Gerrit-Change-Number: 14248 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:25:10 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:25:10 +0000 Subject: Change in osmo-trx[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14256 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... debian: create -doc subpackage with pdf manuals I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: I34858a18a34fc467f274ac164697a242f4cf0df8 --- M debian/control A debian/osmo-trx-doc.install M debian/patches/build-for-debian8.patch M debian/rules M doc/manuals/Makefile.am 5 files changed, 37 insertions(+), 18 deletions(-) Approvals: Jenkins Builder: Verified Pau Espin Pedrol: Looks good to me, approved diff --git a/debian/control b/debian/control index ffb9ac1..8ff59f0 100644 --- a/debian/control +++ b/debian/control @@ -14,7 +14,8 @@ libtalloc-dev, libusrp-dev, liblimesuite-dev, - libosmocore-dev (>= 0.10.0) + libosmocore-dev (>= 0.10.0), + osmo-gsm-manuals-dev Standards-Version: 3.9.6 Vcs-Browser: http://cgit.osmocom.org/osmo-trx Vcs-Git: git://git.osmocom.org/osmo-trx @@ -89,3 +90,12 @@ 3GPP is the "3rd Generation Partnership Project" which is the collaboration between different telecommunication associations for developing new generations of mobile phone networks. (post-2G/GSM) + +Package: osmo-trx-doc +Architecture: all +Section: doc +Priority: optional +Depends: ${misc:Depends} +Description: ${misc:Package} PDF documentation + Various manuals: user manual, VTY reference manual and/or + protocol/interface manuals. diff --git a/debian/osmo-trx-doc.install b/debian/osmo-trx-doc.install new file mode 100644 index 0000000..aa207b5 --- /dev/null +++ b/debian/osmo-trx-doc.install @@ -0,0 +1 @@ +usr/share/doc/osmo-trx-doc/*.pdf diff --git a/debian/patches/build-for-debian8.patch b/debian/patches/build-for-debian8.patch index cd1f356..6b917c4 100644 --- a/debian/patches/build-for-debian8.patch +++ b/debian/patches/build-for-debian8.patch @@ -1,16 +1,16 @@ -Index: osmo-trx/debian/control -=================================================================== ---- osmo-trx.orig/debian/control -+++ osmo-trx/debian/control +diff --git a/debian/control b/debian/control +index 8ff59f0..126c16a 100644 +--- a/debian/control ++++ b/debian/control @@ -13,7 +13,6 @@ Build-Depends: debhelper (>= 9), libfftw3-dev, libtalloc-dev, libusrp-dev, - liblimesuite-dev, - libosmocore-dev (>= 0.10.0) + libosmocore-dev (>= 0.10.0), + osmo-gsm-manuals-dev Standards-Version: 3.9.6 - Vcs-Browser: http://cgit.osmocom.org/osmo-trx -@@ -29,7 +28,7 @@ Package: osmo-trx-dbg +@@ -30,7 +29,7 @@ Package: osmo-trx-dbg Architecture: any Section: debug Priority: extra @@ -19,11 +19,10 @@ Description: Debug symbols for the osmo-trx-* Make debugging possible -@@ -70,22 +70,3 @@ Description: SDR transceiver that implem - 3GPP is the "3rd Generation Partnership Project" which is the collaboration +@@ -72,25 +71,6 @@ Description: SDR transceiver that implements Layer 1 of a GSM BTS (USRP1) between different telecommunication associations for developing new generations of mobile phone networks. (post-2G/GSM) -- + -Package: osmo-trx-lms -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} @@ -42,16 +41,20 @@ - 3GPP is the "3rd Generation Partnership Project" which is the collaboration - between different telecommunication associations for developing new - generations of mobile phone networks. (post-2G/GSM) -Index: osmo-trx/debian/rules -=================================================================== ---- osmo-trx.orig/debian/rules -+++ osmo-trx/debian/rules +- + Package: osmo-trx-doc + Architecture: all + Section: doc +diff --git a/debian/rules b/debian/rules +index 627c0c8..d9285e2 100755 +--- a/debian/rules ++++ b/debian/rules @@ -9,7 +9,7 @@ override_dh_shlibdeps: dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info override_dh_auto_configure: -- dh_auto_configure -- --with-uhd --with-usrp1 --with-lms --with-systemdsystemunitdir=/lib/systemd/system -+ dh_auto_configure -- --with-uhd --with-usrp1 --with-systemdsystemunitdir=/lib/systemd/system +- dh_auto_configure -- --with-uhd --with-usrp1 --with-lms --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals ++ dh_auto_configure -- --with-uhd --with-usrp1 --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals override_dh_strip: dh_strip --dbg-package=osmo-trx-dbg diff --git a/debian/rules b/debian/rules index 68de706..627c0c8 100755 --- a/debian/rules +++ b/debian/rules @@ -9,7 +9,11 @@ dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info override_dh_auto_configure: - dh_auto_configure -- --with-uhd --with-usrp1 --with-lms --with-systemdsystemunitdir=/lib/systemd/system + dh_auto_configure -- --with-uhd --with-usrp1 --with-lms --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals override_dh_strip: dh_strip --dbg-package=osmo-trx-dbg + +# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers) +override_dh_compress: + dh_compress -X.pdf diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am index a1f3bfb..7bf1f58 100644 --- a/doc/manuals/Makefile.am +++ b/doc/manuals/Makefile.am @@ -12,5 +12,6 @@ VTY_REFERENCE = osmotrx-vty-reference.xml include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc + OSMO_REPOSITORY = osmo-trx include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc endif -- To view, visit https://gerrit.osmocom.org/14256 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I34858a18a34fc467f274ac164697a242f4cf0df8 Gerrit-Change-Number: 14256 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:25:15 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:25:15 +0000 Subject: Change in osmo-bsc[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14246 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... debian: create -doc subpackage with pdf manuals I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: I8dfb5658e567978aa8fe82f45d8287dbd1df969c --- M debian/control A debian/osmo-bsc-doc.install M debian/rules M doc/manuals/Makefile.am 4 files changed, 18 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Pau Espin Pedrol: Looks good to me, approved diff --git a/debian/control b/debian/control index 141cb5e..7410193 100644 --- a/debian/control +++ b/debian/control @@ -17,7 +17,8 @@ libosmo-sigtran-dev (>= 0.10.0), libosmo-abis-dev (>= 0.5.1), libosmo-netif-dev (>= 0.3.0), - libosmo-mgcp-client-dev (>= 1.4.0) + libosmo-mgcp-client-dev (>= 1.4.0), + osmo-gsm-manuals-dev Standards-Version: 3.9.8 Vcs-Git: git://git.osmocom.org/osmo-bsc.git Vcs-Browser: https://git.osmocom.org/osmo-bsc/ @@ -64,3 +65,12 @@ Multi-Arch: foreign Depends: ${misc:Depends}, ${shlibs:Depends} Description: Command line utilities to manage measurement reports. + +Package: osmo-bsc-doc +Architecture: all +Section: doc +Priority: optional +Depends: ${misc:Depends} +Description: ${misc:Package} PDF documentation + Various manuals: user manual, VTY reference manual and/or + protocol/interface manuals. diff --git a/debian/osmo-bsc-doc.install b/debian/osmo-bsc-doc.install new file mode 100644 index 0000000..b0e2cc4 --- /dev/null +++ b/debian/osmo-bsc-doc.install @@ -0,0 +1 @@ +usr/share/doc/osmo-bsc-doc/*.pdf diff --git a/debian/rules b/debian/rules index ffc99db..a6646c1 100755 --- a/debian/rules +++ b/debian/rules @@ -45,7 +45,7 @@ dh $@ --with autoreconf # debmake generated override targets -CONFIGURE_FLAGS += --with-systemdsystemunitdir=/lib/systemd/system +CONFIGURE_FLAGS += --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals override_dh_auto_configure: dh_auto_configure -- $(CONFIGURE_FLAGS) # @@ -60,3 +60,7 @@ # Print test results in case of a failure override_dh_auto_test: dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false) + +# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers) +override_dh_compress: + dh_compress -X.pdf diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am index 482c1ab..49ddc18 100644 --- a/doc/manuals/Makefile.am +++ b/doc/manuals/Makefile.am @@ -20,5 +20,6 @@ VTY_REFERENCE = osmobsc-vty-reference.xml include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc + OSMO_REPOSITORY = osmo-bsc include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc endif -- To view, visit https://gerrit.osmocom.org/14246 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I8dfb5658e567978aa8fe82f45d8287dbd1df969c Gerrit-Change-Number: 14246 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:25:17 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:25:17 +0000 Subject: Change in osmo-hlr[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14249 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... debian: create -doc subpackage with pdf manuals I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: I4a327bac68769892634236c573c313c7859c6199 --- M debian/control A debian/osmo-hlr-doc.install M debian/rules M doc/manuals/Makefile.am 4 files changed, 18 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Pau Espin Pedrol: Looks good to me, approved diff --git a/debian/control b/debian/control index 23c39ce..debf669 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,8 @@ libosmo-abis-dev, libosmo-netif-dev, libsqlite3-dev, - sqlite3 + sqlite3, + osmo-gsm-manuals-dev Standards-Version: 3.9.6 Vcs-Browser: http://cgit.osmocom.org/osmo-hlr Vcs-Git: git://git.osmocom.org/osmo-hlr @@ -57,3 +58,12 @@ and External USSD Entities (EUSEs) using this library to implement clients. . This package contains the development headers. + +Package: osmo-hlr-doc +Architecture: all +Section: doc +Priority: optional +Depends: ${misc:Depends} +Description: ${misc:Package} PDF documentation + Various manuals: user manual, VTY reference manual and/or + protocol/interface manuals. diff --git a/debian/osmo-hlr-doc.install b/debian/osmo-hlr-doc.install new file mode 100644 index 0000000..f876859 --- /dev/null +++ b/debian/osmo-hlr-doc.install @@ -0,0 +1 @@ +usr/share/doc/osmo-hlr-doc/*.pdf diff --git a/debian/rules b/debian/rules index 9e97c6c..f5a79fb 100755 --- a/debian/rules +++ b/debian/rules @@ -17,4 +17,8 @@ dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false) override_dh_auto_configure: - dh_auto_configure -- --with-systemdsystemunitdir=/lib/systemd/system + dh_auto_configure -- --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals + +# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers) +override_dh_compress: + dh_compress -X.pdf diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am index 687698f..9e1295a 100644 --- a/doc/manuals/Makefile.am +++ b/doc/manuals/Makefile.am @@ -15,6 +15,7 @@ VTY_REFERENCE = osmohlr-vty-reference.xml include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc + OSMO_REPOSITORY = osmo-hlr include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc endif -- To view, visit https://gerrit.osmocom.org/14249 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I4a327bac68769892634236c573c313c7859c6199 Gerrit-Change-Number: 14249 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:25:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:25:19 +0000 Subject: Change in osmo-sgsn[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14253 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... debian: create -doc subpackage with pdf manuals I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: I9c09a0cb5c65fa2e2cd9817edb4656b2a1a35bb9 --- M debian/control A debian/osmo-sgsn-doc.install M debian/rules M doc/manuals/Makefile.am 4 files changed, 18 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Pau Espin Pedrol: Looks good to me, approved diff --git a/debian/control b/debian/control index 9594a08..9ad95a1 100644 --- a/debian/control +++ b/debian/control @@ -20,7 +20,8 @@ libosmo-sccp-dev, libosmo-sigtran-dev, libosmo-netif-dev, - libosmo-gsup-client-dev + libosmo-gsup-client-dev, + osmo-gsm-manuals-dev Standards-Version: 3.9.8 Vcs-Git: git://git.osmocom.org/osmo-sgsn.git Vcs-Browser: https://git.osmocom.org/osmo-sgsn @@ -67,3 +68,12 @@ Priority: extra Depends: osmo-gbproxy (= ${binary:Version}), ${misc:Depends} Description: Debug symbols for Osmocom GPRS Gb Interface Proxy + +Package: osmo-sgsn-doc +Architecture: all +Section: doc +Priority: optional +Depends: ${misc:Depends} +Description: ${misc:Package} PDF documentation + Various manuals: user manual, VTY reference manual and/or + protocol/interface manuals. diff --git a/debian/osmo-sgsn-doc.install b/debian/osmo-sgsn-doc.install new file mode 100644 index 0000000..bdc6a99 --- /dev/null +++ b/debian/osmo-sgsn-doc.install @@ -0,0 +1 @@ +usr/share/doc/osmo-sgsn-doc/*.pdf diff --git a/debian/rules b/debian/rules index af6b5b6..cfd692a 100755 --- a/debian/rules +++ b/debian/rules @@ -46,7 +46,7 @@ # debmake generated override targets # Set options for ./configure -CONFIGURE_FLAGS += --enable-iu --with-systemdsystemunitdir=/lib/systemd/system +CONFIGURE_FLAGS += --enable-iu --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals override_dh_auto_configure: dh_auto_configure -- $(CONFIGURE_FLAGS) # @@ -63,3 +63,7 @@ # Print test results in case of a failure override_dh_auto_test: dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false) + +# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers) +override_dh_compress: + dh_compress -X.pdf diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am index 00a08c8..52283ab 100644 --- a/doc/manuals/Makefile.am +++ b/doc/manuals/Makefile.am @@ -12,5 +12,6 @@ VTY_REFERENCE = osmosgsn-vty-reference.xml include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc + OSMO_REPOSITORY = osmo-sgsn include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc endif -- To view, visit https://gerrit.osmocom.org/14253 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I9c09a0cb5c65fa2e2cd9817edb4656b2a1a35bb9 Gerrit-Change-Number: 14253 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:25:23 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:25:23 +0000 Subject: Change in osmo-sip-connector[master]: Cosmetic: debian: build-depends in multiple lines In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14254 ) Change subject: Cosmetic: debian: build-depends in multiple lines ...................................................................... Cosmetic: debian: build-depends in multiple lines Change-Id: I2d126341d8653408b0a6a371088aead58b61bb84 --- M debian/control 1 file changed, 8 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Pau Espin Pedrol: Looks good to me, approved diff --git a/debian/control b/debian/control index aad1da0..21de9c0 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,14 @@ Section: net Priority: optional Maintainer: Holger Hans Peter Freyther -Build-Depends: debhelper (>= 7.0.0~), autotools-dev, pkg-config, libosmocore-dev, libsofia-sip-ua-glib-dev, libsofia-sip-ua-dev, dh-systemd (>= 1.5), dh-autoreconf +Build-Depends: debhelper (>= 7.0.0~), + autotools-dev, + pkg-config, + libosmocore-dev, + libsofia-sip-ua-glib-dev, + libsofia-sip-ua-dev, + dh-systemd (>= 1.5), + dh-autoreconf Standards-Version: 3.8.4 Homepage: https://osmocom.org/projects/osmo-sip-conector/wiki Vcs-Git: git://git.osmocom.org/osmo-sip-connector.git -- To view, visit https://gerrit.osmocom.org/14254 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I2d126341d8653408b0a6a371088aead58b61bb84 Gerrit-Change-Number: 14254 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:25:24 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:25:24 +0000 Subject: Change in osmo-pcu[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14252 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... debian: create -doc subpackage with pdf manuals I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: I9f2e7cfd93ee0b13d064c606a20378c1ea01400e --- M debian/control A debian/osmo-pcu-doc.install M debian/rules M doc/manuals/Makefile.am 4 files changed, 18 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Pau Espin Pedrol: Looks good to me, approved diff --git a/debian/control b/debian/control index f6aaaba..c808795 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,8 @@ dh-systemd (>= 1.5), autotools-dev, pkg-config, - libosmocore-dev (>= 0.10.1) + libosmocore-dev (>= 0.10.1), + osmo-gsm-manuals-dev Standards-Version: 3.9.8 Homepage: http://osmocom.org/projects/osmopcu Vcs-Git: git://git.osmocom.org/osmo-pcu @@ -35,3 +36,12 @@ networks. OsmoPCU is the Osmcoom implementation of this network element. It interfaces to osmo-bts via the PCU socket of OsmoBTS and via Gb (NS-over-IP) interface with the SGSN such as OsmoSGSN. + +Package: osmo-pcu-doc +Architecture: all +Section: doc +Priority: optional +Depends: ${misc:Depends} +Description: ${misc:Package} PDF documentation + Various manuals: user manual, VTY reference manual and/or + protocol/interface manuals. diff --git a/debian/osmo-pcu-doc.install b/debian/osmo-pcu-doc.install new file mode 100644 index 0000000..8411fbc --- /dev/null +++ b/debian/osmo-pcu-doc.install @@ -0,0 +1 @@ +usr/share/doc/osmo-pcu-doc/*.pdf diff --git a/debian/rules b/debian/rules index 712dd75..2e4284a 100755 --- a/debian/rules +++ b/debian/rules @@ -24,4 +24,8 @@ dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false) override_dh_auto_configure: - dh_auto_configure -- --with-systemdsystemunitdir=/lib/systemd/system + dh_auto_configure -- --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals + +# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers) +override_dh_compress: + dh_compress -X.pdf diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am index a41c063..96675ec 100644 --- a/doc/manuals/Makefile.am +++ b/doc/manuals/Makefile.am @@ -16,5 +16,6 @@ VTY_REFERENCE = osmopcu-vty-reference.xml include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc + OSMO_REPOSITORY = osmo-pcu include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc endif -- To view, visit https://gerrit.osmocom.org/14252 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I9f2e7cfd93ee0b13d064c606a20378c1ea01400e Gerrit-Change-Number: 14252 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:25:27 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:25:27 +0000 Subject: Change in osmo-mgw[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14250 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... debian: create -doc subpackage with pdf manuals I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: I8466713a8d414ea56ca24f6f7119338ad2b98ce5 --- M debian/control A debian/osmo-mgw-doc.install M debian/rules M doc/manuals/Makefile.am 4 files changed, 18 insertions(+), 2 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/control b/debian/control index 6fb34c0..8e0e079 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,8 @@ pkg-config, autotools-dev, libosmocore-dev, - libosmo-netif-dev + libosmo-netif-dev, + osmo-gsm-manuals-dev Standards-Version: 3.9.8 Vcs-Git: git://git.osmocom.org/osmo-mgw.git Vcs-Browser: https://git.osmocom.org/osmo-mgw/ @@ -33,3 +34,12 @@ Multi-Arch: same Depends: libosmo-mgcp-client5 (= ${binary:Version}), ${misc:Depends} Description: libosmo-mgcp-client: Osmocom's Media Gateway Control Protocol client utilities + +Package: osmo-mgw-doc +Architecture: all +Section: doc +Priority: optional +Depends: ${misc:Depends} +Description: ${misc:Package} PDF documentation + Various manuals: user manual, VTY reference manual and/or + protocol/interface manuals. diff --git a/debian/osmo-mgw-doc.install b/debian/osmo-mgw-doc.install new file mode 100644 index 0000000..7cb07ad --- /dev/null +++ b/debian/osmo-mgw-doc.install @@ -0,0 +1 @@ +usr/share/doc/osmo-mgw-doc/*.pdf diff --git a/debian/rules b/debian/rules index d67243c..d38898d 100755 --- a/debian/rules +++ b/debian/rules @@ -30,6 +30,10 @@ dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false) override_dh_auto_configure: - dh_auto_configure -- --with-systemdsystemunitdir=/lib/systemd/system + dh_auto_configure -- --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals + +# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers) +override_dh_compress: + dh_compress -X.pdf # See https://www.debian.org/doc/manuals/developers-reference/best-pkging-practices.html#bpp-dbg diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am index 901cffa..0faebf3 100644 --- a/doc/manuals/Makefile.am +++ b/doc/manuals/Makefile.am @@ -12,5 +12,6 @@ VTY_REFERENCE = osmomgw-vty-reference.xml include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc + OSMO_REPOSITORY = osmo-mgw include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc endif -- To view, visit https://gerrit.osmocom.org/14250 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I8466713a8d414ea56ca24f6f7119338ad2b98ce5 Gerrit-Change-Number: 14250 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:25:29 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:25:29 +0000 Subject: Change in osmo-sip-connector[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14255 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... debian: create -doc subpackage with pdf manuals I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: I30df67b1c31f07e85002da4c2c75afb67ba529d2 --- M debian/control A debian/osmo-sip-connector-doc.install M debian/rules M doc/manuals/Makefile.am 4 files changed, 18 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Pau Espin Pedrol: Looks good to me, approved diff --git a/debian/control b/debian/control index 21de9c0..38de657 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,8 @@ libsofia-sip-ua-glib-dev, libsofia-sip-ua-dev, dh-systemd (>= 1.5), - dh-autoreconf + dh-autoreconf, + osmo-gsm-manuals-dev Standards-Version: 3.8.4 Homepage: https://osmocom.org/projects/osmo-sip-conector/wiki Vcs-Git: git://git.osmocom.org/osmo-sip-connector.git @@ -28,3 +29,12 @@ Depends: osmo-sip-connector (= ${binary:Version}), ${misc:Depends} Description: Debug symbols for the osmo-sip-connector Make debugging possible + +Package: osmo-sip-connector-doc +Architecture: all +Section: doc +Priority: optional +Depends: ${misc:Depends} +Description: ${misc:Package} PDF documentation + Various manuals: user manual, VTY reference manual and/or + protocol/interface manuals. diff --git a/debian/osmo-sip-connector-doc.install b/debian/osmo-sip-connector-doc.install new file mode 100644 index 0000000..b814eae --- /dev/null +++ b/debian/osmo-sip-connector-doc.install @@ -0,0 +1 @@ +usr/share/doc/osmo-sip-connector-doc/*.pdf diff --git a/debian/rules b/debian/rules index e4e7ca9..b63a132 100755 --- a/debian/rules +++ b/debian/rules @@ -15,4 +15,8 @@ dh_strip --dbg-package=osmo-sip-connector-dbg override_dh_auto_configure: - dh_auto_configure -- --with-systemdsystemunitdir=/lib/systemd/system + dh_auto_configure -- --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals + +# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers) +override_dh_compress: + dh_compress -X.pdf diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am index 1a9b5b9..6bb46cc 100644 --- a/doc/manuals/Makefile.am +++ b/doc/manuals/Makefile.am @@ -12,5 +12,6 @@ VTY_REFERENCE = osmosipconnector-vty-reference.xml include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc + OSMO_REPOSITORY = osmo-sip-connector include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc endif -- To view, visit https://gerrit.osmocom.org/14255 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I30df67b1c31f07e85002da4c2c75afb67ba529d2 Gerrit-Change-Number: 14255 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:25:33 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:25:33 +0000 Subject: Change in osmo-msc[master]: debian: create -doc subpackage with pdf manuals In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14251 ) Change subject: debian: create -doc subpackage with pdf manuals ...................................................................... debian: create -doc subpackage with pdf manuals I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: Iafa9fba60b3ad4478ec24d6ba8538ec80ce99f52 --- M debian/control A debian/osmo-msc-doc.install M debian/rules M doc/manuals/Makefile.am 4 files changed, 18 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/debian/control b/debian/control index 54a3546..8b0d690 100644 --- a/debian/control +++ b/debian/control @@ -21,7 +21,8 @@ libosmo-mgcp-client-dev (>= 1.1.0), libosmo-gsup-client-dev (>= 0.2.1), libosmo-netif-dev (>= 0.1.0), - libosmo-ranap-dev (>= 0.2.0) + libosmo-ranap-dev (>= 0.2.0), + osmo-gsm-manuals-dev Standards-Version: 3.9.8 Vcs-Git: git://git.osmocom.org/osmo-msc.git Vcs-Browser: https://git.osmocom.org/osmo-msc/ @@ -62,3 +63,12 @@ . This package contains the debug symbols for osmo-msc in order to generate meaningful backtraces in bug-reports. + +Package: osmo-msc-doc +Architecture: all +Section: doc +Priority: optional +Depends: ${misc:Depends} +Description: ${misc:Package} PDF documentation + Various manuals: user manual, VTY reference manual and/or + protocol/interface manuals. diff --git a/debian/osmo-msc-doc.install b/debian/osmo-msc-doc.install new file mode 100644 index 0000000..ee15cf9 --- /dev/null +++ b/debian/osmo-msc-doc.install @@ -0,0 +1 @@ +usr/share/doc/osmo-msc-doc/*.pdf diff --git a/debian/rules b/debian/rules index 1cf3a35..5925ca9 100755 --- a/debian/rules +++ b/debian/rules @@ -46,7 +46,7 @@ # debmake generated override targets # Set options for ./configure -CONFIGURE_FLAGS += --enable-iu --enable-smpp --with-systemdsystemunitdir=/lib/systemd/system +CONFIGURE_FLAGS += --enable-iu --enable-smpp --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals override_dh_auto_configure: dh_auto_configure -- $(CONFIGURE_FLAGS) # @@ -61,3 +61,7 @@ # Print test results in case of a failure override_dh_auto_test: dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false) + +# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers) +override_dh_compress: + dh_compress -X.pdf diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am index 42e353d..2ce6a0a 100644 --- a/doc/manuals/Makefile.am +++ b/doc/manuals/Makefile.am @@ -13,5 +13,6 @@ VTY_REFERENCE = osmomsc-vty-reference.xml include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc + OSMO_REPOSITORY = osmo-msc include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc endif -- To view, visit https://gerrit.osmocom.org/14251 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iafa9fba60b3ad4478ec24d6ba8538ec80ce99f52 Gerrit-Change-Number: 14251 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:25:50 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:25:50 +0000 Subject: Change in osmo-ggsn[master]: ggsn: Start gtp retrans timer during startup In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14201 ) Change subject: ggsn: Start gtp retrans timer during startup ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14201 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie4adc52829446539fbbb5e9e0cf75a04f91c7eea Gerrit-Change-Number: 14201 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 31 May 2019 14:25:50 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:25:56 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:25:56 +0000 Subject: Change in osmo-ggsn[master]: gtp: Fix typo dublicate->duplicate In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14263 ) Change subject: gtp: Fix typo dublicate->duplicate ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14263 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic572c216e74fa937dfd12f9f3dc03de18b6b123e Gerrit-Change-Number: 14263 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 31 May 2019 14:25:56 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:25:57 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:25:57 +0000 Subject: Change in osmo-ggsn[master]: ggsn: Start gtp retrans timer during startup In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14201 ) Change subject: ggsn: Start gtp retrans timer during startup ...................................................................... ggsn: Start gtp retrans timer during startup This timer was added in osmo-ggsn.git dda21ed7d4a897c9284c69175d0da598598eae40, but it was never initially started since it was introducing, and as a result retransmissions never being triggered. Also as a consequence, gtp_retrans is never called. That function is responsible from triggering retransmissions and to free old responses waiting in the resp queue (to check for duplicates). Since it's never called, the retransmit resp queue will grow over time. Fixes: dda21ed7d4a897c9284c69175d0da598598eae40 Fixes: OS#3997 Change-Id: Ie4adc52829446539fbbb5e9e0cf75a04f91c7eea --- M ggsn/ggsn.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 6306924..9b45109 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -1022,6 +1022,7 @@ /* Start GTP re-transmission timer */ osmo_timer_setup(&ggsn->gtp_timer, ggsn_gtp_tmr_cb, ggsn); + ggsn_gtp_tmr_start(ggsn); gtp_set_cb_data_ind(ggsn->gsn, encaps_tun); gtp_set_cb_delete_context(ggsn->gsn, delete_context); -- To view, visit https://gerrit.osmocom.org/14201 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie4adc52829446539fbbb5e9e0cf75a04f91c7eea Gerrit-Change-Number: 14201 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:25:57 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:25:57 +0000 Subject: Change in osmo-ggsn[master]: gtp: Take queue_resp into account to schedule retrans timer In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14211 ) Change subject: gtp: Take queue_resp into account to schedule retrans timer ...................................................................... gtp: Take queue_resp into account to schedule retrans timer Before this patch they were not taken into account, which means some resp messages could stay more time than required enqueued. Change-Id: Iebf405b2310a34785f3b363cc2a9f415281f6030 --- M gtp/gtp.c 1 file changed, 15 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, but someone else must approve osmith: Looks good to me, approved Jenkins Builder: Verified diff --git a/gtp/gtp.c b/gtp/gtp.c index 430eeb4..7dafefd 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -590,22 +590,34 @@ int gtp_retranstimeout(struct gsn_t *gsn, struct timeval *timeout) { - time_t now, later; + time_t now, later, diff; struct qmsg_t *qmsg; + timeout->tv_usec = 0; if (queue_getfirst(gsn->queue_req, &qmsg)) { timeout->tv_sec = 10; - timeout->tv_usec = 0; } else { now = time(NULL); later = qmsg->timeout; timeout->tv_sec = later - now; - timeout->tv_usec = 0; if (timeout->tv_sec < 0) timeout->tv_sec = 0; /* No negative allowed */ if (timeout->tv_sec > 10) timeout->tv_sec = 10; /* Max sleep for 10 sec */ } + + if (queue_getfirst(gsn->queue_resp, &qmsg)) { + /* already set by queue_req, do nothing */ + } else { /* trigger faster if earlier timeout exists in queue_resp */ + now = time(NULL); + later = qmsg->timeout; + diff = later - now; + if (diff < 0) + diff = 0; + if (diff < timeout->tv_sec) + timeout->tv_sec = diff; + } + return 0; } -- To view, visit https://gerrit.osmocom.org/14211 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iebf405b2310a34785f3b363cc2a9f415281f6030 Gerrit-Change-Number: 14211 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: osmith -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:25:58 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:25:58 +0000 Subject: Change in osmo-ggsn[master]: gtp: Fix typo dublicate->duplicate In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14263 ) Change subject: gtp: Fix typo dublicate->duplicate ...................................................................... gtp: Fix typo dublicate->duplicate Change-Id: Ic572c216e74fa937dfd12f9f3dc03de18b6b123e --- M gtp/gtp.c 1 file changed, 11 insertions(+), 11 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/gtp/gtp.c b/gtp/gtp.c index 7dafefd..eec8daf 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -383,13 +383,13 @@ * requires the receiving GSN to send a response, with the same information * as in the original response. For most messages this happens automatically: * - * Echo: Automatically dublicates the original response + * Echo: Automatically duplicates the original response * Create pdp context: The SGSN may send create context request even if * a context allready exist (imsi+nsapi?). This means that the reply will - automatically dublicate the original response. It might however have + automatically duplicate the original response. It might however have * side effects in the application which is asked twice to validate * the login. - * Update pdp context: Automatically dublicates the original response??? + * Update pdp context: Automatically duplicates the original response??? * Delete pdp context. Automatically in gtp0, but in gtp1 will generate * a nonexist reply message. * @@ -724,7 +724,7 @@ return 0; } -static int gtp_dublicate(struct gsn_t *gsn, uint8_t version, +static int gtp_duplicate(struct gsn_t *gsn, uint8_t version, struct sockaddr_in *peer, uint16_t seq) { struct qmsg_t *qmsg; @@ -984,8 +984,8 @@ int fd, void *pack, unsigned len) { - /* Check if it was a dublicate request */ - if (!gtp_dublicate(gsn, 0, peer, get_seq(pack))) + /* Check if it was a duplicate request */ + if (!gtp_duplicate(gsn, 0, peer, get_seq(pack))) return 0; /* Send off reply to request */ @@ -1370,7 +1370,7 @@ uint8_t linked_nsapi = 0; struct pdp_t *linked_pdp = NULL; - if (!gtp_dublicate(gsn, version, peer, seq)) + if (!gtp_duplicate(gsn, version, peer, seq)) return 0; pdp = &pdp_buf; @@ -2072,8 +2072,8 @@ uint64_t imsi; uint8_t nsapi; - /* Is this a dublicate ? */ - if (!gtp_dublicate(gsn, version, peer, seq)) { + /* Is this a duplicate ? */ + if (!gtp_duplicate(gsn, version, peer, seq)) { return 0; /* We allready send of response once */ } @@ -2565,8 +2565,8 @@ int n; int count = 0; - /* Is this a dublicate ? */ - if (!gtp_dublicate(gsn, version, peer, seq)) { + /* Is this a duplicate ? */ + if (!gtp_duplicate(gsn, version, peer, seq)) { return 0; /* We allready send off response once */ } -- To view, visit https://gerrit.osmocom.org/14263 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ic572c216e74fa937dfd12f9f3dc03de18b6b123e Gerrit-Change-Number: 14263 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:27:09 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 14:27:09 +0000 Subject: Change in osmocom-bb[master]: trxcon: Dropping a to-be-transmitted message is a NOTICEable event In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14276 ) Change subject: trxcon: Dropping a to-be-transmitted message is a NOTICEable event ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/14276/1/src/host/trxcon/trx_if.c File src/host/trxcon/trx_if.c: https://gerrit.osmocom.org/#/c/14276/1/src/host/trxcon/trx_if.c at 619 PS1, Line 619: LOGL_NOTICE > I would even say this is a ERROR. feel free to elevate it, trxcon is your program. The main pint it's for sure much higher than DEBUG... -- To view, visit https://gerrit.osmocom.org/14276 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If5084feb9e847d212530b1a5985390405d91008b Gerrit-Change-Number: 14276 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 31 May 2019 14:27:09 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:44:25 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 31 May 2019 14:44:25 +0000 Subject: Change in osmo-ttcn3-hacks[master]: L1CTL_RACH_REQ: make both chan_nr and link_id configurable Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14289 Change subject: L1CTL_RACH_REQ: make both chan_nr and link_id configurable ...................................................................... L1CTL_RACH_REQ: make both chan_nr and link_id configurable Change-Id: Ica6b9551b11c20fa0b8f4a8dcdc91ca07601642c --- M library/L1CTL_PortType.ttcn M library/L1CTL_Types.ttcn 2 files changed, 10 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/89/14289/1 diff --git a/library/L1CTL_PortType.ttcn b/library/L1CTL_PortType.ttcn index bdcf024..7af680c 100644 --- a/library/L1CTL_PortType.ttcn +++ b/library/L1CTL_PortType.ttcn @@ -80,12 +80,15 @@ } } - function f_L1CTL_RACH(L1CTL_PT pt, uint8_t ra, uint8_t combined := 1, uint16_t offset := 0) return GsmFrameNumber { + function f_L1CTL_RACH(L1CTL_PT pt, uint8_t ra, uint8_t combined := 1, uint16_t offset := 0, + template (value) RslChannelNr chan_nr := ts_RslChanNr_RACH(0), + template (value) RslLinkId link_id := ts_RslLinkID_DCCH(0)) + return GsmFrameNumber { var L1ctlDlMessage rc; var GsmFrameNumber fn; timer T := 2.0; T.start - pt.send(ts_L1CTL_RACH_REQ(ra, combined, offset)) + pt.send(ts_L1CTL_RACH_REQ(ra, combined, offset, chan_nr, link_id)) alt { [] pt.receive(tr_L1CTL_RACH_CONF) -> value rc { fn := rc.dl_info.frame_nr }; [] pt.receive { repeat; }; diff --git a/library/L1CTL_Types.ttcn b/library/L1CTL_Types.ttcn index 2a97099..01214b2 100644 --- a/library/L1CTL_Types.ttcn +++ b/library/L1CTL_Types.ttcn @@ -487,12 +487,13 @@ template L1ctlDlMessage tr_L1CTL_CCCH_MODE_CONF := tr_L1CTL_MsgType(L1CTL_CCCH_MODE_CONF); - template L1ctlUlMessage ts_L1CTL_RACH_REQ(uint8_t ra, uint8_t combined, uint16_t offset) := { + template L1ctlUlMessage ts_L1CTL_RACH_REQ(uint8_t ra, uint8_t combined, uint16_t offset, + template (value) RslChannelNr chan_nr := ts_RslChanNr_RACH(0), + template (value) RslLinkId link_id := ts_RslLinkID_DCCH(0)) := { header := ts_L1ctlHeader(L1CTL_RACH_REQ), ul_info := { - /* FIXME: both RSL chan_nr and link_id should be configurable */ - chan_nr := t_RslChanNr_RACH(0), - link_id := ts_RslLinkID_DCCH(0), + chan_nr := chan_nr, + link_id := link_id, padding := '0000'O }, ul_info_tbf := omit, -- To view, visit https://gerrit.osmocom.org/14289 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ica6b9551b11c20fa0b8f4a8dcdc91ca07601642c Gerrit-Change-Number: 14289 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:44:26 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 31 May 2019 14:44:26 +0000 Subject: Change in osmo-ttcn3-hacks[master]: library/RSL_Types.ttcn: t(r|)s_RSL_CHAN_RQD: make chan_nr configurable Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14290 Change subject: library/RSL_Types.ttcn: t(r|)s_RSL_CHAN_RQD: make chan_nr configurable ...................................................................... library/RSL_Types.ttcn: t(r|)s_RSL_CHAN_RQD: make chan_nr configurable Change-Id: I89e9286e86b09ed54eb7749d107f5d8d57b93644 --- M bts/BTS_Tests.ttcn M library/RSL_Types.ttcn 2 files changed, 11 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/90/14290/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 482108d..322a00f 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -1245,10 +1245,10 @@ timer T := 5.0; T.start; alt { - [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CHAN_RQD(ra, fn, ?))) { + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CHAN_RQD(ra, fn, t_RslChanNr_RACH(0)))) { T.stop; } - [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CHAN_RQD(?, ?, ?))) { + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CHAN_RQD(?, ?, ?, ?))) { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Unexpected CHAN RQD"); } [] RSL_CCHAN.receive { repeat; } diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index ef3f45b..7f37720 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -1532,21 +1532,26 @@ /* 8.5.3 BTS -> BSC */ - template (value) RSL_Message ts_RSL_CHAN_RQD(OCT1 ra, GsmFrameNumber fn, uint8_t acc_del := 0) := { + template (value) RSL_Message ts_RSL_CHAN_RQD(OCT1 ra, GsmFrameNumber fn, + template (value) RslChannelNr chan_nr := ts_RslChanNr_RACH(0), + uint8_t acc_del := 0) := { msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), msg_type := RSL_MT_CHAN_RQD, ies := { - t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := ts_RslChanNr_RACH(0)}), + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + /* TODO: we may need to have optional RSL_IE_LINK_IDENT IE here */ t_RSL_IE(RSL_IE_REQ_REFERENCE, RSL_IE_Body:{req_ref := ts_RSL_IE_ReqRef(ra, fn)}), t_RSL_IE(RSL_IE_ACCESS_DELAY, RSL_IE_Body:{access_delay := acc_del}) } } template RSL_Message tr_RSL_CHAN_RQD(template OCT1 ra, template GsmFrameNumber fn := ?, - template uint8_t acc_del := ?) := { + template RslChannelNr chan_nr := ts_RslChanNr_RACH(0), + template uint8_t acc_del := ?) := { msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), msg_type := RSL_MT_CHAN_RQD, ies := { - tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_RACH(0)}), + tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), + /* TODO: we may need to have optional RSL_IE_LINK_IDENT IE here */ tr_RSL_IE(RSL_IE_Body:{req_ref := tr_RSL_IE_ReqRef(ra, fn)}), tr_RSL_IE(RSL_IE_Body:{access_delay := acc_del}) } -- To view, visit https://gerrit.osmocom.org/14290 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I89e9286e86b09ed54eb7749d107f5d8d57b93644 Gerrit-Change-Number: 14290 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:44:26 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 31 May 2019 14:44:26 +0000 Subject: Change in osmo-ttcn3-hacks[master]: BTS_Tests.ttcn: introduce TC_ho_rach() for handover RACH Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14291 Change subject: BTS_Tests.ttcn: introduce TC_ho_rach() for handover RACH ...................................................................... BTS_Tests.ttcn: introduce TC_ho_rach() for handover RACH Change-Id: If2e8d9c9947823df62f4bcc9a7fcd20734ff7858 Depends on: (trxcon) Ia967820a536c99966ba2c60b63d2ea9edb093f46 --- M bts/BTS_Tests.ttcn 1 file changed, 44 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/91/14291/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 322a00f..e513d45 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -1493,6 +1493,49 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } +/* Test handover RACH detection on inactive channel */ +testcase TC_ho_rach() runs on test_CT { + f_init(); + f_init_l1ctl(); + f_sleep(1.0); + f_l1_tune(L1CTL); + + var OCT1 ra := f_rnd_ra_cs(); + var ASP_RSL_Unitdata ud; + var GsmFrameNumber fn; + + /* Switch trxcon to a dedicated channel without waiting + * for Immediate Assignment and sending Access Burst */ + f_L1CTL_DM_EST_REQ(L1CTL, { false, mp_trx0_arfcn }, + valueof(ts_RslChanNr_Bm(2)), 7); + + /* Send Access Burst on TS2 (TCH/F), main DCCH */ + fn := f_L1CTL_RACH(L1CTL, oct2int(ra), + chan_nr := ts_RslChanNr_Bm(2), + link_id := ts_RslLinkID_DCCH(0)); + + /* Wait for RSL_CHAN_RQD */ + timer T := 3.0; + T.start; + alt { + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CHAN_RQD(ra, fn, t_RslChanNr_Bm(2)))) { + log("Received handover RACH on ", ts_RslChanNr_Bm(2)); + setverdict(pass); + } + [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CHAN_RQD(?, ?, ?, ?))) -> value ud { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("RACH wan not expected on ", ud)); + } + [] RSL_CCHAN.receive { repeat; } + [] T.timeout { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Timeout waiting for CHAN RQD: FN=", fn, " RA=", ra)); + } + } + + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + /*********************************************************************** * Measurement Processing / Reporting ***********************************************************************/ @@ -5466,6 +5509,7 @@ execute( TC_rach_content() ); execute( TC_rach_count() ); execute( TC_rach_max_ta() ); + execute( TC_ho_rach() ); execute( TC_rach_load_idle_thresh0() ); execute( TC_rach_load_idle_below_thresh() ); execute( TC_rach_load_count() ); -- To view, visit https://gerrit.osmocom.org/14291 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If2e8d9c9947823df62f4bcc9a7fcd20734ff7858 Gerrit-Change-Number: 14291 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:56:10 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 31 May 2019 14:56:10 +0000 Subject: Change in osmocom-bb[master]: trxcon/l1ctl.c: properly handle handover RACH request In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14274 ) Change subject: trxcon/l1ctl.c: properly handle handover RACH request ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/14274 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia967820a536c99966ba2c60b63d2ea9edb093f46 Gerrit-Change-Number: 14274 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 31 May 2019 14:56:10 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 14:57:22 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 31 May 2019 14:57:22 +0000 Subject: Change in osmocom-bb[master]: trxcon/l1ctl.c: properly handle handover RACH request In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14274 ) Change subject: trxcon/l1ctl.c: properly handle handover RACH request ...................................................................... Patch Set 3: Verified+1 Code-Review+1 Tested using to be introduced TC_ho_rach(), see https://gerrit.osmocom.org/#/c/osmo-ttcn3-hacks/+/14291/ -- To view, visit https://gerrit.osmocom.org/14274 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia967820a536c99966ba2c60b63d2ea9edb093f46 Gerrit-Change-Number: 14274 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 31 May 2019 14:57:22 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 15:03:17 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 31 May 2019 15:03:17 +0000 Subject: Change in osmo-sgsn[master]: sgsn_libgtp: Replace deprcated API pdp_newpdp with per-gsn new API Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14292 Change subject: sgsn_libgtp: Replace deprcated API pdp_newpdp with per-gsn new API ...................................................................... sgsn_libgtp: Replace deprcated API pdp_newpdp with per-gsn new API Depends: osmo-ggsn.git I653cbdc185165592d985e3efab6e3f1add97877b Related: OS#2873 Change-Id: Iaaffe0ec4d9590309c62b62c446677c6f6732f2a --- M src/gprs/sgsn_libgtp.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/92/14292/1 diff --git a/src/gprs/sgsn_libgtp.c b/src/gprs/sgsn_libgtp.c index a8a1502..e9fffd8 100644 --- a/src/gprs/sgsn_libgtp.c +++ b/src/gprs/sgsn_libgtp.c @@ -153,7 +153,7 @@ imsi_ui64 = imsi_str2gtp(mmctx->imsi); - rc = pdp_newpdp(&pdp, imsi_ui64, nsapi, NULL); + rc = gtp_pdp_newpdp(ggsn->gsn, &pdp, imsi_ui64, nsapi, NULL); if (rc) { LOGP(DGPRS, LOGL_ERROR, "Out of libgtp PDP Contexts\n"); return NULL; -- To view, visit https://gerrit.osmocom.org/14292 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Iaaffe0ec4d9590309c62b62c446677c6f6732f2a Gerrit-Change-Number: 14292 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 15:03:30 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 31 May 2019 15:03:30 +0000 Subject: Change in osmo-ggsn[master]: cosmetic: gtp: Document free pdp ctx in non-teardown scenario In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14286 to look at the new patch set (#2). Change subject: cosmetic: gtp: Document free pdp ctx in non-teardown scenario ...................................................................... cosmetic: gtp: Document free pdp ctx in non-teardown scenario Change-Id: Ia47ac792111fe1e9aa68222b32b5da823642206b --- M gtp/gtp.c 1 file changed, 25 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/86/14286/2 -- To view, visit https://gerrit.osmocom.org/14286 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia47ac792111fe1e9aa68222b32b5da823642206b Gerrit-Change-Number: 14286 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 15:03:31 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 31 May 2019 15:03:31 +0000 Subject: Change in osmo-ggsn[master]: gtp: Re-arrange free pdp ctx code in non-teardown scenario Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14293 Change subject: gtp: Re-arrange free pdp ctx code in non-teardown scenario ...................................................................... gtp: Re-arrange free pdp ctx code in non-teardown scenario Code modified actually behaves the same, since gtp_freepdp() also calls delete cb, and this way it's more consistent with rest of the code base. Change-Id: I299765816e9d885497110d2e834f7ccdc943052c --- M gtp/gtp.c 1 file changed, 14 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/93/14293/1 diff --git a/gtp/gtp.c b/gtp/gtp.c index 5dde6b5..9ae208a 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -2421,13 +2421,14 @@ because we don't want user to release its related data and not use it anymore. */ - if (gsn->cb_delete_context) - gsn->cb_delete_context(pdp); if (pdp == linked_pdp) { - linked_pdp->secondary_tei[pdp->nsapi & 0xf0] = 0; - linked_pdp->nodata = 1; - } else - pdp_freepdp(pdp); + if (gsn->cb_delete_context) + gsn->cb_delete_context(pdp); + pdp->secondary_tei[pdp->nsapi & 0xf0] = 0; + pdp->nodata = 1; + } else { + gtp_freepdp(gsn, pdp); + } } return 0; @@ -2510,14 +2511,14 @@ because we don't want user to release its related data and not use it anymore. */ - if (gsn->cb_delete_context) - gsn->cb_delete_context(pdp); if (pdp == linked_pdp) { - linked_pdp->secondary_tei[pdp->nsapi & 0xf0] = - 0; - linked_pdp->nodata = 1; - } else - pdp_freepdp(pdp); + if (gsn->cb_delete_context) + gsn->cb_delete_context(pdp); + pdp->secondary_tei[pdp->nsapi & 0xf0] = 0; + pdp->nodata = 1; + } else { + gtp_freepdp(gsn, pdp); + } } } /* if (cause == GTPCAUSE_ACC_REQ) */ -- To view, visit https://gerrit.osmocom.org/14293 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I299765816e9d885497110d2e834f7ccdc943052c Gerrit-Change-Number: 14293 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 15:03:32 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 31 May 2019 15:03:32 +0000 Subject: Change in osmo-ggsn[master]: pdp: Drop unused code for haship Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14294 Change subject: pdp: Drop unused code for haship ...................................................................... pdp: Drop unused code for haship Nowadays we have one tun device per APN, so we don't need this hash table because we use the ippool of the APN to find the related PDP ctx pointer. Change-Id: Ife3f222daa87f0630ff34ffc3e63f4dad2ad914b --- M gtp/pdp.c M gtp/pdp.h 2 files changed, 0 insertions(+), 78 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/94/14294/1 diff --git a/gtp/pdp.c b/gtp/pdp.c index 92fe5ec..a5146e9 100644 --- a/gtp/pdp.c +++ b/gtp/pdp.c @@ -38,7 +38,6 @@ static struct pdp_t pdpa[PDP_MAX]; /* PDP storage */ static struct pdp_t *hashtid[PDP_MAX]; /* Hash table for IMSI + NSAPI */ -/* struct pdp_t* haship[PDP_MAX]; Hash table for IP and network interface */ /* *********************************************************** * Functions related to PDP storage @@ -291,77 +290,7 @@ ((uint64_t) nsapi << 60)); } -/* -int pdp_iphash(void* ipif, struct ul66_t *eua) { - /#printf("IPhash %ld\n", lookup(eua->v, eua->l, ipif) % PDP_MAX);#/ - return (lookup(eua->v, eua->l, ipif) % PDP_MAX); -} -int pdp_ipset(struct pdp_t *pdp, void* ipif, struct ul66_t *eua) { - int hash; - struct pdp_t *pdp2; - struct pdp_t *pdp_prev = NULL; - - if (PDP_DEBUG) printf("Begin pdp_ipset %d %d %2x%2x%2x%2x\n", - (unsigned) ipif, eua->l, - eua->v[2], eua->v[3], - eua->v[4], eua->v[5]); - - pdp->ipnext = NULL; - pdp->ipif = ipif; - pdp->eua.l = eua->l; - memcpy(pdp->eua.v, eua->v, eua->l); - - hash = pdp_iphash(pdp->ipif, &pdp->eua); - - for (pdp2 = haship[hash]; pdp2; pdp2 = pdp2->ipnext) - pdp_prev = pdp2; - if (!pdp_prev) - haship[hash] = pdp; - else - pdp_prev->ipnext = pdp; - if (PDP_DEBUG) printf("End pdp_ipset\n"); - return 0; -} - -int pdp_ipdel(struct pdp_t *pdp) { - int hash = pdp_iphash(pdp->ipif, &pdp->eua); - struct pdp_t *pdp2; - struct pdp_t *pdp_prev = NULL; - if (PDP_DEBUG) printf("Begin pdp_ipdel\n"); - for (pdp2 = haship[hash]; pdp2; pdp2 = pdp2->ipnext) { - if (pdp2 == pdp) { - if (!pdp_prev) - haship[hash] = pdp2->ipnext; - else - pdp_prev->ipnext = pdp2->ipnext; - if (PDP_DEBUG) printf("End pdp_ipdel: PDP found\n"); - return 0; - } - pdp_prev = pdp2; - } - if (PDP_DEBUG) printf("End pdp_ipdel: PDP not found\n"); - return EOF; /# End of linked list and not found #/ -} - -int pdp_ipget(struct pdp_t **pdp, void* ipif, struct ul66_t *eua) { - int hash = pdp_iphash(ipif, eua); - struct pdp_t *pdp2; - /#printf("Begin pdp_ipget %d %d %2x%2x%2x%2x\n", (unsigned)ipif, eua->l, - eua->v[2],eua->v[3],eua->v[4],eua->v[5]);#/ - for (pdp2 = haship[hash]; pdp2; pdp2 = pdp2->ipnext) { - if ((pdp2->ipif == ipif) && (pdp2->eua.l == eua->l) && - (memcmp(&pdp2->eua.v, &eua->v, eua->l) == 0)) { - *pdp = pdp2; - /#printf("End pdp_ipget. Found\n");#/ - return 0; - } - } - if (PDP_DEBUG) printf("End pdp_ipget Notfound %d %d %2x%2x%2x%2x\n", - (unsigned)ipif, eua->l, eua->v[2],eua->v[3],eua->v[4],eua->v[5]); - return EOF; /# End of linked list and not found #/ -} -*/ /* Various conversion functions */ uint64_t pdp_gettid(uint64_t imsi, uint8_t nsapi) diff --git a/gtp/pdp.h b/gtp/pdp.h index e48f1a1..a287113 100644 --- a/gtp/pdp.h +++ b/gtp/pdp.h @@ -262,13 +262,6 @@ unsigned int pdp_count_secondary(struct pdp_t *pdp); -/* -int pdp_iphash(void* ipif, struct ul66_t *eua); -int pdp_ipset(struct pdp_t *pdp, void* ipif, struct ul66_t *eua); -int pdp_ipdel(struct pdp_t *pdp); -int pdp_ipget(struct pdp_t **pdp, void* ipif, struct ul66_t *eua); -*/ - uint64_t pdp_gettid(uint64_t imsi, uint8_t nsapi); #endif /* !_PDP_H */ -- To view, visit https://gerrit.osmocom.org/14294 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ife3f222daa87f0630ff34ffc3e63f4dad2ad914b Gerrit-Change-Number: 14294 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 15:03:32 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 31 May 2019 15:03:32 +0000 Subject: Change in osmo-ggsn[master]: cosmetic: gtp.h: Remove trailing whitespaces Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14295 Change subject: cosmetic: gtp.h: Remove trailing whitespaces ...................................................................... cosmetic: gtp.h: Remove trailing whitespaces Change-Id: I60f8cf5e36bcef767f90b150a488a800445bf744 --- M gtp/gtp.h 1 file changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/95/14295/1 diff --git a/gtp/gtp.h b/gtp/gtp.h index 6582319..ec6aef3 100644 --- a/gtp/gtp.h +++ b/gtp/gtp.h @@ -1,12 +1,12 @@ -/* +/* * OsmoGGSN - Gateway GPRS Support Node * Copyright (C) 2002, 2003, 2004 Mondru AB. - * + * * The contents of this file may be used under the terms of the GNU * General Public License Version 2, provided that the above copyright * notice and this permission notice is included in all copies or * substantial portions of the software. - * + * */ #ifndef _GTP_H @@ -142,7 +142,7 @@ struct ul16_t; struct pdp_t; -/* GTP 0 header. +/* GTP 0 header. * Explanation to some of the fields: * SNDCP NPDU Number flag = 0 except for inter SGSN handover situations * SNDCP N-PDU LCC Number 0 = 0xff except for inter SGSN handover situations @@ -231,13 +231,13 @@ * Information storage for each gsn instance * * Normally each instance of the application corresponds to - * one instance of a gsn. - * + * one instance of a gsn. + * * In order to avoid global variables in the application, and * also in order to allow several instances of a gsn in the same * application this struct is provided in order to store all * relevant information related to the gsn. - * + * * Note that this does not include information storage for ' * each pdp context. This is stored in another struct. *************************************************************/ -- To view, visit https://gerrit.osmocom.org/14295 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I60f8cf5e36bcef767f90b150a488a800445bf744 Gerrit-Change-Number: 14295 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 15:03:32 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 31 May 2019 15:03:32 +0000 Subject: Change in osmo-ggsn[master]: gtp: Introduce new pdp APIs (and deprecate old ones) to support multi... Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14296 Change subject: gtp: Introduce new pdp APIs (and deprecate old ones) to support multiple GSN ...................................................................... gtp: Introduce new pdp APIs (and deprecate old ones) to support multiple GSN Move static global pdp storage arrays to be per GSN. This way now several GSN per process are supported without collisions. * pdp_init() is defined in public API but it's actually only intended for use (and currently only used) internally in gtp_new(). So let's document that and re-use it for backward compatibility with now deprecated API, where only one GSN per process is supported. * Back pointer to gsn_t (pdp->gsn) moved from gtp.c:gtp_new() to gtp_pdp_newpdp(), since it makes more sense to have it there. This way backpointer is always set, even in case were app calls pdp_newpdp() API directly instead of creating them through gtp.c, like osmo-sgsn does. * Create new versions of required APIs with a pointer to gsn_t where the pdp ctx is to be created/found. Some APIs receiving a pointer to a pdp ctx can be left intact because we have a backpointer to its gsn_t. * pdp_getpdp() is nowhere used, and makes little sense now that we have pdpa reachable in gsn->pdpa, so let's deprecate it without adding a replacement. * Deprecate gtp.h gtp_newpdp(), since it's nowhere used and useless (does same as new gtp_pdp_newpdp() and doesn't allow for old_pdp to be passed as parameter). Fixes: OS#2873 Change-Id: I653cbdc185165592d985e3efab6e3f1add97877b --- M gtp/gtp.c M gtp/gtp.h M gtp/pdp.c M gtp/pdp.h 4 files changed, 87 insertions(+), 37 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/96/14296/1 diff --git a/gtp/gtp.c b/gtp/gtp.c index 2b14026..84b8844 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -131,16 +131,12 @@ { 0, NULL } }; -/* gtp_new */ -/* gtp_free */ - +/* Deprecated, use gtp_pdp_newpdp() instead */ int gtp_newpdp(struct gsn_t *gsn, struct pdp_t **pdp, uint64_t imsi, uint8_t nsapi) { int rc; - rc = pdp_newpdp(pdp, imsi, nsapi, NULL); - if (!rc && *pdp) - (*pdp)->gsn = gsn; + rc = gtp_pdp_newpdp(gsn, pdp, imsi, nsapi, NULL); return rc; } @@ -849,7 +845,7 @@ queue_new(&(*gsn)->queue_resp); /* Initialise pdp table */ - pdp_init(); + pdp_init(*gsn); /* Initialise call back functions */ (*gsn)->cb_create_context_ind = 0; @@ -1681,9 +1677,7 @@ } } - pdp_newpdp(&pdp, pdp->imsi, pdp->nsapi, pdp); - if (pdp) - pdp->gsn = gsn; + gtp_pdp_newpdp(gsn, &pdp, pdp->imsi, pdp->nsapi, pdp); /* Callback function to validate login */ if (gsn->cb_create_context_ind != 0) diff --git a/gtp/gtp.h b/gtp/gtp.h index ec6aef3..c2c5122 100644 --- a/gtp/gtp.h +++ b/gtp/gtp.h @@ -15,6 +15,8 @@ #include #include +#include "pdp.h" + #define GTP_MODE_GGSN 1 #define GTP_MODE_SGSN 2 @@ -263,6 +265,9 @@ struct queue_t *queue_req; /* Request queue */ struct queue_t *queue_resp; /* Response queue */ + struct pdp_t pdpa[PDP_MAX]; /* PDP storage */ + struct pdp_t *hashtid[PDP_MAX]; /* Hash table for IMSI + NSAPI */ + /* Call back functions */ int (*cb_delete_context) (struct pdp_t *); int (*cb_create_context_ind) (struct pdp_t *); @@ -307,7 +312,7 @@ extern int gtp_free(struct gsn_t *gsn); extern int gtp_newpdp(struct gsn_t *gsn, struct pdp_t **pdp, - uint64_t imsi, uint8_t nsapi); + uint64_t imsi, uint8_t nsapi) OSMO_DEPRECATED("Use gtp_pdp_newpdp() instead"); extern int gtp_freepdp(struct gsn_t *gsn, struct pdp_t *pdp); extern int gtp_freepdp_teardown(struct gsn_t *gsn, struct pdp_t *pdp); diff --git a/gtp/pdp.c b/gtp/pdp.c index a5146e9..d745916 100644 --- a/gtp/pdp.c +++ b/gtp/pdp.c @@ -33,13 +33,6 @@ #include "lookupa.h" /* *********************************************************** - * Global variables TODO: most should be moved to gsn_t - *************************************************************/ - -static struct pdp_t pdpa[PDP_MAX]; /* PDP storage */ -static struct pdp_t *hashtid[PDP_MAX]; /* Hash table for IMSI + NSAPI */ - -/* *********************************************************** * Functions related to PDP storage * * Lifecycle @@ -111,11 +104,16 @@ * *************************************************************/ -int pdp_init() +static struct gsn_t *g_gsn; + +int pdp_init(struct gsn_t *gsn) { - memset(&pdpa, 0, sizeof(pdpa)); - memset(&hashtid, 0, sizeof(hashtid)); - /* memset(&haship, 0, sizeof(haship)); */ + if(!g_gsn) { + g_gsn = gsn; + } else { + LOGP(DLGTP, LOGL_FATAL, "This interface is depreacted and doesn't support multiple GGSN!"); + return -1; + } return 0; } @@ -123,6 +121,13 @@ int pdp_newpdp(struct pdp_t **pdp, uint64_t imsi, uint8_t nsapi, struct pdp_t *pdp_old) { + return gtp_pdp_newpdp(g_gsn, pdp, imsi, nsapi, pdp_old); +} + +int gtp_pdp_newpdp(struct gsn_t *gsn, struct pdp_t **pdp, uint64_t imsi, uint8_t nsapi, + struct pdp_t *pdp_old) +{ + struct pdp_t *pdpa = gsn->pdpa; int n; for (n = 0; n < PDP_MAX; n++) { /* TODO: Need to do better than linear search */ if (pdpa[n].inuse == 0) { @@ -132,6 +137,7 @@ else memset(*pdp, 0, sizeof(struct pdp_t)); (*pdp)->inuse = 1; + (*pdp)->gsn = gsn; (*pdp)->imsi = imsi; (*pdp)->nsapi = nsapi; (*pdp)->fllc = (uint16_t) n + 1; @@ -159,6 +165,8 @@ int pdp_freepdp(struct pdp_t *pdp) { + struct pdp_t *pdpa = pdp->gsn->pdpa; + pdp_tiddel(pdp); /* Remove any references in primary context */ @@ -173,12 +181,20 @@ int pdp_getpdp(struct pdp_t **pdp) { - *pdp = &pdpa[0]; + *pdp = &g_gsn->pdpa[0]; return 0; } int pdp_getgtp0(struct pdp_t **pdp, uint16_t fl) { + return gtp_pdp_getgtp0(g_gsn, pdp, fl); +} + + +int gtp_pdp_getgtp0(struct gsn_t *gsn, struct pdp_t **pdp, uint16_t fl) +{ + struct pdp_t *pdpa = gsn->pdpa; + if ((fl > PDP_MAX) || (fl < 1)) { return EOF; /* Not found */ } else { @@ -193,6 +209,13 @@ int pdp_getgtp1(struct pdp_t **pdp, uint32_t tei) { + return gtp_pdp_getgtp1(g_gsn, pdp, tei); +} + +int gtp_pdp_getgtp1(struct gsn_t *gsn, struct pdp_t **pdp, uint32_t tei) +{ + struct pdp_t *pdpa = gsn->pdpa; + if ((tei > PDP_MAX) || (tei < 1)) { return EOF; /* Not found */ } else { @@ -208,6 +231,12 @@ /* get a PDP based on the *peer* address + TEI-Data. Used for matching inbound Error Ind */ int pdp_getgtp1_peer_d(struct pdp_t **pdp, const struct sockaddr_in *peer, uint32_t teid_gn) { + return gtp_pdp_getgtp1_peer_d(g_gsn, pdp, peer, teid_gn); +} + +int gtp_pdp_getgtp1_peer_d(struct gsn_t *gsn, struct pdp_t **pdp, const struct sockaddr_in *peer, uint32_t teid_gn) +{ + struct pdp_t *pdpa = gsn->pdpa; unsigned int i; /* this is O(n) but we don't have (nor want) another hash... */ @@ -230,6 +259,7 @@ int pdp_tidset(struct pdp_t *pdp, uint64_t tid) { + struct pdp_t **hashtid = pdp->gsn->hashtid; int hash = pdp_tidhash(tid); struct pdp_t *pdp2; struct pdp_t *pdp_prev = NULL; @@ -248,6 +278,7 @@ int pdp_tiddel(struct pdp_t *pdp) { + struct pdp_t **hashtid = pdp->gsn->hashtid; int hash = pdp_tidhash(pdp->tid); struct pdp_t *pdp2; struct pdp_t *pdp_prev = NULL; @@ -269,6 +300,12 @@ int pdp_tidget(struct pdp_t **pdp, uint64_t tid) { + return gtp_pdp_tidget(g_gsn, pdp, tid); +} + +int gtp_pdp_tidget(struct gsn_t *gsn, struct pdp_t **pdp, uint64_t tid) +{ + struct pdp_t **hashtid = gsn->hashtid; int hash = pdp_tidhash(tid); struct pdp_t *pdp2; DEBUGP(DLGTP, "Begin pdp_tidget tid = %"PRIx64"\n", tid); @@ -285,7 +322,12 @@ int pdp_getimsi(struct pdp_t **pdp, uint64_t imsi, uint8_t nsapi) { - return pdp_tidget(pdp, + return gtp_pdp_getimsi(g_gsn, pdp, imsi, nsapi); +} + +int gtp_pdp_getimsi(struct gsn_t *gsn, struct pdp_t **pdp, uint64_t imsi, uint8_t nsapi) +{ + return gtp_pdp_tidget(gsn, pdp, (imsi & 0x0fffffffffffffffull) + ((uint64_t) nsapi << 60)); } diff --git a/gtp/pdp.h b/gtp/pdp.h index a287113..9527464 100644 --- a/gtp/pdp.h +++ b/gtp/pdp.h @@ -15,6 +15,8 @@ #include +#include + struct gsn_t; #define LOGPDPX(ss, level, pdp, fmt, args...) \ @@ -235,33 +237,40 @@ /* to be used by libgtp callers/users (to attach their own private state) */ void *priv; - struct gsn_t *gsn; + struct gsn_t *gsn; /* Back pointer to GSN where this pdp ctx belongs to */ bool tx_gpdu_seq; /* Transmit (true) or suppress G-PDU sequence numbers */ }; /* functions related to pdp_t management */ -int pdp_init(); -int pdp_newpdp(struct pdp_t **pdp, uint64_t imsi, uint8_t nsapi, - struct pdp_t *pdp_old); +int gtp_pdp_newpdp(struct gsn_t *gsn, struct pdp_t **pdp, uint64_t imsi, + uint8_t nsapi, struct pdp_t *pdp_old); int pdp_freepdp(struct pdp_t *pdp); -int pdp_getpdp(struct pdp_t **pdp); - -int pdp_getgtp0(struct pdp_t **pdp, uint16_t fl); -int pdp_getgtp1(struct pdp_t **pdp, uint32_t tei); -int pdp_getgtp1_peer_d(struct pdp_t **pdp, const struct sockaddr_in *peer, uint32_t teid_gn); - -int pdp_getimsi(struct pdp_t **pdp, uint64_t imsi, uint8_t nsapi); +int gtp_pdp_getgtp0(struct gsn_t *gsn, struct pdp_t **pdp, uint16_t fl); +int gtp_pdp_getgtp1(struct gsn_t *gsn, struct pdp_t **pdp, uint32_t tei); +int gtp_pdp_getgtp1_peer_d(struct gsn_t *gsn, struct pdp_t **pdp, const struct sockaddr_in *peer, uint32_t teid_gn); +int gtp_pdp_getimsi(struct gsn_t *gsn, struct pdp_t **pdp, uint64_t imsi, uint8_t nsapi); +int gtp_pdp_tidget(struct gsn_t *gsn, struct pdp_t **pdp, uint64_t tid); int pdp_tidhash(uint64_t tid); int pdp_tidset(struct pdp_t *pdp, uint64_t tid); int pdp_tiddel(struct pdp_t *pdp); -int pdp_tidget(struct pdp_t **pdp, uint64_t tid); +uint64_t pdp_gettid(uint64_t imsi, uint8_t nsapi); void pdp_set_imsi_nsapi(struct pdp_t *pdp, uint64_t teid); unsigned int pdp_count_secondary(struct pdp_t *pdp); -uint64_t pdp_gettid(uint64_t imsi, uint8_t nsapi); +/* Deprecated APIs (support for only 1 GSN per process). Must be used only after first call to gtp_new() and until it is freed. */ +int pdp_init(struct gsn_t *gsn); /* Use only allowed inside libgtp to keep compatiblity with deprecated APIs defined here. */ +int pdp_newpdp(struct pdp_t **pdp, uint64_t imsi, uint8_t nsapi, + struct pdp_t *pdp_old) OSMO_DEPRECATED("Use gtp_pdp_newpdp() instead"); +int pdp_getpdp(struct pdp_t **pdp) OSMO_DEPRECATED("Use gsn_t->pdpa field instead"); +int pdp_getgtp0(struct pdp_t **pdp, uint16_t fl) OSMO_DEPRECATED("Use gtp_pdp_getgtp0() instead"); +int pdp_getgtp1(struct pdp_t **pdp, uint32_t tei) OSMO_DEPRECATED("Use gtp_pdp_getgtp1() instead"); +int pdp_getgtp1_peer_d(struct pdp_t **pdp, const struct sockaddr_in *peer, uint32_t teid_gn) OSMO_DEPRECATED("Use gtp_pdp_getgtp1_peer_d() instead"); +int pdp_getimsi(struct pdp_t **pdp, uint64_t imsi, uint8_t nsapi) OSMO_DEPRECATED("Use gtp_pdp_getimsi() instead"); +int pdp_tidget(struct pdp_t **pdp, uint64_t tid) OSMO_DEPRECATED("Use gtp_pdp_tidget() instead"); + #endif /* !_PDP_H */ -- To view, visit https://gerrit.osmocom.org/14296 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I653cbdc185165592d985e3efab6e3f1add97877b Gerrit-Change-Number: 14296 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 15:03:32 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 31 May 2019 15:03:32 +0000 Subject: Change in osmo-ggsn[master]: gtp: Replace old pdp APIs with new ones with multi-gsn support Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14297 Change subject: gtp: Replace old pdp APIs with new ones with multi-gsn support ...................................................................... gtp: Replace old pdp APIs with new ones with multi-gsn support Related: OS#2873 Change-Id: Ibf56a063f01d1f95a2a3271416da6e062e85fdfa --- M gtp/gtp.c 1 file changed, 22 insertions(+), 23 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/97/14297/1 diff --git a/gtp/gtp.c b/gtp/gtp.c index 84b8844..94c3245 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -156,9 +156,8 @@ for (n = 0; n < PDP_MAXNSAPI; n++) { if (pdp->secondary_tei[n]) { - if (pdp_getgtp1 - (&secondary_pdp, - pdp->secondary_tei[n])) { + if (gtp_pdp_getgtp1(gsn, &secondary_pdp, + pdp->secondary_tei[n])) { LOGP(DLGTP, LOGL_ERROR, "Unknown secondary PDP context\n"); continue; @@ -1150,7 +1149,7 @@ Protocol Configuration Options */ if (pdp->secondary) { - if (pdp_getgtp1(&linked_pdp, pdp->teic_own)) { + if (gtp_pdp_getgtp1(gsn, &linked_pdp, pdp->teic_own)) { LOGP(DLGTP, LOGL_ERROR, "Unknown linked PDP context: %u\n", pdp->teic_own); return EOF; @@ -1430,7 +1429,7 @@ if (!gtpie_gettv1(ie, GTPIE_NSAPI, 1, &linked_nsapi)) { /* Find the primary PDP context */ - if (pdp_getgtp1(&linked_pdp, get_tei(pack))) { + if (gtp_pdp_getgtp1(gsn, &linked_pdp, get_tei(pack))) { gsn->incorrect++; GTP_LOGPKG(LOGL_ERROR, peer, pack, len, @@ -1613,9 +1612,9 @@ in_addr2gsna(&pdp->gsnlc, &gsn->gsnc); in_addr2gsna(&pdp->gsnlu, &gsn->gsnu); - DEBUGP(DLGTP, "gtp_create_pdp_ind: Before pdp_tidget\n"); + DEBUGP(DLGTP, "gtp_create_pdp_ind: Before gtp_pdp_tidget\n"); - if (!pdp_getimsi(&pdp_old, pdp->imsi, pdp->nsapi)) { + if (!gtp_pdp_getimsi(gsn, &pdp_old, pdp->imsi, pdp->nsapi)) { /* Found old pdp with same tid. Now the voodoo begins! */ /* 09.60 / 29.060 allows create on existing context to "steal" */ /* the context which was allready established */ @@ -1709,7 +1708,7 @@ return EOF; /* Find the context in question */ - if (pdp_getgtp1(&pdp, get_tei(pack))) { + if (gtp_pdp_getgtp1(gsn, &pdp, get_tei(pack))) { gsn->err_unknownpdp++; GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Unknown PDP context: %u\n", get_tei(pack)); @@ -2091,7 +2090,7 @@ pdp_set_imsi_nsapi(pdp, tid); /* Find the context in question */ - if (pdp_getimsi(&pdp, imsi, nsapi)) { + if (gtp_pdp_getimsi(gsn, &pdp, imsi, nsapi)) { gsn->err_unknownpdp++; GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Unknown PDP context\n"); @@ -2113,7 +2112,7 @@ /* IMSI (conditional) */ if (gtpie_gettv0(ie, GTPIE_IMSI, 0, &imsi, sizeof(imsi))) { /* Find the context in question */ - if (pdp_getgtp1(&pdp, get_tei(pack))) { + if (gtp_pdp_getgtp1(gsn, &pdp, get_tei(pack))) { gsn->err_unknownpdp++; GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Unknown PDP context: %u\n", @@ -2124,7 +2123,7 @@ } } else { /* Find the context in question */ - if (pdp_getimsi(&pdp, imsi, nsapi)) { + if (gtp_pdp_getimsi(gsn, &pdp, imsi, nsapi)) { gsn->err_unknownpdp++; GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Unknown PDP context\n"); @@ -2290,7 +2289,7 @@ return EOF; /* Find the context in question */ - if (pdp_getgtp1(&pdp, get_tei(pack))) { + if (gtp_pdp_getgtp1(gsn, &pdp, get_tei(pack))) { gsn->err_unknownpdp++; GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Unknown PDP context: %u\n", get_tei(pack)); @@ -2391,7 +2390,7 @@ { struct pdp_t *linked_pdp; - if (pdp_getgtp1(&linked_pdp, pdp->teic_own)) { + if (gtp_pdp_getgtp1(gsn, &linked_pdp, pdp->teic_own)) { LOGP(DLGTP, LOGL_ERROR, "Unknown linked PDP context: %u\n", pdp->teic_own); return EOF; @@ -2447,7 +2446,7 @@ return EOF; } - if (pdp_getgtp1(&linked_pdp, pdp->teic_own)) { + if (gtp_pdp_getgtp1(gsn, &linked_pdp, pdp->teic_own)) { LOGP(DLGTP, LOGL_ERROR, "Unknown linked PDP context: %u\n", pdp->teic_own); return EOF; @@ -2543,7 +2542,7 @@ } /* Find the linked context in question */ - if (pdp_getgtp1(&linked_pdp, get_tei(pack))) { + if (gtp_pdp_getgtp1(gsn, &linked_pdp, get_tei(pack))) { gsn->err_unknownpdp++; GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Unknown PDP context: %u\n", get_tei(pack)); @@ -2583,7 +2582,7 @@ } /* Find the context in question */ - if (pdp_getgtp1(&pdp, linked_pdp->secondary_tei[nsapi & 0x0f])) { + if (gtp_pdp_getgtp1(gsn, &pdp, linked_pdp->secondary_tei[nsapi & 0x0f])) { gsn->err_unknownpdp++; GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Unknown PDP context\n"); @@ -2636,7 +2635,7 @@ /* Find the context in question. It may not be available if gtp_delete_context_req * was used and as a result the PDP ctx was already freed */ - if (pdp_getgtp1(&pdp, get_tei(pack))) { + if (gtp_pdp_getgtp1(gsn, &pdp, get_tei(pack))) { gsn->err_unknownpdp++; GTP_LOGPKG(LOGL_NOTICE, peer, pack, len, "Unknown PDP context: %u (expected if gtp_delete_context_req is used or pdp ctx was freed manually before response)\n", @@ -2714,7 +2713,7 @@ /* Find the context in question */ if (version == 0) { - if (pdp_tidget(&pdp, be64toh(((union gtp_packet *)pack)->gtp0.h.tid))) { + if (gtp_pdp_tidget(gsn, &pdp, be64toh(((union gtp_packet *)pack)->gtp0.h.tid))) { gsn->err_unknownpdp++; GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Unknown PDP context\n"); @@ -2740,7 +2739,7 @@ return EOF; } - if (pdp_getgtp1_peer_d(&pdp, peer, teid_gn)) { + if (gtp_pdp_getgtp1_peer_d(gsn, &pdp, peer, teid_gn)) { gsn->err_unknownpdp++; GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Unknown PDP context\n"); return EOF; @@ -2770,8 +2769,8 @@ switch (version) { case 0: - if (pdp_getgtp0 - (&pdp, ntoh16(((union gtp_packet *)pack)->gtp0.h.flow))) { + if (gtp_pdp_getgtp0(gsn, &pdp, + ntoh16(((union gtp_packet *)pack)->gtp0.h.flow))) { gsn->err_unknownpdp++; GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Unknown PDP context, GTPv0\n"); @@ -2781,8 +2780,8 @@ hlen = GTP0_HEADER_SIZE; break; case 1: - if (pdp_getgtp1 - (&pdp, ntoh32(((union gtp_packet *)pack)->gtp1l.h.tei))) { + if (gtp_pdp_getgtp1(gsn, &pdp, + ntoh32(((union gtp_packet *)pack)->gtp1l.h.tei))) { gsn->err_unknownpdp++; GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Unknown PDP context, GTPv1\n"); -- To view, visit https://gerrit.osmocom.org/14297 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ibf56a063f01d1f95a2a3271416da6e062e85fdfa Gerrit-Change-Number: 14297 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 15:03:33 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 31 May 2019 15:03:33 +0000 Subject: Change in osmo-ggsn[master]: ggsn: vty: Require ggsn param in cmd Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14298 Change subject: ggsn: vty: Require ggsn param in cmd ...................................................................... ggsn: vty: Require ggsn param in cmd Other similar commands already do it. This way we also get rid of deprecated APIs, supporting search when more than one GSN is set up. Related: OS#2873 Change-Id: I8357e20076348c8ded5e9f5b8e7252566b0fbfea --- M ggsn/ggsn_vty.c 1 file changed, 16 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/98/14298/1 diff --git a/ggsn/ggsn_vty.c b/ggsn/ggsn_vty.c index 3f012d2..456f6cb 100644 --- a/ggsn/ggsn_vty.c +++ b/ggsn/ggsn_vty.c @@ -764,25 +764,35 @@ } DEFUN(show_pdpctx_imsi, show_pdpctx_imsi_cmd, - "show pdp-context imsi IMSI [<0-15>]", + "show pdp-context ggsn NAME imsi IMSI [<0-15>]", SHOW_STR "Display information on PDP Context\n" + GGSN_STR "GGSN Name\n" "PDP contexts for given IMSI\n" "PDP context for given NSAPI\n") { - uint64_t imsi = strtoull(argv[0], NULL, 10); + struct ggsn_ctx *ggsn; + uint64_t imsi; unsigned int nsapi; struct pdp_t *pdp; int num_found = 0; - if (argc > 1) { - nsapi = atoi(argv[1]); - if (pdp_getimsi(&pdp, imsi, nsapi)) { + ggsn = ggsn_find(argv[0]); + if (!ggsn) { + vty_out(vty, "%% No such GGSN '%s'%s", argv[0], VTY_NEWLINE); + return CMD_WARNING; + } + + imsi = strtoull(argv[1], NULL, 10); + + if (argc > 2) { + nsapi = atoi(argv[2]); + if (gtp_pdp_getimsi(ggsn->gsn, &pdp, imsi, nsapi)) { show_one_pdp(vty, pdp); num_found++; } } else { for (nsapi = 0; nsapi < PDP_MAXNSAPI; nsapi++) { - if (pdp_getimsi(&pdp, imsi, nsapi)) + if (gtp_pdp_getimsi(ggsn->gsn, &pdp, imsi, nsapi)) continue; show_one_pdp(vty, pdp); num_found++; -- To view, visit https://gerrit.osmocom.org/14298 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I8357e20076348c8ded5e9f5b8e7252566b0fbfea Gerrit-Change-Number: 14298 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 15:03:33 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 31 May 2019 15:03:33 +0000 Subject: Change in osmo-ggsn[master]: sgsnemu: Replace old API pdp_newpdp with new one provided by libgtp Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14299 Change subject: sgsnemu: Replace old API pdp_newpdp with new one provided by libgtp ...................................................................... sgsnemu: Replace old API pdp_newpdp with new one provided by libgtp Related: OS#2873 Change-Id: I9742b82c382ae2e63f8aff4c5c32e2450059082b --- M sgsnemu/sgsnemu.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/99/14299/1 diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c index 225dc59..36b52fc 100644 --- a/sgsnemu/sgsnemu.c +++ b/sgsnemu/sgsnemu.c @@ -1614,7 +1614,7 @@ /* Allocated here. */ /* If create context failes we have to deallocate ourselves. */ /* Otherwise it is deallocated by gtplib */ - pdp_newpdp(&pdp, myimsi, options.nsapi, NULL); + gtp_pdp_newpdp(gsn, &pdp, myimsi, options.nsapi, NULL); pdp->peer[0] = &iparr[n]; /* FIXME: support v4v6, have 2 peers */ pdp->ipif = tun; /* TODO */ -- To view, visit https://gerrit.osmocom.org/14299 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I9742b82c382ae2e63f8aff4c5c32e2450059082b Gerrit-Change-Number: 14299 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 15:16:01 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 31 May 2019 15:16:01 +0000 Subject: Change in osmo-ggsn[master]: gtp: Introduce new pdp APIs (and deprecate old ones) to support multi... In-Reply-To: References: Message-ID: Pau Espin Pedrol has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/14296 ) Change subject: gtp: Introduce new pdp APIs (and deprecate old ones) to support multiple GSN ...................................................................... gtp: Introduce new pdp APIs (and deprecate old ones) to support multiple GSN Move static global pdp storage arrays to be per GSN. This way now several GSN per process are supported without collisions. * pdp_init() is defined in public API but it's actually only intended for use (and currently only used) internally in gtp_new(). So let's document that and re-use it for backward compatibility with now deprecated API, where only one GSN per process is supported. * Back pointer to gsn_t (pdp->gsn) moved from gtp.c:gtp_new() to gtp_pdp_newpdp(), since it makes more sense to have it there. This way backpointer is always set, even in case were app calls pdp_newpdp() API directly instead of creating them through gtp.c, like osmo-sgsn does. * Create new versions of required APIs with a pointer to gsn_t where the pdp ctx is to be created/found. Some APIs receiving a pointer to a pdp ctx can be left intact because we have a backpointer to its gsn_t. * pdp_getpdp() is nowhere used, and makes little sense now that we have pdpa reachable in gsn->pdpa, so let's deprecate it without adding a replacement. * Deprecate gtp.h gtp_newpdp(), since it's nowhere used and useless (does same as new gtp_pdp_newpdp() and doesn't allow for old_pdp to be passed as parameter). Fixes: OS#2873 Change-Id: I653cbdc185165592d985e3efab6e3f1add97877b --- M TODO-RELEASE M gtp/gtp.c M gtp/gtp.h M gtp/pdp.c M gtp/pdp.h 5 files changed, 90 insertions(+), 37 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/96/14296/2 -- To view, visit https://gerrit.osmocom.org/14296 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I653cbdc185165592d985e3efab6e3f1add97877b Gerrit-Change-Number: 14296 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 15:42:58 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 31 May 2019 15:42:58 +0000 Subject: Change in osmocom-bb[master]: trxcon: Suppress POWERON to TRX if we're already powered on. In-Reply-To: References: Message-ID: Vadim Yanitskiy has uploaded a new patch set (#2) to the change originally created by Harald Welte. ( https://gerrit.osmocom.org/14275 ) Change subject: trxcon: Suppress POWERON to TRX if we're already powered on. ...................................................................... trxcon: Suppress POWERON to TRX if we're already powered on. The existing logic unconditionally wants to send a POWERON command on TRXC whenever L1CTL_FBSB_REQ is received. That may cause some problems when sending subsequent L1CTL_FBSB_REQ, e.g. due to signal loss. Sending POWEROFF when transceiver is not powered on is normal though. This can happen if trxcon is restarted while fake_trx was running. The existing FSM state could unfortunately not been used, as it's a mixture between the TRX connection state and the command/response state. The current solution is just a work around. We definitely need to introduce separate state machines for transceiver and its TRXC interface. Change-Id: I834e8897b95a2490811319697fc7cab6076db480 --- M src/host/trxcon/l1ctl.c M src/host/trxcon/trx_if.c M src/host/trxcon/trx_if.h 3 files changed, 18 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/75/14275/2 -- To view, visit https://gerrit.osmocom.org/14275 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I834e8897b95a2490811319697fc7cab6076db480 Gerrit-Change-Number: 14275 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 15:42:58 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 31 May 2019 15:42:58 +0000 Subject: Change in osmocom-bb[master]: trxcon/trx_if.c: Dropping UL bursts is a noticeable event In-Reply-To: References: Message-ID: Vadim Yanitskiy has uploaded a new patch set (#2) to the change originally created by Harald Welte. ( https://gerrit.osmocom.org/14276 ) Change subject: trxcon/trx_if.c: Dropping UL bursts is a noticeable event ...................................................................... trxcon/trx_if.c: Dropping UL bursts is a noticeable event Therefore we should use LOGL_ERROR instead of LOGL_DEBUG. Change-Id: If5084feb9e847d212530b1a5985390405d91008b --- M src/host/trxcon/trx_if.c 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/76/14276/2 -- To view, visit https://gerrit.osmocom.org/14276 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: If5084feb9e847d212530b1a5985390405d91008b Gerrit-Change-Number: 14276 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 15:43:43 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 31 May 2019 15:43:43 +0000 Subject: Change in osmocom-bb[master]: trxcon: Suppress POWERON to TRX if we're already powered on. In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14275 ) Change subject: trxcon: Suppress POWERON to TRX if we're already powered on. ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14275 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I834e8897b95a2490811319697fc7cab6076db480 Gerrit-Change-Number: 14275 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 31 May 2019 15:43:43 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 15:43:50 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 31 May 2019 15:43:50 +0000 Subject: Change in osmocom-bb[master]: trxcon/trx_if.c: Dropping UL bursts is a noticeable event In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14276 ) Change subject: trxcon/trx_if.c: Dropping UL bursts is a noticeable event ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14276 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If5084feb9e847d212530b1a5985390405d91008b Gerrit-Change-Number: 14276 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 31 May 2019 15:43:50 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 15:57:40 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 31 May 2019 15:57:40 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Enable/disable osmux always based on test Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14300 Change subject: msc: Enable/disable osmux always based on test ...................................................................... msc: Enable/disable osmux always based on test Initially it was thought safe to only enable it since the osmux test was at the end, but actually IU tests run after it, and those don't expect osmux to be enabled. This way we also always match osmo-msc osmux state with whatever the test expects (and sets through f_init()). Change-Id: I8fb48af7d37f1a2391a39c19f5ec5064cd5869d2 --- M msc/MSC_Tests.ttcn 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/00/14300/1 diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 16f7b9b..902063a 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -330,6 +330,10 @@ f_vty_config(MSCVTY, "network", "authentication optional"); f_vty_config(MSCVTY, "msc", "assign-tmsi"); f_vty_config(MSCVTY, "network", "encryption a5 0"); + if (osmux) + f_vty_config(MSCVTY, "msc", "osmux on"); + else + f_vty_config(MSCVTY, "msc", "osmux off"); } /* Initialize for a direct connection to BSSAP. This function is an alternative @@ -1746,7 +1750,6 @@ testcase TC_lu_and_mt_call_osmux() runs on MTC_CT { var BSC_ConnHdlr vc_conn; f_init(1, false, true, true); - f_vty_config(MSCVTY, "msc", "osmux on"); vc_conn := f_start_handler(refers(f_tc_lu_and_mt_call), 39, 0, true, true); vc_conn.done; -- To view, visit https://gerrit.osmocom.org/14300 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I8fb48af7d37f1a2391a39c19f5ec5064cd5869d2 Gerrit-Change-Number: 14300 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 15:57:40 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 31 May 2019 15:57:40 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Add module param to disable osmux (fix msc-latest jenkins job) Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14301 Change subject: msc: Add module param to disable osmux (fix msc-latest jenkins job) ...................................................................... msc: Add module param to disable osmux (fix msc-latest jenkins job) ttcn3-bsc-test-latest currently fails on most tests because it tries to use "osmux off" VTY param and only current osmo-msc master supports it. Change-Id: I53d58b2d905905ebf1df322d0389b3715a48212f --- M msc/MSC_Tests.ttcn 1 file changed, 14 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/01/14301/1 diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 902063a..a628a16 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -136,6 +136,11 @@ charstring mp_mme_name := "mmec01.mmegi0001.mme.epc.mnc070.mcc901.3gppnetwork.org"; charstring mp_vlr_name := "vlr.example.net"; + /* Whether to enable osmux tests. Can be dropped completely and enable + unconditionally once new version of osmo-msc is released (current + version: 1.3.1) */ + boolean mp_enable_osmux_test := true; + RAN_Configurations mp_bssap_cfg := { { sccp_service_type := "mtp3_itu", @@ -330,10 +335,12 @@ f_vty_config(MSCVTY, "network", "authentication optional"); f_vty_config(MSCVTY, "msc", "assign-tmsi"); f_vty_config(MSCVTY, "network", "encryption a5 0"); - if (osmux) - f_vty_config(MSCVTY, "msc", "osmux on"); - else - f_vty_config(MSCVTY, "msc", "osmux off"); + if (mp_enable_osmux_test) { + if (osmux) + f_vty_config(MSCVTY, "msc", "osmux on"); + else + f_vty_config(MSCVTY, "msc", "osmux off"); + } } /* Initialize for a direct connection to BSSAP. This function is an alternative @@ -5331,8 +5338,9 @@ execute( TC_lu_imsi_auth_tmsi_encr_3_1_log_msc_debug() ); execute( TC_gsup_mt_multi_part_sms() ); execute( TC_mo_cc_bssmap_clear() ); - - execute( TC_lu_and_mt_call_osmux() ); + if (mp_enable_osmux_test) { + execute( TC_lu_and_mt_call_osmux() ); + } } -- To view, visit https://gerrit.osmocom.org/14301 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I53d58b2d905905ebf1df322d0389b3715a48212f Gerrit-Change-Number: 14301 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 15:59:21 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Fri, 31 May 2019 15:59:21 +0000 Subject: Change in osmo-pcu[master]: encoding: correct encoding of CRBB in ACK/NACK when not byte aligned Message-ID: lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/14302 Change subject: encoding: correct encoding of CRBB in ACK/NACK when not byte aligned ...................................................................... encoding: correct encoding of CRBB in ACK/NACK when not byte aligned The last bits of the CRBB (compressed receive block bitmap) was incorrect encoded when the CRBB is not byte aligned. Related: OS#3728 Change-Id: I7261aa71b37d7ead52992f8db462f72a3804988e --- M src/encoding.cpp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/02/14302/1 diff --git a/src/encoding.cpp b/src/encoding.cpp index 1b325b4..b6879cc 100644 --- a/src/encoding.cpp +++ b/src/encoding.cpp @@ -965,7 +965,7 @@ crbb_len = crbb_len - 8; iter++; } else { - bitvec_write_field(dest, &wp, crbb_bitmap[iter], crbb_len); + bitvec_write_field(dest, &wp, crbb_bitmap[iter] >> (8 - crbb_len), crbb_len); crbb_len = 0; } } -- To view, visit https://gerrit.osmocom.org/14302 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I7261aa71b37d7ead52992f8db462f72a3804988e Gerrit-Change-Number: 14302 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 16:01:36 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 31 May 2019 16:01:36 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Enable/disable osmux always based on test In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14300 to look at the new patch set (#2). Change subject: msc: Enable/disable osmux always based on test ...................................................................... msc: Enable/disable osmux always based on test Initially it was thought safe to only enable it since the osmux test was at the end, but actually IU tests run after it, and those don't expect osmux to be enabled. This way we also always match osmo-msc osmux state with whatever the test expects (and sets through f_init()). Change-Id: I8fb48af7d37f1a2391a39c19f5ec5064cd5869d2 --- M msc/MSC_Tests.ttcn 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/00/14300/2 -- To view, visit https://gerrit.osmocom.org/14300 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8fb48af7d37f1a2391a39c19f5ec5064cd5869d2 Gerrit-Change-Number: 14300 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 16:01:36 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 31 May 2019 16:01:36 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Add module param to disable osmux (fix msc-latest jenkins job) In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14301 to look at the new patch set (#2). Change subject: msc: Add module param to disable osmux (fix msc-latest jenkins job) ...................................................................... msc: Add module param to disable osmux (fix msc-latest jenkins job) ttcn3-bsc-test-latest currently fails on most tests because it tries to use "osmux off" VTY param and only current osmo-msc master supports it. Change-Id: I53d58b2d905905ebf1df322d0389b3715a48212f --- M msc/MSC_Tests.ttcn 1 file changed, 14 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/01/14301/2 -- To view, visit https://gerrit.osmocom.org/14301 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I53d58b2d905905ebf1df322d0389b3715a48212f Gerrit-Change-Number: 14301 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 16:07:14 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 31 May 2019 16:07:14 +0000 Subject: Change in osmocom-bb[master]: trxcon: Suppress POWERON to TRX if we're already powered on. In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/14275 ) Change subject: trxcon: Suppress POWERON to TRX if we're already powered on. ...................................................................... trxcon: Suppress POWERON to TRX if we're already powered on. The existing logic unconditionally wants to send a POWERON command on TRXC whenever L1CTL_FBSB_REQ is received. That may cause some problems when sending subsequent L1CTL_FBSB_REQ, e.g. due to signal loss. Sending POWEROFF when transceiver is not powered on is normal though. This can happen if trxcon is restarted while fake_trx was running. The existing FSM state could unfortunately not been used, as it's a mixture between the TRX connection state and the command/response state. The current solution is just a work around. We definitely need to introduce separate state machines for transceiver and its TRXC interface. Change-Id: I834e8897b95a2490811319697fc7cab6076db480 --- M src/host/trxcon/l1ctl.c M src/host/trxcon/trx_if.c M src/host/trxcon/trx_if.h 3 files changed, 18 insertions(+), 3 deletions(-) Approvals: Vadim Yanitskiy: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c index fff1c2b..30f43d0 100644 --- a/src/host/trxcon/l1ctl.c +++ b/src/host/trxcon/l1ctl.c @@ -362,7 +362,10 @@ trx_if_cmd_txtune(l1l->trx, band_arfcn); } - trx_if_cmd_poweron(l1l->trx); + /* Transceiver might have been powered on before, e.g. + * in case of sending L1CTL_FBSB_REQ due to signal loss. */ + if (!l1l->trx->powered_up) + trx_if_cmd_poweron(l1l->trx); /* Start FBSB expire timer */ l1l->fbsb_timer.data = l1l; diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c index 35ad3c0..ca78349 100644 --- a/src/host/trxcon/trx_if.c +++ b/src/host/trxcon/trx_if.c @@ -254,6 +254,11 @@ int trx_if_cmd_poweron(struct trx_instance *trx) { + if (trx->powered_up) { + /* FIXME: this should be handled by the FSM, not here! */ + LOGP(DTRX, LOGL_ERROR, "Suppressing POWERON as we're already powered up\n"); + return -EAGAIN; + } return trx_ctrl_cmd(trx, 1, "POWERON", ""); } @@ -495,10 +500,14 @@ } /* Trigger state machine */ - if (!strncmp(tcm->cmd + 4, "POWERON", 7)) + if (!strncmp(tcm->cmd + 4, "POWERON", 7)) { + trx->powered_up = true; osmo_fsm_inst_state_chg(trx->fsm, TRX_STATE_ACTIVE, 0, 0); - else if (!strncmp(tcm->cmd + 4, "POWEROFF", 8)) + } + else if (!strncmp(tcm->cmd + 4, "POWEROFF", 8)) { + trx->powered_up = false; osmo_fsm_inst_state_chg(trx->fsm, TRX_STATE_IDLE, 0, 0); + } else if (!strncmp(tcm->cmd + 4, "MEASURE", 7)) trx_if_measure_rsp_cb(trx, buf + 14); else if (!strncmp(tcm->cmd + 4, "ECHO", 4)) diff --git a/src/host/trxcon/trx_if.h b/src/host/trxcon/trx_if.h index 0b3f36f..a44600d 100644 --- a/src/host/trxcon/trx_if.h +++ b/src/host/trxcon/trx_if.h @@ -25,7 +25,10 @@ struct osmo_timer_list trx_ctrl_timer; struct llist_head trx_ctrl_list; struct osmo_fsm_inst *fsm; + + /* HACK: we need proper state machines */ uint32_t prev_state; + bool powered_up; /* GSM L1 specific */ uint16_t pm_band_arfcn_start; -- To view, visit https://gerrit.osmocom.org/14275 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I834e8897b95a2490811319697fc7cab6076db480 Gerrit-Change-Number: 14275 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 16:07:15 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 31 May 2019 16:07:15 +0000 Subject: Change in osmocom-bb[master]: trxcon/trx_if.c: Dropping UL bursts is a noticeable event In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/14276 ) Change subject: trxcon/trx_if.c: Dropping UL bursts is a noticeable event ...................................................................... trxcon/trx_if.c: Dropping UL bursts is a noticeable event Therefore we should use LOGL_ERROR instead of LOGL_DEBUG. Change-Id: If5084feb9e847d212530b1a5985390405d91008b --- M src/host/trxcon/trx_if.c 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Vadim Yanitskiy: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c index ca78349..55d7034 100644 --- a/src/host/trxcon/trx_if.c +++ b/src/host/trxcon/trx_if.c @@ -614,10 +614,11 @@ * We must be sure that we have clock, * and we have sent all control data * - * TODO: should we wait in TRX_STATE_RSP_WAIT state? + * TODO: introduce proper state machines for both + * transceiver and its TRXC interface. */ if (trx->fsm->state != TRX_STATE_ACTIVE) { - LOGP(DTRXD, LOGL_DEBUG, "Ignoring TX data, " + LOGP(DTRXD, LOGL_ERROR, "Ignoring TX data, " "transceiver isn't ready\n"); return -EAGAIN; } -- To view, visit https://gerrit.osmocom.org/14276 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If5084feb9e847d212530b1a5985390405d91008b Gerrit-Change-Number: 14276 Gerrit-PatchSet: 2 Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 16:07:57 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 31 May 2019 16:07:57 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Enable/disable osmux always based on test In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14300 ) Change subject: msc: Enable/disable osmux always based on test ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14300 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8fb48af7d37f1a2391a39c19f5ec5064cd5869d2 Gerrit-Change-Number: 14300 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 31 May 2019 16:07:57 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 16:24:21 2019 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 31 May 2019 16:24:21 +0000 Subject: Change in docker-playground[master]: msc: Disable osmux for ttcn3-msc-test-latest Message-ID: Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14303 Change subject: msc: Disable osmux for ttcn3-msc-test-latest ...................................................................... msc: Disable osmux for ttcn3-msc-test-latest Latest tagged version of osmo-msc doesn't support "osmux on/off" VTY commands, so we have to enable osmux use on that version to avoid most TTCN3 tests failing during set up phase. Depends: osmo-ttcn3-hacks.git I53d58b2d905905ebf1df322d0389b3715a48212f Change-Id: I6b3be3981978661de2fa90be130f6f1811a3d1f9 --- M ttcn3-msc-test/MSC_Tests.cfg M ttcn3-msc-test/jenkins.sh 2 files changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/03/14303/1 diff --git a/ttcn3-msc-test/MSC_Tests.cfg b/ttcn3-msc-test/MSC_Tests.cfg index c36e08b..1614d24 100644 --- a/ttcn3-msc-test/MSC_Tests.cfg +++ b/ttcn3-msc-test/MSC_Tests.cfg @@ -51,6 +51,7 @@ # local (emulation) side) MSC_Tests.mp_hlr_ip := "172.18.1.103"; MSC_Tests.mp_mgw_ip := "172.18.1.103"; +MSC_Tests.mp_enable_osmux_test := true; [MAIN_CONTROLLER] diff --git a/ttcn3-msc-test/jenkins.sh b/ttcn3-msc-test/jenkins.sh index a0a5f87..ca2936a 100755 --- a/ttcn3-msc-test/jenkins.sh +++ b/ttcn3-msc-test/jenkins.sh @@ -14,6 +14,10 @@ mkdir $VOL_BASE_DIR/msc-tester mkdir $VOL_BASE_DIR/msc-tester/unix cp MSC_Tests.cfg $VOL_BASE_DIR/msc-tester/ +# osmux must be disabled until release AFTER osmo-msc 1.3.1 is tagged +if [ "$IMAGE_SUFFIX" = "latest" ]; then + sed "s/MSC_Tests.mp_enable_osmux_test := true;/MSC_Tests.mp_enable_osmux_test := false;/g" -i $VOL_BASE_DIR/msc-tester/MSC_Tests.cfg +fi mkdir $VOL_BASE_DIR/stp cp osmo-stp.cfg $VOL_BASE_DIR/stp/ -- To view, visit https://gerrit.osmocom.org/14303 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I6b3be3981978661de2fa90be130f6f1811a3d1f9 Gerrit-Change-Number: 14303 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 16:51:33 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 31 May 2019 16:51:33 +0000 Subject: Change in osmocom-bb[master]: trxcon/sched_mframe.c: mark all stolen CBCH UL slots as TRXC_IDLE In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14281 ) Change subject: trxcon/sched_mframe.c: mark all stolen CBCH UL slots as TRXC_IDLE ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14281 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id30f2fac3274de3edff4ae59f77d9c9cf8059155 Gerrit-Change-Number: 14281 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 31 May 2019 16:51:33 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 16:51:44 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 31 May 2019 16:51:44 +0000 Subject: Change in osmocom-bb[master]: trxcon/sched_mframe.c: mark all stolen CBCH UL slots as TRXC_IDLE In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/14281 ) Change subject: trxcon/sched_mframe.c: mark all stolen CBCH UL slots as TRXC_IDLE ...................................................................... trxcon/sched_mframe.c: mark all stolen CBCH UL slots as TRXC_IDLE According to 3GPP TS 05.02, section 6.4.1, CBCH replaces SDCCH number 2 in both V (BCCH+CCCH+SDCCH/4+SACCH/4) and VII (SDCCH/8+SACCH/8) logical channel combinations. Unfortunately it is not clear whether we can use stolen UL slots for RACH or not. For now, we should mark all of them as IDLE. Somehow TRXC_SDCCH4_2 slots were left in the definition of combination V (combined CCCH+BCCH). This is not critical, but may be looking confusing. Let's fix this. Change-Id: Id30f2fac3274de3edff4ae59f77d9c9cf8059155 --- M src/host/trxcon/sched_mframe.c 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Vadim Yanitskiy: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/trxcon/sched_mframe.c b/src/host/trxcon/sched_mframe.c index d427993..9b759af 100644 --- a/src/host/trxcon/sched_mframe.c +++ b/src/host/trxcon/sched_mframe.c @@ -292,10 +292,10 @@ { TRXC_IDLE, 2, TRXC_SDCCH4_1, 3 }, { TRXC_IDLE, 3, TRXC_RACH, 0 }, { TRXC_SACCH4_3, 0, TRXC_RACH, 0 }, - { TRXC_SACCH4_3, 1, TRXC_SDCCH4_2, 0 }, - { TRXC_SACCH4_3, 2, TRXC_SDCCH4_2, 1 }, - { TRXC_SACCH4_3, 3, TRXC_SDCCH4_2, 2 }, - { TRXC_IDLE, 0, TRXC_SDCCH4_2, 3 }, + { TRXC_SACCH4_3, 1, TRXC_IDLE, 0 }, + { TRXC_SACCH4_3, 2, TRXC_IDLE, 1 }, + { TRXC_SACCH4_3, 3, TRXC_IDLE, 2 }, + { TRXC_IDLE, 0, TRXC_IDLE, 3 }, }; static const struct trx_frame frame_sdcch8[102] = { -- To view, visit https://gerrit.osmocom.org/14281 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id30f2fac3274de3edff4ae59f77d9c9cf8059155 Gerrit-Change-Number: 14281 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 18:38:18 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 31 May 2019 18:38:18 +0000 Subject: Change in osmo-ttcn3-hacks[master]: ts_TRXC_FAKE_RSSI(): define RSSI range, allow signed values Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14304 Change subject: ts_TRXC_FAKE_RSSI(): define RSSI range, allow signed values ...................................................................... ts_TRXC_FAKE_RSSI(): define RSSI range, allow signed values Change-Id: I8944e690c0da648eae3005777f2487c77b66a17b --- M bts/BTS_Tests.ttcn M library/TRXC_Types.ttcn 2 files changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/04/14304/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 0506e64..8e35469 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -467,7 +467,7 @@ g_bts_trxc_conn_id := res.connId; } -private function f_trxc_fake_rssi(uint8_t rssi) runs on ConnHdlr { +private function f_trxc_fake_rssi(TRXC_RSSI rssi) runs on ConnHdlr { var TrxcMessage ret; ret := f_TRXC_transceive(BTS_TRXC, g_bts_trxc_conn_id, valueof(ts_TRXC_FAKE_RSSI(rssi))); } diff --git a/library/TRXC_Types.ttcn b/library/TRXC_Types.ttcn index 37b8610..a87266e 100644 --- a/library/TRXC_Types.ttcn +++ b/library/TRXC_Types.ttcn @@ -68,7 +68,11 @@ external function dec_TrxcMessage(in charstring id) return TrxcMessage with { extension "prototype(convert) decode(TEXT)" }; -template (value) TrxcMessage ts_TRXC_FAKE_RSSI(uint8_t rssi, int16_t thresh := 0) := { +/* rxlev2dbm(0..63) gives us [-110..-47], plus -10 dbm for noise */ +type integer TRXC_RSSI (-120..-47); +type integer TRXC_RSSI_THRESH (-120..120); + +template (value) TrxcMessage ts_TRXC_FAKE_RSSI(TRXC_RSSI rssi, TRXC_RSSI_THRESH thresh := 0) := { cmd := { verb := "FAKE_RSSI", params := { int2str(rssi), int2str(thresh) } -- To view, visit https://gerrit.osmocom.org/14304 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I8944e690c0da648eae3005777f2487c77b66a17b Gerrit-Change-Number: 14304 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 18:43:00 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 31 May 2019 18:43:00 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/data_msg.py: fix: extend RSSI value range to [-47..-120] Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14305 Change subject: trx_toolkit/data_msg.py: fix: extend RSSI value range to [-47..-120] ...................................................................... trx_toolkit/data_msg.py: fix: extend RSSI value range to [-47..-120] Change-Id: I9fce3462db14bd273a1498762cc9293fc888b45a --- M src/target/trx_toolkit/data_msg.py 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/05/14305/1 diff --git a/src/target/trx_toolkit/data_msg.py b/src/target/trx_toolkit/data_msg.py index 3393ddb..da109d9 100644 --- a/src/target/trx_toolkit/data_msg.py +++ b/src/target/trx_toolkit/data_msg.py @@ -294,8 +294,10 @@ class DATAMSG_TRX2L1(DATAMSG): # Constants HDR_LEN = 8 + + # rxlev2dbm(0..63) gives us [-110..-47], plus -10 dbm for noise RSSI_MIN = -120 - RSSI_MAX = -50 + RSSI_MAX = -47 # Min and max values of int16_t TOA256_MIN = -32768 -- To view, visit https://gerrit.osmocom.org/14305 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I9fce3462db14bd273a1498762cc9293fc888b45a Gerrit-Change-Number: 14305 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 18:45:47 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 31 May 2019 18:45:47 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/data_msg.py: fix: extend RSSI value range to [-47..-120] In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14305 ) Change subject: trx_toolkit/data_msg.py: fix: extend RSSI value range to [-47..-120] ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14305 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9fce3462db14bd273a1498762cc9293fc888b45a Gerrit-Change-Number: 14305 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 31 May 2019 18:45:47 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 18:45:49 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 31 May 2019 18:45:49 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/data_msg.py: fix: extend RSSI value range to [-47..-120] In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/14305 ) Change subject: trx_toolkit/data_msg.py: fix: extend RSSI value range to [-47..-120] ...................................................................... trx_toolkit/data_msg.py: fix: extend RSSI value range to [-47..-120] Change-Id: I9fce3462db14bd273a1498762cc9293fc888b45a --- M src/target/trx_toolkit/data_msg.py 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, approved diff --git a/src/target/trx_toolkit/data_msg.py b/src/target/trx_toolkit/data_msg.py index 3393ddb..da109d9 100644 --- a/src/target/trx_toolkit/data_msg.py +++ b/src/target/trx_toolkit/data_msg.py @@ -294,8 +294,10 @@ class DATAMSG_TRX2L1(DATAMSG): # Constants HDR_LEN = 8 + + # rxlev2dbm(0..63) gives us [-110..-47], plus -10 dbm for noise RSSI_MIN = -120 - RSSI_MAX = -50 + RSSI_MAX = -47 # Min and max values of int16_t TOA256_MIN = -32768 -- To view, visit https://gerrit.osmocom.org/14305 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I9fce3462db14bd273a1498762cc9293fc888b45a Gerrit-Change-Number: 14305 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 19:42:54 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 31 May 2019 19:42:54 +0000 Subject: Change in libosmocore[master]: vty/command.c: cosmetic: add missing curly brackets Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14306 Change subject: vty/command.c: cosmetic: add missing curly brackets ...................................................................... vty/command.c: cosmetic: add missing curly brackets Otherwise it's a bit hard to read the code. Change-Id: I807ec71cfb67976251be844cdb2d2776b1837438 --- M src/vty/command.c 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/06/14306/1 diff --git a/src/vty/command.c b/src/vty/command.c index de084ab..87f2abc 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -2226,7 +2226,7 @@ /* Make copy of command elements. */ cmd_vector = vector_copy(cmd_node_vector(cmdvec, vty->node)); - for (index = 0; index < vector_active(vline); index++) + for (index = 0; index < vector_active(vline); index++) { if ((command = vector_slot(vline, index))) { int ret; @@ -2247,13 +2247,14 @@ return CMD_ERR_NO_MATCH; } } + } /* Check matched count. */ matched_element = NULL; matched_count = 0; incomplete_count = 0; - for (i = 0; i < vector_active(cmd_vector); i++) + for (i = 0; i < vector_active(cmd_vector); i++) { if ((cmd_element = vector_slot(cmd_vector, i))) { if (match == vararg_match || index >= cmd_element->cmdsize) { @@ -2266,6 +2267,7 @@ incomplete_count++; } } + } /* Finish of using cmd_vector. */ vector_free(cmd_vector); -- To view, visit https://gerrit.osmocom.org/14306 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I807ec71cfb67976251be844cdb2d2776b1837438 Gerrit-Change-Number: 14306 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 19:42:55 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 31 May 2019 19:42:55 +0000 Subject: Change in libosmocore[master]: vty_transcript_test.vty: add choice auto-complete tests Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14307 Change subject: vty_transcript_test.vty: add choice auto-complete tests ...................................................................... vty_transcript_test.vty: add choice auto-complete tests This patch is a result of discussion we had in [1]. The key idea is that libosmovty should properly auto-complete the commands containing choice, such as the following one: multi0 (one|two|three) [1] If9b0c0d031477ca87786aab5c269d00748e896c8 Right now, sending the following command: (osmo-foo-bar)# multi0 th would basically match the following vector: multi0 three however the resulting argv would be: ["multi0", "th"] Moreover, sending the following command: (osmo-foo-bar)# multi0 t would basically match the following vectors: multi0 two multi0 three because both start from 't', so the resulting argv would be: ["multi0", "t"] which is ambiguous! The expected output is: (osmo-foo-bar)# multi0 th ok argc=1 three (osmo-foo-bar)# multi0 t % Ambiguous command. This is going to be fixed in the follow up patches. Change-Id: I83c3aef813173952641035862c534ef16384780e --- M tests/vty/vty_transcript_test.vty 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/07/14307/1 diff --git a/tests/vty/vty_transcript_test.vty b/tests/vty/vty_transcript_test.vty index 57920a8..27dacdc 100644 --- a/tests/vty/vty_transcript_test.vty +++ b/tests/vty/vty_transcript_test.vty @@ -66,3 +66,12 @@ vty_transcript_test> multi2 ok argc=0 + +vty_transcript_test> multi0 thr +ok argc=1 thr + +vty_transcript_test> multi1 on +ok argc=1 on + +vty_transcript_test> multi2 t +ok argc=1 t -- To view, visit https://gerrit.osmocom.org/14307 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I83c3aef813173952641035862c534ef16384780e Gerrit-Change-Number: 14307 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 19:52:08 2019 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 31 May 2019 19:52:08 +0000 Subject: Change in libosmocore[master]: vty_transcript_test.vty: add choice auto-complete tests In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14307 ) Change subject: vty_transcript_test.vty: add choice auto-complete tests ...................................................................... Patch Set 1: The problem is somewhere in cmd_execute_command_real(). Instead of composing 'argv' from 'vline', we need to use 'matched_element'. Some info from gdb: $ gdb -q ./vty_transcript_test (gdb)$ b command.c:2322 $ telnet localhost 42042 $ vty_transcript_test> th (gdb)$ bt #0 cmd_execute_command_real (vline=0x62ac30, vty=0x6295e0, cmd=0x0) at command.c:2321 #1 0x00007ffff7767575 in cmd_execute_command (vline=0x62ac30, vty=0x6295e0, cmd=0x0, vtysh=0x0) at command.c:2354 #2 0x00007ffff776ab79 in vty_command (vty=0x6295e0, buf=0x629790 "multi0 th") at vty.c:431 #3 0x00007ffff776b3a0 in vty_execute (vty=0x6295e0) at vty.c:695 #4 0x00007ffff776cf8c in vty_read (vty=0x6295e0) at vty.c:1419 #5 0x00007ffff776f5f1 in client_data (fd=0x629538, what=0x1) at telnet_interface.c:147 #6 0x00007ffff7ba01c4 in osmo_fd_disp_fds (_rset=0x7fffffffda20, _wset=0x7fffffffdaa0, _eset=0x7fffffffdb20) at select.c:223 #7 0x00007ffff7ba0349 in osmo_select_main (polling=0x0) at select.c:263 #8 0x00000000004016d2 in main (argc=0x1, argv=0x7fffffffdcb8) at vty/vty_transcript_test.c:232 #9 0x00007ffff73b3f45 in __libc_start_main (main=0x40154b
, argc=0x1, argv=0x7fffffffdcb8, init=, fini=, rtld_fini=, stack_end=0x7fffffffdca8) at libc-start.c:287 #10 0x00000000004010f9 in _start () (gdb)$ p (char *) (vline->index[0]) $131 = 0x62ad20 "multi0" (gdb)$ p (char *) (vline->index[1]) $132 = 0x62ad90 "th" (gdb)$ p (char *) *((struct _vector *)((struct _vector *)((struct _vector *)(matched_element->strvec->index[0])))->index[0]) $133 = 0x626400 "multi0" (gdb)$ p (char *) *((struct _vector *)((struct _vector *)((struct _vector *)(matched_element->strvec->index[1])))->index[0]) $134 = 0x626660 "one" (gdb)$ p (char *) *((struct _vector *)((struct _vector *)((struct _vector *)(matched_element->strvec->index[1])))->index[1]) $135 = 0x626390 "two" (gdb)$ p (char *) *((struct _vector *)((struct _vector *)((struct _vector *)(matched_element->strvec->index[1])))->index[2]) $136 = 0x626840 "three" -- To view, visit https://gerrit.osmocom.org/14307 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I83c3aef813173952641035862c534ef16384780e Gerrit-Change-Number: 14307 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 31 May 2019 19:52:08 +0000 Gerrit-HasComments: No Gerrit-HasLabels: No -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 20:39:51 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 20:39:51 +0000 Subject: Change in osmo-pcu[master]: encoding: correct encoding of CRBB in ACK/NACK when not byte aligned In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14302 ) Change subject: encoding: correct encoding of CRBB in ACK/NACK when not byte aligned ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14302 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I7261aa71b37d7ead52992f8db462f72a3804988e Gerrit-Change-Number: 14302 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 31 May 2019 20:39:51 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 20:40:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 20:40:16 +0000 Subject: Change in libosmocore[master]: vty/command.c: cosmetic: add missing curly brackets In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14306 ) Change subject: vty/command.c: cosmetic: add missing curly brackets ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14306 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I807ec71cfb67976251be844cdb2d2776b1837438 Gerrit-Change-Number: 14306 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 31 May 2019 20:40:16 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 20:40:17 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 20:40:17 +0000 Subject: Change in libosmocore[master]: vty/command.c: cosmetic: add missing curly brackets In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14306 ) Change subject: vty/command.c: cosmetic: add missing curly brackets ...................................................................... vty/command.c: cosmetic: add missing curly brackets Otherwise it's a bit hard to read the code. Change-Id: I807ec71cfb67976251be844cdb2d2776b1837438 --- M src/vty/command.c 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/vty/command.c b/src/vty/command.c index de084ab..87f2abc 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -2226,7 +2226,7 @@ /* Make copy of command elements. */ cmd_vector = vector_copy(cmd_node_vector(cmdvec, vty->node)); - for (index = 0; index < vector_active(vline); index++) + for (index = 0; index < vector_active(vline); index++) { if ((command = vector_slot(vline, index))) { int ret; @@ -2247,13 +2247,14 @@ return CMD_ERR_NO_MATCH; } } + } /* Check matched count. */ matched_element = NULL; matched_count = 0; incomplete_count = 0; - for (i = 0; i < vector_active(cmd_vector); i++) + for (i = 0; i < vector_active(cmd_vector); i++) { if ((cmd_element = vector_slot(cmd_vector, i))) { if (match == vararg_match || index >= cmd_element->cmdsize) { @@ -2266,6 +2267,7 @@ incomplete_count++; } } + } /* Finish of using cmd_vector. */ vector_free(cmd_vector); -- To view, visit https://gerrit.osmocom.org/14306 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I807ec71cfb67976251be844cdb2d2776b1837438 Gerrit-Change-Number: 14306 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 20:41:19 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 20:41:19 +0000 Subject: Change in libosmocore[master]: vty_transcript_test.vty: add choice auto-complete tests In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14307 ) Change subject: vty_transcript_test.vty: add choice auto-complete tests ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14307 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I83c3aef813173952641035862c534ef16384780e Gerrit-Change-Number: 14307 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 31 May 2019 20:41:19 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 20:41:56 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 20:41:56 +0000 Subject: Change in osmo-ttcn3-hacks[master]: ts_TRXC_FAKE_RSSI(): define RSSI range, allow signed values In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14304 ) Change subject: ts_TRXC_FAKE_RSSI(): define RSSI range, allow signed values ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14304 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8944e690c0da648eae3005777f2487c77b66a17b Gerrit-Change-Number: 14304 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Eric Wild Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 31 May 2019 20:41:56 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 20:41:58 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 20:41:58 +0000 Subject: Change in osmo-ttcn3-hacks[master]: ts_TRXC_FAKE_RSSI(): define RSSI range, allow signed values In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14304 ) Change subject: ts_TRXC_FAKE_RSSI(): define RSSI range, allow signed values ...................................................................... ts_TRXC_FAKE_RSSI(): define RSSI range, allow signed values Change-Id: I8944e690c0da648eae3005777f2487c77b66a17b --- M bts/BTS_Tests.ttcn M library/TRXC_Types.ttcn 2 files changed, 6 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 5481838..37a5e3c 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -467,7 +467,7 @@ g_bts_trxc_conn_id := res.connId; } -private function f_trxc_fake_rssi(uint8_t rssi) runs on ConnHdlr { +private function f_trxc_fake_rssi(TRXC_RSSI rssi) runs on ConnHdlr { var TrxcMessage ret; ret := f_TRXC_transceive(BTS_TRXC, g_bts_trxc_conn_id, valueof(ts_TRXC_FAKE_RSSI(rssi))); } diff --git a/library/TRXC_Types.ttcn b/library/TRXC_Types.ttcn index 37b8610..a87266e 100644 --- a/library/TRXC_Types.ttcn +++ b/library/TRXC_Types.ttcn @@ -68,7 +68,11 @@ external function dec_TrxcMessage(in charstring id) return TrxcMessage with { extension "prototype(convert) decode(TEXT)" }; -template (value) TrxcMessage ts_TRXC_FAKE_RSSI(uint8_t rssi, int16_t thresh := 0) := { +/* rxlev2dbm(0..63) gives us [-110..-47], plus -10 dbm for noise */ +type integer TRXC_RSSI (-120..-47); +type integer TRXC_RSSI_THRESH (-120..120); + +template (value) TrxcMessage ts_TRXC_FAKE_RSSI(TRXC_RSSI rssi, TRXC_RSSI_THRESH thresh := 0) := { cmd := { verb := "FAKE_RSSI", params := { int2str(rssi), int2str(thresh) } -- To view, visit https://gerrit.osmocom.org/14304 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I8944e690c0da648eae3005777f2487c77b66a17b Gerrit-Change-Number: 14304 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Eric Wild Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 20:42:25 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 20:42:25 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Add module param to disable osmux (fix msc-latest jenkins job) In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14301 ) Change subject: msc: Add module param to disable osmux (fix msc-latest jenkins job) ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14301 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I53d58b2d905905ebf1df322d0389b3715a48212f Gerrit-Change-Number: 14301 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 31 May 2019 20:42:25 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 20:42:38 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 20:42:38 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Enable/disable osmux always based on test In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14300 ) Change subject: msc: Enable/disable osmux always based on test ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14300 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8fb48af7d37f1a2391a39c19f5ec5064cd5869d2 Gerrit-Change-Number: 14300 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Fri, 31 May 2019 20:42:38 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 20:42:41 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 20:42:41 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Enable/disable osmux always based on test In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14300 ) Change subject: msc: Enable/disable osmux always based on test ...................................................................... msc: Enable/disable osmux always based on test Initially it was thought safe to only enable it since the osmux test was at the end, but actually IU tests run after it, and those don't expect osmux to be enabled. This way we also always match osmo-msc osmux state with whatever the test expects (and sets through f_init()). Change-Id: I8fb48af7d37f1a2391a39c19f5ec5064cd5869d2 --- M msc/MSC_Tests.ttcn 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Vadim Yanitskiy: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 16f7b9b..40e0720 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -330,6 +330,11 @@ f_vty_config(MSCVTY, "network", "authentication optional"); f_vty_config(MSCVTY, "msc", "assign-tmsi"); f_vty_config(MSCVTY, "network", "encryption a5 0"); + if (osmux) { + f_vty_config(MSCVTY, "msc", "osmux on"); + } else { + f_vty_config(MSCVTY, "msc", "osmux off"); + } } /* Initialize for a direct connection to BSSAP. This function is an alternative @@ -1746,7 +1751,6 @@ testcase TC_lu_and_mt_call_osmux() runs on MTC_CT { var BSC_ConnHdlr vc_conn; f_init(1, false, true, true); - f_vty_config(MSCVTY, "msc", "osmux on"); vc_conn := f_start_handler(refers(f_tc_lu_and_mt_call), 39, 0, true, true); vc_conn.done; -- To view, visit https://gerrit.osmocom.org/14300 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I8fb48af7d37f1a2391a39c19f5ec5064cd5869d2 Gerrit-Change-Number: 14300 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Vadim Yanitskiy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 20:42:41 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 20:42:41 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Add module param to disable osmux (fix msc-latest jenkins job) In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14301 ) Change subject: msc: Add module param to disable osmux (fix msc-latest jenkins job) ...................................................................... msc: Add module param to disable osmux (fix msc-latest jenkins job) ttcn3-bsc-test-latest currently fails on most tests because it tries to use "osmux off" VTY param and only current osmo-msc master supports it. Change-Id: I53d58b2d905905ebf1df322d0389b3715a48212f --- M msc/MSC_Tests.ttcn 1 file changed, 14 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 40e0720..2c898fc 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -136,6 +136,11 @@ charstring mp_mme_name := "mmec01.mmegi0001.mme.epc.mnc070.mcc901.3gppnetwork.org"; charstring mp_vlr_name := "vlr.example.net"; + /* Whether to enable osmux tests. Can be dropped completely and enable + unconditionally once new version of osmo-msc is released (current + version: 1.3.1) */ + boolean mp_enable_osmux_test := true; + RAN_Configurations mp_bssap_cfg := { { sccp_service_type := "mtp3_itu", @@ -330,10 +335,12 @@ f_vty_config(MSCVTY, "network", "authentication optional"); f_vty_config(MSCVTY, "msc", "assign-tmsi"); f_vty_config(MSCVTY, "network", "encryption a5 0"); - if (osmux) { - f_vty_config(MSCVTY, "msc", "osmux on"); - } else { - f_vty_config(MSCVTY, "msc", "osmux off"); + if (mp_enable_osmux_test) { + if (osmux) { + f_vty_config(MSCVTY, "msc", "osmux on"); + } else { + f_vty_config(MSCVTY, "msc", "osmux off"); + } } } @@ -5332,8 +5339,9 @@ execute( TC_lu_imsi_auth_tmsi_encr_3_1_log_msc_debug() ); execute( TC_gsup_mt_multi_part_sms() ); execute( TC_mo_cc_bssmap_clear() ); - - execute( TC_lu_and_mt_call_osmux() ); + if (mp_enable_osmux_test) { + execute( TC_lu_and_mt_call_osmux() ); + } } -- To view, visit https://gerrit.osmocom.org/14301 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I53d58b2d905905ebf1df322d0389b3715a48212f Gerrit-Change-Number: 14301 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 20:43:03 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 20:43:03 +0000 Subject: Change in docker-playground[master]: msc: Disable osmux for ttcn3-msc-test-latest In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14303 ) Change subject: msc: Disable osmux for ttcn3-msc-test-latest ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14303 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6b3be3981978661de2fa90be130f6f1811a3d1f9 Gerrit-Change-Number: 14303 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Fri, 31 May 2019 20:43:03 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 20:43:04 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 20:43:04 +0000 Subject: Change in docker-playground[master]: msc: Disable osmux for ttcn3-msc-test-latest In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14303 ) Change subject: msc: Disable osmux for ttcn3-msc-test-latest ...................................................................... msc: Disable osmux for ttcn3-msc-test-latest Latest tagged version of osmo-msc doesn't support "osmux on/off" VTY commands, so we have to enable osmux use on that version to avoid most TTCN3 tests failing during set up phase. Depends: osmo-ttcn3-hacks.git I53d58b2d905905ebf1df322d0389b3715a48212f Change-Id: I6b3be3981978661de2fa90be130f6f1811a3d1f9 --- M ttcn3-msc-test/MSC_Tests.cfg M ttcn3-msc-test/jenkins.sh 2 files changed, 5 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/ttcn3-msc-test/MSC_Tests.cfg b/ttcn3-msc-test/MSC_Tests.cfg index c36e08b..1614d24 100644 --- a/ttcn3-msc-test/MSC_Tests.cfg +++ b/ttcn3-msc-test/MSC_Tests.cfg @@ -51,6 +51,7 @@ # local (emulation) side) MSC_Tests.mp_hlr_ip := "172.18.1.103"; MSC_Tests.mp_mgw_ip := "172.18.1.103"; +MSC_Tests.mp_enable_osmux_test := true; [MAIN_CONTROLLER] diff --git a/ttcn3-msc-test/jenkins.sh b/ttcn3-msc-test/jenkins.sh index a0a5f87..ca2936a 100755 --- a/ttcn3-msc-test/jenkins.sh +++ b/ttcn3-msc-test/jenkins.sh @@ -14,6 +14,10 @@ mkdir $VOL_BASE_DIR/msc-tester mkdir $VOL_BASE_DIR/msc-tester/unix cp MSC_Tests.cfg $VOL_BASE_DIR/msc-tester/ +# osmux must be disabled until release AFTER osmo-msc 1.3.1 is tagged +if [ "$IMAGE_SUFFIX" = "latest" ]; then + sed "s/MSC_Tests.mp_enable_osmux_test := true;/MSC_Tests.mp_enable_osmux_test := false;/g" -i $VOL_BASE_DIR/msc-tester/MSC_Tests.cfg +fi mkdir $VOL_BASE_DIR/stp cp osmo-stp.cfg $VOL_BASE_DIR/stp/ -- To view, visit https://gerrit.osmocom.org/14303 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I6b3be3981978661de2fa90be130f6f1811a3d1f9 Gerrit-Change-Number: 14303 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 20:43:34 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 20:43:34 +0000 Subject: Change in osmo-ggsn[master]: cosmetic: gtp: Document free pdp ctx in non-teardown scenario In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14286 ) Change subject: cosmetic: gtp: Document free pdp ctx in non-teardown scenario ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14286 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia47ac792111fe1e9aa68222b32b5da823642206b Gerrit-Change-Number: 14286 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 31 May 2019 20:43:34 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 20:43:50 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 20:43:50 +0000 Subject: Change in osmo-ggsn[master]: gtp: Re-arrange free pdp ctx code in non-teardown scenario In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14293 ) Change subject: gtp: Re-arrange free pdp ctx code in non-teardown scenario ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14293 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I299765816e9d885497110d2e834f7ccdc943052c Gerrit-Change-Number: 14293 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 31 May 2019 20:43:50 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 20:44:18 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 20:44:18 +0000 Subject: Change in osmo-ggsn[master]: pdp: Drop unused code for haship In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14294 ) Change subject: pdp: Drop unused code for haship ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14294 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ife3f222daa87f0630ff34ffc3e63f4dad2ad914b Gerrit-Change-Number: 14294 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 31 May 2019 20:44:18 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 20:44:25 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 20:44:25 +0000 Subject: Change in osmo-ggsn[master]: cosmetic: gtp.h: Remove trailing whitespaces In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14295 ) Change subject: cosmetic: gtp.h: Remove trailing whitespaces ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14295 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I60f8cf5e36bcef767f90b150a488a800445bf744 Gerrit-Change-Number: 14295 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 31 May 2019 20:44:25 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 20:45:58 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 20:45:58 +0000 Subject: Change in osmo-ggsn[master]: ggsn: vty: Require ggsn param in cmd In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14298 ) Change subject: ggsn: vty: Require ggsn param in cmd ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14298 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8357e20076348c8ded5e9f5b8e7252566b0fbfea Gerrit-Change-Number: 14298 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 31 May 2019 20:45:58 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 20:46:05 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 20:46:05 +0000 Subject: Change in osmo-ggsn[master]: gtp: Replace old pdp APIs with new ones with multi-gsn support In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14297 ) Change subject: gtp: Replace old pdp APIs with new ones with multi-gsn support ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14297 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibf56a063f01d1f95a2a3271416da6e062e85fdfa Gerrit-Change-Number: 14297 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 31 May 2019 20:46:05 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 20:46:08 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 20:46:08 +0000 Subject: Change in osmo-ggsn[master]: gtp: Introduce new pdp APIs (and deprecate old ones) to support multi... In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14296 ) Change subject: gtp: Introduce new pdp APIs (and deprecate old ones) to support multiple GSN ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/14296 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I653cbdc185165592d985e3efab6e3f1add97877b Gerrit-Change-Number: 14296 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 31 May 2019 20:46:08 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 31 20:46:16 2019 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 31 May 2019 20:46:16 +0000 Subject: Change in osmo-ggsn[master]: sgsnemu: Replace old API pdp_newpdp with new one provided by libgtp In-Reply-To: References: Message-ID: Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/14299 ) Change subject: sgsnemu: Replace old API pdp_newpdp with new one provided by libgtp ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/14299 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9742b82c382ae2e63f8aff4c5c32e2450059082b Gerrit-Change-Number: 14299 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Comment-Date: Fri, 31 May 2019 20:46:16 +0000 Gerrit-HasComments: No Gerrit-HasLabels: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: