From: Steffen Klassert <steffen.klassert@secunet.com>
To: David Miller <davem@davemloft.net>
Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>, netdev@vger.kernel.org
Subject: [PATCH net] neigh: Force garbage collection if an entry is deleted administratively
Date: Tue, 12 Nov 2013 09:57:14 +0100 [thread overview]
Message-ID: <20131112085714.GU31491@secunet.com> (raw)
Since git commit 2724680 ("neigh: Keep neighbour cache entries if number
of them is small enough."), we keep all neighbour cache entries if the
number is below a threshold. But if we now delete an entry administratively
and then try to replace this by a permanent one, we get -EEXIST because the
old entry ist still in the table (in NUD_FAILED state).
So lets force a garbage collect if we delete an entry administratively.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
net/core/neighbour.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 6072610..ec20880 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1659,6 +1659,8 @@ static int neigh_delete(struct sk_buff *skb, struct nlmsghdr *nlh)
NEIGH_UPDATE_F_OVERRIDE |
NEIGH_UPDATE_F_ADMIN);
neigh_release(neigh);
+
+ neigh_forced_gc(tbl);
goto out;
}
read_unlock(&neigh_tbl_lock);
--
1.7.9.5
next reply other threads:[~2013-11-12 8:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-12 8:57 Steffen Klassert [this message]
2013-11-14 7:23 ` [PATCH net] neigh: Force garbage collection if an entry is deleted administratively David Miller
2013-11-18 10:08 ` Steffen Klassert
2013-11-18 21:21 ` David Miller
2013-11-19 11:54 ` Steffen Klassert
2013-11-19 12:08 ` David Laight
2013-11-19 12:41 ` Steffen Klassert
2013-11-21 19:18 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131112085714.GU31491@secunet.com \
--to=steffen.klassert@secunet.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.