Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c7b7b53 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 07afb6af eff30f44
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1251,13 +1251,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);