Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2341556imm; Mon, 28 May 2018 06:23:00 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJxC4VQYkscovQxjpQ64Z5FSaY1br45XbxwA8DbAPqthpVg5TseUXZWDAsp70kC+PAQ4IPU X-Received: by 2002:a62:59d0:: with SMTP id k77-v6mr9367206pfj.4.1527513780814; Mon, 28 May 2018 06:23:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527513780; cv=none; d=google.com; s=arc-20160816; b=rTR/lekr+P9AIS4XdyaLYiVoUpYUJwb0tPmP9x8lJObp5oWqGgR0Jdejqejva31EBO RrocNQFhvM79IROarFfQ7DhEulFmAyQDUjyzvzNZCGk2kp2slWThuQ2muZnk9JHmh8Py 7BTlL1kFke1GYxNSplvyQsiD9dPrcvnv22HuXS/YvbmXXAyHcttfSEM+PWFxXNxn6Djv UMbmUfYBhXgAKfiyP0awgTKia76Q8kchKff3+nZ5338FuIkJoFFC2+Nw9Ak0c14teeTP Lu5pPUla8EJ/9RUTYNH3csZKv6SjZYqys8oOw5wFb1keqCUPWAeuoKen9qmHa/MDT8mi lZlA== 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=wUz6nDt5s287cow1s0DC/+d35RrjXyUTkNAyVNUqP+A=; b=U8GEbhhQ40VYDeILoFs2i3eAAzEiDCa1nlDvemlA4xGG0qyk8Cw84vN6Wc/OZGOpVP vF59BwPHJEH4PMBL7zV+4OCaNTNi9DK3LBGWYEPBFbMnhhDZSpDITZtdN09ZS92nTQGe v/IXwV9O93USigimsLDEUqmG1fYJikgzky9KILC6o6txz6dFEzu7pnYC5UmETVC0x5aE J0PoxeCnIWy87bwOXkWl9wULzjWuQqtJ/rK3lZyX1lfuIcp+yoDJlnuekR6fUyIGIdlN 2ieC5km9ow+jE36FDFyj1XtQKTK9zM98NojZrJCpNKTdMM4vTqV97ZkY86QquIMnXD84 tiNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=W/Wz2d18; 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 b5-v6si30766823ple.417.2018.05.28.06.22.46; Mon, 28 May 2018 06:23:00 -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=W/Wz2d18; 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 S1163448AbeE1KtB (ORCPT + 99 others); Mon, 28 May 2018 06:49:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:38746 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1033757AbeE1Ks5 (ORCPT ); Mon, 28 May 2018 06:48:57 -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 CC08F20660; Mon, 28 May 2018 10:48:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527504537; bh=TpnM5I0HBKbGgOFYTHN3pHcaUQ8GYH44UI1GS65fWWw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W/Wz2d18LYOhSm4Cxbtlg5krFv3zYZUCgJqgcmA/EFFtR0qi6joxXQ0n9UjvfGi5u 0kBpgEw4Vl6cnlISePC/OUsQXdHisZCKed0e42odY95HHSBXuqcF0exYzoqkUTE77O gnQmN1HnZwFN0hAZQ9mxv9fUPKDjtmRVhc96+FbE= 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 142/496] batman-adv: fix packet checksum in receive path Date: Mon, 28 May 2018 11:58:47 +0200 Message-Id: <20180528100325.901109684@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 abd6360591d3f8259f41c34e31ac4826dfe621b8 ] eth_type_trans() internally calls skb_pull(), which does not adjust the skb checksum; skb_postpull_rcsum() is necessary to avoid log spam of the form "bat0: hw csum failure" when packets with CHECKSUM_COMPLETE are received. 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: c6c8fea29769 ("net: Add batman-adv meshing protocol") 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/soft-interface.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c @@ -451,13 +451,7 @@ void batadv_interface_rx(struct net_devi /* skb->dev & skb->pkt_type are set here */ skb->protocol = eth_type_trans(skb, soft_iface); - - /* should not be necessary anymore as we use skb_pull_rcsum() - * TODO: please verify this and remove this TODO - * -- Dec 21st 2009, Simon Wunderlich - */ - - /* skb->ip_summed = CHECKSUM_UNNECESSARY; */ + skb_postpull_rcsum(skb, eth_hdr(skb), ETH_HLEN); batadv_inc_counter(bat_priv, BATADV_CNT_RX); batadv_add_counter(bat_priv, BATADV_CNT_RX_BYTES,