From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roopa Prabhu Subject: [PATCH net] Revert "neighbour: force neigh_invalidate when NUD_FAILED update is from admin" Date: Sat, 20 Oct 2018 18:09:31 -0700 Message-ID: <1540084171-12793-1-git-send-email-roopa@cumulusnetworks.com> Cc: netdev@vger.kernel.org To: davem@davemloft.net Return-path: Received: from mail-pl1-f196.google.com ([209.85.214.196]:34080 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726758AbeJUJWE (ORCPT ); Sun, 21 Oct 2018 05:22:04 -0400 Received: by mail-pl1-f196.google.com with SMTP id f18-v6so17476565plr.1 for ; Sat, 20 Oct 2018 18:09:39 -0700 (PDT) Sender: netdev-owner@vger.kernel.org List-ID: From: Roopa Prabhu This reverts commit 8e326289e3069dfc9fa9c209924668dd031ab8ef. This patch results in unnecessary netlink notification when one tries to delete a neigh entry already in NUD_FAILED state. Found this with a buggy app that tries to delete a NUD_FAILED entry repeatedly. While the notification issue can be fixed with more checks, adding more complexity here seems unnecessary. Also, recent tests with other changes in the neighbour code have shown that the INCOMPLETE and PROBE checks are good enough for the original issue. Signed-off-by: Roopa Prabhu --- Dave, Sorry about the revert so late in the release. The issue is not serious, but i think its better to revert before it gets into a released kernel. I am happy to fix the notification issue but seems unnecessary at this point. Thanks. net/core/neighbour.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 91592fc..4e07824 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -1148,8 +1148,7 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, neigh->nud_state = new; err = 0; notify = old & NUD_VALID; - if (((old & (NUD_INCOMPLETE | NUD_PROBE)) || - (flags & NEIGH_UPDATE_F_ADMIN)) && + if ((old & (NUD_INCOMPLETE | NUD_PROBE)) && (new & NUD_FAILED)) { neigh_invalidate(neigh); notify = 1; -- 2.1.4