From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D972EC47082 for ; Tue, 8 Jun 2021 19:11:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C43BB611AE for ; Tue, 8 Jun 2021 19:11:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236299AbhFHTM5 (ORCPT ); Tue, 8 Jun 2021 15:12:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:34182 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236205AbhFHTB1 (ORCPT ); Tue, 8 Jun 2021 15:01:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 90C3461354; Tue, 8 Jun 2021 18:44:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623177891; bh=p+PHPQ6gKflyziuFLdEsRRGWi8Rdwr30naO7QUZpkd0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VSO4zBwAm8VlKEHeOgC4dSuwH+8YGVHLDXkInZQbdmX2/lDIAJxew0VVWBNVxzUV1 AAac99KGkZkBLRjCK1T+vHmO+jjNdsBUNIj1/ecTSeiJem2YffCBL7A6pA9qxN2tQh ZpU/rd4tpFLSwMaaO3VkL1ZiYWgKh136bpQKpmBQ= 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.10 137/137] neighbour: allow NUD_NOARP entries to be forced GCed Date: Tue, 8 Jun 2021 20:27:57 +0200 Message-Id: <20210608175947.007513374@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210608175942.377073879@linuxfoundation.org> References: <20210608175942.377073879@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 @@ -239,6 +239,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))