Thread (14 messages) flat view 14 messages, 3 authors, 2012-11-07

Re: [B.A.T.M.A.N.] [PATCH 03/12] batman-adv: add UNICAST_4ADDR packet type

From: Sven Eckelmann <sven@narfation.org>
Date: 2012-11-07 19:17:11
Also in: batman

On Wednesday 07 November 2012 20:11:33 Antonio Quartulli wrote:
+/**
+ * struct batadv_unicast_4addr_packet - extended unicast packet
+ * @u: common unicast packet header
+ * @src: address of the source
+ * @subtype: packet subtype
+ */
+struct batadv_unicast_4addr_packet {
+       struct batadv_unicast_packet u;
+       uint8_t src[ETH_ALEN];
+       uint8_t subtype;
+       uint8_t reserved;
+       /* "4 bytes boundary + 2 bytes" long to make the payload after the
+        * following ethernet header again 4 bytes boundary aligned
+        */
+};
This doesn't work as you think. Now you have 2 extra padding bytes at the end 
of the batadv_unicast_4addr_packet and therefore make the payload (IPv4 
header..) after the following ethernet header again wrongly aligned.

Kind regards,
	Sven

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help