From patchwork Sat May 25 22:15:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Lindner X-Patchwork-Id: 3073 Return-Path: Received: from nm19-vm2.bullet.mail.sg3.yahoo.com (nm19-vm2.bullet.mail.sg3.yahoo.com [106.10.149.113]) by open-mesh.org (Postfix) with ESMTPS id 044B5602180 for ; Sun, 26 May 2013 00:15:37 +0200 (CEST) Received: from [106.10.166.120] by nm19.bullet.mail.sg3.yahoo.com with NNFMP; 25 May 2013 22:15:34 -0000 Received: from [106.10.167.163] by tm9.bullet.mail.sg3.yahoo.com with NNFMP; 25 May 2013 22:15:34 -0000 Received: from [127.0.0.1] by smtp136.mail.sg3.yahoo.com with NNFMP; 25 May 2013 22:15:34 -0000 X-Yahoo-Newman-Id: 53317.76720.bm@smtp136.mail.sg3.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: WsCuJsEVM1mHCrbU6bXwLom2NcWUmUIhOtpIzxpdYNz67PC pYqvVFnEHHlk.vAY3htHKhOyApcCBExlZeW053ae93Ogt7rMnoNRvRP560kU ppLNg9Eu9vf8PVcXC1rWs6op0BMlY2T5VS5Gr_7NqceMYlNE6yIxf1Rpql8k PDiihIwvFHj_8.tP.lS9DK5YW4OC3jc2G0zWb1jisKY1hPUxNLKwvk34Uv5C seWSwMmZy34IOZgx_uMjgT7RuuiqpZRe61n20HXNvbo5TeTJ8mandDYtN82y 15hCllJ5F7NxPfIgchoHjKCkgi778_CIn.eG6ZV.lRlPl0xGA5sMwcEfTroJ tCEhmbw.3pmXk8DSx30fgjDxT.YXvrNBstUCGps4U7e16Dwe0.EwmP34VcuE Q.FmKTd1UW6f30leVpZM7xhm5Rwn1spe_0yMTbJpDZ3uP86.4lHs7xT.b X-Yahoo-SMTP: tW.h3tiswBBMXO2coYcbPigGD5Lt6zY_.Zc- X-Rocket-Received: from localhost (lindner_marek@1.36.73.90 with ) by smtp136.mail.sg3.yahoo.com with SMTP; 25 May 2013 15:15:34 -0700 PDT From: Marek Lindner To: b.a.t.m.a.n@lists.open-mesh.org Date: Sun, 26 May 2013 06:15:21 +0800 Message-Id: <1369520121-5998-2-git-send-email-lindner_marek@yahoo.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1369520121-5998-1-git-send-email-lindner_marek@yahoo.de> References: <1369520121-5998-1-git-send-email-lindner_marek@yahoo.de> Cc: Marek Lindner Subject: [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: properly align roaming tvlv container 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: Sat, 25 May 2013 22:15:39 -0000 4bytes long members must start at an address multiple of 4 in order to avoid unaligned memory access. Introduced by 3de4e64df0f1326db7cc0ef25f5af8522850252d "batman-adv: tvlv - convert roaming adv packet to use tvlv unicast packets" Signed-off-by: Marek Lindner --- packet.h | 4 +++- translation-table.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packet.h b/packet.h index 840d73d..22494f7 100644 --- a/packet.h +++ b/packet.h @@ -389,9 +389,11 @@ struct batadv_tvlv_tt_change { /** * struct batadv_tvlv_roam_adv - roaming advertisement * @client: mac address of roaming client + * @reserved: field reserved for future use */ struct batadv_tvlv_roam_adv { - uint8_t client[ETH_ALEN]; + uint8_t client[ETH_ALEN]; + uint16_t reserved; }; #endif /* _NET_BATMAN_ADV_PACKET_H_ */ diff --git a/translation-table.c b/translation-table.c index 44e7789..d53c212 100644 --- a/translation-table.c +++ b/translation-table.c @@ -2208,6 +2208,7 @@ static void batadv_send_roam_adv(struct batadv_priv *bat_priv, uint8_t *client, batadv_inc_counter(bat_priv, BATADV_CNT_TT_ROAM_ADV_TX); memcpy(tvlv_roam.client, client, sizeof(tvlv_roam.client)); + tvlv_roam.reserved = 0; batadv_tvlv_unicast_send(bat_priv, primary_if->net_dev->dev_addr, orig_node->orig, BATADV_TVLV_ROAM, 1,