Merge "neighbour: Prevent a dead entry from updating gc_list"

This commit is contained in:
qctecmdr 2021-02-04 04:20:34 -08:00 • committed by Gerrit - the friendly Code Review server
commit 3c7b7b5379

View file

@ -1251,13 +1251,14 @@ static int __neigh_update(struct neighbour *neigh, const u8 *lladdr,
old = neigh->nud_state;
err = -EPERM;
if (neigh->dead) {
NL_SET_ERR_MSG(extack, "Neighbor entry is now dead");
new = old;
goto out;
}
if (!(flags & NEIGH_UPDATE_F_ADMIN) &&
(old & (NUD_NOARP | NUD_PERMANENT)))
goto out;
if (neigh->dead) {
NL_SET_ERR_MSG(extack, "Neighbor entry is now dead");
goto out;
}
ext_learn_change = neigh_update_ext_learned(neigh, flags, &notify);