netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Antonio Quartulli <antonio@meshcoding.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org,
	Simon Wunderlich <sw@simonwunderlich.de>,
	Marek Lindner <mareklindner@neomailbox.ch>,
	Antonio Quartulli <antonio@meshcoding.com>
Subject: [PATCH 2/6] batman-adv: fix alignment for batadv_coded_packet
Date: Thu, 19 Dec 2013 01:15:28 +0100	[thread overview]
Message-ID: <1387412132-889-3-git-send-email-antonio@meshcoding.com> (raw)
In-Reply-To: <1387412132-889-1-git-send-email-antonio@meshcoding.com>

From: Simon Wunderlich <sw@simonwunderlich.de>

The compiler may decide to pad the structure, and then it does not
have the expected size of 46 byte. Fix this by moving it in the
pragma pack(2) part of the code.

Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
---
 net/batman-adv/packet.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/batman-adv/packet.h b/net/batman-adv/packet.h
index 207459b..10597a6 100644
--- a/net/batman-adv/packet.h
+++ b/net/batman-adv/packet.h
@@ -315,8 +315,6 @@ struct batadv_bcast_packet {
 	 */
 };
 
-#pragma pack()
-
 /**
  * struct batadv_coded_packet - network coded packet
  * @header: common batman packet header and ttl of first included packet
@@ -349,6 +347,8 @@ struct batadv_coded_packet {
 	__be16   coded_len;
 };
 
+#pragma pack()
+
 /**
  * struct batadv_unicast_tvlv - generic unicast packet with tvlv payload
  * @header: common batman packet header
-- 
1.8.5.1

  parent reply	other threads:[~2013-12-19  0:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-19  0:15 pull request [net]: batman-adv 2013-12-19 Antonio Quartulli
2013-12-19  0:15 ` [PATCH 1/6] batman-adv: free nf_bridge member on locally delivered skb Antonio Quartulli
2013-12-22 23:50   ` David Miller
2013-12-23  0:11     ` Antonio Quartulli
2013-12-23  0:16       ` David Miller
     [not found]         ` <20131222.191622.118900475665948342.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2013-12-23  0:19           ` Antonio Quartulli
2013-12-19  0:15 ` Antonio Quartulli [this message]
2013-12-19  0:15 ` [PATCH 3/6] batman-adv: fix header alignment by unrolling batadv_header Antonio Quartulli
2013-12-19  0:15 ` [PATCH 4/6] batman-adv: fix size of batadv_icmp_header Antonio Quartulli
2013-12-19  0:15 ` [PATCH 5/6] batman-adv: fix size of batadv_bla_claim_dst Antonio Quartulli
2013-12-19  0:15 ` [PATCH 6/6] batman-adv: fix alignment for batadv_tvlv_tt_change Antonio Quartulli

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=1387412132-889-3-git-send-email-antonio@meshcoding.com \
    --to=antonio@meshcoding.com \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=davem@davemloft.net \
    --cc=mareklindner@neomailbox.ch \
    --cc=netdev@vger.kernel.org \
    --cc=sw@simonwunderlich.de \
    /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;
as well as URLs for NNTP newsgroup(s).