The following commit has been merged in the master branch: commit 4f4c471678077617bb72098cd13140308baad25d Author: Sven Eckelmann sven@narfation.org Date: Sun Jun 12 11:10:38 2011 +0200
batctl: Force packed placment of tt_change
Every data structure which is used to send data over the wire must be fixed in layout to prevent incompatibility between different architectures. Those incompatibilities could be generated by extra bytes between members and at the end of the structure.
tt_changes_fill_buffer and tt_len use that structure to copy the correct amount of data from an internal structure to the actual packet. We must ensure that this packet buffer only has data which can be interpreted by any architecture.
Signed-off-by: Sven Eckelmann sven@narfation.org
diff --git a/packet.h b/packet.h index 0c3e44d..ef7476f 100644 --- a/packet.h +++ b/packet.h @@ -202,6 +202,6 @@ struct roam_adv_packet { struct tt_change { uint8_t flags; uint8_t addr[ETH_ALEN]; -}; +} __packed;
#endif /* _NET_BATMAN_ADV_PACKET_H_ */