Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2511053imm; Thu, 7 Jun 2018 11:54:01 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLPnyo8lJMMEiBjLFkPH62e1tO0y6P84MYxyYFyjkQZGwY5yYGZoyKjNnJC6fuNKImq/+1R X-Received: by 2002:a63:5f8b:: with SMTP id t133-v6mr1792332pgb.68.1528397641802; Thu, 07 Jun 2018 11:54:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528397641; cv=none; d=google.com; s=arc-20160816; b=dPQEwgdyKq3a7PFCmJDxmGzUaktzGDGK3DIQqO6xGznASs+KPsqBUdPbEVKmnl7ucH B5JAFWgMZ1V5GXKPmbjwKwE1asGUSgzEAqidTYCOjGZXD/bYkc6Dw82kBU+IsF31/nJc TEtkIjxnU0y2OfhOGQH2qZ5qYB8XXJINs5ruqTf7Zf+DB38fn5Payee6AN6DJ3EXSdWO lez7hhpwD//VY53B77JPWRQrG271wSMQ1pX2/o0wxsCwLInLMuTR8khVRMyNEh5QFg91 EiRMzxzC7kp5DkQVBHxxj89rlxf9l1ZADjU4rSEY+wUknaYCm+IKd3DX6rdOKklcPKbw qkJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=dQG2Jojk9/r85BAkGqLS2Rgvg2aI92MEMfzf1ypPYcc=; b=u4si59caT3Rhis/LAkngLFv7Ps1LiyG8rFqjMTYd4UXUvkl5eAphMzCYLJZoao5KNC L5iWlHy9GFq0NgbCR8KFl2O5r52rBuc6NaXvmIfmoz4Ytx9m8ae2wKQ8nLTFd9kivoAk Dm2VnnXlp3KtSjV4HgoYtOWojx0PJRWKh/Y6Ivy2Bg7d2pXzuGYYl2OOsWJsOggB8qcz bMMbArNrurNunbWPyIZpLLUbMysOgFU6pDOpQrb5UCo+1zhmA4dPYABrErjtBRHqgxan ld+Cj9TE6TSYzeBpeAHo6jg37drwXHiywGgoH9/wt6OJCsc1Uq0+GgnuwdykA10XSSu+ hlCw== ARC-Authentication-Results: i=1; mx.google.com; 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 99-v6si54068366plc.362.2018.06.07.11.53.47; Thu, 07 Jun 2018 11:54:01 -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; 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 S935212AbeFGPe3 (ORCPT + 99 others); Thu, 7 Jun 2018 11:34:29 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:40651 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934316AbeFGOmw (ORCPT ); Thu, 7 Jun 2018 10:42:52 -0400 Received: from [148.252.241.226] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1fQvbX-0005Zo-D8; Thu, 07 Jun 2018 15:09:31 +0100 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1fQvb9-000383-O5; Thu, 07 Jun 2018 15:09:07 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Sven Eckelmann" , "Simon Wunderlich" , "Maximilian Wilhelm" , "Matthias Schiffer" Date: Thu, 07 Jun 2018 15:05:21 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 283/410] batman-adv: invalidate checksum on fragment reassembly In-Reply-To: X-SA-Exim-Connect-IP: 148.252.241.226 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.57-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Matthias Schiffer commit 3bf2a09da956b43ecfaa630a2ef9a477f991a46a upstream. 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: Ben Hutchings --- 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 @@ -262,7 +262,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);