From patchwork Mon Nov 21 21:37:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Wunderlich X-Patchwork-Id: 1371 Return-Path: Received: from nick.hrz.tu-chemnitz.de (nick.hrz.tu-chemnitz.de [134.109.228.11]) by open-mesh.org (Postfix) with ESMTPS id B1ABE6006F6 for ; Mon, 21 Nov 2011 22:38:03 +0100 (CET) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key) header.i=@tu-chemnitz.de; dkim-adsp=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tu-chemnitz.de; s=dkim2010; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=UYVVc2avw7Dd1tsVtQIv9qQ/E2Qk4KOVPgn52by3rlQ=; b=gy+IlKi8LmFvgWogNpqVKr1dqNqS+SwBG5Jh8/bAVmXMKRQnJz90X1fbCPmlRewho4tLrrurtJvoq3MFVam5obn5XcjX4HeSE60v6dmKvr01Y4pVmqYlge2TspQtPUEMI4ItxeFM5HE8HvWR37GdXgTk4rour8wFnKXwy0HknoU=; Received: from p57aa11cf.dip0.t-ipconnect.de ([87.170.17.207] helo=pandem0nium) by nick.hrz.tu-chemnitz.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1RSbYx-00074g-08; Mon, 21 Nov 2011 22:38:03 +0100 Received: from dotslash by pandem0nium with local (Exim 4.72) (envelope-from ) id 1RSbYw-00066k-1m; Mon, 21 Nov 2011 22:38:02 +0100 From: Simon Wunderlich To: b.a.t.m.a.n@lists.open-mesh.org Date: Mon, 21 Nov 2011 22:37:59 +0100 Message-Id: <1321911479-23444-1-git-send-email-siwu@hrz.tu-chemnitz.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1320752062-21776-1-git-send-email-ordex@autistici.org> References: <1320752062-21776-1-git-send-email-ordex@autistici.org> X-Spam-Score: -1.0 (-) X-Spam-Report: --- Textanalyse SpamAssassin 3.3.1 (-1.0 Punkte) Fragen an/questions to: Postmaster TU Chemnitz * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP --- Ende Textanalyse X-Scan-Signature: bd263acef5c49e825d8b5debdb1b160d Cc: Simon Wunderlich Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: fix two issues in DAT X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.13 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, 21 Nov 2011 21:38:03 -0000 * use CONFIG_BATMAN_ADV_DAT instead of CONFIG_BATMAN_ADV_BAT * use skb_reset_mac_header() to avoid crashes because of null pointers within arp_get_type() I've reviewed the DAT patchset, all of the previous comments have been integrated well. It also runs well within my VMs (after applying this patch). Please integrate this patch into the previous one and resend it. You may add my Reviewed-By tag. Signed-off-by: Simon Wunderlich --- distributed-arp-table.h | 2 +- soft-interface.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/distributed-arp-table.h b/distributed-arp-table.h index 496b7f3..bd32c89 100644 --- a/distributed-arp-table.h +++ b/distributed-arp-table.h @@ -28,7 +28,7 @@ #define ARP_HW_DST(skb) (ARP_HW_SRC(skb) + ETH_ALEN + 4) #define ARP_IP_DST(skb) (*(uint32_t *)(ARP_HW_SRC(skb) + ETH_ALEN * 2 + 4)) -#ifdef CONFIG_BATMAN_ADV_BAT +#ifdef CONFIG_BATMAN_ADV_DAT uint16_t arp_get_type(struct bat_priv *bat_priv, struct sk_buff *skb); bool arp_snoop_outgoing_request(struct bat_priv *bat_priv, diff --git a/soft-interface.c b/soft-interface.c index 9107b22..786bc71 100644 --- a/soft-interface.c +++ b/soft-interface.c @@ -592,6 +592,8 @@ static int interface_tx(struct sk_buff *skb, struct net_device *soft_iface) goto end; } + skb_reset_mac_header(skb); + /** * if we have a another chosen mesh exit node in range * it will transport the packets to the mesh