Change in libosmo-sccp[master]: sua: per-ssn DUNA/DAVA notification

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Thu Feb 11 18:04:10 UTC 2021


laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/22833 )

Change subject: sua: per-ssn DUNA/DAVA notification
......................................................................


Patch Set 1: Code-Review+2

(1 comment)

https://gerrit.osmocom.org/c/libosmo-sccp/+/22833/1/src/xua_snm.c 
File src/xua_snm.c:

https://gerrit.osmocom.org/c/libosmo-sccp/+/22833/1/src/xua_snm.c@313 
PS1, Line 313: 		const uint32_t *aff_pc = (const uint32_t *)ie_aff_pc->dat;
> Same here.
it's not any worse than xua_msg_part_get_u32() which we use all the time in this codebase.  So We always had the assumption that those IEs are aligned at 32bit boundaries.  For sure inside XUA everything is 32bit aligned, as the tag and length values are 16bit themselves (header == 32bit) and they are always padded to 32bit.

The message header also is 32bit.

Howver, the interesting questin is whether we can make the assumption that the start of the message is aligned with the natural alignment boundary of the underlying architecture.

As the M3UA header starts at the beginning of what we get returned from the read/recv/recvmsg/... call on the socket, it's actually up to us what kind of buffer we pass.

As long as msgb_alloc_headroom() will result in msgb->data being 32bit aligned, we are good.  As 'struct msgb' is not __attribute__((packed), I would expect that the unsignd char _data[0] is properly aligned.

So in the end, I think we're good.

One could consider adding a related check or even an assert into the library, but that's out of the scope of this change.



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

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Ie9a45b905bc17e7b695e15fe12ba4bbadcd032bf
Gerrit-Change-Number: 22833
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Comment-Date: Thu, 11 Feb 2021 18:04:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210211/ab72afee/attachment.htm>


More information about the gerrit-log mailing list