Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4369983pxj; Tue, 8 Jun 2021 12:37:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZpX5POlG3rnEwtkhHbUMuFOHWBpcAzSN6tBvrESQb7S1SXzUYK0z9MQ5+FDx8uJKd4ObA X-Received: by 2002:aa7:c9c4:: with SMTP id i4mr19463393edt.299.1623181045649; Tue, 08 Jun 2021 12:37:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623181045; cv=none; d=google.com; s=arc-20160816; b=NmzqnKqIHZz0bWOQlBlAlZaqp+l7mzRNezS0aKhSbVc7YnecDSI0s7SWPkfuFq6VG/ JUyIMWh3iYuhBGHDmq9Xliyh9fW7jun3MibLvL7025AnQQWkP3DfgNQBAergQdUyRlLq nTj52WKXpcf2H7XFp5aJMfTq3bVYBGE6jRmaest9Y0z6+svgYGvsexQ8ktjB03aA1rTB iI42ZRT5TLbhB8DLnaff8+x481y6aWibUHzHq+4QNFLA60KRjYN+/29lHzQ2IthULfhe Kxaqr3KNeT4NEu0m/Us/o8WNLWTrrKUJhXxh/8MZgwexDufcWYyii9iyvKfBsKU3+bxM q8SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=n8v1CSZTo+sbic3hiHybXXJMrdT5m+bgMKilbajIeoA=; b=WukuN6S3d8DXwsVoZEFGp3WJ4dMS83PjuH8sElUYG72990P6kXKg1Nt2CZ9/IPFm5F IbozFlkmG4kkda//QSpVrUS+fjyLYqGuKPI2RGt7tus0vIhqxt5VG1saNWqDLhi8uuGI umqLBg3AKENGiv1qhLrh8T7cwlfErKJCUFwypFqieaBaskl7isLZB19Q9FrT/w5eovP2 X8PdYdm79YhibqyxxSrpzgaiT+3518EsY1eM0ZVB1uYgPVe8s3qAz2soY/yomdhBaXnp UcmfQWtEypJ5tre3vF9LEXLuP5kXEDLjCxzSpw4Q9x69V5WKKBDpoXxfwPEzctdZX3BC zLhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HWdyCxyn; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y12si440766eje.174.2021.06.08.12.37.02; Tue, 08 Jun 2021 12:37:25 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=HWdyCxyn; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239176AbhFHTe5 (ORCPT + 99 others); Tue, 8 Jun 2021 15:34:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:40918 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238785AbhFHTUE (ORCPT ); Tue, 8 Jun 2021 15:20:04 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 21D5D61376; Tue, 8 Jun 2021 18:52:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623178345; bh=LQJUR8exshISsoUdCfe7FwT0pPIlkYfJO8Of8PzLbP4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HWdyCxynWNwRbOCv4gmrTSK6rtk6zxM7PMXc7N8ZMTk2OV+zx9E6PtTKrJq5zI5iv N01uKEoqM2tu3yLAChJ/QYZEJnAz5QCpJrnHyB7qHAVwBtRLgWB2ETUAdbMZVqE0ka vv4jm7+7tjA4n7wh7mvJ4V2u20vR6tfLgH/kaFuY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kasper Dupont , Thadeu Lima de Souza Cascardo , David Ahern , "David S. Miller" Subject: [PATCH 5.12 161/161] neighbour: allow NUD_NOARP entries to be forced GCed Date: Tue, 8 Jun 2021 20:28:11 +0200 Message-Id: <20210608175950.897071930@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210608175945.476074951@linuxfoundation.org> References: <20210608175945.476074951@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: David Ahern commit 7a6b1ab7475fd6478eeaf5c9d1163e7a18125c8f upstream. IFF_POINTOPOINT interfaces use NUD_NOARP entries for IPv6. It's possible to fill up the neighbour table with enough entries that it will overflow for valid connections after that. This behaviour is more prevalent after commit 58956317c8de ("neighbor: Improve garbage collection") is applied, as it prevents removal from entries that are not NUD_FAILED, unless they are more than 5s old. Fixes: 58956317c8de (neighbor: Improve garbage collection) Reported-by: Kasper Dupont Signed-off-by: Thadeu Lima de Souza Cascardo Signed-off-by: David Ahern Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/core/neighbour.c | 1 + 1 file changed, 1 insertion(+) --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -238,6 +238,7 @@ static int neigh_forced_gc(struct neigh_ write_lock(&n->lock); if ((n->nud_state == NUD_FAILED) || + (n->nud_state == NUD_NOARP) || (tbl->is_multicast && tbl->is_multicast(n->primary_key)) || time_after(tref, n->updated))