Repository : ssh://git@open-mesh.org/batctl
On branch : next
commit aa7d948369df87e0ba8767458959af84354d73ec Author: Sven Eckelmann sven@narfation.org Date: Mon Nov 5 10:15:24 2012 +0100
batctl: Fix alignment for payload after batadv_unicast_4addr_packet
batadv_unicast_4addr_packet created an odd aligned ethernet header and a not 4 bytes boundary aligned IP header. Adding an extra reserved bytes avoids this problem.
This problem was introduced in 78fc6bbe0aca868b65b92723b1e259e7ef7b35c0 ("batman-adv: add UNICAST_4ADDR packet type")
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
aa7d948369df87e0ba8767458959af84354d73ec packet.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/packet.h b/packet.h index cef1b3f..1c5454d 100644 --- a/packet.h +++ b/packet.h @@ -204,7 +204,11 @@ struct batadv_unicast_4addr_packet { struct batadv_unicast_packet u; uint8_t src[ETH_ALEN]; uint8_t subtype; -} __packed; + uint8_t reserved; + /* "4 bytes boundary + 2 bytes" long to make the payload after the + * following ethernet header again 4 bytes boundary aligned + */ +};
struct batadv_unicast_frag_packet { struct batadv_header header;