Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2341626imm; Mon, 28 May 2018 06:23:07 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo0Atyv9RNYTFdfm2Dxv2h/H8YlhQcBn1e93lHinvBhhL5LjvWx4ztGaZ6X8NPl7ac6UCB9 X-Received: by 2002:a65:5b4d:: with SMTP id y13-v6mr10636814pgr.152.1527513787314; Mon, 28 May 2018 06:23:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527513787; cv=none; d=google.com; s=arc-20160816; b=GlDq9N2DLPh7K1mMtFWXkmmy7f2yFvxTBWls5sbe9g78JpeVo2QeyHyvAcZGoSPwOa kQUHsmMj2RiJ/8gTusjtQwrvzY/9OAtvlJ6hNgDD7reO3YawsX6ljYKeBByoeZgpo0iz BDp3jScTiD2r+IYrVd5NXJ9Ex/K4eGvq8CqtBGU0iUag+lWNfwcya6VHHWLY0u2AthUL srPh9xpUZAn+2A1+0o5UPNlRATkbGNSnAnuHF6Crs0h/CitTP2xy38/KWumXM3k+Xr9I 5mhhPDo9Z0PM56YrDChXx89UjUz1oeXhFAgt/pQXO7avh87dH1Tpdcqk1QDv+E1ha5je V2+Q== 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=6uGL1oWazXs6CnbsAnhaK02C1lPlu23YyjIDYoa17hg=; b=NUvz9OxZXH5JcHb2kyYcj2/xRDT+X3i19FjJNHyVaxAa1VZVqASeK+f+OKEjgLPxlC Skiuu+CXj4dmpTcwzYf4HKPWmYONrI9P+LCmDlXsTl3ATvJWUzP00axJnhS+qCa9ORLJ vmku1lC7b7kHyr5NgADNniV1oLMvx1Rqcg21tZMBJVYAzzepyarV8t85TvB3SoblF6/V oJxU0VUN7K+Ypx0Rq2zDlNyDfHGedGdW+5ChOpB4j5dyPgFJhs2Fb1xntkPEXkoN27Ts s54t0UJgM1O/UwEvtKR/y9DdwMY7mOB00QT1ERjIDh1Lx9WLoF2oepoRTc6BhiMFHVhJ YB1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CAn6STnz; 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 u4-v6si7954917plj.43.2018.05.28.06.22.52; Mon, 28 May 2018 06:23:07 -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=CAn6STnz; 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 S1165363AbeE1NWN (ORCPT + 99 others); Mon, 28 May 2018 09:22:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:38794 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163327AbeE1KtA (ORCPT ); Mon, 28 May 2018 06:49:00 -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 7EDB620844; Mon, 28 May 2018 10:48:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527504540; bh=/HOuAR6QTU4lMSX5hWcdKlss34qk1gQY0cOvHFFN4F4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CAn6STnzDxccOgOALyxAHoXR1AaikB1b0qtFylp2V6xcBnxHJrRyjWjZrFvNgzoQL Z0ZtaY1U6EFZnGod4EWaBoBEg1Vh2OX31c9HlYEM17QjZ5UYwo1dxFLwt+9+HIt6Tm HQj/hJHf2YvLPfUSThF+WOYsS6c9+e86U2JKuGAU= 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 4.14 143/496] batman-adv: invalidate checksum on fragment reassembly Date: Mon, 28 May 2018 11:58:48 +0200 Message-Id: <20180528100325.942750241@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100319.498712256@linuxfoundation.org> References: <20180528100319.498712256@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 4.14-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 @@ -287,7 +287,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);