pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38808?usp=email )
Change subject: ipaccess: Clarify access to msgb ipa payload in code path
......................................................................
ipaccess: Clarify access to msgb ipa payload in code path
The pointer to the data payload is gathered at a later place after the
first byte of the pointer has actually already been read.
Clean it up so that it becomes obvious when and how the payload is
accessed.
Change-Id: I5eac24bdf72021e500c554bdc6d8449bf37d2231
---
M src/input/ipaccess.c
1 file changed, 4 insertions(+), 3 deletions(-)
Approvals:
osmith: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index dc523ef..51e6087 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -871,7 +871,10 @@
/* special handling for IPA CCM. */
if (hh->proto == IPAC_PROTO_IPACCESS) {
- uint8_t msg_type = *(msg->l2h);
+ uint8_t *data = msgb_l2(msg);
+ int len = msgb_l2len(msg);
+ OSMO_ASSERT(len > 0);
+ uint8_t msg_type = *data;
/* peek the pong for our keepalive fsm */
if (line && msg_type == IPAC_MSGT_PONG) {
@@ -886,8 +889,6 @@
/* this is a request for identification from the BSC. */
if (msg_type == IPAC_MSGT_ID_GET) {
- uint8_t *data = msgb_l2(msg);
- int len = msgb_l2len(msg);
int trx_nr = 0;
if (link->ofd->priv_nr >= E1INP_SIGN_RSL)
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38808?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I5eac24bdf72021e500c554bdc6d8449bf37d2231
Gerrit-Change-Number: 38808
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: pespin.
fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38814?usp=email )
Change subject: ipaccess: Deprecate ipa_msg_push_header() API
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38814?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I59b216c8a5e5a8744d337773ccf6f8d674b9513d
Gerrit-Change-Number: 38814
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 19 Nov 2024 13:25:14 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: fixeria.
Hello Jenkins Builder, fixeria,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-abis/+/38814?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Code-Review-1 by fixeria, Verified+1 by Jenkins Builder
Change subject: ipaccess: Deprecate ipa_msg_push_header() API
......................................................................
ipaccess: Deprecate ipa_msg_push_header() API
We already have sibling APIs in libosmocore and libosmo-netif. There's
no need to have yet another API in libosmo-abis, which shouldn't export
public IPA related APIs (it's not its aim).
Replace internal use of ipa_msg_push_header() with libosmocore's
ipa_prepend_header() (the l2h is not really needed anywhere in there).
Change-Id: I59b216c8a5e5a8744d337773ccf6f8d674b9513d
---
M include/osmocom/abis/ipa.h
M src/input/ipa.c
M src/input/ipa_keepalive.c
3 files changed, 7 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/14/38814/2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38814?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I59b216c8a5e5a8744d337773ccf6f8d674b9513d
Gerrit-Change-Number: 38814
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: pespin.
osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38810?usp=email )
Change subject: ipaccess: Get rid of extra indentation level in long code block
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38810?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I41c703d5585d8e1225a10a8b190871f0294f4315
Gerrit-Change-Number: 38810
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 19 Nov 2024 13:22:08 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: pespin.
osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38809?usp=email )
Change subject: ipaccess: Reduce scope of line local variable
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38809?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I9789cbce74f71505e9b7be1445a0a97007ee37da
Gerrit-Change-Number: 38809
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 19 Nov 2024 13:21:34 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes