提交 d2fb4fb8 编写于 作者: R Roopa Prabhu 提交者: David S. Miller

Revert "neighbour: force neigh_invalidate when NUD_FAILED update is from admin"

This reverts commit 8e326289.

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: NRoopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4ba4c566
...@@ -1148,8 +1148,7 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, ...@@ -1148,8 +1148,7 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new,
neigh->nud_state = new; neigh->nud_state = new;
err = 0; err = 0;
notify = old & NUD_VALID; notify = old & NUD_VALID;
if (((old & (NUD_INCOMPLETE | NUD_PROBE)) || if ((old & (NUD_INCOMPLETE | NUD_PROBE)) &&
(flags & NEIGH_UPDATE_F_ADMIN)) &&
(new & NUD_FAILED)) { (new & NUD_FAILED)) {
neigh_invalidate(neigh); neigh_invalidate(neigh);
notify = 1; notify = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册