From patchwork Mon Dec 2 19:38:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Wunderlich X-Patchwork-Id: 3665 Return-Path: Received: from mail.mail.packetmixer.de (packetmixer.de [79.140.42.25]) by open-mesh.org (Postfix) with ESMTPS id BD917601A66 for ; Mon, 2 Dec 2013 20:39:02 +0100 (CET) Received: from kero.packetmixer.de (drsd-4db30d52.pool.mediaWays.net [77.179.13.82]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.mail.packetmixer.de (Postfix) with ESMTPSA id 990D87107C; Mon, 2 Dec 2013 19:39:21 +0000 (UTC) From: Simon Wunderlich To: b.a.t.m.a.n@lists.open-mesh.org Date: Mon, 2 Dec 2013 20:38:30 +0100 Message-Id: <1386013113-25471-1-git-send-email-sw@simonwunderlich.de> X-Mailer: git-send-email 1.7.10.4 Subject: [B.A.T.M.A.N.] [PATCH-next 1/4] batman-adv: fix alignment for batadv_coded_packet X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 19:39:02 -0000 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 --- packet.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packet.h b/packet.h index 207459b..10597a6 100644 --- a/packet.h +++ b/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