mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-04-09 08:21:08 -04:00
module-avb: fix legacy AECP handlers reading payload at wrong offset
handle_acquire_entity_avb_legacy() and handle_lock_entity_avb_legacy() incorrectly treated the full ethernet frame pointer as the AEM packet pointer, causing p->payload to read descriptor_type and descriptor_id from the wrong offset. Fix by properly skipping the ethernet header, matching the pattern used by all other AEM command handlers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3f386ecd34
commit
4e62826e01
1 changed files with 4 additions and 2 deletions
|
|
@ -27,7 +27,8 @@ static int handle_acquire_entity_avb_legacy(struct aecp *aecp, int64_t now,
|
|||
const void *m, int len)
|
||||
{
|
||||
struct server *server = aecp->server;
|
||||
const struct avb_packet_aecp_aem *p = m;
|
||||
const struct avb_ethernet_header *h = m;
|
||||
const struct avb_packet_aecp_aem *p = SPA_PTROFF(h, sizeof(*h), void);
|
||||
const struct avb_packet_aecp_aem_acquire *ae;
|
||||
const struct descriptor *desc;
|
||||
uint16_t desc_type, desc_id;
|
||||
|
|
@ -53,7 +54,8 @@ static int handle_lock_entity_avb_legacy(struct aecp *aecp, int64_t now,
|
|||
const void *m, int len)
|
||||
{
|
||||
struct server *server = aecp->server;
|
||||
const struct avb_packet_aecp_aem *p = m;
|
||||
const struct avb_ethernet_header *h = m;
|
||||
const struct avb_packet_aecp_aem *p = SPA_PTROFF(h, sizeof(*h), void);
|
||||
const struct avb_packet_aecp_aem_acquire *ae;
|
||||
const struct descriptor *desc;
|
||||
uint16_t desc_type, desc_id;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue