public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Marek Lindner <lindner_marek@yahoo.de>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [RFC-alt2/2 2/4] batman-adv: Use packing of 2 for all headers before an ethernet header
Date: Wed, 7 Nov 2012 23:07:12 +0800	[thread overview]
Message-ID: <201211072307.13017.lindner_marek@yahoo.de> (raw)
In-Reply-To: <1352147127-2932-2-git-send-email-sven@narfation.org>

On Tuesday, November 06, 2012 04:25:27 Sven Eckelmann wrote:
> All packet headers in front of an ethernet header have to be completely
> divisible by 2 but not by 4 to make the payload after the ethernet header
> again 4 bytes boundary aligned.
> 
> A packing of 2 is necessary to avoid extra padding at the end of the struct
> caused by a structure member which is larger than two bytes. Otherwise the
> structure would not fulfill the previously mentioned rule to avoid the
> misalignment of the payload after the ethernet header. It may also lead to
> leakage of information when the padding it not initialized before sending.
> 
> Signed-off-by: Sven Eckelmann <sven@narfation.org>
> ---
> Because we had protests against the approach of splitting the 32 bit
> seqno... here is a different approach. Now get your dices to find out what
> David may will like.
> 
>  packet.h |   16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)

Applied in revision 52f79c4.

Thanks,
Marek

  reply	other threads:[~2012-11-07 15:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-04 14:19 [B.A.T.M.A.N.] [RFC 1/4] batman-adv: Align skb for better alignment Sven Eckelmann
2012-11-04 14:19 ` [B.A.T.M.A.N.] [RFC 2/4] batman-adv: Mark correctly aligned headers not as __packed Sven Eckelmann
2012-11-05 20:25   ` [B.A.T.M.A.N.] [RFC-alt1/2 " Sven Eckelmann
2012-11-05 20:25     ` [B.A.T.M.A.N.] [RFC-alt2/2 2/4] batman-adv: Use packing of 2 for all headers before an ethernet header Sven Eckelmann
2012-11-07 15:07       ` Marek Lindner [this message]
2012-11-07 14:56     ` [B.A.T.M.A.N.] [RFC-alt1/2 2/4] batman-adv: Mark correctly aligned headers not as __packed Marek Lindner
2012-11-04 14:19 ` [B.A.T.M.A.N.] [RFC 3/4] batman-adv: Fix alignment and padding of packets Sven Eckelmann
2012-11-05  9:15   ` [B.A.T.M.A.N.] [RFC-alt 3/4] batman-adv: Fix alignment for payload after batadv_unicast_4addr_packet Sven Eckelmann
2012-11-07 15:16     ` Marek Lindner
2012-11-04 14:19 ` [B.A.T.M.A.N.] [RFC 4/4] batman-adv: Use compare_ether_addr instead of private function Sven Eckelmann
2012-11-04 16:11 ` [B.A.T.M.A.N.] [RFCv2 1/4] batman-adv: Reserve extra bytes in skb for better alignment Sven Eckelmann
2012-11-07 14:44   ` Marek Lindner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201211072307.13017.lindner_marek@yahoo.de \
    --to=lindner_marek@yahoo.de \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox