lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

September 2024

  • 1 participants
  • 1983 discussions
[S] Change in osmo-ttcn3-hacks[master]: library/PFCP_Emulation: allow retrieving the Recovery Time Stamp
by laforge 10 Sep '24

10 Sep '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38035?usp=email ) ( 2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: library/PFCP_Emulation: allow retrieving the Recovery Time Stamp ...................................................................... library/PFCP_Emulation: allow retrieving the Recovery Time Stamp The Recovery Time Stamp is a mandatory IE for some PDUs, such as: * Heartbeat Request/Response * PFCP Association Setup Request/Response Allow the PFCP_ConnHdlr components to retrieve its value, so that they can include it in outgoing (and expect in incoming) PDUs. Change-Id: I23eb2b4e309460f93183df83cdd35e46a93fbb94 --- M library/PFCP_Emulation.ttcn 1 file changed, 18 insertions(+), 0 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve diff --git a/library/PFCP_Emulation.ttcn b/library/PFCP_Emulation.ttcn index c671095..c917157 100644 --- a/library/PFCP_Emulation.ttcn +++ b/library/PFCP_Emulation.ttcn @@ -193,6 +193,11 @@ f_PFCPEM_conn_add_or_update({vc_conn, omit, omit}); CLIENT_PROC.reply(PFCPEM_register:{}) to vc_conn; } + + [] CLIENT_PROC.getcall(PFCPEM_get_recovery_timestamp:{?}) -> sender vc_conn { + log("PFCP_Emulation main() CLIENT_PROC.getcall(PFCPEM_get_recovery_timestamp)"); + CLIENT_PROC.reply(PFCPEM_get_recovery_timestamp:{g_recovery_timestamp}) to vc_conn; + } } } } @@ -206,9 +211,11 @@ } with { extension "internal" }; signature PFCPEM_register(); +signature PFCPEM_get_recovery_timestamp(out integer rts); type port PFCPEM_PROC_PT procedure { inout PFCPEM_register; + inout PFCPEM_get_recovery_timestamp; } with { extension "internal" }; /*********************************************************************** @@ -226,6 +233,17 @@ } } +function f_pfcp_get_recovery_timestamp() +runs on PFCP_ConnHdlr return integer { + var integer rts; + + PFCP_PROC.call(PFCPEM_get_recovery_timestamp:{-}) { + [] PFCP_PROC.getreply(PFCPEM_get_recovery_timestamp:{?}) -> param(rts) {}; + } + + return rts; +} + altstep as_pfcp_ignore(PFCPEM_PT pt, template PDU_PFCP pfcp_expect := ?) { [] pt.receive(pfcp_expect) { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38035?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I23eb2b4e309460f93183df83cdd35e46a93fbb94 Gerrit-Change-Number: 38035 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-ttcn3-hacks[master]: upf: remove unused port PFCP from test_CT
by laforge 10 Sep '24

10 Sep '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38060?usp=email ) Change subject: upf: remove unused port PFCP from test_CT ...................................................................... upf: remove unused port PFCP from test_CT Change-Id: Iba31a6aaa9a9ec854ba36956d1b853dcf66a804d --- M upf/UPF_Tests.ttcn 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/upf/UPF_Tests.ttcn b/upf/UPF_Tests.ttcn index 37af9b3..b92701f 100644 --- a/upf/UPF_Tests.ttcn +++ b/upf/UPF_Tests.ttcn @@ -52,8 +52,6 @@ } type component test_CT extends CTRL_Adapter_CT { - port PFCPEM_PT PFCP; - port TELNETasp_PT UPFVTY; /* global test case guard timer (actual timeout value is set in f_init()) */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38060?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Iba31a6aaa9a9ec854ba36956d1b853dcf66a804d Gerrit-Change-Number: 38060 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: library/PFCP_Emulation: look up by SeqNr and SEID separately
by laforge 10 Sep '24

10 Sep '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38032?usp=email ) ( 2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: library/PFCP_Emulation: look up by SeqNr and SEID separately ...................................................................... library/PFCP_Emulation: look up by SeqNr and SEID separately This allows routing of PFCP PDUs without SEID by SeqNr. An example of such a PDU is the Heartbeat Request. Change-Id: Ic7912d944e94852a587993708d51439ec90f08cd --- M library/PFCP_Emulation.ttcn 1 file changed, 27 insertions(+), 7 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve diff --git a/library/PFCP_Emulation.ttcn b/library/PFCP_Emulation.ttcn index 9cd9a86..74f4cdd 100644 --- a/library/PFCP_Emulation.ttcn +++ b/library/PFCP_Emulation.ttcn @@ -74,13 +74,20 @@ type record of PFCPEM_conn PFCPEM_conns; -private function f_PFCPEM_conn_by_seid_or_seqnr(OCT8 seid, LIN3_BO_LAST seqnr) runs on PFCP_Emulation_CT return PFCP_ConnHdlr { - log("looking for seid ", seid, " seqnr ", seqnr, " in conns ", g_conns); +private function f_PFCPEM_conn_by_seqnr(LIN3_BO_LAST seqnr) +runs on PFCP_Emulation_CT return PFCP_ConnHdlr { for (var integer i := 0; i < lengthof(g_conns); i := i + 1) { if (isbound(g_conns[i].pfcp_msg_sequence_number) and seqnr == g_conns[i].pfcp_msg_sequence_number) { return g_conns[i].vc_conn; } + } + return null; +}; + +private function f_PFCPEM_conn_by_seid(OCT8 seid) +runs on PFCP_Emulation_CT return PFCP_ConnHdlr { + for (var integer i := 0; i < lengthof(g_conns); i := i + 1) { if (isbound(g_conns[i].seid) and seid == g_conns[i].seid) { return g_conns[i].vc_conn; @@ -89,6 +96,23 @@ return null; }; +private function f_PFCPEM_conn_for_pdu(in PDU_PFCP pdu) +runs on PFCP_Emulation_CT return PFCP_ConnHdlr { + var PFCP_ConnHdlr vc_conn := null; + + vc_conn := f_PFCPEM_conn_by_seqnr(pdu.sequence_number); + if (vc_conn != null) { + return vc_conn; + } + + /* If there is a SEID, we can look it up */ + if (pdu.s_flag == '1'B) { + vc_conn := f_PFCPEM_conn_by_seid(pdu.seid); + } + + return vc_conn; +}; + private function f_PFCPEM_add_conn(PFCP_ConnHdlr vc_conn) runs on PFCP_Emulation_CT { for (var integer i := 0; i < lengthof(g_conns); i := i + 1) { if (g_conns[i].vc_conn == vc_conn) { @@ -134,11 +158,7 @@ [] PFCP.receive(tr_PFCP_UD(?)) -> value ud { log("PFCP_Emulation main() PFCP.receive: ", ud); - vc_conn := null; - if (ud.pdu.s_flag == '1'B) { - /* There is a SEID */ - vc_conn := f_PFCPEM_conn_by_seid_or_seqnr(ud.pdu.seid, ud.pdu.sequence_number); - } + vc_conn := f_PFCPEM_conn_for_pdu(ud.pdu); if (vc_conn != null) { log("found destination ", vc_conn); CLIENT.send(ud.pdu) to vc_conn; -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38032?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ic7912d944e94852a587993708d51439ec90f08cd Gerrit-Change-Number: 38032 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: hnbgw: move vc_PFCP from ConnHdlr to test_CT
by laforge 10 Sep '24

10 Sep '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38031?usp=email ) Change subject: hnbgw: move vc_PFCP from ConnHdlr to test_CT ...................................................................... hnbgw: move vc_PFCP from ConnHdlr to test_CT A logical relation between the PFCP emulation component (acting as the UP function) and its ConnHdlr components is one-to-many. It's unusual for the ConnHdlr components to have their own emulation component, especially when a testcase spawns many of them. This renders the dispatch function of the PFCP emulation component useless. The HNBGW testsuite, which is using the PFCP emulation, does not spawn more than one ConnHdlr component, so there was no problem with that so far. Let's move the PFCP emulation to test_CT, in order to allow spawning more than one ConnHdlr and to make the component hierarchy less confusing. Change-Id: Iaf7a54c674f2dc549572d918beb6f355f48ee700 --- M hnbgw/HNBGW_Tests.ttcn M library/PFCP_Emulation.ttcn 2 files changed, 9 insertions(+), 6 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn index 3765411..5204f38 100644 --- a/hnbgw/HNBGW_Tests.ttcn +++ b/hnbgw/HNBGW_Tests.ttcn @@ -350,6 +350,7 @@ var MGCP_Emulation_CT vc_MGCP; port TELNETasp_PT HNBGWVTY; var StatsD_Checker_CT vc_STATSD; + var PFCP_Emulation_CT vc_PFCP; /* global test case guard timer (actual timeout value is set in f_init()) */ timer T_guard := 30.0; @@ -397,7 +398,7 @@ vc_MGCP.start(MGCP_Emulation.main(ops, pars, id)); } -function f_init_pfcp(charstring id) runs on ConnHdlr { +function f_init_pfcp(charstring id) runs on test_CT { id := id & "-PFCP"; var PFCP_Emulation_Cfg pfcp_cfg := { @@ -409,8 +410,6 @@ }; vc_PFCP := PFCP_Emulation_CT.create(id) alive; - connect(self:PFCP, vc_PFCP:CLIENT); - connect(self:PFCP_PROC, vc_PFCP:CLIENT_PROC); vc_PFCP.start(PFCP_Emulation.main(pfcp_cfg)); } @@ -622,6 +621,11 @@ connect(vc_conn:STATSD_PROC, vc_STATSD:STATSD_PROC); + if (isbound(vc_PFCP)) { + connect(vc_conn:PFCP, vc_PFCP:CLIENT); + connect(vc_conn:PFCP_PROC, vc_PFCP:CLIENT_PROC); + } + return vc_conn; } @@ -651,8 +655,6 @@ /* make parameters available via component variable */ g_pars := pars; - f_init_pfcp(testcasename()); - /* start guard timer and activate it as default */ g_Tguard.start(t_guard); activate(as_Tguard_ConnHdlr()); @@ -2030,6 +2032,7 @@ var ConnHdlr vc_conn; g_num_hnbs := 1; f_init(); + f_init_pfcp(testcasename()); f_sleep(1.0); vc_conn := f_start_handler_with_pars(refers(f_tc_ps_rab_assignment_with_pfcp), t_pars(7, ps_domain := true)); @@ -2093,6 +2096,7 @@ testcase TC_ps_rab_assignment_without_pfcp() runs on test_CT { var ConnHdlr vc_conn; f_init(); + f_init_pfcp(testcasename()); f_sleep(1.0); vc_conn := f_start_handler_with_pars(refers(f_tc_ps_rab_assignment_without_pfcp), t_pars(7, ps_domain := true)); diff --git a/library/PFCP_Emulation.ttcn b/library/PFCP_Emulation.ttcn index 2fb3a8a..9cd9a86 100644 --- a/library/PFCP_Emulation.ttcn +++ b/library/PFCP_Emulation.ttcn @@ -199,7 +199,6 @@ type component PFCP_ConnHdlr { port PFCPEM_PT PFCP; port PFCPEM_PROC_PT PFCP_PROC; - var PFCP_Emulation_CT vc_PFCP; }; function f_pfcp_register() runs on PFCP_ConnHdlr { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38031?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Iaf7a54c674f2dc549572d918beb6f355f48ee700 Gerrit-Change-Number: 38031 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: hnbgw: move vc_PFCP from ConnHdlr to test_CT
by laforge 10 Sep '24

10 Sep '24
Attention is currently required from: fixeria. laforge has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38031?usp=email ) Change subject: hnbgw: move vc_PFCP from ConnHdlr to test_CT ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38031?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Iaf7a54c674f2dc549572d918beb6f355f48ee700 Gerrit-Change-Number: 38031 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 10 Sep 2024 08:10:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: hnbgw: move vc_PFCP from ConnHdlr to test_CT
by laforge 10 Sep '24

10 Sep '24
Attention is currently required from: fixeria. laforge has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38031?usp=email ) Change subject: hnbgw: move vc_PFCP from ConnHdlr to test_CT ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38031?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Iaf7a54c674f2dc549572d918beb6f355f48ee700 Gerrit-Change-Number: 38031 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 10 Sep 2024 08:09:56 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in osmo-ci[master]: jobs/ttcn3-testsuites-testenv: Add job running ttcn3-pcrf-test-ogs
by laforge 10 Sep '24

10 Sep '24
Attention is currently required from: pespin. laforge has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ci/+/38043?usp=email ) Change subject: jobs/ttcn3-testsuites-testenv: Add job running ttcn3-pcrf-test-ogs ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/38043?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ibf7bc4f0b2ca5dcb300a8a8c1d157fc594ef1944 Gerrit-Change-Number: 38043 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 10 Sep 2024 08:09:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: lapdm: remove
by laforge 10 Sep '24

10 Sep '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38067?usp=email ) Change subject: lapdm: remove ...................................................................... lapdm: remove In the related patch, lapdm/L1CTL_Test.ttcn has been moved to bts/BTS_Tests_LAPDm.ttcn. The remaining files in this directory are unused. Remove them to unclutter the repository a bit. Related: Ibbc967f0bd9a19ab4bbd17f612654d72cb32d571 Change-Id: I6aae060a5b252d3ab36378da8c721154b3186466 --- D lapdm/gen_links.sh D lapdm/regen_makefile.sh 2 files changed, 0 insertions(+), 36 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/lapdm/gen_links.sh b/lapdm/gen_links.sh deleted file mode 100755 index 217f485..0000000 --- a/lapdm/gen_links.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -BASEDIR=../deps - -. ../gen_links.sh.inc - -DIR=$BASEDIR/titan.TestPorts.UNIX_DOMAIN_SOCKETasp/src -FILES="UD_PT.cc UD_PT.hh UD_PortType.ttcn UD_Types.ttcn" -gen_links $DIR $FILES - -DIR=$BASEDIR/titan.TestPorts.Common_Components.Socket-API/src -FILES="Socket_API_Definitions.ttcn" -gen_links $DIR $FILES - - -DIR=../library -FILES="Misc_Helpers.ttcn General_Types.ttcn GSM_Types.ttcn GSM_RR_Types.ttcn RLCMAC_CSN1_Templates.ttcn RLCMAC_CSN1_Types.ttcn Osmocom_Types.ttcn L1CTL_PortType.ttcn L1CTL_PortType_CtrlFunct.ttcn L1CTL_PortType_CtrlFunctDef.cc L1CTL_Types.ttcn LAPDm_RAW_PT.ttcn LAPDm_Types.ttcn RLCMAC_Templates.ttcn RLCMAC_Types.ttcn RLCMAC_EncDec.cc" -gen_links $DIR $FILES - -ignore_pp_results diff --git a/lapdm/regen_makefile.sh b/lapdm/regen_makefile.sh deleted file mode 100755 index f354e87..0000000 --- a/lapdm/regen_makefile.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -NAME=L1CTL_Test - -FILES=" - *.ttcn - L1CTL_PortType_CtrlFunctDef.cc - RLCMAC_EncDec.cc - UD_PT.cc - UD_PT.hh -" - -export CPPFLAGS_TTCN3=" -" - -../regen-makefile.sh -e $NAME $FILES -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38067?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I6aae060a5b252d3ab36378da8c721154b3186466 Gerrit-Change-Number: 38067 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: lapdm: remove
by laforge 10 Sep '24

10 Sep '24
Attention is currently required from: osmith. laforge has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38067?usp=email ) Change subject: lapdm: remove ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38067?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I6aae060a5b252d3ab36378da8c721154b3186466 Gerrit-Change-Number: 38067 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Tue, 10 Sep 2024 08:08:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in libosmo-netif[master]: coverity CID#216829
by pespin 10 Sep '24

10 Sep '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/37992?usp=email ) Change subject: coverity CID#216829 ...................................................................... coverity CID#216829 Simplify the bounds checking of values received on the wire. Change-Id: I30beeac45ff2d8c08905986af9fabfda071ddc5b --- M src/rtp.c 1 file changed, 21 insertions(+), 13 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved laforge: Looks good to me, but someone else must approve diff --git a/src/rtp.c b/src/rtp.c index 77905f2..1da409c 100644 --- a/src/rtp.c +++ b/src/rtp.c @@ -115,14 +115,21 @@ int x_len; int csrc_len; - csrc_len = rtph->csrc_count << 2; - payload = msg->data + sizeof(struct rtp_hdr) + csrc_len; - payload_len = msg->len - sizeof(struct rtp_hdr) - csrc_len; - if (payload_len < 0) { - DEBUGPC(DLMUX, "received RTP frame too short (len = %d, " - "csrc count = %d)\n", msg->len, rtph->csrc_count); + if (msg->len < sizeof(struct rtp_hdr)) { + DEBUGPC(DLMUX, "received RTP frame too short for an RTP header (%d < %zu)\n", + msg->len, sizeof(*rtph)); return NULL; } + + csrc_len = sizeof(struct rtp_hdr) + (rtph->csrc_count << 2); + if (msg->len < csrc_len) { + DEBUGPC(DLMUX, "received RTP frame too short for its csrc (%u < %d, csrc_count = %d)\n", + msg->len, csrc_len, rtph->csrc_count); + return NULL; + } + payload = msg->data + csrc_len; + payload_len = msg->len - csrc_len; + if (rtph->extension) { if (payload_len < sizeof(struct rtp_x_hdr)) { DEBUGPC(DLMUX, "received RTP frame too short for " @@ -131,26 +138,27 @@ } rtpxh = (struct rtp_x_hdr *)payload; x_len = ntohs(rtpxh->length) * 4 + sizeof(struct rtp_x_hdr); - payload += x_len; - payload_len -= x_len; - if (payload_len < 0) { + if (x_len > payload_len) { DEBUGPC(DLMUX, "received RTP frame too short, " "extension header exceeds frame length\n"); return NULL; } + payload += x_len; + payload_len -= x_len; } if (rtph->padding) { + uint8_t padding_len; if (payload_len < 1) { DEBUGPC(DLMUX, "received RTP frame too short for " "padding length\n"); return NULL; } - payload_len -= payload[payload_len - 1]; - if (payload_len < 0) { - DEBUGPC(DLMUX, "received RTP frame with padding " - "greater than payload\n"); + padding_len = payload[payload_len - 1]; + if (payload_len < padding_len) { + DEBUGPC(DLMUX, "received RTP frame with padding greater than payload\n"); return NULL; } + payload_len -= padding_len; } *plen = payload_len; -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/37992?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I30beeac45ff2d8c08905986af9fabfda071ddc5b Gerrit-Change-Number: 37992 Gerrit-PatchSet: 8 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • ...
  • 199
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.