Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2511836imm; Mon, 28 May 2018 09:28:23 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpcHzMGmoDk6mRzD7fnFwJyj4b0n/Ge2poikJD6J4Y2TtV0ADmxJZ9kF4aZcT6pnC91vqeb X-Received: by 2002:a62:1083:: with SMTP id 3-v6mr14117105pfq.229.1527524903621; Mon, 28 May 2018 09:28:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527524903; cv=none; d=google.com; s=arc-20160816; b=FOiaFQOxHfXaNqoBo782ZnxwohNlsiaYgsrts0dunvm9fWYfHbhM58AQjwoAxCwO2l 4KujZOLnF+W57e+pDZVNBktknC7Rc7CmYodqK6pvzkrq2LC2mbgzjxh6Ts0YzQ3koiLs cbB0Uzc1zqV6btH8tx5NTu5+1tsFDyP+2HW9F/GUSr8EdW3pyJPffo+Z51RZ4fzpL7Ug 3rnOF9Q7JR+tDo35A355VwVSER0y+8eo0iI8v6rS2W0qLQ22ACIGw5cQuwasfiKEn9Ya EHX8f2dOI9tkuKgV2FoijAa+4AptZnP3EyKxEqxp3tW6Zu6lRo+/30+ys23JaCNlcihp eOcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=kN8nB6GEpGSpijmKCEUIejzoLnsmUsvjRz+oHKHs68g=; b=wI3eIKJCkuffoyrsbU/Dw6dJGWYv5uJm8EFplTaVrNADT3ncpbXJ2FnNfXV+w5bfJY EjQAbBGqLI9WQNmaqNLhKigErFE0EnFBsT3BVjlOHfCXfFy9nqKC+wwUCWvgP8ripGAh FXGeNrM8b23B6WPJh/bTzh8L4a75UOUMkwZSrPix8R4sFLNAyKqGIcvTpjOOEhVBJoeq ZI/3GYWh5mjUXoJSdFuMIHYJgMW1AlftyAzIyWEQ4CCImcU9gnWUiW+bvv/VxMNTX9GV hrkPZ6yY5xjfJw79PZxMAgF6hE9aQSzhcq8AwqvZeC24QYy/Jaeh6IzJtgmfU4KjwbuD nXkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mFSlPkK/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u12-v6si9686400plz.392.2018.05.28.09.28.08; Mon, 28 May 2018 09:28:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mFSlPkK/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S940061AbeE1Q1h (ORCPT + 99 others); Mon, 28 May 2018 12:27:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:58428 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936428AbeE1KKP (ORCPT ); Mon, 28 May 2018 06:10:15 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9CD5E2086D; Mon, 28 May 2018 10:10:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527502215; bh=nYGcfcHVO/fTrXt4hWsFuUvpVTS3WUxKpgblbzEXgK4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mFSlPkK/1sHoy4wZY6BCS+VCnVVrg3Ab8BSy8fu90QwGuyiucwJzRAFI+5XVfucKs YPggudRESd2kAs/UvT4b+zVKb0A/c8WxjXdLKN/XTforooKZyyhDxHPn0Jorf1jDrR Jwh61PzlfU8by+TMNV3Vlhv60itme/V2zSrDqK60= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Maximilian Wilhelm , Matthias Schiffer , Sven Eckelmann , Simon Wunderlich , Sasha Levin Subject: [PATCH 3.18 075/185] batman-adv: invalidate checksum on fragment reassembly Date: Mon, 28 May 2018 12:01:56 +0200 Message-Id: <20180528100057.135006401@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100050.700971285@linuxfoundation.org> References: <20180528100050.700971285@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Matthias Schiffer [ Upstream commit 3bf2a09da956b43ecfaa630a2ef9a477f991a46a ] A more sophisticated implementation could try to combine fragment checksums when all fragments have CHECKSUM_COMPLETE and are split at even offsets. For now, we just set ip_summed to CHECKSUM_NONE to avoid "hw csum failure" warnings in the kernel log when fragmented frames are received. In consequence, skb_pull_rcsum() can be replaced with skb_pull(). Note that in usual setups, packets don't reach batman-adv with CHECKSUM_COMPLETE (I assume NICs bail out of checksumming when they see batadv's ethtype?), which is why the log messages do not occur on every system using batman-adv. I could reproduce this issue by stacking batman-adv on top of a VXLAN interface. Fixes: 610bfc6bc99b ("batman-adv: Receive fragmented packets and merge") Tested-by: Maximilian Wilhelm Signed-off-by: Matthias Schiffer Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- net/batman-adv/fragmentation.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/net/batman-adv/fragmentation.c +++ b/net/batman-adv/fragmentation.c @@ -260,7 +260,8 @@ batadv_frag_merge_packets(struct hlist_h /* Move the existing MAC header to just before the payload. (Override * the fragment header.) */ - skb_pull_rcsum(skb_out, hdr_size); + skb_pull(skb_out, hdr_size); + skb_out->ip_summed = CHECKSUM_NONE; memmove(skb_out->data - ETH_HLEN, skb_mac_header(skb_out), ETH_HLEN); skb_set_mac_header(skb_out, -ETH_HLEN); skb_reset_network_header(skb_out);