aboutsummaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorJakub Kicinski2021-02-02 14:21:31 -0800
committerJakub Kicinski2021-02-02 14:21:31 -0800
commitd1e1355aefcc0cbda750a8931e93e1e04a5b0b6a (patch)
treef43b81751cb5c5736268057ecdbcdb99dd00e826 /net/core
parent9ae4bdc6e4c1281ddf8d6335bea35864d086cbf9 (diff)
parent3aaf0a27ffc29b19a62314edd684b9bc6346f9a8 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/neighbour.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index ff073581b5b1..e2982b3970b8 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1244,13 +1244,14 @@ static int __neigh_update(struct neighbour *neigh, const u8 *lladdr,
old = neigh->nud_state;
err = -EPERM;
- 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");
+ new = old;
goto out;
}
+ if (!(flags & NEIGH_UPDATE_F_ADMIN) &&
+ (old & (NUD_NOARP | NUD_PERMANENT)))
+ goto out;
ext_learn_change = neigh_update_ext_learned(neigh, flags, &notify);