[PATCH] alfred: mark alfred_change_bat_iface_v0 as packed

Sven Eckelmann <[email protected]> Tue, 28 Jul 2026 19:06:43 +0200
Newsgroups org.open-mesh.lists.batman
Message-ID <[email protected]>
struct alfred_change_bat_iface_v0 is part of the unix socket protocol and
is the only protocol structure in packet.h not marked as __packed. The
current members happen to not require any padding, so the layout is
unaffected for common ABIs. But to be safe, also mark this struct as
packed.

Signed-off-by: Sven Eckelmann <[email protected]>
---
 packet.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packet.h b/packet.h
index c0723b8..a7df81e 100644
--- a/packet.h
+++ b/packet.h
@@ -164,7 +164,7 @@ struct alfred_change_interface_v0 {
 struct alfred_change_bat_iface_v0 {
 	struct alfred_tlv header;
 	char bat_iface[IFNAMSIZ];
-};
+} __packed;
 
 /**
  * enum alfred_packet_type - Types of packet stored in the main alfred_tlv

---
base-commit: 462a0cf40615f62e0912c36d72a75accbb26f5ee
change-id: 20260728-bugfixes-packed-4964bd7ed951

Best regards,
--  
Sven Eckelmann <[email protected]>