Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10888222pxu; Wed, 30 Dec 2020 14:57:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJxUYZs2OHXw54r8KSDB8RDifk/sPx1ouckbQij4wSIYVVkPvyMONr3cLcSyx3hwoTaBXvhy X-Received: by 2002:a17:906:a181:: with SMTP id s1mr52509455ejy.60.1609369040927; Wed, 30 Dec 2020 14:57:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609369040; cv=none; d=google.com; s=arc-20160816; b=uKjlamcC2dFx8rXcCP02LkYjJZo3dMC+uEHEB5vKb2xDGBxaRB254I0sK7N5C/5asm 3RDbGOwleS6KymU5c3l8oa00yvdJJDaoCNIvM2oh3fftx4KYojhRDiJWjLTZ9ulyRzok T6BXlQkX8KJOQ/yi0nce1dReRvhIBBW6Jzzd7LqAp9kjE9xe+XbBjxqzjmnTecBXKwAS mioaWSbuGmH6Zr8NRb9RLPy2xPhAhUXK0EM9EchOGTOMZeR1oxpb9rcldVbJpkXbprQz 8vjp0qzBxUr3VKrrDI0Dr7tr30UJdivxVT61m4RqU6hRMrVb8lvcI7wDFQ8m80fAB3uW hgpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=fkonjLjYRFDw/u76n7t+moOaX+PjH/39tyxGd/FyqBA=; b=ILQ+YgX0uk3bqmNbc6cVcpQPdU+IK2y7HT6NfrH3KM6RReeGJy71pMMdqLb/h8T7yk YslVcMpD4rr0dDFCQHudc9MDjeDADYi4S8EIVbRapT3oHm7ve2RaTsaWhMI73dr0Rpbd YnGC6t4JFMY46zx5g9oKUiaikF13k5H4m9E0ax2dxY0G84luaBUTnjEc9YOtS8NqbuIq VdhpZVc+fDH4PtEgNYudKffIvECAGpOteiRrOSGxxxlMP2GwNN2a3Nh1nRii2eslUHpr lsZRjbO12DMJT4vq8kbHlXyyB3LV5WHuUi4UC3Q/3MmjbyC9IKC/7IfF15TJM/FSXdTJ AAmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=VXhD8BCr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b11si25290098edr.48.2020.12.30.14.56.46; Wed, 30 Dec 2020 14:57:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=VXhD8BCr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726388AbgL3WzL (ORCPT + 99 others); Wed, 30 Dec 2020 17:55:11 -0500 Received: from smtp-fw-33001.amazon.com ([207.171.190.10]:61540 "EHLO smtp-fw-33001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726261AbgL3WzL (ORCPT ); Wed, 30 Dec 2020 17:55:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1609368911; x=1640904911; h=date:from:to:cc:subject:message-id:mime-version; bh=fkonjLjYRFDw/u76n7t+moOaX+PjH/39tyxGd/FyqBA=; b=VXhD8BCrC+tGlmzzURCVOQZvTYKz5PToh4UgYZdzAqldhf2VluPz6O3r ThmUcLXNqNwRAbVAO6+IAqV6mZ+4LWJjoZR1pAJPWdHYO+aQPas2EfRuX ydgTMAFcsfATisQDodX+OXXmuA0m6065SYCLQyjJSU/UXYWNr89acUWkG Y=; X-IronPort-AV: E=Sophos;i="5.78,462,1599523200"; d="scan'208";a="107163853" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-2a-22cc717f.us-west-2.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-33001.sea14.amazon.com with ESMTP; 30 Dec 2020 22:54:30 +0000 Received: from EX13MTAUEE001.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan3.pdx.amazon.com [10.236.137.198]) by email-inbound-relay-2a-22cc717f.us-west-2.amazon.com (Postfix) with ESMTPS id 5FF5FA06FD; Wed, 30 Dec 2020 22:54:29 +0000 (UTC) Received: from EX13D06UEA002.ant.amazon.com (10.43.61.198) by EX13MTAUEE001.ant.amazon.com (10.43.62.200) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 30 Dec 2020 22:54:28 +0000 Received: from ucf43ac461c9a53.ant.amazon.com (10.43.160.48) by EX13D06UEA002.ant.amazon.com (10.43.61.198) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 30 Dec 2020 22:54:27 +0000 Date: Wed, 30 Dec 2020 17:54:23 -0500 From: Tong Zhu To: , , , , CC: , , Subject: [PATCH] neighbour: Disregard DEAD dst in neigh_update Message-ID: <20201230225415.GA490@ucf43ac461c9a53.ant.amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [10.43.160.48] X-ClientProxiedBy: EX13D46UWC001.ant.amazon.com (10.43.162.126) To EX13D06UEA002.ant.amazon.com (10.43.61.198) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In 4.x kernel a dst in DST_OBSOLETE_DEAD state is associated with loopback net_device and leads to loopback neighbour. It leads to an ethernet header with all zero addresses. A very troubling case is working with mac80211 and ath9k. A packet with all zero source MAC address to mac80211 will eventually fail ieee80211_find_sta_by_ifaddr in ath9k (xmit.c). As result, ath9k flushes tx queue (ath_tx_complete_aggr) without updating baw (block ack window), damages baw logic and disables transmission. Signed-off-by: Tong Zhu --- net/core/neighbour.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 6e890f51b7d8..e471c32e448f 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -1271,7 +1271,7 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, * we can reinject the packet there. */ n2 = NULL; - if (dst) { + if (dst && dst->obsolete != DST_OBSOLETE_DEAD) { n2 = dst_neigh_lookup_skb(dst, skb); if (n2) n1 = n2; -- 2.17.1